From 9c35bbe25c5b2bd9bee5bd28926cfbe2334eeabe Mon Sep 17 00:00:00 2001 From: Jiachi Liu Date: Wed, 22 Feb 2023 18:24:17 +0100 Subject: [PATCH] downgrade --- package.json | 6 +- ...t-dom-server-legacy.browser.development.js | 5611 ++++++++-------- ...om-server-legacy.browser.production.min.js | 236 +- ...eact-dom-server-legacy.node.development.js | 5633 ++++++++--------- ...t-dom-server-legacy.node.production.min.js | 255 +- ...t-dom-server-rendering-stub.development.js | 2 +- ...om-server-rendering-stub.production.min.js | 2 +- .../react-dom-server.browser.development.js | 5593 ++++++++-------- ...react-dom-server.browser.production.min.js | 236 +- .../cjs/react-dom-server.edge.development.js | 5593 ++++++++-------- .../react-dom-server.edge.production.min.js | 253 +- .../cjs/react-dom-server.node.development.js | 5593 ++++++++-------- .../react-dom-server.node.production.min.js | 254 +- .../react-dom/cjs/react-dom.development.js | 1864 ++++-- .../react-dom/cjs/react-dom.production.min.js | 550 +- .../react-dom/cjs/react-dom.profiling.min.js | 610 +- .../next/src/compiled/react-dom/package.json | 6 +- .../react-server-dom-webpack-node-register.js | 280 +- .../cjs/react-server-dom-webpack-plugin.js | 255 +- ...-dom-webpack-server.browser.development.js | 99 +- ...m-webpack-server.browser.production.min.js | 84 +- ...ver-dom-webpack-server.edge.development.js | 99 +- ...-dom-webpack-server.edge.production.min.js | 89 +- ...ver-dom-webpack-server.node.development.js | 99 +- ...-dom-webpack-server.node.production.min.js | 93 +- .../react-server-dom-webpack/client.js | 6 +- .../react-server-dom-webpack/package.json | 36 +- .../compiled/react/cjs/react.development.js | 2 +- .../react/cjs/react.production.min.js | 2 +- .../cjs/react.shared-subset.development.js | 2 +- .../cjs/react.shared-subset.production.min.js | 2 +- packages/next/src/compiled/react/package.json | 2 +- pnpm-lock.yaml | 36 +- 33 files changed, 16690 insertions(+), 16793 deletions(-) diff --git a/package.json b/package.json index f6542e3c4e3da..2e2802e140e9c 100644 --- a/package.json +++ b/package.json @@ -189,11 +189,11 @@ "random-seed": "0.3.0", "react": "18.2.0", "react-17": "npm:react@17.0.2", - "react-builtin": "npm:react@18.3.0-next-4fcc9184a-20230217", + "react-builtin": "npm:react@18.3.0-next-6ddcbd4f9-20230209", "react-dom": "18.2.0", "react-dom-17": "npm:react-dom@17.0.2", - "react-dom-builtin": "npm:react-dom@18.3.0-next-4fcc9184a-20230217", - "react-server-dom-webpack": "18.3.0-next-4fcc9184a-20230217", + "react-dom-builtin": "npm:react-dom@18.3.0-next-6ddcbd4f9-20230209", + "react-server-dom-webpack": "18.3.0-next-6ddcbd4f9-20230209", "react-ssr-prepass": "1.0.8", "react-virtualized": "9.22.3", "relay-compiler": "13.0.2", diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.development.js index 45d640819b5d5..fa5a6f7a32c50 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.development.js @@ -17,7 +17,7 @@ if (process.env.NODE_ENV !== "production") { var React = require('react'); var ReactDOM = require('react-dom'); -var ReactVersion = '18.3.0-next-4fcc9184a-20230217'; +var ReactVersion = '18.3.0-next-6ddcbd4f9-20230209'; var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; @@ -102,23 +102,6 @@ function closeWithError(destination, error) { destination.destroy(error); } -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - - return obj; -} - -var assign = Object.assign; - /* * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol * and Temporal.* types. See https://github.com/facebook/react/pull/22064. @@ -533,7 +516,6 @@ var isUnitlessNumber = { opacity: true, order: true, orphans: true, - scale: true, tabSize: true, widows: true, zIndex: true, @@ -1692,1487 +1674,1662 @@ function isArray(a) { return isArrayImpl(a); } -// The build script is at scripts/rollup/generate-inline-fizz-runtime.js. -// Run `yarn generate-inline-fizz-runtime` to generate. -var clientRenderBoundary = '$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};'; -var completeBoundary = '$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};'; -var completeBoundaryWithStyles = '$RM=new Map;\n$RR=function(p,q,w){function r(l){this.s=l}for(var t=$RC,m=$RM,u=new Map,n=new Map,g=document,h,e,f=g.querySelectorAll("template[data-precedence]"),c=0;e=f[c++];){for(var b=e.content.firstChild;b;b=b.nextSibling)u.set(b.getAttribute("data-href"),b);e.parentNode.removeChild(e)}f=g.querySelectorAll("link[data-precedence],style[data-precedence]");for(c=0;e=f[c++];)m.set(e.getAttribute("STYLE"===e.nodeName?"data-href":"href"),e),n.set(e.dataset.precedence,h=e);e=0;f=[];for(var d,\nv,a;d=w[e++];){var k=0;b=d[k++];if(!(a=m.get(b))){if(a=u.get(b))c=a.getAttribute("data-precedence");else{a=g.createElement("link");a.href=b;a.rel="stylesheet";for(a.dataset.precedence=c=d[k++];v=d[k++];)a.setAttribute(v,d[k++]);d=a._p=new Promise(function(l,x){a.onload=l;a.onerror=x});d.then(r.bind(d,"l"),r.bind(d,"e"))}m.set(b,a);b=n.get(c)||h;b===h&&(h=a);n.set(c,a);b?b.parentNode.insertBefore(a,b.nextSibling):(c=g.head,c.insertBefore(a,c.firstChild))}d=a._p;c=a.getAttribute("media");!d||"l"===\nd.s||c&&!matchMedia(c).matches||f.push(d)}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};'; -var completeSegment = '$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};'; - -function getValueDescriptorExpectingObjectForWarning(thing) { - return thing === null ? '`null`' : thing === undefined ? '`undefined`' : thing === '' ? 'an empty string' : "something with type \"" + typeof thing + "\""; -} -function getValueDescriptorExpectingEnumForWarning(thing) { - return thing === null ? '`null`' : thing === undefined ? '`undefined`' : thing === '' ? 'an empty string' : typeof thing === 'string' ? JSON.stringify(thing) : "something with type \"" + typeof thing + "\""; -} +var assign = Object.assign; -function compareResourcePropsForWarning(newProps, currentProps) { +function validatePreloadResourceDifference(originalProps, originalImplicit, latestProps, latestImplicit) { { - var propDiffs = null; - var allProps = Array.from(new Set(Object.keys(currentProps).concat(Object.keys(newProps)))); - - for (var i = 0; i < allProps.length; i++) { - var propName = allProps[i]; - var newValue = newProps[propName]; - var currentValue = currentProps[propName]; - - if (newValue !== currentValue && !(newValue == null && currentValue == null)) { - if (newValue == null) { - if (propDiffs === null) { - propDiffs = { - missing: {}, - extra: {}, - different: {} - }; - } + var href = originalProps.href; + var originalWarningName = getResourceNameForWarning('preload', originalProps, originalImplicit); + var latestWarningName = getResourceNameForWarning('preload', latestProps, latestImplicit); - propDiffs.missing[propName] = currentValue; - } else if (currentValue == null) { - if (propDiffs === null) { - propDiffs = { - missing: {}, - extra: {}, - different: {} - }; - } + if (latestProps.as !== originalProps.as) { + error('A %s is using the same href "%s" as a %s. This is always an error and React will only keep the first preload' + ' for any given href, discarding subsequent instances. To fix, find where you are using this href in link' + ' tags or in calls to ReactDOM.preload() or ReactDOM.preinit() and either make the Resource types agree or' + ' update the hrefs to be distinct for different Resource types.', latestWarningName, href, originalWarningName); + } else { + var missingProps = null; + var extraProps = null; + var differentProps = null; - propDiffs.extra[propName] = newValue; - } else { - if (propDiffs === null) { - propDiffs = { - missing: {}, - extra: {}, - different: {} + if (originalProps.media != null && latestProps.media == null) { + missingProps = missingProps || {}; + missingProps.media = originalProps.media; + } + + for (var propName in latestProps) { + var propValue = latestProps[propName]; + var originalValue = originalProps[propName]; + + if (propValue != null && propValue !== originalValue) { + if (originalValue == null) { + extraProps = extraProps || {}; + extraProps[propName] = propValue; + } else { + differentProps = differentProps || {}; + differentProps[propName] = { + original: originalValue, + latest: propValue }; } + } + } + + if (missingProps || extraProps || differentProps) { + warnDifferentProps(href, 'href', originalWarningName, latestWarningName, extraProps, missingProps, differentProps); + } + } + } +} +function validateStyleResourceDifference(originalProps, latestProps) { + { + var href = originalProps.href; // eslint-disable-next-line no-labels + + var originalWarningName = getResourceNameForWarning('style', originalProps, false); + var latestWarningName = getResourceNameForWarning('style', latestProps, false); + var missingProps = null; + var extraProps = null; + var differentProps = null; + + if (originalProps.media != null && latestProps.media == null) { + missingProps = missingProps || {}; + missingProps.media = originalProps.media; + } - propDiffs.different[propName] = { - original: currentValue, - latest: newValue + for (var propName in latestProps) { + var propValue = latestProps[propName]; + var originalValue = originalProps[propName]; + + if (propValue != null && propValue !== originalValue) { + propName = propName === 'data-precedence' ? 'precedence' : propName; + + if (originalValue == null) { + extraProps = extraProps || {}; + extraProps[propName] = propValue; + } else { + differentProps = differentProps || {}; + differentProps[propName] = { + original: originalValue, + latest: propValue }; } } } - return propDiffs; + if (missingProps || extraProps || differentProps) { + warnDifferentProps(href, 'href', originalWarningName, latestWarningName, extraProps, missingProps, differentProps); + } } } +function validateScriptResourceDifference(originalProps, latestProps) { + { + var src = originalProps.src; // eslint-disable-next-line no-labels -function describeDifferencesForStylesheets(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; + var originalWarningName = getResourceNameForWarning('script', originalProps, false); + var latestWarningName = getResourceNameForWarning('script', latestProps, false); + var extraProps = null; + var differentProps = null; - for (var propName in diff.missing) { - var propValue = diff.missing[propName]; + for (var propName in latestProps) { + var propValue = latestProps[propName]; + var originalValue = originalProps[propName]; - if (propName === 'media') { - description += "\n \"" + propName + "\" missing for props, original value: " + getValueDescriptorExpectingEnumForWarning(propValue); + if (propValue != null && propValue !== originalValue) { + if (originalValue == null) { + extraProps = extraProps || {}; + extraProps[propName] = propValue; + } else { + differentProps = differentProps || {}; + differentProps[propName] = { + original: originalValue, + latest: propValue + }; + } + } } - } - for (var _propName in diff.extra) { - var _propValue = diff.extra[_propName]; - description += "\n \"" + _propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(_propValue) + ", missing from original props"; + if (extraProps || differentProps) { + warnDifferentProps(src, 'src', originalWarningName, latestWarningName, extraProps, null, differentProps); + } } +} +function validateStyleAndHintProps(preloadProps, styleProps, implicitPreload) { + { + var href = preloadProps.href; + var originalWarningName = getResourceNameForWarning('preload', preloadProps, implicitPreload); + var latestWarningName = getResourceNameForWarning('style', styleProps, false); - for (var _propName2 in diff.different) { - var latestValue = diff.different[_propName2].latest; - var originalValue = diff.different[_propName2].original; - description += "\n \"" + _propName2 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", original value: " + getValueDescriptorExpectingEnumForWarning(originalValue); - } + if (preloadProps.as !== 'style') { + error('While creating a %s for href "%s" a %s for this same href was found. When preloading a stylesheet the' + ' "as" prop must be of type "style". This most likely ocurred by rendering a preload link with an incorrect' + ' "as" prop or by calling ReactDOM.preload with an incorrect "as" option.', latestWarningName, href, originalWarningName); + } - return description; -} -function describeDifferencesForStylesheetOverPreinit(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; + var missingProps = null; + var extraProps = null; + var differentProps = null; - for (var propName in diff.extra) { - var propValue = diff.extra[propName]; + for (var propName in styleProps) { + var styleValue = styleProps[propName]; + var preloadValue = preloadProps[propName]; - if (propName === 'precedence' || propName === 'crossOrigin' || propName === 'integrity') { - description += "\n \"" + propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", option missing"; - } else { - description += "\n \"" + propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", option not available with ReactDOM.preinit()"; + switch (propName) { + // Check for difference on specific props that cross over or influence + // the relationship between the preload and stylesheet + case 'crossOrigin': + case 'referrerPolicy': + case 'media': + case 'title': + { + if (preloadValue !== styleValue && !(preloadValue == null && styleValue == null)) { + if (styleValue == null) { + missingProps = missingProps || {}; + missingProps[propName] = preloadValue; + } else if (preloadValue == null) { + extraProps = extraProps || {}; + extraProps[propName] = styleValue; + } else { + differentProps = differentProps || {}; + differentProps[propName] = { + original: preloadValue, + latest: styleValue + }; + } + } + } + } } - } - - for (var _propName3 in diff.different) { - var latestValue = diff.different[_propName3].latest; - var originalValue = diff.different[_propName3].original; - if (_propName3 === 'precedence' && originalValue === 'default') { - description += "\n \"" + _propName3 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", missing from options"; - } else { - description += "\n \"" + _propName3 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", option value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + if (missingProps || extraProps || differentProps) { + warnDifferentProps(href, 'href', originalWarningName, latestWarningName, extraProps, missingProps, differentProps); } } - - return description; } -function describeDifferencesForPreinitOverStylesheet(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; - - for (var propName in diff.missing) { - var propValue = diff.missing[propName]; +function validateScriptAndHintProps(preloadProps, scriptProps, implicitPreload) { + { + var href = preloadProps.href; + var originalWarningName = getResourceNameForWarning('preload', preloadProps, implicitPreload); + var latestWarningName = getResourceNameForWarning('script', scriptProps, false); - if (propName === 'precedence' && propValue !== 'default') { - description += "\n \"" + propName + "\" missing from options, prop value: " + getValueDescriptorExpectingEnumForWarning(propValue); + if (preloadProps.as !== 'script') { + error('While creating a %s for href "%s" a %s for this same url was found. When preloading a script the' + ' "as" prop must be of type "script". This most likely ocurred by rendering a preload link with an incorrect' + ' "as" prop or by calling ReactDOM.preload with an incorrect "as" option.', latestWarningName, href, originalWarningName); } - } - for (var _propName4 in diff.extra) { - var _propValue2 = diff.extra[_propName4]; + var missingProps = null; + var extraProps = null; + var differentProps = null; + + for (var propName in scriptProps) { + var scriptValue = scriptProps[propName]; + var preloadValue = preloadProps[propName]; - if (_propName4 === 'precedence' || _propName4 === 'crossOrigin' || _propName4 === 'integrity') { - description += "\n \"" + _propName4 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(_propValue2) + ", missing from props"; + switch (propName) { + // Check for difference on specific props that cross over or influence + // the relationship between the preload and stylesheet + case 'crossOrigin': + case 'referrerPolicy': + case 'integrity': + { + if (preloadValue !== scriptValue && !(preloadValue == null && scriptValue == null)) { + if (scriptValue == null) { + missingProps = missingProps || {}; + missingProps[propName] = preloadValue; + } else if (preloadValue == null) { + extraProps = extraProps || {}; + extraProps[propName] = scriptValue; + } else { + differentProps = differentProps || {}; + differentProps[propName] = { + original: preloadValue, + latest: scriptValue + }; + } + } + } + } } - } - for (var _propName5 in diff.different) { - var latestValue = diff.different[_propName5].latest; - var originalValue = diff.different[_propName5].original; - description += "\n \"" + _propName5 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", prop value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + if (missingProps || extraProps || differentProps) { + warnDifferentProps(href, 'href', originalWarningName, latestWarningName, extraProps, missingProps, differentProps); + } } - - return description; } -function describeDifferencesForPreinits(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; - for (var propName in diff.missing) { - var propValue = diff.missing[propName]; +function warnDifferentProps(url, urlPropKey, originalName, latestName, extraProps, missingProps, differentProps) { + { + var juxtaposedNameStatement = latestName === originalName ? 'an earlier instance of this Resource' : "a " + originalName + " with the same " + urlPropKey; + var comparisonStatement = ''; - if (propName === 'precedence' && propValue !== 'default') { - description += "\n \"" + propName + "\" missing from options, original option value: " + getValueDescriptorExpectingEnumForWarning(propValue); + if (missingProps !== null && typeof missingProps === 'object') { + for (var propName in missingProps) { + comparisonStatement += "\n " + propName + ": missing or null in latest props, \"" + missingProps[propName] + "\" in original props"; + } } - } - for (var _propName6 in diff.extra) { - var _propValue3 = diff.extra[_propName6]; + if (extraProps !== null && typeof extraProps === 'object') { + for (var _propName in extraProps) { + comparisonStatement += "\n " + _propName + ": \"" + extraProps[_propName] + "\" in latest props, missing or null in original props"; + } + } - if (_propName6 === 'precedence' && _propValue3 !== 'default' || _propName6 === 'crossOrigin' || _propName6 === 'integrity') { - description += "\n \"" + _propName6 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(_propValue3) + ", missing from original options"; + if (differentProps !== null && typeof differentProps === 'object') { + for (var _propName2 in differentProps) { + comparisonStatement += "\n " + _propName2 + ": \"" + differentProps[_propName2].latest + "\" in latest props, \"" + differentProps[_propName2].original + "\" in original props"; + } } - } - for (var _propName7 in diff.different) { - var latestValue = diff.different[_propName7].latest; - var originalValue = diff.different[_propName7].original; - description += "\n \"" + _propName7 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", original option value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + error('A %s with %s "%s" has props that disagree with those found on %s. Resources always use the props' + ' that were provided the first time they are encountered so any differences will be ignored. Please' + ' update Resources that share an %s to have props that agree. The differences are described below.%s', latestName, urlPropKey, url, juxtaposedNameStatement, urlPropKey, comparisonStatement); } - - return description; } -var preloadOptionsForComparison = ['as', 'crossOrigin', 'integrity', 'media']; -function describeDifferencesForPreloads(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; - for (var propName in diff.missing) { - var propValue = diff.missing[propName]; +function getResourceNameForWarning(type, props, implicit) { + { + switch (type) { + case 'style': + { + return 'style Resource'; + } - if (preloadOptionsForComparison.includes(propName)) { - description += "\n \"" + propName + "\" missing from options, original option value: " + getValueDescriptorExpectingEnumForWarning(propValue); - } - } + case 'script': + { + return 'script Resource'; + } - for (var _propName8 in diff.extra) { - var _propValue4 = diff.extra[_propName8]; + case 'preload': + { + if (implicit) { + return "preload for a " + props.as + " Resource"; + } - if (preloadOptionsForComparison.includes(_propName8)) { - description += "\n \"" + _propName8 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(_propValue4) + ", missing from original options"; + return "preload Resource (as \"" + props.as + "\")"; + } } } - for (var _propName9 in diff.different) { - var latestValue = diff.different[_propName9].latest; - var originalValue = diff.different[_propName9].original; + return 'Resource'; +} +function validateLinkPropsForStyleResource(props) { + { + // This should only be called when we know we are opting into Resource semantics (i.e. precedence is not null) + var href = props.href, + onLoad = props.onLoad, + onError = props.onError, + disabled = props.disabled; + var allProps = ['onLoad', 'onError', 'disabled']; + var includedProps = []; + if (onLoad) includedProps.push('onLoad'); + if (onError) includedProps.push('onError'); + if (disabled != null) includedProps.push('disabled'); + var allPropsUnionPhrase = propNamesListJoin(allProps, 'or'); + var includedPropsPhrase = propNamesListJoin(includedProps, 'and'); + includedPropsPhrase += includedProps.length === 1 ? ' prop' : ' props'; + + if (includedProps.length) { + error('A link (rel="stylesheet") element with href "%s" has the precedence prop but also included the %s.' + ' When using %s React will opt out of Resource behavior. If you meant for this' + ' element to be treated as a Resource remove the %s. Otherwise remove the precedence prop.', href, includedPropsPhrase, allPropsUnionPhrase, includedPropsPhrase); - if (preloadOptionsForComparison.includes(_propName9)) { - description += "\n \"" + _propName9 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", original option value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + return true; } } - return description; + return false; } -function describeDifferencesForPreloadOverImplicitPreload(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; - for (var propName in diff.missing) { - var propValue = diff.missing[propName]; +function propNamesListJoin(list, combinator) { + switch (list.length) { + case 0: + return ''; - if (preloadOptionsForComparison.includes(propName)) { - description += "\n \"" + propName + "\" missing from options, underlying prop value: " + getValueDescriptorExpectingEnumForWarning(propValue); - } - } + case 1: + return list[0]; - for (var _propName10 in diff.extra) { - var _propValue5 = diff.extra[_propName10]; + case 2: + return list[0] + ' ' + combinator + ' ' + list[1]; - if (preloadOptionsForComparison.includes(_propName10)) { - description += "\n \"" + _propName10 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(_propValue5) + ", missing from underlying props"; - } + default: + return list.slice(0, -1).join(', ') + ', ' + combinator + ' ' + list[list.length - 1]; } +} - for (var _propName11 in diff.different) { - var latestValue = diff.different[_propName11].latest; - var originalValue = diff.different[_propName11].original; +function validateLinkPropsForPreloadResource(linkProps) { + { + var href = linkProps.href, + as = linkProps.as; + + if (as === 'font') { + var name = getResourceNameForWarning('preload', linkProps, false); - if (preloadOptionsForComparison.includes(_propName11)) { - description += "\n \"" + _propName11 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", underlying prop value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + if (!hasOwnProperty.call(linkProps, 'crossOrigin')) { + error('A %s with href "%s" did not specify the crossOrigin prop. Font preloads must always use' + ' anonymouse CORS mode. To fix add an empty string, "anonymous", or any other string' + ' value except "use-credentials" for the crossOrigin prop of all font preloads.', name, href); + } else if (linkProps.crossOrigin === 'use-credentials') { + error('A %s with href "%s" specified a crossOrigin value of "use-credentials". Font preloads must always use' + ' anonymouse CORS mode. To fix use an empty string, "anonymous", or any other string' + ' value except "use-credentials" for the crossOrigin prop of all font preloads.', name, href); + } } } - - return description; } -function describeDifferencesForScripts(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; +function validatePreloadArguments(href, options) { + { + if (!href || typeof href !== 'string') { + var typeOfArg = getValueDescriptorExpectingObjectForWarning(href); - for (var propName in diff.missing) { - var propValue = diff.missing[propName]; - description += "\n \"" + propName + "\" missing for props, original value: " + getValueDescriptorExpectingEnumForWarning(propValue); - } + error('ReactDOM.preload() expected the first argument to be a string representing an href but found %s instead.', typeOfArg); + } else if (typeof options !== 'object' || options === null) { + var _typeOfArg = getValueDescriptorExpectingObjectForWarning(options); - for (var _propName12 in diff.extra) { - var _propValue6 = diff.extra[_propName12]; - description += "\n \"" + _propName12 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(_propValue6) + ", missing from original props"; - } + error('ReactDOM.preload() expected the second argument to be an options argument containing at least an "as" property' + ' specifying the Resource type. It found %s instead. The href for the preload call where this warning originated is "%s".', _typeOfArg, href); + } else { + var as = options.as; - for (var _propName13 in diff.different) { - var latestValue = diff.different[_propName13].latest; - var originalValue = diff.different[_propName13].original; - description += "\n \"" + _propName13 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", original value: " + getValueDescriptorExpectingEnumForWarning(originalValue); - } + switch (as) { + // Font specific validation of options + case 'font': + { + if (options.crossOrigin === 'use-credentials') { + error('ReactDOM.preload() was called with an "as" type of "font" and with a "crossOrigin" option of "use-credentials".' + ' Fonts preloading must use crossOrigin "anonymous" to be functional. Please update your font preload to omit' + ' the crossOrigin option or change it to any other value than "use-credentials" (Browsers default all other values' + ' to anonymous mode). The href for the preload call where this warning originated is "%s"', href); + } - return description; -} -function describeDifferencesForScriptOverPreinit(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; + break; + } - for (var propName in diff.extra) { - var propValue = diff.extra[propName]; + case 'script': + case 'style': + { + break; + } + // We have an invalid as type and need to warn - if (propName === 'crossOrigin' || propName === 'integrity') { - description += "\n \"" + propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", option missing"; - } else { - description += "\n \"" + propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", option not available with ReactDOM.preinit()"; + default: + { + var typeOfAs = getValueDescriptorExpectingEnumForWarning(as); + + error('ReactDOM.preload() expected a valid "as" type in the options (second) argument but found %s instead.' + ' Please use one of the following valid values instead: %s. The href for the preload call where this' + ' warning originated is "%s".', typeOfAs, '"style", "font", or "script"', href); + } + } } } +} +function validatePreinitArguments(href, options) { + { + if (!href || typeof href !== 'string') { + var typeOfArg = getValueDescriptorExpectingObjectForWarning(href); - for (var _propName14 in diff.different) { - var latestValue = diff.different[_propName14].latest; - var originalValue = diff.different[_propName14].original; - description += "\n \"" + _propName14 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", option value: " + getValueDescriptorExpectingEnumForWarning(originalValue); - } + error('ReactDOM.preinit() expected the first argument to be a string representing an href but found %s instead.', typeOfArg); + } else if (typeof options !== 'object' || options === null) { + var _typeOfArg2 = getValueDescriptorExpectingObjectForWarning(options); - return description; -} -function describeDifferencesForPreinitOverScript(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; + error('ReactDOM.preinit() expected the second argument to be an options argument containing at least an "as" property' + ' specifying the Resource type. It found %s instead. The href for the preload call where this warning originated is "%s".', _typeOfArg2, href); + } else { + var as = options.as; - for (var propName in diff.extra) { - var propValue = diff.extra[propName]; + switch (as) { + case 'style': + case 'script': + { + break; + } + // We have an invalid as type and need to warn - if (propName === 'crossOrigin' || propName === 'integrity') { - description += "\n \"" + propName + "\" option value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", missing from props"; - } - } + default: + { + var typeOfAs = getValueDescriptorExpectingEnumForWarning(as); - for (var _propName15 in diff.different) { - var latestValue = diff.different[_propName15].latest; - var originalValue = diff.different[_propName15].original; - description += "\n \"" + _propName15 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", prop value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + error('ReactDOM.preinit() expected the second argument to be an options argument containing at least an "as" property' + ' specifying the Resource type. It found %s instead. Currently, valid resource types for for preinit are "style"' + ' and "script". The href for the preinit call where this warning originated is "%s".', typeOfAs, href); + } + } + } } +} - return description; +function getValueDescriptorExpectingObjectForWarning(thing) { + return thing === null ? 'null' : thing === undefined ? 'undefined' : thing === '' ? 'an empty string' : "something with type \"" + typeof thing + "\""; } -var ReactDOMSharedInternals = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; +function getValueDescriptorExpectingEnumForWarning(thing) { + return thing === null ? 'null' : thing === undefined ? 'undefined' : thing === '' ? 'an empty string' : typeof thing === 'string' ? JSON.stringify(thing) : "something with type \"" + typeof thing + "\""; +} -var ReactDOMCurrentDispatcher = ReactDOMSharedInternals.Dispatcher; -var ReactDOMServerDispatcher = { - preload: preload, - preinit: preinit -} ; +function createResources() { + return { + // persistent + preloadsMap: new Map(), + stylesMap: new Map(), + scriptsMap: new Map(), + headsMap: new Map(), + // cleared on flush + charset: null, + bases: new Set(), + preconnects: new Set(), + fontPreloads: new Set(), + // usedImagePreloads: new Set(), + precedences: new Map(), + usedStylePreloads: new Set(), + scripts: new Set(), + usedScriptPreloads: new Set(), + explicitStylePreloads: new Set(), + // explicitImagePreloads: new Set(), + explicitScriptPreloads: new Set(), + headResources: new Set(), + // cache for tracking structured meta tags + structuredMetaKeys: new Map(), + // like a module global for currently rendering boundary + boundaryResources: null + }; +} +function createBoundaryResources() { + return new Set(); +} var currentResources = null; var currentResourcesStack = []; -function prepareToRender(resources) { +function prepareToRenderResources(resources) { currentResourcesStack.push(currentResources); currentResources = resources; - var previousHostDispatcher = ReactDOMCurrentDispatcher.current; - ReactDOMCurrentDispatcher.current = ReactDOMServerDispatcher; - return previousHostDispatcher; } -function cleanupAfterRender(previousDispatcher) { +function finishRenderingResources() { currentResources = currentResourcesStack.pop(); - ReactDOMCurrentDispatcher.current = previousDispatcher; -} // Used to distinguish these contexts from ones used in other renderers. -var ScriptStreamingFormat = 0; -var NothingSent -/* */ -= 0; -var SentCompleteSegmentFunction -/* */ -= 1; -var SentCompleteBoundaryFunction -/* */ -= 2; -var SentClientRenderFunction -/* */ -= 4; -var SentStyleInsertionFunction -/* */ -= 8; // Per response, global state that is not contextual to the rendering subtree. -var startInlineScript = stringToPrecomputedChunk(''); -var startScriptSrc = stringToPrecomputedChunk(''); -/** - * This escaping function is designed to work with bootstrapScriptContent only. - * because we know we are escaping the entire script. We can avoid for instance - * escaping html comment string sequences that are valid javascript as well because - * if there are no sebsequent '); +var startScriptSrc = stringToPrecomputedChunk(''); +/** + * This escaping function is designed to work with bootstrapScriptContent only. + * because we know we are escaping the entire script. We can avoid for instance + * escaping html comment string sequences that are valid javascript as well because + * if there are no sebsequent '); -function writeCompletedSegmentInstruction(destination, responseState, contentSegmentID) { - { - writeChunk(destination, responseState.startInlineScript); +function pushStartMenuItem(target, props, responseState) { + target.push(startChunkForTag('menuitem')); - if ((responseState.instructions & SentCompleteSegmentFunction) === NothingSent) { - // The first time we write this, we'll need to include the full implementation. - responseState.instructions |= SentCompleteSegmentFunction; - writeChunk(destination, completeSegmentScript1Full); - } else { - // Future calls can just reuse the same function. - writeChunk(destination, completeSegmentScript1Partial); - } - } // Write function arguments, which are string literals + for (var propKey in props) { + if (hasOwnProperty.call(props, propKey)) { + var propValue = props[propKey]; + if (propValue == null) { + continue; + } - writeChunk(destination, responseState.segmentPrefix); - var formattedID = stringToChunk(contentSegmentID.toString(16)); - writeChunk(destination, formattedID); + switch (propKey) { + case 'children': + case 'dangerouslySetInnerHTML': + throw new Error('menuitems cannot have `children` nor `dangerouslySetInnerHTML`.'); + // eslint-disable-next-line-no-fallthrough - { - writeChunk(destination, completeSegmentScript2); + default: + pushAttribute(target, responseState, propKey, propValue); + break; + } + } } - writeChunk(destination, responseState.placeholderPrefix); - writeChunk(destination, formattedID); + target.push(endOfStartTag); + return null; +} +function pushTitle(target, props, responseState, insertionMode, noscriptTagInScope) { { - return writeChunkAndReturn(destination, completeSegmentScriptEnd); + var children = props.children; + var childForValidation = Array.isArray(children) && children.length < 2 ? children[0] || null : children; + + if (Array.isArray(children) && children.length > 1) { + error('A title element received an array with more than 1 element as children. ' + 'In browsers title Elements can only have Text Nodes as children. If ' + 'the children being rendered output more than a single text node in aggregate the browser ' + 'will display markup and comments as text in the title and hydration will likely fail and ' + 'fall back to client rendering'); + } else if (childForValidation != null && childForValidation.$$typeof != null) { + error('A title element received a React element for children. ' + 'In the browser title Elements can only have Text Nodes as children. If ' + 'the children being rendered output more than a single text node in aggregate the browser ' + 'will display markup and comments as text in the title and hydration will likely fail and ' + 'fall back to client rendering'); + } else if (childForValidation != null && typeof childForValidation !== 'string' && typeof childForValidation !== 'number') { + error('A title element received a value that was not a string or number for children. ' + 'In the browser title Elements can only have Text Nodes as children. If ' + 'the children being rendered output more than a single text node in aggregate the browser ' + 'will display markup and comments as text in the title and hydration will likely fail and ' + 'fall back to client rendering'); + } } -} -var completeBoundaryScript1Full = stringToPrecomputedChunk(completeBoundary + '$RC("'); -var completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC("'); -var completeBoundaryWithStylesScript1FullBoth = stringToPrecomputedChunk(completeBoundary + completeBoundaryWithStyles + '$RR("'); -var completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk(completeBoundaryWithStyles + '$RR("'); -var completeBoundaryWithStylesScript1Partial = stringToPrecomputedChunk('$RR("'); -var completeBoundaryScript2 = stringToPrecomputedChunk('","'); -var completeBoundaryScript3a = stringToPrecomputedChunk('",'); -var completeBoundaryScript3b = stringToPrecomputedChunk('"'); -var completeBoundaryScriptEnd = stringToPrecomputedChunk(')'); -function writeCompletedBoundaryInstruction(destination, responseState, boundaryID, contentSegmentID, boundaryResources) { - var hasStyleDependencies; - { - hasStyleDependencies = hasStyleResourceDependencies(boundaryResources); + if ( // title is valid in SVG so we avoid resour + insertionMode !== SVG_MODE && !noscriptTagInScope && resourcesFromElement('title', props)) { + // We have converted this link exclusively to a resource and no longer + // need to emit it + return null; } - { - writeChunk(destination, responseState.startInlineScript); + return pushTitleImpl(target, props, responseState); +} - if ( hasStyleDependencies) { - if ((responseState.instructions & SentCompleteBoundaryFunction) === NothingSent) { - responseState.instructions |= SentStyleInsertionFunction | SentCompleteBoundaryFunction; - writeChunk(destination, clonePrecomputedChunk(completeBoundaryWithStylesScript1FullBoth)); - } else if ((responseState.instructions & SentStyleInsertionFunction) === NothingSent) { - responseState.instructions |= SentStyleInsertionFunction; - writeChunk(destination, completeBoundaryWithStylesScript1FullPartial); - } else { - writeChunk(destination, completeBoundaryWithStylesScript1Partial); +function pushTitleImpl(target, props, responseState) { + target.push(startChunkForTag('title')); + var children = null; + + for (var propKey in props) { + if (hasOwnProperty.call(props, propKey)) { + var propValue = props[propKey]; + + if (propValue == null) { + continue; } - } else { - if ((responseState.instructions & SentCompleteBoundaryFunction) === NothingSent) { - responseState.instructions |= SentCompleteBoundaryFunction; - writeChunk(destination, completeBoundaryScript1Full); - } else { - writeChunk(destination, completeBoundaryScript1Partial); + + switch (propKey) { + case 'children': + children = propValue; + break; + + case 'dangerouslySetInnerHTML': + throw new Error('`dangerouslySetInnerHTML` does not make sense on .'); + // eslint-disable-next-line-no-fallthrough + + default: + pushAttribute(target, responseState, propKey, propValue); + break; } } } - if (boundaryID === null) { - throw new Error('An ID must have been assigned before we can complete the boundary.'); - } // Write function arguments, which are string and array literals + target.push(endOfStartTag); + var child = Array.isArray(children) ? children.length < 2 ? children[0] : null : children; + if (typeof child !== 'function' && typeof child !== 'symbol' && child !== null && child !== undefined) { + // eslint-disable-next-line react-internal/safe-string-coercion + target.push(stringToChunk(escapeTextForBrowser('' + child))); + } - var formattedContentID = stringToChunk(contentSegmentID.toString(16)); - writeChunk(destination, boundaryID); + target.push(endTag1, stringToChunk('title'), endTag2); + return null; +} - { - writeChunk(destination, completeBoundaryScript2); +function pushStartHead(target, preamble, props, tag, responseState) { + return pushStartGenericElement( preamble , props, tag, responseState); +} + +function pushStartHtml(target, preamble, props, tag, responseState, formatContext) { + target = preamble ; + + if (formatContext.insertionMode === ROOT_HTML_MODE) { + // If we're rendering the html tag and we're at the root (i.e. not in foreignObject) + // then we also emit the DOCTYPE as part of the root content as a convenience for + // rendering the whole document. + target.push(DOCTYPE); } - writeChunk(destination, responseState.segmentPrefix); - writeChunk(destination, formattedContentID); + return pushStartGenericElement(target, props, tag, responseState); +} - if ( hasStyleDependencies) { - // Script and data writers must format this differently: - // - script writer emits an array literal, whose string elements are - // escaped for javascript e.g. ["A", "B"] - // - data writer emits a string literal, which is escaped as html - // e.g. ["A", "B"] - { - writeChunk(destination, completeBoundaryScript3a); // boundaryResources encodes an array literal +function pushScript(target, props, responseState, textEmbedded, noscriptTagInScope) { + if ( !noscriptTagInScope && resourcesFromScript(props)) { + if (textEmbedded) { + // This link follows text but we aren't writing a tag. while not as efficient as possible we need + // to be safe and assume text will follow by inserting a textSeparator + target.push(textSeparator); + } // We have converted this link exclusively to a resource and no longer + // need to emit it - writeStyleResourceDependenciesInJS(destination, boundaryResources); - } - } else { - { - writeChunk(destination, completeBoundaryScript3b); - } - } - { - return writeChunkAndReturn(destination, completeBoundaryScriptEnd); + return null; } + + return pushScriptImpl(target, props, responseState); } -var clientRenderScript1Full = stringToPrecomputedChunk(clientRenderBoundary + ';$RX("'); -var clientRenderScript1Partial = stringToPrecomputedChunk('$RX("'); -var clientRenderScript1A = stringToPrecomputedChunk('"'); -var clientRenderErrorScriptArgInterstitial = stringToPrecomputedChunk(','); -var clientRenderScriptEnd = stringToPrecomputedChunk(')</script>'); -function writeClientRenderBoundaryInstruction(destination, responseState, boundaryID, errorDigest, errorMessage, errorComponentStack) { - { - writeChunk(destination, responseState.startInlineScript); +function pushScriptImpl(target, props, responseState) { + target.push(startChunkForTag('script')); + var children = null; + var innerHTML = null; + + for (var propKey in props) { + if (hasOwnProperty.call(props, propKey)) { + var propValue = props[propKey]; + + if (propValue == null) { + continue; + } + + switch (propKey) { + case 'children': + children = propValue; + break; - if ((responseState.instructions & SentClientRenderFunction) === NothingSent) { - // The first time we write this, we'll need to include the full implementation. - responseState.instructions |= SentClientRenderFunction; - writeChunk(destination, clientRenderScript1Full); - } else { - // Future calls can just reuse the same function. - writeChunk(destination, clientRenderScript1Partial); - } - } + case 'dangerouslySetInnerHTML': + innerHTML = propValue; + break; - if (boundaryID === null) { - throw new Error('An ID must have been assigned before we can complete the boundary.'); + default: + pushAttribute(target, responseState, propKey, propValue); + break; + } + } } - writeChunk(destination, boundaryID); + target.push(endOfStartTag); { - // " needs to be inserted for scripts, since ArgInterstitual does not contain - // leading or trailing quotes - writeChunk(destination, clientRenderScript1A); - } + if (children != null && typeof children !== 'string') { + var descriptiveStatement = typeof children === 'number' ? 'a number for children' : Array.isArray(children) ? 'an array for children' : 'something unexpected for children'; - if (errorDigest || errorMessage || errorComponentStack) { - { - // ,"JSONString" - writeChunk(destination, clientRenderErrorScriptArgInterstitial); - writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorDigest || ''))); + error('A script element was rendered with %s. If script element has children it must be a single string.' + ' Consider using dangerouslySetInnerHTML or passing a plain string as children.', descriptiveStatement); } } - if (errorMessage || errorComponentStack) { - { - // ,"JSONString" - writeChunk(destination, clientRenderErrorScriptArgInterstitial); - writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorMessage || ''))); - } - } + pushInnerHTML(target, innerHTML, children); - if (errorComponentStack) { - // ,"JSONString" - { - writeChunk(destination, clientRenderErrorScriptArgInterstitial); - writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorComponentStack))); - } + if (typeof children === 'string') { + target.push(stringToChunk(encodeHTMLTextNode(children))); } - { - // ></script> - return writeChunkAndReturn(destination, clientRenderScriptEnd); - } + target.push(endTag1, stringToChunk('script'), endTag2); + return null; } -var regexForJSStringsInInstructionScripts = /[<\u2028\u2029]/g; -function escapeJSStringsForInstructionScripts(input) { - var escaped = JSON.stringify(input); - return escaped.replace(regexForJSStringsInInstructionScripts, function (match) { - switch (match) { - // santizing breaking out of strings and script tags - case '<': - return "\\u003c"; +function pushStartGenericElement(target, props, tag, responseState) { + target.push(startChunkForTag(tag)); + var children = null; + var innerHTML = null; - case "\u2028": - return "\\u2028"; + for (var propKey in props) { + if (hasOwnProperty.call(props, propKey)) { + var propValue = props[propKey]; - case "\u2029": - return "\\u2029"; + if (propValue == null) { + continue; + } - default: - { - // eslint-disable-next-line react-internal/prod-error-codes - throw new Error('escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React'); - } + switch (propKey) { + case 'children': + children = propValue; + break; + + case 'dangerouslySetInnerHTML': + innerHTML = propValue; + break; + + default: + pushAttribute(target, responseState, propKey, propValue); + break; + } } - }); + } + + target.push(endOfStartTag); + pushInnerHTML(target, innerHTML, children); + + if (typeof children === 'string') { + // Special case children as a string to avoid the unnecessary comment. + // TODO: Remove this special case after the general optimization is in place. + target.push(stringToChunk(encodeHTMLTextNode(children))); + return null; + } + + return children; } -var regexForJSStringsInScripts = /[&><\u2028\u2029]/g; +function pushStartCustomElement(target, props, tag, responseState) { + target.push(startChunkForTag(tag)); + var children = null; + var innerHTML = null; -function escapeJSObjectForInstructionScripts(input) { - var escaped = JSON.stringify(input); - return escaped.replace(regexForJSStringsInScripts, function (match) { - switch (match) { - // santizing breaking out of strings and script tags - case '&': - return "\\u0026"; + for (var propKey in props) { + if (hasOwnProperty.call(props, propKey)) { + var propValue = props[propKey]; - case '>': - return "\\u003e"; + if (propValue == null) { + continue; + } - case '<': - return "\\u003c"; + switch (propKey) { + case 'children': + children = propValue; + break; - case "\u2028": - return "\\u2028"; + case 'dangerouslySetInnerHTML': + innerHTML = propValue; + break; - case "\u2029": - return "\\u2029"; + case 'style': + pushStyle(target, responseState, propValue); + break; - default: - { - // eslint-disable-next-line react-internal/prod-error-codes - throw new Error('escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React'); - } + case 'suppressContentEditableWarning': + case 'suppressHydrationWarning': + // Ignored. These are built-in to React on the client. + break; + + default: + if (isAttributeNameSafe(propKey) && typeof propValue !== 'function' && typeof propValue !== 'symbol') { + target.push(attributeSeparator, stringToChunk(propKey), attributeAssign, stringToChunk(escapeTextForBrowser(propValue)), attributeEnd); + } + + break; + } } - }); + } + + target.push(endOfStartTag); + pushInnerHTML(target, innerHTML, children); + return children; } -var styleTagTemplateOpen = stringToPrecomputedChunk('<template data-precedence="">'); -var styleTagTemplateClose = stringToPrecomputedChunk('</template>'); // Tracks whether we wrote any late style tags. We use this to determine -// whether we need to emit a closing template tag after flushing late style tags +var leadingNewline = stringToPrecomputedChunk('\n'); -var didWrite = false; +function pushStartPreformattedElement(target, props, tag, responseState) { + target.push(startChunkForTag(tag)); + var children = null; + var innerHTML = null; -function flushStyleTagsLateForBoundary(resource) { - if (resource.type === 'style' && (resource.state & Flushed) === NoState) { - if (didWrite === false) { - // we are going to write so we need to emit the open tag - didWrite = true; - writeChunk(this, styleTagTemplateOpen); - } // This <style> tag can be flushed now + for (var propKey in props) { + if (hasOwnProperty.call(props, propKey)) { + var propValue = props[propKey]; + if (propValue == null) { + continue; + } - var chunks = resource.chunks; + switch (propKey) { + case 'children': + children = propValue; + break; - for (var i = 0; i < chunks.length; i++) { - writeChunk(this, chunks[i]); - } + case 'dangerouslySetInnerHTML': + innerHTML = propValue; + break; - resource.state |= FlushedLate; + default: + pushAttribute(target, responseState, propKey, propValue); + break; + } + } } -} -function writeResourcesForBoundary(destination, boundaryResources) { - didWrite = false; - boundaryResources.forEach(flushStyleTagsLateForBoundary, destination); - - if (didWrite) { - return writeChunkAndReturn(destination, styleTagTemplateClose); - } else { - return true; - } -} -var precedencePlaceholderStart = stringToPrecomputedChunk('<style data-precedence="'); -var precedencePlaceholderEnd = stringToPrecomputedChunk('"></style>'); + target.push(endOfStartTag); // text/html ignores the first character in these tags if it's a newline + // Prefer to break application/xml over text/html (for now) by adding + // a newline specifically to get eaten by the parser. (Alternately for + // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first + // \r is normalized out by HTMLTextAreaElement#value.) + // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre> + // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions> + // See: <http://www.w3.org/TR/html5/syntax.html#newlines> + // See: Parsing of "textarea" "listing" and "pre" elements + // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody> + // TODO: This doesn't deal with the case where the child is an array + // or component that returns a string. -function flushResourceInPreamble(resource) { - if ((resource.state & (Flushed | Blocked)) === NoState) { - var chunks = resource.chunks; + if (innerHTML != null) { + if (children != null) { + throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.'); + } - for (var i = 0; i < chunks.length; i++) { - writeChunk(this, chunks[i]); + if (typeof innerHTML !== 'object' || !('__html' in innerHTML)) { + throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' + 'for more information.'); } - resource.state |= FlushedInPreamble; - } -} + var html = innerHTML.__html; -function flushResourceLate(resource) { - if ((resource.state & Flushed) === NoState) { - var chunks = resource.chunks; + if (html !== null && html !== undefined) { + if (typeof html === 'string' && html.length > 0 && html[0] === '\n') { + target.push(leadingNewline, stringToChunk(html)); + } else { + { + checkHtmlStringCoercion(html); + } - for (var i = 0; i < chunks.length; i++) { - writeChunk(this, chunks[i]); + target.push(stringToChunk('' + html)); + } } + } - resource.state |= FlushedLate; + if (typeof children === 'string' && children[0] === '\n') { + target.push(leadingNewline); } -} -var didFlush = false; + return children; +} // We accept any tag to be rendered but since this gets injected into arbitrary +// HTML, we want to make sure that it's a safe tag. +// http://www.w3.org/TR/REC-xml/#NT-Name -function flushUnblockedStyle(resource, key, set) { - var chunks = resource.chunks; - if (resource.state & Flushed) { - // In theory this should never happen because we clear from the - // Set on flush but to ensure correct semantics we don't emit - // anything if we are in this state. - set.delete(resource); - } else if (resource.state & Blocked) ; else { - didFlush = true; // We can emit this style or stylesheet as is. +var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset - if (resource.type === 'stylesheet') { - // We still need to encode stylesheet chunks - // because unlike most Hoistables and Resources we do not eagerly encode - // them during render. This is because if we flush late we have to send a - // different encoding and we don't want to encode multiple times - pushLinkImpl(chunks, resource.props); - } +var validatedTagCache = new Map(); - for (var i = 0; i < chunks.length; i++) { - writeChunk(this, chunks[i]); +function startChunkForTag(tag) { + var tagStartChunk = validatedTagCache.get(tag); + + if (tagStartChunk === undefined) { + if (!VALID_TAG_REGEX.test(tag)) { + throw new Error("Invalid tag: " + tag); } - resource.state |= FlushedInPreamble; - set.delete(resource); + tagStartChunk = stringToPrecomputedChunk('<' + tag); + validatedTagCache.set(tag, tagStartChunk); } -} - -function flushUnblockedStyles(set, precedence) { - didFlush = false; - set.forEach(flushUnblockedStyle, this); - if (!didFlush) { - // if we did not flush anything for this precedence slot we emit - // an empty <style data-precedence="..." /> tag to ensure the - // precedence remains in the correct order - writeChunk(this, precedencePlaceholderStart); - writeChunk(this, stringToChunk(escapeTextForBrowser(precedence))); - writeChunk(this, precedencePlaceholderEnd); - } + return tagStartChunk; } -function preloadBlockedStyle(resource) { - // The only Resources that should remain are Blocked resources +var DOCTYPE = stringToPrecomputedChunk('<!DOCTYPE html>'); +function pushStartInstance(target, preamble, type, props, responseState, formatContext, textEmbedded) { { - if ((resource.state & Blocked) === NoState) { - error('React encountered a Stylesheet Resource that was not Blocked when it was expected to be. This is a bug in React.'); - } else if (resource.state & PreloadFlushed) { - error('React encountered a Stylesheet Resource that already flushed a Preload when it was not expected to. This is a bug in React.'); + validateProperties(type, props); + validateProperties$1(type, props); + validateProperties$2(type, props, null); + + if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) { + error('A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.'); + } + + if (formatContext.insertionMode !== SVG_MODE && formatContext.insertionMode !== MATHML_MODE) { + if (type.indexOf('-') === -1 && typeof props.is !== 'string' && type.toLowerCase() !== type) { + error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type); + } } } - if (resource.type === 'style') { - // <style> tags do not need to be preloaded - return; - } + switch (type) { + // Special tags + case 'select': + return pushStartSelect(target, props, responseState); - var chunks = resource.chunks; - var preloadProps = preloadAsStylePropsFromProps(resource.props.href, resource.props); - pushLinkImpl(chunks, preloadProps); + case 'option': + return pushStartOption(target, props, responseState, formatContext); - for (var i = 0; i < chunks.length; i++) { - writeChunk(this, chunks[i]); - } + case 'textarea': + return pushStartTextArea(target, props, responseState); - resource.state |= PreloadFlushed; - chunks.length = 0; -} + case 'input': + return pushInput(target, props, responseState); -function preloadBlockedStyles(set, precedence) { - set.forEach(preloadBlockedStyle, this); - set.clear(); -} + case 'menuitem': + return pushStartMenuItem(target, props, responseState); -function preloadLateStyle(resource) { - { - if (resource.state & PreloadFlushed) { - error('React encountered a Stylesheet Resource that already flushed a Preload when it was not expected to. This is a bug in React.'); - } - } + case 'title': + return pushTitle(target, props, responseState, formatContext.insertionMode, formatContext.noscriptTagInScope) ; - if (resource.type === 'style') { - // <style> tags do not need to be preloaded - return; - } + case 'link': + return pushLink(target, props, responseState, textEmbedded, formatContext.noscriptTagInScope); - var chunks = resource.chunks; - var preloadProps = preloadAsStylePropsFromProps(resource.props.href, resource.props); - pushLinkImpl(chunks, preloadProps); + case 'script': + return pushScript(target, props, responseState, textEmbedded, formatContext.noscriptTagInScope) ; - for (var i = 0; i < chunks.length; i++) { - writeChunk(this, chunks[i]); - } + case 'meta': + return pushMeta(target, props, responseState, textEmbedded, formatContext.noscriptTagInScope); - resource.state |= PreloadFlushed; - chunks.length = 0; -} + case 'base': + return pushBase(target, props, responseState, textEmbedded, formatContext.noscriptTagInScope); + // Newline eating tags -function preloadLateStyles(set, precedence) { - set.forEach(preloadLateStyle, this); - set.clear(); -} // We don't bother reporting backpressure at the moment because we expect to -// flush the entire preamble in a single pass. This probably should be modified -// in the future to be backpressure sensitive but that requires a larger refactor -// of the flushing code in Fizz. + case 'listing': + case 'pre': + { + return pushStartPreformattedElement(target, props, type, responseState); + } + // Omitted close tags + case 'area': + case 'br': + case 'col': + case 'embed': + case 'hr': + case 'img': + case 'keygen': + case 'param': + case 'source': + case 'track': + case 'wbr': + { + return pushSelfClosing(target, props, type, responseState); + } + // These are reserved SVG and MathML elements, that are never custom elements. + // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts -function writePreamble(destination, resources, responseState, willFlushAllSegments) { + case 'annotation-xml': + case 'color-profile': + case 'font-face': + case 'font-face-src': + case 'font-face-uri': + case 'font-face-format': + case 'font-face-name': + case 'missing-glyph': + { + return pushStartGenericElement(target, props, type, responseState); + } + // Preamble start tags - var htmlChunks = responseState.htmlChunks; - var headChunks = responseState.headChunks; - var i = 0; // Emit open tags before Hoistables and Resources + case 'head': + return pushStartHead(target, preamble, props, type, responseState); - if (htmlChunks) { - // We have an <html> to emit as part of the preamble - for (i = 0; i < htmlChunks.length; i++) { - writeChunk(destination, htmlChunks[i]); - } + case 'html': + { + return pushStartHtml(target, preamble, props, type, responseState, formatContext); + } - if (headChunks) { - for (i = 0; i < headChunks.length; i++) { - writeChunk(destination, headChunks[i]); + default: + { + if (type.indexOf('-') === -1 && typeof props.is !== 'string') { + // Generic element + return pushStartGenericElement(target, props, type, responseState); + } else { + // Custom element + return pushStartCustomElement(target, props, type, responseState); + } } - } else { - // We did not render a head but we emitted an <html> so we emit one now - writeChunk(destination, startChunkForTag('head')); - writeChunk(destination, endOfStartTag); - } - } else if (headChunks) { - // We do not have an <html> but we do have a <head> - for (i = 0; i < headChunks.length; i++) { - writeChunk(destination, headChunks[i]); - } - } // Emit high priority Hoistables + } +} +var endTag1 = stringToPrecomputedChunk('</'); +var endTag2 = stringToPrecomputedChunk('>'); +function pushEndInstance(target, postamble, type, props) { + switch (type) { + // When float is on we expect title and script tags to always be pushed in + // a unit and never return children. when we end up pushing the end tag we + // want to ensure there is no extra closing tag pushed + case 'title': + case 'script': + // Omitted close tags + // TODO: Instead of repeating this switch we could try to pass a flag from above. + // That would require returning a tuple. Which might be ok if it gets inlined. + // eslint-disable-next-line-no-fallthrough + case 'area': + case 'base': + case 'br': + case 'col': + case 'embed': + case 'hr': + case 'img': + case 'input': + case 'keygen': + case 'link': + case 'meta': + case 'param': + case 'source': + case 'track': + case 'wbr': + { + // No close tag needed. + return; + } + // Postamble end tags - var charsetChunks = responseState.charsetChunks; + case 'body': + { + { + postamble.unshift(endTag1, stringToChunk(type), endTag2); + return; + } + } - for (i = 0; i < charsetChunks.length; i++) { - writeChunk(destination, charsetChunks[i]); + case 'html': + { + postamble.push(endTag1, stringToChunk(type), endTag2); + return; + } } - charsetChunks.length = 0; - var preconnectChunks = responseState.preconnectChunks; + target.push(endTag1, stringToChunk(type), endTag2); +} +function writeCompletedRoot(destination, responseState) { + var bootstrapChunks = responseState.bootstrapChunks; + var i = 0; - for (i = 0; i < preconnectChunks.length; i++) { - writeChunk(destination, preconnectChunks[i]); + for (; i < bootstrapChunks.length - 1; i++) { + writeChunk(destination, bootstrapChunks[i]); } - preconnectChunks.length = 0; - resources.fontPreloads.forEach(flushResourceInPreamble, destination); - resources.fontPreloads.clear(); // Flush unblocked stylesheets by precedence - - resources.precedences.forEach(flushUnblockedStyles, destination); // Flush preloads for Blocked stylesheets - - resources.precedences.forEach(preloadBlockedStyles, destination); - resources.usedStylesheets.forEach(function (resource) { - var key = getResourceKey(resource.props.as, resource.props.href); + if (i < bootstrapChunks.length) { + return writeChunkAndReturn(destination, bootstrapChunks[i]); + } - if (resources.stylesMap.has(key)) ; else { - var chunks = resource.chunks; + return true; +} // Structural Nodes +// A placeholder is a node inside a hidden partial tree that can be filled in later, but before +// display. It's never visible to users. We use the template tag because it can be used in every +// type of parent. <script> tags also work in every other tag except <colgroup>. - for (i = 0; i < chunks.length; i++) { - writeChunk(destination, chunks[i]); - } - } - }); - resources.usedStylesheets.clear(); - resources.scripts.forEach(flushResourceInPreamble, destination); - resources.scripts.clear(); - resources.usedScripts.forEach(flushResourceInPreamble, destination); - resources.usedScripts.clear(); - resources.explicitStylesheetPreloads.forEach(flushResourceInPreamble, destination); - resources.explicitStylesheetPreloads.clear(); - resources.explicitScriptPreloads.forEach(flushResourceInPreamble, destination); - resources.explicitScriptPreloads.clear(); - resources.explicitOtherPreloads.forEach(flushResourceInPreamble, destination); - resources.explicitOtherPreloads.clear(); // Write embedding preloadChunks +var placeholder1 = stringToPrecomputedChunk('<template id="'); +var placeholder2 = stringToPrecomputedChunk('"></template>'); +function writePlaceholder(destination, responseState, id) { + writeChunk(destination, placeholder1); + writeChunk(destination, responseState.placeholderPrefix); + var formattedID = stringToChunk(id.toString(16)); + writeChunk(destination, formattedID); + return writeChunkAndReturn(destination, placeholder2); +} // Suspense boundaries are encoded as comments. - var preloadChunks = responseState.preloadChunks; +var startCompletedSuspenseBoundary = stringToPrecomputedChunk('<!--$-->'); +var startPendingSuspenseBoundary1 = stringToPrecomputedChunk('<!--$?--><template id="'); +var startPendingSuspenseBoundary2 = stringToPrecomputedChunk('"></template>'); +var startClientRenderedSuspenseBoundary = stringToPrecomputedChunk('<!--$!-->'); +var endSuspenseBoundary = stringToPrecomputedChunk('<!--/$-->'); +var clientRenderedSuspenseBoundaryError1 = stringToPrecomputedChunk('<template'); +var clientRenderedSuspenseBoundaryErrorAttrInterstitial = stringToPrecomputedChunk('"'); +var clientRenderedSuspenseBoundaryError1A = stringToPrecomputedChunk(' data-dgst="'); +var clientRenderedSuspenseBoundaryError1B = stringToPrecomputedChunk(' data-msg="'); +var clientRenderedSuspenseBoundaryError1C = stringToPrecomputedChunk(' data-stck="'); +var clientRenderedSuspenseBoundaryError2 = stringToPrecomputedChunk('></template>'); +function writeStartCompletedSuspenseBoundary(destination, responseState) { + return writeChunkAndReturn(destination, startCompletedSuspenseBoundary); +} +function writeStartPendingSuspenseBoundary(destination, responseState, id) { + writeChunk(destination, startPendingSuspenseBoundary1); - for (i = 0; i < preloadChunks.length; i++) { - writeChunk(destination, preloadChunks[i]); + if (id === null) { + throw new Error('An ID must have been assigned before we can complete the boundary.'); } - preloadChunks.length = 0; // Write embedding hoistableChunks - - var hoistableChunks = responseState.hoistableChunks; + writeChunk(destination, id); + return writeChunkAndReturn(destination, startPendingSuspenseBoundary2); +} +function writeStartClientRenderedSuspenseBoundary(destination, responseState, errorDigest, errorMesssage, errorComponentStack) { + var result; + result = writeChunkAndReturn(destination, startClientRenderedSuspenseBoundary); + writeChunk(destination, clientRenderedSuspenseBoundaryError1); - for (i = 0; i < hoistableChunks.length; i++) { - writeChunk(destination, hoistableChunks[i]); + if (errorDigest) { + writeChunk(destination, clientRenderedSuspenseBoundaryError1A); + writeChunk(destination, stringToChunk(escapeTextForBrowser(errorDigest))); + writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial); } - hoistableChunks.length = 0; // Flush closing head if necessary + { + if (errorMesssage) { + writeChunk(destination, clientRenderedSuspenseBoundaryError1B); + writeChunk(destination, stringToChunk(escapeTextForBrowser(errorMesssage))); + writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial); + } - if (htmlChunks && headChunks === null) { - // We have an <html> rendered but no <head> rendered. We however inserted - // a <head> up above so we need to emit the </head> now. This is safe because - // if the main content contained the </head> it would also have provided a - // <head>. This means that all the content inside <html> is either <body> or - // invalid HTML - writeChunk(destination, endTag1); - writeChunk(destination, stringToChunk('head')); - writeChunk(destination, endTag2); + if (errorComponentStack) { + writeChunk(destination, clientRenderedSuspenseBoundaryError1C); + writeChunk(destination, stringToChunk(escapeTextForBrowser(errorComponentStack))); + writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial); + } } -} // We don't bother reporting backpressure at the moment because we expect to -// flush the entire preamble in a single pass. This probably should be modified -// in the future to be backpressure sensitive but that requires a larger refactor -// of the flushing code in Fizz. - -function writeHoistables(destination, resources, responseState) { - var i = 0; // Emit high priority Hoistables - // We omit charsetChunks because we have already sent the shell and if it wasn't - // already sent it is too late now. - var preconnectChunks = responseState.preconnectChunks; + result = writeChunkAndReturn(destination, clientRenderedSuspenseBoundaryError2); + return result; +} +function writeEndCompletedSuspenseBoundary(destination, responseState) { + return writeChunkAndReturn(destination, endSuspenseBoundary); +} +function writeEndPendingSuspenseBoundary(destination, responseState) { + return writeChunkAndReturn(destination, endSuspenseBoundary); +} +function writeEndClientRenderedSuspenseBoundary(destination, responseState) { + return writeChunkAndReturn(destination, endSuspenseBoundary); +} +var startSegmentHTML = stringToPrecomputedChunk('<div hidden id="'); +var startSegmentHTML2 = stringToPrecomputedChunk('">'); +var endSegmentHTML = stringToPrecomputedChunk('</div>'); +var startSegmentSVG = stringToPrecomputedChunk('<svg aria-hidden="true" style="display:none" id="'); +var startSegmentSVG2 = stringToPrecomputedChunk('">'); +var endSegmentSVG = stringToPrecomputedChunk('</svg>'); +var startSegmentMathML = stringToPrecomputedChunk('<math aria-hidden="true" style="display:none" id="'); +var startSegmentMathML2 = stringToPrecomputedChunk('">'); +var endSegmentMathML = stringToPrecomputedChunk('</math>'); +var startSegmentTable = stringToPrecomputedChunk('<table hidden id="'); +var startSegmentTable2 = stringToPrecomputedChunk('">'); +var endSegmentTable = stringToPrecomputedChunk('</table>'); +var startSegmentTableBody = stringToPrecomputedChunk('<table hidden><tbody id="'); +var startSegmentTableBody2 = stringToPrecomputedChunk('">'); +var endSegmentTableBody = stringToPrecomputedChunk('</tbody></table>'); +var startSegmentTableRow = stringToPrecomputedChunk('<table hidden><tr id="'); +var startSegmentTableRow2 = stringToPrecomputedChunk('">'); +var endSegmentTableRow = stringToPrecomputedChunk('</tr></table>'); +var startSegmentColGroup = stringToPrecomputedChunk('<table hidden><colgroup id="'); +var startSegmentColGroup2 = stringToPrecomputedChunk('">'); +var endSegmentColGroup = stringToPrecomputedChunk('</colgroup></table>'); +function writeStartSegment(destination, responseState, formatContext, id) { + switch (formatContext.insertionMode) { + case ROOT_HTML_MODE: + case HTML_MODE: + { + writeChunk(destination, startSegmentHTML); + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, stringToChunk(id.toString(16))); + return writeChunkAndReturn(destination, startSegmentHTML2); + } - for (i = 0; i < preconnectChunks.length; i++) { - writeChunk(destination, preconnectChunks[i]); - } + case SVG_MODE: + { + writeChunk(destination, startSegmentSVG); + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, stringToChunk(id.toString(16))); + return writeChunkAndReturn(destination, startSegmentSVG2); + } - preconnectChunks.length = 0; - resources.fontPreloads.forEach(flushResourceLate, destination); - resources.fontPreloads.clear(); // Preload any stylesheets. these will emit in a render instruction that follows this - // but we want to kick off preloading as soon as possible + case MATHML_MODE: + { + writeChunk(destination, startSegmentMathML); + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, stringToChunk(id.toString(16))); + return writeChunkAndReturn(destination, startSegmentMathML2); + } - resources.precedences.forEach(preloadLateStyles, destination); - resources.usedStylesheets.forEach(function (resource) { - var key = getResourceKey(resource.props.as, resource.props.href); + case HTML_TABLE_MODE: + { + writeChunk(destination, startSegmentTable); + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, stringToChunk(id.toString(16))); + return writeChunkAndReturn(destination, startSegmentTable2); + } + // TODO: For the rest of these, there will be extra wrapper nodes that never + // get deleted from the document. We need to delete the table too as part + // of the injected scripts. They are invisible though so it's not too terrible + // and it's kind of an edge case to suspend in a table. Totally supported though. - if (resources.stylesMap.has(key)) ; else { - var chunks = resource.chunks; + case HTML_TABLE_BODY_MODE: + { + writeChunk(destination, startSegmentTableBody); + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, stringToChunk(id.toString(16))); + return writeChunkAndReturn(destination, startSegmentTableBody2); + } - for (i = 0; i < chunks.length; i++) { - writeChunk(destination, chunks[i]); + case HTML_TABLE_ROW_MODE: + { + writeChunk(destination, startSegmentTableRow); + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, stringToChunk(id.toString(16))); + return writeChunkAndReturn(destination, startSegmentTableRow2); } - } - }); - resources.usedStylesheets.clear(); - resources.scripts.forEach(flushResourceLate, destination); - resources.scripts.clear(); - resources.usedScripts.forEach(flushResourceLate, destination); - resources.usedScripts.clear(); - resources.explicitStylesheetPreloads.forEach(flushResourceLate, destination); - resources.explicitStylesheetPreloads.clear(); - resources.explicitScriptPreloads.forEach(flushResourceLate, destination); - resources.explicitScriptPreloads.clear(); - resources.explicitOtherPreloads.forEach(flushResourceLate, destination); - resources.explicitOtherPreloads.clear(); // Write embedding preloadChunks - var preloadChunks = responseState.preloadChunks; + case HTML_COLGROUP_MODE: + { + writeChunk(destination, startSegmentColGroup); + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, stringToChunk(id.toString(16))); + return writeChunkAndReturn(destination, startSegmentColGroup2); + } - for (i = 0; i < preloadChunks.length; i++) { - writeChunk(destination, preloadChunks[i]); + default: + { + throw new Error('Unknown insertion mode. This is a bug in React.'); + } } +} +function writeEndSegment(destination, formatContext) { + switch (formatContext.insertionMode) { + case ROOT_HTML_MODE: + case HTML_MODE: + { + return writeChunkAndReturn(destination, endSegmentHTML); + } - preloadChunks.length = 0; // Write embedding hoistableChunks - - var hoistableChunks = responseState.hoistableChunks; - - for (i = 0; i < hoistableChunks.length; i++) { - writeChunk(destination, hoistableChunks[i]); - } + case SVG_MODE: + { + return writeChunkAndReturn(destination, endSegmentSVG); + } - hoistableChunks.length = 0; -} -function writePostamble(destination, responseState) { - if (responseState.hasBody) { - writeChunk(destination, endTag1); - writeChunk(destination, stringToChunk('body')); - writeChunk(destination, endTag2); - } + case MATHML_MODE: + { + return writeChunkAndReturn(destination, endSegmentMathML); + } - if (responseState.htmlChunks) { - writeChunk(destination, endTag1); - writeChunk(destination, stringToChunk('html')); - writeChunk(destination, endTag2); - } -} + case HTML_TABLE_MODE: + { + return writeChunkAndReturn(destination, endSegmentTable); + } -function hasStyleResourceDependencies(boundaryResources) { - var iter = boundaryResources.values(); // At the moment boundaries only accumulate style resources - // so we assume the type is correct and don't check it + case HTML_TABLE_BODY_MODE: + { + return writeChunkAndReturn(destination, endSegmentTableBody); + } - while (true) { - var _iter$next = iter.next(), - resource = _iter$next.value; + case HTML_TABLE_ROW_MODE: + { + return writeChunkAndReturn(destination, endSegmentTableRow); + } - if (!resource) break; // If every style Resource flushed in the shell we do not need to send - // any dependencies + case HTML_COLGROUP_MODE: + { + return writeChunkAndReturn(destination, endSegmentColGroup); + } - if ((resource.state & FlushedInPreamble) === NoState) { - return true; - } + default: + { + throw new Error('Unknown insertion mode. This is a bug in React.'); + } } - - return false; } +var completeSegmentScript1Full = stringToPrecomputedChunk(completeSegment + ';$RS("'); +var completeSegmentScript1Partial = stringToPrecomputedChunk('$RS("'); +var completeSegmentScript2 = stringToPrecomputedChunk('","'); +var completeSegmentScriptEnd = stringToPrecomputedChunk('")</script>'); +function writeCompletedSegmentInstruction(destination, responseState, contentSegmentID) { -var arrayFirstOpenBracket = stringToPrecomputedChunk('['); -var arraySubsequentOpenBracket = stringToPrecomputedChunk(',['); -var arrayInterstitial = stringToPrecomputedChunk(','); -var arrayCloseBracket = stringToPrecomputedChunk(']'); // This function writes a 2D array of strings to be embedded in javascript. -// E.g. -// [["JS_escaped_string1", "JS_escaped_string2"]] + { + writeChunk(destination, responseState.startInlineScript); -function writeStyleResourceDependenciesInJS(destination, boundaryResources) { - writeChunk(destination, arrayFirstOpenBracket); - var nextArrayOpenBrackChunk = arrayFirstOpenBracket; - boundaryResources.forEach(function (resource) { - if (resource.state & FlushedInPreamble) ; else if (resource.state & Flushed) { - // We only need to emit the href because this resource flushed in an earlier - // boundary already which encoded the attributes necessary to construct - // the resource instance on the client. - writeChunk(destination, nextArrayOpenBrackChunk); - writeStyleResourceDependencyHrefOnlyInJS(destination, resource.type === 'style' ? resource.props['data-href'] : resource.props.href); - writeChunk(destination, arrayCloseBracket); - nextArrayOpenBrackChunk = arraySubsequentOpenBracket; - } else if (resource.type === 'stylesheet') { - // We need to emit the whole resource for insertion on the client - writeChunk(destination, nextArrayOpenBrackChunk); - writeStyleResourceDependencyInJS(destination, resource.props.href, resource.props['data-precedence'], resource.props); - writeChunk(destination, arrayCloseBracket); - nextArrayOpenBrackChunk = arraySubsequentOpenBracket; - resource.state |= FlushedLate; + if (!responseState.sentCompleteSegmentFunction) { + // The first time we write this, we'll need to include the full implementation. + responseState.sentCompleteSegmentFunction = true; + writeChunk(destination, completeSegmentScript1Full); + } else { + // Future calls can just reuse the same function. + writeChunk(destination, completeSegmentScript1Partial); } - }); - writeChunk(destination, arrayCloseBracket); -} -/* Helper functions */ + } // Write function arguments, which are string literals -function writeStyleResourceDependencyHrefOnlyInJS(destination, href) { - // We should actually enforce this earlier when the resource is created but for - // now we make sure we are actually dealing with a string here. + writeChunk(destination, responseState.segmentPrefix); + var formattedID = stringToChunk(contentSegmentID.toString(16)); + writeChunk(destination, formattedID); + { - checkAttributeStringCoercion(href, 'href'); + writeChunk(destination, completeSegmentScript2); } - var coercedHref = '' + href; - writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedHref))); -} + writeChunk(destination, responseState.placeholderPrefix); + writeChunk(destination, formattedID); -function writeStyleResourceDependencyInJS(destination, href, precedence, props) { { - checkAttributeStringCoercion(href, 'href'); + return writeChunkAndReturn(destination, completeSegmentScriptEnd); } - - var coercedHref = '' + href; - sanitizeURL(coercedHref); - writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedHref))); +} +var completeBoundaryScript1Full = stringToPrecomputedChunk(completeBoundary + ';$RC("'); +var completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC("'); +var completeBoundaryWithStylesScript1FullBoth = stringToPrecomputedChunk(completeBoundary + ';' + completeBoundaryWithStyles + ';$RR("'); +var completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk(completeBoundaryWithStyles + ';$RR("'); +var completeBoundaryWithStylesScript1Partial = stringToPrecomputedChunk('$RR("'); +var completeBoundaryScript2 = stringToPrecomputedChunk('","'); +var completeBoundaryScript3a = stringToPrecomputedChunk('",'); +var completeBoundaryScript3b = stringToPrecomputedChunk('"'); +var completeBoundaryScriptEnd = stringToPrecomputedChunk(')</script>'); +function writeCompletedBoundaryInstruction(destination, responseState, boundaryID, contentSegmentID, boundaryResources) { + var hasStyleDependencies; { - checkAttributeStringCoercion(precedence, 'precedence'); + hasStyleDependencies = hasStyleResourceDependencies(boundaryResources); } - var coercedPrecedence = '' + precedence; - writeChunk(destination, arrayInterstitial); - writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedPrecedence))); - - for (var propKey in props) { - if (hasOwnProperty.call(props, propKey)) { - var propValue = props[propKey]; + { + writeChunk(destination, responseState.startInlineScript); - if (propValue == null) { - continue; + if ( hasStyleDependencies) { + if (!responseState.sentCompleteBoundaryFunction) { + responseState.sentCompleteBoundaryFunction = true; + responseState.sentStyleInsertionFunction = true; + writeChunk(destination, clonePrecomputedChunk(completeBoundaryWithStylesScript1FullBoth)); + } else if (!responseState.sentStyleInsertionFunction) { + responseState.sentStyleInsertionFunction = true; + writeChunk(destination, completeBoundaryWithStylesScript1FullPartial); + } else { + writeChunk(destination, completeBoundaryWithStylesScript1Partial); } - - switch (propKey) { - case 'href': - case 'rel': - case 'precedence': - case 'data-precedence': - { - break; - } - - case 'children': - case 'dangerouslySetInnerHTML': - throw new Error('link' + " is a self-closing tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.'); - // eslint-disable-next-line-no-fallthrough - - default: - writeStyleResourceAttributeInJS(destination, propKey, propValue); - break; + } else { + if (!responseState.sentCompleteBoundaryFunction) { + responseState.sentCompleteBoundaryFunction = true; + writeChunk(destination, completeBoundaryScript1Full); + } else { + writeChunk(destination, completeBoundaryScript1Partial); } } } - return null; -} - -function writeStyleResourceAttributeInJS(destination, name, value) // not null or undefined -{ - var attributeName = name.toLowerCase(); - var attributeValue; - - switch (typeof value) { - case 'function': - case 'symbol': - return; - } - - switch (name) { - // Reserved names - case 'innerHTML': - case 'dangerouslySetInnerHTML': - case 'suppressContentEditableWarning': - case 'suppressHydrationWarning': - case 'style': - // Ignored - return; - // Attribute renames + if (boundaryID === null) { + throw new Error('An ID must have been assigned before we can complete the boundary.'); + } // Write function arguments, which are string and array literals - case 'className': - attributeName = 'class'; - break; - // Booleans - case 'hidden': - if (value === false) { - return; - } + var formattedContentID = stringToChunk(contentSegmentID.toString(16)); + writeChunk(destination, boundaryID); - attributeValue = ''; - break; - // Santized URLs + { + writeChunk(destination, completeBoundaryScript2); + } - case 'src': - case 'href': - { - { - checkAttributeStringCoercion(value, attributeName); - } + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, formattedContentID); - attributeValue = '' + value; - sanitizeURL(attributeValue); - break; - } + if ( hasStyleDependencies) { + // Script and data writers must format this differently: + // - script writer emits an array literal, whose string elements are + // escaped for javascript e.g. ["A", "B"] + // - data writer emits a string literal, which is escaped as html + // e.g. ["A", "B"] + { + writeChunk(destination, completeBoundaryScript3a); // boundaryResources encodes an array literal - default: - { - if (!isAttributeNameSafe(name)) { - return; - } - } + writeStyleResourceDependenciesInJS(destination, boundaryResources); + } + } else { + { + writeChunk(destination, completeBoundaryScript3b); + } } - if ( // shouldIgnoreAttribute - // We have already filtered out null/undefined and reserved words. - name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) { - return; + { + return writeChunkAndReturn(destination, completeBoundaryScriptEnd); } +} +var clientRenderScript1Full = stringToPrecomputedChunk(clientRenderBoundary + ';$RX("'); +var clientRenderScript1Partial = stringToPrecomputedChunk('$RX("'); +var clientRenderScript1A = stringToPrecomputedChunk('"'); +var clientRenderErrorScriptArgInterstitial = stringToPrecomputedChunk(','); +var clientRenderScriptEnd = stringToPrecomputedChunk(')</script>'); +function writeClientRenderBoundaryInstruction(destination, responseState, boundaryID, errorDigest, errorMessage, errorComponentStack) { { - checkAttributeStringCoercion(value, attributeName); - } + writeChunk(destination, responseState.startInlineScript); - attributeValue = '' + value; - writeChunk(destination, arrayInterstitial); - writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(attributeName))); - writeChunk(destination, arrayInterstitial); - writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(attributeValue))); -} // This function writes a 2D array of strings to be embedded in an attribute -/** - * Resources - */ + if (!responseState.sentClientRenderFunction) { + // The first time we write this, we'll need to include the full implementation. + responseState.sentClientRenderFunction = true; + writeChunk(destination, clientRenderScript1Full); + } else { + // Future calls can just reuse the same function. + writeChunk(destination, clientRenderScript1Partial); + } + } + if (boundaryID === null) { + throw new Error('An ID must have been assigned before we can complete the boundary.'); + } -var NoState -/* */ -= 0; // These tags indicate whether the Resource was flushed and in which phase - -var FlushedInPreamble -/* */ -= 1; -var FlushedLate -/* */ -= 2; -var Flushed -/* */ -= 3; // This tag indicates whether this Resource is blocked from flushing. -// This currently is only used with stylesheets that are blocked by a Boundary - -var Blocked -/* */ -= 4; // This tag indicates whether this Resource has been preloaded. -// This generally only makes sense for Resources other than PreloadResource - -var PreloadFlushed -/* */ -= 8; // Dev extensions. -// Stylesheets and Scripts rendered with jsx -// Preloads, Stylesheets, and Scripts from ReactDOM.preload or ReactDOM.preinit -// Preloads created for normal components we rendered but know we can preload early such as -// sync Scripts and stylesheets without precedence or with onLoad/onError handlers -// @TODO add bootstrap script to implicit preloads + writeChunk(destination, boundaryID); -function createResources() { - return { - // persistent - preloadsMap: new Map(), - stylesMap: new Map(), - scriptsMap: new Map(), - // cleared on flush - fontPreloads: new Set(), - // usedImagePreloads: new Set(), - precedences: new Map(), - usedStylesheets: new Set(), - scripts: new Set(), - usedScripts: new Set(), - explicitStylesheetPreloads: new Set(), - // explicitImagePreloads: new Set(), - explicitScriptPreloads: new Set(), - explicitOtherPreloads: new Set(), - // like a module global for currently rendering boundary - boundaryResources: null - }; -} -function createBoundaryResources() { - return new Set(); -} -function setCurrentlyRenderingBoundaryResourcesTarget(resources, boundaryResources) { - resources.boundaryResources = boundaryResources; -} + { + // " needs to be inserted for scripts, since ArgInterstitual does not contain + // leading or trailing quotes + writeChunk(destination, clientRenderScript1A); + } -function getResourceKey(as, href) { - return "[" + as + "]" + href; -} + if (errorDigest || errorMessage || errorComponentStack) { + { + // ,"JSONString" + writeChunk(destination, clientRenderErrorScriptArgInterstitial); + writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorDigest || ''))); + } + } -function preload(href, options) { - if (!currentResources) { - // While we expect that preload calls are primarily going to be observed - // during render because effects and events don't run on the server it is - // still possible that these get called in module scope. This is valid on - // the client since there is still a document to interact with but on the - // server we need a request to associate the call to. Because of this we - // simply return and do not warn. - return; + if (errorMessage || errorComponentStack) { + { + // ,"JSONString" + writeChunk(destination, clientRenderErrorScriptArgInterstitial); + writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorMessage || ''))); + } } - var resources = currentResources; + if (errorComponentStack) { + // ,"JSONString" + { + writeChunk(destination, clientRenderErrorScriptArgInterstitial); + writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorComponentStack))); + } + } { - if (typeof href !== 'string' || !href) { - error('ReactDOM.preload(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.', getValueDescriptorExpectingObjectForWarning(href)); - } else if (options == null || typeof options !== 'object') { - error('ReactDOM.preload(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preloaded but encountered %s instead.', getValueDescriptorExpectingEnumForWarning(options)); - } else if (typeof options.as !== 'string') { - error('ReactDOM.preload(): Expected the `as` property in the `options` argument (second) to contain a string value describing the type of resource to be preloaded but encountered %s instead. Values that are valid in for the `as` attribute of a `<link rel="preload" as="..." />` tag are valid here.', getValueDescriptorExpectingEnumForWarning(options.as)); - } + // ></script> + return writeChunkAndReturn(destination, clientRenderScriptEnd); } +} +var regexForJSStringsInInstructionScripts = /[<\u2028\u2029]/g; - if (typeof href === 'string' && href && typeof options === 'object' && options !== null && typeof options.as === 'string') { - var as = options.as; - var key = getResourceKey(as, href); - var resource = resources.preloadsMap.get(key); +function escapeJSStringsForInstructionScripts(input) { + var escaped = JSON.stringify(input); + return escaped.replace(regexForJSStringsInInstructionScripts, function (match) { + switch (match) { + // santizing breaking out of strings and script tags + case '<': + return "\\u003c"; - { - var devResource = getAsResourceDEV(resource); + case "\u2028": + return "\\u2028"; - if (devResource) { - switch (devResource.__provenance) { - case 'preload': - { - var differenceDescription = describeDifferencesForPreloads(options, devResource.__originalOptions); + case "\u2029": + return "\\u2029"; - if (differenceDescription) { - error('ReactDOM.preload(): The options provided conflict with another call to `ReactDOM.preload("%s", { as: "%s", ...})`.' + ' React will always use the options it first encounters when preloading a resource for a given `href` and `as` type, and any later options will be ignored if different.' + ' Try updating all calls to `ReactDOM.preload()` with the same `href` and `as` type to use the same options, or eliminate one of the calls.%s', href, as, differenceDescription); - } + default: + { + // eslint-disable-next-line react-internal/prod-error-codes + throw new Error('escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React'); + } + } + }); +} - break; - } +var regexForJSStringsInScripts = /[&><\u2028\u2029]/g; - case 'implicit': - { - var _differenceDescription3 = describeDifferencesForPreloadOverImplicitPreload(options, devResource.__impliedProps); +function escapeJSObjectForInstructionScripts(input) { + var escaped = JSON.stringify(input); + return escaped.replace(regexForJSStringsInScripts, function (match) { + switch (match) { + // santizing breaking out of strings and script tags + case '&': + return "\\u0026"; - if (_differenceDescription3) { - var elementDescription = as === 'style' ? '<link rel="stylesheet" ... />' : as === 'script' ? '<script ... />' : null; + case '>': + return "\\u003e"; - if (elementDescription) { - error('ReactDOM.preload(): For `href` "%s", The options provided conflict with props on a matching %s element. When the preload' + ' options disagree with the underlying resource it usually means the browser will not be able to use the preload when the resource' + ' is fetched, negating any benefit the preload would provide. React will preload the resource using props derived from the resource instead' + ' and ignore the options provided to the `ReactDOM.preload()` call. In general, preloading is useful when you expect to' + ' render a resource soon but have not yet done so. In this case since the underlying resource was already rendered the preload call' + ' may be extraneous. Try removing the call, otherwise try adjusting both the props on the %s and the options' + ' passed to `ReactDOM.preload()` to agree.%s', href, elementDescription, elementDescription, _differenceDescription3); - } - } + case '<': + return "\\u003c"; - break; - } + case "\u2028": + return "\\u2028"; + + case "\u2029": + return "\\u2029"; + + default: + { + // eslint-disable-next-line react-internal/prod-error-codes + throw new Error('escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React'); } - } } + }); +} - if (!resource) { - resource = { - type: 'preload', - chunks: [], - state: NoState, - props: preloadPropsFromPreloadOptions(href, as, options) - }; - resources.preloadsMap.set(key, resource); +var precedencePlaceholderStart = stringToPrecomputedChunk('<style data-precedence="'); +var precedencePlaceholderEnd = stringToPrecomputedChunk('"></style>'); +function writeInitialResources(destination, resources, responseState, willFlushAllSegments) { - { - markAsImperativeResourceDEV(resource, 'preload', href, options, resource.props); - } - pushLinkImpl(resource.chunks, resource.props); + function flushLinkResource(resource) { + if (!resource.flushed) { + pushLinkImpl(target, resource.props, responseState); + resource.flushed = true; } + } - switch (as) { - case 'font': - { - resources.fontPreloads.add(resource); - break; - } + var target = []; + var charset = resources.charset, + bases = resources.bases, + preconnects = resources.preconnects, + fontPreloads = resources.fontPreloads, + precedences = resources.precedences, + usedStylePreloads = resources.usedStylePreloads, + scripts = resources.scripts, + usedScriptPreloads = resources.usedScriptPreloads, + explicitStylePreloads = resources.explicitStylePreloads, + explicitScriptPreloads = resources.explicitScriptPreloads, + headResources = resources.headResources; - case 'style': + if (charset) { + pushSelfClosing(target, charset.props, 'meta', responseState); + charset.flushed = true; + resources.charset = null; + } + + bases.forEach(function (r) { + pushSelfClosing(target, r.props, 'base', responseState); + r.flushed = true; + }); + bases.clear(); + preconnects.forEach(function (r) { + // font preload Resources should not already be flushed so we elide this check + pushLinkImpl(target, r.props, responseState); + r.flushed = true; + }); + preconnects.clear(); + fontPreloads.forEach(function (r) { + // font preload Resources should not already be flushed so we elide this check + pushLinkImpl(target, r.props, responseState); + r.flushed = true; + }); + fontPreloads.clear(); // Flush stylesheets first by earliest precedence + + precedences.forEach(function (p, precedence) { + if (p.size) { + p.forEach(function (r) { + // resources should not already be flushed so we elide this check + pushLinkImpl(target, r.props, responseState); + r.flushed = true; + r.inShell = true; + r.hint.flushed = true; + }); + p.clear(); + } else { + target.push(precedencePlaceholderStart, stringToChunk(escapeTextForBrowser(precedence)), precedencePlaceholderEnd); + } + }); + usedStylePreloads.forEach(flushLinkResource); + usedStylePreloads.clear(); + scripts.forEach(function (r) { + // should never be flushed already + pushScriptImpl(target, r.props, responseState); + r.flushed = true; + r.hint.flushed = true; + }); + scripts.clear(); + usedScriptPreloads.forEach(flushLinkResource); + usedScriptPreloads.clear(); + explicitStylePreloads.forEach(flushLinkResource); + explicitStylePreloads.clear(); + explicitScriptPreloads.forEach(flushLinkResource); + explicitScriptPreloads.clear(); + headResources.forEach(function (r) { + switch (r.type) { + case 'title': { - resources.explicitStylesheetPreloads.add(resource); + pushTitleImpl(target, r.props, responseState); break; } - case 'script': + case 'meta': { - resources.explicitScriptPreloads.add(resource); + pushSelfClosing(target, r.props, 'meta', responseState); break; } - default: + case 'link': { - resources.explicitOtherPreloads.add(resource); + pushLinkImpl(target, r.props, responseState); + break; } } - } -} -function preinit(href, options) { - if (!currentResources) { - // While we expect that preinit calls are primarily going to be observed - // during render because effects and events don't run on the server it is - // still possible that these get called in module scope. This is valid on - // the client since there is still a document to interact with but on the - // server we need a request to associate the call to. Because of this we - // simply return and do not warn. - return; - } - preinitImpl(currentResources, href, options); -} // On the server, preinit may be called outside of render when sending an -// external SSR runtime as part of the initial resources payload. Since this -// is an internal React call, we do not need to use the resources stack. + r.flushed = true; + }); + headResources.clear(); + var i; + var r = true; -function preinitImpl(resources, href, options) { - { - if (typeof href !== 'string' || !href) { - error('ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.', getValueDescriptorExpectingObjectForWarning(href)); - } else if (options == null || typeof options !== 'object') { - error('ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.', getValueDescriptorExpectingEnumForWarning(options)); - } else if (options.as !== 'style' && options.as !== 'script') { - error('ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".', getValueDescriptorExpectingEnumForWarning(options.as)); - } + for (i = 0; i < target.length - 1; i++) { + writeChunk(destination, target[i]); } - if (typeof href === 'string' && href && typeof options === 'object' && options !== null) { - var as = options.as; + if (i < target.length) { + r = writeChunkAndReturn(destination, target[i]); + } - switch (as) { - case 'style': + return r; +} +function writeImmediateResources(destination, resources, responseState) { + // $FlowFixMe[missing-local-annot] + function flushLinkResource(resource) { + if (!resource.flushed) { + pushLinkImpl(target, resource.props, responseState); + resource.flushed = true; + } + } + + var target = []; + var charset = resources.charset, + preconnects = resources.preconnects, + fontPreloads = resources.fontPreloads, + usedStylePreloads = resources.usedStylePreloads, + scripts = resources.scripts, + usedScriptPreloads = resources.usedScriptPreloads, + explicitStylePreloads = resources.explicitStylePreloads, + explicitScriptPreloads = resources.explicitScriptPreloads, + headResources = resources.headResources; + + if (charset) { + pushSelfClosing(target, charset.props, 'meta', responseState); + charset.flushed = true; + resources.charset = null; + } + + preconnects.forEach(function (r) { + // font preload Resources should not already be flushed so we elide this check + pushLinkImpl(target, r.props, responseState); + r.flushed = true; + }); + preconnects.clear(); + fontPreloads.forEach(function (r) { + // font preload Resources should not already be flushed so we elide this check + pushLinkImpl(target, r.props, responseState); + r.flushed = true; + }); + fontPreloads.clear(); + usedStylePreloads.forEach(flushLinkResource); + usedStylePreloads.clear(); + scripts.forEach(function (r) { + // should never be flushed already + pushStartGenericElement(target, r.props, 'script', responseState); + pushEndInstance(target, target, 'script', r.props); + r.flushed = true; + r.hint.flushed = true; + }); + scripts.clear(); + usedScriptPreloads.forEach(flushLinkResource); + usedScriptPreloads.clear(); + explicitStylePreloads.forEach(flushLinkResource); + explicitStylePreloads.clear(); + explicitScriptPreloads.forEach(flushLinkResource); + explicitScriptPreloads.clear(); + headResources.forEach(function (r) { + switch (r.type) { + case 'title': { - var key = getResourceKey(as, href); - var resource = resources.stylesMap.get(key); - var precedence = options.precedence || 'default'; - - { - var devResource = getAsResourceDEV(resource); - - if (devResource) { - var resourceProps = stylesheetPropsFromPreinitOptions(href, precedence, options); - - var propsEquivalent = assign({}, resourceProps, _defineProperty({ - precedence: options.precedence - }, 'data-precedence', null)); - - switch (devResource.__provenance) { - case 'rendered': - { - var differenceDescription = describeDifferencesForPreinitOverStylesheet( // Diff the props from the JSX element, not the derived resource props - propsEquivalent, devResource.__originalProps); - - if (differenceDescription) { - error('ReactDOM.preinit(): For `href` "%s", the options provided conflict with props found on a <link rel="stylesheet" precedence="%s" href="%s" .../> that was already rendered.' + ' React will always use the props or options it first encounters for a hoistable stylesheet for a given `href` and any later props or options will be ignored if different.' + ' Generally, ReactDOM.preinit() is useful when you are not yet rendering a stylesheet but you anticipate it will be used soon.' + ' In this case the stylesheet was already rendered so preinitializing it does not provide any additional benefit.' + ' To resolve, try making the props and options agree between the <link rel="stylesheet" .../> and the `ReactDOM.preinit()` call or' + ' remove the `ReactDOM.preinit()` call.%s', href, devResource.__originalProps.precedence, href, differenceDescription); - } - - break; - } - - case 'preinit': - { - var _differenceDescription4 = describeDifferencesForPreinits( // Diff the props from the JSX element, not the derived resource props - propsEquivalent, devResource.__propsEquivalent); - - if (_differenceDescription4) { - error('ReactDOM.preinit(): For `href` "%s", the options provided conflict with another call to `ReactDOM.preinit("%s", { as: "style", ... })`.' + ' React will always use the options it first encounters when preinitializing a hoistable stylesheet for a given `href` and any later options will be ignored if different.' + ' Try updating all calls to `ReactDOM.preinit()` for a given `href` to use the same options, or only call `ReactDOM.preinit()` once per `href`.%s', href, href, _differenceDescription4); - } - - break; - } - } - } - } - - if (!resource) { - resource = { - type: 'stylesheet', - chunks: [], - state: NoState, - props: stylesheetPropsFromPreinitOptions(href, precedence, options) - }; - resources.stylesMap.set(key, resource); - - { - markAsImperativeResourceDEV(resource, 'preinit', href, options, assign({}, resource.props, _defineProperty({ - precedence: precedence - }, 'data-precedence', undefined))); - } - - var precedenceSet = resources.precedences.get(precedence); - - if (!precedenceSet) { - precedenceSet = new Set(); - resources.precedences.set(precedence, precedenceSet); - } - - precedenceSet.add(resource); - } - - return; + pushTitleImpl(target, r.props, responseState); + break; } - case 'script': + case 'meta': { - var src = href; - - var _key = getResourceKey(as, src); - - var _resource3 = resources.scriptsMap.get(_key); - - { - var _devResource = getAsResourceDEV(_resource3); + pushSelfClosing(target, r.props, 'meta', responseState); + break; + } - if (_devResource) { - var _propsEquivalent = scriptPropsFromPreinitOptions(src, options); + case 'link': + { + pushLinkImpl(target, r.props, responseState); + break; + } + } - switch (_devResource.__provenance) { - case 'rendered': - { - var _differenceDescription5 = describeDifferencesForPreinitOverScript( // Diff the props from the JSX element, not the derived resource props - _propsEquivalent, _devResource.__originalProps); + r.flushed = true; + }); + headResources.clear(); + var i; + var r = true; - if (_differenceDescription5) { - error('ReactDOM.preinit(): For `href` "%s", the options provided conflict with props found on a <script async={true} src="%s" .../> that was already rendered.' + ' React will always use the props or options it first encounters for a hoistable script for a given `href` and any later props or options will be ignored if different.' + ' Generally, ReactDOM.preinit() is useful when you are not yet rendering a script but you anticipate it will be used soon and want to go beyond preloading it and have it' + ' execute early. In this case the script was already rendered so preinitializing it does not provide any additional benefit.' + ' To resolve, try making the props and options agree between the <script .../> and the `ReactDOM.preinit()` call or remove the `ReactDOM.preinit()` call.%s', href, href, _differenceDescription5); - } + for (i = 0; i < target.length - 1; i++) { + writeChunk(destination, target[i]); + } - break; - } + if (i < target.length) { + r = writeChunkAndReturn(destination, target[i]); + } - case 'preinit': - { - var _differenceDescription6 = describeDifferencesForPreinits( // Diff the props from the JSX element, not the derived resource props - _propsEquivalent, _devResource.__propsEquivalent); + return r; +} - if (_differenceDescription6) { - error('ReactDOM.preinit(): For `href` "%s", the options provided conflict with another call to `ReactDOM.preinit("%s", { as: "script", ... })`.' + ' React will always use the options it first encounters when preinitializing a hoistable script for a given `href` and any later options will be ignored if different.' + ' Try updating all calls to `ReactDOM.preinit()` for a given `href` to use the same options, or only call `ReactDOM.preinit()` once per `href`.%s', href, href, _differenceDescription6); - } +function hasStyleResourceDependencies(boundaryResources) { + var iter = boundaryResources.values(); // At the moment boundaries only accumulate style resources + // so we assume the type is correct and don't check it - break; - } - } - } - } + while (true) { + var _iter$next = iter.next(), + resource = _iter$next.value; - if (!_resource3) { - _resource3 = { - type: 'script', - chunks: [], - state: NoState, - props: null - }; - resources.scriptsMap.set(_key, _resource3); + if (!resource) break; // If every style Resource flushed in the shell we do not need to send + // any dependencies - var _resourceProps = scriptPropsFromPreinitOptions(src, options); + if (!resource.inShell) { + return true; + } + } - { - markAsImperativeResourceDEV(_resource3, 'preinit', href, options, _resourceProps); - } + return false; +} - resources.scripts.add(_resource3); - pushScriptImpl(_resource3.chunks, _resourceProps); - } +var arrayFirstOpenBracket = stringToPrecomputedChunk('['); +var arraySubsequentOpenBracket = stringToPrecomputedChunk(',['); +var arrayInterstitial = stringToPrecomputedChunk(','); +var arrayCloseBracket = stringToPrecomputedChunk(']'); // This function writes a 2D array of strings to be embedded in javascript. +// E.g. +// [["JS_escaped_string1", "JS_escaped_string2"]] - return; - } +function writeStyleResourceDependenciesInJS(destination, boundaryResources) { + writeChunk(destination, arrayFirstOpenBracket); + var nextArrayOpenBrackChunk = arrayFirstOpenBracket; + boundaryResources.forEach(function (resource) { + if (resource.inShell) ; else if (resource.flushed) { + writeChunk(destination, nextArrayOpenBrackChunk); + writeStyleResourceDependencyHrefOnlyInJS(destination, resource.href); + writeChunk(destination, arrayCloseBracket); + nextArrayOpenBrackChunk = arraySubsequentOpenBracket; + } else { + writeChunk(destination, nextArrayOpenBrackChunk); + writeStyleResourceDependencyInJS(destination, resource.href, resource.precedence, resource.props); + writeChunk(destination, arrayCloseBracket); + nextArrayOpenBrackChunk = arraySubsequentOpenBracket; + resource.flushed = true; + resource.hint.flushed = true; } - } + }); + writeChunk(destination, arrayCloseBracket); } +/* Helper functions */ -function preloadPropsFromPreloadOptions(href, as, options) { - return { - rel: 'preload', - as: as, - href: href, - crossOrigin: as === 'font' ? '' : options.crossOrigin, - integrity: options.integrity - }; -} -function preloadAsStylePropsFromProps(href, props) { - return { - rel: 'preload', - as: 'style', - href: href, - crossOrigin: props.crossOrigin, - integrity: props.integrity, - media: props.media, - hrefLang: props.hrefLang, - referrerPolicy: props.referrerPolicy - }; -} +function writeStyleResourceDependencyHrefOnlyInJS(destination, href) { + // We should actually enforce this earlier when the resource is created but for + // now we make sure we are actually dealing with a string here. + { + checkAttributeStringCoercion(href, 'href'); + } -function preloadAsScriptPropsFromProps(href, props) { - return { - rel: 'preload', - as: 'script', - href: href, - crossOrigin: props.crossOrigin, - integrity: props.integrity, - referrerPolicy: props.referrerPolicy - }; + var coercedHref = '' + href; + writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedHref))); } -function stylesheetPropsFromPreinitOptions(href, precedence, options) { - return { - rel: 'stylesheet', - href: href, - 'data-precedence': precedence, - crossOrigin: options.crossOrigin, - integrity: options.integrity - }; -} +function writeStyleResourceDependencyInJS(destination, href, precedence, props) { + { + checkAttributeStringCoercion(href, 'href'); + } -function stylesheetPropsFromRawProps(rawProps) { - return assign({}, rawProps, { - 'data-precedence': rawProps.precedence, - precedence: null - }); -} + var coercedHref = '' + href; + sanitizeURL(coercedHref); + writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedHref))); -function adoptPreloadPropsForStylesheetProps(resourceProps, preloadProps) { - if (resourceProps.crossOrigin == null) resourceProps.crossOrigin = preloadProps.crossOrigin; - if (resourceProps.integrity == null) resourceProps.integrity = preloadProps.integrity; -} + { + checkAttributeStringCoercion(precedence, 'precedence'); + } -function styleTagPropsFromRawProps(rawProps) { - return assign({}, rawProps, { - 'data-precedence': rawProps.precedence, - precedence: null, - 'data-href': rawProps.href, - href: null - }); -} + var coercedPrecedence = '' + precedence; + writeChunk(destination, arrayInterstitial); + writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedPrecedence))); -function scriptPropsFromPreinitOptions(src, options) { - return { - src: src, - async: true, - crossOrigin: options.crossOrigin, - integrity: options.integrity - }; -} + for (var propKey in props) { + if (hasOwnProperty.call(props, propKey)) { + var propValue = props[propKey]; -function adoptPreloadPropsForScriptProps(resourceProps, preloadProps) { - if (resourceProps.crossOrigin == null) resourceProps.crossOrigin = preloadProps.crossOrigin; - if (resourceProps.integrity == null) resourceProps.integrity = preloadProps.integrity; -} + if (propValue == null) { + continue; + } -function hoistStylesheetResource(resource) { - this.add(resource); -} + switch (propKey) { + case 'href': + case 'rel': + case 'precedence': + case 'data-precedence': + { + break; + } -function hoistResources(resources, source) { - var currentBoundaryResources = resources.boundaryResources; + case 'children': + case 'dangerouslySetInnerHTML': + throw new Error('link' + " is a self-closing tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.'); + // eslint-disable-next-line-no-fallthrough - if (currentBoundaryResources) { - source.forEach(hoistStylesheetResource, currentBoundaryResources); - source.clear(); + default: + writeStyleResourceAttributeInJS(destination, propKey, propValue); + break; + } + } } -} - -function unblockStylesheet(resource) { - resource.state &= ~Blocked; -} -function hoistResourcesToRoot(resources, boundaryResources) { - boundaryResources.forEach(unblockStylesheet); - boundaryResources.clear(); + return null; } -function markAsRenderedResourceDEV(resource, originalProps) { - { - var devResource = resource; - - if (typeof devResource.__provenance === 'string') { - error('Resource already marked for DEV type. This is a bug in React.'); - } +function writeStyleResourceAttributeInJS(destination, name, value) // not null or undefined +{ + var attributeName = name.toLowerCase(); + var attributeValue; - devResource.__provenance = 'rendered'; - devResource.__originalProps = originalProps; + switch (typeof value) { + case 'function': + case 'symbol': + return; } -} -function markAsImperativeResourceDEV(resource, provenance, originalHref, originalOptions, propsEquivalent) { - { - var devResource = resource; + switch (name) { + // Reserved names + case 'innerHTML': + case 'dangerouslySetInnerHTML': + case 'suppressContentEditableWarning': + case 'suppressHydrationWarning': + case 'style': + // Ignored + return; + // Attribute renames - if (typeof devResource.__provenance === 'string') { - error('Resource already marked for DEV type. This is a bug in React.'); - } + case 'className': + attributeName = 'class'; + break; + // Booleans - devResource.__provenance = provenance; - devResource.__originalHref = originalHref; - devResource.__originalOptions = originalOptions; - devResource.__propsEquivalent = propsEquivalent; - } -} + case 'hidden': + if (value === false) { + return; + } -function markAsImplicitResourceDEV(resource, underlyingProps, impliedProps) { - { - var devResource = resource; + attributeValue = ''; + break; + // Santized URLs - if (typeof devResource.__provenance === 'string') { - error('Resource already marked for DEV type. This is a bug in React.'); - } + case 'src': + case 'href': + { + { + checkAttributeStringCoercion(value, attributeName); + } - devResource.__provenance = 'implicit'; - devResource.__underlyingProps = underlyingProps; - devResource.__impliedProps = impliedProps; - } -} + attributeValue = '' + value; + sanitizeURL(attributeValue); + break; + } -function getAsResourceDEV(resource) { - { - if (resource) { - if (typeof resource.__provenance === 'string') { - return resource; + default: + { + if (!isAttributeNameSafe(name)) { + return; + } } + } - error('Resource was not marked for DEV type. This is a bug in React.'); - } + if ( // shouldIgnoreAttribute + // We have already filtered out null/undefined and reserved words. + name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) { + return; + } - return null; + { + checkAttributeStringCoercion(value, attributeName); } -} + + attributeValue = '' + value; + writeChunk(destination, arrayInterstitial); + writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(attributeName))); + writeChunk(destination, arrayInterstitial); + writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(attributeValue))); +} // This function writes a 2D array of strings to be embedded in an attribute function createResponseState$1(generateStaticMarkup, identifierPrefix, externalRuntimeConfig) { var responseState = createResponseState(identifierPrefix, undefined, undefined, undefined, undefined); @@ -5382,15 +5174,11 @@ function createResponseState$1(generateStaticMarkup, identifierPrefix, externalR nextSuspenseID: responseState.nextSuspenseID, streamingFormat: responseState.streamingFormat, startInlineScript: responseState.startInlineScript, - instructions: responseState.instructions, + sentCompleteSegmentFunction: responseState.sentCompleteSegmentFunction, + sentCompleteBoundaryFunction: responseState.sentCompleteBoundaryFunction, + sentClientRenderFunction: responseState.sentClientRenderFunction, + sentStyleInsertionFunction: responseState.sentStyleInsertionFunction, externalRuntimeConfig: responseState.externalRuntimeConfig, - htmlChunks: responseState.htmlChunks, - headChunks: responseState.headChunks, - hasBody: responseState.hasBody, - charsetChunks: responseState.charsetChunks, - preconnectChunks: responseState.preconnectChunks, - preloadChunks: responseState.preloadChunks, - hoistableChunks: responseState.hoistableChunks, // This is an extra field for the legacy renderer generateStaticMarkup: generateStaticMarkup }; @@ -7629,6 +7417,8 @@ function createRequest(children, responseState, rootFormatContext, progressiveCh clientRenderedBoundaries: [], completedBoundaries: [], partialBoundaries: [], + preamble: [], + postamble: [], onError: onError === undefined ? defaultErrorHandler : onError, onAllReady: onAllReady === undefined ? noop$2 : onAllReady, onShellReady: onShellReady === undefined ? noop$2 : onShellReady, @@ -7932,7 +7722,7 @@ function hoistCompletedBoundaryResources(request, completedBoundary) { function renderHostElement(request, task, type, props) { pushBuiltInComponentStackInDEV(task, type); var segment = task.blockedSegment; - var children = pushStartInstance(segment.chunks, type, props, request.resources, request.responseState, segment.formatContext, segment.lastPushedText); + var children = pushStartInstance(segment.chunks, request.preamble, type, props, request.responseState, segment.formatContext, segment.lastPushedText); segment.lastPushedText = false; var prevContext = segment.formatContext; segment.formatContext = getChildFormatContext(prevContext, type, props); // We use the non-destructive form because if something suspends, we still @@ -7942,7 +7732,7 @@ function renderHostElement(request, task, type, props) { // the correct context. Therefore this is not in a finally. segment.formatContext = prevContext; - pushEndInstance(segment.chunks, type, props, request.responseState, prevContext); + pushEndInstance(segment.chunks, request.postamble, type); segment.lastPushedText = false; popComponentStackInDEV(task); } @@ -9097,6 +8887,14 @@ function flushSegment(request, destination, segment) { } } +function flushInitialResources(destination, resources, responseState, willFlushAllSegments) { + writeInitialResources(destination, resources, responseState); +} + +function flushImmediateResources(destination, request) { + writeImmediateResources(destination, request.resources, request.responseState); +} + function flushClientRenderedBoundary(request, destination, boundary) { return writeClientRenderBoundaryInstruction(destination, request.responseState, boundary.id, boundary.errorDigest, boundary.errorMessage, boundary.errorComponentStack); } @@ -9121,11 +8919,6 @@ function flushCompletedBoundary(request, destination, boundary) { } completedSegments.length = 0; - - { - writeResourcesForBoundary(destination, boundary.resources); - } - return writeCompletedBoundaryInstruction(destination, request.responseState, boundary.id, boundary.rootSegmentID, boundary.resources); } @@ -9150,14 +8943,7 @@ function flushPartialBoundary(request, destination, boundary) { } completedSegments.splice(0, i); - - { - // The way this is structured we only write resources for partial boundaries - // if there is no backpressure. Later before we complete the boundary we - // will write resources regardless of backpressure before we emit the - // completion instruction - return writeResourcesForBoundary(destination, boundary.resources); - } + return true; } function flushPartiallyCompletedSegment(request, destination, boundary, segment) { @@ -9197,7 +8983,14 @@ function flushCompletedQueues(request, destination) { if (completedRootSegment !== null) { if (request.pendingRootTasks === 0) { if (enableFloat) { - writePreamble(destination, request.resources, request.responseState, request.allPendingTasks === 0); + var preamble = request.preamble; + + for (i = 0; i < preamble.length; i++) { + // we expect the preamble to be tiny and will ignore backpressure + writeChunk(destination, preamble[i]); + } + + flushInitialResources(destination, request.resources, request.responseState, request.allPendingTasks === 0); } flushSegment(request, destination, completedRootSegment); @@ -9208,7 +9001,7 @@ function flushCompletedQueues(request, destination) { return; } } else if (enableFloat) { - writeHoistables(destination, request.resources, request.responseState); + flushImmediateResources(destination, request); } // We emit client rendering instructions for already emitted boundaries first. // This is so that we can signal to the client to start client rendering them as // soon as possible. @@ -9288,7 +9081,11 @@ function flushCompletedQueues(request, destination) { // either they have pending task or they're complete. ) { { - writePostamble(destination, request.responseState); + var postamble = request.postamble; + + for (var _i = 0; _i < postamble.length; _i++) { + writeChunk(destination, postamble[_i]); + } } { diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.production.min.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.production.min.js index 0db1c17b0cfa9..a6849bba774b9 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.production.min.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.production.min.js @@ -7,123 +7,119 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -'use strict';var aa=require("react"),ba=require("react-dom");function m(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function ca(a,b){a.push(b)} -var q=Object.assign,r=Object.prototype.hasOwnProperty,da=/^[: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][: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\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ea={},fa={}; -function ha(a){if(r.call(fa,a))return!0;if(r.call(ea,a))return!1;if(da.test(a))return fa[a]=!0;ea[a]=!0;return!1}function t(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var u={}; -"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){u[a]=new t(a,0,!1,a,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];u[b]=new t(b,1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){u[a]=new t(a,2,!1,a.toLowerCase(),null,!1,!1)}); -["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){u[a]=new t(a,2,!1,a,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){u[a]=new t(a,3,!1,a.toLowerCase(),null,!1,!1)}); -["checked","multiple","muted","selected"].forEach(function(a){u[a]=new t(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){u[a]=new t(a,4,!1,a,null,!1,!1)});["cols","rows","size","span"].forEach(function(a){u[a]=new t(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){u[a]=new t(a,5,!1,a.toLowerCase(),null,!1,!1)});var ia=/[\-:]([a-z])/g;function ja(a){return a[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 transform-origin 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".split(" ").forEach(function(a){var b=a.replace(ia, -ja);u[b]=new t(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(ia,ja);u[b]=new t(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(ia,ja);u[b]=new t(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){u[a]=new t(a,1,!1,a.toLowerCase(),null,!1,!1)}); -u.xlinkHref=new t("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){u[a]=new t(a,1,!1,a.toLowerCase(),null,!0,!0)}); -var ka={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,tabSize:!0,widows:!0,zIndex:!0, -zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},la=["Webkit","ms","Moz","O"];Object.keys(ka).forEach(function(a){la.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);ka[b]=ka[a]})});var ma=/["'&<>]/; -function v(a){if("boolean"===typeof a||"number"===typeof a)return""+a;a=""+a;var b=ma.exec(a);if(b){var c="",d,e=0;for(d=b.index;d<a.length;d++){switch(a.charCodeAt(d)){case 34:b=""";break;case 38:b="&";break;case 39:b="'";break;case 60:b="<";break;case 62:b=">";break;default:continue}e!==d&&(c+=a.substring(e,d));e=d+1;c+=b}a=e!==d?c+a.substring(e,d):c}return a} -var na=/([A-Z])/g,oa=/^ms-/,pa=Array.isArray,qa=ba.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Dispatcher,va={preload:ta,preinit:ua},w=null,wa=[];function x(a,b,c){return{insertionMode:a,selectedValue:b,noscriptTagInScope:c}} -function xa(a,b,c){switch(b){case "noscript":return x(2,null,!0);case "select":return x(2,null!=c.value?c.value:c.defaultValue,a.noscriptTagInScope);case "svg":return x(3,null,a.noscriptTagInScope);case "math":return x(4,null,a.noscriptTagInScope);case "foreignObject":return x(2,null,a.noscriptTagInScope);case "table":return x(5,null,a.noscriptTagInScope);case "thead":case "tbody":case "tfoot":return x(6,null,a.noscriptTagInScope);case "colgroup":return x(8,null,a.noscriptTagInScope);case "tr":return x(7, -null,a.noscriptTagInScope)}return 5<=a.insertionMode?x(2,null,a.noscriptTagInScope):0===a.insertionMode?"html"===b?x(1,null,!1):x(2,null,!1):1===a.insertionMode?x(2,null,!1):a}var ya=new Map; -function za(a,b){if("object"!==typeof b)throw Error(m(62));var c=!0,d;for(d in b)if(r.call(b,d)){var e=b[d];if(null!=e&&"boolean"!==typeof e&&""!==e){if(0===d.indexOf("--")){var f=v(d);e=v((""+e).trim())}else{f=d;var g=ya.get(f);void 0!==g?f=g:(g=v(f.replace(na,"-$1").toLowerCase().replace(oa,"-ms-")),ya.set(f,g),f=g);e="number"===typeof e?0===e||r.call(ka,d)?""+e:e+"px":v((""+e).trim())}c?(c=!1,a.push(' style="',f,":",e)):a.push(";",f,":",e)}}c||a.push('"')} -function y(a,b,c){switch(b){case "style":za(a,c);return;case "defaultValue":case "defaultChecked":case "innerHTML":case "suppressContentEditableWarning":case "suppressHydrationWarning":return}if(!(2<b.length)||"o"!==b[0]&&"O"!==b[0]||"n"!==b[1]&&"N"!==b[1]){var d=u.hasOwnProperty(b)?u[b]:null;if(null!==d){switch(typeof c){case "function":case "symbol":return;case "boolean":if(!d.acceptsBooleans)return}b=d.attributeName;switch(d.type){case 3:c&&a.push(" ",b,'=""');break;case 4:!0===c?a.push(" ",b, -'=""'):!1!==c&&a.push(" ",b,'="',v(c),'"');break;case 5:isNaN(c)||a.push(" ",b,'="',v(c),'"');break;case 6:!isNaN(c)&&1<=c&&a.push(" ",b,'="',v(c),'"');break;default:d.sanitizeURL&&(c=""+c),a.push(" ",b,'="',v(c),'"')}}else if(ha(b)){switch(typeof c){case "function":case "symbol":return;case "boolean":if(d=b.toLowerCase().slice(0,5),"data-"!==d&&"aria-"!==d)return}a.push(" ",b,'="',v(c),'"')}}} -function z(a,b,c){if(null!=b){if(null!=c)throw Error(m(60));if("object"!==typeof b||!("__html"in b))throw Error(m(61));b=b.__html;null!==b&&void 0!==b&&a.push(""+b)}}function Aa(a){var b="";aa.Children.forEach(a,function(a){null!=a&&(b+=a)});return b} -function Ba(a,b,c,d,e,f,g){var k=b.rel,h=b.href,l=b.precedence;if(3===f||g||"string"!==typeof k||"string"!==typeof h||""===h)return B(a,b),null;if("stylesheet"===b.rel){c="[style]"+h;if("string"!==typeof l||null!=b.disabled||b.onLoad||b.onError)return e=d.preloadsMap.get(c),e||(e={type:"preload",chunks:[],state:0,props:Ca(h,b)},d.preloadsMap.set(c,e)),B(e.chunks,e.props),d.usedStylesheets.add(e),B(a,b);h=d.stylesMap.get(c);if(!h){b=q({},b,{"data-precedence":b.precedence,precedence:null});if(h=d.preloadsMap.get(c))h.state|= -4,h=h.props,null==b.crossOrigin&&(b.crossOrigin=h.crossOrigin),null==b.integrity&&(b.integrity=h.integrity);h={type:"stylesheet",chunks:[],state:d.boundaryResources?4:0,props:b};d.stylesMap.set(c,h);b=d.precedences.get(l);b||(b=new Set,d.precedences.set(l,b));b.add(h)}d.boundaryResources&&d.boundaryResources.add(h);e&&a.push("\x3c!-- --\x3e");return null}if(b.onLoad||b.onError)return B(a,b);e&&a.push("\x3c!-- --\x3e");switch(b.rel){case "preconnect":case "dns-prefetch":return B(c.preconnectChunks, -b);case "preload":return B(c.preloadChunks,b);default:return B(c.hoistableChunks,b)}}function B(a,b){a.push(E("link"));for(var c in b)if(r.call(b,c)){var d=b[c];if(null!=d)switch(c){case "children":case "dangerouslySetInnerHTML":throw Error(m(399,"link"));default:y(a,c,d)}}a.push("/>");return null} -function Da(a,b){a.push(E("style"));var c=null,d=null,e;for(e in b)if(r.call(b,e)){var f=b[e];if(null!=f)switch(e){case "children":c=f;break;case "dangerouslySetInnerHTML":d=f;break;default:y(a,e,f)}}a.push(">");b=Array.isArray(c)?2>c.length?c[0]:null:c;"function"!==typeof b&&"symbol"!==typeof b&&null!==b&&void 0!==b&&a.push(v(""+b));z(a,d,c);a.push("</","style",">");return null} -function Ea(a,b,c){a.push(E(c));for(var d in b)if(r.call(b,d)){var e=b[d];if(null!=e)switch(d){case "children":case "dangerouslySetInnerHTML":throw Error(m(399,c));default:y(a,d,e)}}a.push("/>");return null} -function Fa(a,b){a.push(E("title"));var c=null,d=null,e;for(e in b)if(r.call(b,e)){var f=b[e];if(null!=f)switch(e){case "children":c=f;break;case "dangerouslySetInnerHTML":d=f;break;default:y(a,e,f)}}a.push(">");b=Array.isArray(c)?2>c.length?c[0]:null:c;"function"!==typeof b&&"symbol"!==typeof b&&null!==b&&void 0!==b&&a.push(v(""+b));z(a,d,c);a.push("</","title",">");return null} -function Ga(a,b){a.push(E("script"));var c=null,d=null,e;for(e in b)if(r.call(b,e)){var f=b[e];if(null!=f)switch(e){case "children":c=f;break;case "dangerouslySetInnerHTML":d=f;break;default:y(a,e,f)}}a.push(">");z(a,d,c);"string"===typeof c&&a.push(v(c));a.push("</","script",">");return null} -function G(a,b,c){a.push(E(c));var d=c=null,e;for(e in b)if(r.call(b,e)){var f=b[e];if(null!=f)switch(e){case "children":c=f;break;case "dangerouslySetInnerHTML":d=f;break;default:y(a,e,f)}}a.push(">");z(a,d,c);return"string"===typeof c?(a.push(v(c)),null):c}var Ha=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Ia=new Map;function E(a){var b=Ia.get(a);if(void 0===b){if(!Ha.test(a))throw Error(m(65,a));b="<"+a;Ia.set(a,b)}return b} -function Ja(a,b,c,d,e,f,g){switch(b){case "select":a.push(E("select"));d=g=null;for(var k in c)if(r.call(c,k)){var h=c[k];if(null!=h)switch(k){case "children":g=h;break;case "dangerouslySetInnerHTML":d=h;break;case "defaultValue":case "value":break;default:y(a,k,h)}}a.push(">");z(a,d,g);return g;case "option":g=f.selectedValue;a.push(E("option"));var l=d=null,n=k=null;for(h in c)if(r.call(c,h)){var p=c[h];if(null!=p)switch(h){case "children":d=p;break;case "selected":k=p;break;case "dangerouslySetInnerHTML":n= -p;break;case "value":l=p;default:y(a,h,p)}}if(null!=g)if(c=null!==l?""+l:Aa(d),pa(g))for(h=0;h<g.length;h++){if(""+g[h]===c){a.push(' selected=""');break}}else""+g===c&&a.push(' selected=""');else k&&a.push(' selected=""');a.push(">");z(a,n,d);return d;case "textarea":a.push(E("textarea"));h=d=g=null;for(l in c)if(r.call(c,l)&&(n=c[l],null!=n))switch(l){case "children":h=n;break;case "value":g=n;break;case "defaultValue":d=n;break;case "dangerouslySetInnerHTML":throw Error(m(91));default:y(a,l,n)}null=== -g&&null!==d&&(g=d);a.push(">");if(null!=h){if(null!=g)throw Error(m(92));if(pa(h)&&1<h.length)throw Error(m(93));g=""+h}"string"===typeof g&&"\n"===g[0]&&a.push("\n");null!==g&&a.push(v(""+g));return null;case "input":a.push(E("input"));l=h=d=g=null;for(n in c)if(r.call(c,n)&&(k=c[n],null!=k))switch(n){case "children":case "dangerouslySetInnerHTML":throw Error(m(399,"input"));case "defaultChecked":l=k;break;case "defaultValue":d=k;break;case "checked":h=k;break;case "value":g=k;break;default:y(a, -n,k)}null!==h?y(a,"checked",h):null!==l&&y(a,"checked",l);null!==g?y(a,"value",g):null!==d&&y(a,"value",d);a.push("/>");return null;case "menuitem":a.push(E("menuitem"));for(var H in c)if(r.call(c,H)&&(g=c[H],null!=g))switch(H){case "children":case "dangerouslySetInnerHTML":throw Error(m(400));default:y(a,H,g)}a.push(">");return null;case "title":return 3===f.insertionMode||f.noscriptTagInScope?a=Fa(a,c):(Fa(e.hoistableChunks,c),a=null),a;case "link":return Ba(a,c,e,d,g,f.insertionMode,f.noscriptTagInScope); -case "script":a:if(3===f.insertionMode||f.noscriptTagInScope||"string"!==typeof c.src||!c.src)a=Ga(a,c);else{l="[script]"+c.src;if(!0!==c.async||c.onLoad||c.onError){if(h=d.preloadsMap.get(l),h||(h={type:"preload",chunks:[],state:0,props:{rel:"preload",as:"script",href:c.src,crossOrigin:c.crossOrigin,integrity:c.integrity,referrerPolicy:c.referrerPolicy}},d.preloadsMap.set(l,h),d.usedScripts.add(h),B(h.chunks,h.props)),!0!==c.async){Ga(a,c);a=null;break a}}else if(h=d.scriptsMap.get(l),!h){h={type:"script", -chunks:[],state:0,props:null};d.scriptsMap.set(l,h);d.scripts.add(h);n=c;if(d=d.preloadsMap.get(l))d.state|=4,c=n=q({},c),d=d.props,null==c.crossOrigin&&(c.crossOrigin=d.crossOrigin),null==c.integrity&&(c.integrity=d.integrity);Ga(h.chunks,n)}g&&a.push("\x3c!-- --\x3e");a=null}return a;case "style":return h=c.precedence,n=c.href,3===f.insertionMode||f.noscriptTagInScope||"string"!==typeof h||"string"!==typeof n||""===n?a=Da(a,c):(l="[style]"+n,n=d.stylesMap.get(l),n||(n={type:"style",chunks:[],state:d.boundaryResources? -4:0,props:q({},c,{"data-precedence":c.precedence,precedence:null,"data-href":c.href,href:null})},d.stylesMap.set(l,n),Da(n.chunks,n.props),c=d.precedences.get(h),c||(c=new Set,d.precedences.set(h,c)),c.add(n),d.boundaryResources&&d.boundaryResources.add(n)),g&&a.push("\x3c!-- --\x3e"),a=void 0),a;case "meta":return 3===f.insertionMode||f.noscriptTagInScope?a=Ea(a,c,"meta"):(g&&a.push("\x3c!-- --\x3e"),a="string"===typeof c.charSet?Ea(e.charsetChunks,c,"meta"):Ea(e.hoistableChunks,c,"meta")),a;case "listing":case "pre":a.push(E(b)); -d=g=null;for(p in c)if(r.call(c,p)&&(h=c[p],null!=h))switch(p){case "children":g=h;break;case "dangerouslySetInnerHTML":d=h;break;default:y(a,p,h)}a.push(">");if(null!=d){if(null!=g)throw Error(m(60));if("object"!==typeof d||!("__html"in d))throw Error(m(61));c=d.__html;null!==c&&void 0!==c&&("string"===typeof c&&0<c.length&&"\n"===c[0]?a.push("\n",c):a.push(""+c))}"string"===typeof g&&"\n"===g[0]&&a.push("\n");return g;case "base":case "area":case "br":case "col":case "embed":case "hr":case "img":case "keygen":case "param":case "source":case "track":case "wbr":return Ea(a, -c,b);case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return G(a,c,b);case "head":return 2>f.insertionMode&&null===e.headChunks?(e.headChunks=[],a=G(e.headChunks,c,"head")):a=G(a,c,"head"),a;case "html":return 0===f.insertionMode&&null===e.htmlChunks?(e.htmlChunks=["<!DOCTYPE html>"],a=G(e.htmlChunks,c,"html")):a=G(a,c,"html"),a;default:if(-1===b.indexOf("-")&&"string"!==typeof c.is)return G(a, -c,b);a.push(E(b));d=g=null;for(var A in c)if(r.call(c,A)&&(h=c[A],null!=h))switch(A){case "children":g=h;break;case "dangerouslySetInnerHTML":d=h;break;case "style":za(a,h);break;case "suppressContentEditableWarning":case "suppressHydrationWarning":break;default:ha(A)&&"function"!==typeof h&&"symbol"!==typeof h&&a.push(" ",A,'="',v(h),'"')}a.push(">");z(a,d,g);return g}} -function Ka(a,b,c){a.push('\x3c!--$?--\x3e<template id="');if(null===c)throw Error(m(395));a.push(c);return a.push('"></template>')} -function La(a,b,c,d){switch(c.insertionMode){case 0:case 1:case 2:return a.push('<div hidden id="'),a.push(b.segmentPrefix),b=d.toString(16),a.push(b),a.push('">');case 3:return a.push('<svg aria-hidden="true" style="display:none" id="'),a.push(b.segmentPrefix),b=d.toString(16),a.push(b),a.push('">');case 4:return a.push('<math aria-hidden="true" style="display:none" id="'),a.push(b.segmentPrefix),b=d.toString(16),a.push(b),a.push('">');case 5:return a.push('<table hidden id="'),a.push(b.segmentPrefix), -b=d.toString(16),a.push(b),a.push('">');case 6:return a.push('<table hidden><tbody id="'),a.push(b.segmentPrefix),b=d.toString(16),a.push(b),a.push('">');case 7:return a.push('<table hidden><tr id="'),a.push(b.segmentPrefix),b=d.toString(16),a.push(b),a.push('">');case 8:return a.push('<table hidden><colgroup id="'),a.push(b.segmentPrefix),b=d.toString(16),a.push(b),a.push('">');default:throw Error(m(397));}} -function Ma(a,b){switch(b.insertionMode){case 0:case 1:case 2:return a.push("</div>");case 3:return a.push("</svg>");case 4:return a.push("</math>");case 5:return a.push("</table>");case 6:return a.push("</tbody></table>");case 7:return a.push("</tr></table>");case 8:return a.push("</colgroup></table>");default:throw Error(m(397));}}var Na=/[<\u2028\u2029]/g; -function Oa(a){return JSON.stringify(a).replace(Na,function(a){switch(a){case "<":return"\\u003c";case "\u2028":return"\\u2028";case "\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React");}})}var Pa=/[&><\u2028\u2029]/g; -function I(a){return JSON.stringify(a).replace(Pa,function(a){switch(a){case "&":return"\\u0026";case ">":return"\\u003e";case "<":return"\\u003c";case "\u2028":return"\\u2028";case "\u2029":return"\\u2029";default:throw Error("escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React");}})}var Qa=!1; -function Ra(a){if("style"===a.type&&0===(a.state&3)){!1===Qa&&(Qa=!0,this.push('<template data-precedence="">'));for(var b=a.chunks,c=0;c<b.length;c++)this.push(b[c]);a.state|=2}}function Sa(a,b){Qa=!1;b.forEach(Ra,a);return Qa?a.push("</template>"):!0}function J(a){if(0===(a.state&7)){for(var b=a.chunks,c=0;c<b.length;c++)this.push(b[c]);a.state|=1}}function K(a){if(0===(a.state&3)){for(var b=a.chunks,c=0;c<b.length;c++)this.push(b[c]);a.state|=2}}var Ta=!1; -function Ua(a,b,c){b=a.chunks;if(a.state&3)c.delete(a);else if(!(a.state&4)){Ta=!0;"stylesheet"===a.type&&B(b,a.props);for(var d=0;d<b.length;d++)this.push(b[d]);a.state|=1;c.delete(a)}}function Va(a,b){Ta=!1;a.forEach(Ua,this);Ta||(this.push('<style data-precedence="'),a=v(b),this.push(a),this.push('"></style>'))}function Wa(a){if("style"!==a.type){var b=a.chunks,c=Ca(a.props.href,a.props);B(b,c);for(c=0;c<b.length;c++)this.push(b[c]);a.state|=8;b.length=0}} -function Xa(a){a.forEach(Wa,this);a.clear()}function Ya(a){if("style"!==a.type){var b=a.chunks,c=Ca(a.props.href,a.props);B(b,c);for(c=0;c<b.length;c++)this.push(b[c]);a.state|=8;b.length=0}}function Za(a){a.forEach(Ya,this);a.clear()} -function $a(a,b,c){var d=c.htmlChunks,e=c.headChunks,f=0;if(d){for(f=0;f<d.length;f++)a.push(d[f]);if(e)for(f=0;f<e.length;f++)a.push(e[f]);else ca(a,E("head")),a.push(">")}else if(e)for(f=0;f<e.length;f++)a.push(e[f]);var g=c.charsetChunks;for(f=0;f<g.length;f++)a.push(g[f]);g.length=0;g=c.preconnectChunks;for(f=0;f<g.length;f++)a.push(g[f]);g.length=0;b.fontPreloads.forEach(J,a);b.fontPreloads.clear();b.precedences.forEach(Va,a);b.precedences.forEach(Xa,a);b.usedStylesheets.forEach(function(c){if(!b.stylesMap.has("["+ -c.props.as+"]"+c.props.href))for(c=c.chunks,f=0;f<c.length;f++)a.push(c[f])});b.usedStylesheets.clear();b.scripts.forEach(J,a);b.scripts.clear();b.usedScripts.forEach(J,a);b.usedScripts.clear();b.explicitStylesheetPreloads.forEach(J,a);b.explicitStylesheetPreloads.clear();b.explicitScriptPreloads.forEach(J,a);b.explicitScriptPreloads.clear();b.explicitOtherPreloads.forEach(J,a);b.explicitOtherPreloads.clear();g=c.preloadChunks;for(f=0;f<g.length;f++)a.push(g[f]);g.length=0;c=c.hoistableChunks;for(f= -0;f<c.length;f++)a.push(c[f]);c.length=0;d&&null===e&&(a.push("</"),a.push("head"),a.push(">"))} -function ab(a,b,c){var d=0,e=c.preconnectChunks;for(d=0;d<e.length;d++)a.push(e[d]);e.length=0;b.fontPreloads.forEach(K,a);b.fontPreloads.clear();b.precedences.forEach(Za,a);b.usedStylesheets.forEach(function(c){if(!b.stylesMap.has("["+c.props.as+"]"+c.props.href))for(c=c.chunks,d=0;d<c.length;d++)a.push(c[d])});b.usedStylesheets.clear();b.scripts.forEach(K,a);b.scripts.clear();b.usedScripts.forEach(K,a);b.usedScripts.clear();b.explicitStylesheetPreloads.forEach(K,a);b.explicitStylesheetPreloads.clear(); -b.explicitScriptPreloads.forEach(K,a);b.explicitScriptPreloads.clear();b.explicitOtherPreloads.forEach(K,a);b.explicitOtherPreloads.clear();e=c.preloadChunks;for(d=0;d<e.length;d++)a.push(e[d]);e.length=0;c=c.hoistableChunks;for(d=0;d<c.length;d++)a.push(c[d]);c.length=0} -function bb(a,b){a.push("[");var c="[";b.forEach(function(b){if(!(b.state&1))if(b.state&3)a.push(c),b=I(""+("style"===b.type?b.props["data-href"]:b.props.href)),a.push(b),a.push("]"),c=",[";else if("stylesheet"===b.type){a.push(c);var d=b.props["data-precedence"],f=b.props,g=I(""+b.props.href);a.push(g);d=""+d;a.push(",");d=I(d);a.push(d);for(var k in f)if(r.call(f,k)){var h=f[k];if(null!=h)switch(k){case "href":case "rel":case "precedence":case "data-precedence":break;case "children":case "dangerouslySetInnerHTML":throw Error(m(399, -"link"));default:a:{d=a;var l=k;g=l.toLowerCase();switch(typeof h){case "function":case "symbol":break a}switch(l){case "innerHTML":case "dangerouslySetInnerHTML":case "suppressContentEditableWarning":case "suppressHydrationWarning":case "style":break a;case "className":g="class";break;case "hidden":if(!1===h)break a;break;case "src":case "href":break;default:if(!ha(l))break a}if(!(2<l.length)||"o"!==l[0]&&"O"!==l[0]||"n"!==l[1]&&"N"!==l[1])h=""+h,d.push(","),g=I(g),d.push(g),d.push(","),g=I(h),d.push(g)}}}a.push("]"); -c=",[";b.state|=2}});a.push("]")} -function ta(a,b){if(w){var c=w;if("string"===typeof a&&a&&"object"===typeof b&&null!==b&&"string"===typeof b.as){var d=b.as,e="["+d+"]"+a,f=c.preloadsMap.get(e);f||(f={type:"preload",chunks:[],state:0,props:{rel:"preload",as:d,href:a,crossOrigin:"font"===d?"":b.crossOrigin,integrity:b.integrity}},c.preloadsMap.set(e,f),B(f.chunks,f.props));switch(d){case "font":c.fontPreloads.add(f);break;case "style":c.explicitStylesheetPreloads.add(f);break;case "script":c.explicitScriptPreloads.add(f);break;default:c.explicitOtherPreloads.add(f)}}}} -function ua(a,b){if(w)a:{var c=w;if("string"===typeof a&&a&&"object"===typeof b&&null!==b){var d=b.as;switch(d){case "style":var e="["+d+"]"+a;d=c.stylesMap.get(e);var f=b.precedence||"default";d||(d={type:"stylesheet",chunks:[],state:0,props:{rel:"stylesheet",href:a,"data-precedence":f,crossOrigin:b.crossOrigin,integrity:b.integrity}},c.stylesMap.set(e,d),a=c.precedences.get(f),a||(a=new Set,c.precedences.set(f,a)),a.add(d));break a;case "script":f="["+d+"]"+a,d=c.scriptsMap.get(f),d||(d={type:"script", -chunks:[],state:0,props:null},c.scriptsMap.set(f,d),a={src:a,async:!0,crossOrigin:b.crossOrigin,integrity:b.integrity},c.scripts.add(d),Ga(d.chunks,a))}}}}function Ca(a,b){return{rel:"preload",as:"style",href:a,crossOrigin:b.crossOrigin,integrity:b.integrity,media:b.media,hrefLang:b.hrefLang,referrerPolicy:b.referrerPolicy}}function cb(a){this.add(a)}function db(a){a.state&=-5} -function eb(a,b){b=void 0===b?"":b;return{bootstrapChunks:[],placeholderPrefix:b+"P:",segmentPrefix:b+"S:",boundaryPrefix:b+"B:",idPrefix:b,nextSuspenseID:0,streamingFormat:0,startInlineScript:"<script>",instructions:0,externalRuntimeConfig:null,htmlChunks:null,headChunks:null,hasBody:!1,charsetChunks:[],preconnectChunks:[],preloadChunks:[],hoistableChunks:[],generateStaticMarkup:a}} -function fb(a,b,c,d){if(c.generateStaticMarkup)return a.push(v(b)),!1;""===b?a=d:(d&&a.push("\x3c!-- --\x3e"),a.push(v(b)),a=!0);return a} -var gb=Symbol.for("react.element"),hb=Symbol.for("react.portal"),ib=Symbol.for("react.fragment"),jb=Symbol.for("react.strict_mode"),kb=Symbol.for("react.profiler"),lb=Symbol.for("react.provider"),mb=Symbol.for("react.context"),nb=Symbol.for("react.server_context"),ob=Symbol.for("react.forward_ref"),pb=Symbol.for("react.suspense"),qb=Symbol.for("react.suspense_list"),rb=Symbol.for("react.memo"),sb=Symbol.for("react.lazy"),tb=Symbol.for("react.scope"),ub=Symbol.for("react.debug_trace_mode"),vb=Symbol.for("react.offscreen"), -wb=Symbol.for("react.legacy_hidden"),xb=Symbol.for("react.cache"),yb=Symbol.for("react.default_value"),zb=Symbol.iterator; -function Ab(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case ib:return"Fragment";case hb:return"Portal";case kb:return"Profiler";case jb:return"StrictMode";case pb:return"Suspense";case qb:return"SuspenseList";case xb:return"Cache"}if("object"===typeof a)switch(a.$$typeof){case mb:return(a.displayName||"Context")+".Consumer";case lb:return(a._context.displayName||"Context")+".Provider";case ob:var b=a.render;a=a.displayName; -a||(a=b.displayName||b.name||"",a=""!==a?"ForwardRef("+a+")":"ForwardRef");return a;case rb:return b=a.displayName||null,null!==b?b:Ab(a.type)||"Memo";case sb:b=a._payload;a=a._init;try{return Ab(a(b))}catch(c){break}case nb:return(a.displayName||a._globalName)+".Provider"}return null}var Bb=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Cb={};function Db(a,b){a=a.contextTypes;if(!a)return Cb;var c={},d;for(d in a)c[d]=b[d];return c}var L=null; -function Eb(a,b){if(a!==b){a.context._currentValue2=a.parentValue;a=a.parent;var c=b.parent;if(null===a){if(null!==c)throw Error(m(401));}else{if(null===c)throw Error(m(401));Eb(a,c)}b.context._currentValue2=b.value}}function Fb(a){a.context._currentValue2=a.parentValue;a=a.parent;null!==a&&Fb(a)}function Gb(a){var b=a.parent;null!==b&&Gb(b);a.context._currentValue2=a.value} -function Hb(a,b){a.context._currentValue2=a.parentValue;a=a.parent;if(null===a)throw Error(m(402));a.depth===b.depth?Eb(a,b):Hb(a,b)}function Ib(a,b){var c=b.parent;if(null===c)throw Error(m(402));a.depth===c.depth?Eb(a,c):Ib(a,c);b.context._currentValue2=b.value}function Jb(a){var b=L;b!==a&&(null===b?Gb(a):null===a?Fb(b):b.depth===a.depth?Eb(b,a):b.depth>a.depth?Hb(b,a):Ib(b,a),L=a)} -var Kb={isMounted:function(){return!1},enqueueSetState:function(a,b){a=a._reactInternals;null!==a.queue&&a.queue.push(b)},enqueueReplaceState:function(a,b){a=a._reactInternals;a.replace=!0;a.queue=[b]},enqueueForceUpdate:function(){}}; -function Lb(a,b,c,d){var e=void 0!==a.state?a.state:null;a.updater=Kb;a.props=c;a.state=e;var f={queue:[],replace:!1};a._reactInternals=f;var g=b.contextType;a.context="object"===typeof g&&null!==g?g._currentValue2:d;g=b.getDerivedStateFromProps;"function"===typeof g&&(g=g(c,e),e=null===g||void 0===g?e:q({},e,g),a.state=e);if("function"!==typeof b.getDerivedStateFromProps&&"function"!==typeof a.getSnapshotBeforeUpdate&&("function"===typeof a.UNSAFE_componentWillMount||"function"===typeof a.componentWillMount))if(b= -a.state,"function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),b!==a.state&&Kb.enqueueReplaceState(a,a.state,null),null!==f.queue&&0<f.queue.length)if(b=f.queue,g=f.replace,f.queue=null,f.replace=!1,g&&1===b.length)a.state=b[0];else{f=g?b[0]:a.state;e=!0;for(g=g?1:0;g<b.length;g++){var k=b[g];k="function"===typeof k?k.call(a,f,c,d):k;null!=k&&(e?(e=!1,f=q({},f,k)):q(f,k))}a.state=f}else f.queue=null} -var Mb={id:1,overflow:""};function Nb(a,b,c){var d=a.id;a=a.overflow;var e=32-Ob(d)-1;d&=~(1<<e);c+=1;var f=32-Ob(b)+e;if(30<f){var g=e-e%5;f=(d&(1<<g)-1).toString(32);d>>=g;e-=g;return{id:1<<32-Ob(b)+e|c<<e|d,overflow:f+a}}return{id:1<<f|c<<e|d,overflow:a}}var Ob=Math.clz32?Math.clz32:Pb,Qb=Math.log,Rb=Math.LN2;function Pb(a){a>>>=0;return 0===a?32:31-(Qb(a)/Rb|0)|0}var Sb=Error(m(460));function Tb(){} -function Ub(a,b,c){c=a[c];void 0===c?a.push(b):c!==b&&(b.then(Tb,Tb),b=c);switch(b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;default:if("string"!==typeof b.status)switch(a=b,a.status="pending",a.then(function(a){if("pending"===b.status){var c=b;c.status="fulfilled";c.value=a}},function(a){if("pending"===b.status){var c=b;c.status="rejected";c.reason=a}}),b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;}Vb=b;throw Sb;}}var Vb=null; -function Wb(){if(null===Vb)throw Error(m(459));var a=Vb;Vb=null;return a}function Xb(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var Yb="function"===typeof Object.is?Object.is:Xb,M=null,Zb=null,$b=null,N=null,P=!1,ac=!1,Q=0,R=0,S=null,T=null,bc=0;function V(){if(null===M)throw Error(m(321));return M}function cc(){if(0<bc)throw Error(m(312));return{memoizedState:null,queue:null,next:null}} -function dc(){null===N?null===$b?(P=!1,$b=N=cc()):(P=!0,N=$b):null===N.next?(P=!1,N=N.next=cc()):(P=!0,N=N.next);return N}function ec(a,b,c,d){for(;ac;)ac=!1,R=Q=0,bc+=1,N=null,c=a(b,d);fc();return c}function gc(){var a=S;S=null;return a}function fc(){Zb=M=null;ac=!1;$b=null;bc=0;N=T=null}function hc(a,b){return"function"===typeof b?b(a):b} -function ic(a,b,c){M=V();N=dc();if(P){var d=N.queue;b=d.dispatch;if(null!==T&&(c=T.get(d),void 0!==c)){T.delete(d);d=N.memoizedState;do d=a(d,c.action),c=c.next;while(null!==c);N.memoizedState=d;return[d,b]}return[N.memoizedState,b]}a=a===hc?"function"===typeof b?b():b:void 0!==c?c(b):b;N.memoizedState=a;a=N.queue={last:null,dispatch:null};a=a.dispatch=jc.bind(null,M,a);return[N.memoizedState,a]} -function kc(a,b){M=V();N=dc();b=void 0===b?null:b;if(null!==N){var c=N.memoizedState;if(null!==c&&null!==b){var d=c[1];a:if(null===d)d=!1;else{for(var e=0;e<d.length&&e<b.length;e++)if(!Yb(b[e],d[e])){d=!1;break a}d=!0}if(d)return c[0]}}a=a();N.memoizedState=[a,b];return a}function jc(a,b,c){if(25<=bc)throw Error(m(301));if(a===M)if(ac=!0,a={action:c,next:null},null===T&&(T=new Map),c=T.get(b),void 0===c)T.set(b,a);else{for(b=c;null!==b.next;)b=b.next;b.next=a}} -function lc(){throw Error(m(394));}function mc(){throw Error(m(393));}function nc(){} -var pc={readContext:function(a){return a._currentValue2},useContext:function(a){V();return a._currentValue2},useMemo:kc,useReducer:ic,useRef:function(a){M=V();N=dc();var b=N.memoizedState;return null===b?(a={current:a},N.memoizedState=a):b},useState:function(a){return ic(hc,a)},useInsertionEffect:nc,useLayoutEffect:function(){},useCallback:function(a,b){return kc(function(){return a},b)},useImperativeHandle:nc,useEffect:nc,useDebugValue:nc,useDeferredValue:function(a){V();return a},useTransition:function(){V(); -return[!1,lc]},useId:function(){var a=Zb.treeContext;var b=a.overflow;a=a.id;a=(a&~(1<<32-Ob(a)-1)).toString(32)+b;var c=oc;if(null===c)throw Error(m(404));b=Q++;a=":"+c.idPrefix+"R"+a;0<b&&(a+="H"+b.toString(32));return a+":"},useMutableSource:function(a,b){V();return b(a._source)},useSyncExternalStore:function(a,b,c){if(void 0===c)throw Error(m(407));return c()},useCacheRefresh:function(){return mc},use:function(a){if(null!==a&&"object"===typeof a){if("function"===typeof a.then){var b=R;R+=1;null=== -S&&(S=[]);return Ub(S,a,b)}if(a.$$typeof===mb||a.$$typeof===nb)return a._currentValue2}throw Error(m(438,String(a)));}},oc=null,qc={getCacheSignal:function(){throw Error(m(248));},getCacheForType:function(){throw Error(m(248));}},rc=Bb.ReactCurrentDispatcher,sc=Bb.ReactCurrentCache;function tc(a){console.error(a);return null}function W(){} -function uc(a,b,c,d,e,f,g,k,h){var l=[],n=new Set,p={preloadsMap:new Map,stylesMap:new Map,scriptsMap:new Map,fontPreloads:new Set,precedences:new Map,usedStylesheets:new Set,scripts:new Set,usedScripts:new Set,explicitStylesheetPreloads:new Set,explicitScriptPreloads:new Set,explicitOtherPreloads:new Set,boundaryResources:null};b={destination:null,responseState:b,progressiveChunkSize:void 0===d?12800:d,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,resources:p,completedRootSegment:null, -abortableTasks:n,pingedTasks:l,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:void 0===e?tc:e,onAllReady:void 0===f?W:f,onShellReady:void 0===g?W:g,onShellError:void 0===k?W:k,onFatalError:void 0===h?W:h};c=vc(b,0,null,c,!1,!1);c.parentFlushed=!0;a=wc(b,null,a,null,c,n,Cb,null,Mb);l.push(a);return b} -function wc(a,b,c,d,e,f,g,k,h){a.allPendingTasks++;null===d?a.pendingRootTasks++:d.pendingTasks++;var l={node:c,ping:function(){var b=a.pingedTasks;b.push(l);1===b.length&&xc(a)},blockedBoundary:d,blockedSegment:e,abortSet:f,legacyContext:g,context:k,treeContext:h,thenableState:b};f.add(l);return l}function vc(a,b,c,d,e,f){return{status:0,id:-1,index:b,parentFlushed:!1,chunks:[],children:[],formatContext:d,boundary:c,lastPushedText:e,textEmbedded:f}} -function X(a,b){a=a.onError(b);if(null!=a&&"string"!==typeof a)throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof a+'" instead');return a}function Y(a,b){var c=a.onShellError;c(b);c=a.onFatalError;c(b);null!==a.destination?(a.status=2,a.destination.destroy(b)):(a.status=1,a.fatalError=b)} -function yc(a,b){if(null!==a.completedRootSegment||0<a.pendingRootTasks)a=b.resources,a.forEach(db),a.clear()}function zc(a,b,c,d){var e=c.render(),f=d.childContextTypes;if(null!==f&&void 0!==f){var g=b.legacyContext;if("function"!==typeof c.getChildContext)d=g;else{c=c.getChildContext();for(var k in c)if(!(k in f))throw Error(m(108,Ab(d)||"Unknown",k));d=q({},g,c)}b.legacyContext=d;Z(a,b,null,e);b.legacyContext=g}else Z(a,b,null,e)} -function Ac(a,b){if(a&&a.defaultProps){b=q({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c]);return b}return b} -function Bc(a,b,c,d,e,f){if("function"===typeof d)if(d.prototype&&d.prototype.isReactComponent)c=Db(d,b.legacyContext),f=d.contextType,f=new d(e,"object"===typeof f&&null!==f?f._currentValue2:c),Lb(f,d,e,c),zc(a,b,f,d);else{f=Db(d,b.legacyContext);M={};Zb=b;R=Q=0;S=c;c=d(e,f);c=ec(d,e,c,f);var g=0!==Q;if("object"===typeof c&&null!==c&&"function"===typeof c.render&&void 0===c.$$typeof)Lb(c,d,e,f),zc(a,b,c,d);else if(g){e=b.treeContext;b.treeContext=Nb(e,1,0);try{Z(a,b,null,c)}finally{b.treeContext= -e}}else Z(a,b,null,c)}else if("string"===typeof d){c=b.blockedSegment;g=Ja(c.chunks,d,e,a.resources,a.responseState,c.formatContext,c.lastPushedText);c.lastPushedText=!1;f=c.formatContext;c.formatContext=xa(f,d,e);Cc(a,b,g);c.formatContext=f;a:{b=c.chunks;switch(d){case "title":case "style":case "script":case "area":case "base":case "br":case "col":case "embed":case "hr":case "img":case "input":case "keygen":case "link":case "meta":case "param":case "source":case "track":case "wbr":break a;case "body":if(1>= -f.insertionMode){a.responseState.hasBody=!0;break a}break;case "html":if(0===f.insertionMode)break a}b.push("</",d,">")}c.lastPushedText=!1}else{switch(d){case wb:case ub:case jb:case kb:case ib:Z(a,b,null,e.children);return;case vb:"hidden"!==e.mode&&Z(a,b,null,e.children);return;case qb:Z(a,b,null,e.children);return;case tb:throw Error(m(343));case pb:a:{d=b.blockedBoundary;c=b.blockedSegment;f=e.fallback;e=e.children;g=new Set;var k={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1, -completedSegments:[],byteSize:0,fallbackAbortableTasks:g,errorDigest:null,resources:new Set},h=vc(a,c.chunks.length,k,c.formatContext,!1,!1);c.children.push(h);c.lastPushedText=!1;var l=vc(a,0,null,c.formatContext,!1,!1);l.parentFlushed=!0;b.blockedBoundary=k;b.blockedSegment=l;a.resources.boundaryResources=k.resources;try{if(Cc(a,b,e),a.responseState.generateStaticMarkup||l.lastPushedText&&l.textEmbedded&&l.chunks.push("\x3c!-- --\x3e"),l.status=1,0===k.pendingTasks&&yc(a,k),Dc(k,l),0===k.pendingTasks)break a}catch(n){l.status= -4,k.forceClientRender=!0,k.errorDigest=X(a,n)}finally{a.resources.boundaryResources=d?d.resources:null,b.blockedBoundary=d,b.blockedSegment=c}b=wc(a,null,f,d,h,g,b.legacyContext,b.context,b.treeContext);a.pingedTasks.push(b)}return}if("object"===typeof d&&null!==d)switch(d.$$typeof){case ob:d=d.render;M={};Zb=b;R=Q=0;S=c;c=d(e,f);e=ec(d,e,c,f);if(0!==Q){d=b.treeContext;b.treeContext=Nb(d,1,0);try{Z(a,b,null,e)}finally{b.treeContext=d}}else Z(a,b,null,e);return;case rb:d=d.type;e=Ac(d,e);Bc(a,b,c, -d,e,f);return;case lb:c=e.children;d=d._context;e=e.value;f=d._currentValue2;d._currentValue2=e;g=L;L=e={parent:g,depth:null===g?0:g.depth+1,context:d,parentValue:f,value:e};b.context=e;Z(a,b,null,c);a=L;if(null===a)throw Error(m(403));e=a.parentValue;a.context._currentValue2=e===yb?a.context._defaultValue:e;a=L=a.parent;b.context=a;return;case mb:e=e.children;e=e(d._currentValue2);Z(a,b,null,e);return;case sb:f=d._init;d=f(d._payload);e=Ac(d,e);Bc(a,b,c,d,e,void 0);return}throw Error(m(130,null== -d?d:typeof d,""));}} -function Z(a,b,c,d){b.node=d;if("object"===typeof d&&null!==d){switch(d.$$typeof){case gb:Bc(a,b,c,d.type,d.props,d.ref);return;case hb:throw Error(m(257));case sb:c=d._init;d=c(d._payload);Z(a,b,null,d);return}if(pa(d)){Ec(a,b,d);return}null===d||"object"!==typeof d?c=null:(c=zb&&d[zb]||d["@@iterator"],c="function"===typeof c?c:null);if(c&&(c=c.call(d))){d=c.next();if(!d.done){var e=[];do e.push(d.value),d=c.next();while(!d.done);Ec(a,b,e)}return}a=Object.prototype.toString.call(d);throw Error(m(31, -"[object Object]"===a?"object with keys {"+Object.keys(d).join(", ")+"}":a));}"string"===typeof d?(c=b.blockedSegment,c.lastPushedText=fb(b.blockedSegment.chunks,d,a.responseState,c.lastPushedText)):"number"===typeof d&&(c=b.blockedSegment,c.lastPushedText=fb(b.blockedSegment.chunks,""+d,a.responseState,c.lastPushedText))}function Ec(a,b,c){for(var d=c.length,e=0;e<d;e++){var f=b.treeContext;b.treeContext=Nb(f,d,e);try{Cc(a,b,c[e])}finally{b.treeContext=f}}} -function Cc(a,b,c){var d=b.blockedSegment.formatContext,e=b.legacyContext,f=b.context;try{return Z(a,b,null,c)}catch(l){if(fc(),c=l===Sb?Wb():l,"object"===typeof c&&null!==c&&"function"===typeof c.then){var g=gc(),k=b.blockedSegment,h=vc(a,k.chunks.length,null,k.formatContext,k.lastPushedText,!0);k.children.push(h);k.lastPushedText=!1;a=wc(a,g,b.node,b.blockedBoundary,h,b.abortSet,b.legacyContext,b.context,b.treeContext).ping;c.then(a,a);b.blockedSegment.formatContext=d;b.legacyContext=e;b.context= -f;Jb(f)}else throw b.blockedSegment.formatContext=d,b.legacyContext=e,b.context=f,Jb(f),c;}}function Fc(a){var b=a.blockedBoundary;a=a.blockedSegment;a.status=3;Gc(this,b,a)} -function Hc(a,b,c){var d=a.blockedBoundary;a.blockedSegment.status=3;null===d?(b.allPendingTasks--,1!==b.status&&2!==b.status&&(X(b,c),Y(b,c))):(d.pendingTasks--,d.forceClientRender||(d.forceClientRender=!0,d.errorDigest=b.onError(c),d.parentFlushed&&b.clientRenderedBoundaries.push(d)),d.fallbackAbortableTasks.forEach(function(a){return Hc(a,b,c)}),d.fallbackAbortableTasks.clear(),b.allPendingTasks--,0===b.allPendingTasks&&(a=b.onAllReady,a()))} -function Dc(a,b){if(0===b.chunks.length&&1===b.children.length&&null===b.children[0].boundary){var c=b.children[0];c.id=b.id;c.parentFlushed=!0;1===c.status&&Dc(a,c)}else a.completedSegments.push(b)} -function Gc(a,b,c){if(null===b){if(c.parentFlushed){if(null!==a.completedRootSegment)throw Error(m(389));a.completedRootSegment=c}a.pendingRootTasks--;0===a.pendingRootTasks&&(a.onShellError=W,b=a.onShellReady,b())}else b.pendingTasks--,b.forceClientRender||(0===b.pendingTasks?(c.parentFlushed&&1===c.status&&Dc(b,c),yc(a,b),b.parentFlushed&&a.completedBoundaries.push(b),b.fallbackAbortableTasks.forEach(Fc,a),b.fallbackAbortableTasks.clear()):c.parentFlushed&&1===c.status&&(Dc(b,c),1===b.completedSegments.length&& -b.parentFlushed&&a.partialBoundaries.push(b)));a.allPendingTasks--;0===a.allPendingTasks&&(a=a.onAllReady,a())} -function xc(a){if(2!==a.status){var b=L,c=rc.current;rc.current=pc;var d=sc.current;sc.current=qc;var e=a.resources;wa.push(w);w=e;e=qa.current;qa.current=va;var f=oc;oc=a.responseState;try{var g=a.pingedTasks,k;for(k=0;k<g.length;k++){var h=g[k];var l=a,n=h.blockedBoundary;l.resources.boundaryResources=n?n.resources:null;var p=h.blockedSegment;if(0===p.status){Jb(h.context);try{var H=h.thenableState;h.thenableState=null;Z(l,h,H,h.node);l.responseState.generateStaticMarkup||p.lastPushedText&&p.textEmbedded&& -p.chunks.push("\x3c!-- --\x3e");h.abortSet.delete(h);p.status=1;Gc(l,h.blockedBoundary,p)}catch(F){fc();var A=F===Sb?Wb():F;if("object"===typeof A&&null!==A&&"function"===typeof A.then){var ra=h.ping;A.then(ra,ra);h.thenableState=gc()}else{h.abortSet.delete(h);p.status=4;var D=l,C=h.blockedBoundary,O=A,U=X(D,O);null===C?Y(D,O):(C.pendingTasks--,C.forceClientRender||(C.forceClientRender=!0,C.errorDigest=U,C.parentFlushed&&D.clientRenderedBoundaries.push(C)));D.allPendingTasks--;if(0===D.allPendingTasks){var sa= -D.onAllReady;sa()}}}finally{l.resources.boundaryResources=null}}}g.splice(0,k);null!==a.destination&&Ic(a,a.destination)}catch(F){X(a,F),Y(a,F)}finally{oc=f,rc.current=c,sc.current=d,w=wa.pop(),qa.current=e,c===pc&&Jb(b)}}} -function Jc(a,b,c){c.parentFlushed=!0;switch(c.status){case 0:var d=c.id=a.nextSegmentId++;c.lastPushedText=!1;c.textEmbedded=!1;a=a.responseState;b.push('<template id="');b.push(a.placeholderPrefix);a=d.toString(16);b.push(a);return b.push('"></template>');case 1:c.status=2;var e=!0;d=c.chunks;var f=0;c=c.children;for(var g=0;g<c.length;g++){for(e=c[g];f<e.index;f++)b.push(d[f]);e=Kc(a,b,e)}for(;f<d.length-1;f++)b.push(d[f]);f<d.length&&(e=b.push(d[f]));return e;default:throw Error(m(390));}} -function Kc(a,b,c){var d=c.boundary;if(null===d)return Jc(a,b,c);d.parentFlushed=!0;if(d.forceClientRender)return a.responseState.generateStaticMarkup||(d=d.errorDigest,b.push("\x3c!--$!--\x3e"),b.push("<template"),d&&(b.push(' data-dgst="'),d=v(d),b.push(d),b.push('"')),b.push("></template>")),Jc(a,b,c),a=a.responseState.generateStaticMarkup?!0:b.push("\x3c!--/$--\x3e"),a;if(0<d.pendingTasks){d.rootSegmentID=a.nextSegmentId++;0<d.completedSegments.length&&a.partialBoundaries.push(d);var e=a.responseState; -var f=e.nextSuspenseID++;e=e.boundaryPrefix+f.toString(16);d=d.id=e;Ka(b,a.responseState,d);Jc(a,b,c);return b.push("\x3c!--/$--\x3e")}if(d.byteSize>a.progressiveChunkSize)return d.rootSegmentID=a.nextSegmentId++,a.completedBoundaries.push(d),Ka(b,a.responseState,d.id),Jc(a,b,c),b.push("\x3c!--/$--\x3e");c=d.resources;if(e=a.resources.boundaryResources)c.forEach(cb,e),c.clear();a.responseState.generateStaticMarkup||b.push("\x3c!--$--\x3e");c=d.completedSegments;if(1!==c.length)throw Error(m(391)); -Kc(a,b,c[0]);a=a.responseState.generateStaticMarkup?!0:b.push("\x3c!--/$--\x3e");return a}function Lc(a,b,c){La(b,a.responseState,c.formatContext,c.id);Kc(a,b,c);return Ma(b,c.formatContext)} -function Mc(a,b,c){a.resources.boundaryResources=c.resources;for(var d=c.completedSegments,e=0;e<d.length;e++)Nc(a,b,c,d[e]);d.length=0;Sa(b,c.resources);a=a.responseState;d=c.id;e=c.rootSegmentID;c=c.resources;var f;b:{for(f=c.values();;){var g=f.next().value;if(!g)break;if(0===(g.state&1)){f=!0;break b}}f=!1}b.push(a.startInlineScript);f?0===(a.instructions&2)?(a.instructions|=10,b.push('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RM=new Map;\n$RR=function(p,q,w){function r(l){this.s=l}for(var t=$RC,m=$RM,u=new Map,n=new Map,g=document,h,e,f=g.querySelectorAll("template[data-precedence]"),c=0;e=f[c++];){for(var b=e.content.firstChild;b;b=b.nextSibling)u.set(b.getAttribute("data-href"),b);e.parentNode.removeChild(e)}f=g.querySelectorAll("link[data-precedence],style[data-precedence]");for(c=0;e=f[c++];)m.set(e.getAttribute("STYLE"===e.nodeName?"data-href":"href"),e),n.set(e.dataset.precedence,h=e);e=0;f=[];for(var d,\nv,a;d=w[e++];){var k=0;b=d[k++];if(!(a=m.get(b))){if(a=u.get(b))c=a.getAttribute("data-precedence");else{a=g.createElement("link");a.href=b;a.rel="stylesheet";for(a.dataset.precedence=c=d[k++];v=d[k++];)a.setAttribute(v,d[k++]);d=a._p=new Promise(function(l,x){a.onload=l;a.onerror=x});d.then(r.bind(d,"l"),r.bind(d,"e"))}m.set(b,a);b=n.get(c)||h;b===h&&(h=a);n.set(c,a);b?b.parentNode.insertBefore(a,b.nextSibling):(c=g.head,c.insertBefore(a,c.firstChild))}d=a._p;c=a.getAttribute("media");!d||"l"===\nd.s||c&&!matchMedia(c).matches||f.push(d)}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};$RR("')): -0===(a.instructions&8)?(a.instructions|=8,b.push('$RM=new Map;\n$RR=function(p,q,w){function r(l){this.s=l}for(var t=$RC,m=$RM,u=new Map,n=new Map,g=document,h,e,f=g.querySelectorAll("template[data-precedence]"),c=0;e=f[c++];){for(var b=e.content.firstChild;b;b=b.nextSibling)u.set(b.getAttribute("data-href"),b);e.parentNode.removeChild(e)}f=g.querySelectorAll("link[data-precedence],style[data-precedence]");for(c=0;e=f[c++];)m.set(e.getAttribute("STYLE"===e.nodeName?"data-href":"href"),e),n.set(e.dataset.precedence,h=e);e=0;f=[];for(var d,\nv,a;d=w[e++];){var k=0;b=d[k++];if(!(a=m.get(b))){if(a=u.get(b))c=a.getAttribute("data-precedence");else{a=g.createElement("link");a.href=b;a.rel="stylesheet";for(a.dataset.precedence=c=d[k++];v=d[k++];)a.setAttribute(v,d[k++]);d=a._p=new Promise(function(l,x){a.onload=l;a.onerror=x});d.then(r.bind(d,"l"),r.bind(d,"e"))}m.set(b,a);b=n.get(c)||h;b===h&&(h=a);n.set(c,a);b?b.parentNode.insertBefore(a,b.nextSibling):(c=g.head,c.insertBefore(a,c.firstChild))}d=a._p;c=a.getAttribute("media");!d||"l"===\nd.s||c&&!matchMedia(c).matches||f.push(d)}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};$RR("')): -b.push('$RR("'):0===(a.instructions&2)?(a.instructions|=2,b.push('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RC("')): -b.push('$RC("');if(null===d)throw Error(m(395));e=e.toString(16);b.push(d);b.push('","');b.push(a.segmentPrefix);b.push(e);f?(b.push('",'),bb(b,c)):b.push('"');b=b.push(")\x3c/script>");return b} -function Nc(a,b,c,d){if(2===d.status)return!0;var e=d.id;if(-1===e){if(-1===(d.id=c.rootSegmentID))throw Error(m(392));return Lc(a,b,d)}Lc(a,b,d);a=a.responseState;b.push(a.startInlineScript);0===(a.instructions&1)?(a.instructions|=1,b.push('$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};;$RS("')):b.push('$RS("');b.push(a.segmentPrefix);e=e.toString(16); -b.push(e);b.push('","');b.push(a.placeholderPrefix);b.push(e);b=b.push('")\x3c/script>');return b} -function Ic(a,b){try{var c,d=a.completedRootSegment;if(null!==d)if(0===a.pendingRootTasks){$a(b,a.resources,a.responseState,0===a.allPendingTasks);Kc(a,b,d);a.completedRootSegment=null;var e=a.responseState.bootstrapChunks;for(d=0;d<e.length-1;d++)b.push(e[d]);d<e.length&&b.push(e[d])}else return;else ab(b,a.resources,a.responseState);var f=a.clientRenderedBoundaries;for(c=0;c<f.length;c++){var g=f[c];e=b;var k=a.responseState,h=g.id,l=g.errorDigest,n=g.errorMessage,p=g.errorComponentStack;e.push(k.startInlineScript); -0===(k.instructions&4)?(k.instructions|=4,e.push('$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};;$RX("')):e.push('$RX("');if(null===h)throw Error(m(395));e.push(h);e.push('"');if(l||n||p){e.push(",");var H=Oa(l||"");e.push(H)}if(n||p){e.push(",");var A=Oa(n||"");e.push(A)}if(p){e.push(",");var ra=Oa(p);e.push(ra)}if(!e.push(")\x3c/script>")){a.destination=null;c++;f.splice(0, -c);return}}f.splice(0,c);var D=a.completedBoundaries;for(c=0;c<D.length;c++)if(!Mc(a,b,D[c])){a.destination=null;c++;D.splice(0,c);return}D.splice(0,c);var C=a.partialBoundaries;for(c=0;c<C.length;c++){var O=C[c];a:{f=a;g=b;f.resources.boundaryResources=O.resources;var U=O.completedSegments;for(k=0;k<U.length;k++)if(!Nc(f,g,O,U[k])){k++;U.splice(0,k);var sa=!1;break a}U.splice(0,k);sa=Sa(g,O.resources)}if(!sa){a.destination=null;c++;C.splice(0,c);return}}C.splice(0,c);var F=a.completedBoundaries; -for(c=0;c<F.length;c++)if(!Mc(a,b,F[c])){a.destination=null;c++;F.splice(0,c);return}F.splice(0,c)}finally{0===a.allPendingTasks&&0===a.pingedTasks.length&&0===a.clientRenderedBoundaries.length&&0===a.completedBoundaries.length&&(a=a.responseState,a.hasBody&&(b.push("</"),b.push("body"),b.push(">")),a.htmlChunks&&(b.push("</"),b.push("html"),b.push(">")),b.push(null))}} -function Oc(a,b){try{var c=a.abortableTasks;if(0<c.size){var d=void 0===b?Error(m(432)):b;c.forEach(function(b){return Hc(b,a,d)});c.clear()}null!==a.destination&&Ic(a,a.destination)}catch(e){X(a,e),Y(a,e)}}function Pc(){} -function Qc(a,b,c,d){var e=!1,f=null,g="",k={push:function(a){null!==a&&(g+=a);return!0},destroy:function(a){e=!0;f=a}},h=!1;a=uc(a,eb(c,b?b.identifierPrefix:void 0),{insertionMode:2,selectedValue:null,noscriptTagInScope:!1},Infinity,Pc,void 0,function(){h=!0},void 0,void 0);xc(a);Oc(a,d);if(1===a.status)a.status=2,k.destroy(a.fatalError);else if(2!==a.status&&null===a.destination){a.destination=k;try{Ic(a,k)}catch(l){X(a,l),Y(a,l)}}if(e&&f!==d)throw f;if(!h)throw Error(m(426));return g} -exports.renderToNodeStream=function(){throw Error(m(207));};exports.renderToStaticMarkup=function(a,b){return Qc(a,b,!0,'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')};exports.renderToStaticNodeStream=function(){throw Error(m(208));};exports.renderToString=function(a,b){return Qc(a,b,!1,'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')}; -exports.version="18.3.0-next-4fcc9184a-20230217"; +'use strict';var aa=require("react"),ba=require("react-dom");function m(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."} +var q=Object.prototype.hasOwnProperty,ca=/^[: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][: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\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,da={},ea={}; +function fa(a){if(q.call(ea,a))return!0;if(q.call(da,a))return!1;if(ca.test(a))return ea[a]=!0;da[a]=!0;return!1}function t(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var v={}; +"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){v[a]=new t(a,0,!1,a,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];v[b]=new t(b,1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){v[a]=new t(a,2,!1,a.toLowerCase(),null,!1,!1)}); +["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){v[a]=new t(a,2,!1,a,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){v[a]=new t(a,3,!1,a.toLowerCase(),null,!1,!1)}); +["checked","multiple","muted","selected"].forEach(function(a){v[a]=new t(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){v[a]=new t(a,4,!1,a,null,!1,!1)});["cols","rows","size","span"].forEach(function(a){v[a]=new t(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){v[a]=new t(a,5,!1,a.toLowerCase(),null,!1,!1)});var ha=/[\-:]([a-z])/g;function ia(a){return a[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 transform-origin 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".split(" ").forEach(function(a){var b=a.replace(ha, +ia);v[b]=new t(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(ha,ia);v[b]=new t(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(ha,ia);v[b]=new t(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){v[a]=new t(a,1,!1,a.toLowerCase(),null,!1,!1)}); +v.xlinkHref=new t("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){v[a]=new t(a,1,!1,a.toLowerCase(),null,!0,!0)}); +var ja={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0, +zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ka=["Webkit","ms","Moz","O"];Object.keys(ja).forEach(function(a){ka.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);ja[b]=ja[a]})});var la=/["'&<>]/; +function w(a){if("boolean"===typeof a||"number"===typeof a)return""+a;a=""+a;var b=la.exec(a);if(b){var c="",d,e=0;for(d=b.index;d<a.length;d++){switch(a.charCodeAt(d)){case 34:b=""";break;case 38:b="&";break;case 39:b="'";break;case 60:b="<";break;case 62:b=">";break;default:continue}e!==d&&(c+=a.substring(e,d));e=d+1;c+=b}a=e!==d?c+a.substring(e,d):c}return a}var ma=/([A-Z])/g,na=/^ms-/,oa=Array.isArray,x=Object.assign,y=null,pa=[],ta={preload:qa,preinit:ra}; +function qa(a,b){if(y){var c=y;if("string"===typeof a&&a&&"object"===typeof b&&null!==b){var d=b.as,e=c.preloadsMap.get(a);e||(e=z(c,a,d,{href:a,rel:"preload",as:d,crossOrigin:"font"===d?"":b.crossOrigin,integrity:b.integrity}));switch(d){case "font":c.fontPreloads.add(e);break;case "style":c.explicitStylePreloads.add(e);break;case "script":c.explicitScriptPreloads.add(e)}}}} +function ra(a,b){if(y)a:{var c=y;if("string"===typeof a&&a&&"object"===typeof b&&null!==b)switch(b.as){case "style":var d=c.stylesMap.get(a);d||(d=b.precedence||"default",d=ua(c,a,d,{rel:"stylesheet",href:a,"data-precedence":d,crossOrigin:b.crossOrigin}));d.set.add(d);c.explicitStylePreloads.add(d.hint);break a;case "script":d=c.scriptsMap.get(a),d||(d=va(c,a,{src:a,async:!0,crossOrigin:b.crossOrigin,integrity:b.integrity}),c.scripts.add(d))}}} +function wa(a,b){return{rel:"preload",as:"style",href:a,crossOrigin:b.crossOrigin,integrity:b.integrity,media:b.media,hrefLang:b.hrefLang,referrerPolicy:b.referrerPolicy}}function xa(a,b){return{rel:"preload",as:"script",href:a,crossOrigin:b.crossOrigin,integrity:b.integrity,referrerPolicy:b.referrerPolicy}}function z(a,b,c,d){c={type:"preload",as:c,href:b,flushed:!1,props:d};a.preloadsMap.set(b,c);return c} +function ua(a,b,c,d){var e=a.stylesMap,f=a.preloadsMap,g=a.precedences,h=g.get(c);h||(h=new Set,g.set(c,h));(f=f.get(b))?(a=f.props,null==d.crossOrigin&&(d.crossOrigin=a.crossOrigin),null==d.referrerPolicy&&(d.referrerPolicy=a.referrerPolicy),null==d.title&&(d.title=a.title)):(f=wa(b,d),f=z(a,b,"style",f),a.explicitStylePreloads.add(f));c={type:"style",href:b,precedence:c,flushed:!1,inShell:!1,props:d,hint:f,set:h};e.set(b,c);return c} +function va(a,b,c){var d=a.scriptsMap,e=a.preloadsMap.get(b);e?(a=e.props,null==c.crossOrigin&&(c.crossOrigin=a.crossOrigin),null==c.referrerPolicy&&(c.referrerPolicy=a.referrerPolicy),null==c.integrity&&(c.integrity=a.integrity)):(e=xa(b,c),e=z(a,b,"script",e),a.explicitScriptPreloads.add(e));c={type:"script",src:b,flushed:!1,props:c,hint:e};d.set(b,c);return c} +function ya(a,b){if(!y)throw Error(m(445));var c=y;switch(a){case "title":var d=b.children;d=Array.isArray(d)?1===d.length?d[0]:null:d;if("function"!==typeof d&&"symbol"!==typeof d&&null!==d&&void 0!==d){d=""+d;var e="title::"+d;a=c.headsMap.get(e);a||(b=x({},b),b.children=d,a={type:"title",props:b,flushed:!1},c.headsMap.set(e,a),c.headResources.add(a))}return!0;case "meta":if("string"===typeof b.charSet)d="charSet";else if("string"===typeof b.content)if(a="::"+b.content,"string"===typeof b.httpEquiv)d= +"httpEquiv::"+b.httpEquiv+a;else if("string"===typeof b.name)d="name::"+b.name+a;else if("string"===typeof b.itemProp)d="itemProp::"+b.itemProp+a;else if("string"===typeof b.property){var f=b.property;d="property::"+f+a;e=f;a=f.split(":").slice(0,-1).join(":");(a=c.structuredMetaKeys.get(a))&&(d=a.key+"::child::"+d)}d&&!c.headsMap.has(d)&&(b={type:"meta",key:d,props:x({},b),flushed:!1},c.headsMap.set(d,b),"charSet"===d?c.charset=b:(e&&c.structuredMetaKeys.set(e,b),c.headResources.add(b)));return!0; +case "base":return d=b.target,e=b.href,d="base"+("string"===typeof e?'[href="'+e+'"]':":not([href])")+("string"===typeof d?'[target="'+d+'"]':":not([target])"),c.headsMap.has(d)||(b={type:"base",props:x({},b),flushed:!1},c.headsMap.set(d,b),c.bases.add(b)),!0}return!1} +function za(a){if(!y)throw Error(m(445));var b=y,c=a.rel,d=a.href;if(!d||"string"!==typeof d||!c||"string"!==typeof c)return!1;switch(c){case "stylesheet":var e=a.onLoad,f=a.onError;c=a.precedence;var g=a.disabled;if("string"!==typeof c||e||f||null!=g)return c=b.preloadsMap.get(d),c||(c=z(b,d,"style",wa(d,a)),b.usedStylePreloads.add(c)),!1;e=b.stylesMap.get(d);e||(a=x({},a),a.href=d,a.rel="stylesheet",a["data-precedence"]=c,delete a.precedence,e=ua(y,d,c,a),b.usedStylePreloads.add(e.hint));b.boundaryResources? +b.boundaryResources.add(e):e.set.add(e);return!0;case "preload":switch(e=a.as,e){case "script":case "style":case "font":c=b.preloadsMap.get(d);if(!c)switch(a=x({},a),a.href=d,a.rel="preload",a.as=e,"font"===e&&(a.crossOrigin=""),c=z(b,d,e,a),e){case "script":b.explicitScriptPreloads.add(c);break;case "style":b.explicitStylePreloads.add(c);break;case "font":b.fontPreloads.add(c)}return!0}}if(a.onLoad||a.onError)return!0;d="rel:"+c+"::href:"+d+"::sizes:"+("string"===typeof a.sizes?a.sizes:"")+"::media:"+ +("string"===typeof a.media?a.media:"");e=b.headsMap.get(d);if(!e)switch(e={type:"link",props:x({},a),flushed:!1},b.headsMap.set(d,e),c){case "preconnect":case "dns-prefetch":b.preconnects.add(e);break;default:b.headResources.add(e)}return!0}function Aa(a,b){var c=a.boundaryResources;c&&(b.forEach(function(a){return c.add(a)}),b.clear())}function Ba(a,b){b.forEach(function(a){return a.set.add(a)});b.clear()}var Ca=ba.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Dispatcher; +function A(a,b,c){return{insertionMode:a,selectedValue:b,noscriptTagInScope:c}} +function Da(a,b,c){switch(b){case "noscript":return A(1,null,!0);case "select":return A(1,null!=c.value?c.value:c.defaultValue,a.noscriptTagInScope);case "svg":return A(2,null,a.noscriptTagInScope);case "math":return A(3,null,a.noscriptTagInScope);case "foreignObject":return A(1,null,a.noscriptTagInScope);case "table":return A(4,null,a.noscriptTagInScope);case "thead":case "tbody":case "tfoot":return A(5,null,a.noscriptTagInScope);case "colgroup":return A(7,null,a.noscriptTagInScope);case "tr":return A(6, +null,a.noscriptTagInScope)}return 4<=a.insertionMode||0===a.insertionMode?A(1,null,a.noscriptTagInScope):a}var Ea=new Map; +function Fa(a,b,c){if("object"!==typeof c)throw Error(m(62));b=!0;for(var d in c)if(q.call(c,d)){var e=c[d];if(null!=e&&"boolean"!==typeof e&&""!==e){if(0===d.indexOf("--")){var f=w(d);e=w((""+e).trim())}else{f=d;var g=Ea.get(f);void 0!==g?f=g:(g=w(f.replace(ma,"-$1").toLowerCase().replace(na,"-ms-")),Ea.set(f,g),f=g);e="number"===typeof e?0===e||q.call(ja,d)?""+e:e+"px":w((""+e).trim())}b?(b=!1,a.push(' style="',f,":",e)):a.push(";",f,":",e)}}b||a.push('"')} +function B(a,b,c,d){switch(c){case "style":Fa(a,b,d);return;case "defaultValue":case "defaultChecked":case "innerHTML":case "suppressContentEditableWarning":case "suppressHydrationWarning":return}if(!(2<c.length)||"o"!==c[0]&&"O"!==c[0]||"n"!==c[1]&&"N"!==c[1])if(b=v.hasOwnProperty(c)?v[c]:null,null!==b){switch(typeof d){case "function":case "symbol":return;case "boolean":if(!b.acceptsBooleans)return}c=b.attributeName;switch(b.type){case 3:d&&a.push(" ",c,'=""');break;case 4:!0===d?a.push(" ",c,'=""'): +!1!==d&&a.push(" ",c,'="',w(d),'"');break;case 5:isNaN(d)||a.push(" ",c,'="',w(d),'"');break;case 6:!isNaN(d)&&1<=d&&a.push(" ",c,'="',w(d),'"');break;default:b.sanitizeURL&&(d=""+d),a.push(" ",c,'="',w(d),'"')}}else if(fa(c)){switch(typeof d){case "function":case "symbol":return;case "boolean":if(b=c.toLowerCase().slice(0,5),"data-"!==b&&"aria-"!==b)return}a.push(" ",c,'="',w(d),'"')}} +function C(a,b,c){if(null!=b){if(null!=c)throw Error(m(60));if("object"!==typeof b||!("__html"in b))throw Error(m(61));b=b.__html;null!==b&&void 0!==b&&a.push(""+b)}}function Ga(a){var b="";aa.Children.forEach(a,function(a){null!=a&&(b+=a)});return b} +function F(a,b,c){var d="stylesheet"===b.rel;a.push(G("link"));for(var e in b)if(q.call(b,e)){var f=b[e];if(null!=f)switch(e){case "children":case "dangerouslySetInnerHTML":throw Error(m(399,"link"));case "precedence":if(d)continue;default:B(a,c,e,f)}}a.push("/>");return null}function H(a,b,c,d){a.push(G(c));for(var e in b)if(q.call(b,e)){var f=b[e];if(null!=f)switch(e){case "children":case "dangerouslySetInnerHTML":throw Error(m(399,c));default:B(a,d,e,f)}}a.push("/>");return null} +function Ha(a,b,c){a.push(G("title"));var d=null,e;for(e in b)if(q.call(b,e)){var f=b[e];if(null!=f)switch(e){case "children":d=f;break;case "dangerouslySetInnerHTML":throw Error(m(434));default:B(a,c,e,f)}}a.push(">");b=Array.isArray(d)?2>d.length?d[0]:null:d;"function"!==typeof b&&"symbol"!==typeof b&&null!==b&&void 0!==b&&a.push(w(""+b));a.push("</","title",">");return null} +function Ia(a,b,c){a.push(G("script"));var d=null,e=null,f;for(f in b)if(q.call(b,f)){var g=b[f];if(null!=g)switch(f){case "children":d=g;break;case "dangerouslySetInnerHTML":e=g;break;default:B(a,c,f,g)}}a.push(">");C(a,e,d);"string"===typeof d&&a.push(w(d));a.push("</","script",">");return null} +function I(a,b,c,d){a.push(G(c));var e=c=null,f;for(f in b)if(q.call(b,f)){var g=b[f];if(null!=g)switch(f){case "children":c=g;break;case "dangerouslySetInnerHTML":e=g;break;default:B(a,d,f,g)}}a.push(">");C(a,e,c);return"string"===typeof c?(a.push(w(c)),null):c}var Ja=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Ka=new Map;function G(a){var b=Ka.get(a);if(void 0===b){if(!Ja.test(a))throw Error(m(65,a));b="<"+a;Ka.set(a,b)}return b} +function La(a,b,c,d,e,f,g){switch(c){case "select":a.push(G("select"));var h=g=null,l;for(l in d)if(q.call(d,l)){var k=d[l];if(null!=k)switch(l){case "children":g=k;break;case "dangerouslySetInnerHTML":h=k;break;case "defaultValue":case "value":break;default:B(a,e,l,k)}}a.push(">");C(a,h,g);return g;case "option":g=f.selectedValue;a.push(G("option"));var p=l=k=null,n=null;for(h in d)if(q.call(d,h)){var r=d[h];if(null!=r)switch(h){case "children":k=r;break;case "selected":p=r;break;case "dangerouslySetInnerHTML":n= +r;break;case "value":l=r;default:B(a,e,h,r)}}if(null!=g)if(d=null!==l?""+l:Ga(k),oa(g))for(e=0;e<g.length;e++){if(""+g[e]===d){a.push(' selected=""');break}}else""+g===d&&a.push(' selected=""');else p&&a.push(' selected=""');a.push(">");C(a,n,k);return k;case "textarea":a.push(G("textarea"));k=h=g=null;for(n in d)if(q.call(d,n)&&(l=d[n],null!=l))switch(n){case "children":k=l;break;case "value":g=l;break;case "defaultValue":h=l;break;case "dangerouslySetInnerHTML":throw Error(m(91));default:B(a,e, +n,l)}null===g&&null!==h&&(g=h);a.push(">");if(null!=k){if(null!=g)throw Error(m(92));if(oa(k)&&1<k.length)throw Error(m(93));g=""+k}"string"===typeof g&&"\n"===g[0]&&a.push("\n");null!==g&&a.push(w(""+g));return null;case "input":a.push(G("input"));l=n=h=g=null;for(k in d)if(q.call(d,k)&&(p=d[k],null!=p))switch(k){case "children":case "dangerouslySetInnerHTML":throw Error(m(399,"input"));case "defaultChecked":l=p;break;case "defaultValue":h=p;break;case "checked":n=p;break;case "value":g=p;break; +default:B(a,e,k,p)}null!==n?B(a,e,"checked",n):null!==l&&B(a,e,"checked",l);null!==g?B(a,e,"value",g):null!==h&&B(a,e,"value",h);a.push("/>");return null;case "menuitem":a.push(G("menuitem"));for(var u in d)if(q.call(d,u)&&(g=d[u],null!=g))switch(u){case "children":case "dangerouslySetInnerHTML":throw Error(m(400));default:B(a,e,u,g)}a.push(">");return null;case "title":return a=2!==f.insertionMode&&!f.noscriptTagInScope&&ya("title",d)?null:Ha(a,d,e),a;case "link":return!f.noscriptTagInScope&&za(d)? +(g&&a.push("\x3c!-- --\x3e"),a=null):a=F(a,d,e),a;case "script":if(h=!f.noscriptTagInScope){if(!y)throw Error(m(445));h=y;k=d.src;n=d.onLoad;l=d.onError;k&&"string"===typeof k?d.async?(n||l?(n=h.preloadsMap.get(k),n||(n=z(h,k,"script",xa(k,d)),h.usedScriptPreloads.add(n))):(n=h.scriptsMap.get(k),n||(n=x({},d),n.src=k,n=va(h,k,n),h.scripts.add(n))),h=!0):h=!1:h=!1}h?(g&&a.push("\x3c!-- --\x3e"),a=null):a=Ia(a,d,e);return a;case "meta":return!f.noscriptTagInScope&&ya("meta",d)?(g&&a.push("\x3c!-- --\x3e"), +a=null):a=H(a,d,"meta",e),a;case "base":return!f.noscriptTagInScope&&ya("base",d)?(g&&a.push("\x3c!-- --\x3e"),a=null):a=H(a,d,"base",e),a;case "listing":case "pre":a.push(G(c));h=g=null;for(p in d)if(q.call(d,p)&&(k=d[p],null!=k))switch(p){case "children":g=k;break;case "dangerouslySetInnerHTML":h=k;break;default:B(a,e,p,k)}a.push(">");if(null!=h){if(null!=g)throw Error(m(60));if("object"!==typeof h||!("__html"in h))throw Error(m(61));d=h.__html;null!==d&&void 0!==d&&("string"===typeof d&&0<d.length&& +"\n"===d[0]?a.push("\n",d):a.push(""+d))}"string"===typeof g&&"\n"===g[0]&&a.push("\n");return g;case "area":case "br":case "col":case "embed":case "hr":case "img":case "keygen":case "param":case "source":case "track":case "wbr":return H(a,d,c,e);case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return I(a,d,c,e);case "head":return I(b,d,c,e);case "html":return 0===f.insertionMode&& +b.push("<!DOCTYPE html>"),I(b,d,c,e);default:if(-1===c.indexOf("-")&&"string"!==typeof d.is)return I(a,d,c,e);a.push(G(c));h=g=null;for(r in d)if(q.call(d,r)&&(k=d[r],null!=k))switch(r){case "children":g=k;break;case "dangerouslySetInnerHTML":h=k;break;case "style":Fa(a,e,k);break;case "suppressContentEditableWarning":case "suppressHydrationWarning":break;default:fa(r)&&"function"!==typeof k&&"symbol"!==typeof k&&a.push(" ",r,'="',w(k),'"')}a.push(">");C(a,h,g);return g}} +function Ma(a,b,c){switch(c){case "title":case "script":case "area":case "base":case "br":case "col":case "embed":case "hr":case "img":case "input":case "keygen":case "link":case "meta":case "param":case "source":case "track":case "wbr":return;case "body":b.unshift("</",c,">");return;case "html":b.push("</",c,">");return}a.push("</",c,">")}function Na(a,b,c){a.push('\x3c!--$?--\x3e<template id="');if(null===c)throw Error(m(395));a.push(c);return a.push('"></template>')} +function Oa(a,b,c,d){switch(c.insertionMode){case 0:case 1:return a.push('<div hidden id="'),a.push(b.segmentPrefix),b=d.toString(16),a.push(b),a.push('">');case 2:return a.push('<svg aria-hidden="true" style="display:none" id="'),a.push(b.segmentPrefix),b=d.toString(16),a.push(b),a.push('">');case 3:return a.push('<math aria-hidden="true" style="display:none" id="'),a.push(b.segmentPrefix),b=d.toString(16),a.push(b),a.push('">');case 4:return a.push('<table hidden id="'),a.push(b.segmentPrefix), +b=d.toString(16),a.push(b),a.push('">');case 5:return a.push('<table hidden><tbody id="'),a.push(b.segmentPrefix),b=d.toString(16),a.push(b),a.push('">');case 6:return a.push('<table hidden><tr id="'),a.push(b.segmentPrefix),b=d.toString(16),a.push(b),a.push('">');case 7:return a.push('<table hidden><colgroup id="'),a.push(b.segmentPrefix),b=d.toString(16),a.push(b),a.push('">');default:throw Error(m(397));}} +function Pa(a,b){switch(b.insertionMode){case 0:case 1:return a.push("</div>");case 2:return a.push("</svg>");case 3:return a.push("</math>");case 4:return a.push("</table>");case 5:return a.push("</tbody></table>");case 6:return a.push("</tr></table>");case 7:return a.push("</colgroup></table>");default:throw Error(m(397));}}var Qa=/[<\u2028\u2029]/g; +function Ra(a){return JSON.stringify(a).replace(Qa,function(a){switch(a){case "<":return"\\u003c";case "\u2028":return"\\u2028";case "\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React");}})}var Sa=/[&><\u2028\u2029]/g; +function J(a){return JSON.stringify(a).replace(Sa,function(a){switch(a){case "&":return"\\u0026";case ">":return"\\u003e";case "<":return"\\u003c";case "\u2028":return"\\u2028";case "\u2029":return"\\u2029";default:throw Error("escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React");}})} +function Ta(a,b,c){function d(a){a.flushed||(F(e,a.props,c),a.flushed=!0)}var e=[],f=b.charset,g=b.bases,h=b.preconnects,l=b.fontPreloads,k=b.precedences,p=b.usedStylePreloads,n=b.scripts,r=b.usedScriptPreloads,u=b.explicitStylePreloads,L=b.explicitScriptPreloads,E=b.headResources;f&&(H(e,f.props,"meta",c),f.flushed=!0,b.charset=null);g.forEach(function(a){H(e,a.props,"base",c);a.flushed=!0});g.clear();h.forEach(function(a){F(e,a.props,c);a.flushed=!0});h.clear();l.forEach(function(a){F(e,a.props, +c);a.flushed=!0});l.clear();k.forEach(function(a,b){a.size?(a.forEach(function(a){F(e,a.props,c);a.flushed=!0;a.inShell=!0;a.hint.flushed=!0}),a.clear()):e.push('<style data-precedence="',w(b),'"></style>')});p.forEach(d);p.clear();n.forEach(function(a){Ia(e,a.props,c);a.flushed=!0;a.hint.flushed=!0});n.clear();r.forEach(d);r.clear();u.forEach(d);u.clear();L.forEach(d);L.clear();E.forEach(function(a){switch(a.type){case "title":Ha(e,a.props,c);break;case "meta":H(e,a.props,"meta",c);break;case "link":F(e, +a.props,c)}a.flushed=!0});E.clear();f=!0;for(b=0;b<e.length-1;b++)a.push(e[b]);b<e.length&&(f=a.push(e[b]));return f} +function Ua(a,b,c){function d(a){a.flushed||(F(e,a.props,c),a.flushed=!0)}var e=[],f=b.charset,g=b.preconnects,h=b.fontPreloads,l=b.usedStylePreloads,k=b.scripts,p=b.usedScriptPreloads,n=b.explicitStylePreloads,r=b.explicitScriptPreloads,u=b.headResources;f&&(H(e,f.props,"meta",c),f.flushed=!0,b.charset=null);g.forEach(function(a){F(e,a.props,c);a.flushed=!0});g.clear();h.forEach(function(a){F(e,a.props,c);a.flushed=!0});h.clear();l.forEach(d);l.clear();k.forEach(function(a){I(e,a.props,"script", +c);Ma(e,e,"script",a.props);a.flushed=!0;a.hint.flushed=!0});k.clear();p.forEach(d);p.clear();n.forEach(d);n.clear();r.forEach(d);r.clear();u.forEach(function(a){switch(a.type){case "title":Ha(e,a.props,c);break;case "meta":H(e,a.props,"meta",c);break;case "link":F(e,a.props,c)}a.flushed=!0});u.clear();f=!0;for(b=0;b<e.length-1;b++)a.push(e[b]);b<e.length&&(f=a.push(e[b]));return f} +function Va(a,b){a.push("[");var c="[";b.forEach(function(b){if(!b.inShell)if(b.flushed)a.push(c),b=J(""+b.href),a.push(b),a.push("]"),c=",[";else{a.push(c);var d=b.precedence,f=b.props,g=J(""+b.href);a.push(g);d=""+d;a.push(",");d=J(d);a.push(d);for(var h in f)if(q.call(f,h)){var l=f[h];if(null!=l)switch(h){case "href":case "rel":case "precedence":case "data-precedence":break;case "children":case "dangerouslySetInnerHTML":throw Error(m(399,"link"));default:a:{d=a;var k=h;g=k.toLowerCase();switch(typeof l){case "function":case "symbol":break a}switch(k){case "innerHTML":case "dangerouslySetInnerHTML":case "suppressContentEditableWarning":case "suppressHydrationWarning":case "style":break a; +case "className":g="class";break;case "hidden":if(!1===l)break a;break;case "src":case "href":break;default:if(!fa(k))break a}if(!(2<k.length)||"o"!==k[0]&&"O"!==k[0]||"n"!==k[1]&&"N"!==k[1])l=""+l,d.push(","),g=J(g),d.push(g),d.push(","),g=J(l),d.push(g)}}}a.push("]");c=",[";b.flushed=!0;b.hint.flushed=!0}});a.push("]")} +function Wa(a,b){b=void 0===b?"":b;return{bootstrapChunks:[],placeholderPrefix:b+"P:",segmentPrefix:b+"S:",boundaryPrefix:b+"B:",idPrefix:b,nextSuspenseID:0,streamingFormat:0,startInlineScript:"<script>",sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1,sentStyleInsertionFunction:!1,externalRuntimeConfig:null,generateStaticMarkup:a}} +function Xa(a,b,c,d){if(c.generateStaticMarkup)return a.push(w(b)),!1;""===b?a=d:(d&&a.push("\x3c!-- --\x3e"),a.push(w(b)),a=!0);return a} +var Ya=Symbol.for("react.element"),Za=Symbol.for("react.portal"),$a=Symbol.for("react.fragment"),ab=Symbol.for("react.strict_mode"),bb=Symbol.for("react.profiler"),cb=Symbol.for("react.provider"),db=Symbol.for("react.context"),eb=Symbol.for("react.server_context"),fb=Symbol.for("react.forward_ref"),gb=Symbol.for("react.suspense"),hb=Symbol.for("react.suspense_list"),ib=Symbol.for("react.memo"),jb=Symbol.for("react.lazy"),kb=Symbol.for("react.scope"),lb=Symbol.for("react.debug_trace_mode"),mb=Symbol.for("react.offscreen"), +nb=Symbol.for("react.legacy_hidden"),ob=Symbol.for("react.cache"),pb=Symbol.for("react.default_value"),qb=Symbol.iterator; +function rb(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case $a:return"Fragment";case Za:return"Portal";case bb:return"Profiler";case ab:return"StrictMode";case gb:return"Suspense";case hb:return"SuspenseList";case ob:return"Cache"}if("object"===typeof a)switch(a.$$typeof){case db:return(a.displayName||"Context")+".Consumer";case cb:return(a._context.displayName||"Context")+".Provider";case fb:var b=a.render;a=a.displayName; +a||(a=b.displayName||b.name||"",a=""!==a?"ForwardRef("+a+")":"ForwardRef");return a;case ib:return b=a.displayName||null,null!==b?b:rb(a.type)||"Memo";case jb:b=a._payload;a=a._init;try{return rb(a(b))}catch(c){break}case eb:return(a.displayName||a._globalName)+".Provider"}return null}var sb=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,tb={};function ub(a,b){a=a.contextTypes;if(!a)return tb;var c={},d;for(d in a)c[d]=b[d];return c}var N=null; +function vb(a,b){if(a!==b){a.context._currentValue2=a.parentValue;a=a.parent;var c=b.parent;if(null===a){if(null!==c)throw Error(m(401));}else{if(null===c)throw Error(m(401));vb(a,c)}b.context._currentValue2=b.value}}function wb(a){a.context._currentValue2=a.parentValue;a=a.parent;null!==a&&wb(a)}function xb(a){var b=a.parent;null!==b&&xb(b);a.context._currentValue2=a.value} +function yb(a,b){a.context._currentValue2=a.parentValue;a=a.parent;if(null===a)throw Error(m(402));a.depth===b.depth?vb(a,b):yb(a,b)}function zb(a,b){var c=b.parent;if(null===c)throw Error(m(402));a.depth===c.depth?vb(a,c):zb(a,c);b.context._currentValue2=b.value}function Ab(a){var b=N;b!==a&&(null===b?xb(a):null===a?wb(b):b.depth===a.depth?vb(b,a):b.depth>a.depth?yb(b,a):zb(b,a),N=a)} +var Bb={isMounted:function(){return!1},enqueueSetState:function(a,b){a=a._reactInternals;null!==a.queue&&a.queue.push(b)},enqueueReplaceState:function(a,b){a=a._reactInternals;a.replace=!0;a.queue=[b]},enqueueForceUpdate:function(){}}; +function Cb(a,b,c,d){var e=void 0!==a.state?a.state:null;a.updater=Bb;a.props=c;a.state=e;var f={queue:[],replace:!1};a._reactInternals=f;var g=b.contextType;a.context="object"===typeof g&&null!==g?g._currentValue2:d;g=b.getDerivedStateFromProps;"function"===typeof g&&(g=g(c,e),e=null===g||void 0===g?e:x({},e,g),a.state=e);if("function"!==typeof b.getDerivedStateFromProps&&"function"!==typeof a.getSnapshotBeforeUpdate&&("function"===typeof a.UNSAFE_componentWillMount||"function"===typeof a.componentWillMount))if(b= +a.state,"function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),b!==a.state&&Bb.enqueueReplaceState(a,a.state,null),null!==f.queue&&0<f.queue.length)if(b=f.queue,g=f.replace,f.queue=null,f.replace=!1,g&&1===b.length)a.state=b[0];else{f=g?b[0]:a.state;e=!0;for(g=g?1:0;g<b.length;g++){var h=b[g];h="function"===typeof h?h.call(a,f,c,d):h;null!=h&&(e?(e=!1,f=x({},f,h)):x(f,h))}a.state=f}else f.queue=null} +var Db={id:1,overflow:""};function Eb(a,b,c){var d=a.id;a=a.overflow;var e=32-Fb(d)-1;d&=~(1<<e);c+=1;var f=32-Fb(b)+e;if(30<f){var g=e-e%5;f=(d&(1<<g)-1).toString(32);d>>=g;e-=g;return{id:1<<32-Fb(b)+e|c<<e|d,overflow:f+a}}return{id:1<<f|c<<e|d,overflow:a}}var Fb=Math.clz32?Math.clz32:Gb,Hb=Math.log,Ib=Math.LN2;function Gb(a){a>>>=0;return 0===a?32:31-(Hb(a)/Ib|0)|0}var Jb=Error(m(460));function Kb(){} +function Lb(a,b,c){c=a[c];void 0===c?a.push(b):c!==b&&(b.then(Kb,Kb),b=c);switch(b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;default:if("string"!==typeof b.status)switch(a=b,a.status="pending",a.then(function(a){if("pending"===b.status){var c=b;c.status="fulfilled";c.value=a}},function(a){if("pending"===b.status){var c=b;c.status="rejected";c.reason=a}}),b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;}Mb=b;throw Jb;}}var Mb=null; +function Nb(){if(null===Mb)throw Error(m(459));var a=Mb;Mb=null;return a}function Ob(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var Pb="function"===typeof Object.is?Object.is:Ob,O=null,Qb=null,Rb=null,P=null,Q=!1,Sb=!1,R=0,S=0,U=null,V=null,Tb=0;function W(){if(null===O)throw Error(m(321));return O}function Ub(){if(0<Tb)throw Error(m(312));return{memoizedState:null,queue:null,next:null}} +function Vb(){null===P?null===Rb?(Q=!1,Rb=P=Ub()):(Q=!0,P=Rb):null===P.next?(Q=!1,P=P.next=Ub()):(Q=!0,P=P.next);return P}function Wb(a,b,c,d){for(;Sb;)Sb=!1,S=R=0,Tb+=1,P=null,c=a(b,d);Xb();return c}function Yb(){var a=U;U=null;return a}function Xb(){Qb=O=null;Sb=!1;Rb=null;Tb=0;P=V=null}function Zb(a,b){return"function"===typeof b?b(a):b} +function $b(a,b,c){O=W();P=Vb();if(Q){var d=P.queue;b=d.dispatch;if(null!==V&&(c=V.get(d),void 0!==c)){V.delete(d);d=P.memoizedState;do d=a(d,c.action),c=c.next;while(null!==c);P.memoizedState=d;return[d,b]}return[P.memoizedState,b]}a=a===Zb?"function"===typeof b?b():b:void 0!==c?c(b):b;P.memoizedState=a;a=P.queue={last:null,dispatch:null};a=a.dispatch=ac.bind(null,O,a);return[P.memoizedState,a]} +function bc(a,b){O=W();P=Vb();b=void 0===b?null:b;if(null!==P){var c=P.memoizedState;if(null!==c&&null!==b){var d=c[1];a:if(null===d)d=!1;else{for(var e=0;e<d.length&&e<b.length;e++)if(!Pb(b[e],d[e])){d=!1;break a}d=!0}if(d)return c[0]}}a=a();P.memoizedState=[a,b];return a}function ac(a,b,c){if(25<=Tb)throw Error(m(301));if(a===O)if(Sb=!0,a={action:c,next:null},null===V&&(V=new Map),c=V.get(b),void 0===c)V.set(b,a);else{for(b=c;null!==b.next;)b=b.next;b.next=a}} +function cc(){throw Error(m(394));}function dc(){throw Error(m(393));}function ec(){} +var gc={readContext:function(a){return a._currentValue2},useContext:function(a){W();return a._currentValue2},useMemo:bc,useReducer:$b,useRef:function(a){O=W();P=Vb();var b=P.memoizedState;return null===b?(a={current:a},P.memoizedState=a):b},useState:function(a){return $b(Zb,a)},useInsertionEffect:ec,useLayoutEffect:function(){},useCallback:function(a,b){return bc(function(){return a},b)},useImperativeHandle:ec,useEffect:ec,useDebugValue:ec,useDeferredValue:function(a){W();return a},useTransition:function(){W(); +return[!1,cc]},useId:function(){var a=Qb.treeContext;var b=a.overflow;a=a.id;a=(a&~(1<<32-Fb(a)-1)).toString(32)+b;var c=fc;if(null===c)throw Error(m(404));b=R++;a=":"+c.idPrefix+"R"+a;0<b&&(a+="H"+b.toString(32));return a+":"},useMutableSource:function(a,b){W();return b(a._source)},useSyncExternalStore:function(a,b,c){if(void 0===c)throw Error(m(407));return c()},useCacheRefresh:function(){return dc},use:function(a){if(null!==a&&"object"===typeof a){if("function"===typeof a.then){var b=S;S+=1;null=== +U&&(U=[]);return Lb(U,a,b)}if(a.$$typeof===db||a.$$typeof===eb)return a._currentValue2}throw Error(m(438,String(a)));}},fc=null,hc={getCacheSignal:function(){throw Error(m(248));},getCacheForType:function(){throw Error(m(248));}},ic=sb.ReactCurrentDispatcher,jc=sb.ReactCurrentCache;function kc(a){console.error(a);return null}function lc(){} +function mc(a,b,c,d,e,f,g,h,l){var k=[],p=new Set,n={preloadsMap:new Map,stylesMap:new Map,scriptsMap:new Map,headsMap:new Map,charset:null,bases:new Set,preconnects:new Set,fontPreloads:new Set,precedences:new Map,usedStylePreloads:new Set,scripts:new Set,usedScriptPreloads:new Set,explicitStylePreloads:new Set,explicitScriptPreloads:new Set,headResources:new Set,structuredMetaKeys:new Map,boundaryResources:null};b={destination:null,responseState:b,progressiveChunkSize:void 0===d?12800:d,status:0, +fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,resources:n,completedRootSegment:null,abortableTasks:p,pingedTasks:k,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],preamble:[],postamble:[],onError:void 0===e?kc:e,onAllReady:void 0===f?lc:f,onShellReady:void 0===g?lc:g,onShellError:void 0===h?lc:h,onFatalError:void 0===l?lc:l};c=nc(b,0,null,c,!1,!1);c.parentFlushed=!0;a=oc(b,null,a,null,c,p,tb,null,Db);k.push(a);return b} +function oc(a,b,c,d,e,f,g,h,l){a.allPendingTasks++;null===d?a.pendingRootTasks++:d.pendingTasks++;var k={node:c,ping:function(){var b=a.pingedTasks;b.push(k);1===b.length&&pc(a)},blockedBoundary:d,blockedSegment:e,abortSet:f,legacyContext:g,context:h,treeContext:l,thenableState:b};f.add(k);return k}function nc(a,b,c,d,e,f){return{status:0,id:-1,index:b,parentFlushed:!1,chunks:[],children:[],formatContext:d,boundary:c,lastPushedText:e,textEmbedded:f}} +function Y(a,b){a=a.onError(b);if(null!=a&&"string"!==typeof a)throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof a+'" instead');return a}function qc(a,b){var c=a.onShellError;c(b);c=a.onFatalError;c(b);null!==a.destination?(a.status=2,a.destination.destroy(b)):(a.status=1,a.fatalError=b)} +function rc(a,b,c,d){var e=c.render(),f=d.childContextTypes;if(null!==f&&void 0!==f){var g=b.legacyContext;if("function"!==typeof c.getChildContext)d=g;else{c=c.getChildContext();for(var h in c)if(!(h in f))throw Error(m(108,rb(d)||"Unknown",h));d=x({},g,c)}b.legacyContext=d;Z(a,b,null,e);b.legacyContext=g}else Z(a,b,null,e)}function sc(a,b){if(a&&a.defaultProps){b=x({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c]);return b}return b} +function tc(a,b,c,d,e,f){if("function"===typeof d)if(d.prototype&&d.prototype.isReactComponent)c=ub(d,b.legacyContext),f=d.contextType,f=new d(e,"object"===typeof f&&null!==f?f._currentValue2:c),Cb(f,d,e,c),rc(a,b,f,d);else{f=ub(d,b.legacyContext);O={};Qb=b;S=R=0;U=c;c=d(e,f);c=Wb(d,e,c,f);var g=0!==R;if("object"===typeof c&&null!==c&&"function"===typeof c.render&&void 0===c.$$typeof)Cb(c,d,e,f),rc(a,b,c,d);else if(g){e=b.treeContext;b.treeContext=Eb(e,1,0);try{Z(a,b,null,c)}finally{b.treeContext= +e}}else Z(a,b,null,c)}else if("string"===typeof d)c=b.blockedSegment,f=La(c.chunks,a.preamble,d,e,a.responseState,c.formatContext,c.lastPushedText),c.lastPushedText=!1,g=c.formatContext,c.formatContext=Da(g,d,e),uc(a,b,f),c.formatContext=g,Ma(c.chunks,a.postamble,d),c.lastPushedText=!1;else{switch(d){case nb:case lb:case ab:case bb:case $a:Z(a,b,null,e.children);return;case mb:"hidden"!==e.mode&&Z(a,b,null,e.children);return;case hb:Z(a,b,null,e.children);return;case kb:throw Error(m(343));case gb:a:{d= +b.blockedBoundary;c=b.blockedSegment;f=e.fallback;e=e.children;g=new Set;var h={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:g,errorDigest:null,resources:new Set},l=nc(a,c.chunks.length,h,c.formatContext,!1,!1);c.children.push(l);c.lastPushedText=!1;var k=nc(a,0,null,c.formatContext,!1,!1);k.parentFlushed=!0;b.blockedBoundary=h;b.blockedSegment=k;a.resources.boundaryResources=h.resources;try{if(uc(a,b,e),a.responseState.generateStaticMarkup|| +k.lastPushedText&&k.textEmbedded&&k.chunks.push("\x3c!-- --\x3e"),k.status=1,0===h.pendingTasks&&(null!==a.completedRootSegment||0<a.pendingRootTasks)&&Ba(a.resources,h.resources),vc(h,k),0===h.pendingTasks)break a}catch(p){k.status=4,h.forceClientRender=!0,h.errorDigest=Y(a,p)}finally{a.resources.boundaryResources=d?d.resources:null,b.blockedBoundary=d,b.blockedSegment=c}b=oc(a,null,f,d,l,g,b.legacyContext,b.context,b.treeContext);a.pingedTasks.push(b)}return}if("object"===typeof d&&null!==d)switch(d.$$typeof){case fb:d= +d.render;O={};Qb=b;S=R=0;U=c;c=d(e,f);e=Wb(d,e,c,f);if(0!==R){d=b.treeContext;b.treeContext=Eb(d,1,0);try{Z(a,b,null,e)}finally{b.treeContext=d}}else Z(a,b,null,e);return;case ib:d=d.type;e=sc(d,e);tc(a,b,c,d,e,f);return;case cb:c=e.children;d=d._context;e=e.value;f=d._currentValue2;d._currentValue2=e;g=N;N=e={parent:g,depth:null===g?0:g.depth+1,context:d,parentValue:f,value:e};b.context=e;Z(a,b,null,c);a=N;if(null===a)throw Error(m(403));e=a.parentValue;a.context._currentValue2=e===pb?a.context._defaultValue: +e;a=N=a.parent;b.context=a;return;case db:e=e.children;e=e(d._currentValue2);Z(a,b,null,e);return;case jb:f=d._init;d=f(d._payload);e=sc(d,e);tc(a,b,c,d,e,void 0);return}throw Error(m(130,null==d?d:typeof d,""));}} +function Z(a,b,c,d){b.node=d;if("object"===typeof d&&null!==d){switch(d.$$typeof){case Ya:tc(a,b,c,d.type,d.props,d.ref);return;case Za:throw Error(m(257));case jb:c=d._init;d=c(d._payload);Z(a,b,null,d);return}if(oa(d)){wc(a,b,d);return}null===d||"object"!==typeof d?c=null:(c=qb&&d[qb]||d["@@iterator"],c="function"===typeof c?c:null);if(c&&(c=c.call(d))){d=c.next();if(!d.done){var e=[];do e.push(d.value),d=c.next();while(!d.done);wc(a,b,e)}return}a=Object.prototype.toString.call(d);throw Error(m(31, +"[object Object]"===a?"object with keys {"+Object.keys(d).join(", ")+"}":a));}"string"===typeof d?(c=b.blockedSegment,c.lastPushedText=Xa(b.blockedSegment.chunks,d,a.responseState,c.lastPushedText)):"number"===typeof d&&(c=b.blockedSegment,c.lastPushedText=Xa(b.blockedSegment.chunks,""+d,a.responseState,c.lastPushedText))}function wc(a,b,c){for(var d=c.length,e=0;e<d;e++){var f=b.treeContext;b.treeContext=Eb(f,d,e);try{uc(a,b,c[e])}finally{b.treeContext=f}}} +function uc(a,b,c){var d=b.blockedSegment.formatContext,e=b.legacyContext,f=b.context;try{return Z(a,b,null,c)}catch(k){if(Xb(),c=k===Jb?Nb():k,"object"===typeof c&&null!==c&&"function"===typeof c.then){var g=Yb(),h=b.blockedSegment,l=nc(a,h.chunks.length,null,h.formatContext,h.lastPushedText,!0);h.children.push(l);h.lastPushedText=!1;a=oc(a,g,b.node,b.blockedBoundary,l,b.abortSet,b.legacyContext,b.context,b.treeContext).ping;c.then(a,a);b.blockedSegment.formatContext=d;b.legacyContext=e;b.context= +f;Ab(f)}else throw b.blockedSegment.formatContext=d,b.legacyContext=e,b.context=f,Ab(f),c;}}function xc(a){var b=a.blockedBoundary;a=a.blockedSegment;a.status=3;yc(this,b,a)} +function zc(a,b,c){var d=a.blockedBoundary;a.blockedSegment.status=3;null===d?(b.allPendingTasks--,1!==b.status&&2!==b.status&&(Y(b,c),qc(b,c))):(d.pendingTasks--,d.forceClientRender||(d.forceClientRender=!0,d.errorDigest=b.onError(c),d.parentFlushed&&b.clientRenderedBoundaries.push(d)),d.fallbackAbortableTasks.forEach(function(a){return zc(a,b,c)}),d.fallbackAbortableTasks.clear(),b.allPendingTasks--,0===b.allPendingTasks&&(a=b.onAllReady,a()))} +function vc(a,b){if(0===b.chunks.length&&1===b.children.length&&null===b.children[0].boundary){var c=b.children[0];c.id=b.id;c.parentFlushed=!0;1===c.status&&vc(a,c)}else a.completedSegments.push(b)} +function yc(a,b,c){if(null===b){if(c.parentFlushed){if(null!==a.completedRootSegment)throw Error(m(389));a.completedRootSegment=c}a.pendingRootTasks--;0===a.pendingRootTasks&&(a.onShellError=lc,b=a.onShellReady,b())}else b.pendingTasks--,b.forceClientRender||(0===b.pendingTasks?(c.parentFlushed&&1===c.status&&vc(b,c),(null!==a.completedRootSegment||0<a.pendingRootTasks)&&Ba(a.resources,b.resources),b.parentFlushed&&a.completedBoundaries.push(b),b.fallbackAbortableTasks.forEach(xc,a),b.fallbackAbortableTasks.clear()): +c.parentFlushed&&1===c.status&&(vc(b,c),1===b.completedSegments.length&&b.parentFlushed&&a.partialBoundaries.push(b)));a.allPendingTasks--;0===a.allPendingTasks&&(a=a.onAllReady,a())} +function pc(a){if(2!==a.status){var b=N,c=ic.current;ic.current=gc;var d=jc.current;jc.current=hc;var e=a.resources;pa.push(y);y=e;e=Ca.current;Ca.current=ta;var f=fc;fc=a.responseState;try{var g=a.pingedTasks,h;for(h=0;h<g.length;h++){var l=g[h];var k=a,p=l.blockedBoundary;k.resources.boundaryResources=p?p.resources:null;var n=l.blockedSegment;if(0===n.status){Ab(l.context);try{var r=l.thenableState;l.thenableState=null;Z(k,l,r,l.node);k.responseState.generateStaticMarkup||n.lastPushedText&&n.textEmbedded&& +n.chunks.push("\x3c!-- --\x3e");l.abortSet.delete(l);n.status=1;yc(k,l.blockedBoundary,n)}catch(K){Xb();var u=K===Jb?Nb():K;if("object"===typeof u&&null!==u&&"function"===typeof u.then){var L=l.ping;u.then(L,L);l.thenableState=Yb()}else{l.abortSet.delete(l);n.status=4;var E=k,D=l.blockedBoundary,M=u,X=Y(E,M);null===D?qc(E,M):(D.pendingTasks--,D.forceClientRender||(D.forceClientRender=!0,D.errorDigest=X,D.parentFlushed&&E.clientRenderedBoundaries.push(D)));E.allPendingTasks--;if(0===E.allPendingTasks){var T= +E.onAllReady;T()}}}finally{k.resources.boundaryResources=null}}}g.splice(0,h);null!==a.destination&&Ac(a,a.destination)}catch(K){Y(a,K),qc(a,K)}finally{fc=f,ic.current=c,jc.current=d,y=pa.pop(),Ca.current=e,c===gc&&Ab(b)}}} +function Bc(a,b,c){c.parentFlushed=!0;switch(c.status){case 0:var d=c.id=a.nextSegmentId++;c.lastPushedText=!1;c.textEmbedded=!1;a=a.responseState;b.push('<template id="');b.push(a.placeholderPrefix);a=d.toString(16);b.push(a);return b.push('"></template>');case 1:c.status=2;var e=!0;d=c.chunks;var f=0;c=c.children;for(var g=0;g<c.length;g++){for(e=c[g];f<e.index;f++)b.push(d[f]);e=Cc(a,b,e)}for(;f<d.length-1;f++)b.push(d[f]);f<d.length&&(e=b.push(d[f]));return e;default:throw Error(m(390));}} +function Cc(a,b,c){var d=c.boundary;if(null===d)return Bc(a,b,c);d.parentFlushed=!0;if(d.forceClientRender)return a.responseState.generateStaticMarkup||(d=d.errorDigest,b.push("\x3c!--$!--\x3e"),b.push("<template"),d&&(b.push(' data-dgst="'),d=w(d),b.push(d),b.push('"')),b.push("></template>")),Bc(a,b,c),a=a.responseState.generateStaticMarkup?!0:b.push("\x3c!--/$--\x3e"),a;if(0<d.pendingTasks){d.rootSegmentID=a.nextSegmentId++;0<d.completedSegments.length&&a.partialBoundaries.push(d);var e=a.responseState; +var f=e.nextSuspenseID++;e=e.boundaryPrefix+f.toString(16);d=d.id=e;Na(b,a.responseState,d);Bc(a,b,c);return b.push("\x3c!--/$--\x3e")}if(d.byteSize>a.progressiveChunkSize)return d.rootSegmentID=a.nextSegmentId++,a.completedBoundaries.push(d),Na(b,a.responseState,d.id),Bc(a,b,c),b.push("\x3c!--/$--\x3e");Aa(a.resources,d.resources);a.responseState.generateStaticMarkup||b.push("\x3c!--$--\x3e");c=d.completedSegments;if(1!==c.length)throw Error(m(391));Cc(a,b,c[0]);a=a.responseState.generateStaticMarkup? +!0:b.push("\x3c!--/$--\x3e");return a}function Dc(a,b,c){Oa(b,a.responseState,c.formatContext,c.id);Cc(a,b,c);return Pa(b,c.formatContext)} +function Ec(a,b,c){a.resources.boundaryResources=c.resources;for(var d=c.completedSegments,e=0;e<d.length;e++)Fc(a,b,c,d[e]);d.length=0;a=a.responseState;d=c.id;e=c.rootSegmentID;c=c.resources;var f;b:{for(f=c.values();;){var g=f.next().value;if(!g)break;if(!g.inShell){f=!0;break b}}f=!1}b.push(a.startInlineScript);f?a.sentCompleteBoundaryFunction?a.sentStyleInsertionFunction?b.push('$RR("'):(a.sentStyleInsertionFunction=!0,b.push('$RM=new Map;\n$RR=function(p,q,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};;$RR("')): +(a.sentCompleteBoundaryFunction=!0,a.sentStyleInsertionFunction=!0,b.push('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};;$RM=new Map;\n$RR=function(p,q,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};;$RR("')): +a.sentCompleteBoundaryFunction?b.push('$RC("'):(a.sentCompleteBoundaryFunction=!0,b.push('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};;$RC("')); +if(null===d)throw Error(m(395));e=e.toString(16);b.push(d);b.push('","');b.push(a.segmentPrefix);b.push(e);f?(b.push('",'),Va(b,c)):b.push('"');b=b.push(")\x3c/script>");return b} +function Fc(a,b,c,d){if(2===d.status)return!0;var e=d.id;if(-1===e){if(-1===(d.id=c.rootSegmentID))throw Error(m(392));return Dc(a,b,d)}Dc(a,b,d);a=a.responseState;b.push(a.startInlineScript);a.sentCompleteSegmentFunction?b.push('$RS("'):(a.sentCompleteSegmentFunction=!0,b.push('$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};;$RS("'));b.push(a.segmentPrefix); +e=e.toString(16);b.push(e);b.push('","');b.push(a.placeholderPrefix);b.push(e);b=b.push('")\x3c/script>');return b} +function Ac(a,b){try{var c,d=a.completedRootSegment;if(null!==d)if(0===a.pendingRootTasks){var e=a.preamble;for(c=0;c<e.length;c++)b.push(e[c]);Ta(b,a.resources,a.responseState);Cc(a,b,d);a.completedRootSegment=null;var f=a.responseState.bootstrapChunks;for(d=0;d<f.length-1;d++)b.push(f[d]);d<f.length&&b.push(f[d])}else return;else Ua(b,a.resources,a.responseState);var g=a.clientRenderedBoundaries;for(c=0;c<g.length;c++){var h=g[c];f=b;var l=a.responseState,k=h.id,p=h.errorDigest,n=h.errorMessage, +r=h.errorComponentStack;f.push(l.startInlineScript);l.sentClientRenderFunction?f.push('$RX("'):(l.sentClientRenderFunction=!0,f.push('$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};;$RX("'));if(null===k)throw Error(m(395));f.push(k);f.push('"');if(p||n||r){f.push(",");var u=Ra(p||"");f.push(u)}if(n||r){f.push(",");var L=Ra(n||"");f.push(L)}if(r){f.push(",");var E=Ra(r); +f.push(E)}if(!f.push(")\x3c/script>")){a.destination=null;c++;g.splice(0,c);return}}g.splice(0,c);var D=a.completedBoundaries;for(c=0;c<D.length;c++)if(!Ec(a,b,D[c])){a.destination=null;c++;D.splice(0,c);return}D.splice(0,c);var M=a.partialBoundaries;for(c=0;c<M.length;c++){var X=M[c];a:{g=a;h=b;g.resources.boundaryResources=X.resources;var T=X.completedSegments;for(l=0;l<T.length;l++)if(!Fc(g,h,X,T[l])){l++;T.splice(0,l);var K=!1;break a}T.splice(0,l);K=!0}if(!K){a.destination=null;c++;M.splice(0, +c);return}}M.splice(0,c);var sa=a.completedBoundaries;for(c=0;c<sa.length;c++)if(!Ec(a,b,sa[c])){a.destination=null;c++;sa.splice(0,c);return}sa.splice(0,c)}finally{if(0===a.allPendingTasks&&0===a.pingedTasks.length&&0===a.clientRenderedBoundaries.length&&0===a.completedBoundaries.length){a=a.postamble;for(c=0;c<a.length;c++)b.push(a[c]);b.push(null)}}} +function Gc(a,b){try{var c=a.abortableTasks;if(0<c.size){var d=void 0===b?Error(m(432)):b;c.forEach(function(b){return zc(b,a,d)});c.clear()}null!==a.destination&&Ac(a,a.destination)}catch(e){Y(a,e),qc(a,e)}}function Hc(){} +function Ic(a,b,c,d){var e=!1,f=null,g="",h={push:function(a){null!==a&&(g+=a);return!0},destroy:function(a){e=!0;f=a}},l=!1;a=mc(a,Wa(c,b?b.identifierPrefix:void 0),{insertionMode:1,selectedValue:null,noscriptTagInScope:!1},Infinity,Hc,void 0,function(){l=!0},void 0,void 0);pc(a);Gc(a,d);if(1===a.status)a.status=2,h.destroy(a.fatalError);else if(2!==a.status&&null===a.destination){a.destination=h;try{Ac(a,h)}catch(k){Y(a,k),qc(a,k)}}if(e&&f!==d)throw f;if(!l)throw Error(m(426));return g} +exports.renderToNodeStream=function(){throw Error(m(207));};exports.renderToStaticMarkup=function(a,b){return Ic(a,b,!0,'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')};exports.renderToStaticNodeStream=function(){throw Error(m(208));};exports.renderToString=function(a,b){return Ic(a,b,!1,'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')}; +exports.version="18.3.0-next-6ddcbd4f9-20230209"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.development.js index 7b5257332300b..e33b85f115f35 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.development.js @@ -18,7 +18,7 @@ var React = require('react'); var ReactDOM = require('react-dom'); var stream = require('stream'); -var ReactVersion = '18.3.0-next-4fcc9184a-20230217'; +var ReactVersion = '18.3.0-next-6ddcbd4f9-20230209'; var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; @@ -103,29 +103,6 @@ function closeWithError(destination, error) { destination.destroy(error); } -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - - return obj; -} - -function _inheritsLoose(subClass, superClass) { - subClass.prototype = Object.create(superClass.prototype); - subClass.prototype.constructor = subClass; - subClass.__proto__ = superClass; -} - -var assign = Object.assign; - /* * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol * and Temporal.* types. See https://github.com/facebook/react/pull/22064. @@ -540,7 +517,6 @@ var isUnitlessNumber = { opacity: true, order: true, orphans: true, - scale: true, tabSize: true, widows: true, zIndex: true, @@ -1699,1487 +1675,1662 @@ function isArray(a) { return isArrayImpl(a); } -// The build script is at scripts/rollup/generate-inline-fizz-runtime.js. -// Run `yarn generate-inline-fizz-runtime` to generate. -var clientRenderBoundary = '$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};'; -var completeBoundary = '$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};'; -var completeBoundaryWithStyles = '$RM=new Map;\n$RR=function(p,q,w){function r(l){this.s=l}for(var t=$RC,m=$RM,u=new Map,n=new Map,g=document,h,e,f=g.querySelectorAll("template[data-precedence]"),c=0;e=f[c++];){for(var b=e.content.firstChild;b;b=b.nextSibling)u.set(b.getAttribute("data-href"),b);e.parentNode.removeChild(e)}f=g.querySelectorAll("link[data-precedence],style[data-precedence]");for(c=0;e=f[c++];)m.set(e.getAttribute("STYLE"===e.nodeName?"data-href":"href"),e),n.set(e.dataset.precedence,h=e);e=0;f=[];for(var d,\nv,a;d=w[e++];){var k=0;b=d[k++];if(!(a=m.get(b))){if(a=u.get(b))c=a.getAttribute("data-precedence");else{a=g.createElement("link");a.href=b;a.rel="stylesheet";for(a.dataset.precedence=c=d[k++];v=d[k++];)a.setAttribute(v,d[k++]);d=a._p=new Promise(function(l,x){a.onload=l;a.onerror=x});d.then(r.bind(d,"l"),r.bind(d,"e"))}m.set(b,a);b=n.get(c)||h;b===h&&(h=a);n.set(c,a);b?b.parentNode.insertBefore(a,b.nextSibling):(c=g.head,c.insertBefore(a,c.firstChild))}d=a._p;c=a.getAttribute("media");!d||"l"===\nd.s||c&&!matchMedia(c).matches||f.push(d)}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};'; -var completeSegment = '$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};'; - -function getValueDescriptorExpectingObjectForWarning(thing) { - return thing === null ? '`null`' : thing === undefined ? '`undefined`' : thing === '' ? 'an empty string' : "something with type \"" + typeof thing + "\""; -} -function getValueDescriptorExpectingEnumForWarning(thing) { - return thing === null ? '`null`' : thing === undefined ? '`undefined`' : thing === '' ? 'an empty string' : typeof thing === 'string' ? JSON.stringify(thing) : "something with type \"" + typeof thing + "\""; -} +var assign = Object.assign; -function compareResourcePropsForWarning(newProps, currentProps) { +function validatePreloadResourceDifference(originalProps, originalImplicit, latestProps, latestImplicit) { { - var propDiffs = null; - var allProps = Array.from(new Set(Object.keys(currentProps).concat(Object.keys(newProps)))); - - for (var i = 0; i < allProps.length; i++) { - var propName = allProps[i]; - var newValue = newProps[propName]; - var currentValue = currentProps[propName]; - - if (newValue !== currentValue && !(newValue == null && currentValue == null)) { - if (newValue == null) { - if (propDiffs === null) { - propDiffs = { - missing: {}, - extra: {}, - different: {} - }; - } + var href = originalProps.href; + var originalWarningName = getResourceNameForWarning('preload', originalProps, originalImplicit); + var latestWarningName = getResourceNameForWarning('preload', latestProps, latestImplicit); - propDiffs.missing[propName] = currentValue; - } else if (currentValue == null) { - if (propDiffs === null) { - propDiffs = { - missing: {}, - extra: {}, - different: {} - }; - } + if (latestProps.as !== originalProps.as) { + error('A %s is using the same href "%s" as a %s. This is always an error and React will only keep the first preload' + ' for any given href, discarding subsequent instances. To fix, find where you are using this href in link' + ' tags or in calls to ReactDOM.preload() or ReactDOM.preinit() and either make the Resource types agree or' + ' update the hrefs to be distinct for different Resource types.', latestWarningName, href, originalWarningName); + } else { + var missingProps = null; + var extraProps = null; + var differentProps = null; - propDiffs.extra[propName] = newValue; - } else { - if (propDiffs === null) { - propDiffs = { - missing: {}, - extra: {}, - different: {} + if (originalProps.media != null && latestProps.media == null) { + missingProps = missingProps || {}; + missingProps.media = originalProps.media; + } + + for (var propName in latestProps) { + var propValue = latestProps[propName]; + var originalValue = originalProps[propName]; + + if (propValue != null && propValue !== originalValue) { + if (originalValue == null) { + extraProps = extraProps || {}; + extraProps[propName] = propValue; + } else { + differentProps = differentProps || {}; + differentProps[propName] = { + original: originalValue, + latest: propValue }; } + } + } + + if (missingProps || extraProps || differentProps) { + warnDifferentProps(href, 'href', originalWarningName, latestWarningName, extraProps, missingProps, differentProps); + } + } + } +} +function validateStyleResourceDifference(originalProps, latestProps) { + { + var href = originalProps.href; // eslint-disable-next-line no-labels + + var originalWarningName = getResourceNameForWarning('style', originalProps, false); + var latestWarningName = getResourceNameForWarning('style', latestProps, false); + var missingProps = null; + var extraProps = null; + var differentProps = null; + + if (originalProps.media != null && latestProps.media == null) { + missingProps = missingProps || {}; + missingProps.media = originalProps.media; + } + + for (var propName in latestProps) { + var propValue = latestProps[propName]; + var originalValue = originalProps[propName]; + + if (propValue != null && propValue !== originalValue) { + propName = propName === 'data-precedence' ? 'precedence' : propName; - propDiffs.different[propName] = { - original: currentValue, - latest: newValue + if (originalValue == null) { + extraProps = extraProps || {}; + extraProps[propName] = propValue; + } else { + differentProps = differentProps || {}; + differentProps[propName] = { + original: originalValue, + latest: propValue }; } } } - return propDiffs; + if (missingProps || extraProps || differentProps) { + warnDifferentProps(href, 'href', originalWarningName, latestWarningName, extraProps, missingProps, differentProps); + } } } +function validateScriptResourceDifference(originalProps, latestProps) { + { + var src = originalProps.src; // eslint-disable-next-line no-labels -function describeDifferencesForStylesheets(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; + var originalWarningName = getResourceNameForWarning('script', originalProps, false); + var latestWarningName = getResourceNameForWarning('script', latestProps, false); + var extraProps = null; + var differentProps = null; - for (var propName in diff.missing) { - var propValue = diff.missing[propName]; + for (var propName in latestProps) { + var propValue = latestProps[propName]; + var originalValue = originalProps[propName]; - if (propName === 'media') { - description += "\n \"" + propName + "\" missing for props, original value: " + getValueDescriptorExpectingEnumForWarning(propValue); + if (propValue != null && propValue !== originalValue) { + if (originalValue == null) { + extraProps = extraProps || {}; + extraProps[propName] = propValue; + } else { + differentProps = differentProps || {}; + differentProps[propName] = { + original: originalValue, + latest: propValue + }; + } + } } - } - for (var _propName in diff.extra) { - var _propValue = diff.extra[_propName]; - description += "\n \"" + _propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(_propValue) + ", missing from original props"; + if (extraProps || differentProps) { + warnDifferentProps(src, 'src', originalWarningName, latestWarningName, extraProps, null, differentProps); + } } +} +function validateStyleAndHintProps(preloadProps, styleProps, implicitPreload) { + { + var href = preloadProps.href; + var originalWarningName = getResourceNameForWarning('preload', preloadProps, implicitPreload); + var latestWarningName = getResourceNameForWarning('style', styleProps, false); - for (var _propName2 in diff.different) { - var latestValue = diff.different[_propName2].latest; - var originalValue = diff.different[_propName2].original; - description += "\n \"" + _propName2 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", original value: " + getValueDescriptorExpectingEnumForWarning(originalValue); - } + if (preloadProps.as !== 'style') { + error('While creating a %s for href "%s" a %s for this same href was found. When preloading a stylesheet the' + ' "as" prop must be of type "style". This most likely ocurred by rendering a preload link with an incorrect' + ' "as" prop or by calling ReactDOM.preload with an incorrect "as" option.', latestWarningName, href, originalWarningName); + } - return description; -} -function describeDifferencesForStylesheetOverPreinit(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; + var missingProps = null; + var extraProps = null; + var differentProps = null; - for (var propName in diff.extra) { - var propValue = diff.extra[propName]; + for (var propName in styleProps) { + var styleValue = styleProps[propName]; + var preloadValue = preloadProps[propName]; - if (propName === 'precedence' || propName === 'crossOrigin' || propName === 'integrity') { - description += "\n \"" + propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", option missing"; - } else { - description += "\n \"" + propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", option not available with ReactDOM.preinit()"; + switch (propName) { + // Check for difference on specific props that cross over or influence + // the relationship between the preload and stylesheet + case 'crossOrigin': + case 'referrerPolicy': + case 'media': + case 'title': + { + if (preloadValue !== styleValue && !(preloadValue == null && styleValue == null)) { + if (styleValue == null) { + missingProps = missingProps || {}; + missingProps[propName] = preloadValue; + } else if (preloadValue == null) { + extraProps = extraProps || {}; + extraProps[propName] = styleValue; + } else { + differentProps = differentProps || {}; + differentProps[propName] = { + original: preloadValue, + latest: styleValue + }; + } + } + } + } } - } - - for (var _propName3 in diff.different) { - var latestValue = diff.different[_propName3].latest; - var originalValue = diff.different[_propName3].original; - if (_propName3 === 'precedence' && originalValue === 'default') { - description += "\n \"" + _propName3 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", missing from options"; - } else { - description += "\n \"" + _propName3 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", option value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + if (missingProps || extraProps || differentProps) { + warnDifferentProps(href, 'href', originalWarningName, latestWarningName, extraProps, missingProps, differentProps); } } - - return description; } -function describeDifferencesForPreinitOverStylesheet(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; - - for (var propName in diff.missing) { - var propValue = diff.missing[propName]; +function validateScriptAndHintProps(preloadProps, scriptProps, implicitPreload) { + { + var href = preloadProps.href; + var originalWarningName = getResourceNameForWarning('preload', preloadProps, implicitPreload); + var latestWarningName = getResourceNameForWarning('script', scriptProps, false); - if (propName === 'precedence' && propValue !== 'default') { - description += "\n \"" + propName + "\" missing from options, prop value: " + getValueDescriptorExpectingEnumForWarning(propValue); + if (preloadProps.as !== 'script') { + error('While creating a %s for href "%s" a %s for this same url was found. When preloading a script the' + ' "as" prop must be of type "script". This most likely ocurred by rendering a preload link with an incorrect' + ' "as" prop or by calling ReactDOM.preload with an incorrect "as" option.', latestWarningName, href, originalWarningName); } - } - for (var _propName4 in diff.extra) { - var _propValue2 = diff.extra[_propName4]; + var missingProps = null; + var extraProps = null; + var differentProps = null; + + for (var propName in scriptProps) { + var scriptValue = scriptProps[propName]; + var preloadValue = preloadProps[propName]; - if (_propName4 === 'precedence' || _propName4 === 'crossOrigin' || _propName4 === 'integrity') { - description += "\n \"" + _propName4 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(_propValue2) + ", missing from props"; + switch (propName) { + // Check for difference on specific props that cross over or influence + // the relationship between the preload and stylesheet + case 'crossOrigin': + case 'referrerPolicy': + case 'integrity': + { + if (preloadValue !== scriptValue && !(preloadValue == null && scriptValue == null)) { + if (scriptValue == null) { + missingProps = missingProps || {}; + missingProps[propName] = preloadValue; + } else if (preloadValue == null) { + extraProps = extraProps || {}; + extraProps[propName] = scriptValue; + } else { + differentProps = differentProps || {}; + differentProps[propName] = { + original: preloadValue, + latest: scriptValue + }; + } + } + } + } } - } - for (var _propName5 in diff.different) { - var latestValue = diff.different[_propName5].latest; - var originalValue = diff.different[_propName5].original; - description += "\n \"" + _propName5 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", prop value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + if (missingProps || extraProps || differentProps) { + warnDifferentProps(href, 'href', originalWarningName, latestWarningName, extraProps, missingProps, differentProps); + } } - - return description; } -function describeDifferencesForPreinits(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; - for (var propName in diff.missing) { - var propValue = diff.missing[propName]; +function warnDifferentProps(url, urlPropKey, originalName, latestName, extraProps, missingProps, differentProps) { + { + var juxtaposedNameStatement = latestName === originalName ? 'an earlier instance of this Resource' : "a " + originalName + " with the same " + urlPropKey; + var comparisonStatement = ''; - if (propName === 'precedence' && propValue !== 'default') { - description += "\n \"" + propName + "\" missing from options, original option value: " + getValueDescriptorExpectingEnumForWarning(propValue); + if (missingProps !== null && typeof missingProps === 'object') { + for (var propName in missingProps) { + comparisonStatement += "\n " + propName + ": missing or null in latest props, \"" + missingProps[propName] + "\" in original props"; + } } - } - for (var _propName6 in diff.extra) { - var _propValue3 = diff.extra[_propName6]; + if (extraProps !== null && typeof extraProps === 'object') { + for (var _propName in extraProps) { + comparisonStatement += "\n " + _propName + ": \"" + extraProps[_propName] + "\" in latest props, missing or null in original props"; + } + } - if (_propName6 === 'precedence' && _propValue3 !== 'default' || _propName6 === 'crossOrigin' || _propName6 === 'integrity') { - description += "\n \"" + _propName6 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(_propValue3) + ", missing from original options"; + if (differentProps !== null && typeof differentProps === 'object') { + for (var _propName2 in differentProps) { + comparisonStatement += "\n " + _propName2 + ": \"" + differentProps[_propName2].latest + "\" in latest props, \"" + differentProps[_propName2].original + "\" in original props"; + } } - } - for (var _propName7 in diff.different) { - var latestValue = diff.different[_propName7].latest; - var originalValue = diff.different[_propName7].original; - description += "\n \"" + _propName7 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", original option value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + error('A %s with %s "%s" has props that disagree with those found on %s. Resources always use the props' + ' that were provided the first time they are encountered so any differences will be ignored. Please' + ' update Resources that share an %s to have props that agree. The differences are described below.%s', latestName, urlPropKey, url, juxtaposedNameStatement, urlPropKey, comparisonStatement); } - - return description; } -var preloadOptionsForComparison = ['as', 'crossOrigin', 'integrity', 'media']; -function describeDifferencesForPreloads(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; - for (var propName in diff.missing) { - var propValue = diff.missing[propName]; +function getResourceNameForWarning(type, props, implicit) { + { + switch (type) { + case 'style': + { + return 'style Resource'; + } - if (preloadOptionsForComparison.includes(propName)) { - description += "\n \"" + propName + "\" missing from options, original option value: " + getValueDescriptorExpectingEnumForWarning(propValue); - } - } + case 'script': + { + return 'script Resource'; + } - for (var _propName8 in diff.extra) { - var _propValue4 = diff.extra[_propName8]; + case 'preload': + { + if (implicit) { + return "preload for a " + props.as + " Resource"; + } - if (preloadOptionsForComparison.includes(_propName8)) { - description += "\n \"" + _propName8 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(_propValue4) + ", missing from original options"; + return "preload Resource (as \"" + props.as + "\")"; + } } } - for (var _propName9 in diff.different) { - var latestValue = diff.different[_propName9].latest; - var originalValue = diff.different[_propName9].original; + return 'Resource'; +} +function validateLinkPropsForStyleResource(props) { + { + // This should only be called when we know we are opting into Resource semantics (i.e. precedence is not null) + var href = props.href, + onLoad = props.onLoad, + onError = props.onError, + disabled = props.disabled; + var allProps = ['onLoad', 'onError', 'disabled']; + var includedProps = []; + if (onLoad) includedProps.push('onLoad'); + if (onError) includedProps.push('onError'); + if (disabled != null) includedProps.push('disabled'); + var allPropsUnionPhrase = propNamesListJoin(allProps, 'or'); + var includedPropsPhrase = propNamesListJoin(includedProps, 'and'); + includedPropsPhrase += includedProps.length === 1 ? ' prop' : ' props'; + + if (includedProps.length) { + error('A link (rel="stylesheet") element with href "%s" has the precedence prop but also included the %s.' + ' When using %s React will opt out of Resource behavior. If you meant for this' + ' element to be treated as a Resource remove the %s. Otherwise remove the precedence prop.', href, includedPropsPhrase, allPropsUnionPhrase, includedPropsPhrase); - if (preloadOptionsForComparison.includes(_propName9)) { - description += "\n \"" + _propName9 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", original option value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + return true; } } - return description; + return false; } -function describeDifferencesForPreloadOverImplicitPreload(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; - for (var propName in diff.missing) { - var propValue = diff.missing[propName]; +function propNamesListJoin(list, combinator) { + switch (list.length) { + case 0: + return ''; - if (preloadOptionsForComparison.includes(propName)) { - description += "\n \"" + propName + "\" missing from options, underlying prop value: " + getValueDescriptorExpectingEnumForWarning(propValue); - } - } + case 1: + return list[0]; - for (var _propName10 in diff.extra) { - var _propValue5 = diff.extra[_propName10]; + case 2: + return list[0] + ' ' + combinator + ' ' + list[1]; - if (preloadOptionsForComparison.includes(_propName10)) { - description += "\n \"" + _propName10 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(_propValue5) + ", missing from underlying props"; - } + default: + return list.slice(0, -1).join(', ') + ', ' + combinator + ' ' + list[list.length - 1]; } +} + +function validateLinkPropsForPreloadResource(linkProps) { + { + var href = linkProps.href, + as = linkProps.as; - for (var _propName11 in diff.different) { - var latestValue = diff.different[_propName11].latest; - var originalValue = diff.different[_propName11].original; + if (as === 'font') { + var name = getResourceNameForWarning('preload', linkProps, false); - if (preloadOptionsForComparison.includes(_propName11)) { - description += "\n \"" + _propName11 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", underlying prop value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + if (!hasOwnProperty.call(linkProps, 'crossOrigin')) { + error('A %s with href "%s" did not specify the crossOrigin prop. Font preloads must always use' + ' anonymouse CORS mode. To fix add an empty string, "anonymous", or any other string' + ' value except "use-credentials" for the crossOrigin prop of all font preloads.', name, href); + } else if (linkProps.crossOrigin === 'use-credentials') { + error('A %s with href "%s" specified a crossOrigin value of "use-credentials". Font preloads must always use' + ' anonymouse CORS mode. To fix use an empty string, "anonymous", or any other string' + ' value except "use-credentials" for the crossOrigin prop of all font preloads.', name, href); + } } } - - return description; } -function describeDifferencesForScripts(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; +function validatePreloadArguments(href, options) { + { + if (!href || typeof href !== 'string') { + var typeOfArg = getValueDescriptorExpectingObjectForWarning(href); - for (var propName in diff.missing) { - var propValue = diff.missing[propName]; - description += "\n \"" + propName + "\" missing for props, original value: " + getValueDescriptorExpectingEnumForWarning(propValue); - } + error('ReactDOM.preload() expected the first argument to be a string representing an href but found %s instead.', typeOfArg); + } else if (typeof options !== 'object' || options === null) { + var _typeOfArg = getValueDescriptorExpectingObjectForWarning(options); - for (var _propName12 in diff.extra) { - var _propValue6 = diff.extra[_propName12]; - description += "\n \"" + _propName12 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(_propValue6) + ", missing from original props"; - } + error('ReactDOM.preload() expected the second argument to be an options argument containing at least an "as" property' + ' specifying the Resource type. It found %s instead. The href for the preload call where this warning originated is "%s".', _typeOfArg, href); + } else { + var as = options.as; - for (var _propName13 in diff.different) { - var latestValue = diff.different[_propName13].latest; - var originalValue = diff.different[_propName13].original; - description += "\n \"" + _propName13 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", original value: " + getValueDescriptorExpectingEnumForWarning(originalValue); - } + switch (as) { + // Font specific validation of options + case 'font': + { + if (options.crossOrigin === 'use-credentials') { + error('ReactDOM.preload() was called with an "as" type of "font" and with a "crossOrigin" option of "use-credentials".' + ' Fonts preloading must use crossOrigin "anonymous" to be functional. Please update your font preload to omit' + ' the crossOrigin option or change it to any other value than "use-credentials" (Browsers default all other values' + ' to anonymous mode). The href for the preload call where this warning originated is "%s"', href); + } - return description; -} -function describeDifferencesForScriptOverPreinit(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; + break; + } - for (var propName in diff.extra) { - var propValue = diff.extra[propName]; + case 'script': + case 'style': + { + break; + } + // We have an invalid as type and need to warn - if (propName === 'crossOrigin' || propName === 'integrity') { - description += "\n \"" + propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", option missing"; - } else { - description += "\n \"" + propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", option not available with ReactDOM.preinit()"; + default: + { + var typeOfAs = getValueDescriptorExpectingEnumForWarning(as); + + error('ReactDOM.preload() expected a valid "as" type in the options (second) argument but found %s instead.' + ' Please use one of the following valid values instead: %s. The href for the preload call where this' + ' warning originated is "%s".', typeOfAs, '"style", "font", or "script"', href); + } + } } } +} +function validatePreinitArguments(href, options) { + { + if (!href || typeof href !== 'string') { + var typeOfArg = getValueDescriptorExpectingObjectForWarning(href); - for (var _propName14 in diff.different) { - var latestValue = diff.different[_propName14].latest; - var originalValue = diff.different[_propName14].original; - description += "\n \"" + _propName14 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", option value: " + getValueDescriptorExpectingEnumForWarning(originalValue); - } + error('ReactDOM.preinit() expected the first argument to be a string representing an href but found %s instead.', typeOfArg); + } else if (typeof options !== 'object' || options === null) { + var _typeOfArg2 = getValueDescriptorExpectingObjectForWarning(options); - return description; -} -function describeDifferencesForPreinitOverScript(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; + error('ReactDOM.preinit() expected the second argument to be an options argument containing at least an "as" property' + ' specifying the Resource type. It found %s instead. The href for the preload call where this warning originated is "%s".', _typeOfArg2, href); + } else { + var as = options.as; + + switch (as) { + case 'style': + case 'script': + { + break; + } + // We have an invalid as type and need to warn - for (var propName in diff.extra) { - var propValue = diff.extra[propName]; + default: + { + var typeOfAs = getValueDescriptorExpectingEnumForWarning(as); - if (propName === 'crossOrigin' || propName === 'integrity') { - description += "\n \"" + propName + "\" option value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", missing from props"; + error('ReactDOM.preinit() expected the second argument to be an options argument containing at least an "as" property' + ' specifying the Resource type. It found %s instead. Currently, valid resource types for for preinit are "style"' + ' and "script". The href for the preinit call where this warning originated is "%s".', typeOfAs, href); + } + } } } +} - for (var _propName15 in diff.different) { - var latestValue = diff.different[_propName15].latest; - var originalValue = diff.different[_propName15].original; - description += "\n \"" + _propName15 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", prop value: " + getValueDescriptorExpectingEnumForWarning(originalValue); - } - - return description; +function getValueDescriptorExpectingObjectForWarning(thing) { + return thing === null ? 'null' : thing === undefined ? 'undefined' : thing === '' ? 'an empty string' : "something with type \"" + typeof thing + "\""; } -var ReactDOMSharedInternals = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; +function getValueDescriptorExpectingEnumForWarning(thing) { + return thing === null ? 'null' : thing === undefined ? 'undefined' : thing === '' ? 'an empty string' : typeof thing === 'string' ? JSON.stringify(thing) : "something with type \"" + typeof thing + "\""; +} -var ReactDOMCurrentDispatcher = ReactDOMSharedInternals.Dispatcher; -var ReactDOMServerDispatcher = { - preload: preload, - preinit: preinit -} ; +function createResources() { + return { + // persistent + preloadsMap: new Map(), + stylesMap: new Map(), + scriptsMap: new Map(), + headsMap: new Map(), + // cleared on flush + charset: null, + bases: new Set(), + preconnects: new Set(), + fontPreloads: new Set(), + // usedImagePreloads: new Set(), + precedences: new Map(), + usedStylePreloads: new Set(), + scripts: new Set(), + usedScriptPreloads: new Set(), + explicitStylePreloads: new Set(), + // explicitImagePreloads: new Set(), + explicitScriptPreloads: new Set(), + headResources: new Set(), + // cache for tracking structured meta tags + structuredMetaKeys: new Map(), + // like a module global for currently rendering boundary + boundaryResources: null + }; +} +function createBoundaryResources() { + return new Set(); +} var currentResources = null; var currentResourcesStack = []; -function prepareToRender(resources) { +function prepareToRenderResources(resources) { currentResourcesStack.push(currentResources); currentResources = resources; - var previousHostDispatcher = ReactDOMCurrentDispatcher.current; - ReactDOMCurrentDispatcher.current = ReactDOMServerDispatcher; - return previousHostDispatcher; } -function cleanupAfterRender(previousDispatcher) { +function finishRenderingResources() { currentResources = currentResourcesStack.pop(); - ReactDOMCurrentDispatcher.current = previousDispatcher; -} // Used to distinguish these contexts from ones used in other renderers. -var ScriptStreamingFormat = 0; -var NothingSent -/* */ -= 0; -var SentCompleteSegmentFunction -/* */ -= 1; -var SentCompleteBoundaryFunction -/* */ -= 2; -var SentClientRenderFunction -/* */ -= 4; -var SentStyleInsertionFunction -/* */ -= 8; // Per response, global state that is not contextual to the rendering subtree. -var startInlineScript = stringToPrecomputedChunk('<script>'); -var endInlineScript = stringToPrecomputedChunk('</script>'); -var startScriptSrc = stringToPrecomputedChunk('<script src="'); -var startModuleSrc = stringToPrecomputedChunk('<script type="module" src="'); -var scriptIntegirty = stringToPrecomputedChunk('" integrity="'); -var endAsyncScript = stringToPrecomputedChunk('" async=""></script>'); -/** - * This escaping function is designed to work with bootstrapScriptContent only. - * because we know we are escaping the entire script. We can avoid for instance - * escaping html comment string sequences that are valid javascript as well because - * if there are no sebsequent <script sequences the html parser will never enter - * script data double escaped state (see: https://www.w3.org/TR/html53/syntax.html#script-data-double-escaped-state) - * - * While untrusted script content should be made safe before using this api it will - * ensure that the script cannot be early terminated or never terminated state - */ +} +function setCurrentlyRenderingBoundaryResourcesTarget(resources, boundaryResources) { + resources.boundaryResources = boundaryResources; +} +var ReactDOMServerFloatDispatcher = { + preload: preload, + preinit: preinit +}; -function escapeBootstrapScriptContent(scriptText) { - { - checkHtmlStringCoercion(scriptText); +function preload(href, options) { + if (!currentResources) { + // While we expect that preload calls are primarily going to be observed + // during render because effects and events don't run on the server it is + // still possible that these get called in module scope. This is valid on + // the client since there is still a document to interact with but on the + // server we need a request to associate the call to. Because of this we + // simply return and do not warn. + return; } - return ('' + scriptText).replace(scriptRegex, scriptReplacer); -} + var resources = currentResources; -var scriptRegex = /(<\/|<)(s)(cript)/gi; + { + validatePreloadArguments(href, options); + } -var scriptReplacer = function (match, prefix, s, suffix) { - return "" + prefix + (s === 's' ? "\\u0073" : "\\u0053") + suffix; -}; // Allows us to keep track of what we've already written so we can refer back to it. -// if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag -// is set, the server will send instructions via data attributes (instead of inline scripts) + if (typeof href === 'string' && href && typeof options === 'object' && options !== null) { + var as = options.as; + var resource = resources.preloadsMap.get(href); + if (resource) { + { + var originallyImplicit = resource._dev_implicit_construction === true; + var latestProps = preloadPropsFromPreloadOptions(href, as, options); + validatePreloadResourceDifference(resource.props, originallyImplicit, latestProps, false); + } + } else { + resource = createPreloadResource(resources, href, as, preloadPropsFromPreloadOptions(href, as, options)); + } -function createResponseState(identifierPrefix, nonce, bootstrapScriptContent, bootstrapScripts, bootstrapModules, externalRuntimeConfig) { - var idPrefix = identifierPrefix === undefined ? '' : identifierPrefix; - var inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk('<script nonce="' + escapeTextForBrowser(nonce) + '">'); - var bootstrapChunks = []; - var externalRuntimeDesc = null; - var streamingFormat = ScriptStreamingFormat; + switch (as) { + case 'font': + { + resources.fontPreloads.add(resource); + break; + } - if (bootstrapScriptContent !== undefined) { - bootstrapChunks.push(inlineScriptWithNonce, stringToChunk(escapeBootstrapScriptContent(bootstrapScriptContent)), endInlineScript); + case 'style': + { + resources.explicitStylePreloads.add(resource); + break; + } + + case 'script': + { + resources.explicitScriptPreloads.add(resource); + break; + } + } } +} - if (bootstrapScripts !== undefined) { - for (var i = 0; i < bootstrapScripts.length; i++) { - var scriptConfig = bootstrapScripts[i]; - var src = typeof scriptConfig === 'string' ? scriptConfig : scriptConfig.src; - var integrity = typeof scriptConfig === 'string' ? undefined : scriptConfig.integrity; - bootstrapChunks.push(startScriptSrc, stringToChunk(escapeTextForBrowser(src))); +function preinit(href, options) { + if (!currentResources) { + // While we expect that preinit calls are primarily going to be observed + // during render because effects and events don't run on the server it is + // still possible that these get called in module scope. This is valid on + // the client since there is still a document to interact with but on the + // server we need a request to associate the call to. Because of this we + // simply return and do not warn. + return; + } - if (integrity) { - bootstrapChunks.push(scriptIntegirty, stringToChunk(escapeTextForBrowser(integrity))); - } + preinitImpl(currentResources, href, options); +} // On the server, preinit may be called outside of render when sending an +// external SSR runtime as part of the initial resources payload. Since this +// is an internal React call, we do not need to use the resources stack. - bootstrapChunks.push(endAsyncScript); - } + +function preinitImpl(resources, href, options) { + { + validatePreinitArguments(href, options); } - if (bootstrapModules !== undefined) { - for (var _i = 0; _i < bootstrapModules.length; _i++) { - var _scriptConfig = bootstrapModules[_i]; + if (typeof href === 'string' && href && typeof options === 'object' && options !== null) { + var as = options.as; - var _src = typeof _scriptConfig === 'string' ? _scriptConfig : _scriptConfig.src; + switch (as) { + case 'style': + { + var resource = resources.stylesMap.get(href); - var _integrity = typeof _scriptConfig === 'string' ? undefined : _scriptConfig.integrity; + if (resource) { + { + var latestProps = stylePropsFromPreinitOptions(href, resource.precedence, options); + validateStyleResourceDifference(resource.props, latestProps); + } + } else { + var precedence = options.precedence || 'default'; + var resourceProps = stylePropsFromPreinitOptions(href, precedence, options); + resource = createStyleResource(resources, href, precedence, resourceProps); + } - bootstrapChunks.push(startModuleSrc, stringToChunk(escapeTextForBrowser(_src))); + resource.set.add(resource); + resources.explicitStylePreloads.add(resource.hint); + return; + } - if (_integrity) { - bootstrapChunks.push(scriptIntegirty, stringToChunk(escapeTextForBrowser(_integrity))); - } + case 'script': + { + var src = href; - bootstrapChunks.push(endAsyncScript); + var _resource = resources.scriptsMap.get(src); + + if (_resource) { + { + var _latestProps = scriptPropsFromPreinitOptions(src, options); + + validateScriptResourceDifference(_resource.props, _latestProps); + } + } else { + var scriptProps = scriptPropsFromPreinitOptions(src, options); + _resource = createScriptResource(resources, src, scriptProps); + resources.scripts.add(_resource); + } + + return; + } } } +} +function preloadPropsFromPreloadOptions(href, as, options) { return { - bootstrapChunks: bootstrapChunks, - placeholderPrefix: stringToPrecomputedChunk(idPrefix + 'P:'), - segmentPrefix: stringToPrecomputedChunk(idPrefix + 'S:'), - boundaryPrefix: idPrefix + 'B:', - idPrefix: idPrefix, - nextSuspenseID: 0, - streamingFormat: streamingFormat, - startInlineScript: inlineScriptWithNonce, - instructions: NothingSent, - externalRuntimeConfig: externalRuntimeDesc, - htmlChunks: null, - headChunks: null, - hasBody: false, - charsetChunks: [], - preconnectChunks: [], - preloadChunks: [], - hoistableChunks: [] + href: href, + rel: 'preload', + as: as, + crossOrigin: as === 'font' ? '' : options.crossOrigin, + integrity: options.integrity }; -} // Constants for the insertion mode we're currently writing in. We don't encode all HTML5 insertion -// modes. We only include the variants as they matter for the sake of our purposes. -// We don't actually provide the namespace therefore we use constants instead of the string. +} -var ROOT_HTML_MODE = 0; // Used for the root most element tag. -// We have a less than HTML_HTML_MODE check elsewhere. If you add more cases here, make sure it -// still makes sense +function preloadPropsFromRawProps(href, as, rawProps) { + var props = assign({}, rawProps); -var HTML_HTML_MODE = 1; // Used for the <html> if it is at the top level. + props.href = href; + props.rel = 'preload'; + props.as = as; -var HTML_MODE = 2; -var SVG_MODE = 3; -var MATHML_MODE = 4; -var HTML_TABLE_MODE = 5; -var HTML_TABLE_BODY_MODE = 6; -var HTML_TABLE_ROW_MODE = 7; -var HTML_COLGROUP_MODE = 8; // We have a greater than HTML_TABLE_MODE check elsewhere. If you add more cases here, make sure it -// still makes sense -// Lets us keep track of contextual state and pick it back up after suspending. + if (as === 'font') { + // Font preloads always need CORS anonymous mode so we set it here + // regardless of the props provided. This should warn elsewhere in + // dev + props.crossOrigin = ''; + } -function createFormatContext(insertionMode, selectedValue, noscriptTagInScope) { + return props; +} + +function preloadAsStylePropsFromProps(href, props) { return { - insertionMode: insertionMode, - selectedValue: selectedValue, - noscriptTagInScope: noscriptTagInScope + rel: 'preload', + as: 'style', + href: href, + crossOrigin: props.crossOrigin, + integrity: props.integrity, + media: props.media, + hrefLang: props.hrefLang, + referrerPolicy: props.referrerPolicy }; } -function getChildFormatContext(parentContext, type, props) { - switch (type) { - case 'noscript': - return createFormatContext(HTML_MODE, null, true); - case 'select': - return createFormatContext(HTML_MODE, props.value != null ? props.value : props.defaultValue, parentContext.noscriptTagInScope); +function preloadAsScriptPropsFromProps(href, props) { + return { + rel: 'preload', + as: 'script', + href: href, + crossOrigin: props.crossOrigin, + integrity: props.integrity, + referrerPolicy: props.referrerPolicy + }; +} - case 'svg': - return createFormatContext(SVG_MODE, null, parentContext.noscriptTagInScope); +function createPreloadResource(resources, href, as, props) { + var preloadsMap = resources.preloadsMap; - case 'math': - return createFormatContext(MATHML_MODE, null, parentContext.noscriptTagInScope); + { + if (preloadsMap.has(href)) { + error('createPreloadResource was called when a preload Resource matching the same href already exists. This is a bug in React.'); + } + } - case 'foreignObject': - return createFormatContext(HTML_MODE, null, parentContext.noscriptTagInScope); - // Table parents are special in that their children can only be created at all if they're - // wrapped in a table parent. So we need to encode that we're entering this mode. + var resource = { + type: 'preload', + as: as, + href: href, + flushed: false, + props: props + }; + preloadsMap.set(href, resource); + return resource; +} - case 'table': - return createFormatContext(HTML_TABLE_MODE, null, parentContext.noscriptTagInScope); +function stylePropsFromRawProps(href, precedence, rawProps) { + var props = assign({}, rawProps); - case 'thead': - case 'tbody': - case 'tfoot': - return createFormatContext(HTML_TABLE_BODY_MODE, null, parentContext.noscriptTagInScope); + props.href = href; + props.rel = 'stylesheet'; + props['data-precedence'] = precedence; + delete props.precedence; + return props; +} - case 'colgroup': - return createFormatContext(HTML_COLGROUP_MODE, null, parentContext.noscriptTagInScope); +function stylePropsFromPreinitOptions(href, precedence, options) { + return { + rel: 'stylesheet', + href: href, + 'data-precedence': precedence, + crossOrigin: options.crossOrigin + }; +} - case 'tr': - return createFormatContext(HTML_TABLE_ROW_MODE, null, parentContext.noscriptTagInScope); +function createStyleResource(resources, href, precedence, props) { + { + if (resources.stylesMap.has(href)) { + error('createStyleResource was called when a style Resource matching the same href already exists. This is a bug in React.'); + } } - if (parentContext.insertionMode >= HTML_TABLE_MODE) { - // Whatever tag this was, it wasn't a table parent or other special parent, so we must have - // entered plain HTML again. - return createFormatContext(HTML_MODE, null, parentContext.noscriptTagInScope); + var stylesMap = resources.stylesMap, + preloadsMap = resources.preloadsMap, + precedences = resources.precedences; // If this is the first time we've seen this precedence we encode it's position in our set even though + // we don't add the resource to this set yet + + var precedenceSet = precedences.get(precedence); + + if (!precedenceSet) { + precedenceSet = new Set(); + precedences.set(precedence, precedenceSet); } - if (parentContext.insertionMode === ROOT_HTML_MODE) { - if (type === 'html') { - // We've emitted the root and is now in <html> mode. - return createFormatContext(HTML_HTML_MODE, null, false); - } else { - // We've emitted the root and is now in plain HTML mode. - return createFormatContext(HTML_MODE, null, false); + var hint = preloadsMap.get(href); + + if (hint) { + // If a preload for this style Resource already exists there are certain props we want to adopt + // on the style Resource, primarily focussed on making sure the style network pathways utilize + // the preload pathways. For instance if you have diffreent crossOrigin attributes for a preload + // and a stylesheet the stylesheet will make a new request even if the preload had already loaded + adoptPreloadPropsForStyleProps(props, hint.props); + + { + validateStyleAndHintProps(hint.props, props, hint._dev_implicit_construction); + } + } else { + var preloadResourceProps = preloadAsStylePropsFromProps(href, props); + hint = createPreloadResource(resources, href, 'style', preloadResourceProps); + + { + hint._dev_implicit_construction = true; } - } else if (parentContext.insertionMode === HTML_HTML_MODE) { - // We've emitted the document element and is now in plain HTML mode. - return createFormatContext(HTML_MODE, null, false); + + resources.explicitStylePreloads.add(hint); } - return parentContext; -} -var UNINITIALIZED_SUSPENSE_BOUNDARY_ID = null; -function assignSuspenseBoundaryID(responseState) { - var generatedID = responseState.nextSuspenseID++; - return stringToPrecomputedChunk(responseState.boundaryPrefix + generatedID.toString(16)); + var resource = { + type: 'style', + href: href, + precedence: precedence, + flushed: false, + inShell: false, + props: props, + hint: hint, + set: precedenceSet + }; + stylesMap.set(href, resource); + return resource; } -function makeId(responseState, treeId, localId) { - var idPrefix = responseState.idPrefix; - var id = ':' + idPrefix + 'R' + treeId; // Unless this is the first id at this level, append a number at the end - // that represents the position of this useId hook among all the useId - // hooks for this fiber. - if (localId > 0) { - id += 'H' + localId.toString(32); - } +function adoptPreloadPropsForStyleProps(resourceProps, preloadProps) { + if (resourceProps.crossOrigin == null) resourceProps.crossOrigin = preloadProps.crossOrigin; + if (resourceProps.referrerPolicy == null) resourceProps.referrerPolicy = preloadProps.referrerPolicy; + if (resourceProps.title == null) resourceProps.title = preloadProps.title; +} - return id + ':'; +function scriptPropsFromPreinitOptions(src, options) { + return { + src: src, + async: true, + crossOrigin: options.crossOrigin, + integrity: options.integrity + }; } -function encodeHTMLTextNode(text) { - return escapeTextForBrowser(text); +function scriptPropsFromRawProps(src, rawProps) { + var props = assign({}, rawProps); + + props.src = src; + return props; } -var textSeparator = stringToPrecomputedChunk('<!-- -->'); -function pushTextInstance(target, text, responseState, textEmbedded) { - if (text === '') { - // Empty text doesn't have a DOM node representation and the hydration is aware of this. - return textEmbedded; +function createScriptResource(resources, src, props) { + { + if (resources.scriptsMap.has(src)) { + error('createScriptResource was called when a script Resource matching the same src already exists. This is a bug in React.'); + } } - if (textEmbedded) { - target.push(textSeparator); - } + var scriptsMap = resources.scriptsMap, + preloadsMap = resources.preloadsMap; + var hint = preloadsMap.get(src); - target.push(stringToChunk(encodeHTMLTextNode(text))); - return true; -} // Called when Fizz is done with a Segment. Currently the only purpose is to conditionally -// emit a text separator when we don't know for sure it is safe to omit + if (hint) { + // If a preload for this style Resource already exists there are certain props we want to adopt + // on the style Resource, primarily focussed on making sure the style network pathways utilize + // the preload pathways. For instance if you have diffreent crossOrigin attributes for a preload + // and a stylesheet the stylesheet will make a new request even if the preload had already loaded + adoptPreloadPropsForScriptProps(props, hint.props); -function pushSegmentFinale(target, responseState, lastPushedText, textEmbedded) { - if (lastPushedText && textEmbedded) { - target.push(textSeparator); - } -} -var styleNameCache = new Map(); + { + validateScriptAndHintProps(hint.props, props, hint._dev_implicit_construction); + } + } else { + var preloadResourceProps = preloadAsScriptPropsFromProps(src, props); + hint = createPreloadResource(resources, src, 'script', preloadResourceProps); -function processStyleName(styleName) { - var chunk = styleNameCache.get(styleName); + { + hint._dev_implicit_construction = true; + } - if (chunk !== undefined) { - return chunk; + resources.explicitScriptPreloads.add(hint); } - var result = stringToPrecomputedChunk(escapeTextForBrowser(hyphenateStyleName(styleName))); - styleNameCache.set(styleName, result); - return result; + var resource = { + type: 'script', + src: src, + flushed: false, + props: props, + hint: hint + }; + scriptsMap.set(src, resource); + return resource; } -var styleAttributeStart = stringToPrecomputedChunk(' style="'); -var styleAssign = stringToPrecomputedChunk(':'); -var styleSeparator = stringToPrecomputedChunk(';'); +function adoptPreloadPropsForScriptProps(resourceProps, preloadProps) { + if (resourceProps.crossOrigin == null) resourceProps.crossOrigin = preloadProps.crossOrigin; + if (resourceProps.referrerPolicy == null) resourceProps.referrerPolicy = preloadProps.referrerPolicy; + if (resourceProps.integrity == null) resourceProps.integrity = preloadProps.integrity; +} -function pushStyleAttribute(target, style) { - if (typeof style !== 'object') { - throw new Error('The `style` prop expects a mapping from style properties to values, ' + "not a string. For example, style={{marginRight: spacing + 'em'}} when " + 'using JSX.'); - } +function titlePropsFromRawProps(child, rawProps) { + var props = assign({}, rawProps); - var isFirst = true; + props.children = child; + return props; +} - for (var styleName in style) { - if (!hasOwnProperty.call(style, styleName)) { - continue; - } // If you provide unsafe user data here they can inject arbitrary CSS - // which may be problematic (I couldn't repro this): - // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet - // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/ - // This is not an XSS hole but instead a potential CSS injection issue - // which has lead to a greater discussion about how we're going to - // trust URLs moving forward. See #2115901 +function resourcesFromElement(type, props) { + if (!currentResources) { + throw new Error('"currentResources" was expected to exist. This is a bug in React.'); + } + var resources = currentResources; - var styleValue = style[styleName]; + switch (type) { + case 'title': + { + var children = props.children; + var child; - if (styleValue == null || typeof styleValue === 'boolean' || styleValue === '') { - // TODO: We used to set empty string as a style with an empty value. Does that ever make sense? - continue; - } + if (Array.isArray(children)) { + child = children.length === 1 ? children[0] : null; + } else { + child = children; + } - var nameChunk = void 0; - var valueChunk = void 0; - var isCustomProperty = styleName.indexOf('--') === 0; + if (typeof child !== 'function' && typeof child !== 'symbol' && child !== null && child !== undefined) { + // eslint-disable-next-line react-internal/safe-string-coercion + var childString = '' + child; + var key = 'title::' + childString; + var resource = resources.headsMap.get(key); - if (isCustomProperty) { - nameChunk = stringToChunk(escapeTextForBrowser(styleName)); + if (!resource) { + resource = { + type: 'title', + props: titlePropsFromRawProps(childString, props), + flushed: false + }; + resources.headsMap.set(key, resource); + resources.headResources.add(resource); + } + } - { - checkCSSPropertyStringCoercion(styleValue, styleName); + return true; } - valueChunk = stringToChunk(escapeTextForBrowser(('' + styleValue).trim())); - } else { + case 'meta': { - warnValidStyle$1(styleName, styleValue); - } + var _key, propertyPath; + + if (typeof props.charSet === 'string') { + _key = 'charSet'; + } else if (typeof props.content === 'string') { + var contentKey = '::' + props.content; + + if (typeof props.httpEquiv === 'string') { + _key = 'httpEquiv::' + props.httpEquiv + contentKey; + } else if (typeof props.name === 'string') { + _key = 'name::' + props.name + contentKey; + } else if (typeof props.itemProp === 'string') { + _key = 'itemProp::' + props.itemProp + contentKey; + } else if (typeof props.property === 'string') { + var property = props.property; + _key = 'property::' + property + contentKey; + propertyPath = property; + var parentPath = property.split(':').slice(0, -1).join(':'); + var parentResource = resources.structuredMetaKeys.get(parentPath); + + if (parentResource) { + _key = parentResource.key + '::child::' + _key; + } + } + } - nameChunk = processStyleName(styleName); + if (_key) { + if (!resources.headsMap.has(_key)) { + var _resource2 = { + type: 'meta', + key: _key, + props: assign({}, props), + flushed: false + }; + resources.headsMap.set(_key, _resource2); - if (typeof styleValue === 'number') { - if (styleValue !== 0 && !hasOwnProperty.call(isUnitlessNumber, styleName)) { - valueChunk = stringToChunk(styleValue + 'px'); // Presumes implicit 'px' suffix for unitless numbers - } else { - valueChunk = stringToChunk('' + styleValue); + if (_key === 'charSet') { + resources.charset = _resource2; + } else { + if (propertyPath) { + resources.structuredMetaKeys.set(propertyPath, _resource2); + } + + resources.headResources.add(_resource2); + } + } } - } else { - { - checkCSSPropertyStringCoercion(styleValue, styleName); + + return true; + } + + case 'base': + { + var target = props.target, + href = props.href; // We mirror the key construction on the client since we will likely unify + // this code in the future to better guarantee key semantics are identical + // in both environments + + var _key2 = 'base'; + _key2 += typeof href === 'string' ? "[href=\"" + href + "\"]" : ':not([href])'; + _key2 += typeof target === 'string' ? "[target=\"" + target + "\"]" : ':not([target])'; + + if (!resources.headsMap.has(_key2)) { + var _resource3 = { + type: 'base', + props: assign({}, props), + flushed: false + }; + resources.headsMap.set(_key2, _resource3); + resources.bases.add(_resource3); } - valueChunk = stringToChunk(escapeTextForBrowser(('' + styleValue).trim())); + return true; } - } + } - if (isFirst) { - isFirst = false; // If it's first, we don't need any separators prefixed. + return false; +} // Construct a resource from link props. - target.push(styleAttributeStart, nameChunk, styleAssign, valueChunk); - } else { - target.push(styleSeparator, nameChunk, styleAssign, valueChunk); - } +function resourcesFromLink(props) { + if (!currentResources) { + throw new Error('"currentResources" was expected to exist. This is a bug in React.'); } - if (!isFirst) { - target.push(attributeEnd); + var resources = currentResources; + var rel = props.rel, + href = props.href; + + if (!href || typeof href !== 'string' || !rel || typeof rel !== 'string') { + return false; } -} -var attributeSeparator = stringToPrecomputedChunk(' '); -var attributeAssign = stringToPrecomputedChunk('="'); -var attributeEnd = stringToPrecomputedChunk('"'); -var attributeEmptyString = stringToPrecomputedChunk('=""'); + var key = ''; -function pushAttribute(target, name, value) // not null or undefined -{ - switch (name) { - case 'style': + switch (rel) { + case 'stylesheet': { - pushStyleAttribute(target, value); - return; - } + var onLoad = props.onLoad, + onError = props.onError, + precedence = props.precedence, + disabled = props.disabled; + + if (typeof precedence !== 'string' || onLoad || onError || disabled != null) { + // This stylesheet is either not opted into Resource semantics or has conflicting properties which + // disqualify it for such. We can still create a preload resource to help it load faster on the + // client + { + validateLinkPropsForStyleResource(props); + } - case 'defaultValue': - case 'defaultChecked': // These shouldn't be set as attributes on generic HTML elements. + var preloadResource = resources.preloadsMap.get(href); - case 'innerHTML': // Must use dangerouslySetInnerHTML instead. + if (!preloadResource) { + preloadResource = createPreloadResource(resources, href, 'style', preloadAsStylePropsFromProps(href, props)); - case 'suppressContentEditableWarning': - case 'suppressHydrationWarning': - // Ignored. These are built-in to React on the client. - return; - } + { + preloadResource._dev_implicit_construction = true; + } - if ( // shouldIgnoreAttribute - // We have already filtered out null/undefined and reserved words. - name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) { - return; - } + resources.usedStylePreloads.add(preloadResource); + } - var propertyInfo = getPropertyInfo(name); + return false; + } else { + // We are able to convert this link element to a resource exclusively. We construct the relevant Resource + // and return true indicating that this link was fully consumed. + var _resource4 = resources.stylesMap.get(href); - if (propertyInfo !== null) { - // shouldRemoveAttribute - switch (typeof value) { - case 'function': - case 'symbol': - // eslint-disable-line - return; + if (_resource4) { + { + var resourceProps = stylePropsFromRawProps(href, precedence, props); + adoptPreloadPropsForStyleProps(resourceProps, _resource4.hint.props); + validateStyleResourceDifference(_resource4.props, resourceProps); + } + } else { + var _resourceProps = stylePropsFromRawProps(href, precedence, props); - case 'boolean': - { - if (!propertyInfo.acceptsBooleans) { - return; + _resource4 = createStyleResource( // $FlowFixMe[incompatible-call] found when upgrading Flow + currentResources, href, precedence, _resourceProps); + resources.usedStylePreloads.add(_resource4.hint); } - } - } - var attributeName = propertyInfo.attributeName; - var attributeNameChunk = stringToChunk(attributeName); // TODO: If it's known we can cache the chunk. + if (resources.boundaryResources) { + resources.boundaryResources.add(_resource4); + } else { + _resource4.set.add(_resource4); + } - switch (propertyInfo.type) { - case BOOLEAN: - if (value) { - target.push(attributeSeparator, attributeNameChunk, attributeEmptyString); + return true; } + } - return; + case 'preload': + { + var as = props.as; - case OVERLOADED_BOOLEAN: - if (value === true) { - target.push(attributeSeparator, attributeNameChunk, attributeEmptyString); - } else if (value === false) ; else { - target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); - } + switch (as) { + case 'script': + case 'style': + case 'font': + { + { + validateLinkPropsForPreloadResource(props); + } - return; + var _resource5 = resources.preloadsMap.get(href); - case NUMERIC: - if (!isNaN(value)) { - target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); - } + if (_resource5) { + { + var originallyImplicit = _resource5._dev_implicit_construction === true; + var latestProps = preloadPropsFromRawProps(href, as, props); + validatePreloadResourceDifference(_resource5.props, originallyImplicit, latestProps, false); + } + } else { + _resource5 = createPreloadResource(resources, href, as, preloadPropsFromRawProps(href, as, props)); + + switch (as) { + case 'script': + { + resources.explicitScriptPreloads.add(_resource5); + break; + } - break; + case 'style': + { + resources.explicitStylePreloads.add(_resource5); + break; + } - case POSITIVE_NUMERIC: - if (!isNaN(value) && value >= 1) { - target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); + case 'font': + { + resources.fontPreloads.add(_resource5); + break; + } + } + } + + return true; + } } break; + } + } - default: - if (propertyInfo.sanitizeURL) { - { - checkAttributeStringCoercion(value, attributeName); - } + if (props.onLoad || props.onError) { + // When a link has these props we can't treat it is a Resource but if we rendered it on the + // server it would look like a Resource in the rendered html (the onLoad/onError aren't emitted) + // Instead we expect the client to insert them rather than hydrate them which also guarantees + // that the onLoad and onError won't fire before the event handlers are attached + return true; + } - value = '' + value; - sanitizeURL(value); - } + var sizes = typeof props.sizes === 'string' ? props.sizes : ''; + var media = typeof props.media === 'string' ? props.media : ''; + key = 'rel:' + rel + '::href:' + href + '::sizes:' + sizes + '::media:' + media; + var resource = resources.headsMap.get(key); - target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); - } - } else if (isAttributeNameSafe(name)) { - // shouldRemoveAttribute - switch (typeof value) { - case 'function': - case 'symbol': - // eslint-disable-line - return; + if (!resource) { + resource = { + type: 'link', + props: assign({}, props), + flushed: false + }; + resources.headsMap.set(key, resource); - case 'boolean': + switch (rel) { + case 'preconnect': + case 'dns-prefetch': { - var prefix = name.toLowerCase().slice(0, 5); + resources.preconnects.add(resource); + break; + } - if (prefix !== 'data-' && prefix !== 'aria-') { - return; - } + default: + { + resources.headResources.add(resource); } } - - target.push(attributeSeparator, stringToChunk(name), attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); } -} - -var endOfStartTag = stringToPrecomputedChunk('>'); -var endOfStartTagSelfClosing = stringToPrecomputedChunk('/>'); - -function pushInnerHTML(target, innerHTML, children) { - if (innerHTML != null) { - if (children != null) { - throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.'); - } - if (typeof innerHTML !== 'object' || !('__html' in innerHTML)) { - throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' + 'for more information.'); - } + return true; +} // Construct a resource from link props. - var html = innerHTML.__html; +function resourcesFromScript(props) { + if (!currentResources) { + throw new Error('"currentResources" was expected to exist. This is a bug in React.'); + } - if (html !== null && html !== undefined) { - { - checkHtmlStringCoercion(html); - } + var resources = currentResources; + var src = props.src, + async = props.async, + onLoad = props.onLoad, + onError = props.onError; - target.push(stringToChunk('' + html)); - } + if (!src || typeof src !== 'string') { + return false; } -} // TODO: Move these to ResponseState so that we warn for every request. -// It would help debugging in stateful servers (e.g. service worker). + if (async) { + if (onLoad || onError) { -var didWarnDefaultInputValue = false; -var didWarnDefaultChecked = false; -var didWarnDefaultSelectValue = false; -var didWarnDefaultTextareaValue = false; -var didWarnInvalidOptionChildren = false; -var didWarnInvalidOptionInnerHTML = false; -var didWarnSelectedSetOnOption = false; + var preloadResource = resources.preloadsMap.get(src); -function checkSelectProp(props, propName) { - { - var value = props[propName]; + if (!preloadResource) { + preloadResource = createPreloadResource(resources, src, 'script', preloadAsScriptPropsFromProps(src, props)); - if (value != null) { - var array = isArray(value); + { + preloadResource._dev_implicit_construction = true; + } - if (props.multiple && !array) { - error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.', propName); - } else if (!props.multiple && array) { - error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.', propName); + resources.usedScriptPreloads.add(preloadResource); + } + } else { + var resource = resources.scriptsMap.get(src); + + if (resource) { + { + var latestProps = scriptPropsFromRawProps(src, props); + adoptPreloadPropsForScriptProps(latestProps, resource.hint.props); + validateScriptResourceDifference(resource.props, latestProps); + } + } else { + var resourceProps = scriptPropsFromRawProps(src, props); + resource = createScriptResource(resources, src, resourceProps); + resources.scripts.add(resource); } } + + return true; } + + return false; } +function hoistResources(resources, source) { + var currentBoundaryResources = resources.boundaryResources; -function pushStartSelect(target, props) { - { - checkControlledValueProps('select', props); - checkSelectProp(props, 'value'); - checkSelectProp(props, 'defaultValue'); + if (currentBoundaryResources) { + source.forEach(function (resource) { + return currentBoundaryResources.add(resource); + }); + source.clear(); + } +} +function hoistResourcesToRoot(resources, boundaryResources) { + boundaryResources.forEach(function (resource) { + return resource.set.add(resource); + }); + boundaryResources.clear(); +} - if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultSelectValue) { - error('Select 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 select ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components'); +// The build script is at scripts/rollup/generate-inline-fizz-runtime.js. +// Run `yarn generate-inline-fizz-runtime` to generate. +var clientRenderBoundary = '$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};'; +var completeBoundary = '$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};'; +var completeBoundaryWithStyles = '$RM=new Map;\n$RR=function(p,q,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};'; +var completeSegment = '$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};'; - didWarnDefaultSelectValue = true; - } +var ReactDOMSharedInternals = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; + +var ReactDOMCurrentDispatcher = ReactDOMSharedInternals.Dispatcher; +var ReactDOMServerDispatcher = ReactDOMServerFloatDispatcher ; +function prepareToRender(resources) { + prepareToRenderResources(resources); + var previousHostDispatcher = ReactDOMCurrentDispatcher.current; + ReactDOMCurrentDispatcher.current = ReactDOMServerDispatcher; + return previousHostDispatcher; +} +function cleanupAfterRender(previousDispatcher) { + finishRenderingResources(); + ReactDOMCurrentDispatcher.current = previousDispatcher; +} // Used to distinguish these contexts from ones used in other renderers. +var ScriptStreamingFormat = 0; +var startInlineScript = stringToPrecomputedChunk('<script>'); +var endInlineScript = stringToPrecomputedChunk('</script>'); +var startScriptSrc = stringToPrecomputedChunk('<script src="'); +var startModuleSrc = stringToPrecomputedChunk('<script type="module" src="'); +var scriptIntegirty = stringToPrecomputedChunk('" integrity="'); +var endAsyncScript = stringToPrecomputedChunk('" async=""></script>'); +/** + * This escaping function is designed to work with bootstrapScriptContent only. + * because we know we are escaping the entire script. We can avoid for instance + * escaping html comment string sequences that are valid javascript as well because + * if there are no sebsequent <script sequences the html parser will never enter + * script data double escaped state (see: https://www.w3.org/TR/html53/syntax.html#script-data-double-escaped-state) + * + * While untrusted script content should be made safe before using this api it will + * ensure that the script cannot be early terminated or never terminated state + */ + +function escapeBootstrapScriptContent(scriptText) { + { + checkHtmlStringCoercion(scriptText); } - target.push(startChunkForTag('select')); - var children = null; - var innerHTML = null; + return ('' + scriptText).replace(scriptRegex, scriptReplacer); +} - for (var propKey in props) { - if (hasOwnProperty.call(props, propKey)) { - var propValue = props[propKey]; +var scriptRegex = /(<\/|<)(s)(cript)/gi; - if (propValue == null) { - continue; - } +var scriptReplacer = function (match, prefix, s, suffix) { + return "" + prefix + (s === 's' ? "\\u0073" : "\\u0053") + suffix; +}; // Allows us to keep track of what we've already written so we can refer back to it. +// if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag +// is set, the server will send instructions via data attributes (instead of inline scripts) - switch (propKey) { - case 'children': - children = propValue; - break; - case 'dangerouslySetInnerHTML': - // TODO: This doesn't really make sense for select since it can't use the controlled - // value in the innerHTML. - innerHTML = propValue; - break; +function createResponseState(identifierPrefix, nonce, bootstrapScriptContent, bootstrapScripts, bootstrapModules, externalRuntimeConfig) { + var idPrefix = identifierPrefix === undefined ? '' : identifierPrefix; + var inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk('<script nonce="' + escapeTextForBrowser(nonce) + '">'); + var bootstrapChunks = []; + var externalRuntimeDesc = null; + var streamingFormat = ScriptStreamingFormat; - case 'defaultValue': - case 'value': - // These are set on the Context instead and applied to the nested options. - break; + if (bootstrapScriptContent !== undefined) { + bootstrapChunks.push(inlineScriptWithNonce, stringToChunk(escapeBootstrapScriptContent(bootstrapScriptContent)), endInlineScript); + } - default: - pushAttribute(target, propKey, propValue); - break; + if (bootstrapScripts !== undefined) { + for (var i = 0; i < bootstrapScripts.length; i++) { + var scriptConfig = bootstrapScripts[i]; + var src = typeof scriptConfig === 'string' ? scriptConfig : scriptConfig.src; + var integrity = typeof scriptConfig === 'string' ? undefined : scriptConfig.integrity; + bootstrapChunks.push(startScriptSrc, stringToChunk(escapeTextForBrowser(src))); + + if (integrity) { + bootstrapChunks.push(scriptIntegirty, stringToChunk(escapeTextForBrowser(integrity))); } + + bootstrapChunks.push(endAsyncScript); } } - target.push(endOfStartTag); - pushInnerHTML(target, innerHTML, children); - return children; -} - -function flattenOptionChildren(children) { - var content = ''; // Flatten children and warn if they aren't strings or numbers; - // invalid types are ignored. + if (bootstrapModules !== undefined) { + for (var _i = 0; _i < bootstrapModules.length; _i++) { + var _scriptConfig = bootstrapModules[_i]; - React.Children.forEach(children, function (child) { - if (child == null) { - return; - } + var _src = typeof _scriptConfig === 'string' ? _scriptConfig : _scriptConfig.src; - content += child; + var _integrity = typeof _scriptConfig === 'string' ? undefined : _scriptConfig.integrity; - { - if (!didWarnInvalidOptionChildren && typeof child !== 'string' && typeof child !== 'number') { - didWarnInvalidOptionChildren = true; + bootstrapChunks.push(startModuleSrc, stringToChunk(escapeTextForBrowser(_src))); - error('Cannot infer the option value of complex children. ' + 'Pass a `value` prop or use a plain string as children to <option>.'); + if (_integrity) { + bootstrapChunks.push(scriptIntegirty, stringToChunk(escapeTextForBrowser(_integrity))); } + + bootstrapChunks.push(endAsyncScript); } - }); - return content; -} + } -var selectedMarkerAttribute = stringToPrecomputedChunk(' selected=""'); + return { + bootstrapChunks: bootstrapChunks, + placeholderPrefix: stringToPrecomputedChunk(idPrefix + 'P:'), + segmentPrefix: stringToPrecomputedChunk(idPrefix + 'S:'), + boundaryPrefix: idPrefix + 'B:', + idPrefix: idPrefix, + nextSuspenseID: 0, + streamingFormat: streamingFormat, + startInlineScript: inlineScriptWithNonce, + sentCompleteSegmentFunction: false, + sentCompleteBoundaryFunction: false, + sentClientRenderFunction: false, + sentStyleInsertionFunction: false, + externalRuntimeConfig: externalRuntimeDesc + }; +} // Constants for the insertion mode we're currently writing in. We don't encode all HTML5 insertion +// modes. We only include the variants as they matter for the sake of our purposes. +// We don't actually provide the namespace therefore we use constants instead of the string. -function pushStartOption(target, props, formatContext) { - var selectedValue = formatContext.selectedValue; - target.push(startChunkForTag('option')); - var children = null; - var value = null; - var selected = null; - var innerHTML = null; +var ROOT_HTML_MODE = 0; // Used for the root most element tag. - for (var propKey in props) { - if (hasOwnProperty.call(props, propKey)) { - var propValue = props[propKey]; +var HTML_MODE = 1; +var SVG_MODE = 2; +var MATHML_MODE = 3; +var HTML_TABLE_MODE = 4; +var HTML_TABLE_BODY_MODE = 5; +var HTML_TABLE_ROW_MODE = 6; +var HTML_COLGROUP_MODE = 7; // We have a greater than HTML_TABLE_MODE check elsewhere. If you add more cases here, make sure it +// still makes sense +// Lets us keep track of contextual state and pick it back up after suspending. - if (propValue == null) { - continue; - } +function createFormatContext(insertionMode, selectedValue, noscriptTagInScope) { + return { + insertionMode: insertionMode, + selectedValue: selectedValue, + noscriptTagInScope: noscriptTagInScope + }; +} +function getChildFormatContext(parentContext, type, props) { + switch (type) { + case 'noscript': + return createFormatContext(HTML_MODE, null, true); - switch (propKey) { - case 'children': - children = propValue; - break; + case 'select': + return createFormatContext(HTML_MODE, props.value != null ? props.value : props.defaultValue, parentContext.noscriptTagInScope); - case 'selected': - // ignore - selected = propValue; + case 'svg': + return createFormatContext(SVG_MODE, null, parentContext.noscriptTagInScope); - { - // TODO: Remove support for `selected` in <option>. - if (!didWarnSelectedSetOnOption) { - error('Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.'); + case 'math': + return createFormatContext(MATHML_MODE, null, parentContext.noscriptTagInScope); - didWarnSelectedSetOnOption = true; - } - } + case 'foreignObject': + return createFormatContext(HTML_MODE, null, parentContext.noscriptTagInScope); + // Table parents are special in that their children can only be created at all if they're + // wrapped in a table parent. So we need to encode that we're entering this mode. - break; + case 'table': + return createFormatContext(HTML_TABLE_MODE, null, parentContext.noscriptTagInScope); - case 'dangerouslySetInnerHTML': - innerHTML = propValue; - break; - // eslint-disable-next-line-no-fallthrough + case 'thead': + case 'tbody': + case 'tfoot': + return createFormatContext(HTML_TABLE_BODY_MODE, null, parentContext.noscriptTagInScope); - case 'value': - value = propValue; - // We intentionally fallthrough to also set the attribute on the node. - // eslint-disable-next-line-no-fallthrough + case 'colgroup': + return createFormatContext(HTML_COLGROUP_MODE, null, parentContext.noscriptTagInScope); - default: - pushAttribute(target, propKey, propValue); - break; - } - } + case 'tr': + return createFormatContext(HTML_TABLE_ROW_MODE, null, parentContext.noscriptTagInScope); } - if (selectedValue != null) { - var stringValue; - - if (value !== null) { - { - checkAttributeStringCoercion(value, 'value'); - } - - stringValue = '' + value; - } else { - { - if (innerHTML !== null) { - if (!didWarnInvalidOptionInnerHTML) { - didWarnInvalidOptionInnerHTML = true; - - error('Pass a `value` prop if you set dangerouslyInnerHTML so React knows ' + 'which value should be selected.'); - } - } - } + if (parentContext.insertionMode >= HTML_TABLE_MODE) { + // Whatever tag this was, it wasn't a table parent or other special parent, so we must have + // entered plain HTML again. + return createFormatContext(HTML_MODE, null, parentContext.noscriptTagInScope); + } - stringValue = flattenOptionChildren(children); - } + if (parentContext.insertionMode === ROOT_HTML_MODE) { + // We've emitted the root and is now in plain HTML mode. + return createFormatContext(HTML_MODE, null, parentContext.noscriptTagInScope); + } - if (isArray(selectedValue)) { - // multiple - for (var i = 0; i < selectedValue.length; i++) { - { - checkAttributeStringCoercion(selectedValue[i], 'value'); - } - - var v = '' + selectedValue[i]; - - if (v === stringValue) { - target.push(selectedMarkerAttribute); - break; - } - } - } else { - { - checkAttributeStringCoercion(selectedValue, 'select.value'); - } + return parentContext; +} +var UNINITIALIZED_SUSPENSE_BOUNDARY_ID = null; +function assignSuspenseBoundaryID(responseState) { + var generatedID = responseState.nextSuspenseID++; + return stringToPrecomputedChunk(responseState.boundaryPrefix + generatedID.toString(16)); +} +function makeId(responseState, treeId, localId) { + var idPrefix = responseState.idPrefix; + var id = ':' + idPrefix + 'R' + treeId; // Unless this is the first id at this level, append a number at the end + // that represents the position of this useId hook among all the useId + // hooks for this fiber. - if ('' + selectedValue === stringValue) { - target.push(selectedMarkerAttribute); - } - } - } else if (selected) { - target.push(selectedMarkerAttribute); + if (localId > 0) { + id += 'H' + localId.toString(32); } - target.push(endOfStartTag); - pushInnerHTML(target, innerHTML, children); - return children; + return id + ':'; } -function pushInput(target, props) { - { - checkControlledValueProps('input', props); - - if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnDefaultChecked) { - 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', 'A component', props.type); - - didWarnDefaultChecked = true; - } - - if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultInputValue) { - 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', 'A component', props.type); +function encodeHTMLTextNode(text) { + return escapeTextForBrowser(text); +} - didWarnDefaultInputValue = true; - } +var textSeparator = stringToPrecomputedChunk('<!-- -->'); +function pushTextInstance(target, text, responseState, textEmbedded) { + if (text === '') { + // Empty text doesn't have a DOM node representation and the hydration is aware of this. + return textEmbedded; } - target.push(startChunkForTag('input')); - var value = null; - var defaultValue = null; - var checked = null; - var defaultChecked = null; - - for (var propKey in props) { - if (hasOwnProperty.call(props, propKey)) { - var propValue = props[propKey]; - - if (propValue == null) { - continue; - } + if (textEmbedded) { + target.push(textSeparator); + } - switch (propKey) { - case 'children': - case 'dangerouslySetInnerHTML': - throw new Error('input' + " is a self-closing tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.'); - // eslint-disable-next-line-no-fallthrough + target.push(stringToChunk(encodeHTMLTextNode(text))); + return true; +} // Called when Fizz is done with a Segment. Currently the only purpose is to conditionally +// emit a text separator when we don't know for sure it is safe to omit - case 'defaultChecked': - defaultChecked = propValue; - break; +function pushSegmentFinale(target, responseState, lastPushedText, textEmbedded) { + if (lastPushedText && textEmbedded) { + target.push(textSeparator); + } +} +var styleNameCache = new Map(); - case 'defaultValue': - defaultValue = propValue; - break; +function processStyleName(styleName) { + var chunk = styleNameCache.get(styleName); - case 'checked': - checked = propValue; - break; + if (chunk !== undefined) { + return chunk; + } - case 'value': - value = propValue; - break; + var result = stringToPrecomputedChunk(escapeTextForBrowser(hyphenateStyleName(styleName))); + styleNameCache.set(styleName, result); + return result; +} - default: - pushAttribute(target, propKey, propValue); - break; - } - } - } +var styleAttributeStart = stringToPrecomputedChunk(' style="'); +var styleAssign = stringToPrecomputedChunk(':'); +var styleSeparator = stringToPrecomputedChunk(';'); - if (checked !== null) { - pushAttribute(target, 'checked', checked); - } else if (defaultChecked !== null) { - pushAttribute(target, 'checked', defaultChecked); +function pushStyle(target, responseState, style) { + if (typeof style !== 'object') { + throw new Error('The `style` prop expects a mapping from style properties to values, ' + "not a string. For example, style={{marginRight: spacing + 'em'}} when " + 'using JSX.'); } - if (value !== null) { - pushAttribute(target, 'value', value); - } else if (defaultValue !== null) { - pushAttribute(target, 'value', defaultValue); - } + var isFirst = true; - target.push(endOfStartTagSelfClosing); - return null; -} + for (var styleName in style) { + if (!hasOwnProperty.call(style, styleName)) { + continue; + } // If you provide unsafe user data here they can inject arbitrary CSS + // which may be problematic (I couldn't repro this): + // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet + // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/ + // This is not an XSS hole but instead a potential CSS injection issue + // which has lead to a greater discussion about how we're going to + // trust URLs moving forward. See #2115901 -function pushStartTextArea(target, props) { - { - checkControlledValueProps('textarea', props); - if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultTextareaValue) { - error('Textarea 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 textarea ' + 'and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components'); + var styleValue = style[styleName]; - didWarnDefaultTextareaValue = true; + if (styleValue == null || typeof styleValue === 'boolean' || styleValue === '') { + // TODO: We used to set empty string as a style with an empty value. Does that ever make sense? + continue; } - } - target.push(startChunkForTag('textarea')); - var value = null; - var defaultValue = null; - var children = null; + var nameChunk = void 0; + var valueChunk = void 0; + var isCustomProperty = styleName.indexOf('--') === 0; - for (var propKey in props) { - if (hasOwnProperty.call(props, propKey)) { - var propValue = props[propKey]; + if (isCustomProperty) { + nameChunk = stringToChunk(escapeTextForBrowser(styleName)); - if (propValue == null) { - continue; + { + checkCSSPropertyStringCoercion(styleValue, styleName); } - switch (propKey) { - case 'children': - children = propValue; - break; - - case 'value': - value = propValue; - break; + valueChunk = stringToChunk(escapeTextForBrowser(('' + styleValue).trim())); + } else { + { + warnValidStyle$1(styleName, styleValue); + } - case 'defaultValue': - defaultValue = propValue; - break; + nameChunk = processStyleName(styleName); - case 'dangerouslySetInnerHTML': - throw new Error('`dangerouslySetInnerHTML` does not make sense on <textarea>.'); - // eslint-disable-next-line-no-fallthrough + if (typeof styleValue === 'number') { + if (styleValue !== 0 && !hasOwnProperty.call(isUnitlessNumber, styleName)) { + valueChunk = stringToChunk(styleValue + 'px'); // Presumes implicit 'px' suffix for unitless numbers + } else { + valueChunk = stringToChunk('' + styleValue); + } + } else { + { + checkCSSPropertyStringCoercion(styleValue, styleName); + } - default: - pushAttribute(target, propKey, propValue); - break; + valueChunk = stringToChunk(escapeTextForBrowser(('' + styleValue).trim())); } } - } - - if (value === null && defaultValue !== null) { - value = defaultValue; - } - - target.push(endOfStartTag); // TODO (yungsters): Remove support for children content in <textarea>. - if (children != null) { - { - error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.'); - } + if (isFirst) { + isFirst = false; // If it's first, we don't need any separators prefixed. - if (value != null) { - throw new Error('If you supply `defaultValue` on a <textarea>, do not pass children.'); + target.push(styleAttributeStart, nameChunk, styleAssign, valueChunk); + } else { + target.push(styleSeparator, nameChunk, styleAssign, valueChunk); } + } - if (isArray(children)) { - if (children.length > 1) { - throw new Error('<textarea> can only have at most one child.'); - } // TODO: remove the coercion and the DEV check below because it will - // always be overwritten by the coercion several lines below it. #22309 + if (!isFirst) { + target.push(attributeEnd); + } +} +var attributeSeparator = stringToPrecomputedChunk(' '); +var attributeAssign = stringToPrecomputedChunk('="'); +var attributeEnd = stringToPrecomputedChunk('"'); +var attributeEmptyString = stringToPrecomputedChunk('=""'); +function pushAttribute(target, responseState, name, value) // not null or undefined +{ + switch (name) { + case 'style': { - checkHtmlStringCoercion(children[0]); + pushStyle(target, responseState, value); + return; } - value = '' + children[0]; - } + case 'defaultValue': + case 'defaultChecked': // These shouldn't be set as attributes on generic HTML elements. - { - checkHtmlStringCoercion(children); - } + case 'innerHTML': // Must use dangerouslySetInnerHTML instead. - value = '' + children; + case 'suppressContentEditableWarning': + case 'suppressHydrationWarning': + // Ignored. These are built-in to React on the client. + return; } - if (typeof value === 'string' && value[0] === '\n') { - // text/html ignores the first character in these tags if it's a newline - // Prefer to break application/xml over text/html (for now) by adding - // a newline specifically to get eaten by the parser. (Alternately for - // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first - // \r is normalized out by HTMLTextAreaElement#value.) - // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre> - // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions> - // See: <http://www.w3.org/TR/html5/syntax.html#newlines> - // See: Parsing of "textarea" "listing" and "pre" elements - // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody> - target.push(leadingNewline); - } // ToString and push directly instead of recurse over children. - // We don't really support complex children in the value anyway. - // This also currently avoids a trailing comment node which breaks textarea. - - - if (value !== null) { - { - checkAttributeStringCoercion(value, 'value'); - } - - target.push(stringToChunk(encodeHTMLTextNode('' + value))); + if ( // shouldIgnoreAttribute + // We have already filtered out null/undefined and reserved words. + name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) { + return; } - return null; -} - -function pushMeta(target, props, responseState, textEmbedded, insertionMode, noscriptTagInScope) { - { - if (insertionMode === SVG_MODE || noscriptTagInScope) { - return pushSelfClosing(target, props, 'meta'); - } else { - if (textEmbedded) { - // This link follows text but we aren't writing a tag. while not as efficient as possible we need - // to be safe and assume text will follow by inserting a textSeparator - target.push(textSeparator); - } - - if (typeof props.charSet === 'string') { - return pushSelfClosing(responseState.charsetChunks, props, 'meta'); - } else { - return pushSelfClosing(responseState.hoistableChunks, props, 'meta'); - } - } - } -} + var propertyInfo = getPropertyInfo(name); -function pushLink(target, props, responseState, resources, textEmbedded, insertionMode, noscriptTagInScope) { - { - var rel = props.rel; - var href = props.href; - var precedence = props.precedence; + if (propertyInfo !== null) { + // shouldRemoveAttribute + switch (typeof value) { + case 'function': + case 'symbol': + // eslint-disable-line + return; - if (insertionMode === SVG_MODE || noscriptTagInScope || typeof rel !== 'string' || typeof href !== 'string' || href === '') { - { - if (rel === 'stylesheet' && typeof props.precedence === 'string') { - if (typeof href !== 'string' || !href) { - error('React encountered a `<link rel="stylesheet" .../>` with a `precedence` prop and expected the `href` prop to be a non-empty string but ecountered %s instead. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop ensure there is a non-empty string `href` prop as well, otherwise remove the `precedence` prop.', getValueDescriptorExpectingObjectForWarning(href)); + case 'boolean': + { + if (!propertyInfo.acceptsBooleans) { + return; } } - } - - pushLinkImpl(target, props); - return null; } - if (props.rel === 'stylesheet') { - // This <link> may hoistable as a Stylesheet Resource, otherwise it will emit in place - var key = getResourceKey('style', href); - - if (typeof precedence !== 'string' || props.disabled != null || props.onLoad || props.onError) { - // This stylesheet is either not opted into Resource semantics or has conflicting properties which - // disqualify it for such. We can still create a preload resource to help it load faster on the - // client - { - if (typeof precedence === 'string') { - if (props.disabled != null) { - error('React encountered a `<link rel="stylesheet" .../>` with a `precedence` prop and a `disabled` prop. The presence of the `disabled` prop indicates an intent to manage the stylesheet active state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the `disabled` prop, otherwise remove the `precedence` prop.'); - } else if (props.onLoad || props.onError) { - var propDescription = props.onLoad && props.onError ? '`onLoad` and `onError` props' : props.onLoad ? '`onLoad` prop' : '`onError` prop'; + var attributeName = propertyInfo.attributeName; + var attributeNameChunk = stringToChunk(attributeName); // TODO: If it's known we can cache the chunk. - error('React encountered a `<link rel="stylesheet" .../>` with a `precedence` prop and %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.', propDescription, propDescription); - } - } + switch (propertyInfo.type) { + case BOOLEAN: + if (value) { + target.push(attributeSeparator, attributeNameChunk, attributeEmptyString); } - var resource = resources.preloadsMap.get(key); - - if (!resource) { - resource = { - type: 'preload', - chunks: [], - state: NoState, - props: preloadAsStylePropsFromProps(href, props) - }; - resources.preloadsMap.set(key, resource); + return; - { - markAsImplicitResourceDEV(resource, props, resource.props); - } + case OVERLOADED_BOOLEAN: + if (value === true) { + target.push(attributeSeparator, attributeNameChunk, attributeEmptyString); + } else if (value === false) ; else { + target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); } - pushLinkImpl(resource.chunks, resource.props); - resources.usedStylesheets.add(resource); - return pushLinkImpl(target, props); - } else { - // This stylesheet refers to a Resource and we create a new one if necessary - var _resource = resources.stylesMap.get(key); - - { - var devResource = getAsResourceDEV(_resource); - - if (devResource) { - switch (devResource.__provenance) { - case 'rendered': - { - var differenceDescription = describeDifferencesForStylesheets( // Diff the props from the JSX element, not the derived resource props - props, devResource.__originalProps); - - if (differenceDescription) { - error('React encountered a <link rel="stylesheet" href="%s" .../> with a `precedence` prop that has props that conflict' + ' with another hoistable stylesheet with the same `href`. When using `precedence` with <link rel="stylsheet" .../>' + ' the props from the first encountered instance will be used and props from later instances will be ignored.' + ' Update the props on either <link rel="stylesheet" .../> instance so they agree.%s', href, differenceDescription); - } - - break; - } - - case 'preinit': - { - var _differenceDescription = describeDifferencesForStylesheetOverPreinit( // Diff the props from the JSX element, not the derived resource props - props, devResource.__propsEquivalent); - - if (_differenceDescription) { - error('React encountered a <link rel="stylesheet" precedence="%s" href="%s" .../> with props that conflict' + ' with the options provided to `ReactDOM.preinit("%s", { as: "style", ... })`. React will use the first props or preinitialization' + ' options encountered when rendering a hoistable stylesheet with a particular `href` and will ignore any newer props or' + ' options. The first instance of this stylesheet resource was created using the `ReactDOM.preinit()` function.' + ' Please note, `ReactDOM.preinit()` is modeled off of module import assertions capabilities and does not support' + ' arbitrary props. If you need to have props not included with the preinit options you will need to rely on rendering' + ' <link> tags only.%s', precedence, href, href, _differenceDescription); - } + return; - break; - } - } - } + case NUMERIC: + if (!isNaN(value)) { + target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); } - if (!_resource) { - var resourceProps = stylesheetPropsFromRawProps(props); - var preloadResource = resources.preloadsMap.get(key); + break; - if (preloadResource) { - // If we already had a preload we don't want that resource to flush directly. - // We let the newly created resource govern flushing. - preloadResource.state |= Blocked; - adoptPreloadPropsForStylesheetProps(resourceProps, preloadResource.props); - } + case POSITIVE_NUMERIC: + if (!isNaN(value) && value >= 1) { + target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); + } - _resource = { - type: 'stylesheet', - chunks: [], - state: resources.boundaryResources ? Blocked : NoState, - props: resourceProps - }; - resources.stylesMap.set(key, _resource); + break; + default: + if (propertyInfo.sanitizeURL) { { - markAsRenderedResourceDEV(_resource, props); - } - - var precedenceSet = resources.precedences.get(precedence); - - if (!precedenceSet) { - precedenceSet = new Set(); - resources.precedences.set(precedence, precedenceSet); + checkAttributeStringCoercion(value, attributeName); } - precedenceSet.add(_resource); - } - - if (resources.boundaryResources) { - resources.boundaryResources.add(_resource); - } - - if (textEmbedded) { - // This link follows text but we aren't writing a tag. while not as efficient as possible we need - // to be safe and assume text will follow by inserting a textSeparator - target.push(textSeparator); + value = '' + value; + sanitizeURL(value); } - return null; - } - } else if (props.onLoad || props.onError) { - // When using load handlers we cannot hoist and need to emit links in place - return pushLinkImpl(target, props); - } else { - // We can hoist this link so we may need to emit a text separator. - // @TODO refactor text separators so we don't have to defensively add - // them when we don't end up emitting a tag as a result of pushStartInstance - if (textEmbedded) { - // This link follows text but we aren't writing a tag. while not as efficient as possible we need - // to be safe and assume text will follow by inserting a textSeparator - target.push(textSeparator); - } - - switch (props.rel) { - case 'preconnect': - case 'dns-prefetch': - return pushLinkImpl(responseState.preconnectChunks, props); + target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); + } + } else if (isAttributeNameSafe(name)) { + // shouldRemoveAttribute + switch (typeof value) { + case 'function': + case 'symbol': + // eslint-disable-line + return; - case 'preload': - return pushLinkImpl(responseState.preloadChunks, props); + case 'boolean': + { + var prefix = name.toLowerCase().slice(0, 5); - default: - return pushLinkImpl(responseState.hoistableChunks, props); - } + if (prefix !== 'data-' && prefix !== 'aria-') { + return; + } + } } + + target.push(attributeSeparator, stringToChunk(name), attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); } } -function pushLinkImpl(target, props) { - target.push(startChunkForTag('link')); +var endOfStartTag = stringToPrecomputedChunk('>'); +var endOfStartTagSelfClosing = stringToPrecomputedChunk('/>'); - for (var propKey in props) { - if (hasOwnProperty.call(props, propKey)) { - var propValue = props[propKey]; +function pushInnerHTML(target, innerHTML, children) { + if (innerHTML != null) { + if (children != null) { + throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.'); + } - if (propValue == null) { - continue; - } + if (typeof innerHTML !== 'object' || !('__html' in innerHTML)) { + throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' + 'for more information.'); + } - switch (propKey) { - case 'children': - case 'dangerouslySetInnerHTML': - throw new Error('link' + " is a self-closing tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.'); - // eslint-disable-next-line-no-fallthrough + var html = innerHTML.__html; - default: - pushAttribute(target, propKey, propValue); - break; + if (html !== null && html !== undefined) { + { + checkHtmlStringCoercion(html); } + + target.push(stringToChunk('' + html)); } } +} // TODO: Move these to ResponseState so that we warn for every request. +// It would help debugging in stateful servers (e.g. service worker). - target.push(endOfStartTagSelfClosing); - return null; -} -function pushStyle(target, props, resources, textEmbedded, insertionMode, noscriptTagInScope) { +var didWarnDefaultInputValue = false; +var didWarnDefaultChecked = false; +var didWarnDefaultSelectValue = false; +var didWarnDefaultTextareaValue = false; +var didWarnInvalidOptionChildren = false; +var didWarnInvalidOptionInnerHTML = false; +var didWarnSelectedSetOnOption = false; + +function checkSelectProp(props, propName) { { - if (hasOwnProperty.call(props, 'children')) { - var children = props.children; - var child = Array.isArray(children) ? children.length < 2 ? children[0] : null : children; + var value = props[propName]; - if (typeof child === 'function' || typeof child === 'symbol' || Array.isArray(child)) { - var childType = typeof child === 'function' ? 'a Function' : typeof child === 'symbol' ? 'a Sybmol' : 'an Array'; + if (value != null) { + var array = isArray(value); - error('React expect children of <style> tags to be a string, number, or object with a `toString` method but found %s instead. ' + 'In browsers style Elements can only have `Text` Nodes as children.', childType); + if (props.multiple && !array) { + error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.', propName); + } else if (!props.multiple && array) { + error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.', propName); } } } +} +function pushStartSelect(target, props, responseState) { { - var precedence = props.precedence; - var href = props.href; - - if (insertionMode === SVG_MODE || noscriptTagInScope || typeof precedence !== 'string' || typeof href !== 'string' || href === '') { - // This style tag is not able to be turned into a Style Resource - return pushStyleImpl(target, props); - } - - var key = getResourceKey('style', href); - var resource = resources.stylesMap.get(key); - - if (!resource) { - resource = { - type: 'style', - chunks: [], - state: resources.boundaryResources ? Blocked : NoState, - props: styleTagPropsFromRawProps(props) - }; - resources.stylesMap.set(key, resource); - - { - markAsRenderedResourceDEV(resource, props); - } - - pushStyleImpl(resource.chunks, resource.props); - var precedenceSet = resources.precedences.get(precedence); - - if (!precedenceSet) { - precedenceSet = new Set(); - resources.precedences.set(precedence, precedenceSet); - } - - precedenceSet.add(resource); + checkControlledValueProps('select', props); + checkSelectProp(props, 'value'); + checkSelectProp(props, 'defaultValue'); - if (resources.boundaryResources) { - resources.boundaryResources.add(resource); - } - } + if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultSelectValue) { + error('Select 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 select ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components'); - if (textEmbedded) { - // This link follows text but we aren't writing a tag. while not as efficient as possible we need - // to be safe and assume text will follow by inserting a textSeparator - target.push(textSeparator); + didWarnDefaultSelectValue = true; } } -} -function pushStyleImpl(target, props) { - target.push(startChunkForTag('style')); + target.push(startChunkForTag('select')); var children = null; var innerHTML = null; @@ -3197,31 +3348,59 @@ function pushStyleImpl(target, props) { break; case 'dangerouslySetInnerHTML': + // TODO: This doesn't really make sense for select since it can't use the controlled + // value in the innerHTML. innerHTML = propValue; break; + case 'defaultValue': + case 'value': + // These are set on the Context instead and applied to the nested options. + break; + default: - pushAttribute(target, propKey, propValue); + pushAttribute(target, responseState, propKey, propValue); break; } } } target.push(endOfStartTag); - var child = Array.isArray(children) ? children.length < 2 ? children[0] : null : children; + pushInnerHTML(target, innerHTML, children); + return children; +} - if (typeof child !== 'function' && typeof child !== 'symbol' && child !== null && child !== undefined) { - // eslint-disable-next-line react-internal/safe-string-coercion - target.push(stringToChunk(escapeTextForBrowser('' + child))); - } +function flattenOptionChildren(children) { + var content = ''; // Flatten children and warn if they aren't strings or numbers; + // invalid types are ignored. - pushInnerHTML(target, innerHTML, children); - target.push(endTag1, stringToChunk('style'), endTag2); - return null; + React.Children.forEach(children, function (child) { + if (child == null) { + return; + } + + content += child; + + { + if (!didWarnInvalidOptionChildren && typeof child !== 'string' && typeof child !== 'number') { + didWarnInvalidOptionChildren = true; + + error('Cannot infer the option value of complex children. ' + 'Pass a `value` prop or use a plain string as children to <option>.'); + } + } + }); + return content; } -function pushSelfClosing(target, props, tag) { - target.push(startChunkForTag(tag)); +var selectedMarkerAttribute = stringToPrecomputedChunk(' selected=""'); + +function pushStartOption(target, props, responseState, formatContext) { + var selectedValue = formatContext.selectedValue; + target.push(startChunkForTag('option')); + var children = null; + var value = null; + var selected = null; + var innerHTML = null; for (var propKey in props) { if (hasOwnProperty.call(props, propKey)) { @@ -3233,274 +3412,118 @@ function pushSelfClosing(target, props, tag) { switch (propKey) { case 'children': - case 'dangerouslySetInnerHTML': - throw new Error(tag + " is a self-closing tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.'); - // eslint-disable-next-line-no-fallthrough - - default: - pushAttribute(target, propKey, propValue); + children = propValue; break; - } - } - } - target.push(endOfStartTagSelfClosing); - return null; -} + case 'selected': + // ignore + selected = propValue; -function pushStartMenuItem(target, props) { - target.push(startChunkForTag('menuitem')); + { + // TODO: Remove support for `selected` in <option>. + if (!didWarnSelectedSetOnOption) { + error('Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.'); - for (var propKey in props) { - if (hasOwnProperty.call(props, propKey)) { - var propValue = props[propKey]; + didWarnSelectedSetOnOption = true; + } + } - if (propValue == null) { - continue; - } + break; - switch (propKey) { - case 'children': case 'dangerouslySetInnerHTML': - throw new Error('menuitems cannot have `children` nor `dangerouslySetInnerHTML`.'); + innerHTML = propValue; + break; + // eslint-disable-next-line-no-fallthrough + + case 'value': + value = propValue; + // We intentionally fallthrough to also set the attribute on the node. // eslint-disable-next-line-no-fallthrough default: - pushAttribute(target, propKey, propValue); + pushAttribute(target, responseState, propKey, propValue); break; } } } - target.push(endOfStartTag); - return null; -} + if (selectedValue != null) { + var stringValue; -function pushTitle(target, props, responseState, insertionMode, noscriptTagInScope) { - { - if (hasOwnProperty.call(props, 'children')) { - var children = props.children; - var child = Array.isArray(children) ? children.length < 2 ? children[0] : null : children; - - if (Array.isArray(children) && children.length > 1) { - error('React expects the `children` prop of <title> tags to be a string, number, or object with a novel `toString` method but found an Array with length %s instead.' + ' Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert `children` of <title> tags to a single string value' + ' which is why Arrays of length greater than 1 are not supported. When using JSX it can be commong to combine text nodes and value nodes.' + ' For example: <title>hello {nameOfUser}. While not immediately apparent, `children` in this case is an Array with length 2. If your `children` prop' + ' is using this form try rewriting it using a template string: {`hello ${nameOfUser}`}.', children.length); - } else if (typeof child === 'function' || typeof child === 'symbol') { - var childType = typeof child === 'function' ? 'a Function' : 'a Sybmol'; - - error('React expect children of tags to be a string, number, or object with a novel `toString` method but found %s instead.' + ' Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title>' + ' tags to a single string value.', childType); - } else if (child && child.toString === {}.toString) { - if (child.$$typeof != null) { - error('React expects the `children` prop of <title> tags to be a string, number, or object with a novel `toString` method but found an object that appears to be' + ' a React element which never implements a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to' + ' be able to convert children of <title> tags to a single string value which is why rendering React elements is not supported. If the `children` of <title> is' + ' a React Component try moving the <title> tag into that component. If the `children` of <title> is some HTML markup change it to be Text only to be valid HTML.'); - } else { - error('React expects the `children` prop of <title> tags to be a string, number, or object with a novel `toString` method but found an object that does not implement' + ' a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags' + ' to a single string value. Using the default `toString` method available on every object is almost certainly an error. Consider whether the `children` of this <title>' + ' is an object in error and change it to a string or number value if so. Otherwise implement a `toString` method that React can use to produce a valid <title>.'); - } + if (value !== null) { + { + checkAttributeStringCoercion(value, 'value'); } - } - } - { - if (insertionMode !== SVG_MODE && !noscriptTagInScope) { - pushTitleImpl(responseState.hoistableChunks, props); - return null; + stringValue = '' + value; } else { - return pushTitleImpl(target, props); - } - } -} - -function pushTitleImpl(target, props) { - target.push(startChunkForTag('title')); - var children = null; - var innerHTML = null; - - for (var propKey in props) { - if (hasOwnProperty.call(props, propKey)) { - var propValue = props[propKey]; - - if (propValue == null) { - continue; - } - - switch (propKey) { - case 'children': - children = propValue; - break; - - case 'dangerouslySetInnerHTML': - innerHTML = propValue; - break; + { + if (innerHTML !== null) { + if (!didWarnInvalidOptionInnerHTML) { + didWarnInvalidOptionInnerHTML = true; - default: - pushAttribute(target, propKey, propValue); - break; + error('Pass a `value` prop if you set dangerouslyInnerHTML so React knows ' + 'which value should be selected.'); + } + } } - } - } - - target.push(endOfStartTag); - var child = Array.isArray(children) ? children.length < 2 ? children[0] : null : children; - - if (typeof child !== 'function' && typeof child !== 'symbol' && child !== null && child !== undefined) { - // eslint-disable-next-line react-internal/safe-string-coercion - target.push(stringToChunk(escapeTextForBrowser('' + child))); - } - - pushInnerHTML(target, innerHTML, children); - target.push(endTag1, stringToChunk('title'), endTag2); - return null; -} -function pushStartHead(target, props, responseState, insertionMode) { - { - if (insertionMode < HTML_MODE && responseState.headChunks === null) { - // This <head> is the Document.head and should be part of the preamble - responseState.headChunks = []; - return pushStartGenericElement(responseState.headChunks, props, 'head'); - } else { - // This <head> is deep and is likely just an error. we emit it inline though. - // Validation should warn that this tag is the the wrong spot. - return pushStartGenericElement(target, props, 'head'); - } - } -} - -function pushStartHtml(target, props, responseState, insertionMode) { - { - if (insertionMode === ROOT_HTML_MODE && responseState.htmlChunks === null) { - // This <html> is the Document.documentElement and should be part of the preamble - responseState.htmlChunks = [DOCTYPE]; - return pushStartGenericElement(responseState.htmlChunks, props, 'html'); - } else { - // This <html> is deep and is likely just an error. we emit it inline though. - // Validation should warn that this tag is the the wrong spot. - return pushStartGenericElement(target, props, 'html'); + stringValue = flattenOptionChildren(children); } - } -} - -function pushScript(target, props, resources, textEmbedded, insertionMode, noscriptTagInScope) { - { - if (insertionMode === SVG_MODE || noscriptTagInScope || typeof props.src !== 'string' || !props.src) { - // This script will not be a resource nor can it be preloaded, we bailout early - // and emit it in place. - return pushScriptImpl(target, props); - } - - var src = props.src; - var key = getResourceKey('script', src); - - if (props.async !== true || props.onLoad || props.onError) { - // We can't resourcify scripts with load listeners. To avoid ambiguity with - // other Resourcified async scripts on the server we omit them from the server - // stream and expect them to be inserted during hydration on the client. - // We can still preload them however so the client can start fetching the script - // as soon as possible - var resource = resources.preloadsMap.get(key); - - if (!resource) { - resource = { - type: 'preload', - chunks: [], - state: NoState, - props: preloadAsScriptPropsFromProps(props.src, props) - }; - resources.preloadsMap.set(key, resource); + if (isArray(selectedValue)) { + // multiple + for (var i = 0; i < selectedValue.length; i++) { { - markAsImplicitResourceDEV(resource, props, resource.props); + checkAttributeStringCoercion(selectedValue[i], 'value'); } - resources.usedScripts.add(resource); - pushLinkImpl(resource.chunks, resource.props); - } + var v = '' + selectedValue[i]; - if (props.async !== true) { - // This is not an async script, we can preloaded it but it still needs to - // be emitted in place since it needs to hydrate on the client - pushScriptImpl(target, props); - return null; + if (v === stringValue) { + target.push(selectedMarkerAttribute); + break; + } } } else { - // We can make this <script> into a ScriptResource - var _resource2 = resources.scriptsMap.get(key); - { - var devResource = getAsResourceDEV(_resource2); - - if (devResource) { - switch (devResource.__provenance) { - case 'rendered': - { - var differenceDescription = describeDifferencesForScripts( // Diff the props from the JSX element, not the derived resource props - props, devResource.__originalProps); - - if (differenceDescription) { - error('React encountered a <script async={true} src="%s" .../> that has props that conflict' + ' with another hoistable script with the same `src`. When rendering hoistable scripts (async scripts without any loading handlers)' + ' the props from the first encountered instance will be used and props from later instances will be ignored.' + ' Update the props on both <script async={true} .../> instance so they agree.%s', src, differenceDescription); - } - - break; - } - - case 'preinit': - { - var _differenceDescription2 = describeDifferencesForScriptOverPreinit( // Diff the props from the JSX element, not the derived resource props - props, devResource.__propsEquivalent); - - if (_differenceDescription2) { - error('React encountered a <script async={true} src="%s" .../> with props that conflict' + ' with the options provided to `ReactDOM.preinit("%s", { as: "script", ... })`. React will use the first props or preinitialization' + ' options encountered when rendering a hoistable script with a particular `src` and will ignore any newer props or' + ' options. The first instance of this script resource was created using the `ReactDOM.preinit()` function.' + ' Please note, `ReactDOM.preinit()` is modeled off of module import assertions capabilities and does not support' + ' arbitrary props. If you need to have props not included with the preinit options you will need to rely on rendering' + ' <script> tags only.%s', src, src, _differenceDescription2); - } - - break; - } - } - } + checkAttributeStringCoercion(selectedValue, 'select.value'); } - if (!_resource2) { - _resource2 = { - type: 'script', - chunks: [], - state: NoState, - props: null - }; - resources.scriptsMap.set(key, _resource2); - - { - markAsRenderedResourceDEV(_resource2, props); - } // Add to the script flushing queue - + if ('' + selectedValue === stringValue) { + target.push(selectedMarkerAttribute); + } + } + } else if (selected) { + target.push(selectedMarkerAttribute); + } - resources.scripts.add(_resource2); - var scriptProps = props; - var preloadResource = resources.preloadsMap.get(key); + target.push(endOfStartTag); + pushInnerHTML(target, innerHTML, children); + return children; +} - if (preloadResource) { - // If we already had a preload we don't want that resource to flush directly. - // We let the newly created resource govern flushing. - preloadResource.state |= Blocked; - scriptProps = assign({}, props); - adoptPreloadPropsForScriptProps(scriptProps, preloadResource.props); - } // encode the tag as Chunks +function pushInput(target, props, responseState) { + { + checkControlledValueProps('input', props); + if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnDefaultChecked) { + 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', 'A component', props.type); - pushScriptImpl(_resource2.chunks, scriptProps); - } + didWarnDefaultChecked = true; } - if (textEmbedded) { - // This script follows text but we aren't writing a tag. while not as efficient as possible we need - // to be safe and assume text will follow by inserting a textSeparator - target.push(textSeparator); - } + if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultInputValue) { + 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', 'A component', props.type); - return null; + didWarnDefaultInputValue = true; + } } -} -function pushScriptImpl(target, props) { - target.push(startChunkForTag('script')); - var children = null; - var innerHTML = null; + target.push(startChunkForTag('input')); + var value = null; + var defaultValue = null; + var checked = null; + var defaultChecked = null; for (var propKey in props) { if (hasOwnProperty.call(props, propKey)) { @@ -3512,44 +3535,64 @@ function pushScriptImpl(target, props) { switch (propKey) { case 'children': - children = propValue; + case 'dangerouslySetInnerHTML': + throw new Error('input' + " is a self-closing tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.'); + // eslint-disable-next-line-no-fallthrough + + case 'defaultChecked': + defaultChecked = propValue; break; - case 'dangerouslySetInnerHTML': - innerHTML = propValue; + case 'defaultValue': + defaultValue = propValue; + break; + + case 'checked': + checked = propValue; + break; + + case 'value': + value = propValue; break; default: - pushAttribute(target, propKey, propValue); + pushAttribute(target, responseState, propKey, propValue); break; } } } - target.push(endOfStartTag); - - { - if (children != null && typeof children !== 'string') { - var descriptiveStatement = typeof children === 'number' ? 'a number for children' : Array.isArray(children) ? 'an array for children' : 'something unexpected for children'; - - error('A script element was rendered with %s. If script element has children it must be a single string.' + ' Consider using dangerouslySetInnerHTML or passing a plain string as children.', descriptiveStatement); - } + if (checked !== null) { + pushAttribute(target, responseState, 'checked', checked); + } else if (defaultChecked !== null) { + pushAttribute(target, responseState, 'checked', defaultChecked); } - pushInnerHTML(target, innerHTML, children); - - if (typeof children === 'string') { - target.push(stringToChunk(encodeHTMLTextNode(children))); + if (value !== null) { + pushAttribute(target, responseState, 'value', value); + } else if (defaultValue !== null) { + pushAttribute(target, responseState, 'value', defaultValue); } - target.push(endTag1, stringToChunk('script'), endTag2); + target.push(endOfStartTagSelfClosing); return null; } -function pushStartGenericElement(target, props, tag) { - target.push(startChunkForTag(tag)); +function pushStartTextArea(target, props, responseState) { + { + checkControlledValueProps('textarea', props); + + if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultTextareaValue) { + error('Textarea 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 textarea ' + 'and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components'); + + didWarnDefaultTextareaValue = true; + } + } + + target.push(startChunkForTag('textarea')); + var value = null; + var defaultValue = null; var children = null; - var innerHTML = null; for (var propKey in props) { if (hasOwnProperty.call(props, propKey)) { @@ -3564,34 +3607,140 @@ function pushStartGenericElement(target, props, tag) { children = propValue; break; - case 'dangerouslySetInnerHTML': - innerHTML = propValue; + case 'value': + value = propValue; + break; + + case 'defaultValue': + defaultValue = propValue; break; + case 'dangerouslySetInnerHTML': + throw new Error('`dangerouslySetInnerHTML` does not make sense on <textarea>.'); + // eslint-disable-next-line-no-fallthrough + default: - pushAttribute(target, propKey, propValue); + pushAttribute(target, responseState, propKey, propValue); break; } } } - target.push(endOfStartTag); - pushInnerHTML(target, innerHTML, children); - - if (typeof children === 'string') { - // Special case children as a string to avoid the unnecessary comment. - // TODO: Remove this special case after the general optimization is in place. - target.push(stringToChunk(encodeHTMLTextNode(children))); - return null; + if (value === null && defaultValue !== null) { + value = defaultValue; } - return children; + target.push(endOfStartTag); // TODO (yungsters): Remove support for children content in <textarea>. + + if (children != null) { + { + error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.'); + } + + if (value != null) { + throw new Error('If you supply `defaultValue` on a <textarea>, do not pass children.'); + } + + if (isArray(children)) { + if (children.length > 1) { + throw new Error('<textarea> can only have at most one child.'); + } // TODO: remove the coercion and the DEV check below because it will + // always be overwritten by the coercion several lines below it. #22309 + + + { + checkHtmlStringCoercion(children[0]); + } + + value = '' + children[0]; + } + + { + checkHtmlStringCoercion(children); + } + + value = '' + children; + } + + if (typeof value === 'string' && value[0] === '\n') { + // text/html ignores the first character in these tags if it's a newline + // Prefer to break application/xml over text/html (for now) by adding + // a newline specifically to get eaten by the parser. (Alternately for + // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first + // \r is normalized out by HTMLTextAreaElement#value.) + // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre> + // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions> + // See: <http://www.w3.org/TR/html5/syntax.html#newlines> + // See: Parsing of "textarea" "listing" and "pre" elements + // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody> + target.push(leadingNewline); + } // ToString and push directly instead of recurse over children. + // We don't really support complex children in the value anyway. + // This also currently avoids a trailing comment node which breaks textarea. + + + if (value !== null) { + { + checkAttributeStringCoercion(value, 'value'); + } + + target.push(stringToChunk(encodeHTMLTextNode('' + value))); + } + + return null; } -function pushStartCustomElement(target, props, tag) { - target.push(startChunkForTag(tag)); - var children = null; - var innerHTML = null; +function pushBase(target, props, responseState, textEmbedded, noscriptTagInScope) { + if ( !noscriptTagInScope && resourcesFromElement('base', props)) { + if (textEmbedded) { + // This link follows text but we aren't writing a tag. while not as efficient as possible we need + // to be safe and assume text will follow by inserting a textSeparator + target.push(textSeparator); + } // We have converted this link exclusively to a resource and no longer + // need to emit it + + + return null; + } + + return pushSelfClosing(target, props, 'base', responseState); +} + +function pushMeta(target, props, responseState, textEmbedded, noscriptTagInScope) { + if ( !noscriptTagInScope && resourcesFromElement('meta', props)) { + if (textEmbedded) { + // This link follows text but we aren't writing a tag. while not as efficient as possible we need + // to be safe and assume text will follow by inserting a textSeparator + target.push(textSeparator); + } // We have converted this link exclusively to a resource and no longer + // need to emit it + + + return null; + } + + return pushSelfClosing(target, props, 'meta', responseState); +} + +function pushLink(target, props, responseState, textEmbedded, noscriptTagInScope) { + if ( !noscriptTagInScope && resourcesFromLink(props)) { + if (textEmbedded) { + // This link follows text but we aren't writing a tag. while not as efficient as possible we need + // to be safe and assume text will follow by inserting a textSeparator + target.push(textSeparator); + } // We have converted this link exclusively to a resource and no longer + // need to emit it + + + return null; + } + + return pushLinkImpl(target, props, responseState); +} + +function pushLinkImpl(target, props, responseState) { + var isStylesheet = props.rel === 'stylesheet'; + target.push(startChunkForTag('link')); for (var propKey in props) { if (hasOwnProperty.call(props, propKey)) { @@ -3603,43 +3752,32 @@ function pushStartCustomElement(target, props, tag) { switch (propKey) { case 'children': - children = propValue; - break; - case 'dangerouslySetInnerHTML': - innerHTML = propValue; - break; - - case 'style': - pushStyleAttribute(target, propValue); - break; + throw new Error('link' + " is a self-closing tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.'); - case 'suppressContentEditableWarning': - case 'suppressHydrationWarning': - // Ignored. These are built-in to React on the client. - break; + case 'precedence': + { + if ( isStylesheet) { + // precedence is a reversed property for stylesheets to opt-into resource semantcs + continue; + } // intentionally fall through - default: - if (isAttributeNameSafe(propKey) && typeof propValue !== 'function' && typeof propValue !== 'symbol') { - target.push(attributeSeparator, stringToChunk(propKey), attributeAssign, stringToChunk(escapeTextForBrowser(propValue)), attributeEnd); } + // eslint-disable-next-line-no-fallthrough + default: + pushAttribute(target, responseState, propKey, propValue); break; } } } - target.push(endOfStartTag); - pushInnerHTML(target, innerHTML, children); - return children; + target.push(endOfStartTagSelfClosing); + return null; } -var leadingNewline = stringToPrecomputedChunk('\n'); - -function pushStartPreformattedElement(target, props, tag) { +function pushSelfClosing(target, props, tag, responseState) { target.push(startChunkForTag(tag)); - var children = null; - var innerHTML = null; for (var propKey in props) { if (hasOwnProperty.call(props, propKey)) { @@ -3651,1731 +3789,1379 @@ function pushStartPreformattedElement(target, props, tag) { switch (propKey) { case 'children': - children = propValue; - break; - case 'dangerouslySetInnerHTML': - innerHTML = propValue; - break; + throw new Error(tag + " is a self-closing tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.'); + // eslint-disable-next-line-no-fallthrough default: - pushAttribute(target, propKey, propValue); + pushAttribute(target, responseState, propKey, propValue); break; } } } - target.push(endOfStartTag); // text/html ignores the first character in these tags if it's a newline - // Prefer to break application/xml over text/html (for now) by adding - // a newline specifically to get eaten by the parser. (Alternately for - // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first - // \r is normalized out by HTMLTextAreaElement#value.) - // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre> - // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions> - // See: <http://www.w3.org/TR/html5/syntax.html#newlines> - // See: Parsing of "textarea" "listing" and "pre" elements - // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody> - // TODO: This doesn't deal with the case where the child is an array - // or component that returns a string. + target.push(endOfStartTagSelfClosing); + return null; +} - if (innerHTML != null) { - if (children != null) { - throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.'); - } +function pushStartMenuItem(target, props, responseState) { + target.push(startChunkForTag('menuitem')); - if (typeof innerHTML !== 'object' || !('__html' in innerHTML)) { - throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' + 'for more information.'); - } + for (var propKey in props) { + if (hasOwnProperty.call(props, propKey)) { + var propValue = props[propKey]; - var html = innerHTML.__html; + if (propValue == null) { + continue; + } - if (html !== null && html !== undefined) { - if (typeof html === 'string' && html.length > 0 && html[0] === '\n') { - target.push(leadingNewline, stringToChunk(html)); - } else { - { - checkHtmlStringCoercion(html); - } + switch (propKey) { + case 'children': + case 'dangerouslySetInnerHTML': + throw new Error('menuitems cannot have `children` nor `dangerouslySetInnerHTML`.'); + // eslint-disable-next-line-no-fallthrough - target.push(stringToChunk('' + html)); + default: + pushAttribute(target, responseState, propKey, propValue); + break; } } } - if (typeof children === 'string' && children[0] === '\n') { - target.push(leadingNewline); - } - - return children; -} // We accept any tag to be rendered but since this gets injected into arbitrary -// HTML, we want to make sure that it's a safe tag. -// http://www.w3.org/TR/REC-xml/#NT-Name - - -var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset - -var validatedTagCache = new Map(); + target.push(endOfStartTag); + return null; +} -function startChunkForTag(tag) { - var tagStartChunk = validatedTagCache.get(tag); +function pushTitle(target, props, responseState, insertionMode, noscriptTagInScope) { + { + var children = props.children; + var childForValidation = Array.isArray(children) && children.length < 2 ? children[0] || null : children; - if (tagStartChunk === undefined) { - if (!VALID_TAG_REGEX.test(tag)) { - throw new Error("Invalid tag: " + tag); + if (Array.isArray(children) && children.length > 1) { + error('A title element received an array with more than 1 element as children. ' + 'In browsers title Elements can only have Text Nodes as children. If ' + 'the children being rendered output more than a single text node in aggregate the browser ' + 'will display markup and comments as text in the title and hydration will likely fail and ' + 'fall back to client rendering'); + } else if (childForValidation != null && childForValidation.$$typeof != null) { + error('A title element received a React element for children. ' + 'In the browser title Elements can only have Text Nodes as children. If ' + 'the children being rendered output more than a single text node in aggregate the browser ' + 'will display markup and comments as text in the title and hydration will likely fail and ' + 'fall back to client rendering'); + } else if (childForValidation != null && typeof childForValidation !== 'string' && typeof childForValidation !== 'number') { + error('A title element received a value that was not a string or number for children. ' + 'In the browser title Elements can only have Text Nodes as children. If ' + 'the children being rendered output more than a single text node in aggregate the browser ' + 'will display markup and comments as text in the title and hydration will likely fail and ' + 'fall back to client rendering'); } + } - tagStartChunk = stringToPrecomputedChunk('<' + tag); - validatedTagCache.set(tag, tagStartChunk); + if ( // title is valid in SVG so we avoid resour + insertionMode !== SVG_MODE && !noscriptTagInScope && resourcesFromElement('title', props)) { + // We have converted this link exclusively to a resource and no longer + // need to emit it + return null; } - return tagStartChunk; + return pushTitleImpl(target, props, responseState); } -var DOCTYPE = stringToPrecomputedChunk('<!DOCTYPE html>'); -function pushStartInstance(target, type, props, resources, responseState, formatContext, textEmbedded) { - { - validateProperties(type, props); - validateProperties$1(type, props); - validateProperties$2(type, props, null); +function pushTitleImpl(target, props, responseState) { + target.push(startChunkForTag('title')); + var children = null; - if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) { - error('A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.'); - } + for (var propKey in props) { + if (hasOwnProperty.call(props, propKey)) { + var propValue = props[propKey]; - if (formatContext.insertionMode !== SVG_MODE && formatContext.insertionMode !== MATHML_MODE) { - if (type.indexOf('-') === -1 && typeof props.is !== 'string' && type.toLowerCase() !== type) { - error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type); + if (propValue == null) { + continue; + } + + switch (propKey) { + case 'children': + children = propValue; + break; + + case 'dangerouslySetInnerHTML': + throw new Error('`dangerouslySetInnerHTML` does not make sense on <title>.'); + // eslint-disable-next-line-no-fallthrough + + default: + pushAttribute(target, responseState, propKey, propValue); + break; } } } - switch (type) { - // Special tags - case 'select': - return pushStartSelect(target, props); + target.push(endOfStartTag); + var child = Array.isArray(children) ? children.length < 2 ? children[0] : null : children; - case 'option': - return pushStartOption(target, props, formatContext); + if (typeof child !== 'function' && typeof child !== 'symbol' && child !== null && child !== undefined) { + // eslint-disable-next-line react-internal/safe-string-coercion + target.push(stringToChunk(escapeTextForBrowser('' + child))); + } - case 'textarea': - return pushStartTextArea(target, props); + target.push(endTag1, stringToChunk('title'), endTag2); + return null; +} - case 'input': - return pushInput(target, props); +function pushStartHead(target, preamble, props, tag, responseState) { + return pushStartGenericElement( preamble , props, tag, responseState); +} - case 'menuitem': - return pushStartMenuItem(target, props); +function pushStartHtml(target, preamble, props, tag, responseState, formatContext) { + target = preamble ; - case 'title': - return pushTitle(target, props, responseState, formatContext.insertionMode, formatContext.noscriptTagInScope) ; + if (formatContext.insertionMode === ROOT_HTML_MODE) { + // If we're rendering the html tag and we're at the root (i.e. not in foreignObject) + // then we also emit the DOCTYPE as part of the root content as a convenience for + // rendering the whole document. + target.push(DOCTYPE); + } - case 'link': - return pushLink(target, props, responseState, resources, textEmbedded, formatContext.insertionMode, formatContext.noscriptTagInScope); + return pushStartGenericElement(target, props, tag, responseState); +} - case 'script': - return pushScript(target, props, resources, textEmbedded, formatContext.insertionMode, formatContext.noscriptTagInScope) ; - - case 'style': - return pushStyle(target, props, resources, textEmbedded, formatContext.insertionMode, formatContext.noscriptTagInScope); - - case 'meta': - return pushMeta(target, props, responseState, textEmbedded, formatContext.insertionMode, formatContext.noscriptTagInScope); - // Newline eating tags - - case 'listing': - case 'pre': - { - return pushStartPreformattedElement(target, props, type); - } - // Omitted close tags - - case 'base': - case 'area': - case 'br': - case 'col': - case 'embed': - case 'hr': - case 'img': - case 'keygen': - case 'param': - case 'source': - case 'track': - case 'wbr': - { - return pushSelfClosing(target, props, type); - } - // These are reserved SVG and MathML elements, that are never custom elements. - // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts - - case 'annotation-xml': - case 'color-profile': - case 'font-face': - case 'font-face-src': - case 'font-face-uri': - case 'font-face-format': - case 'font-face-name': - case 'missing-glyph': - { - return pushStartGenericElement(target, props, type); - } - // Preamble start tags - - case 'head': - return pushStartHead(target, props, responseState, formatContext.insertionMode); - - case 'html': - { - return pushStartHtml(target, props, responseState, formatContext.insertionMode); - } - - default: - { - if (type.indexOf('-') === -1 && typeof props.is !== 'string') { - // Generic element - return pushStartGenericElement(target, props, type); - } else { - // Custom element - return pushStartCustomElement(target, props, type); - } - } - } -} -var endTag1 = stringToPrecomputedChunk('</'); -var endTag2 = stringToPrecomputedChunk('>'); -function pushEndInstance(target, type, props, responseState, formatContext) { - switch (type) { - // When float is on we expect title and script tags to always be pushed in - // a unit and never return children. when we end up pushing the end tag we - // want to ensure there is no extra closing tag pushed - case 'title': - case 'style': - case 'script': - // Omitted close tags - // TODO: Instead of repeating this switch we could try to pass a flag from above. - // That would require returning a tuple. Which might be ok if it gets inlined. - // eslint-disable-next-line-no-fallthrough - - case 'area': - case 'base': - case 'br': - case 'col': - case 'embed': - case 'hr': - case 'img': - case 'input': - case 'keygen': - case 'link': - case 'meta': - case 'param': - case 'source': - case 'track': - case 'wbr': - { - // No close tag needed. - return; - } - // Postamble end tags - // When float is enabled we omit the end tags for body and html when - // they represent the Document.body and Document.documentElement Nodes. - // This is so we can withhold them until the postamble when we know - // we won't emit any more tags - - case 'body': - { - if ( formatContext.insertionMode <= HTML_HTML_MODE) { - responseState.hasBody = true; - return; - } - - break; - } - - case 'html': - if ( formatContext.insertionMode === ROOT_HTML_MODE) { - return; - } - - break; - } - - target.push(endTag1, stringToChunk(type), endTag2); -} -function writeCompletedRoot(destination, responseState) { - var bootstrapChunks = responseState.bootstrapChunks; - var i = 0; - - for (; i < bootstrapChunks.length - 1; i++) { - writeChunk(destination, bootstrapChunks[i]); - } - - if (i < bootstrapChunks.length) { - return writeChunkAndReturn(destination, bootstrapChunks[i]); - } - - return true; -} // Structural Nodes -// A placeholder is a node inside a hidden partial tree that can be filled in later, but before -// display. It's never visible to users. We use the template tag because it can be used in every -// type of parent. <script> tags also work in every other tag except <colgroup>. - -var placeholder1 = stringToPrecomputedChunk('<template id="'); -var placeholder2 = stringToPrecomputedChunk('"></template>'); -function writePlaceholder(destination, responseState, id) { - writeChunk(destination, placeholder1); - writeChunk(destination, responseState.placeholderPrefix); - var formattedID = stringToChunk(id.toString(16)); - writeChunk(destination, formattedID); - return writeChunkAndReturn(destination, placeholder2); -} // Suspense boundaries are encoded as comments. - -var startCompletedSuspenseBoundary = stringToPrecomputedChunk('<!--$-->'); -var startPendingSuspenseBoundary1 = stringToPrecomputedChunk('<!--$?--><template id="'); -var startPendingSuspenseBoundary2 = stringToPrecomputedChunk('"></template>'); -var startClientRenderedSuspenseBoundary = stringToPrecomputedChunk('<!--$!-->'); -var endSuspenseBoundary = stringToPrecomputedChunk('<!--/$-->'); -var clientRenderedSuspenseBoundaryError1 = stringToPrecomputedChunk('<template'); -var clientRenderedSuspenseBoundaryErrorAttrInterstitial = stringToPrecomputedChunk('"'); -var clientRenderedSuspenseBoundaryError1A = stringToPrecomputedChunk(' data-dgst="'); -var clientRenderedSuspenseBoundaryError1B = stringToPrecomputedChunk(' data-msg="'); -var clientRenderedSuspenseBoundaryError1C = stringToPrecomputedChunk(' data-stck="'); -var clientRenderedSuspenseBoundaryError2 = stringToPrecomputedChunk('></template>'); -function writeStartCompletedSuspenseBoundary(destination, responseState) { - return writeChunkAndReturn(destination, startCompletedSuspenseBoundary); -} -function writeStartPendingSuspenseBoundary(destination, responseState, id) { - writeChunk(destination, startPendingSuspenseBoundary1); - - if (id === null) { - throw new Error('An ID must have been assigned before we can complete the boundary.'); - } - - writeChunk(destination, id); - return writeChunkAndReturn(destination, startPendingSuspenseBoundary2); -} -function writeStartClientRenderedSuspenseBoundary(destination, responseState, errorDigest, errorMesssage, errorComponentStack) { - var result; - result = writeChunkAndReturn(destination, startClientRenderedSuspenseBoundary); - writeChunk(destination, clientRenderedSuspenseBoundaryError1); - - if (errorDigest) { - writeChunk(destination, clientRenderedSuspenseBoundaryError1A); - writeChunk(destination, stringToChunk(escapeTextForBrowser(errorDigest))); - writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial); - } - - { - if (errorMesssage) { - writeChunk(destination, clientRenderedSuspenseBoundaryError1B); - writeChunk(destination, stringToChunk(escapeTextForBrowser(errorMesssage))); - writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial); - } - - if (errorComponentStack) { - writeChunk(destination, clientRenderedSuspenseBoundaryError1C); - writeChunk(destination, stringToChunk(escapeTextForBrowser(errorComponentStack))); - writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial); - } - } - - result = writeChunkAndReturn(destination, clientRenderedSuspenseBoundaryError2); - return result; -} -function writeEndCompletedSuspenseBoundary(destination, responseState) { - return writeChunkAndReturn(destination, endSuspenseBoundary); -} -function writeEndPendingSuspenseBoundary(destination, responseState) { - return writeChunkAndReturn(destination, endSuspenseBoundary); -} -function writeEndClientRenderedSuspenseBoundary(destination, responseState) { - return writeChunkAndReturn(destination, endSuspenseBoundary); -} -var startSegmentHTML = stringToPrecomputedChunk('<div hidden id="'); -var startSegmentHTML2 = stringToPrecomputedChunk('">'); -var endSegmentHTML = stringToPrecomputedChunk('</div>'); -var startSegmentSVG = stringToPrecomputedChunk('<svg aria-hidden="true" style="display:none" id="'); -var startSegmentSVG2 = stringToPrecomputedChunk('">'); -var endSegmentSVG = stringToPrecomputedChunk('</svg>'); -var startSegmentMathML = stringToPrecomputedChunk('<math aria-hidden="true" style="display:none" id="'); -var startSegmentMathML2 = stringToPrecomputedChunk('">'); -var endSegmentMathML = stringToPrecomputedChunk('</math>'); -var startSegmentTable = stringToPrecomputedChunk('<table hidden id="'); -var startSegmentTable2 = stringToPrecomputedChunk('">'); -var endSegmentTable = stringToPrecomputedChunk('</table>'); -var startSegmentTableBody = stringToPrecomputedChunk('<table hidden><tbody id="'); -var startSegmentTableBody2 = stringToPrecomputedChunk('">'); -var endSegmentTableBody = stringToPrecomputedChunk('</tbody></table>'); -var startSegmentTableRow = stringToPrecomputedChunk('<table hidden><tr id="'); -var startSegmentTableRow2 = stringToPrecomputedChunk('">'); -var endSegmentTableRow = stringToPrecomputedChunk('</tr></table>'); -var startSegmentColGroup = stringToPrecomputedChunk('<table hidden><colgroup id="'); -var startSegmentColGroup2 = stringToPrecomputedChunk('">'); -var endSegmentColGroup = stringToPrecomputedChunk('</colgroup></table>'); -function writeStartSegment(destination, responseState, formatContext, id) { - switch (formatContext.insertionMode) { - case ROOT_HTML_MODE: - case HTML_HTML_MODE: - case HTML_MODE: - { - writeChunk(destination, startSegmentHTML); - writeChunk(destination, responseState.segmentPrefix); - writeChunk(destination, stringToChunk(id.toString(16))); - return writeChunkAndReturn(destination, startSegmentHTML2); - } - - case SVG_MODE: - { - writeChunk(destination, startSegmentSVG); - writeChunk(destination, responseState.segmentPrefix); - writeChunk(destination, stringToChunk(id.toString(16))); - return writeChunkAndReturn(destination, startSegmentSVG2); - } - - case MATHML_MODE: - { - writeChunk(destination, startSegmentMathML); - writeChunk(destination, responseState.segmentPrefix); - writeChunk(destination, stringToChunk(id.toString(16))); - return writeChunkAndReturn(destination, startSegmentMathML2); - } - - case HTML_TABLE_MODE: - { - writeChunk(destination, startSegmentTable); - writeChunk(destination, responseState.segmentPrefix); - writeChunk(destination, stringToChunk(id.toString(16))); - return writeChunkAndReturn(destination, startSegmentTable2); - } - // TODO: For the rest of these, there will be extra wrapper nodes that never - // get deleted from the document. We need to delete the table too as part - // of the injected scripts. They are invisible though so it's not too terrible - // and it's kind of an edge case to suspend in a table. Totally supported though. - - case HTML_TABLE_BODY_MODE: - { - writeChunk(destination, startSegmentTableBody); - writeChunk(destination, responseState.segmentPrefix); - writeChunk(destination, stringToChunk(id.toString(16))); - return writeChunkAndReturn(destination, startSegmentTableBody2); - } - - case HTML_TABLE_ROW_MODE: - { - writeChunk(destination, startSegmentTableRow); - writeChunk(destination, responseState.segmentPrefix); - writeChunk(destination, stringToChunk(id.toString(16))); - return writeChunkAndReturn(destination, startSegmentTableRow2); - } - - case HTML_COLGROUP_MODE: - { - writeChunk(destination, startSegmentColGroup); - writeChunk(destination, responseState.segmentPrefix); - writeChunk(destination, stringToChunk(id.toString(16))); - return writeChunkAndReturn(destination, startSegmentColGroup2); - } - - default: - { - throw new Error('Unknown insertion mode. This is a bug in React.'); - } - } -} -function writeEndSegment(destination, formatContext) { - switch (formatContext.insertionMode) { - case ROOT_HTML_MODE: - case HTML_HTML_MODE: - case HTML_MODE: - { - return writeChunkAndReturn(destination, endSegmentHTML); - } - - case SVG_MODE: - { - return writeChunkAndReturn(destination, endSegmentSVG); - } - - case MATHML_MODE: - { - return writeChunkAndReturn(destination, endSegmentMathML); - } - - case HTML_TABLE_MODE: - { - return writeChunkAndReturn(destination, endSegmentTable); - } - - case HTML_TABLE_BODY_MODE: - { - return writeChunkAndReturn(destination, endSegmentTableBody); - } - - case HTML_TABLE_ROW_MODE: - { - return writeChunkAndReturn(destination, endSegmentTableRow); - } - - case HTML_COLGROUP_MODE: - { - return writeChunkAndReturn(destination, endSegmentColGroup); - } - - default: - { - throw new Error('Unknown insertion mode. This is a bug in React.'); - } - } -} -var completeSegmentScript1Full = stringToPrecomputedChunk(completeSegment + ';$RS("'); -var completeSegmentScript1Partial = stringToPrecomputedChunk('$RS("'); -var completeSegmentScript2 = stringToPrecomputedChunk('","'); -var completeSegmentScriptEnd = stringToPrecomputedChunk('")</script>'); -function writeCompletedSegmentInstruction(destination, responseState, contentSegmentID) { - - { - writeChunk(destination, responseState.startInlineScript); - - if ((responseState.instructions & SentCompleteSegmentFunction) === NothingSent) { - // The first time we write this, we'll need to include the full implementation. - responseState.instructions |= SentCompleteSegmentFunction; - writeChunk(destination, completeSegmentScript1Full); - } else { - // Future calls can just reuse the same function. - writeChunk(destination, completeSegmentScript1Partial); - } - } // Write function arguments, which are string literals - - - writeChunk(destination, responseState.segmentPrefix); - var formattedID = stringToChunk(contentSegmentID.toString(16)); - writeChunk(destination, formattedID); - - { - writeChunk(destination, completeSegmentScript2); - } - - writeChunk(destination, responseState.placeholderPrefix); - writeChunk(destination, formattedID); - - { - return writeChunkAndReturn(destination, completeSegmentScriptEnd); - } -} -var completeBoundaryScript1Full = stringToPrecomputedChunk(completeBoundary + '$RC("'); -var completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC("'); -var completeBoundaryWithStylesScript1FullBoth = stringToPrecomputedChunk(completeBoundary + completeBoundaryWithStyles + '$RR("'); -var completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk(completeBoundaryWithStyles + '$RR("'); -var completeBoundaryWithStylesScript1Partial = stringToPrecomputedChunk('$RR("'); -var completeBoundaryScript2 = stringToPrecomputedChunk('","'); -var completeBoundaryScript3a = stringToPrecomputedChunk('",'); -var completeBoundaryScript3b = stringToPrecomputedChunk('"'); -var completeBoundaryScriptEnd = stringToPrecomputedChunk(')</script>'); -function writeCompletedBoundaryInstruction(destination, responseState, boundaryID, contentSegmentID, boundaryResources) { - var hasStyleDependencies; - - { - hasStyleDependencies = hasStyleResourceDependencies(boundaryResources); - } - - { - writeChunk(destination, responseState.startInlineScript); - - if ( hasStyleDependencies) { - if ((responseState.instructions & SentCompleteBoundaryFunction) === NothingSent) { - responseState.instructions |= SentStyleInsertionFunction | SentCompleteBoundaryFunction; - writeChunk(destination, clonePrecomputedChunk(completeBoundaryWithStylesScript1FullBoth)); - } else if ((responseState.instructions & SentStyleInsertionFunction) === NothingSent) { - responseState.instructions |= SentStyleInsertionFunction; - writeChunk(destination, completeBoundaryWithStylesScript1FullPartial); - } else { - writeChunk(destination, completeBoundaryWithStylesScript1Partial); - } - } else { - if ((responseState.instructions & SentCompleteBoundaryFunction) === NothingSent) { - responseState.instructions |= SentCompleteBoundaryFunction; - writeChunk(destination, completeBoundaryScript1Full); - } else { - writeChunk(destination, completeBoundaryScript1Partial); - } - } - } - - if (boundaryID === null) { - throw new Error('An ID must have been assigned before we can complete the boundary.'); - } // Write function arguments, which are string and array literals - - - var formattedContentID = stringToChunk(contentSegmentID.toString(16)); - writeChunk(destination, boundaryID); - - { - writeChunk(destination, completeBoundaryScript2); - } - - writeChunk(destination, responseState.segmentPrefix); - writeChunk(destination, formattedContentID); - - if ( hasStyleDependencies) { - // Script and data writers must format this differently: - // - script writer emits an array literal, whose string elements are - // escaped for javascript e.g. ["A", "B"] - // - data writer emits a string literal, which is escaped as html - // e.g. ["A", "B"] - { - writeChunk(destination, completeBoundaryScript3a); // boundaryResources encodes an array literal - - writeStyleResourceDependenciesInJS(destination, boundaryResources); - } - } else { - { - writeChunk(destination, completeBoundaryScript3b); - } - } - - { - return writeChunkAndReturn(destination, completeBoundaryScriptEnd); - } -} -var clientRenderScript1Full = stringToPrecomputedChunk(clientRenderBoundary + ';$RX("'); -var clientRenderScript1Partial = stringToPrecomputedChunk('$RX("'); -var clientRenderScript1A = stringToPrecomputedChunk('"'); -var clientRenderErrorScriptArgInterstitial = stringToPrecomputedChunk(','); -var clientRenderScriptEnd = stringToPrecomputedChunk(')</script>'); -function writeClientRenderBoundaryInstruction(destination, responseState, boundaryID, errorDigest, errorMessage, errorComponentStack) { - - { - writeChunk(destination, responseState.startInlineScript); - - if ((responseState.instructions & SentClientRenderFunction) === NothingSent) { - // The first time we write this, we'll need to include the full implementation. - responseState.instructions |= SentClientRenderFunction; - writeChunk(destination, clientRenderScript1Full); - } else { - // Future calls can just reuse the same function. - writeChunk(destination, clientRenderScript1Partial); - } - } - - if (boundaryID === null) { - throw new Error('An ID must have been assigned before we can complete the boundary.'); - } - - writeChunk(destination, boundaryID); - - { - // " needs to be inserted for scripts, since ArgInterstitual does not contain - // leading or trailing quotes - writeChunk(destination, clientRenderScript1A); - } - - if (errorDigest || errorMessage || errorComponentStack) { - { - // ,"JSONString" - writeChunk(destination, clientRenderErrorScriptArgInterstitial); - writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorDigest || ''))); - } - } - - if (errorMessage || errorComponentStack) { - { - // ,"JSONString" - writeChunk(destination, clientRenderErrorScriptArgInterstitial); - writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorMessage || ''))); - } - } +function pushScript(target, props, responseState, textEmbedded, noscriptTagInScope) { + if ( !noscriptTagInScope && resourcesFromScript(props)) { + if (textEmbedded) { + // This link follows text but we aren't writing a tag. while not as efficient as possible we need + // to be safe and assume text will follow by inserting a textSeparator + target.push(textSeparator); + } // We have converted this link exclusively to a resource and no longer + // need to emit it - if (errorComponentStack) { - // ,"JSONString" - { - writeChunk(destination, clientRenderErrorScriptArgInterstitial); - writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorComponentStack))); - } - } - { - // ></script> - return writeChunkAndReturn(destination, clientRenderScriptEnd); + return null; } + + return pushScriptImpl(target, props, responseState); } -var regexForJSStringsInInstructionScripts = /[<\u2028\u2029]/g; -function escapeJSStringsForInstructionScripts(input) { - var escaped = JSON.stringify(input); - return escaped.replace(regexForJSStringsInInstructionScripts, function (match) { - switch (match) { - // santizing breaking out of strings and script tags - case '<': - return "\\u003c"; +function pushScriptImpl(target, props, responseState) { + target.push(startChunkForTag('script')); + var children = null; + var innerHTML = null; - case "\u2028": - return "\\u2028"; + for (var propKey in props) { + if (hasOwnProperty.call(props, propKey)) { + var propValue = props[propKey]; - case "\u2029": - return "\\u2029"; + if (propValue == null) { + continue; + } - default: - { - // eslint-disable-next-line react-internal/prod-error-codes - throw new Error('escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React'); - } - } - }); -} + switch (propKey) { + case 'children': + children = propValue; + break; -var regexForJSStringsInScripts = /[&><\u2028\u2029]/g; + case 'dangerouslySetInnerHTML': + innerHTML = propValue; + break; -function escapeJSObjectForInstructionScripts(input) { - var escaped = JSON.stringify(input); - return escaped.replace(regexForJSStringsInScripts, function (match) { - switch (match) { - // santizing breaking out of strings and script tags - case '&': - return "\\u0026"; + default: + pushAttribute(target, responseState, propKey, propValue); + break; + } + } + } - case '>': - return "\\u003e"; + target.push(endOfStartTag); - case '<': - return "\\u003c"; + { + if (children != null && typeof children !== 'string') { + var descriptiveStatement = typeof children === 'number' ? 'a number for children' : Array.isArray(children) ? 'an array for children' : 'something unexpected for children'; - case "\u2028": - return "\\u2028"; + error('A script element was rendered with %s. If script element has children it must be a single string.' + ' Consider using dangerouslySetInnerHTML or passing a plain string as children.', descriptiveStatement); + } + } - case "\u2029": - return "\\u2029"; + pushInnerHTML(target, innerHTML, children); - default: - { - // eslint-disable-next-line react-internal/prod-error-codes - throw new Error('escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React'); - } - } - }); + if (typeof children === 'string') { + target.push(stringToChunk(encodeHTMLTextNode(children))); + } + + target.push(endTag1, stringToChunk('script'), endTag2); + return null; } -var styleTagTemplateOpen = stringToPrecomputedChunk('<template data-precedence="">'); -var styleTagTemplateClose = stringToPrecomputedChunk('</template>'); // Tracks whether we wrote any late style tags. We use this to determine -// whether we need to emit a closing template tag after flushing late style tags +function pushStartGenericElement(target, props, tag, responseState) { + target.push(startChunkForTag(tag)); + var children = null; + var innerHTML = null; -var didWrite = false; + for (var propKey in props) { + if (hasOwnProperty.call(props, propKey)) { + var propValue = props[propKey]; -function flushStyleTagsLateForBoundary(resource) { - if (resource.type === 'style' && (resource.state & Flushed) === NoState) { - if (didWrite === false) { - // we are going to write so we need to emit the open tag - didWrite = true; - writeChunk(this, styleTagTemplateOpen); - } // This <style> tag can be flushed now + if (propValue == null) { + continue; + } + switch (propKey) { + case 'children': + children = propValue; + break; - var chunks = resource.chunks; + case 'dangerouslySetInnerHTML': + innerHTML = propValue; + break; - for (var i = 0; i < chunks.length; i++) { - writeChunk(this, chunks[i]); + default: + pushAttribute(target, responseState, propKey, propValue); + break; + } } - - resource.state |= FlushedLate; } -} -function writeResourcesForBoundary(destination, boundaryResources) { - didWrite = false; - boundaryResources.forEach(flushStyleTagsLateForBoundary, destination); + target.push(endOfStartTag); + pushInnerHTML(target, innerHTML, children); - if (didWrite) { - return writeChunkAndReturn(destination, styleTagTemplateClose); - } else { - return true; + if (typeof children === 'string') { + // Special case children as a string to avoid the unnecessary comment. + // TODO: Remove this special case after the general optimization is in place. + target.push(stringToChunk(encodeHTMLTextNode(children))); + return null; } -} -var precedencePlaceholderStart = stringToPrecomputedChunk('<style data-precedence="'); -var precedencePlaceholderEnd = stringToPrecomputedChunk('"></style>'); -function flushResourceInPreamble(resource) { - if ((resource.state & (Flushed | Blocked)) === NoState) { - var chunks = resource.chunks; - - for (var i = 0; i < chunks.length; i++) { - writeChunk(this, chunks[i]); - } - - resource.state |= FlushedInPreamble; - } + return children; } -function flushResourceLate(resource) { - if ((resource.state & Flushed) === NoState) { - var chunks = resource.chunks; +function pushStartCustomElement(target, props, tag, responseState) { + target.push(startChunkForTag(tag)); + var children = null; + var innerHTML = null; - for (var i = 0; i < chunks.length; i++) { - writeChunk(this, chunks[i]); - } + for (var propKey in props) { + if (hasOwnProperty.call(props, propKey)) { + var propValue = props[propKey]; - resource.state |= FlushedLate; - } -} + if (propValue == null) { + continue; + } -var didFlush = false; + switch (propKey) { + case 'children': + children = propValue; + break; -function flushUnblockedStyle(resource, key, set) { - var chunks = resource.chunks; + case 'dangerouslySetInnerHTML': + innerHTML = propValue; + break; - if (resource.state & Flushed) { - // In theory this should never happen because we clear from the - // Set on flush but to ensure correct semantics we don't emit - // anything if we are in this state. - set.delete(resource); - } else if (resource.state & Blocked) ; else { - didFlush = true; // We can emit this style or stylesheet as is. + case 'style': + pushStyle(target, responseState, propValue); + break; - if (resource.type === 'stylesheet') { - // We still need to encode stylesheet chunks - // because unlike most Hoistables and Resources we do not eagerly encode - // them during render. This is because if we flush late we have to send a - // different encoding and we don't want to encode multiple times - pushLinkImpl(chunks, resource.props); - } + case 'suppressContentEditableWarning': + case 'suppressHydrationWarning': + // Ignored. These are built-in to React on the client. + break; - for (var i = 0; i < chunks.length; i++) { - writeChunk(this, chunks[i]); - } + default: + if (isAttributeNameSafe(propKey) && typeof propValue !== 'function' && typeof propValue !== 'symbol') { + target.push(attributeSeparator, stringToChunk(propKey), attributeAssign, stringToChunk(escapeTextForBrowser(propValue)), attributeEnd); + } - resource.state |= FlushedInPreamble; - set.delete(resource); + break; + } + } } -} -function flushUnblockedStyles(set, precedence) { - didFlush = false; - set.forEach(flushUnblockedStyle, this); - - if (!didFlush) { - // if we did not flush anything for this precedence slot we emit - // an empty <style data-precedence="..." /> tag to ensure the - // precedence remains in the correct order - writeChunk(this, precedencePlaceholderStart); - writeChunk(this, stringToChunk(escapeTextForBrowser(precedence))); - writeChunk(this, precedencePlaceholderEnd); - } + target.push(endOfStartTag); + pushInnerHTML(target, innerHTML, children); + return children; } -function preloadBlockedStyle(resource) { - // The only Resources that should remain are Blocked resources - { - if ((resource.state & Blocked) === NoState) { - error('React encountered a Stylesheet Resource that was not Blocked when it was expected to be. This is a bug in React.'); - } else if (resource.state & PreloadFlushed) { - error('React encountered a Stylesheet Resource that already flushed a Preload when it was not expected to. This is a bug in React.'); - } - } +var leadingNewline = stringToPrecomputedChunk('\n'); - if (resource.type === 'style') { - // <style> tags do not need to be preloaded - return; - } +function pushStartPreformattedElement(target, props, tag, responseState) { + target.push(startChunkForTag(tag)); + var children = null; + var innerHTML = null; - var chunks = resource.chunks; - var preloadProps = preloadAsStylePropsFromProps(resource.props.href, resource.props); - pushLinkImpl(chunks, preloadProps); + for (var propKey in props) { + if (hasOwnProperty.call(props, propKey)) { + var propValue = props[propKey]; - for (var i = 0; i < chunks.length; i++) { - writeChunk(this, chunks[i]); - } + if (propValue == null) { + continue; + } - resource.state |= PreloadFlushed; - chunks.length = 0; -} + switch (propKey) { + case 'children': + children = propValue; + break; -function preloadBlockedStyles(set, precedence) { - set.forEach(preloadBlockedStyle, this); - set.clear(); -} + case 'dangerouslySetInnerHTML': + innerHTML = propValue; + break; -function preloadLateStyle(resource) { - { - if (resource.state & PreloadFlushed) { - error('React encountered a Stylesheet Resource that already flushed a Preload when it was not expected to. This is a bug in React.'); + default: + pushAttribute(target, responseState, propKey, propValue); + break; + } } } - if (resource.type === 'style') { - // <style> tags do not need to be preloaded - return; - } - - var chunks = resource.chunks; - var preloadProps = preloadAsStylePropsFromProps(resource.props.href, resource.props); - pushLinkImpl(chunks, preloadProps); + target.push(endOfStartTag); // text/html ignores the first character in these tags if it's a newline + // Prefer to break application/xml over text/html (for now) by adding + // a newline specifically to get eaten by the parser. (Alternately for + // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first + // \r is normalized out by HTMLTextAreaElement#value.) + // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre> + // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions> + // See: <http://www.w3.org/TR/html5/syntax.html#newlines> + // See: Parsing of "textarea" "listing" and "pre" elements + // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody> + // TODO: This doesn't deal with the case where the child is an array + // or component that returns a string. - for (var i = 0; i < chunks.length; i++) { - writeChunk(this, chunks[i]); - } + if (innerHTML != null) { + if (children != null) { + throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.'); + } - resource.state |= PreloadFlushed; - chunks.length = 0; -} + if (typeof innerHTML !== 'object' || !('__html' in innerHTML)) { + throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' + 'for more information.'); + } -function preloadLateStyles(set, precedence) { - set.forEach(preloadLateStyle, this); - set.clear(); -} // We don't bother reporting backpressure at the moment because we expect to -// flush the entire preamble in a single pass. This probably should be modified -// in the future to be backpressure sensitive but that requires a larger refactor -// of the flushing code in Fizz. + var html = innerHTML.__html; + if (html !== null && html !== undefined) { + if (typeof html === 'string' && html.length > 0 && html[0] === '\n') { + target.push(leadingNewline, stringToChunk(html)); + } else { + { + checkHtmlStringCoercion(html); + } -function writePreamble(destination, resources, responseState, willFlushAllSegments) { + target.push(stringToChunk('' + html)); + } + } + } - var htmlChunks = responseState.htmlChunks; - var headChunks = responseState.headChunks; - var i = 0; // Emit open tags before Hoistables and Resources + if (typeof children === 'string' && children[0] === '\n') { + target.push(leadingNewline); + } - if (htmlChunks) { - // We have an <html> to emit as part of the preamble - for (i = 0; i < htmlChunks.length; i++) { - writeChunk(destination, htmlChunks[i]); - } + return children; +} // We accept any tag to be rendered but since this gets injected into arbitrary +// HTML, we want to make sure that it's a safe tag. +// http://www.w3.org/TR/REC-xml/#NT-Name - if (headChunks) { - for (i = 0; i < headChunks.length; i++) { - writeChunk(destination, headChunks[i]); - } - } else { - // We did not render a head but we emitted an <html> so we emit one now - writeChunk(destination, startChunkForTag('head')); - writeChunk(destination, endOfStartTag); - } - } else if (headChunks) { - // We do not have an <html> but we do have a <head> - for (i = 0; i < headChunks.length; i++) { - writeChunk(destination, headChunks[i]); - } - } // Emit high priority Hoistables +var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset - var charsetChunks = responseState.charsetChunks; +var validatedTagCache = new Map(); - for (i = 0; i < charsetChunks.length; i++) { - writeChunk(destination, charsetChunks[i]); - } +function startChunkForTag(tag) { + var tagStartChunk = validatedTagCache.get(tag); - charsetChunks.length = 0; - var preconnectChunks = responseState.preconnectChunks; + if (tagStartChunk === undefined) { + if (!VALID_TAG_REGEX.test(tag)) { + throw new Error("Invalid tag: " + tag); + } - for (i = 0; i < preconnectChunks.length; i++) { - writeChunk(destination, preconnectChunks[i]); + tagStartChunk = stringToPrecomputedChunk('<' + tag); + validatedTagCache.set(tag, tagStartChunk); } - preconnectChunks.length = 0; - resources.fontPreloads.forEach(flushResourceInPreamble, destination); - resources.fontPreloads.clear(); // Flush unblocked stylesheets by precedence - - resources.precedences.forEach(flushUnblockedStyles, destination); // Flush preloads for Blocked stylesheets + return tagStartChunk; +} - resources.precedences.forEach(preloadBlockedStyles, destination); - resources.usedStylesheets.forEach(function (resource) { - var key = getResourceKey(resource.props.as, resource.props.href); +var DOCTYPE = stringToPrecomputedChunk('<!DOCTYPE html>'); +function pushStartInstance(target, preamble, type, props, responseState, formatContext, textEmbedded) { + { + validateProperties(type, props); + validateProperties$1(type, props); + validateProperties$2(type, props, null); - if (resources.stylesMap.has(key)) ; else { - var chunks = resource.chunks; + if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) { + error('A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.'); + } - for (i = 0; i < chunks.length; i++) { - writeChunk(destination, chunks[i]); + if (formatContext.insertionMode !== SVG_MODE && formatContext.insertionMode !== MATHML_MODE) { + if (type.indexOf('-') === -1 && typeof props.is !== 'string' && type.toLowerCase() !== type) { + error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type); } } - }); - resources.usedStylesheets.clear(); - resources.scripts.forEach(flushResourceInPreamble, destination); - resources.scripts.clear(); - resources.usedScripts.forEach(flushResourceInPreamble, destination); - resources.usedScripts.clear(); - resources.explicitStylesheetPreloads.forEach(flushResourceInPreamble, destination); - resources.explicitStylesheetPreloads.clear(); - resources.explicitScriptPreloads.forEach(flushResourceInPreamble, destination); - resources.explicitScriptPreloads.clear(); - resources.explicitOtherPreloads.forEach(flushResourceInPreamble, destination); - resources.explicitOtherPreloads.clear(); // Write embedding preloadChunks - - var preloadChunks = responseState.preloadChunks; - - for (i = 0; i < preloadChunks.length; i++) { - writeChunk(destination, preloadChunks[i]); } - preloadChunks.length = 0; // Write embedding hoistableChunks + switch (type) { + // Special tags + case 'select': + return pushStartSelect(target, props, responseState); - var hoistableChunks = responseState.hoistableChunks; + case 'option': + return pushStartOption(target, props, responseState, formatContext); - for (i = 0; i < hoistableChunks.length; i++) { - writeChunk(destination, hoistableChunks[i]); - } + case 'textarea': + return pushStartTextArea(target, props, responseState); - hoistableChunks.length = 0; // Flush closing head if necessary + case 'input': + return pushInput(target, props, responseState); - if (htmlChunks && headChunks === null) { - // We have an <html> rendered but no <head> rendered. We however inserted - // a <head> up above so we need to emit the </head> now. This is safe because - // if the main content contained the </head> it would also have provided a - // <head>. This means that all the content inside <html> is either <body> or - // invalid HTML - writeChunk(destination, endTag1); - writeChunk(destination, stringToChunk('head')); - writeChunk(destination, endTag2); - } -} // We don't bother reporting backpressure at the moment because we expect to -// flush the entire preamble in a single pass. This probably should be modified -// in the future to be backpressure sensitive but that requires a larger refactor -// of the flushing code in Fizz. + case 'menuitem': + return pushStartMenuItem(target, props, responseState); -function writeHoistables(destination, resources, responseState) { - var i = 0; // Emit high priority Hoistables - // We omit charsetChunks because we have already sent the shell and if it wasn't - // already sent it is too late now. + case 'title': + return pushTitle(target, props, responseState, formatContext.insertionMode, formatContext.noscriptTagInScope) ; - var preconnectChunks = responseState.preconnectChunks; + case 'link': + return pushLink(target, props, responseState, textEmbedded, formatContext.noscriptTagInScope); - for (i = 0; i < preconnectChunks.length; i++) { - writeChunk(destination, preconnectChunks[i]); - } + case 'script': + return pushScript(target, props, responseState, textEmbedded, formatContext.noscriptTagInScope) ; - preconnectChunks.length = 0; - resources.fontPreloads.forEach(flushResourceLate, destination); - resources.fontPreloads.clear(); // Preload any stylesheets. these will emit in a render instruction that follows this - // but we want to kick off preloading as soon as possible + case 'meta': + return pushMeta(target, props, responseState, textEmbedded, formatContext.noscriptTagInScope); - resources.precedences.forEach(preloadLateStyles, destination); - resources.usedStylesheets.forEach(function (resource) { - var key = getResourceKey(resource.props.as, resource.props.href); + case 'base': + return pushBase(target, props, responseState, textEmbedded, formatContext.noscriptTagInScope); + // Newline eating tags - if (resources.stylesMap.has(key)) ; else { - var chunks = resource.chunks; + case 'listing': + case 'pre': + { + return pushStartPreformattedElement(target, props, type, responseState); + } + // Omitted close tags - for (i = 0; i < chunks.length; i++) { - writeChunk(destination, chunks[i]); + case 'area': + case 'br': + case 'col': + case 'embed': + case 'hr': + case 'img': + case 'keygen': + case 'param': + case 'source': + case 'track': + case 'wbr': + { + return pushSelfClosing(target, props, type, responseState); } - } - }); - resources.usedStylesheets.clear(); - resources.scripts.forEach(flushResourceLate, destination); - resources.scripts.clear(); - resources.usedScripts.forEach(flushResourceLate, destination); - resources.usedScripts.clear(); - resources.explicitStylesheetPreloads.forEach(flushResourceLate, destination); - resources.explicitStylesheetPreloads.clear(); - resources.explicitScriptPreloads.forEach(flushResourceLate, destination); - resources.explicitScriptPreloads.clear(); - resources.explicitOtherPreloads.forEach(flushResourceLate, destination); - resources.explicitOtherPreloads.clear(); // Write embedding preloadChunks + // These are reserved SVG and MathML elements, that are never custom elements. + // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts + + case 'annotation-xml': + case 'color-profile': + case 'font-face': + case 'font-face-src': + case 'font-face-uri': + case 'font-face-format': + case 'font-face-name': + case 'missing-glyph': + { + return pushStartGenericElement(target, props, type, responseState); + } + // Preamble start tags - var preloadChunks = responseState.preloadChunks; + case 'head': + return pushStartHead(target, preamble, props, type, responseState); + + case 'html': + { + return pushStartHtml(target, preamble, props, type, responseState, formatContext); + } - for (i = 0; i < preloadChunks.length; i++) { - writeChunk(destination, preloadChunks[i]); + default: + { + if (type.indexOf('-') === -1 && typeof props.is !== 'string') { + // Generic element + return pushStartGenericElement(target, props, type, responseState); + } else { + // Custom element + return pushStartCustomElement(target, props, type, responseState); + } + } } +} +var endTag1 = stringToPrecomputedChunk('</'); +var endTag2 = stringToPrecomputedChunk('>'); +function pushEndInstance(target, postamble, type, props) { + switch (type) { + // When float is on we expect title and script tags to always be pushed in + // a unit and never return children. when we end up pushing the end tag we + // want to ensure there is no extra closing tag pushed + case 'title': + case 'script': + // Omitted close tags + // TODO: Instead of repeating this switch we could try to pass a flag from above. + // That would require returning a tuple. Which might be ok if it gets inlined. + // eslint-disable-next-line-no-fallthrough - preloadChunks.length = 0; // Write embedding hoistableChunks + case 'area': + case 'base': + case 'br': + case 'col': + case 'embed': + case 'hr': + case 'img': + case 'input': + case 'keygen': + case 'link': + case 'meta': + case 'param': + case 'source': + case 'track': + case 'wbr': + { + // No close tag needed. + return; + } + // Postamble end tags - var hoistableChunks = responseState.hoistableChunks; + case 'body': + { + { + postamble.unshift(endTag1, stringToChunk(type), endTag2); + return; + } + } - for (i = 0; i < hoistableChunks.length; i++) { - writeChunk(destination, hoistableChunks[i]); + case 'html': + { + postamble.push(endTag1, stringToChunk(type), endTag2); + return; + } } - hoistableChunks.length = 0; + target.push(endTag1, stringToChunk(type), endTag2); } -function writePostamble(destination, responseState) { - if (responseState.hasBody) { - writeChunk(destination, endTag1); - writeChunk(destination, stringToChunk('body')); - writeChunk(destination, endTag2); +function writeCompletedRoot(destination, responseState) { + var bootstrapChunks = responseState.bootstrapChunks; + var i = 0; + + for (; i < bootstrapChunks.length - 1; i++) { + writeChunk(destination, bootstrapChunks[i]); } - if (responseState.htmlChunks) { - writeChunk(destination, endTag1); - writeChunk(destination, stringToChunk('html')); - writeChunk(destination, endTag2); + if (i < bootstrapChunks.length) { + return writeChunkAndReturn(destination, bootstrapChunks[i]); } -} -function hasStyleResourceDependencies(boundaryResources) { - var iter = boundaryResources.values(); // At the moment boundaries only accumulate style resources - // so we assume the type is correct and don't check it + return true; +} // Structural Nodes +// A placeholder is a node inside a hidden partial tree that can be filled in later, but before +// display. It's never visible to users. We use the template tag because it can be used in every +// type of parent. <script> tags also work in every other tag except <colgroup>. - while (true) { - var _iter$next = iter.next(), - resource = _iter$next.value; +var placeholder1 = stringToPrecomputedChunk('<template id="'); +var placeholder2 = stringToPrecomputedChunk('"></template>'); +function writePlaceholder(destination, responseState, id) { + writeChunk(destination, placeholder1); + writeChunk(destination, responseState.placeholderPrefix); + var formattedID = stringToChunk(id.toString(16)); + writeChunk(destination, formattedID); + return writeChunkAndReturn(destination, placeholder2); +} // Suspense boundaries are encoded as comments. - if (!resource) break; // If every style Resource flushed in the shell we do not need to send - // any dependencies +var startCompletedSuspenseBoundary = stringToPrecomputedChunk('<!--$-->'); +var startPendingSuspenseBoundary1 = stringToPrecomputedChunk('<!--$?--><template id="'); +var startPendingSuspenseBoundary2 = stringToPrecomputedChunk('"></template>'); +var startClientRenderedSuspenseBoundary = stringToPrecomputedChunk('<!--$!-->'); +var endSuspenseBoundary = stringToPrecomputedChunk('<!--/$-->'); +var clientRenderedSuspenseBoundaryError1 = stringToPrecomputedChunk('<template'); +var clientRenderedSuspenseBoundaryErrorAttrInterstitial = stringToPrecomputedChunk('"'); +var clientRenderedSuspenseBoundaryError1A = stringToPrecomputedChunk(' data-dgst="'); +var clientRenderedSuspenseBoundaryError1B = stringToPrecomputedChunk(' data-msg="'); +var clientRenderedSuspenseBoundaryError1C = stringToPrecomputedChunk(' data-stck="'); +var clientRenderedSuspenseBoundaryError2 = stringToPrecomputedChunk('></template>'); +function writeStartCompletedSuspenseBoundary(destination, responseState) { + return writeChunkAndReturn(destination, startCompletedSuspenseBoundary); +} +function writeStartPendingSuspenseBoundary(destination, responseState, id) { + writeChunk(destination, startPendingSuspenseBoundary1); - if ((resource.state & FlushedInPreamble) === NoState) { - return true; - } + if (id === null) { + throw new Error('An ID must have been assigned before we can complete the boundary.'); } - return false; + writeChunk(destination, id); + return writeChunkAndReturn(destination, startPendingSuspenseBoundary2); } +function writeStartClientRenderedSuspenseBoundary(destination, responseState, errorDigest, errorMesssage, errorComponentStack) { + var result; + result = writeChunkAndReturn(destination, startClientRenderedSuspenseBoundary); + writeChunk(destination, clientRenderedSuspenseBoundaryError1); -var arrayFirstOpenBracket = stringToPrecomputedChunk('['); -var arraySubsequentOpenBracket = stringToPrecomputedChunk(',['); -var arrayInterstitial = stringToPrecomputedChunk(','); -var arrayCloseBracket = stringToPrecomputedChunk(']'); // This function writes a 2D array of strings to be embedded in javascript. -// E.g. -// [["JS_escaped_string1", "JS_escaped_string2"]] + if (errorDigest) { + writeChunk(destination, clientRenderedSuspenseBoundaryError1A); + writeChunk(destination, stringToChunk(escapeTextForBrowser(errorDigest))); + writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial); + } -function writeStyleResourceDependenciesInJS(destination, boundaryResources) { - writeChunk(destination, arrayFirstOpenBracket); - var nextArrayOpenBrackChunk = arrayFirstOpenBracket; - boundaryResources.forEach(function (resource) { - if (resource.state & FlushedInPreamble) ; else if (resource.state & Flushed) { - // We only need to emit the href because this resource flushed in an earlier - // boundary already which encoded the attributes necessary to construct - // the resource instance on the client. - writeChunk(destination, nextArrayOpenBrackChunk); - writeStyleResourceDependencyHrefOnlyInJS(destination, resource.type === 'style' ? resource.props['data-href'] : resource.props.href); - writeChunk(destination, arrayCloseBracket); - nextArrayOpenBrackChunk = arraySubsequentOpenBracket; - } else if (resource.type === 'stylesheet') { - // We need to emit the whole resource for insertion on the client - writeChunk(destination, nextArrayOpenBrackChunk); - writeStyleResourceDependencyInJS(destination, resource.props.href, resource.props['data-precedence'], resource.props); - writeChunk(destination, arrayCloseBracket); - nextArrayOpenBrackChunk = arraySubsequentOpenBracket; - resource.state |= FlushedLate; + { + if (errorMesssage) { + writeChunk(destination, clientRenderedSuspenseBoundaryError1B); + writeChunk(destination, stringToChunk(escapeTextForBrowser(errorMesssage))); + writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial); } - }); - writeChunk(destination, arrayCloseBracket); -} -/* Helper functions */ - -function writeStyleResourceDependencyHrefOnlyInJS(destination, href) { - // We should actually enforce this earlier when the resource is created but for - // now we make sure we are actually dealing with a string here. - { - checkAttributeStringCoercion(href, 'href'); + if (errorComponentStack) { + writeChunk(destination, clientRenderedSuspenseBoundaryError1C); + writeChunk(destination, stringToChunk(escapeTextForBrowser(errorComponentStack))); + writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial); + } } - var coercedHref = '' + href; - writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedHref))); + result = writeChunkAndReturn(destination, clientRenderedSuspenseBoundaryError2); + return result; } +function writeEndCompletedSuspenseBoundary(destination, responseState) { + return writeChunkAndReturn(destination, endSuspenseBoundary); +} +function writeEndPendingSuspenseBoundary(destination, responseState) { + return writeChunkAndReturn(destination, endSuspenseBoundary); +} +function writeEndClientRenderedSuspenseBoundary(destination, responseState) { + return writeChunkAndReturn(destination, endSuspenseBoundary); +} +var startSegmentHTML = stringToPrecomputedChunk('<div hidden id="'); +var startSegmentHTML2 = stringToPrecomputedChunk('">'); +var endSegmentHTML = stringToPrecomputedChunk('</div>'); +var startSegmentSVG = stringToPrecomputedChunk('<svg aria-hidden="true" style="display:none" id="'); +var startSegmentSVG2 = stringToPrecomputedChunk('">'); +var endSegmentSVG = stringToPrecomputedChunk('</svg>'); +var startSegmentMathML = stringToPrecomputedChunk('<math aria-hidden="true" style="display:none" id="'); +var startSegmentMathML2 = stringToPrecomputedChunk('">'); +var endSegmentMathML = stringToPrecomputedChunk('</math>'); +var startSegmentTable = stringToPrecomputedChunk('<table hidden id="'); +var startSegmentTable2 = stringToPrecomputedChunk('">'); +var endSegmentTable = stringToPrecomputedChunk('</table>'); +var startSegmentTableBody = stringToPrecomputedChunk('<table hidden><tbody id="'); +var startSegmentTableBody2 = stringToPrecomputedChunk('">'); +var endSegmentTableBody = stringToPrecomputedChunk('</tbody></table>'); +var startSegmentTableRow = stringToPrecomputedChunk('<table hidden><tr id="'); +var startSegmentTableRow2 = stringToPrecomputedChunk('">'); +var endSegmentTableRow = stringToPrecomputedChunk('</tr></table>'); +var startSegmentColGroup = stringToPrecomputedChunk('<table hidden><colgroup id="'); +var startSegmentColGroup2 = stringToPrecomputedChunk('">'); +var endSegmentColGroup = stringToPrecomputedChunk('</colgroup></table>'); +function writeStartSegment(destination, responseState, formatContext, id) { + switch (formatContext.insertionMode) { + case ROOT_HTML_MODE: + case HTML_MODE: + { + writeChunk(destination, startSegmentHTML); + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, stringToChunk(id.toString(16))); + return writeChunkAndReturn(destination, startSegmentHTML2); + } -function writeStyleResourceDependencyInJS(destination, href, precedence, props) { - { - checkAttributeStringCoercion(href, 'href'); - } - - var coercedHref = '' + href; - sanitizeURL(coercedHref); - writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedHref))); - - { - checkAttributeStringCoercion(precedence, 'precedence'); - } + case SVG_MODE: + { + writeChunk(destination, startSegmentSVG); + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, stringToChunk(id.toString(16))); + return writeChunkAndReturn(destination, startSegmentSVG2); + } - var coercedPrecedence = '' + precedence; - writeChunk(destination, arrayInterstitial); - writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedPrecedence))); + case MATHML_MODE: + { + writeChunk(destination, startSegmentMathML); + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, stringToChunk(id.toString(16))); + return writeChunkAndReturn(destination, startSegmentMathML2); + } - for (var propKey in props) { - if (hasOwnProperty.call(props, propKey)) { - var propValue = props[propKey]; + case HTML_TABLE_MODE: + { + writeChunk(destination, startSegmentTable); + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, stringToChunk(id.toString(16))); + return writeChunkAndReturn(destination, startSegmentTable2); + } + // TODO: For the rest of these, there will be extra wrapper nodes that never + // get deleted from the document. We need to delete the table too as part + // of the injected scripts. They are invisible though so it's not too terrible + // and it's kind of an edge case to suspend in a table. Totally supported though. - if (propValue == null) { - continue; + case HTML_TABLE_BODY_MODE: + { + writeChunk(destination, startSegmentTableBody); + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, stringToChunk(id.toString(16))); + return writeChunkAndReturn(destination, startSegmentTableBody2); } - switch (propKey) { - case 'href': - case 'rel': - case 'precedence': - case 'data-precedence': - { - break; - } + case HTML_TABLE_ROW_MODE: + { + writeChunk(destination, startSegmentTableRow); + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, stringToChunk(id.toString(16))); + return writeChunkAndReturn(destination, startSegmentTableRow2); + } - case 'children': - case 'dangerouslySetInnerHTML': - throw new Error('link' + " is a self-closing tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.'); - // eslint-disable-next-line-no-fallthrough + case HTML_COLGROUP_MODE: + { + writeChunk(destination, startSegmentColGroup); + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, stringToChunk(id.toString(16))); + return writeChunkAndReturn(destination, startSegmentColGroup2); + } - default: - writeStyleResourceAttributeInJS(destination, propKey, propValue); - break; + default: + { + throw new Error('Unknown insertion mode. This is a bug in React.'); } - } } - - return null; } +function writeEndSegment(destination, formatContext) { + switch (formatContext.insertionMode) { + case ROOT_HTML_MODE: + case HTML_MODE: + { + return writeChunkAndReturn(destination, endSegmentHTML); + } -function writeStyleResourceAttributeInJS(destination, name, value) // not null or undefined -{ - var attributeName = name.toLowerCase(); - var attributeValue; - - switch (typeof value) { - case 'function': - case 'symbol': - return; - } - - switch (name) { - // Reserved names - case 'innerHTML': - case 'dangerouslySetInnerHTML': - case 'suppressContentEditableWarning': - case 'suppressHydrationWarning': - case 'style': - // Ignored - return; - // Attribute renames + case SVG_MODE: + { + return writeChunkAndReturn(destination, endSegmentSVG); + } - case 'className': - attributeName = 'class'; - break; - // Booleans + case MATHML_MODE: + { + return writeChunkAndReturn(destination, endSegmentMathML); + } - case 'hidden': - if (value === false) { - return; + case HTML_TABLE_MODE: + { + return writeChunkAndReturn(destination, endSegmentTable); } - attributeValue = ''; - break; - // Santized URLs + case HTML_TABLE_BODY_MODE: + { + return writeChunkAndReturn(destination, endSegmentTableBody); + } - case 'src': - case 'href': + case HTML_TABLE_ROW_MODE: { - { - checkAttributeStringCoercion(value, attributeName); - } + return writeChunkAndReturn(destination, endSegmentTableRow); + } - attributeValue = '' + value; - sanitizeURL(attributeValue); - break; + case HTML_COLGROUP_MODE: + { + return writeChunkAndReturn(destination, endSegmentColGroup); } default: { - if (!isAttributeNameSafe(name)) { - return; - } + throw new Error('Unknown insertion mode. This is a bug in React.'); } } - - if ( // shouldIgnoreAttribute - // We have already filtered out null/undefined and reserved words. - name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) { - return; - } +} +var completeSegmentScript1Full = stringToPrecomputedChunk(completeSegment + ';$RS("'); +var completeSegmentScript1Partial = stringToPrecomputedChunk('$RS("'); +var completeSegmentScript2 = stringToPrecomputedChunk('","'); +var completeSegmentScriptEnd = stringToPrecomputedChunk('")</script>'); +function writeCompletedSegmentInstruction(destination, responseState, contentSegmentID) { { - checkAttributeStringCoercion(value, attributeName); - } + writeChunk(destination, responseState.startInlineScript); - attributeValue = '' + value; - writeChunk(destination, arrayInterstitial); - writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(attributeName))); - writeChunk(destination, arrayInterstitial); - writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(attributeValue))); -} // This function writes a 2D array of strings to be embedded in an attribute -/** - * Resources - */ + if (!responseState.sentCompleteSegmentFunction) { + // The first time we write this, we'll need to include the full implementation. + responseState.sentCompleteSegmentFunction = true; + writeChunk(destination, completeSegmentScript1Full); + } else { + // Future calls can just reuse the same function. + writeChunk(destination, completeSegmentScript1Partial); + } + } // Write function arguments, which are string literals -var NoState -/* */ -= 0; // These tags indicate whether the Resource was flushed and in which phase - -var FlushedInPreamble -/* */ -= 1; -var FlushedLate -/* */ -= 2; -var Flushed -/* */ -= 3; // This tag indicates whether this Resource is blocked from flushing. -// This currently is only used with stylesheets that are blocked by a Boundary - -var Blocked -/* */ -= 4; // This tag indicates whether this Resource has been preloaded. -// This generally only makes sense for Resources other than PreloadResource - -var PreloadFlushed -/* */ -= 8; // Dev extensions. -// Stylesheets and Scripts rendered with jsx -// Preloads, Stylesheets, and Scripts from ReactDOM.preload or ReactDOM.preinit -// Preloads created for normal components we rendered but know we can preload early such as -// sync Scripts and stylesheets without precedence or with onLoad/onError handlers -// @TODO add bootstrap script to implicit preloads + writeChunk(destination, responseState.segmentPrefix); + var formattedID = stringToChunk(contentSegmentID.toString(16)); + writeChunk(destination, formattedID); -function createResources() { - return { - // persistent - preloadsMap: new Map(), - stylesMap: new Map(), - scriptsMap: new Map(), - // cleared on flush - fontPreloads: new Set(), - // usedImagePreloads: new Set(), - precedences: new Map(), - usedStylesheets: new Set(), - scripts: new Set(), - usedScripts: new Set(), - explicitStylesheetPreloads: new Set(), - // explicitImagePreloads: new Set(), - explicitScriptPreloads: new Set(), - explicitOtherPreloads: new Set(), - // like a module global for currently rendering boundary - boundaryResources: null - }; -} -function createBoundaryResources() { - return new Set(); -} -function setCurrentlyRenderingBoundaryResourcesTarget(resources, boundaryResources) { - resources.boundaryResources = boundaryResources; -} + { + writeChunk(destination, completeSegmentScript2); + } -function getResourceKey(as, href) { - return "[" + as + "]" + href; -} + writeChunk(destination, responseState.placeholderPrefix); + writeChunk(destination, formattedID); -function preload(href, options) { - if (!currentResources) { - // While we expect that preload calls are primarily going to be observed - // during render because effects and events don't run on the server it is - // still possible that these get called in module scope. This is valid on - // the client since there is still a document to interact with but on the - // server we need a request to associate the call to. Because of this we - // simply return and do not warn. - return; + { + return writeChunkAndReturn(destination, completeSegmentScriptEnd); } - - var resources = currentResources; +} +var completeBoundaryScript1Full = stringToPrecomputedChunk(completeBoundary + ';$RC("'); +var completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC("'); +var completeBoundaryWithStylesScript1FullBoth = stringToPrecomputedChunk(completeBoundary + ';' + completeBoundaryWithStyles + ';$RR("'); +var completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk(completeBoundaryWithStyles + ';$RR("'); +var completeBoundaryWithStylesScript1Partial = stringToPrecomputedChunk('$RR("'); +var completeBoundaryScript2 = stringToPrecomputedChunk('","'); +var completeBoundaryScript3a = stringToPrecomputedChunk('",'); +var completeBoundaryScript3b = stringToPrecomputedChunk('"'); +var completeBoundaryScriptEnd = stringToPrecomputedChunk(')</script>'); +function writeCompletedBoundaryInstruction(destination, responseState, boundaryID, contentSegmentID, boundaryResources) { + var hasStyleDependencies; { - if (typeof href !== 'string' || !href) { - error('ReactDOM.preload(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.', getValueDescriptorExpectingObjectForWarning(href)); - } else if (options == null || typeof options !== 'object') { - error('ReactDOM.preload(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preloaded but encountered %s instead.', getValueDescriptorExpectingEnumForWarning(options)); - } else if (typeof options.as !== 'string') { - error('ReactDOM.preload(): Expected the `as` property in the `options` argument (second) to contain a string value describing the type of resource to be preloaded but encountered %s instead. Values that are valid in for the `as` attribute of a `<link rel="preload" as="..." />` tag are valid here.', getValueDescriptorExpectingEnumForWarning(options.as)); - } + hasStyleDependencies = hasStyleResourceDependencies(boundaryResources); } - if (typeof href === 'string' && href && typeof options === 'object' && options !== null && typeof options.as === 'string') { - var as = options.as; - var key = getResourceKey(as, href); - var resource = resources.preloadsMap.get(key); + { + writeChunk(destination, responseState.startInlineScript); - { - var devResource = getAsResourceDEV(resource); + if ( hasStyleDependencies) { + if (!responseState.sentCompleteBoundaryFunction) { + responseState.sentCompleteBoundaryFunction = true; + responseState.sentStyleInsertionFunction = true; + writeChunk(destination, clonePrecomputedChunk(completeBoundaryWithStylesScript1FullBoth)); + } else if (!responseState.sentStyleInsertionFunction) { + responseState.sentStyleInsertionFunction = true; + writeChunk(destination, completeBoundaryWithStylesScript1FullPartial); + } else { + writeChunk(destination, completeBoundaryWithStylesScript1Partial); + } + } else { + if (!responseState.sentCompleteBoundaryFunction) { + responseState.sentCompleteBoundaryFunction = true; + writeChunk(destination, completeBoundaryScript1Full); + } else { + writeChunk(destination, completeBoundaryScript1Partial); + } + } + } - if (devResource) { - switch (devResource.__provenance) { - case 'preload': - { - var differenceDescription = describeDifferencesForPreloads(options, devResource.__originalOptions); + if (boundaryID === null) { + throw new Error('An ID must have been assigned before we can complete the boundary.'); + } // Write function arguments, which are string and array literals - if (differenceDescription) { - error('ReactDOM.preload(): The options provided conflict with another call to `ReactDOM.preload("%s", { as: "%s", ...})`.' + ' React will always use the options it first encounters when preloading a resource for a given `href` and `as` type, and any later options will be ignored if different.' + ' Try updating all calls to `ReactDOM.preload()` with the same `href` and `as` type to use the same options, or eliminate one of the calls.%s', href, as, differenceDescription); - } - break; - } + var formattedContentID = stringToChunk(contentSegmentID.toString(16)); + writeChunk(destination, boundaryID); - case 'implicit': - { - var _differenceDescription3 = describeDifferencesForPreloadOverImplicitPreload(options, devResource.__impliedProps); + { + writeChunk(destination, completeBoundaryScript2); + } - if (_differenceDescription3) { - var elementDescription = as === 'style' ? '<link rel="stylesheet" ... />' : as === 'script' ? '<script ... />' : null; + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, formattedContentID); - if (elementDescription) { - error('ReactDOM.preload(): For `href` "%s", The options provided conflict with props on a matching %s element. When the preload' + ' options disagree with the underlying resource it usually means the browser will not be able to use the preload when the resource' + ' is fetched, negating any benefit the preload would provide. React will preload the resource using props derived from the resource instead' + ' and ignore the options provided to the `ReactDOM.preload()` call. In general, preloading is useful when you expect to' + ' render a resource soon but have not yet done so. In this case since the underlying resource was already rendered the preload call' + ' may be extraneous. Try removing the call, otherwise try adjusting both the props on the %s and the options' + ' passed to `ReactDOM.preload()` to agree.%s', href, elementDescription, elementDescription, _differenceDescription3); - } - } + if ( hasStyleDependencies) { + // Script and data writers must format this differently: + // - script writer emits an array literal, whose string elements are + // escaped for javascript e.g. ["A", "B"] + // - data writer emits a string literal, which is escaped as html + // e.g. ["A", "B"] + { + writeChunk(destination, completeBoundaryScript3a); // boundaryResources encodes an array literal - break; - } - } - } + writeStyleResourceDependenciesInJS(destination, boundaryResources); } + } else { + { + writeChunk(destination, completeBoundaryScript3b); + } + } - if (!resource) { - resource = { - type: 'preload', - chunks: [], - state: NoState, - props: preloadPropsFromPreloadOptions(href, as, options) - }; - resources.preloadsMap.set(key, resource); + { + return writeChunkAndReturn(destination, completeBoundaryScriptEnd); + } +} +var clientRenderScript1Full = stringToPrecomputedChunk(clientRenderBoundary + ';$RX("'); +var clientRenderScript1Partial = stringToPrecomputedChunk('$RX("'); +var clientRenderScript1A = stringToPrecomputedChunk('"'); +var clientRenderErrorScriptArgInterstitial = stringToPrecomputedChunk(','); +var clientRenderScriptEnd = stringToPrecomputedChunk(')</script>'); +function writeClientRenderBoundaryInstruction(destination, responseState, boundaryID, errorDigest, errorMessage, errorComponentStack) { - { - markAsImperativeResourceDEV(resource, 'preload', href, options, resource.props); - } + { + writeChunk(destination, responseState.startInlineScript); - pushLinkImpl(resource.chunks, resource.props); + if (!responseState.sentClientRenderFunction) { + // The first time we write this, we'll need to include the full implementation. + responseState.sentClientRenderFunction = true; + writeChunk(destination, clientRenderScript1Full); + } else { + // Future calls can just reuse the same function. + writeChunk(destination, clientRenderScript1Partial); } + } - switch (as) { - case 'font': - { - resources.fontPreloads.add(resource); - break; - } + if (boundaryID === null) { + throw new Error('An ID must have been assigned before we can complete the boundary.'); + } - case 'style': - { - resources.explicitStylesheetPreloads.add(resource); - break; - } + writeChunk(destination, boundaryID); - case 'script': - { - resources.explicitScriptPreloads.add(resource); - break; - } + { + // " needs to be inserted for scripts, since ArgInterstitual does not contain + // leading or trailing quotes + writeChunk(destination, clientRenderScript1A); + } - default: - { - resources.explicitOtherPreloads.add(resource); - } + if (errorDigest || errorMessage || errorComponentStack) { + { + // ,"JSONString" + writeChunk(destination, clientRenderErrorScriptArgInterstitial); + writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorDigest || ''))); } } -} -function preinit(href, options) { - if (!currentResources) { - // While we expect that preinit calls are primarily going to be observed - // during render because effects and events don't run on the server it is - // still possible that these get called in module scope. This is valid on - // the client since there is still a document to interact with but on the - // server we need a request to associate the call to. Because of this we - // simply return and do not warn. - return; + + if (errorMessage || errorComponentStack) { + { + // ,"JSONString" + writeChunk(destination, clientRenderErrorScriptArgInterstitial); + writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorMessage || ''))); + } } - preinitImpl(currentResources, href, options); -} // On the server, preinit may be called outside of render when sending an -// external SSR runtime as part of the initial resources payload. Since this -// is an internal React call, we do not need to use the resources stack. + if (errorComponentStack) { + // ,"JSONString" + { + writeChunk(destination, clientRenderErrorScriptArgInterstitial); + writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorComponentStack))); + } + } -function preinitImpl(resources, href, options) { { - if (typeof href !== 'string' || !href) { - error('ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.', getValueDescriptorExpectingObjectForWarning(href)); - } else if (options == null || typeof options !== 'object') { - error('ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.', getValueDescriptorExpectingEnumForWarning(options)); - } else if (options.as !== 'style' && options.as !== 'script') { - error('ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".', getValueDescriptorExpectingEnumForWarning(options.as)); - } + // ></script> + return writeChunkAndReturn(destination, clientRenderScriptEnd); } +} +var regexForJSStringsInInstructionScripts = /[<\u2028\u2029]/g; - if (typeof href === 'string' && href && typeof options === 'object' && options !== null) { - var as = options.as; +function escapeJSStringsForInstructionScripts(input) { + var escaped = JSON.stringify(input); + return escaped.replace(regexForJSStringsInInstructionScripts, function (match) { + switch (match) { + // santizing breaking out of strings and script tags + case '<': + return "\\u003c"; - switch (as) { - case 'style': - { - var key = getResourceKey(as, href); - var resource = resources.stylesMap.get(key); - var precedence = options.precedence || 'default'; + case "\u2028": + return "\\u2028"; - { - var devResource = getAsResourceDEV(resource); + case "\u2029": + return "\\u2029"; - if (devResource) { - var resourceProps = stylesheetPropsFromPreinitOptions(href, precedence, options); + default: + { + // eslint-disable-next-line react-internal/prod-error-codes + throw new Error('escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React'); + } + } + }); +} - var propsEquivalent = assign({}, resourceProps, _defineProperty({ - precedence: options.precedence - }, 'data-precedence', null)); +var regexForJSStringsInScripts = /[&><\u2028\u2029]/g; - switch (devResource.__provenance) { - case 'rendered': - { - var differenceDescription = describeDifferencesForPreinitOverStylesheet( // Diff the props from the JSX element, not the derived resource props - propsEquivalent, devResource.__originalProps); +function escapeJSObjectForInstructionScripts(input) { + var escaped = JSON.stringify(input); + return escaped.replace(regexForJSStringsInScripts, function (match) { + switch (match) { + // santizing breaking out of strings and script tags + case '&': + return "\\u0026"; - if (differenceDescription) { - error('ReactDOM.preinit(): For `href` "%s", the options provided conflict with props found on a <link rel="stylesheet" precedence="%s" href="%s" .../> that was already rendered.' + ' React will always use the props or options it first encounters for a hoistable stylesheet for a given `href` and any later props or options will be ignored if different.' + ' Generally, ReactDOM.preinit() is useful when you are not yet rendering a stylesheet but you anticipate it will be used soon.' + ' In this case the stylesheet was already rendered so preinitializing it does not provide any additional benefit.' + ' To resolve, try making the props and options agree between the <link rel="stylesheet" .../> and the `ReactDOM.preinit()` call or' + ' remove the `ReactDOM.preinit()` call.%s', href, devResource.__originalProps.precedence, href, differenceDescription); - } + case '>': + return "\\u003e"; - break; - } + case '<': + return "\\u003c"; - case 'preinit': - { - var _differenceDescription4 = describeDifferencesForPreinits( // Diff the props from the JSX element, not the derived resource props - propsEquivalent, devResource.__propsEquivalent); + case "\u2028": + return "\\u2028"; - if (_differenceDescription4) { - error('ReactDOM.preinit(): For `href` "%s", the options provided conflict with another call to `ReactDOM.preinit("%s", { as: "style", ... })`.' + ' React will always use the options it first encounters when preinitializing a hoistable stylesheet for a given `href` and any later options will be ignored if different.' + ' Try updating all calls to `ReactDOM.preinit()` for a given `href` to use the same options, or only call `ReactDOM.preinit()` once per `href`.%s', href, href, _differenceDescription4); - } + case "\u2029": + return "\\u2029"; - break; - } - } - } - } + default: + { + // eslint-disable-next-line react-internal/prod-error-codes + throw new Error('escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React'); + } + } + }); +} - if (!resource) { - resource = { - type: 'stylesheet', - chunks: [], - state: NoState, - props: stylesheetPropsFromPreinitOptions(href, precedence, options) - }; - resources.stylesMap.set(key, resource); +var precedencePlaceholderStart = stringToPrecomputedChunk('<style data-precedence="'); +var precedencePlaceholderEnd = stringToPrecomputedChunk('"></style>'); +function writeInitialResources(destination, resources, responseState, willFlushAllSegments) { - { - markAsImperativeResourceDEV(resource, 'preinit', href, options, assign({}, resource.props, _defineProperty({ - precedence: precedence - }, 'data-precedence', undefined))); - } - var precedenceSet = resources.precedences.get(precedence); + function flushLinkResource(resource) { + if (!resource.flushed) { + pushLinkImpl(target, resource.props, responseState); + resource.flushed = true; + } + } - if (!precedenceSet) { - precedenceSet = new Set(); - resources.precedences.set(precedence, precedenceSet); - } + var target = []; + var charset = resources.charset, + bases = resources.bases, + preconnects = resources.preconnects, + fontPreloads = resources.fontPreloads, + precedences = resources.precedences, + usedStylePreloads = resources.usedStylePreloads, + scripts = resources.scripts, + usedScriptPreloads = resources.usedScriptPreloads, + explicitStylePreloads = resources.explicitStylePreloads, + explicitScriptPreloads = resources.explicitScriptPreloads, + headResources = resources.headResources; - precedenceSet.add(resource); - } + if (charset) { + pushSelfClosing(target, charset.props, 'meta', responseState); + charset.flushed = true; + resources.charset = null; + } - return; + bases.forEach(function (r) { + pushSelfClosing(target, r.props, 'base', responseState); + r.flushed = true; + }); + bases.clear(); + preconnects.forEach(function (r) { + // font preload Resources should not already be flushed so we elide this check + pushLinkImpl(target, r.props, responseState); + r.flushed = true; + }); + preconnects.clear(); + fontPreloads.forEach(function (r) { + // font preload Resources should not already be flushed so we elide this check + pushLinkImpl(target, r.props, responseState); + r.flushed = true; + }); + fontPreloads.clear(); // Flush stylesheets first by earliest precedence + + precedences.forEach(function (p, precedence) { + if (p.size) { + p.forEach(function (r) { + // resources should not already be flushed so we elide this check + pushLinkImpl(target, r.props, responseState); + r.flushed = true; + r.inShell = true; + r.hint.flushed = true; + }); + p.clear(); + } else { + target.push(precedencePlaceholderStart, stringToChunk(escapeTextForBrowser(precedence)), precedencePlaceholderEnd); + } + }); + usedStylePreloads.forEach(flushLinkResource); + usedStylePreloads.clear(); + scripts.forEach(function (r) { + // should never be flushed already + pushScriptImpl(target, r.props, responseState); + r.flushed = true; + r.hint.flushed = true; + }); + scripts.clear(); + usedScriptPreloads.forEach(flushLinkResource); + usedScriptPreloads.clear(); + explicitStylePreloads.forEach(flushLinkResource); + explicitStylePreloads.clear(); + explicitScriptPreloads.forEach(flushLinkResource); + explicitScriptPreloads.clear(); + headResources.forEach(function (r) { + switch (r.type) { + case 'title': + { + pushTitleImpl(target, r.props, responseState); + break; } - case 'script': + case 'meta': { - var src = href; - - var _key = getResourceKey(as, src); - - var _resource3 = resources.scriptsMap.get(_key); - - { - var _devResource = getAsResourceDEV(_resource3); - - if (_devResource) { - var _propsEquivalent = scriptPropsFromPreinitOptions(src, options); - - switch (_devResource.__provenance) { - case 'rendered': - { - var _differenceDescription5 = describeDifferencesForPreinitOverScript( // Diff the props from the JSX element, not the derived resource props - _propsEquivalent, _devResource.__originalProps); - - if (_differenceDescription5) { - error('ReactDOM.preinit(): For `href` "%s", the options provided conflict with props found on a <script async={true} src="%s" .../> that was already rendered.' + ' React will always use the props or options it first encounters for a hoistable script for a given `href` and any later props or options will be ignored if different.' + ' Generally, ReactDOM.preinit() is useful when you are not yet rendering a script but you anticipate it will be used soon and want to go beyond preloading it and have it' + ' execute early. In this case the script was already rendered so preinitializing it does not provide any additional benefit.' + ' To resolve, try making the props and options agree between the <script .../> and the `ReactDOM.preinit()` call or remove the `ReactDOM.preinit()` call.%s', href, href, _differenceDescription5); - } - - break; - } - - case 'preinit': - { - var _differenceDescription6 = describeDifferencesForPreinits( // Diff the props from the JSX element, not the derived resource props - _propsEquivalent, _devResource.__propsEquivalent); + pushSelfClosing(target, r.props, 'meta', responseState); + break; + } - if (_differenceDescription6) { - error('ReactDOM.preinit(): For `href` "%s", the options provided conflict with another call to `ReactDOM.preinit("%s", { as: "script", ... })`.' + ' React will always use the options it first encounters when preinitializing a hoistable script for a given `href` and any later options will be ignored if different.' + ' Try updating all calls to `ReactDOM.preinit()` for a given `href` to use the same options, or only call `ReactDOM.preinit()` once per `href`.%s', href, href, _differenceDescription6); - } + case 'link': + { + pushLinkImpl(target, r.props, responseState); + break; + } + } - break; - } - } - } - } + r.flushed = true; + }); + headResources.clear(); + var i; + var r = true; - if (!_resource3) { - _resource3 = { - type: 'script', - chunks: [], - state: NoState, - props: null - }; - resources.scriptsMap.set(_key, _resource3); + for (i = 0; i < target.length - 1; i++) { + writeChunk(destination, target[i]); + } - var _resourceProps = scriptPropsFromPreinitOptions(src, options); + if (i < target.length) { + r = writeChunkAndReturn(destination, target[i]); + } - { - markAsImperativeResourceDEV(_resource3, 'preinit', href, options, _resourceProps); - } + return r; +} +function writeImmediateResources(destination, resources, responseState) { + // $FlowFixMe[missing-local-annot] + function flushLinkResource(resource) { + if (!resource.flushed) { + pushLinkImpl(target, resource.props, responseState); + resource.flushed = true; + } + } + + var target = []; + var charset = resources.charset, + preconnects = resources.preconnects, + fontPreloads = resources.fontPreloads, + usedStylePreloads = resources.usedStylePreloads, + scripts = resources.scripts, + usedScriptPreloads = resources.usedScriptPreloads, + explicitStylePreloads = resources.explicitStylePreloads, + explicitScriptPreloads = resources.explicitScriptPreloads, + headResources = resources.headResources; + + if (charset) { + pushSelfClosing(target, charset.props, 'meta', responseState); + charset.flushed = true; + resources.charset = null; + } + + preconnects.forEach(function (r) { + // font preload Resources should not already be flushed so we elide this check + pushLinkImpl(target, r.props, responseState); + r.flushed = true; + }); + preconnects.clear(); + fontPreloads.forEach(function (r) { + // font preload Resources should not already be flushed so we elide this check + pushLinkImpl(target, r.props, responseState); + r.flushed = true; + }); + fontPreloads.clear(); + usedStylePreloads.forEach(flushLinkResource); + usedStylePreloads.clear(); + scripts.forEach(function (r) { + // should never be flushed already + pushStartGenericElement(target, r.props, 'script', responseState); + pushEndInstance(target, target, 'script', r.props); + r.flushed = true; + r.hint.flushed = true; + }); + scripts.clear(); + usedScriptPreloads.forEach(flushLinkResource); + usedScriptPreloads.clear(); + explicitStylePreloads.forEach(flushLinkResource); + explicitStylePreloads.clear(); + explicitScriptPreloads.forEach(flushLinkResource); + explicitScriptPreloads.clear(); + headResources.forEach(function (r) { + switch (r.type) { + case 'title': + { + pushTitleImpl(target, r.props, responseState); + break; + } - resources.scripts.add(_resource3); - pushScriptImpl(_resource3.chunks, _resourceProps); - } + case 'meta': + { + pushSelfClosing(target, r.props, 'meta', responseState); + break; + } - return; + case 'link': + { + pushLinkImpl(target, r.props, responseState); + break; } } + + r.flushed = true; + }); + headResources.clear(); + var i; + var r = true; + + for (i = 0; i < target.length - 1; i++) { + writeChunk(destination, target[i]); } -} -function preloadPropsFromPreloadOptions(href, as, options) { - return { - rel: 'preload', - as: as, - href: href, - crossOrigin: as === 'font' ? '' : options.crossOrigin, - integrity: options.integrity - }; -} + if (i < target.length) { + r = writeChunkAndReturn(destination, target[i]); + } -function preloadAsStylePropsFromProps(href, props) { - return { - rel: 'preload', - as: 'style', - href: href, - crossOrigin: props.crossOrigin, - integrity: props.integrity, - media: props.media, - hrefLang: props.hrefLang, - referrerPolicy: props.referrerPolicy - }; + return r; } -function preloadAsScriptPropsFromProps(href, props) { - return { - rel: 'preload', - as: 'script', - href: href, - crossOrigin: props.crossOrigin, - integrity: props.integrity, - referrerPolicy: props.referrerPolicy - }; -} +function hasStyleResourceDependencies(boundaryResources) { + var iter = boundaryResources.values(); // At the moment boundaries only accumulate style resources + // so we assume the type is correct and don't check it -function stylesheetPropsFromPreinitOptions(href, precedence, options) { - return { - rel: 'stylesheet', - href: href, - 'data-precedence': precedence, - crossOrigin: options.crossOrigin, - integrity: options.integrity - }; -} + while (true) { + var _iter$next = iter.next(), + resource = _iter$next.value; -function stylesheetPropsFromRawProps(rawProps) { - return assign({}, rawProps, { - 'data-precedence': rawProps.precedence, - precedence: null - }); -} + if (!resource) break; // If every style Resource flushed in the shell we do not need to send + // any dependencies -function adoptPreloadPropsForStylesheetProps(resourceProps, preloadProps) { - if (resourceProps.crossOrigin == null) resourceProps.crossOrigin = preloadProps.crossOrigin; - if (resourceProps.integrity == null) resourceProps.integrity = preloadProps.integrity; + if (!resource.inShell) { + return true; + } + } + + return false; } -function styleTagPropsFromRawProps(rawProps) { - return assign({}, rawProps, { - 'data-precedence': rawProps.precedence, - precedence: null, - 'data-href': rawProps.href, - href: null +var arrayFirstOpenBracket = stringToPrecomputedChunk('['); +var arraySubsequentOpenBracket = stringToPrecomputedChunk(',['); +var arrayInterstitial = stringToPrecomputedChunk(','); +var arrayCloseBracket = stringToPrecomputedChunk(']'); // This function writes a 2D array of strings to be embedded in javascript. +// E.g. +// [["JS_escaped_string1", "JS_escaped_string2"]] + +function writeStyleResourceDependenciesInJS(destination, boundaryResources) { + writeChunk(destination, arrayFirstOpenBracket); + var nextArrayOpenBrackChunk = arrayFirstOpenBracket; + boundaryResources.forEach(function (resource) { + if (resource.inShell) ; else if (resource.flushed) { + writeChunk(destination, nextArrayOpenBrackChunk); + writeStyleResourceDependencyHrefOnlyInJS(destination, resource.href); + writeChunk(destination, arrayCloseBracket); + nextArrayOpenBrackChunk = arraySubsequentOpenBracket; + } else { + writeChunk(destination, nextArrayOpenBrackChunk); + writeStyleResourceDependencyInJS(destination, resource.href, resource.precedence, resource.props); + writeChunk(destination, arrayCloseBracket); + nextArrayOpenBrackChunk = arraySubsequentOpenBracket; + resource.flushed = true; + resource.hint.flushed = true; + } }); + writeChunk(destination, arrayCloseBracket); } +/* Helper functions */ -function scriptPropsFromPreinitOptions(src, options) { - return { - src: src, - async: true, - crossOrigin: options.crossOrigin, - integrity: options.integrity - }; -} -function adoptPreloadPropsForScriptProps(resourceProps, preloadProps) { - if (resourceProps.crossOrigin == null) resourceProps.crossOrigin = preloadProps.crossOrigin; - if (resourceProps.integrity == null) resourceProps.integrity = preloadProps.integrity; -} +function writeStyleResourceDependencyHrefOnlyInJS(destination, href) { + // We should actually enforce this earlier when the resource is created but for + // now we make sure we are actually dealing with a string here. + { + checkAttributeStringCoercion(href, 'href'); + } -function hoistStylesheetResource(resource) { - this.add(resource); + var coercedHref = '' + href; + writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedHref))); } -function hoistResources(resources, source) { - var currentBoundaryResources = resources.boundaryResources; +function writeStyleResourceDependencyInJS(destination, href, precedence, props) { + { + checkAttributeStringCoercion(href, 'href'); + } - if (currentBoundaryResources) { - source.forEach(hoistStylesheetResource, currentBoundaryResources); - source.clear(); + var coercedHref = '' + href; + sanitizeURL(coercedHref); + writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedHref))); + + { + checkAttributeStringCoercion(precedence, 'precedence'); } -} -function unblockStylesheet(resource) { - resource.state &= ~Blocked; -} + var coercedPrecedence = '' + precedence; + writeChunk(destination, arrayInterstitial); + writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedPrecedence))); -function hoistResourcesToRoot(resources, boundaryResources) { - boundaryResources.forEach(unblockStylesheet); - boundaryResources.clear(); -} + for (var propKey in props) { + if (hasOwnProperty.call(props, propKey)) { + var propValue = props[propKey]; -function markAsRenderedResourceDEV(resource, originalProps) { - { - var devResource = resource; + if (propValue == null) { + continue; + } - if (typeof devResource.__provenance === 'string') { - error('Resource already marked for DEV type. This is a bug in React.'); - } + switch (propKey) { + case 'href': + case 'rel': + case 'precedence': + case 'data-precedence': + { + break; + } + + case 'children': + case 'dangerouslySetInnerHTML': + throw new Error('link' + " is a self-closing tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.'); + // eslint-disable-next-line-no-fallthrough - devResource.__provenance = 'rendered'; - devResource.__originalProps = originalProps; + default: + writeStyleResourceAttributeInJS(destination, propKey, propValue); + break; + } + } } -} -function markAsImperativeResourceDEV(resource, provenance, originalHref, originalOptions, propsEquivalent) { - { - var devResource = resource; + return null; +} - if (typeof devResource.__provenance === 'string') { - error('Resource already marked for DEV type. This is a bug in React.'); - } +function writeStyleResourceAttributeInJS(destination, name, value) // not null or undefined +{ + var attributeName = name.toLowerCase(); + var attributeValue; - devResource.__provenance = provenance; - devResource.__originalHref = originalHref; - devResource.__originalOptions = originalOptions; - devResource.__propsEquivalent = propsEquivalent; + switch (typeof value) { + case 'function': + case 'symbol': + return; } -} -function markAsImplicitResourceDEV(resource, underlyingProps, impliedProps) { - { - var devResource = resource; + switch (name) { + // Reserved names + case 'innerHTML': + case 'dangerouslySetInnerHTML': + case 'suppressContentEditableWarning': + case 'suppressHydrationWarning': + case 'style': + // Ignored + return; + // Attribute renames - if (typeof devResource.__provenance === 'string') { - error('Resource already marked for DEV type. This is a bug in React.'); - } + case 'className': + attributeName = 'class'; + break; + // Booleans - devResource.__provenance = 'implicit'; - devResource.__underlyingProps = underlyingProps; - devResource.__impliedProps = impliedProps; - } -} + case 'hidden': + if (value === false) { + return; + } -function getAsResourceDEV(resource) { - { - if (resource) { - if (typeof resource.__provenance === 'string') { - return resource; + attributeValue = ''; + break; + // Santized URLs + + case 'src': + case 'href': + { + { + checkAttributeStringCoercion(value, attributeName); + } + + attributeValue = '' + value; + sanitizeURL(attributeValue); + break; } - error('Resource was not marked for DEV type. This is a bug in React.'); - } + default: + { + if (!isAttributeNameSafe(name)) { + return; + } + } + } - return null; + if ( // shouldIgnoreAttribute + // We have already filtered out null/undefined and reserved words. + name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) { + return; } -} + + { + checkAttributeStringCoercion(value, attributeName); + } + + attributeValue = '' + value; + writeChunk(destination, arrayInterstitial); + writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(attributeName))); + writeChunk(destination, arrayInterstitial); + writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(attributeValue))); +} // This function writes a 2D array of strings to be embedded in an attribute function createResponseState$1(generateStaticMarkup, identifierPrefix, externalRuntimeConfig) { var responseState = createResponseState(identifierPrefix, undefined, undefined, undefined, undefined); @@ -5389,15 +5175,11 @@ function createResponseState$1(generateStaticMarkup, identifierPrefix, externalR nextSuspenseID: responseState.nextSuspenseID, streamingFormat: responseState.streamingFormat, startInlineScript: responseState.startInlineScript, - instructions: responseState.instructions, + sentCompleteSegmentFunction: responseState.sentCompleteSegmentFunction, + sentCompleteBoundaryFunction: responseState.sentCompleteBoundaryFunction, + sentClientRenderFunction: responseState.sentClientRenderFunction, + sentStyleInsertionFunction: responseState.sentStyleInsertionFunction, externalRuntimeConfig: responseState.externalRuntimeConfig, - htmlChunks: responseState.htmlChunks, - headChunks: responseState.headChunks, - hasBody: responseState.hasBody, - charsetChunks: responseState.charsetChunks, - preconnectChunks: responseState.preconnectChunks, - preloadChunks: responseState.preloadChunks, - hoistableChunks: responseState.hoistableChunks, // This is an extra field for the legacy renderer generateStaticMarkup: generateStaticMarkup }; @@ -7636,6 +7418,8 @@ function createRequest(children, responseState, rootFormatContext, progressiveCh clientRenderedBoundaries: [], completedBoundaries: [], partialBoundaries: [], + preamble: [], + postamble: [], onError: onError === undefined ? defaultErrorHandler : onError, onAllReady: onAllReady === undefined ? noop$2 : onAllReady, onShellReady: onShellReady === undefined ? noop$2 : onShellReady, @@ -7939,7 +7723,7 @@ function hoistCompletedBoundaryResources(request, completedBoundary) { function renderHostElement(request, task, type, props) { pushBuiltInComponentStackInDEV(task, type); var segment = task.blockedSegment; - var children = pushStartInstance(segment.chunks, type, props, request.resources, request.responseState, segment.formatContext, segment.lastPushedText); + var children = pushStartInstance(segment.chunks, request.preamble, type, props, request.responseState, segment.formatContext, segment.lastPushedText); segment.lastPushedText = false; var prevContext = segment.formatContext; segment.formatContext = getChildFormatContext(prevContext, type, props); // We use the non-destructive form because if something suspends, we still @@ -7949,7 +7733,7 @@ function renderHostElement(request, task, type, props) { // the correct context. Therefore this is not in a finally. segment.formatContext = prevContext; - pushEndInstance(segment.chunks, type, props, request.responseState, prevContext); + pushEndInstance(segment.chunks, request.postamble, type); segment.lastPushedText = false; popComponentStackInDEV(task); } @@ -9104,6 +8888,14 @@ function flushSegment(request, destination, segment) { } } +function flushInitialResources(destination, resources, responseState, willFlushAllSegments) { + writeInitialResources(destination, resources, responseState); +} + +function flushImmediateResources(destination, request) { + writeImmediateResources(destination, request.resources, request.responseState); +} + function flushClientRenderedBoundary(request, destination, boundary) { return writeClientRenderBoundaryInstruction(destination, request.responseState, boundary.id, boundary.errorDigest, boundary.errorMessage, boundary.errorComponentStack); } @@ -9128,11 +8920,6 @@ function flushCompletedBoundary(request, destination, boundary) { } completedSegments.length = 0; - - { - writeResourcesForBoundary(destination, boundary.resources); - } - return writeCompletedBoundaryInstruction(destination, request.responseState, boundary.id, boundary.rootSegmentID, boundary.resources); } @@ -9157,14 +8944,7 @@ function flushPartialBoundary(request, destination, boundary) { } completedSegments.splice(0, i); - - { - // The way this is structured we only write resources for partial boundaries - // if there is no backpressure. Later before we complete the boundary we - // will write resources regardless of backpressure before we emit the - // completion instruction - return writeResourcesForBoundary(destination, boundary.resources); - } + return true; } function flushPartiallyCompletedSegment(request, destination, boundary, segment) { @@ -9204,7 +8984,14 @@ function flushCompletedQueues(request, destination) { if (completedRootSegment !== null) { if (request.pendingRootTasks === 0) { if (enableFloat) { - writePreamble(destination, request.resources, request.responseState, request.allPendingTasks === 0); + var preamble = request.preamble; + + for (i = 0; i < preamble.length; i++) { + // we expect the preamble to be tiny and will ignore backpressure + writeChunk(destination, preamble[i]); + } + + flushInitialResources(destination, request.resources, request.responseState, request.allPendingTasks === 0); } flushSegment(request, destination, completedRootSegment); @@ -9215,7 +9002,7 @@ function flushCompletedQueues(request, destination) { return; } } else if (enableFloat) { - writeHoistables(destination, request.resources, request.responseState); + flushImmediateResources(destination, request); } // We emit client rendering instructions for already emitted boundaries first. // This is so that we can signal to the client to start client rendering them as // soon as possible. @@ -9295,7 +9082,11 @@ function flushCompletedQueues(request, destination) { // either they have pending task or they're complete. ) { { - writePostamble(destination, request.responseState); + var postamble = request.postamble; + + for (var _i = 0; _i < postamble.length; _i++) { + writeChunk(destination, postamble[_i]); + } } { @@ -9411,6 +9202,12 @@ function renderToStringImpl(children, options, generateStaticMarkup, abortReason return result; } +function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + subClass.__proto__ = superClass; +} + var ReactMarkupReadableStream = /*#__PURE__*/function (_Readable) { _inheritsLoose(ReactMarkupReadableStream, _Readable); diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.production.min.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.production.min.js index d58b179e69203..95a682eeb24e3 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.production.min.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.production.min.js @@ -7,133 +7,130 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -'use strict';var aa=require("react"),ba=require("react-dom"),ca=require("stream");function da(a,b){a.push(b)} -var p=Object.assign,q=Object.prototype.hasOwnProperty,ea=/^[: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][: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\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,fa={},ha={}; -function ia(a){if(q.call(ha,a))return!0;if(q.call(fa,a))return!1;if(ea.test(a))return ha[a]=!0;fa[a]=!0;return!1}function r(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var t={}; -"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){t[a]=new r(a,0,!1,a,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];t[b]=new r(b,1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){t[a]=new r(a,2,!1,a.toLowerCase(),null,!1,!1)}); -["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){t[a]=new r(a,2,!1,a,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){t[a]=new r(a,3,!1,a.toLowerCase(),null,!1,!1)}); -["checked","multiple","muted","selected"].forEach(function(a){t[a]=new r(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){t[a]=new r(a,4,!1,a,null,!1,!1)});["cols","rows","size","span"].forEach(function(a){t[a]=new r(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){t[a]=new r(a,5,!1,a.toLowerCase(),null,!1,!1)});var ja=/[\-:]([a-z])/g;function ka(a){return a[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 transform-origin 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".split(" ").forEach(function(a){var b=a.replace(ja, -ka);t[b]=new r(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(ja,ka);t[b]=new r(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(ja,ka);t[b]=new r(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){t[a]=new r(a,1,!1,a.toLowerCase(),null,!1,!1)}); -t.xlinkHref=new r("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){t[a]=new r(a,1,!1,a.toLowerCase(),null,!0,!0)}); -var u={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,tabSize:!0,widows:!0,zIndex:!0, -zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},la=["Webkit","ms","Moz","O"];Object.keys(u).forEach(function(a){la.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);u[b]=u[a]})});var ma=/["'&<>]/; -function v(a){if("boolean"===typeof a||"number"===typeof a)return""+a;a=""+a;var b=ma.exec(a);if(b){var c="",d,e=0;for(d=b.index;d<a.length;d++){switch(a.charCodeAt(d)){case 34:b=""";break;case 38:b="&";break;case 39:b="'";break;case 60:b="<";break;case 62:b=">";break;default:continue}e!==d&&(c+=a.substring(e,d));e=d+1;c+=b}a=e!==d?c+a.substring(e,d):c}return a} -var na=/([A-Z])/g,oa=/^ms-/,pa=Array.isArray,sa=ba.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Dispatcher,va={preload:ta,preinit:ua},w=null,wa=[];function x(a,b,c){return{insertionMode:a,selectedValue:b,noscriptTagInScope:c}} -function xa(a,b,c){switch(b){case "noscript":return x(2,null,!0);case "select":return x(2,null!=c.value?c.value:c.defaultValue,a.noscriptTagInScope);case "svg":return x(3,null,a.noscriptTagInScope);case "math":return x(4,null,a.noscriptTagInScope);case "foreignObject":return x(2,null,a.noscriptTagInScope);case "table":return x(5,null,a.noscriptTagInScope);case "thead":case "tbody":case "tfoot":return x(6,null,a.noscriptTagInScope);case "colgroup":return x(8,null,a.noscriptTagInScope);case "tr":return x(7, -null,a.noscriptTagInScope)}return 5<=a.insertionMode?x(2,null,a.noscriptTagInScope):0===a.insertionMode?"html"===b?x(1,null,!1):x(2,null,!1):1===a.insertionMode?x(2,null,!1):a}var ya=new Map; -function za(a,b){if("object"!==typeof b)throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");var c=!0,d;for(d in b)if(q.call(b,d)){var e=b[d];if(null!=e&&"boolean"!==typeof e&&""!==e){if(0===d.indexOf("--")){var f=v(d);e=v((""+e).trim())}else{f=d;var g=ya.get(f);void 0!==g?f=g:(g=v(f.replace(na,"-$1").toLowerCase().replace(oa,"-ms-")),ya.set(f,g),f=g);e="number"===typeof e?0===e||q.call(u, -d)?""+e:e+"px":v((""+e).trim())}c?(c=!1,a.push(' style="',f,":",e)):a.push(";",f,":",e)}}c||a.push('"')} -function y(a,b,c){switch(b){case "style":za(a,c);return;case "defaultValue":case "defaultChecked":case "innerHTML":case "suppressContentEditableWarning":case "suppressHydrationWarning":return}if(!(2<b.length)||"o"!==b[0]&&"O"!==b[0]||"n"!==b[1]&&"N"!==b[1]){var d=t.hasOwnProperty(b)?t[b]:null;if(null!==d){switch(typeof c){case "function":case "symbol":return;case "boolean":if(!d.acceptsBooleans)return}b=d.attributeName;switch(d.type){case 3:c&&a.push(" ",b,'=""');break;case 4:!0===c?a.push(" ",b, -'=""'):!1!==c&&a.push(" ",b,'="',v(c),'"');break;case 5:isNaN(c)||a.push(" ",b,'="',v(c),'"');break;case 6:!isNaN(c)&&1<=c&&a.push(" ",b,'="',v(c),'"');break;default:d.sanitizeURL&&(c=""+c),a.push(" ",b,'="',v(c),'"')}}else if(ia(b)){switch(typeof c){case "function":case "symbol":return;case "boolean":if(d=b.toLowerCase().slice(0,5),"data-"!==d&&"aria-"!==d)return}a.push(" ",b,'="',v(c),'"')}}} -function A(a,b,c){if(null!=b){if(null!=c)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if("object"!==typeof b||!("__html"in b))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.");b=b.__html;null!==b&&void 0!==b&&a.push(""+b)}}function Aa(a){var b="";aa.Children.forEach(a,function(a){null!=a&&(b+=a)});return b} -function Ba(a,b,c,d,e,f,g){var k=b.rel,h=b.href,l=b.precedence;if(3===f||g||"string"!==typeof k||"string"!==typeof h||""===h)return D(a,b),null;if("stylesheet"===b.rel){c="[style]"+h;if("string"!==typeof l||null!=b.disabled||b.onLoad||b.onError)return e=d.preloadsMap.get(c),e||(e={type:"preload",chunks:[],state:0,props:Ca(h,b)},d.preloadsMap.set(c,e)),D(e.chunks,e.props),d.usedStylesheets.add(e),D(a,b);h=d.stylesMap.get(c);if(!h){b=p({},b,{"data-precedence":b.precedence,precedence:null});if(h=d.preloadsMap.get(c))h.state|= -4,h=h.props,null==b.crossOrigin&&(b.crossOrigin=h.crossOrigin),null==b.integrity&&(b.integrity=h.integrity);h={type:"stylesheet",chunks:[],state:d.boundaryResources?4:0,props:b};d.stylesMap.set(c,h);b=d.precedences.get(l);b||(b=new Set,d.precedences.set(l,b));b.add(h)}d.boundaryResources&&d.boundaryResources.add(h);e&&a.push("\x3c!-- --\x3e");return null}if(b.onLoad||b.onError)return D(a,b);e&&a.push("\x3c!-- --\x3e");switch(b.rel){case "preconnect":case "dns-prefetch":return D(c.preconnectChunks, -b);case "preload":return D(c.preloadChunks,b);default:return D(c.hoistableChunks,b)}}function D(a,b){a.push(F("link"));for(var c in b)if(q.call(b,c)){var d=b[c];if(null!=d)switch(c){case "children":case "dangerouslySetInnerHTML":throw Error("link is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:y(a,c,d)}}a.push("/>");return null} -function Da(a,b){a.push(F("style"));var c=null,d=null,e;for(e in b)if(q.call(b,e)){var f=b[e];if(null!=f)switch(e){case "children":c=f;break;case "dangerouslySetInnerHTML":d=f;break;default:y(a,e,f)}}a.push(">");b=Array.isArray(c)?2>c.length?c[0]:null:c;"function"!==typeof b&&"symbol"!==typeof b&&null!==b&&void 0!==b&&a.push(v(""+b));A(a,d,c);a.push("</","style",">");return null} -function Ea(a,b,c){a.push(F(c));for(var d in b)if(q.call(b,d)){var e=b[d];if(null!=e)switch(d){case "children":case "dangerouslySetInnerHTML":throw Error(c+" is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:y(a,d,e)}}a.push("/>");return null} -function Fa(a,b){a.push(F("title"));var c=null,d=null,e;for(e in b)if(q.call(b,e)){var f=b[e];if(null!=f)switch(e){case "children":c=f;break;case "dangerouslySetInnerHTML":d=f;break;default:y(a,e,f)}}a.push(">");b=Array.isArray(c)?2>c.length?c[0]:null:c;"function"!==typeof b&&"symbol"!==typeof b&&null!==b&&void 0!==b&&a.push(v(""+b));A(a,d,c);a.push("</","title",">");return null} -function Ga(a,b){a.push(F("script"));var c=null,d=null,e;for(e in b)if(q.call(b,e)){var f=b[e];if(null!=f)switch(e){case "children":c=f;break;case "dangerouslySetInnerHTML":d=f;break;default:y(a,e,f)}}a.push(">");A(a,d,c);"string"===typeof c&&a.push(v(c));a.push("</","script",">");return null} -function H(a,b,c){a.push(F(c));var d=c=null,e;for(e in b)if(q.call(b,e)){var f=b[e];if(null!=f)switch(e){case "children":c=f;break;case "dangerouslySetInnerHTML":d=f;break;default:y(a,e,f)}}a.push(">");A(a,d,c);return"string"===typeof c?(a.push(v(c)),null):c}var Ha=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Ia=new Map;function F(a){var b=Ia.get(a);if(void 0===b){if(!Ha.test(a))throw Error("Invalid tag: "+a);b="<"+a;Ia.set(a,b)}return b} -function Ja(a,b,c,d,e,f,g){switch(b){case "select":a.push(F("select"));d=g=null;for(var k in c)if(q.call(c,k)){var h=c[k];if(null!=h)switch(k){case "children":g=h;break;case "dangerouslySetInnerHTML":d=h;break;case "defaultValue":case "value":break;default:y(a,k,h)}}a.push(">");A(a,d,g);return g;case "option":g=f.selectedValue;a.push(F("option"));var l=d=null,m=k=null;for(h in c)if(q.call(c,h)){var n=c[h];if(null!=n)switch(h){case "children":d=n;break;case "selected":k=n;break;case "dangerouslySetInnerHTML":m= -n;break;case "value":l=n;default:y(a,h,n)}}if(null!=g)if(c=null!==l?""+l:Aa(d),pa(g))for(h=0;h<g.length;h++){if(""+g[h]===c){a.push(' selected=""');break}}else""+g===c&&a.push(' selected=""');else k&&a.push(' selected=""');a.push(">");A(a,m,d);return d;case "textarea":a.push(F("textarea"));h=d=g=null;for(l in c)if(q.call(c,l)&&(m=c[l],null!=m))switch(l){case "children":h=m;break;case "value":g=m;break;case "defaultValue":d=m;break;case "dangerouslySetInnerHTML":throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>."); -default:y(a,l,m)}null===g&&null!==d&&(g=d);a.push(">");if(null!=h){if(null!=g)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(pa(h)&&1<h.length)throw Error("<textarea> can only have at most one child.");g=""+h}"string"===typeof g&&"\n"===g[0]&&a.push("\n");null!==g&&a.push(v(""+g));return null;case "input":a.push(F("input"));l=h=d=g=null;for(m in c)if(q.call(c,m)&&(k=c[m],null!=k))switch(m){case "children":case "dangerouslySetInnerHTML":throw Error("input is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."); -case "defaultChecked":l=k;break;case "defaultValue":d=k;break;case "checked":h=k;break;case "value":g=k;break;default:y(a,m,k)}null!==h?y(a,"checked",h):null!==l&&y(a,"checked",l);null!==g?y(a,"value",g):null!==d&&y(a,"value",d);a.push("/>");return null;case "menuitem":a.push(F("menuitem"));for(var G in c)if(q.call(c,G)&&(g=c[G],null!=g))switch(G){case "children":case "dangerouslySetInnerHTML":throw Error("menuitems cannot have `children` nor `dangerouslySetInnerHTML`.");default:y(a,G,g)}a.push(">"); -return null;case "title":return 3===f.insertionMode||f.noscriptTagInScope?a=Fa(a,c):(Fa(e.hoistableChunks,c),a=null),a;case "link":return Ba(a,c,e,d,g,f.insertionMode,f.noscriptTagInScope);case "script":a:if(3===f.insertionMode||f.noscriptTagInScope||"string"!==typeof c.src||!c.src)a=Ga(a,c);else{l="[script]"+c.src;if(!0!==c.async||c.onLoad||c.onError){if(h=d.preloadsMap.get(l),h||(h={type:"preload",chunks:[],state:0,props:{rel:"preload",as:"script",href:c.src,crossOrigin:c.crossOrigin,integrity:c.integrity, -referrerPolicy:c.referrerPolicy}},d.preloadsMap.set(l,h),d.usedScripts.add(h),D(h.chunks,h.props)),!0!==c.async){Ga(a,c);a=null;break a}}else if(h=d.scriptsMap.get(l),!h){h={type:"script",chunks:[],state:0,props:null};d.scriptsMap.set(l,h);d.scripts.add(h);m=c;if(d=d.preloadsMap.get(l))d.state|=4,c=m=p({},c),d=d.props,null==c.crossOrigin&&(c.crossOrigin=d.crossOrigin),null==c.integrity&&(c.integrity=d.integrity);Ga(h.chunks,m)}g&&a.push("\x3c!-- --\x3e");a=null}return a;case "style":return h=c.precedence, -m=c.href,3===f.insertionMode||f.noscriptTagInScope||"string"!==typeof h||"string"!==typeof m||""===m?a=Da(a,c):(l="[style]"+m,m=d.stylesMap.get(l),m||(m={type:"style",chunks:[],state:d.boundaryResources?4:0,props:p({},c,{"data-precedence":c.precedence,precedence:null,"data-href":c.href,href:null})},d.stylesMap.set(l,m),Da(m.chunks,m.props),c=d.precedences.get(h),c||(c=new Set,d.precedences.set(h,c)),c.add(m),d.boundaryResources&&d.boundaryResources.add(m)),g&&a.push("\x3c!-- --\x3e"),a=void 0),a; -case "meta":return 3===f.insertionMode||f.noscriptTagInScope?a=Ea(a,c,"meta"):(g&&a.push("\x3c!-- --\x3e"),a="string"===typeof c.charSet?Ea(e.charsetChunks,c,"meta"):Ea(e.hoistableChunks,c,"meta")),a;case "listing":case "pre":a.push(F(b));d=g=null;for(n in c)if(q.call(c,n)&&(h=c[n],null!=h))switch(n){case "children":g=h;break;case "dangerouslySetInnerHTML":d=h;break;default:y(a,n,h)}a.push(">");if(null!=d){if(null!=g)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`."); -if("object"!==typeof d||!("__html"in d))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.");c=d.__html;null!==c&&void 0!==c&&("string"===typeof c&&0<c.length&&"\n"===c[0]?a.push("\n",c):a.push(""+c))}"string"===typeof g&&"\n"===g[0]&&a.push("\n");return g;case "base":case "area":case "br":case "col":case "embed":case "hr":case "img":case "keygen":case "param":case "source":case "track":case "wbr":return Ea(a, -c,b);case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return H(a,c,b);case "head":return 2>f.insertionMode&&null===e.headChunks?(e.headChunks=[],a=H(e.headChunks,c,"head")):a=H(a,c,"head"),a;case "html":return 0===f.insertionMode&&null===e.htmlChunks?(e.htmlChunks=["<!DOCTYPE html>"],a=H(e.htmlChunks,c,"html")):a=H(a,c,"html"),a;default:if(-1===b.indexOf("-")&&"string"!==typeof c.is)return H(a, -c,b);a.push(F(b));d=g=null;for(var z in c)if(q.call(c,z)&&(h=c[z],null!=h))switch(z){case "children":g=h;break;case "dangerouslySetInnerHTML":d=h;break;case "style":za(a,h);break;case "suppressContentEditableWarning":case "suppressHydrationWarning":break;default:ia(z)&&"function"!==typeof h&&"symbol"!==typeof h&&a.push(" ",z,'="',v(h),'"')}a.push(">");A(a,d,g);return g}} -function Ka(a,b,c){a.push('\x3c!--$?--\x3e<template id="');if(null===c)throw Error("An ID must have been assigned before we can complete the boundary.");a.push(c);return a.push('"></template>')} -function La(a,b,c,d){switch(c.insertionMode){case 0:case 1:case 2:return a.push('<div hidden id="'),a.push(b.segmentPrefix),b=d.toString(16),a.push(b),a.push('">');case 3:return a.push('<svg aria-hidden="true" style="display:none" id="'),a.push(b.segmentPrefix),b=d.toString(16),a.push(b),a.push('">');case 4:return a.push('<math aria-hidden="true" style="display:none" id="'),a.push(b.segmentPrefix),b=d.toString(16),a.push(b),a.push('">');case 5:return a.push('<table hidden id="'),a.push(b.segmentPrefix), -b=d.toString(16),a.push(b),a.push('">');case 6:return a.push('<table hidden><tbody id="'),a.push(b.segmentPrefix),b=d.toString(16),a.push(b),a.push('">');case 7:return a.push('<table hidden><tr id="'),a.push(b.segmentPrefix),b=d.toString(16),a.push(b),a.push('">');case 8:return a.push('<table hidden><colgroup id="'),a.push(b.segmentPrefix),b=d.toString(16),a.push(b),a.push('">');default:throw Error("Unknown insertion mode. This is a bug in React.");}} -function Ma(a,b){switch(b.insertionMode){case 0:case 1:case 2:return a.push("</div>");case 3:return a.push("</svg>");case 4:return a.push("</math>");case 5:return a.push("</table>");case 6:return a.push("</tbody></table>");case 7:return a.push("</tr></table>");case 8:return a.push("</colgroup></table>");default:throw Error("Unknown insertion mode. This is a bug in React.");}}var Na=/[<\u2028\u2029]/g; -function Oa(a){return JSON.stringify(a).replace(Na,function(a){switch(a){case "<":return"\\u003c";case "\u2028":return"\\u2028";case "\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React");}})}var Pa=/[&><\u2028\u2029]/g; -function I(a){return JSON.stringify(a).replace(Pa,function(a){switch(a){case "&":return"\\u0026";case ">":return"\\u003e";case "<":return"\\u003c";case "\u2028":return"\\u2028";case "\u2029":return"\\u2029";default:throw Error("escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React");}})}var Qa=!1; -function Ra(a){if("style"===a.type&&0===(a.state&3)){!1===Qa&&(Qa=!0,this.push('<template data-precedence="">'));for(var b=a.chunks,c=0;c<b.length;c++)this.push(b[c]);a.state|=2}}function Sa(a,b){Qa=!1;b.forEach(Ra,a);return Qa?a.push("</template>"):!0}function J(a){if(0===(a.state&7)){for(var b=a.chunks,c=0;c<b.length;c++)this.push(b[c]);a.state|=1}}function K(a){if(0===(a.state&3)){for(var b=a.chunks,c=0;c<b.length;c++)this.push(b[c]);a.state|=2}}var Ta=!1; -function Ua(a,b,c){b=a.chunks;if(a.state&3)c.delete(a);else if(!(a.state&4)){Ta=!0;"stylesheet"===a.type&&D(b,a.props);for(var d=0;d<b.length;d++)this.push(b[d]);a.state|=1;c.delete(a)}}function Va(a,b){Ta=!1;a.forEach(Ua,this);Ta||(this.push('<style data-precedence="'),a=v(b),this.push(a),this.push('"></style>'))}function Wa(a){if("style"!==a.type){var b=a.chunks,c=Ca(a.props.href,a.props);D(b,c);for(c=0;c<b.length;c++)this.push(b[c]);a.state|=8;b.length=0}} -function Xa(a){a.forEach(Wa,this);a.clear()}function Ya(a){if("style"!==a.type){var b=a.chunks,c=Ca(a.props.href,a.props);D(b,c);for(c=0;c<b.length;c++)this.push(b[c]);a.state|=8;b.length=0}}function Za(a){a.forEach(Ya,this);a.clear()} -function $a(a,b,c){var d=c.htmlChunks,e=c.headChunks,f=0;if(d){for(f=0;f<d.length;f++)a.push(d[f]);if(e)for(f=0;f<e.length;f++)a.push(e[f]);else da(a,F("head")),a.push(">")}else if(e)for(f=0;f<e.length;f++)a.push(e[f]);var g=c.charsetChunks;for(f=0;f<g.length;f++)a.push(g[f]);g.length=0;g=c.preconnectChunks;for(f=0;f<g.length;f++)a.push(g[f]);g.length=0;b.fontPreloads.forEach(J,a);b.fontPreloads.clear();b.precedences.forEach(Va,a);b.precedences.forEach(Xa,a);b.usedStylesheets.forEach(function(c){if(!b.stylesMap.has("["+ -c.props.as+"]"+c.props.href))for(c=c.chunks,f=0;f<c.length;f++)a.push(c[f])});b.usedStylesheets.clear();b.scripts.forEach(J,a);b.scripts.clear();b.usedScripts.forEach(J,a);b.usedScripts.clear();b.explicitStylesheetPreloads.forEach(J,a);b.explicitStylesheetPreloads.clear();b.explicitScriptPreloads.forEach(J,a);b.explicitScriptPreloads.clear();b.explicitOtherPreloads.forEach(J,a);b.explicitOtherPreloads.clear();g=c.preloadChunks;for(f=0;f<g.length;f++)a.push(g[f]);g.length=0;c=c.hoistableChunks;for(f= -0;f<c.length;f++)a.push(c[f]);c.length=0;d&&null===e&&(a.push("</"),a.push("head"),a.push(">"))} -function ab(a,b,c){var d=0,e=c.preconnectChunks;for(d=0;d<e.length;d++)a.push(e[d]);e.length=0;b.fontPreloads.forEach(K,a);b.fontPreloads.clear();b.precedences.forEach(Za,a);b.usedStylesheets.forEach(function(c){if(!b.stylesMap.has("["+c.props.as+"]"+c.props.href))for(c=c.chunks,d=0;d<c.length;d++)a.push(c[d])});b.usedStylesheets.clear();b.scripts.forEach(K,a);b.scripts.clear();b.usedScripts.forEach(K,a);b.usedScripts.clear();b.explicitStylesheetPreloads.forEach(K,a);b.explicitStylesheetPreloads.clear(); -b.explicitScriptPreloads.forEach(K,a);b.explicitScriptPreloads.clear();b.explicitOtherPreloads.forEach(K,a);b.explicitOtherPreloads.clear();e=c.preloadChunks;for(d=0;d<e.length;d++)a.push(e[d]);e.length=0;c=c.hoistableChunks;for(d=0;d<c.length;d++)a.push(c[d]);c.length=0} -function bb(a,b){a.push("[");var c="[";b.forEach(function(b){if(!(b.state&1))if(b.state&3)a.push(c),b=I(""+("style"===b.type?b.props["data-href"]:b.props.href)),a.push(b),a.push("]"),c=",[";else if("stylesheet"===b.type){a.push(c);var d=b.props["data-precedence"],f=b.props,g=I(""+b.props.href);a.push(g);d=""+d;a.push(",");d=I(d);a.push(d);for(var k in f)if(q.call(f,k)){var h=f[k];if(null!=h)switch(k){case "href":case "rel":case "precedence":case "data-precedence":break;case "children":case "dangerouslySetInnerHTML":throw Error("link is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."); -default:a:{d=a;var l=k;g=l.toLowerCase();switch(typeof h){case "function":case "symbol":break a}switch(l){case "innerHTML":case "dangerouslySetInnerHTML":case "suppressContentEditableWarning":case "suppressHydrationWarning":case "style":break a;case "className":g="class";break;case "hidden":if(!1===h)break a;break;case "src":case "href":break;default:if(!ia(l))break a}if(!(2<l.length)||"o"!==l[0]&&"O"!==l[0]||"n"!==l[1]&&"N"!==l[1])h=""+h,d.push(","),g=I(g),d.push(g),d.push(","),g=I(h),d.push(g)}}}a.push("]"); -c=",[";b.state|=2}});a.push("]")} -function ta(a,b){if(w){var c=w;if("string"===typeof a&&a&&"object"===typeof b&&null!==b&&"string"===typeof b.as){var d=b.as,e="["+d+"]"+a,f=c.preloadsMap.get(e);f||(f={type:"preload",chunks:[],state:0,props:{rel:"preload",as:d,href:a,crossOrigin:"font"===d?"":b.crossOrigin,integrity:b.integrity}},c.preloadsMap.set(e,f),D(f.chunks,f.props));switch(d){case "font":c.fontPreloads.add(f);break;case "style":c.explicitStylesheetPreloads.add(f);break;case "script":c.explicitScriptPreloads.add(f);break;default:c.explicitOtherPreloads.add(f)}}}} -function ua(a,b){if(w)a:{var c=w;if("string"===typeof a&&a&&"object"===typeof b&&null!==b){var d=b.as;switch(d){case "style":var e="["+d+"]"+a;d=c.stylesMap.get(e);var f=b.precedence||"default";d||(d={type:"stylesheet",chunks:[],state:0,props:{rel:"stylesheet",href:a,"data-precedence":f,crossOrigin:b.crossOrigin,integrity:b.integrity}},c.stylesMap.set(e,d),a=c.precedences.get(f),a||(a=new Set,c.precedences.set(f,a)),a.add(d));break a;case "script":f="["+d+"]"+a,d=c.scriptsMap.get(f),d||(d={type:"script", -chunks:[],state:0,props:null},c.scriptsMap.set(f,d),a={src:a,async:!0,crossOrigin:b.crossOrigin,integrity:b.integrity},c.scripts.add(d),Ga(d.chunks,a))}}}}function Ca(a,b){return{rel:"preload",as:"style",href:a,crossOrigin:b.crossOrigin,integrity:b.integrity,media:b.media,hrefLang:b.hrefLang,referrerPolicy:b.referrerPolicy}}function cb(a){this.add(a)}function db(a){a.state&=-5} -function eb(a,b){b=void 0===b?"":b;return{bootstrapChunks:[],placeholderPrefix:b+"P:",segmentPrefix:b+"S:",boundaryPrefix:b+"B:",idPrefix:b,nextSuspenseID:0,streamingFormat:0,startInlineScript:"<script>",instructions:0,externalRuntimeConfig:null,htmlChunks:null,headChunks:null,hasBody:!1,charsetChunks:[],preconnectChunks:[],preloadChunks:[],hoistableChunks:[],generateStaticMarkup:a}}function fb(){return{insertionMode:2,selectedValue:null,noscriptTagInScope:!1}} -function gb(a,b,c,d){if(c.generateStaticMarkup)return a.push(v(b)),!1;""===b?a=d:(d&&a.push("\x3c!-- --\x3e"),a.push(v(b)),a=!0);return a} -var hb=Symbol.for("react.element"),ib=Symbol.for("react.portal"),jb=Symbol.for("react.fragment"),kb=Symbol.for("react.strict_mode"),lb=Symbol.for("react.profiler"),mb=Symbol.for("react.provider"),nb=Symbol.for("react.context"),ob=Symbol.for("react.server_context"),pb=Symbol.for("react.forward_ref"),qb=Symbol.for("react.suspense"),rb=Symbol.for("react.suspense_list"),sb=Symbol.for("react.memo"),tb=Symbol.for("react.lazy"),ub=Symbol.for("react.scope"),vb=Symbol.for("react.debug_trace_mode"),wb=Symbol.for("react.offscreen"), -xb=Symbol.for("react.legacy_hidden"),yb=Symbol.for("react.cache"),zb=Symbol.for("react.default_value"),Ab=Symbol.iterator; -function Bb(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case jb:return"Fragment";case ib:return"Portal";case lb:return"Profiler";case kb:return"StrictMode";case qb:return"Suspense";case rb:return"SuspenseList";case yb:return"Cache"}if("object"===typeof a)switch(a.$$typeof){case nb:return(a.displayName||"Context")+".Consumer";case mb:return(a._context.displayName||"Context")+".Provider";case pb:var b=a.render;a=a.displayName; -a||(a=b.displayName||b.name||"",a=""!==a?"ForwardRef("+a+")":"ForwardRef");return a;case sb:return b=a.displayName||null,null!==b?b:Bb(a.type)||"Memo";case tb:b=a._payload;a=a._init;try{return Bb(a(b))}catch(c){break}case ob:return(a.displayName||a._globalName)+".Provider"}return null}var Cb=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Db={};function Eb(a,b){a=a.contextTypes;if(!a)return Db;var c={},d;for(d in a)c[d]=b[d];return c}var L=null; -function Fb(a,b){if(a!==b){a.context._currentValue2=a.parentValue;a=a.parent;var c=b.parent;if(null===a){if(null!==c)throw Error("The stacks must reach the root at the same time. This is a bug in React.");}else{if(null===c)throw Error("The stacks must reach the root at the same time. This is a bug in React.");Fb(a,c)}b.context._currentValue2=b.value}}function Gb(a){a.context._currentValue2=a.parentValue;a=a.parent;null!==a&&Gb(a)} -function Hb(a){var b=a.parent;null!==b&&Hb(b);a.context._currentValue2=a.value}function Ib(a,b){a.context._currentValue2=a.parentValue;a=a.parent;if(null===a)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===b.depth?Fb(a,b):Ib(a,b)} -function Jb(a,b){var c=b.parent;if(null===c)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===c.depth?Fb(a,c):Jb(a,c);b.context._currentValue2=b.value}function Kb(a){var b=L;b!==a&&(null===b?Hb(a):null===a?Gb(b):b.depth===a.depth?Fb(b,a):b.depth>a.depth?Ib(b,a):Jb(b,a),L=a)} -var Lb={isMounted:function(){return!1},enqueueSetState:function(a,b){a=a._reactInternals;null!==a.queue&&a.queue.push(b)},enqueueReplaceState:function(a,b){a=a._reactInternals;a.replace=!0;a.queue=[b]},enqueueForceUpdate:function(){}}; -function Mb(a,b,c,d){var e=void 0!==a.state?a.state:null;a.updater=Lb;a.props=c;a.state=e;var f={queue:[],replace:!1};a._reactInternals=f;var g=b.contextType;a.context="object"===typeof g&&null!==g?g._currentValue2:d;g=b.getDerivedStateFromProps;"function"===typeof g&&(g=g(c,e),e=null===g||void 0===g?e:p({},e,g),a.state=e);if("function"!==typeof b.getDerivedStateFromProps&&"function"!==typeof a.getSnapshotBeforeUpdate&&("function"===typeof a.UNSAFE_componentWillMount||"function"===typeof a.componentWillMount))if(b= -a.state,"function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),b!==a.state&&Lb.enqueueReplaceState(a,a.state,null),null!==f.queue&&0<f.queue.length)if(b=f.queue,g=f.replace,f.queue=null,f.replace=!1,g&&1===b.length)a.state=b[0];else{f=g?b[0]:a.state;e=!0;for(g=g?1:0;g<b.length;g++){var k=b[g];k="function"===typeof k?k.call(a,f,c,d):k;null!=k&&(e?(e=!1,f=p({},f,k)):p(f,k))}a.state=f}else f.queue=null} -var Nb={id:1,overflow:""};function Ob(a,b,c){var d=a.id;a=a.overflow;var e=32-Pb(d)-1;d&=~(1<<e);c+=1;var f=32-Pb(b)+e;if(30<f){var g=e-e%5;f=(d&(1<<g)-1).toString(32);d>>=g;e-=g;return{id:1<<32-Pb(b)+e|c<<e|d,overflow:f+a}}return{id:1<<f|c<<e|d,overflow:a}}var Pb=Math.clz32?Math.clz32:Qb,Rb=Math.log,Sb=Math.LN2;function Qb(a){a>>>=0;return 0===a?32:31-(Rb(a)/Sb|0)|0}var Tb=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`"); -function Ub(){}function Vb(a,b,c){c=a[c];void 0===c?a.push(b):c!==b&&(b.then(Ub,Ub),b=c);switch(b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;default:if("string"!==typeof b.status)switch(a=b,a.status="pending",a.then(function(a){if("pending"===b.status){var c=b;c.status="fulfilled";c.value=a}},function(a){if("pending"===b.status){var c=b;c.status="rejected";c.reason=a}}),b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;}Wb=b;throw Tb;}}var Wb=null; -function Xb(){if(null===Wb)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var a=Wb;Wb=null;return a}function Yb(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var Zb="function"===typeof Object.is?Object.is:Yb,M=null,$b=null,ac=null,O=null,P=!1,bc=!1,Q=0,R=0,S=null,U=null,cc=0; -function V(){if(null===M)throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.");return M} -function dc(){if(0<cc)throw Error("Rendered more hooks than during the previous render");return{memoizedState:null,queue:null,next:null}}function ec(){null===O?null===ac?(P=!1,ac=O=dc()):(P=!0,O=ac):null===O.next?(P=!1,O=O.next=dc()):(P=!0,O=O.next);return O}function fc(a,b,c,d){for(;bc;)bc=!1,R=Q=0,cc+=1,O=null,c=a(b,d);gc();return c}function hc(){var a=S;S=null;return a}function gc(){$b=M=null;bc=!1;ac=null;cc=0;O=U=null}function ic(a,b){return"function"===typeof b?b(a):b} -function jc(a,b,c){M=V();O=ec();if(P){var d=O.queue;b=d.dispatch;if(null!==U&&(c=U.get(d),void 0!==c)){U.delete(d);d=O.memoizedState;do d=a(d,c.action),c=c.next;while(null!==c);O.memoizedState=d;return[d,b]}return[O.memoizedState,b]}a=a===ic?"function"===typeof b?b():b:void 0!==c?c(b):b;O.memoizedState=a;a=O.queue={last:null,dispatch:null};a=a.dispatch=kc.bind(null,M,a);return[O.memoizedState,a]} -function lc(a,b){M=V();O=ec();b=void 0===b?null:b;if(null!==O){var c=O.memoizedState;if(null!==c&&null!==b){var d=c[1];a:if(null===d)d=!1;else{for(var e=0;e<d.length&&e<b.length;e++)if(!Zb(b[e],d[e])){d=!1;break a}d=!0}if(d)return c[0]}}a=a();O.memoizedState=[a,b];return a} -function kc(a,b,c){if(25<=cc)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(a===M)if(bc=!0,a={action:c,next:null},null===U&&(U=new Map),c=U.get(b),void 0===c)U.set(b,a);else{for(b=c;null!==b.next;)b=b.next;b.next=a}}function mc(){throw Error("startTransition cannot be called during server rendering.");}function nc(){throw Error("Cache cannot be refreshed during server rendering.");}function oc(){} -var qc={readContext:function(a){return a._currentValue2},useContext:function(a){V();return a._currentValue2},useMemo:lc,useReducer:jc,useRef:function(a){M=V();O=ec();var b=O.memoizedState;return null===b?(a={current:a},O.memoizedState=a):b},useState:function(a){return jc(ic,a)},useInsertionEffect:oc,useLayoutEffect:function(){},useCallback:function(a,b){return lc(function(){return a},b)},useImperativeHandle:oc,useEffect:oc,useDebugValue:oc,useDeferredValue:function(a){V();return a},useTransition:function(){V(); -return[!1,mc]},useId:function(){var a=$b.treeContext;var b=a.overflow;a=a.id;a=(a&~(1<<32-Pb(a)-1)).toString(32)+b;var c=pc;if(null===c)throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component.");b=Q++;a=":"+c.idPrefix+"R"+a;0<b&&(a+="H"+b.toString(32));return a+":"},useMutableSource:function(a,b){V();return b(a._source)},useSyncExternalStore:function(a,b,c){if(void 0===c)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering."); -return c()},useCacheRefresh:function(){return nc},use:function(a){if(null!==a&&"object"===typeof a){if("function"===typeof a.then){var b=R;R+=1;null===S&&(S=[]);return Vb(S,a,b)}if(a.$$typeof===nb||a.$$typeof===ob)return a._currentValue2}throw Error("An unsupported type was passed to use(): "+String(a));}},pc=null,rc={getCacheSignal:function(){throw Error("Not implemented.");},getCacheForType:function(){throw Error("Not implemented.");}},sc=Cb.ReactCurrentDispatcher,tc=Cb.ReactCurrentCache; -function uc(a){console.error(a);return null}function W(){} -function vc(a,b,c,d,e,f,g,k,h){var l=[],m=new Set,n={preloadsMap:new Map,stylesMap:new Map,scriptsMap:new Map,fontPreloads:new Set,precedences:new Map,usedStylesheets:new Set,scripts:new Set,usedScripts:new Set,explicitStylesheetPreloads:new Set,explicitScriptPreloads:new Set,explicitOtherPreloads:new Set,boundaryResources:null};b={destination:null,responseState:b,progressiveChunkSize:void 0===d?12800:d,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,resources:n,completedRootSegment:null, -abortableTasks:m,pingedTasks:l,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:void 0===e?uc:e,onAllReady:void 0===f?W:f,onShellReady:void 0===g?W:g,onShellError:void 0===k?W:k,onFatalError:void 0===h?W:h};c=wc(b,0,null,c,!1,!1);c.parentFlushed=!0;a=xc(b,null,a,null,c,m,Db,null,Nb);l.push(a);return b} -function xc(a,b,c,d,e,f,g,k,h){a.allPendingTasks++;null===d?a.pendingRootTasks++:d.pendingTasks++;var l={node:c,ping:function(){var b=a.pingedTasks;b.push(l);1===b.length&&yc(a)},blockedBoundary:d,blockedSegment:e,abortSet:f,legacyContext:g,context:k,treeContext:h,thenableState:b};f.add(l);return l}function wc(a,b,c,d,e,f){return{status:0,id:-1,index:b,parentFlushed:!1,chunks:[],children:[],formatContext:d,boundary:c,lastPushedText:e,textEmbedded:f}} -function X(a,b){a=a.onError(b);if(null!=a&&"string"!==typeof a)throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof a+'" instead');return a}function Y(a,b){var c=a.onShellError;c(b);c=a.onFatalError;c(b);null!==a.destination?(a.status=2,a.destination.destroy(b)):(a.status=1,a.fatalError=b)} -function zc(a,b){if(null!==a.completedRootSegment||0<a.pendingRootTasks)a=b.resources,a.forEach(db),a.clear()} -function Ac(a,b,c,d){var e=c.render(),f=d.childContextTypes;if(null!==f&&void 0!==f){var g=b.legacyContext;if("function"!==typeof c.getChildContext)d=g;else{c=c.getChildContext();for(var k in c)if(!(k in f))throw Error((Bb(d)||"Unknown")+'.getChildContext(): key "'+k+'" is not defined in childContextTypes.');d=p({},g,c)}b.legacyContext=d;Z(a,b,null,e);b.legacyContext=g}else Z(a,b,null,e)} -function Bc(a,b){if(a&&a.defaultProps){b=p({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c]);return b}return b} -function Cc(a,b,c,d,e,f){if("function"===typeof d)if(d.prototype&&d.prototype.isReactComponent)c=Eb(d,b.legacyContext),f=d.contextType,f=new d(e,"object"===typeof f&&null!==f?f._currentValue2:c),Mb(f,d,e,c),Ac(a,b,f,d);else{f=Eb(d,b.legacyContext);M={};$b=b;R=Q=0;S=c;c=d(e,f);c=fc(d,e,c,f);var g=0!==Q;if("object"===typeof c&&null!==c&&"function"===typeof c.render&&void 0===c.$$typeof)Mb(c,d,e,f),Ac(a,b,c,d);else if(g){e=b.treeContext;b.treeContext=Ob(e,1,0);try{Z(a,b,null,c)}finally{b.treeContext= -e}}else Z(a,b,null,c)}else if("string"===typeof d){c=b.blockedSegment;g=Ja(c.chunks,d,e,a.resources,a.responseState,c.formatContext,c.lastPushedText);c.lastPushedText=!1;f=c.formatContext;c.formatContext=xa(f,d,e);Dc(a,b,g);c.formatContext=f;a:{b=c.chunks;switch(d){case "title":case "style":case "script":case "area":case "base":case "br":case "col":case "embed":case "hr":case "img":case "input":case "keygen":case "link":case "meta":case "param":case "source":case "track":case "wbr":break a;case "body":if(1>= -f.insertionMode){a.responseState.hasBody=!0;break a}break;case "html":if(0===f.insertionMode)break a}b.push("</",d,">")}c.lastPushedText=!1}else{switch(d){case xb:case vb:case kb:case lb:case jb:Z(a,b,null,e.children);return;case wb:"hidden"!==e.mode&&Z(a,b,null,e.children);return;case rb:Z(a,b,null,e.children);return;case ub:throw Error("ReactDOMServer does not yet support scope components.");case qb:a:{d=b.blockedBoundary;c=b.blockedSegment;f=e.fallback;e=e.children;g=new Set;var k={id:null,rootSegmentID:-1, -parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:g,errorDigest:null,resources:new Set},h=wc(a,c.chunks.length,k,c.formatContext,!1,!1);c.children.push(h);c.lastPushedText=!1;var l=wc(a,0,null,c.formatContext,!1,!1);l.parentFlushed=!0;b.blockedBoundary=k;b.blockedSegment=l;a.resources.boundaryResources=k.resources;try{if(Dc(a,b,e),a.responseState.generateStaticMarkup||l.lastPushedText&&l.textEmbedded&&l.chunks.push("\x3c!-- --\x3e"),l.status= -1,0===k.pendingTasks&&zc(a,k),Ec(k,l),0===k.pendingTasks)break a}catch(m){l.status=4,k.forceClientRender=!0,k.errorDigest=X(a,m)}finally{a.resources.boundaryResources=d?d.resources:null,b.blockedBoundary=d,b.blockedSegment=c}b=xc(a,null,f,d,h,g,b.legacyContext,b.context,b.treeContext);a.pingedTasks.push(b)}return}if("object"===typeof d&&null!==d)switch(d.$$typeof){case pb:d=d.render;M={};$b=b;R=Q=0;S=c;c=d(e,f);e=fc(d,e,c,f);if(0!==Q){d=b.treeContext;b.treeContext=Ob(d,1,0);try{Z(a,b,null,e)}finally{b.treeContext= -d}}else Z(a,b,null,e);return;case sb:d=d.type;e=Bc(d,e);Cc(a,b,c,d,e,f);return;case mb:c=e.children;d=d._context;e=e.value;f=d._currentValue2;d._currentValue2=e;g=L;L=e={parent:g,depth:null===g?0:g.depth+1,context:d,parentValue:f,value:e};b.context=e;Z(a,b,null,c);a=L;if(null===a)throw Error("Tried to pop a Context at the root of the app. This is a bug in React.");e=a.parentValue;a.context._currentValue2=e===zb?a.context._defaultValue:e;a=L=a.parent;b.context=a;return;case nb:e=e.children;e=e(d._currentValue2); -Z(a,b,null,e);return;case tb:f=d._init;d=f(d._payload);e=Bc(d,e);Cc(a,b,c,d,e,void 0);return}throw Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+((null==d?d:typeof d)+"."));}} -function Z(a,b,c,d){b.node=d;if("object"===typeof d&&null!==d){switch(d.$$typeof){case hb:Cc(a,b,c,d.type,d.props,d.ref);return;case ib:throw Error("Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.");case tb:c=d._init;d=c(d._payload);Z(a,b,null,d);return}if(pa(d)){Fc(a,b,d);return}null===d||"object"!==typeof d?c=null:(c=Ab&&d[Ab]||d["@@iterator"],c="function"===typeof c?c:null);if(c&&(c=c.call(d))){d=c.next();if(!d.done){var e= -[];do e.push(d.value),d=c.next();while(!d.done);Fc(a,b,e)}return}a=Object.prototype.toString.call(d);throw Error("Objects are not valid as a React child (found: "+("[object Object]"===a?"object with keys {"+Object.keys(d).join(", ")+"}":a)+"). If you meant to render a collection of children, use an array instead.");}"string"===typeof d?(c=b.blockedSegment,c.lastPushedText=gb(b.blockedSegment.chunks,d,a.responseState,c.lastPushedText)):"number"===typeof d&&(c=b.blockedSegment,c.lastPushedText=gb(b.blockedSegment.chunks, -""+d,a.responseState,c.lastPushedText))}function Fc(a,b,c){for(var d=c.length,e=0;e<d;e++){var f=b.treeContext;b.treeContext=Ob(f,d,e);try{Dc(a,b,c[e])}finally{b.treeContext=f}}} -function Dc(a,b,c){var d=b.blockedSegment.formatContext,e=b.legacyContext,f=b.context;try{return Z(a,b,null,c)}catch(l){if(gc(),c=l===Tb?Xb():l,"object"===typeof c&&null!==c&&"function"===typeof c.then){var g=hc(),k=b.blockedSegment,h=wc(a,k.chunks.length,null,k.formatContext,k.lastPushedText,!0);k.children.push(h);k.lastPushedText=!1;a=xc(a,g,b.node,b.blockedBoundary,h,b.abortSet,b.legacyContext,b.context,b.treeContext).ping;c.then(a,a);b.blockedSegment.formatContext=d;b.legacyContext=e;b.context= -f;Kb(f)}else throw b.blockedSegment.formatContext=d,b.legacyContext=e,b.context=f,Kb(f),c;}}function Gc(a){var b=a.blockedBoundary;a=a.blockedSegment;a.status=3;Hc(this,b,a)} -function Ic(a,b,c){var d=a.blockedBoundary;a.blockedSegment.status=3;null===d?(b.allPendingTasks--,1!==b.status&&2!==b.status&&(X(b,c),Y(b,c))):(d.pendingTasks--,d.forceClientRender||(d.forceClientRender=!0,d.errorDigest=b.onError(c),d.parentFlushed&&b.clientRenderedBoundaries.push(d)),d.fallbackAbortableTasks.forEach(function(a){return Ic(a,b,c)}),d.fallbackAbortableTasks.clear(),b.allPendingTasks--,0===b.allPendingTasks&&(a=b.onAllReady,a()))} -function Ec(a,b){if(0===b.chunks.length&&1===b.children.length&&null===b.children[0].boundary){var c=b.children[0];c.id=b.id;c.parentFlushed=!0;1===c.status&&Ec(a,c)}else a.completedSegments.push(b)} -function Hc(a,b,c){if(null===b){if(c.parentFlushed){if(null!==a.completedRootSegment)throw Error("There can only be one root segment. This is a bug in React.");a.completedRootSegment=c}a.pendingRootTasks--;0===a.pendingRootTasks&&(a.onShellError=W,b=a.onShellReady,b())}else b.pendingTasks--,b.forceClientRender||(0===b.pendingTasks?(c.parentFlushed&&1===c.status&&Ec(b,c),zc(a,b),b.parentFlushed&&a.completedBoundaries.push(b),b.fallbackAbortableTasks.forEach(Gc,a),b.fallbackAbortableTasks.clear()): -c.parentFlushed&&1===c.status&&(Ec(b,c),1===b.completedSegments.length&&b.parentFlushed&&a.partialBoundaries.push(b)));a.allPendingTasks--;0===a.allPendingTasks&&(a=a.onAllReady,a())} -function yc(a){if(2!==a.status){var b=L,c=sc.current;sc.current=qc;var d=tc.current;tc.current=rc;var e=a.resources;wa.push(w);w=e;e=sa.current;sa.current=va;var f=pc;pc=a.responseState;try{var g=a.pingedTasks,k;for(k=0;k<g.length;k++){var h=g[k];var l=a,m=h.blockedBoundary;l.resources.boundaryResources=m?m.resources:null;var n=h.blockedSegment;if(0===n.status){Kb(h.context);try{var G=h.thenableState;h.thenableState=null;Z(l,h,G,h.node);l.responseState.generateStaticMarkup||n.lastPushedText&&n.textEmbedded&& -n.chunks.push("\x3c!-- --\x3e");h.abortSet.delete(h);n.status=1;Hc(l,h.blockedBoundary,n)}catch(E){gc();var z=E===Tb?Xb():E;if("object"===typeof z&&null!==z&&"function"===typeof z.then){var qa=h.ping;z.then(qa,qa);h.thenableState=hc()}else{h.abortSet.delete(h);n.status=4;var C=l,B=h.blockedBoundary,N=z,T=X(C,N);null===B?Y(C,N):(B.pendingTasks--,B.forceClientRender||(B.forceClientRender=!0,B.errorDigest=T,B.parentFlushed&&C.clientRenderedBoundaries.push(B)));C.allPendingTasks--;if(0===C.allPendingTasks){var ra= -C.onAllReady;ra()}}}finally{l.resources.boundaryResources=null}}}g.splice(0,k);null!==a.destination&&Jc(a,a.destination)}catch(E){X(a,E),Y(a,E)}finally{pc=f,sc.current=c,tc.current=d,w=wa.pop(),sa.current=e,c===qc&&Kb(b)}}} -function Kc(a,b,c){c.parentFlushed=!0;switch(c.status){case 0:var d=c.id=a.nextSegmentId++;c.lastPushedText=!1;c.textEmbedded=!1;a=a.responseState;b.push('<template id="');b.push(a.placeholderPrefix);a=d.toString(16);b.push(a);return b.push('"></template>');case 1:c.status=2;var e=!0;d=c.chunks;var f=0;c=c.children;for(var g=0;g<c.length;g++){for(e=c[g];f<e.index;f++)b.push(d[f]);e=Lc(a,b,e)}for(;f<d.length-1;f++)b.push(d[f]);f<d.length&&(e=b.push(d[f]));return e;default:throw Error("Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React."); +'use strict';var aa=require("react"),ba=require("react-dom"),ca=require("stream"),p=Object.prototype.hasOwnProperty,da=/^[: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][: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\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ea={},fa={}; +function ha(a){if(p.call(fa,a))return!0;if(p.call(ea,a))return!1;if(da.test(a))return fa[a]=!0;ea[a]=!0;return!1}function r(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var u={}; +"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){u[a]=new r(a,0,!1,a,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];u[b]=new r(b,1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){u[a]=new r(a,2,!1,a.toLowerCase(),null,!1,!1)}); +["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){u[a]=new r(a,2,!1,a,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){u[a]=new r(a,3,!1,a.toLowerCase(),null,!1,!1)}); +["checked","multiple","muted","selected"].forEach(function(a){u[a]=new r(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){u[a]=new r(a,4,!1,a,null,!1,!1)});["cols","rows","size","span"].forEach(function(a){u[a]=new r(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){u[a]=new r(a,5,!1,a.toLowerCase(),null,!1,!1)});var ia=/[\-:]([a-z])/g;function ja(a){return a[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 transform-origin 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".split(" ").forEach(function(a){var b=a.replace(ia, +ja);u[b]=new r(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(ia,ja);u[b]=new r(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(ia,ja);u[b]=new r(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){u[a]=new r(a,1,!1,a.toLowerCase(),null,!1,!1)}); +u.xlinkHref=new r("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){u[a]=new r(a,1,!1,a.toLowerCase(),null,!0,!0)}); +var ka={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0, +zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},la=["Webkit","ms","Moz","O"];Object.keys(ka).forEach(function(a){la.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);ka[b]=ka[a]})});var ma=/["'&<>]/; +function v(a){if("boolean"===typeof a||"number"===typeof a)return""+a;a=""+a;var b=ma.exec(a);if(b){var c="",d,e=0;for(d=b.index;d<a.length;d++){switch(a.charCodeAt(d)){case 34:b=""";break;case 38:b="&";break;case 39:b="'";break;case 60:b="<";break;case 62:b=">";break;default:continue}e!==d&&(c+=a.substring(e,d));e=d+1;c+=b}a=e!==d?c+a.substring(e,d):c}return a}var na=/([A-Z])/g,oa=/^ms-/,pa=Array.isArray,w=Object.assign,x=null,qa=[],ua={preload:sa,preinit:ta}; +function sa(a,b){if(x){var c=x;if("string"===typeof a&&a&&"object"===typeof b&&null!==b){var d=b.as,e=c.preloadsMap.get(a);e||(e=y(c,a,d,{href:a,rel:"preload",as:d,crossOrigin:"font"===d?"":b.crossOrigin,integrity:b.integrity}));switch(d){case "font":c.fontPreloads.add(e);break;case "style":c.explicitStylePreloads.add(e);break;case "script":c.explicitScriptPreloads.add(e)}}}} +function ta(a,b){if(x)a:{var c=x;if("string"===typeof a&&a&&"object"===typeof b&&null!==b)switch(b.as){case "style":var d=c.stylesMap.get(a);d||(d=b.precedence||"default",d=va(c,a,d,{rel:"stylesheet",href:a,"data-precedence":d,crossOrigin:b.crossOrigin}));d.set.add(d);c.explicitStylePreloads.add(d.hint);break a;case "script":d=c.scriptsMap.get(a),d||(d=wa(c,a,{src:a,async:!0,crossOrigin:b.crossOrigin,integrity:b.integrity}),c.scripts.add(d))}}} +function xa(a,b){return{rel:"preload",as:"style",href:a,crossOrigin:b.crossOrigin,integrity:b.integrity,media:b.media,hrefLang:b.hrefLang,referrerPolicy:b.referrerPolicy}}function ya(a,b){return{rel:"preload",as:"script",href:a,crossOrigin:b.crossOrigin,integrity:b.integrity,referrerPolicy:b.referrerPolicy}}function y(a,b,c,d){c={type:"preload",as:c,href:b,flushed:!1,props:d};a.preloadsMap.set(b,c);return c} +function va(a,b,c,d){var e=a.stylesMap,f=a.preloadsMap,g=a.precedences,h=g.get(c);h||(h=new Set,g.set(c,h));(f=f.get(b))?(a=f.props,null==d.crossOrigin&&(d.crossOrigin=a.crossOrigin),null==d.referrerPolicy&&(d.referrerPolicy=a.referrerPolicy),null==d.title&&(d.title=a.title)):(f=xa(b,d),f=y(a,b,"style",f),a.explicitStylePreloads.add(f));c={type:"style",href:b,precedence:c,flushed:!1,inShell:!1,props:d,hint:f,set:h};e.set(b,c);return c} +function wa(a,b,c){var d=a.scriptsMap,e=a.preloadsMap.get(b);e?(a=e.props,null==c.crossOrigin&&(c.crossOrigin=a.crossOrigin),null==c.referrerPolicy&&(c.referrerPolicy=a.referrerPolicy),null==c.integrity&&(c.integrity=a.integrity)):(e=ya(b,c),e=y(a,b,"script",e),a.explicitScriptPreloads.add(e));c={type:"script",src:b,flushed:!1,props:c,hint:e};d.set(b,c);return c} +function za(a,b){if(!x)throw Error('"currentResources" was expected to exist. This is a bug in React.');var c=x;switch(a){case "title":var d=b.children;d=Array.isArray(d)?1===d.length?d[0]:null:d;if("function"!==typeof d&&"symbol"!==typeof d&&null!==d&&void 0!==d){d=""+d;var e="title::"+d;a=c.headsMap.get(e);a||(b=w({},b),b.children=d,a={type:"title",props:b,flushed:!1},c.headsMap.set(e,a),c.headResources.add(a))}return!0;case "meta":if("string"===typeof b.charSet)d="charSet";else if("string"===typeof b.content)if(a= +"::"+b.content,"string"===typeof b.httpEquiv)d="httpEquiv::"+b.httpEquiv+a;else if("string"===typeof b.name)d="name::"+b.name+a;else if("string"===typeof b.itemProp)d="itemProp::"+b.itemProp+a;else if("string"===typeof b.property){var f=b.property;d="property::"+f+a;e=f;a=f.split(":").slice(0,-1).join(":");(a=c.structuredMetaKeys.get(a))&&(d=a.key+"::child::"+d)}d&&!c.headsMap.has(d)&&(b={type:"meta",key:d,props:w({},b),flushed:!1},c.headsMap.set(d,b),"charSet"===d?c.charset=b:(e&&c.structuredMetaKeys.set(e, +b),c.headResources.add(b)));return!0;case "base":return d=b.target,e=b.href,d="base"+("string"===typeof e?'[href="'+e+'"]':":not([href])")+("string"===typeof d?'[target="'+d+'"]':":not([target])"),c.headsMap.has(d)||(b={type:"base",props:w({},b),flushed:!1},c.headsMap.set(d,b),c.bases.add(b)),!0}return!1} +function Aa(a){if(!x)throw Error('"currentResources" was expected to exist. This is a bug in React.');var b=x,c=a.rel,d=a.href;if(!d||"string"!==typeof d||!c||"string"!==typeof c)return!1;switch(c){case "stylesheet":var e=a.onLoad,f=a.onError;c=a.precedence;var g=a.disabled;if("string"!==typeof c||e||f||null!=g)return c=b.preloadsMap.get(d),c||(c=y(b,d,"style",xa(d,a)),b.usedStylePreloads.add(c)),!1;e=b.stylesMap.get(d);e||(a=w({},a),a.href=d,a.rel="stylesheet",a["data-precedence"]=c,delete a.precedence, +e=va(x,d,c,a),b.usedStylePreloads.add(e.hint));b.boundaryResources?b.boundaryResources.add(e):e.set.add(e);return!0;case "preload":switch(e=a.as,e){case "script":case "style":case "font":c=b.preloadsMap.get(d);if(!c)switch(a=w({},a),a.href=d,a.rel="preload",a.as=e,"font"===e&&(a.crossOrigin=""),c=y(b,d,e,a),e){case "script":b.explicitScriptPreloads.add(c);break;case "style":b.explicitStylePreloads.add(c);break;case "font":b.fontPreloads.add(c)}return!0}}if(a.onLoad||a.onError)return!0;d="rel:"+c+ +"::href:"+d+"::sizes:"+("string"===typeof a.sizes?a.sizes:"")+"::media:"+("string"===typeof a.media?a.media:"");e=b.headsMap.get(d);if(!e)switch(e={type:"link",props:w({},a),flushed:!1},b.headsMap.set(d,e),c){case "preconnect":case "dns-prefetch":b.preconnects.add(e);break;default:b.headResources.add(e)}return!0}function Ba(a,b){var c=a.boundaryResources;c&&(b.forEach(function(a){return c.add(a)}),b.clear())}function Ca(a,b){b.forEach(function(a){return a.set.add(a)});b.clear()}var Da=ba.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Dispatcher; +function z(a,b,c){return{insertionMode:a,selectedValue:b,noscriptTagInScope:c}} +function Ea(a,b,c){switch(b){case "noscript":return z(1,null,!0);case "select":return z(1,null!=c.value?c.value:c.defaultValue,a.noscriptTagInScope);case "svg":return z(2,null,a.noscriptTagInScope);case "math":return z(3,null,a.noscriptTagInScope);case "foreignObject":return z(1,null,a.noscriptTagInScope);case "table":return z(4,null,a.noscriptTagInScope);case "thead":case "tbody":case "tfoot":return z(5,null,a.noscriptTagInScope);case "colgroup":return z(7,null,a.noscriptTagInScope);case "tr":return z(6, +null,a.noscriptTagInScope)}return 4<=a.insertionMode||0===a.insertionMode?z(1,null,a.noscriptTagInScope):a}var Fa=new Map; +function Ga(a,b,c){if("object"!==typeof c)throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");b=!0;for(var d in c)if(p.call(c,d)){var e=c[d];if(null!=e&&"boolean"!==typeof e&&""!==e){if(0===d.indexOf("--")){var f=v(d);e=v((""+e).trim())}else{f=d;var g=Fa.get(f);void 0!==g?f=g:(g=v(f.replace(na,"-$1").toLowerCase().replace(oa,"-ms-")),Fa.set(f,g),f=g);e="number"===typeof e?0===e||p.call(ka, +d)?""+e:e+"px":v((""+e).trim())}b?(b=!1,a.push(' style="',f,":",e)):a.push(";",f,":",e)}}b||a.push('"')} +function A(a,b,c,d){switch(c){case "style":Ga(a,b,d);return;case "defaultValue":case "defaultChecked":case "innerHTML":case "suppressContentEditableWarning":case "suppressHydrationWarning":return}if(!(2<c.length)||"o"!==c[0]&&"O"!==c[0]||"n"!==c[1]&&"N"!==c[1])if(b=u.hasOwnProperty(c)?u[c]:null,null!==b){switch(typeof d){case "function":case "symbol":return;case "boolean":if(!b.acceptsBooleans)return}c=b.attributeName;switch(b.type){case 3:d&&a.push(" ",c,'=""');break;case 4:!0===d?a.push(" ",c,'=""'): +!1!==d&&a.push(" ",c,'="',v(d),'"');break;case 5:isNaN(d)||a.push(" ",c,'="',v(d),'"');break;case 6:!isNaN(d)&&1<=d&&a.push(" ",c,'="',v(d),'"');break;default:b.sanitizeURL&&(d=""+d),a.push(" ",c,'="',v(d),'"')}}else if(ha(c)){switch(typeof d){case "function":case "symbol":return;case "boolean":if(b=c.toLowerCase().slice(0,5),"data-"!==b&&"aria-"!==b)return}a.push(" ",c,'="',v(d),'"')}} +function B(a,b,c){if(null!=b){if(null!=c)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if("object"!==typeof b||!("__html"in b))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.");b=b.__html;null!==b&&void 0!==b&&a.push(""+b)}}function Ha(a){var b="";aa.Children.forEach(a,function(a){null!=a&&(b+=a)});return b} +function E(a,b,c){var d="stylesheet"===b.rel;a.push(F("link"));for(var e in b)if(p.call(b,e)){var f=b[e];if(null!=f)switch(e){case "children":case "dangerouslySetInnerHTML":throw Error("link is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");case "precedence":if(d)continue;default:A(a,c,e,f)}}a.push("/>");return null} +function G(a,b,c,d){a.push(F(c));for(var e in b)if(p.call(b,e)){var f=b[e];if(null!=f)switch(e){case "children":case "dangerouslySetInnerHTML":throw Error(c+" is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:A(a,d,e,f)}}a.push("/>");return null} +function Ia(a,b,c){a.push(F("title"));var d=null,e;for(e in b)if(p.call(b,e)){var f=b[e];if(null!=f)switch(e){case "children":d=f;break;case "dangerouslySetInnerHTML":throw Error("`dangerouslySetInnerHTML` does not make sense on <title>.");default:A(a,c,e,f)}}a.push(">");b=Array.isArray(d)?2>d.length?d[0]:null:d;"function"!==typeof b&&"symbol"!==typeof b&&null!==b&&void 0!==b&&a.push(v(""+b));a.push("</","title",">");return null} +function Ja(a,b,c){a.push(F("script"));var d=null,e=null,f;for(f in b)if(p.call(b,f)){var g=b[f];if(null!=g)switch(f){case "children":d=g;break;case "dangerouslySetInnerHTML":e=g;break;default:A(a,c,f,g)}}a.push(">");B(a,e,d);"string"===typeof d&&a.push(v(d));a.push("</","script",">");return null} +function H(a,b,c,d){a.push(F(c));var e=c=null,f;for(f in b)if(p.call(b,f)){var g=b[f];if(null!=g)switch(f){case "children":c=g;break;case "dangerouslySetInnerHTML":e=g;break;default:A(a,d,f,g)}}a.push(">");B(a,e,c);return"string"===typeof c?(a.push(v(c)),null):c}var Ka=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,La=new Map;function F(a){var b=La.get(a);if(void 0===b){if(!Ka.test(a))throw Error("Invalid tag: "+a);b="<"+a;La.set(a,b)}return b} +function Ma(a,b,c,d,e,f,g){switch(c){case "select":a.push(F("select"));var h=g=null,l;for(l in d)if(p.call(d,l)){var k=d[l];if(null!=k)switch(l){case "children":g=k;break;case "dangerouslySetInnerHTML":h=k;break;case "defaultValue":case "value":break;default:A(a,e,l,k)}}a.push(">");B(a,h,g);return g;case "option":g=f.selectedValue;a.push(F("option"));var n=l=k=null,m=null;for(h in d)if(p.call(d,h)){var q=d[h];if(null!=q)switch(h){case "children":k=q;break;case "selected":n=q;break;case "dangerouslySetInnerHTML":m= +q;break;case "value":l=q;default:A(a,e,h,q)}}if(null!=g)if(d=null!==l?""+l:Ha(k),pa(g))for(e=0;e<g.length;e++){if(""+g[e]===d){a.push(' selected=""');break}}else""+g===d&&a.push(' selected=""');else n&&a.push(' selected=""');a.push(">");B(a,m,k);return k;case "textarea":a.push(F("textarea"));k=h=g=null;for(m in d)if(p.call(d,m)&&(l=d[m],null!=l))switch(m){case "children":k=l;break;case "value":g=l;break;case "defaultValue":h=l;break;case "dangerouslySetInnerHTML":throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>."); +default:A(a,e,m,l)}null===g&&null!==h&&(g=h);a.push(">");if(null!=k){if(null!=g)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(pa(k)&&1<k.length)throw Error("<textarea> can only have at most one child.");g=""+k}"string"===typeof g&&"\n"===g[0]&&a.push("\n");null!==g&&a.push(v(""+g));return null;case "input":a.push(F("input"));l=m=h=g=null;for(k in d)if(p.call(d,k)&&(n=d[k],null!=n))switch(k){case "children":case "dangerouslySetInnerHTML":throw Error("input is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."); +case "defaultChecked":l=n;break;case "defaultValue":h=n;break;case "checked":m=n;break;case "value":g=n;break;default:A(a,e,k,n)}null!==m?A(a,e,"checked",m):null!==l&&A(a,e,"checked",l);null!==g?A(a,e,"value",g):null!==h&&A(a,e,"value",h);a.push("/>");return null;case "menuitem":a.push(F("menuitem"));for(var t in d)if(p.call(d,t)&&(g=d[t],null!=g))switch(t){case "children":case "dangerouslySetInnerHTML":throw Error("menuitems cannot have `children` nor `dangerouslySetInnerHTML`.");default:A(a,e,t, +g)}a.push(">");return null;case "title":return a=2!==f.insertionMode&&!f.noscriptTagInScope&&za("title",d)?null:Ia(a,d,e),a;case "link":return!f.noscriptTagInScope&&Aa(d)?(g&&a.push("\x3c!-- --\x3e"),a=null):a=E(a,d,e),a;case "script":if(h=!f.noscriptTagInScope){if(!x)throw Error('"currentResources" was expected to exist. This is a bug in React.');h=x;k=d.src;m=d.onLoad;l=d.onError;k&&"string"===typeof k?d.async?(m||l?(m=h.preloadsMap.get(k),m||(m=y(h,k,"script",ya(k,d)),h.usedScriptPreloads.add(m))): +(m=h.scriptsMap.get(k),m||(m=w({},d),m.src=k,m=wa(h,k,m),h.scripts.add(m))),h=!0):h=!1:h=!1}h?(g&&a.push("\x3c!-- --\x3e"),a=null):a=Ja(a,d,e);return a;case "meta":return!f.noscriptTagInScope&&za("meta",d)?(g&&a.push("\x3c!-- --\x3e"),a=null):a=G(a,d,"meta",e),a;case "base":return!f.noscriptTagInScope&&za("base",d)?(g&&a.push("\x3c!-- --\x3e"),a=null):a=G(a,d,"base",e),a;case "listing":case "pre":a.push(F(c));h=g=null;for(n in d)if(p.call(d,n)&&(k=d[n],null!=k))switch(n){case "children":g=k;break; +case "dangerouslySetInnerHTML":h=k;break;default:A(a,e,n,k)}a.push(">");if(null!=h){if(null!=g)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if("object"!==typeof h||!("__html"in h))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.");d=h.__html;null!==d&&void 0!==d&&("string"===typeof d&&0<d.length&&"\n"===d[0]?a.push("\n",d):a.push(""+d))}"string"=== +typeof g&&"\n"===g[0]&&a.push("\n");return g;case "area":case "br":case "col":case "embed":case "hr":case "img":case "keygen":case "param":case "source":case "track":case "wbr":return G(a,d,c,e);case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return H(a,d,c,e);case "head":return H(b,d,c,e);case "html":return 0===f.insertionMode&&b.push("<!DOCTYPE html>"),H(b,d,c,e);default:if(-1=== +c.indexOf("-")&&"string"!==typeof d.is)return H(a,d,c,e);a.push(F(c));h=g=null;for(q in d)if(p.call(d,q)&&(k=d[q],null!=k))switch(q){case "children":g=k;break;case "dangerouslySetInnerHTML":h=k;break;case "style":Ga(a,e,k);break;case "suppressContentEditableWarning":case "suppressHydrationWarning":break;default:ha(q)&&"function"!==typeof k&&"symbol"!==typeof k&&a.push(" ",q,'="',v(k),'"')}a.push(">");B(a,h,g);return g}} +function Na(a,b,c){switch(c){case "title":case "script":case "area":case "base":case "br":case "col":case "embed":case "hr":case "img":case "input":case "keygen":case "link":case "meta":case "param":case "source":case "track":case "wbr":return;case "body":b.unshift("</",c,">");return;case "html":b.push("</",c,">");return}a.push("</",c,">")} +function Oa(a,b,c){a.push('\x3c!--$?--\x3e<template id="');if(null===c)throw Error("An ID must have been assigned before we can complete the boundary.");a.push(c);return a.push('"></template>')} +function Pa(a,b,c,d){switch(c.insertionMode){case 0:case 1:return a.push('<div hidden id="'),a.push(b.segmentPrefix),b=d.toString(16),a.push(b),a.push('">');case 2:return a.push('<svg aria-hidden="true" style="display:none" id="'),a.push(b.segmentPrefix),b=d.toString(16),a.push(b),a.push('">');case 3:return a.push('<math aria-hidden="true" style="display:none" id="'),a.push(b.segmentPrefix),b=d.toString(16),a.push(b),a.push('">');case 4:return a.push('<table hidden id="'),a.push(b.segmentPrefix), +b=d.toString(16),a.push(b),a.push('">');case 5:return a.push('<table hidden><tbody id="'),a.push(b.segmentPrefix),b=d.toString(16),a.push(b),a.push('">');case 6:return a.push('<table hidden><tr id="'),a.push(b.segmentPrefix),b=d.toString(16),a.push(b),a.push('">');case 7:return a.push('<table hidden><colgroup id="'),a.push(b.segmentPrefix),b=d.toString(16),a.push(b),a.push('">');default:throw Error("Unknown insertion mode. This is a bug in React.");}} +function Qa(a,b){switch(b.insertionMode){case 0:case 1:return a.push("</div>");case 2:return a.push("</svg>");case 3:return a.push("</math>");case 4:return a.push("</table>");case 5:return a.push("</tbody></table>");case 6:return a.push("</tr></table>");case 7:return a.push("</colgroup></table>");default:throw Error("Unknown insertion mode. This is a bug in React.");}}var Ra=/[<\u2028\u2029]/g; +function Sa(a){return JSON.stringify(a).replace(Ra,function(a){switch(a){case "<":return"\\u003c";case "\u2028":return"\\u2028";case "\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React");}})}var Ta=/[&><\u2028\u2029]/g; +function I(a){return JSON.stringify(a).replace(Ta,function(a){switch(a){case "&":return"\\u0026";case ">":return"\\u003e";case "<":return"\\u003c";case "\u2028":return"\\u2028";case "\u2029":return"\\u2029";default:throw Error("escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React");}})} +function Ua(a,b,c){function d(a){a.flushed||(E(e,a.props,c),a.flushed=!0)}var e=[],f=b.charset,g=b.bases,h=b.preconnects,l=b.fontPreloads,k=b.precedences,n=b.usedStylePreloads,m=b.scripts,q=b.usedScriptPreloads,t=b.explicitStylePreloads,K=b.explicitScriptPreloads,D=b.headResources;f&&(G(e,f.props,"meta",c),f.flushed=!0,b.charset=null);g.forEach(function(a){G(e,a.props,"base",c);a.flushed=!0});g.clear();h.forEach(function(a){E(e,a.props,c);a.flushed=!0});h.clear();l.forEach(function(a){E(e,a.props, +c);a.flushed=!0});l.clear();k.forEach(function(a,b){a.size?(a.forEach(function(a){E(e,a.props,c);a.flushed=!0;a.inShell=!0;a.hint.flushed=!0}),a.clear()):e.push('<style data-precedence="',v(b),'"></style>')});n.forEach(d);n.clear();m.forEach(function(a){Ja(e,a.props,c);a.flushed=!0;a.hint.flushed=!0});m.clear();q.forEach(d);q.clear();t.forEach(d);t.clear();K.forEach(d);K.clear();D.forEach(function(a){switch(a.type){case "title":Ia(e,a.props,c);break;case "meta":G(e,a.props,"meta",c);break;case "link":E(e, +a.props,c)}a.flushed=!0});D.clear();f=!0;for(b=0;b<e.length-1;b++)a.push(e[b]);b<e.length&&(f=a.push(e[b]));return f} +function Va(a,b,c){function d(a){a.flushed||(E(e,a.props,c),a.flushed=!0)}var e=[],f=b.charset,g=b.preconnects,h=b.fontPreloads,l=b.usedStylePreloads,k=b.scripts,n=b.usedScriptPreloads,m=b.explicitStylePreloads,q=b.explicitScriptPreloads,t=b.headResources;f&&(G(e,f.props,"meta",c),f.flushed=!0,b.charset=null);g.forEach(function(a){E(e,a.props,c);a.flushed=!0});g.clear();h.forEach(function(a){E(e,a.props,c);a.flushed=!0});h.clear();l.forEach(d);l.clear();k.forEach(function(a){H(e,a.props,"script", +c);Na(e,e,"script",a.props);a.flushed=!0;a.hint.flushed=!0});k.clear();n.forEach(d);n.clear();m.forEach(d);m.clear();q.forEach(d);q.clear();t.forEach(function(a){switch(a.type){case "title":Ia(e,a.props,c);break;case "meta":G(e,a.props,"meta",c);break;case "link":E(e,a.props,c)}a.flushed=!0});t.clear();f=!0;for(b=0;b<e.length-1;b++)a.push(e[b]);b<e.length&&(f=a.push(e[b]));return f} +function Wa(a,b){a.push("[");var c="[";b.forEach(function(b){if(!b.inShell)if(b.flushed)a.push(c),b=I(""+b.href),a.push(b),a.push("]"),c=",[";else{a.push(c);var d=b.precedence,f=b.props,g=I(""+b.href);a.push(g);d=""+d;a.push(",");d=I(d);a.push(d);for(var h in f)if(p.call(f,h)){var l=f[h];if(null!=l)switch(h){case "href":case "rel":case "precedence":case "data-precedence":break;case "children":case "dangerouslySetInnerHTML":throw Error("link is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."); +default:a:{d=a;var k=h;g=k.toLowerCase();switch(typeof l){case "function":case "symbol":break a}switch(k){case "innerHTML":case "dangerouslySetInnerHTML":case "suppressContentEditableWarning":case "suppressHydrationWarning":case "style":break a;case "className":g="class";break;case "hidden":if(!1===l)break a;break;case "src":case "href":break;default:if(!ha(k))break a}if(!(2<k.length)||"o"!==k[0]&&"O"!==k[0]||"n"!==k[1]&&"N"!==k[1])l=""+l,d.push(","),g=I(g),d.push(g),d.push(","),g=I(l),d.push(g)}}}a.push("]"); +c=",[";b.flushed=!0;b.hint.flushed=!0}});a.push("]")}function Xa(a,b){b=void 0===b?"":b;return{bootstrapChunks:[],placeholderPrefix:b+"P:",segmentPrefix:b+"S:",boundaryPrefix:b+"B:",idPrefix:b,nextSuspenseID:0,streamingFormat:0,startInlineScript:"<script>",sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1,sentStyleInsertionFunction:!1,externalRuntimeConfig:null,generateStaticMarkup:a}} +function Ya(){return{insertionMode:1,selectedValue:null,noscriptTagInScope:!1}}function Za(a,b,c,d){if(c.generateStaticMarkup)return a.push(v(b)),!1;""===b?a=d:(d&&a.push("\x3c!-- --\x3e"),a.push(v(b)),a=!0);return a} +var $a=Symbol.for("react.element"),ab=Symbol.for("react.portal"),bb=Symbol.for("react.fragment"),cb=Symbol.for("react.strict_mode"),db=Symbol.for("react.profiler"),eb=Symbol.for("react.provider"),fb=Symbol.for("react.context"),gb=Symbol.for("react.server_context"),hb=Symbol.for("react.forward_ref"),ib=Symbol.for("react.suspense"),jb=Symbol.for("react.suspense_list"),kb=Symbol.for("react.memo"),lb=Symbol.for("react.lazy"),mb=Symbol.for("react.scope"),nb=Symbol.for("react.debug_trace_mode"),ob=Symbol.for("react.offscreen"), +pb=Symbol.for("react.legacy_hidden"),qb=Symbol.for("react.cache"),rb=Symbol.for("react.default_value"),sb=Symbol.iterator; +function tb(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case bb:return"Fragment";case ab:return"Portal";case db:return"Profiler";case cb:return"StrictMode";case ib:return"Suspense";case jb:return"SuspenseList";case qb:return"Cache"}if("object"===typeof a)switch(a.$$typeof){case fb:return(a.displayName||"Context")+".Consumer";case eb:return(a._context.displayName||"Context")+".Provider";case hb:var b=a.render;a=a.displayName; +a||(a=b.displayName||b.name||"",a=""!==a?"ForwardRef("+a+")":"ForwardRef");return a;case kb:return b=a.displayName||null,null!==b?b:tb(a.type)||"Memo";case lb:b=a._payload;a=a._init;try{return tb(a(b))}catch(c){break}case gb:return(a.displayName||a._globalName)+".Provider"}return null}var ub=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,vb={};function wb(a,b){a=a.contextTypes;if(!a)return vb;var c={},d;for(d in a)c[d]=b[d];return c}var M=null; +function xb(a,b){if(a!==b){a.context._currentValue2=a.parentValue;a=a.parent;var c=b.parent;if(null===a){if(null!==c)throw Error("The stacks must reach the root at the same time. This is a bug in React.");}else{if(null===c)throw Error("The stacks must reach the root at the same time. This is a bug in React.");xb(a,c)}b.context._currentValue2=b.value}}function yb(a){a.context._currentValue2=a.parentValue;a=a.parent;null!==a&&yb(a)} +function zb(a){var b=a.parent;null!==b&&zb(b);a.context._currentValue2=a.value}function Ab(a,b){a.context._currentValue2=a.parentValue;a=a.parent;if(null===a)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===b.depth?xb(a,b):Ab(a,b)} +function Bb(a,b){var c=b.parent;if(null===c)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===c.depth?xb(a,c):Bb(a,c);b.context._currentValue2=b.value}function Cb(a){var b=M;b!==a&&(null===b?zb(a):null===a?yb(b):b.depth===a.depth?xb(b,a):b.depth>a.depth?Ab(b,a):Bb(b,a),M=a)} +var Db={isMounted:function(){return!1},enqueueSetState:function(a,b){a=a._reactInternals;null!==a.queue&&a.queue.push(b)},enqueueReplaceState:function(a,b){a=a._reactInternals;a.replace=!0;a.queue=[b]},enqueueForceUpdate:function(){}}; +function Eb(a,b,c,d){var e=void 0!==a.state?a.state:null;a.updater=Db;a.props=c;a.state=e;var f={queue:[],replace:!1};a._reactInternals=f;var g=b.contextType;a.context="object"===typeof g&&null!==g?g._currentValue2:d;g=b.getDerivedStateFromProps;"function"===typeof g&&(g=g(c,e),e=null===g||void 0===g?e:w({},e,g),a.state=e);if("function"!==typeof b.getDerivedStateFromProps&&"function"!==typeof a.getSnapshotBeforeUpdate&&("function"===typeof a.UNSAFE_componentWillMount||"function"===typeof a.componentWillMount))if(b= +a.state,"function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),b!==a.state&&Db.enqueueReplaceState(a,a.state,null),null!==f.queue&&0<f.queue.length)if(b=f.queue,g=f.replace,f.queue=null,f.replace=!1,g&&1===b.length)a.state=b[0];else{f=g?b[0]:a.state;e=!0;for(g=g?1:0;g<b.length;g++){var h=b[g];h="function"===typeof h?h.call(a,f,c,d):h;null!=h&&(e?(e=!1,f=w({},f,h)):w(f,h))}a.state=f}else f.queue=null} +var Fb={id:1,overflow:""};function Gb(a,b,c){var d=a.id;a=a.overflow;var e=32-Hb(d)-1;d&=~(1<<e);c+=1;var f=32-Hb(b)+e;if(30<f){var g=e-e%5;f=(d&(1<<g)-1).toString(32);d>>=g;e-=g;return{id:1<<32-Hb(b)+e|c<<e|d,overflow:f+a}}return{id:1<<f|c<<e|d,overflow:a}}var Hb=Math.clz32?Math.clz32:Ib,Jb=Math.log,Kb=Math.LN2;function Ib(a){a>>>=0;return 0===a?32:31-(Jb(a)/Kb|0)|0}var Lb=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`"); +function Mb(){}function Nb(a,b,c){c=a[c];void 0===c?a.push(b):c!==b&&(b.then(Mb,Mb),b=c);switch(b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;default:if("string"!==typeof b.status)switch(a=b,a.status="pending",a.then(function(a){if("pending"===b.status){var c=b;c.status="fulfilled";c.value=a}},function(a){if("pending"===b.status){var c=b;c.status="rejected";c.reason=a}}),b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;}Ob=b;throw Lb;}}var Ob=null; +function Pb(){if(null===Ob)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var a=Ob;Ob=null;return a}function Qb(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var Rb="function"===typeof Object.is?Object.is:Qb,N=null,Sb=null,Tb=null,O=null,P=!1,Ub=!1,Q=0,R=0,T=null,U=null,Vb=0; +function V(){if(null===N)throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.");return N} +function Wb(){if(0<Vb)throw Error("Rendered more hooks than during the previous render");return{memoizedState:null,queue:null,next:null}}function Xb(){null===O?null===Tb?(P=!1,Tb=O=Wb()):(P=!0,O=Tb):null===O.next?(P=!1,O=O.next=Wb()):(P=!0,O=O.next);return O}function Yb(a,b,c,d){for(;Ub;)Ub=!1,R=Q=0,Vb+=1,O=null,c=a(b,d);Zb();return c}function $b(){var a=T;T=null;return a}function Zb(){Sb=N=null;Ub=!1;Tb=null;Vb=0;O=U=null}function ac(a,b){return"function"===typeof b?b(a):b} +function bc(a,b,c){N=V();O=Xb();if(P){var d=O.queue;b=d.dispatch;if(null!==U&&(c=U.get(d),void 0!==c)){U.delete(d);d=O.memoizedState;do d=a(d,c.action),c=c.next;while(null!==c);O.memoizedState=d;return[d,b]}return[O.memoizedState,b]}a=a===ac?"function"===typeof b?b():b:void 0!==c?c(b):b;O.memoizedState=a;a=O.queue={last:null,dispatch:null};a=a.dispatch=cc.bind(null,N,a);return[O.memoizedState,a]} +function dc(a,b){N=V();O=Xb();b=void 0===b?null:b;if(null!==O){var c=O.memoizedState;if(null!==c&&null!==b){var d=c[1];a:if(null===d)d=!1;else{for(var e=0;e<d.length&&e<b.length;e++)if(!Rb(b[e],d[e])){d=!1;break a}d=!0}if(d)return c[0]}}a=a();O.memoizedState=[a,b];return a} +function cc(a,b,c){if(25<=Vb)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(a===N)if(Ub=!0,a={action:c,next:null},null===U&&(U=new Map),c=U.get(b),void 0===c)U.set(b,a);else{for(b=c;null!==b.next;)b=b.next;b.next=a}}function ec(){throw Error("startTransition cannot be called during server rendering.");}function fc(){throw Error("Cache cannot be refreshed during server rendering.");}function gc(){} +var ic={readContext:function(a){return a._currentValue2},useContext:function(a){V();return a._currentValue2},useMemo:dc,useReducer:bc,useRef:function(a){N=V();O=Xb();var b=O.memoizedState;return null===b?(a={current:a},O.memoizedState=a):b},useState:function(a){return bc(ac,a)},useInsertionEffect:gc,useLayoutEffect:function(){},useCallback:function(a,b){return dc(function(){return a},b)},useImperativeHandle:gc,useEffect:gc,useDebugValue:gc,useDeferredValue:function(a){V();return a},useTransition:function(){V(); +return[!1,ec]},useId:function(){var a=Sb.treeContext;var b=a.overflow;a=a.id;a=(a&~(1<<32-Hb(a)-1)).toString(32)+b;var c=hc;if(null===c)throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component.");b=Q++;a=":"+c.idPrefix+"R"+a;0<b&&(a+="H"+b.toString(32));return a+":"},useMutableSource:function(a,b){V();return b(a._source)},useSyncExternalStore:function(a,b,c){if(void 0===c)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering."); +return c()},useCacheRefresh:function(){return fc},use:function(a){if(null!==a&&"object"===typeof a){if("function"===typeof a.then){var b=R;R+=1;null===T&&(T=[]);return Nb(T,a,b)}if(a.$$typeof===fb||a.$$typeof===gb)return a._currentValue2}throw Error("An unsupported type was passed to use(): "+String(a));}},hc=null,jc={getCacheSignal:function(){throw Error("Not implemented.");},getCacheForType:function(){throw Error("Not implemented.");}},kc=ub.ReactCurrentDispatcher,lc=ub.ReactCurrentCache; +function mc(a){console.error(a);return null}function X(){} +function nc(a,b,c,d,e,f,g,h,l){var k=[],n=new Set,m={preloadsMap:new Map,stylesMap:new Map,scriptsMap:new Map,headsMap:new Map,charset:null,bases:new Set,preconnects:new Set,fontPreloads:new Set,precedences:new Map,usedStylePreloads:new Set,scripts:new Set,usedScriptPreloads:new Set,explicitStylePreloads:new Set,explicitScriptPreloads:new Set,headResources:new Set,structuredMetaKeys:new Map,boundaryResources:null};b={destination:null,responseState:b,progressiveChunkSize:void 0===d?12800:d,status:0, +fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,resources:m,completedRootSegment:null,abortableTasks:n,pingedTasks:k,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],preamble:[],postamble:[],onError:void 0===e?mc:e,onAllReady:void 0===f?X:f,onShellReady:void 0===g?X:g,onShellError:void 0===h?X:h,onFatalError:void 0===l?X:l};c=oc(b,0,null,c,!1,!1);c.parentFlushed=!0;a=pc(b,null,a,null,c,n,vb,null,Fb);k.push(a);return b} +function pc(a,b,c,d,e,f,g,h,l){a.allPendingTasks++;null===d?a.pendingRootTasks++:d.pendingTasks++;var k={node:c,ping:function(){var b=a.pingedTasks;b.push(k);1===b.length&&qc(a)},blockedBoundary:d,blockedSegment:e,abortSet:f,legacyContext:g,context:h,treeContext:l,thenableState:b};f.add(k);return k}function oc(a,b,c,d,e,f){return{status:0,id:-1,index:b,parentFlushed:!1,chunks:[],children:[],formatContext:d,boundary:c,lastPushedText:e,textEmbedded:f}} +function Y(a,b){a=a.onError(b);if(null!=a&&"string"!==typeof a)throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof a+'" instead');return a}function rc(a,b){var c=a.onShellError;c(b);c=a.onFatalError;c(b);null!==a.destination?(a.status=2,a.destination.destroy(b)):(a.status=1,a.fatalError=b)} +function sc(a,b,c,d){var e=c.render(),f=d.childContextTypes;if(null!==f&&void 0!==f){var g=b.legacyContext;if("function"!==typeof c.getChildContext)d=g;else{c=c.getChildContext();for(var h in c)if(!(h in f))throw Error((tb(d)||"Unknown")+'.getChildContext(): key "'+h+'" is not defined in childContextTypes.');d=w({},g,c)}b.legacyContext=d;Z(a,b,null,e);b.legacyContext=g}else Z(a,b,null,e)} +function tc(a,b){if(a&&a.defaultProps){b=w({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c]);return b}return b} +function uc(a,b,c,d,e,f){if("function"===typeof d)if(d.prototype&&d.prototype.isReactComponent)c=wb(d,b.legacyContext),f=d.contextType,f=new d(e,"object"===typeof f&&null!==f?f._currentValue2:c),Eb(f,d,e,c),sc(a,b,f,d);else{f=wb(d,b.legacyContext);N={};Sb=b;R=Q=0;T=c;c=d(e,f);c=Yb(d,e,c,f);var g=0!==Q;if("object"===typeof c&&null!==c&&"function"===typeof c.render&&void 0===c.$$typeof)Eb(c,d,e,f),sc(a,b,c,d);else if(g){e=b.treeContext;b.treeContext=Gb(e,1,0);try{Z(a,b,null,c)}finally{b.treeContext= +e}}else Z(a,b,null,c)}else if("string"===typeof d)c=b.blockedSegment,f=Ma(c.chunks,a.preamble,d,e,a.responseState,c.formatContext,c.lastPushedText),c.lastPushedText=!1,g=c.formatContext,c.formatContext=Ea(g,d,e),vc(a,b,f),c.formatContext=g,Na(c.chunks,a.postamble,d),c.lastPushedText=!1;else{switch(d){case pb:case nb:case cb:case db:case bb:Z(a,b,null,e.children);return;case ob:"hidden"!==e.mode&&Z(a,b,null,e.children);return;case jb:Z(a,b,null,e.children);return;case mb:throw Error("ReactDOMServer does not yet support scope components."); +case ib:a:{d=b.blockedBoundary;c=b.blockedSegment;f=e.fallback;e=e.children;g=new Set;var h={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:g,errorDigest:null,resources:new Set},l=oc(a,c.chunks.length,h,c.formatContext,!1,!1);c.children.push(l);c.lastPushedText=!1;var k=oc(a,0,null,c.formatContext,!1,!1);k.parentFlushed=!0;b.blockedBoundary=h;b.blockedSegment=k;a.resources.boundaryResources=h.resources;try{if(vc(a, +b,e),a.responseState.generateStaticMarkup||k.lastPushedText&&k.textEmbedded&&k.chunks.push("\x3c!-- --\x3e"),k.status=1,0===h.pendingTasks&&(null!==a.completedRootSegment||0<a.pendingRootTasks)&&Ca(a.resources,h.resources),wc(h,k),0===h.pendingTasks)break a}catch(n){k.status=4,h.forceClientRender=!0,h.errorDigest=Y(a,n)}finally{a.resources.boundaryResources=d?d.resources:null,b.blockedBoundary=d,b.blockedSegment=c}b=pc(a,null,f,d,l,g,b.legacyContext,b.context,b.treeContext);a.pingedTasks.push(b)}return}if("object"=== +typeof d&&null!==d)switch(d.$$typeof){case hb:d=d.render;N={};Sb=b;R=Q=0;T=c;c=d(e,f);e=Yb(d,e,c,f);if(0!==Q){d=b.treeContext;b.treeContext=Gb(d,1,0);try{Z(a,b,null,e)}finally{b.treeContext=d}}else Z(a,b,null,e);return;case kb:d=d.type;e=tc(d,e);uc(a,b,c,d,e,f);return;case eb:c=e.children;d=d._context;e=e.value;f=d._currentValue2;d._currentValue2=e;g=M;M=e={parent:g,depth:null===g?0:g.depth+1,context:d,parentValue:f,value:e};b.context=e;Z(a,b,null,c);a=M;if(null===a)throw Error("Tried to pop a Context at the root of the app. This is a bug in React."); +e=a.parentValue;a.context._currentValue2=e===rb?a.context._defaultValue:e;a=M=a.parent;b.context=a;return;case fb:e=e.children;e=e(d._currentValue2);Z(a,b,null,e);return;case lb:f=d._init;d=f(d._payload);e=tc(d,e);uc(a,b,c,d,e,void 0);return}throw Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+((null==d?d:typeof d)+"."));}} +function Z(a,b,c,d){b.node=d;if("object"===typeof d&&null!==d){switch(d.$$typeof){case $a:uc(a,b,c,d.type,d.props,d.ref);return;case ab:throw Error("Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.");case lb:c=d._init;d=c(d._payload);Z(a,b,null,d);return}if(pa(d)){xc(a,b,d);return}null===d||"object"!==typeof d?c=null:(c=sb&&d[sb]||d["@@iterator"],c="function"===typeof c?c:null);if(c&&(c=c.call(d))){d=c.next();if(!d.done){var e= +[];do e.push(d.value),d=c.next();while(!d.done);xc(a,b,e)}return}a=Object.prototype.toString.call(d);throw Error("Objects are not valid as a React child (found: "+("[object Object]"===a?"object with keys {"+Object.keys(d).join(", ")+"}":a)+"). If you meant to render a collection of children, use an array instead.");}"string"===typeof d?(c=b.blockedSegment,c.lastPushedText=Za(b.blockedSegment.chunks,d,a.responseState,c.lastPushedText)):"number"===typeof d&&(c=b.blockedSegment,c.lastPushedText=Za(b.blockedSegment.chunks, +""+d,a.responseState,c.lastPushedText))}function xc(a,b,c){for(var d=c.length,e=0;e<d;e++){var f=b.treeContext;b.treeContext=Gb(f,d,e);try{vc(a,b,c[e])}finally{b.treeContext=f}}} +function vc(a,b,c){var d=b.blockedSegment.formatContext,e=b.legacyContext,f=b.context;try{return Z(a,b,null,c)}catch(k){if(Zb(),c=k===Lb?Pb():k,"object"===typeof c&&null!==c&&"function"===typeof c.then){var g=$b(),h=b.blockedSegment,l=oc(a,h.chunks.length,null,h.formatContext,h.lastPushedText,!0);h.children.push(l);h.lastPushedText=!1;a=pc(a,g,b.node,b.blockedBoundary,l,b.abortSet,b.legacyContext,b.context,b.treeContext).ping;c.then(a,a);b.blockedSegment.formatContext=d;b.legacyContext=e;b.context= +f;Cb(f)}else throw b.blockedSegment.formatContext=d,b.legacyContext=e,b.context=f,Cb(f),c;}}function yc(a){var b=a.blockedBoundary;a=a.blockedSegment;a.status=3;zc(this,b,a)} +function Ac(a,b,c){var d=a.blockedBoundary;a.blockedSegment.status=3;null===d?(b.allPendingTasks--,1!==b.status&&2!==b.status&&(Y(b,c),rc(b,c))):(d.pendingTasks--,d.forceClientRender||(d.forceClientRender=!0,d.errorDigest=b.onError(c),d.parentFlushed&&b.clientRenderedBoundaries.push(d)),d.fallbackAbortableTasks.forEach(function(a){return Ac(a,b,c)}),d.fallbackAbortableTasks.clear(),b.allPendingTasks--,0===b.allPendingTasks&&(a=b.onAllReady,a()))} +function wc(a,b){if(0===b.chunks.length&&1===b.children.length&&null===b.children[0].boundary){var c=b.children[0];c.id=b.id;c.parentFlushed=!0;1===c.status&&wc(a,c)}else a.completedSegments.push(b)} +function zc(a,b,c){if(null===b){if(c.parentFlushed){if(null!==a.completedRootSegment)throw Error("There can only be one root segment. This is a bug in React.");a.completedRootSegment=c}a.pendingRootTasks--;0===a.pendingRootTasks&&(a.onShellError=X,b=a.onShellReady,b())}else b.pendingTasks--,b.forceClientRender||(0===b.pendingTasks?(c.parentFlushed&&1===c.status&&wc(b,c),(null!==a.completedRootSegment||0<a.pendingRootTasks)&&Ca(a.resources,b.resources),b.parentFlushed&&a.completedBoundaries.push(b), +b.fallbackAbortableTasks.forEach(yc,a),b.fallbackAbortableTasks.clear()):c.parentFlushed&&1===c.status&&(wc(b,c),1===b.completedSegments.length&&b.parentFlushed&&a.partialBoundaries.push(b)));a.allPendingTasks--;0===a.allPendingTasks&&(a=a.onAllReady,a())} +function qc(a){if(2!==a.status){var b=M,c=kc.current;kc.current=ic;var d=lc.current;lc.current=jc;var e=a.resources;qa.push(x);x=e;e=Da.current;Da.current=ua;var f=hc;hc=a.responseState;try{var g=a.pingedTasks,h;for(h=0;h<g.length;h++){var l=g[h];var k=a,n=l.blockedBoundary;k.resources.boundaryResources=n?n.resources:null;var m=l.blockedSegment;if(0===m.status){Cb(l.context);try{var q=l.thenableState;l.thenableState=null;Z(k,l,q,l.node);k.responseState.generateStaticMarkup||m.lastPushedText&&m.textEmbedded&& +m.chunks.push("\x3c!-- --\x3e");l.abortSet.delete(l);m.status=1;zc(k,l.blockedBoundary,m)}catch(J){Zb();var t=J===Lb?Pb():J;if("object"===typeof t&&null!==t&&"function"===typeof t.then){var K=l.ping;t.then(K,K);l.thenableState=$b()}else{l.abortSet.delete(l);m.status=4;var D=k,C=l.blockedBoundary,L=t,W=Y(D,L);null===C?rc(D,L):(C.pendingTasks--,C.forceClientRender||(C.forceClientRender=!0,C.errorDigest=W,C.parentFlushed&&D.clientRenderedBoundaries.push(C)));D.allPendingTasks--;if(0===D.allPendingTasks){var S= +D.onAllReady;S()}}}finally{k.resources.boundaryResources=null}}}g.splice(0,h);null!==a.destination&&Bc(a,a.destination)}catch(J){Y(a,J),rc(a,J)}finally{hc=f,kc.current=c,lc.current=d,x=qa.pop(),Da.current=e,c===ic&&Cb(b)}}} +function Cc(a,b,c){c.parentFlushed=!0;switch(c.status){case 0:var d=c.id=a.nextSegmentId++;c.lastPushedText=!1;c.textEmbedded=!1;a=a.responseState;b.push('<template id="');b.push(a.placeholderPrefix);a=d.toString(16);b.push(a);return b.push('"></template>');case 1:c.status=2;var e=!0;d=c.chunks;var f=0;c=c.children;for(var g=0;g<c.length;g++){for(e=c[g];f<e.index;f++)b.push(d[f]);e=Dc(a,b,e)}for(;f<d.length-1;f++)b.push(d[f]);f<d.length&&(e=b.push(d[f]));return e;default:throw Error("Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React."); }} -function Lc(a,b,c){var d=c.boundary;if(null===d)return Kc(a,b,c);d.parentFlushed=!0;if(d.forceClientRender)return a.responseState.generateStaticMarkup||(d=d.errorDigest,b.push("\x3c!--$!--\x3e"),b.push("<template"),d&&(b.push(' data-dgst="'),d=v(d),b.push(d),b.push('"')),b.push("></template>")),Kc(a,b,c),a=a.responseState.generateStaticMarkup?!0:b.push("\x3c!--/$--\x3e"),a;if(0<d.pendingTasks){d.rootSegmentID=a.nextSegmentId++;0<d.completedSegments.length&&a.partialBoundaries.push(d);var e=a.responseState;var f= -e.nextSuspenseID++;e=e.boundaryPrefix+f.toString(16);d=d.id=e;Ka(b,a.responseState,d);Kc(a,b,c);return b.push("\x3c!--/$--\x3e")}if(d.byteSize>a.progressiveChunkSize)return d.rootSegmentID=a.nextSegmentId++,a.completedBoundaries.push(d),Ka(b,a.responseState,d.id),Kc(a,b,c),b.push("\x3c!--/$--\x3e");c=d.resources;if(e=a.resources.boundaryResources)c.forEach(cb,e),c.clear();a.responseState.generateStaticMarkup||b.push("\x3c!--$--\x3e");c=d.completedSegments;if(1!==c.length)throw Error("A previously unvisited boundary must have exactly one root segment. This is a bug in React."); -Lc(a,b,c[0]);a=a.responseState.generateStaticMarkup?!0:b.push("\x3c!--/$--\x3e");return a}function Mc(a,b,c){La(b,a.responseState,c.formatContext,c.id);Lc(a,b,c);return Ma(b,c.formatContext)} -function Nc(a,b,c){a.resources.boundaryResources=c.resources;for(var d=c.completedSegments,e=0;e<d.length;e++)Oc(a,b,c,d[e]);d.length=0;Sa(b,c.resources);a=a.responseState;d=c.id;e=c.rootSegmentID;c=c.resources;var f;b:{for(f=c.values();;){var g=f.next().value;if(!g)break;if(0===(g.state&1)){f=!0;break b}}f=!1}b.push(a.startInlineScript);f?0===(a.instructions&2)?(a.instructions|=10,b.push('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RM=new Map;\n$RR=function(p,q,w){function r(l){this.s=l}for(var t=$RC,m=$RM,u=new Map,n=new Map,g=document,h,e,f=g.querySelectorAll("template[data-precedence]"),c=0;e=f[c++];){for(var b=e.content.firstChild;b;b=b.nextSibling)u.set(b.getAttribute("data-href"),b);e.parentNode.removeChild(e)}f=g.querySelectorAll("link[data-precedence],style[data-precedence]");for(c=0;e=f[c++];)m.set(e.getAttribute("STYLE"===e.nodeName?"data-href":"href"),e),n.set(e.dataset.precedence,h=e);e=0;f=[];for(var d,\nv,a;d=w[e++];){var k=0;b=d[k++];if(!(a=m.get(b))){if(a=u.get(b))c=a.getAttribute("data-precedence");else{a=g.createElement("link");a.href=b;a.rel="stylesheet";for(a.dataset.precedence=c=d[k++];v=d[k++];)a.setAttribute(v,d[k++]);d=a._p=new Promise(function(l,x){a.onload=l;a.onerror=x});d.then(r.bind(d,"l"),r.bind(d,"e"))}m.set(b,a);b=n.get(c)||h;b===h&&(h=a);n.set(c,a);b?b.parentNode.insertBefore(a,b.nextSibling):(c=g.head,c.insertBefore(a,c.firstChild))}d=a._p;c=a.getAttribute("media");!d||"l"===\nd.s||c&&!matchMedia(c).matches||f.push(d)}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};$RR("')): -0===(a.instructions&8)?(a.instructions|=8,b.push('$RM=new Map;\n$RR=function(p,q,w){function r(l){this.s=l}for(var t=$RC,m=$RM,u=new Map,n=new Map,g=document,h,e,f=g.querySelectorAll("template[data-precedence]"),c=0;e=f[c++];){for(var b=e.content.firstChild;b;b=b.nextSibling)u.set(b.getAttribute("data-href"),b);e.parentNode.removeChild(e)}f=g.querySelectorAll("link[data-precedence],style[data-precedence]");for(c=0;e=f[c++];)m.set(e.getAttribute("STYLE"===e.nodeName?"data-href":"href"),e),n.set(e.dataset.precedence,h=e);e=0;f=[];for(var d,\nv,a;d=w[e++];){var k=0;b=d[k++];if(!(a=m.get(b))){if(a=u.get(b))c=a.getAttribute("data-precedence");else{a=g.createElement("link");a.href=b;a.rel="stylesheet";for(a.dataset.precedence=c=d[k++];v=d[k++];)a.setAttribute(v,d[k++]);d=a._p=new Promise(function(l,x){a.onload=l;a.onerror=x});d.then(r.bind(d,"l"),r.bind(d,"e"))}m.set(b,a);b=n.get(c)||h;b===h&&(h=a);n.set(c,a);b?b.parentNode.insertBefore(a,b.nextSibling):(c=g.head,c.insertBefore(a,c.firstChild))}d=a._p;c=a.getAttribute("media");!d||"l"===\nd.s||c&&!matchMedia(c).matches||f.push(d)}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};$RR("')): -b.push('$RR("'):0===(a.instructions&2)?(a.instructions|=2,b.push('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RC("')): -b.push('$RC("');if(null===d)throw Error("An ID must have been assigned before we can complete the boundary.");e=e.toString(16);b.push(d);b.push('","');b.push(a.segmentPrefix);b.push(e);f?(b.push('",'),bb(b,c)):b.push('"');b=b.push(")\x3c/script>");return b} -function Oc(a,b,c,d){if(2===d.status)return!0;var e=d.id;if(-1===e){if(-1===(d.id=c.rootSegmentID))throw Error("A root segment ID must have been assigned by now. This is a bug in React.");return Mc(a,b,d)}Mc(a,b,d);a=a.responseState;b.push(a.startInlineScript);0===(a.instructions&1)?(a.instructions|=1,b.push('$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};;$RS("')): -b.push('$RS("');b.push(a.segmentPrefix);e=e.toString(16);b.push(e);b.push('","');b.push(a.placeholderPrefix);b.push(e);b=b.push('")\x3c/script>');return b} -function Jc(a,b){try{var c,d=a.completedRootSegment;if(null!==d)if(0===a.pendingRootTasks){$a(b,a.resources,a.responseState,0===a.allPendingTasks);Lc(a,b,d);a.completedRootSegment=null;var e=a.responseState.bootstrapChunks;for(d=0;d<e.length-1;d++)b.push(e[d]);d<e.length&&b.push(e[d])}else return;else ab(b,a.resources,a.responseState);var f=a.clientRenderedBoundaries;for(c=0;c<f.length;c++){var g=f[c];e=b;var k=a.responseState,h=g.id,l=g.errorDigest,m=g.errorMessage,n=g.errorComponentStack;e.push(k.startInlineScript); -0===(k.instructions&4)?(k.instructions|=4,e.push('$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};;$RX("')):e.push('$RX("');if(null===h)throw Error("An ID must have been assigned before we can complete the boundary.");e.push(h);e.push('"');if(l||m||n){e.push(",");var G=Oa(l||"");e.push(G)}if(m||n){e.push(",");var z=Oa(m||"");e.push(z)}if(n){e.push(",");var qa=Oa(n);e.push(qa)}if(!e.push(")\x3c/script>")){a.destination= -null;c++;f.splice(0,c);return}}f.splice(0,c);var C=a.completedBoundaries;for(c=0;c<C.length;c++)if(!Nc(a,b,C[c])){a.destination=null;c++;C.splice(0,c);return}C.splice(0,c);var B=a.partialBoundaries;for(c=0;c<B.length;c++){var N=B[c];a:{f=a;g=b;f.resources.boundaryResources=N.resources;var T=N.completedSegments;for(k=0;k<T.length;k++)if(!Oc(f,g,N,T[k])){k++;T.splice(0,k);var ra=!1;break a}T.splice(0,k);ra=Sa(g,N.resources)}if(!ra){a.destination=null;c++;B.splice(0,c);return}}B.splice(0,c);var E=a.completedBoundaries; -for(c=0;c<E.length;c++)if(!Nc(a,b,E[c])){a.destination=null;c++;E.splice(0,c);return}E.splice(0,c)}finally{0===a.allPendingTasks&&0===a.pingedTasks.length&&0===a.clientRenderedBoundaries.length&&0===a.completedBoundaries.length&&(a=a.responseState,a.hasBody&&(b.push("</"),b.push("body"),b.push(">")),a.htmlChunks&&(b.push("</"),b.push("html"),b.push(">")),b.push(null))}} -function Pc(a,b){if(1===a.status)a.status=2,b.destroy(a.fatalError);else if(2!==a.status&&null===a.destination){a.destination=b;try{Jc(a,b)}catch(c){X(a,c),Y(a,c)}}}function Qc(a,b){try{var c=a.abortableTasks;if(0<c.size){var d=void 0===b?Error("The render was aborted by the server without a reason."):b;c.forEach(function(b){return Ic(b,a,d)});c.clear()}null!==a.destination&&Jc(a,a.destination)}catch(e){X(a,e),Y(a,e)}}function Rc(){} -function Sc(a,b,c,d){var e=!1,f=null,g="",k=!1;a=vc(a,eb(c,b?b.identifierPrefix:void 0),fb(),Infinity,Rc,void 0,function(){k=!0},void 0,void 0);yc(a);Qc(a,d);Pc(a,{push:function(a){null!==a&&(g+=a);return!0},destroy:function(a){e=!0;f=a}});if(e&&f!==d)throw f;if(!k)throw Error("A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition.");return g} -function Tc(a,b){a.prototype=Object.create(b.prototype);a.prototype.constructor=a;a.__proto__=b}var Uc=function(a){function b(){var b=a.call(this,{})||this;b.request=null;b.startedFlowing=!1;return b}Tc(b,a);var c=b.prototype;c._destroy=function(a,b){Qc(this.request);b(a)};c._read=function(){this.startedFlowing&&Pc(this.request,this)};return b}(ca.Readable);function Vc(){} -function Wc(a,b){var c=new Uc,d=vc(a,eb(!1,b?b.identifierPrefix:void 0),fb(),Infinity,Vc,function(){c.startedFlowing=!0;Pc(d,c)},void 0,void 0);c.request=d;yc(d);return c}exports.renderToNodeStream=function(a,b){return Wc(a,b)};exports.renderToStaticMarkup=function(a,b){return Sc(a,b,!0,'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server')}; -exports.renderToStaticNodeStream=function(a,b){return Wc(a,b)};exports.renderToString=function(a,b){return Sc(a,b,!1,'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server')}; -exports.version="18.3.0-next-4fcc9184a-20230217"; +function Dc(a,b,c){var d=c.boundary;if(null===d)return Cc(a,b,c);d.parentFlushed=!0;if(d.forceClientRender)return a.responseState.generateStaticMarkup||(d=d.errorDigest,b.push("\x3c!--$!--\x3e"),b.push("<template"),d&&(b.push(' data-dgst="'),d=v(d),b.push(d),b.push('"')),b.push("></template>")),Cc(a,b,c),a=a.responseState.generateStaticMarkup?!0:b.push("\x3c!--/$--\x3e"),a;if(0<d.pendingTasks){d.rootSegmentID=a.nextSegmentId++;0<d.completedSegments.length&&a.partialBoundaries.push(d);var e=a.responseState;var f= +e.nextSuspenseID++;e=e.boundaryPrefix+f.toString(16);d=d.id=e;Oa(b,a.responseState,d);Cc(a,b,c);return b.push("\x3c!--/$--\x3e")}if(d.byteSize>a.progressiveChunkSize)return d.rootSegmentID=a.nextSegmentId++,a.completedBoundaries.push(d),Oa(b,a.responseState,d.id),Cc(a,b,c),b.push("\x3c!--/$--\x3e");Ba(a.resources,d.resources);a.responseState.generateStaticMarkup||b.push("\x3c!--$--\x3e");c=d.completedSegments;if(1!==c.length)throw Error("A previously unvisited boundary must have exactly one root segment. This is a bug in React."); +Dc(a,b,c[0]);a=a.responseState.generateStaticMarkup?!0:b.push("\x3c!--/$--\x3e");return a}function Ec(a,b,c){Pa(b,a.responseState,c.formatContext,c.id);Dc(a,b,c);return Qa(b,c.formatContext)} +function Fc(a,b,c){a.resources.boundaryResources=c.resources;for(var d=c.completedSegments,e=0;e<d.length;e++)Gc(a,b,c,d[e]);d.length=0;a=a.responseState;d=c.id;e=c.rootSegmentID;c=c.resources;var f;b:{for(f=c.values();;){var g=f.next().value;if(!g)break;if(!g.inShell){f=!0;break b}}f=!1}b.push(a.startInlineScript);f?a.sentCompleteBoundaryFunction?a.sentStyleInsertionFunction?b.push('$RR("'):(a.sentStyleInsertionFunction=!0,b.push('$RM=new Map;\n$RR=function(p,q,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};;$RR("')): +(a.sentCompleteBoundaryFunction=!0,a.sentStyleInsertionFunction=!0,b.push('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};;$RM=new Map;\n$RR=function(p,q,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};;$RR("')): +a.sentCompleteBoundaryFunction?b.push('$RC("'):(a.sentCompleteBoundaryFunction=!0,b.push('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};;$RC("')); +if(null===d)throw Error("An ID must have been assigned before we can complete the boundary.");e=e.toString(16);b.push(d);b.push('","');b.push(a.segmentPrefix);b.push(e);f?(b.push('",'),Wa(b,c)):b.push('"');b=b.push(")\x3c/script>");return b} +function Gc(a,b,c,d){if(2===d.status)return!0;var e=d.id;if(-1===e){if(-1===(d.id=c.rootSegmentID))throw Error("A root segment ID must have been assigned by now. This is a bug in React.");return Ec(a,b,d)}Ec(a,b,d);a=a.responseState;b.push(a.startInlineScript);a.sentCompleteSegmentFunction?b.push('$RS("'):(a.sentCompleteSegmentFunction=!0,b.push('$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};;$RS("')); +b.push(a.segmentPrefix);e=e.toString(16);b.push(e);b.push('","');b.push(a.placeholderPrefix);b.push(e);b=b.push('")\x3c/script>');return b} +function Bc(a,b){try{var c,d=a.completedRootSegment;if(null!==d)if(0===a.pendingRootTasks){var e=a.preamble;for(c=0;c<e.length;c++)b.push(e[c]);Ua(b,a.resources,a.responseState);Dc(a,b,d);a.completedRootSegment=null;var f=a.responseState.bootstrapChunks;for(d=0;d<f.length-1;d++)b.push(f[d]);d<f.length&&b.push(f[d])}else return;else Va(b,a.resources,a.responseState);var g=a.clientRenderedBoundaries;for(c=0;c<g.length;c++){var h=g[c];f=b;var l=a.responseState,k=h.id,n=h.errorDigest,m=h.errorMessage, +q=h.errorComponentStack;f.push(l.startInlineScript);l.sentClientRenderFunction?f.push('$RX("'):(l.sentClientRenderFunction=!0,f.push('$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};;$RX("'));if(null===k)throw Error("An ID must have been assigned before we can complete the boundary.");f.push(k);f.push('"');if(n||m||q){f.push(",");var t=Sa(n||"");f.push(t)}if(m||q){f.push(","); +var K=Sa(m||"");f.push(K)}if(q){f.push(",");var D=Sa(q);f.push(D)}if(!f.push(")\x3c/script>")){a.destination=null;c++;g.splice(0,c);return}}g.splice(0,c);var C=a.completedBoundaries;for(c=0;c<C.length;c++)if(!Fc(a,b,C[c])){a.destination=null;c++;C.splice(0,c);return}C.splice(0,c);var L=a.partialBoundaries;for(c=0;c<L.length;c++){var W=L[c];a:{g=a;h=b;g.resources.boundaryResources=W.resources;var S=W.completedSegments;for(l=0;l<S.length;l++)if(!Gc(g,h,W,S[l])){l++;S.splice(0,l);var J=!1;break a}S.splice(0, +l);J=!0}if(!J){a.destination=null;c++;L.splice(0,c);return}}L.splice(0,c);var ra=a.completedBoundaries;for(c=0;c<ra.length;c++)if(!Fc(a,b,ra[c])){a.destination=null;c++;ra.splice(0,c);return}ra.splice(0,c)}finally{if(0===a.allPendingTasks&&0===a.pingedTasks.length&&0===a.clientRenderedBoundaries.length&&0===a.completedBoundaries.length){a=a.postamble;for(c=0;c<a.length;c++)b.push(a[c]);b.push(null)}}} +function Hc(a,b){if(1===a.status)a.status=2,b.destroy(a.fatalError);else if(2!==a.status&&null===a.destination){a.destination=b;try{Bc(a,b)}catch(c){Y(a,c),rc(a,c)}}}function Ic(a,b){try{var c=a.abortableTasks;if(0<c.size){var d=void 0===b?Error("The render was aborted by the server without a reason."):b;c.forEach(function(b){return Ac(b,a,d)});c.clear()}null!==a.destination&&Bc(a,a.destination)}catch(e){Y(a,e),rc(a,e)}}function Jc(){} +function Kc(a,b,c,d){var e=!1,f=null,g="",h=!1;a=nc(a,Xa(c,b?b.identifierPrefix:void 0),Ya(),Infinity,Jc,void 0,function(){h=!0},void 0,void 0);qc(a);Ic(a,d);Hc(a,{push:function(a){null!==a&&(g+=a);return!0},destroy:function(a){e=!0;f=a}});if(e&&f!==d)throw f;if(!h)throw Error("A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition.");return g} +function Lc(a,b){a.prototype=Object.create(b.prototype);a.prototype.constructor=a;a.__proto__=b}var Mc=function(a){function b(){var b=a.call(this,{})||this;b.request=null;b.startedFlowing=!1;return b}Lc(b,a);var c=b.prototype;c._destroy=function(a,b){Ic(this.request);b(a)};c._read=function(){this.startedFlowing&&Hc(this.request,this)};return b}(ca.Readable);function Nc(){} +function Oc(a,b){var c=new Mc,d=nc(a,Xa(!1,b?b.identifierPrefix:void 0),Ya(),Infinity,Nc,function(){c.startedFlowing=!0;Hc(d,c)},void 0,void 0);c.request=d;qc(d);return c}exports.renderToNodeStream=function(a,b){return Oc(a,b)};exports.renderToStaticMarkup=function(a,b){return Kc(a,b,!0,'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server')}; +exports.renderToStaticNodeStream=function(a,b){return Oc(a,b)};exports.renderToString=function(a,b){return Kc(a,b,!1,'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server')}; +exports.version="18.3.0-next-6ddcbd4f9-20230209"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server-rendering-stub.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server-rendering-stub.development.js index 71cabcbead4f3..9ba99d536f654 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server-rendering-stub.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server-rendering-stub.development.js @@ -14,7 +14,7 @@ if (process.env.NODE_ENV !== "production") { (function() { 'use strict'; -var ReactVersion = '18.3.0-next-4fcc9184a-20230217'; +var ReactVersion = '18.3.0-next-6ddcbd4f9-20230209'; var Internals = { usingClientEntryPoint: false, diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server-rendering-stub.production.min.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server-rendering-stub.production.min.js index 2b1699cbf6aae..b783acf2e7ddc 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server-rendering-stub.production.min.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server-rendering-stub.production.min.js @@ -8,4 +8,4 @@ * LICENSE file in the root directory of this source tree. */ 'use strict';var b={usingClientEntryPoint:!1,Events:null,Dispatcher:{current:null}};function d(a){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)e+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=b; -exports.createPortal=function(){throw Error(d(448));};exports.flushSync=function(){throw Error(d(449));};exports.preinit=function(){var a=b.Dispatcher.current;a&&a.preinit.apply(this,arguments)};exports.preload=function(){var a=b.Dispatcher.current;a&&a.preload.apply(this,arguments)};exports.version="18.3.0-next-4fcc9184a-20230217"; +exports.createPortal=function(){throw Error(d(448));};exports.flushSync=function(){throw Error(d(449));};exports.preinit=function(){var a=b.Dispatcher.current;a&&a.preinit.apply(this,arguments)};exports.preload=function(){var a=b.Dispatcher.current;a&&a.preload.apply(this,arguments)};exports.version="18.3.0-next-6ddcbd4f9-20230209"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.development.js index 1d1d0d1ca9565..526430fcf2ceb 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.development.js @@ -17,7 +17,7 @@ if (process.env.NODE_ENV !== "production") { var React = require('react'); var ReactDOM = require('react-dom'); -var ReactVersion = '18.3.0-next-4fcc9184a-20230217'; +var ReactVersion = '18.3.0-next-6ddcbd4f9-20230209'; var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; @@ -182,23 +182,6 @@ function closeWithError(destination, error) { } } -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - - return obj; -} - -var assign = Object.assign; - /* * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol * and Temporal.* types. See https://github.com/facebook/react/pull/22064. @@ -613,7 +596,6 @@ var isUnitlessNumber = { opacity: true, order: true, orphans: true, - scale: true, tabSize: true, widows: true, zIndex: true, @@ -1772,1404 +1754,1671 @@ function isArray(a) { return isArrayImpl(a); } -// The build script is at scripts/rollup/generate-inline-fizz-runtime.js. -// Run `yarn generate-inline-fizz-runtime` to generate. -var clientRenderBoundary = '$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};'; -var completeBoundary = '$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};'; -var completeBoundaryWithStyles = '$RM=new Map;\n$RR=function(p,q,w){function r(l){this.s=l}for(var t=$RC,m=$RM,u=new Map,n=new Map,g=document,h,e,f=g.querySelectorAll("template[data-precedence]"),c=0;e=f[c++];){for(var b=e.content.firstChild;b;b=b.nextSibling)u.set(b.getAttribute("data-href"),b);e.parentNode.removeChild(e)}f=g.querySelectorAll("link[data-precedence],style[data-precedence]");for(c=0;e=f[c++];)m.set(e.getAttribute("STYLE"===e.nodeName?"data-href":"href"),e),n.set(e.dataset.precedence,h=e);e=0;f=[];for(var d,\nv,a;d=w[e++];){var k=0;b=d[k++];if(!(a=m.get(b))){if(a=u.get(b))c=a.getAttribute("data-precedence");else{a=g.createElement("link");a.href=b;a.rel="stylesheet";for(a.dataset.precedence=c=d[k++];v=d[k++];)a.setAttribute(v,d[k++]);d=a._p=new Promise(function(l,x){a.onload=l;a.onerror=x});d.then(r.bind(d,"l"),r.bind(d,"e"))}m.set(b,a);b=n.get(c)||h;b===h&&(h=a);n.set(c,a);b?b.parentNode.insertBefore(a,b.nextSibling):(c=g.head,c.insertBefore(a,c.firstChild))}d=a._p;c=a.getAttribute("media");!d||"l"===\nd.s||c&&!matchMedia(c).matches||f.push(d)}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};'; -var completeSegment = '$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};'; - -function getValueDescriptorExpectingObjectForWarning(thing) { - return thing === null ? '`null`' : thing === undefined ? '`undefined`' : thing === '' ? 'an empty string' : "something with type \"" + typeof thing + "\""; -} -function getValueDescriptorExpectingEnumForWarning(thing) { - return thing === null ? '`null`' : thing === undefined ? '`undefined`' : thing === '' ? 'an empty string' : typeof thing === 'string' ? JSON.stringify(thing) : "something with type \"" + typeof thing + "\""; -} +var assign = Object.assign; -function compareResourcePropsForWarning(newProps, currentProps) { +function validatePreloadResourceDifference(originalProps, originalImplicit, latestProps, latestImplicit) { { - var propDiffs = null; - var allProps = Array.from(new Set(Object.keys(currentProps).concat(Object.keys(newProps)))); - - for (var i = 0; i < allProps.length; i++) { - var propName = allProps[i]; - var newValue = newProps[propName]; - var currentValue = currentProps[propName]; - - if (newValue !== currentValue && !(newValue == null && currentValue == null)) { - if (newValue == null) { - if (propDiffs === null) { - propDiffs = { - missing: {}, - extra: {}, - different: {} - }; - } + var href = originalProps.href; + var originalWarningName = getResourceNameForWarning('preload', originalProps, originalImplicit); + var latestWarningName = getResourceNameForWarning('preload', latestProps, latestImplicit); - propDiffs.missing[propName] = currentValue; - } else if (currentValue == null) { - if (propDiffs === null) { - propDiffs = { - missing: {}, - extra: {}, - different: {} - }; - } + if (latestProps.as !== originalProps.as) { + error('A %s is using the same href "%s" as a %s. This is always an error and React will only keep the first preload' + ' for any given href, discarding subsequent instances. To fix, find where you are using this href in link' + ' tags or in calls to ReactDOM.preload() or ReactDOM.preinit() and either make the Resource types agree or' + ' update the hrefs to be distinct for different Resource types.', latestWarningName, href, originalWarningName); + } else { + var missingProps = null; + var extraProps = null; + var differentProps = null; - propDiffs.extra[propName] = newValue; - } else { - if (propDiffs === null) { - propDiffs = { - missing: {}, - extra: {}, - different: {} + if (originalProps.media != null && latestProps.media == null) { + missingProps = missingProps || {}; + missingProps.media = originalProps.media; + } + + for (var propName in latestProps) { + var propValue = latestProps[propName]; + var originalValue = originalProps[propName]; + + if (propValue != null && propValue !== originalValue) { + if (originalValue == null) { + extraProps = extraProps || {}; + extraProps[propName] = propValue; + } else { + differentProps = differentProps || {}; + differentProps[propName] = { + original: originalValue, + latest: propValue }; } + } + } + + if (missingProps || extraProps || differentProps) { + warnDifferentProps(href, 'href', originalWarningName, latestWarningName, extraProps, missingProps, differentProps); + } + } + } +} +function validateStyleResourceDifference(originalProps, latestProps) { + { + var href = originalProps.href; // eslint-disable-next-line no-labels + + var originalWarningName = getResourceNameForWarning('style', originalProps, false); + var latestWarningName = getResourceNameForWarning('style', latestProps, false); + var missingProps = null; + var extraProps = null; + var differentProps = null; + + if (originalProps.media != null && latestProps.media == null) { + missingProps = missingProps || {}; + missingProps.media = originalProps.media; + } - propDiffs.different[propName] = { - original: currentValue, - latest: newValue + for (var propName in latestProps) { + var propValue = latestProps[propName]; + var originalValue = originalProps[propName]; + + if (propValue != null && propValue !== originalValue) { + propName = propName === 'data-precedence' ? 'precedence' : propName; + + if (originalValue == null) { + extraProps = extraProps || {}; + extraProps[propName] = propValue; + } else { + differentProps = differentProps || {}; + differentProps[propName] = { + original: originalValue, + latest: propValue }; } } } - return propDiffs; + if (missingProps || extraProps || differentProps) { + warnDifferentProps(href, 'href', originalWarningName, latestWarningName, extraProps, missingProps, differentProps); + } } } +function validateScriptResourceDifference(originalProps, latestProps) { + { + var src = originalProps.src; // eslint-disable-next-line no-labels -function describeDifferencesForStylesheets(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; + var originalWarningName = getResourceNameForWarning('script', originalProps, false); + var latestWarningName = getResourceNameForWarning('script', latestProps, false); + var extraProps = null; + var differentProps = null; - for (var propName in diff.missing) { - var propValue = diff.missing[propName]; + for (var propName in latestProps) { + var propValue = latestProps[propName]; + var originalValue = originalProps[propName]; - if (propName === 'media') { - description += "\n \"" + propName + "\" missing for props, original value: " + getValueDescriptorExpectingEnumForWarning(propValue); + if (propValue != null && propValue !== originalValue) { + if (originalValue == null) { + extraProps = extraProps || {}; + extraProps[propName] = propValue; + } else { + differentProps = differentProps || {}; + differentProps[propName] = { + original: originalValue, + latest: propValue + }; + } + } } - } - for (var _propName in diff.extra) { - var _propValue = diff.extra[_propName]; - description += "\n \"" + _propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(_propValue) + ", missing from original props"; + if (extraProps || differentProps) { + warnDifferentProps(src, 'src', originalWarningName, latestWarningName, extraProps, null, differentProps); + } } +} +function validateStyleAndHintProps(preloadProps, styleProps, implicitPreload) { + { + var href = preloadProps.href; + var originalWarningName = getResourceNameForWarning('preload', preloadProps, implicitPreload); + var latestWarningName = getResourceNameForWarning('style', styleProps, false); - for (var _propName2 in diff.different) { - var latestValue = diff.different[_propName2].latest; - var originalValue = diff.different[_propName2].original; - description += "\n \"" + _propName2 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", original value: " + getValueDescriptorExpectingEnumForWarning(originalValue); - } + if (preloadProps.as !== 'style') { + error('While creating a %s for href "%s" a %s for this same href was found. When preloading a stylesheet the' + ' "as" prop must be of type "style". This most likely ocurred by rendering a preload link with an incorrect' + ' "as" prop or by calling ReactDOM.preload with an incorrect "as" option.', latestWarningName, href, originalWarningName); + } - return description; -} -function describeDifferencesForStylesheetOverPreinit(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; + var missingProps = null; + var extraProps = null; + var differentProps = null; - for (var propName in diff.extra) { - var propValue = diff.extra[propName]; + for (var propName in styleProps) { + var styleValue = styleProps[propName]; + var preloadValue = preloadProps[propName]; - if (propName === 'precedence' || propName === 'crossOrigin' || propName === 'integrity') { - description += "\n \"" + propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", option missing"; - } else { - description += "\n \"" + propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", option not available with ReactDOM.preinit()"; + switch (propName) { + // Check for difference on specific props that cross over or influence + // the relationship between the preload and stylesheet + case 'crossOrigin': + case 'referrerPolicy': + case 'media': + case 'title': + { + if (preloadValue !== styleValue && !(preloadValue == null && styleValue == null)) { + if (styleValue == null) { + missingProps = missingProps || {}; + missingProps[propName] = preloadValue; + } else if (preloadValue == null) { + extraProps = extraProps || {}; + extraProps[propName] = styleValue; + } else { + differentProps = differentProps || {}; + differentProps[propName] = { + original: preloadValue, + latest: styleValue + }; + } + } + } + } } - } - - for (var _propName3 in diff.different) { - var latestValue = diff.different[_propName3].latest; - var originalValue = diff.different[_propName3].original; - if (_propName3 === 'precedence' && originalValue === 'default') { - description += "\n \"" + _propName3 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", missing from options"; - } else { - description += "\n \"" + _propName3 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", option value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + if (missingProps || extraProps || differentProps) { + warnDifferentProps(href, 'href', originalWarningName, latestWarningName, extraProps, missingProps, differentProps); } } - - return description; } -function describeDifferencesForPreinitOverStylesheet(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; - - for (var propName in diff.missing) { - var propValue = diff.missing[propName]; +function validateScriptAndHintProps(preloadProps, scriptProps, implicitPreload) { + { + var href = preloadProps.href; + var originalWarningName = getResourceNameForWarning('preload', preloadProps, implicitPreload); + var latestWarningName = getResourceNameForWarning('script', scriptProps, false); - if (propName === 'precedence' && propValue !== 'default') { - description += "\n \"" + propName + "\" missing from options, prop value: " + getValueDescriptorExpectingEnumForWarning(propValue); + if (preloadProps.as !== 'script') { + error('While creating a %s for href "%s" a %s for this same url was found. When preloading a script the' + ' "as" prop must be of type "script". This most likely ocurred by rendering a preload link with an incorrect' + ' "as" prop or by calling ReactDOM.preload with an incorrect "as" option.', latestWarningName, href, originalWarningName); } - } - for (var _propName4 in diff.extra) { - var _propValue2 = diff.extra[_propName4]; + var missingProps = null; + var extraProps = null; + var differentProps = null; + + for (var propName in scriptProps) { + var scriptValue = scriptProps[propName]; + var preloadValue = preloadProps[propName]; - if (_propName4 === 'precedence' || _propName4 === 'crossOrigin' || _propName4 === 'integrity') { - description += "\n \"" + _propName4 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(_propValue2) + ", missing from props"; + switch (propName) { + // Check for difference on specific props that cross over or influence + // the relationship between the preload and stylesheet + case 'crossOrigin': + case 'referrerPolicy': + case 'integrity': + { + if (preloadValue !== scriptValue && !(preloadValue == null && scriptValue == null)) { + if (scriptValue == null) { + missingProps = missingProps || {}; + missingProps[propName] = preloadValue; + } else if (preloadValue == null) { + extraProps = extraProps || {}; + extraProps[propName] = scriptValue; + } else { + differentProps = differentProps || {}; + differentProps[propName] = { + original: preloadValue, + latest: scriptValue + }; + } + } + } + } } - } - for (var _propName5 in diff.different) { - var latestValue = diff.different[_propName5].latest; - var originalValue = diff.different[_propName5].original; - description += "\n \"" + _propName5 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", prop value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + if (missingProps || extraProps || differentProps) { + warnDifferentProps(href, 'href', originalWarningName, latestWarningName, extraProps, missingProps, differentProps); + } } - - return description; } -function describeDifferencesForPreinits(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; - for (var propName in diff.missing) { - var propValue = diff.missing[propName]; +function warnDifferentProps(url, urlPropKey, originalName, latestName, extraProps, missingProps, differentProps) { + { + var juxtaposedNameStatement = latestName === originalName ? 'an earlier instance of this Resource' : "a " + originalName + " with the same " + urlPropKey; + var comparisonStatement = ''; - if (propName === 'precedence' && propValue !== 'default') { - description += "\n \"" + propName + "\" missing from options, original option value: " + getValueDescriptorExpectingEnumForWarning(propValue); + if (missingProps !== null && typeof missingProps === 'object') { + for (var propName in missingProps) { + comparisonStatement += "\n " + propName + ": missing or null in latest props, \"" + missingProps[propName] + "\" in original props"; + } } - } - for (var _propName6 in diff.extra) { - var _propValue3 = diff.extra[_propName6]; + if (extraProps !== null && typeof extraProps === 'object') { + for (var _propName in extraProps) { + comparisonStatement += "\n " + _propName + ": \"" + extraProps[_propName] + "\" in latest props, missing or null in original props"; + } + } - if (_propName6 === 'precedence' && _propValue3 !== 'default' || _propName6 === 'crossOrigin' || _propName6 === 'integrity') { - description += "\n \"" + _propName6 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(_propValue3) + ", missing from original options"; + if (differentProps !== null && typeof differentProps === 'object') { + for (var _propName2 in differentProps) { + comparisonStatement += "\n " + _propName2 + ": \"" + differentProps[_propName2].latest + "\" in latest props, \"" + differentProps[_propName2].original + "\" in original props"; + } } - } - for (var _propName7 in diff.different) { - var latestValue = diff.different[_propName7].latest; - var originalValue = diff.different[_propName7].original; - description += "\n \"" + _propName7 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", original option value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + error('A %s with %s "%s" has props that disagree with those found on %s. Resources always use the props' + ' that were provided the first time they are encountered so any differences will be ignored. Please' + ' update Resources that share an %s to have props that agree. The differences are described below.%s', latestName, urlPropKey, url, juxtaposedNameStatement, urlPropKey, comparisonStatement); } - - return description; } -var preloadOptionsForComparison = ['as', 'crossOrigin', 'integrity', 'media']; -function describeDifferencesForPreloads(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; - for (var propName in diff.missing) { - var propValue = diff.missing[propName]; +function getResourceNameForWarning(type, props, implicit) { + { + switch (type) { + case 'style': + { + return 'style Resource'; + } - if (preloadOptionsForComparison.includes(propName)) { - description += "\n \"" + propName + "\" missing from options, original option value: " + getValueDescriptorExpectingEnumForWarning(propValue); - } - } + case 'script': + { + return 'script Resource'; + } - for (var _propName8 in diff.extra) { - var _propValue4 = diff.extra[_propName8]; + case 'preload': + { + if (implicit) { + return "preload for a " + props.as + " Resource"; + } - if (preloadOptionsForComparison.includes(_propName8)) { - description += "\n \"" + _propName8 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(_propValue4) + ", missing from original options"; + return "preload Resource (as \"" + props.as + "\")"; + } } } - for (var _propName9 in diff.different) { - var latestValue = diff.different[_propName9].latest; - var originalValue = diff.different[_propName9].original; + return 'Resource'; +} +function validateLinkPropsForStyleResource(props) { + { + // This should only be called when we know we are opting into Resource semantics (i.e. precedence is not null) + var href = props.href, + onLoad = props.onLoad, + onError = props.onError, + disabled = props.disabled; + var allProps = ['onLoad', 'onError', 'disabled']; + var includedProps = []; + if (onLoad) includedProps.push('onLoad'); + if (onError) includedProps.push('onError'); + if (disabled != null) includedProps.push('disabled'); + var allPropsUnionPhrase = propNamesListJoin(allProps, 'or'); + var includedPropsPhrase = propNamesListJoin(includedProps, 'and'); + includedPropsPhrase += includedProps.length === 1 ? ' prop' : ' props'; + + if (includedProps.length) { + error('A link (rel="stylesheet") element with href "%s" has the precedence prop but also included the %s.' + ' When using %s React will opt out of Resource behavior. If you meant for this' + ' element to be treated as a Resource remove the %s. Otherwise remove the precedence prop.', href, includedPropsPhrase, allPropsUnionPhrase, includedPropsPhrase); - if (preloadOptionsForComparison.includes(_propName9)) { - description += "\n \"" + _propName9 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", original option value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + return true; } } - return description; + return false; } -function describeDifferencesForPreloadOverImplicitPreload(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; - for (var propName in diff.missing) { - var propValue = diff.missing[propName]; +function propNamesListJoin(list, combinator) { + switch (list.length) { + case 0: + return ''; - if (preloadOptionsForComparison.includes(propName)) { - description += "\n \"" + propName + "\" missing from options, underlying prop value: " + getValueDescriptorExpectingEnumForWarning(propValue); - } - } + case 1: + return list[0]; - for (var _propName10 in diff.extra) { - var _propValue5 = diff.extra[_propName10]; + case 2: + return list[0] + ' ' + combinator + ' ' + list[1]; - if (preloadOptionsForComparison.includes(_propName10)) { - description += "\n \"" + _propName10 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(_propValue5) + ", missing from underlying props"; - } + default: + return list.slice(0, -1).join(', ') + ', ' + combinator + ' ' + list[list.length - 1]; } +} - for (var _propName11 in diff.different) { - var latestValue = diff.different[_propName11].latest; - var originalValue = diff.different[_propName11].original; +function validateLinkPropsForPreloadResource(linkProps) { + { + var href = linkProps.href, + as = linkProps.as; + + if (as === 'font') { + var name = getResourceNameForWarning('preload', linkProps, false); - if (preloadOptionsForComparison.includes(_propName11)) { - description += "\n \"" + _propName11 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", underlying prop value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + if (!hasOwnProperty.call(linkProps, 'crossOrigin')) { + error('A %s with href "%s" did not specify the crossOrigin prop. Font preloads must always use' + ' anonymouse CORS mode. To fix add an empty string, "anonymous", or any other string' + ' value except "use-credentials" for the crossOrigin prop of all font preloads.', name, href); + } else if (linkProps.crossOrigin === 'use-credentials') { + error('A %s with href "%s" specified a crossOrigin value of "use-credentials". Font preloads must always use' + ' anonymouse CORS mode. To fix use an empty string, "anonymous", or any other string' + ' value except "use-credentials" for the crossOrigin prop of all font preloads.', name, href); + } } } - - return description; } -function describeDifferencesForScripts(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; +function validatePreloadArguments(href, options) { + { + if (!href || typeof href !== 'string') { + var typeOfArg = getValueDescriptorExpectingObjectForWarning(href); - for (var propName in diff.missing) { - var propValue = diff.missing[propName]; - description += "\n \"" + propName + "\" missing for props, original value: " + getValueDescriptorExpectingEnumForWarning(propValue); - } + error('ReactDOM.preload() expected the first argument to be a string representing an href but found %s instead.', typeOfArg); + } else if (typeof options !== 'object' || options === null) { + var _typeOfArg = getValueDescriptorExpectingObjectForWarning(options); - for (var _propName12 in diff.extra) { - var _propValue6 = diff.extra[_propName12]; - description += "\n \"" + _propName12 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(_propValue6) + ", missing from original props"; - } + error('ReactDOM.preload() expected the second argument to be an options argument containing at least an "as" property' + ' specifying the Resource type. It found %s instead. The href for the preload call where this warning originated is "%s".', _typeOfArg, href); + } else { + var as = options.as; - for (var _propName13 in diff.different) { - var latestValue = diff.different[_propName13].latest; - var originalValue = diff.different[_propName13].original; - description += "\n \"" + _propName13 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", original value: " + getValueDescriptorExpectingEnumForWarning(originalValue); - } + switch (as) { + // Font specific validation of options + case 'font': + { + if (options.crossOrigin === 'use-credentials') { + error('ReactDOM.preload() was called with an "as" type of "font" and with a "crossOrigin" option of "use-credentials".' + ' Fonts preloading must use crossOrigin "anonymous" to be functional. Please update your font preload to omit' + ' the crossOrigin option or change it to any other value than "use-credentials" (Browsers default all other values' + ' to anonymous mode). The href for the preload call where this warning originated is "%s"', href); + } - return description; -} -function describeDifferencesForScriptOverPreinit(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; + break; + } - for (var propName in diff.extra) { - var propValue = diff.extra[propName]; + case 'script': + case 'style': + { + break; + } + // We have an invalid as type and need to warn - if (propName === 'crossOrigin' || propName === 'integrity') { - description += "\n \"" + propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", option missing"; - } else { - description += "\n \"" + propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", option not available with ReactDOM.preinit()"; + default: + { + var typeOfAs = getValueDescriptorExpectingEnumForWarning(as); + + error('ReactDOM.preload() expected a valid "as" type in the options (second) argument but found %s instead.' + ' Please use one of the following valid values instead: %s. The href for the preload call where this' + ' warning originated is "%s".', typeOfAs, '"style", "font", or "script"', href); + } + } } } +} +function validatePreinitArguments(href, options) { + { + if (!href || typeof href !== 'string') { + var typeOfArg = getValueDescriptorExpectingObjectForWarning(href); - for (var _propName14 in diff.different) { - var latestValue = diff.different[_propName14].latest; - var originalValue = diff.different[_propName14].original; - description += "\n \"" + _propName14 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", option value: " + getValueDescriptorExpectingEnumForWarning(originalValue); - } + error('ReactDOM.preinit() expected the first argument to be a string representing an href but found %s instead.', typeOfArg); + } else if (typeof options !== 'object' || options === null) { + var _typeOfArg2 = getValueDescriptorExpectingObjectForWarning(options); - return description; -} -function describeDifferencesForPreinitOverScript(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; + error('ReactDOM.preinit() expected the second argument to be an options argument containing at least an "as" property' + ' specifying the Resource type. It found %s instead. The href for the preload call where this warning originated is "%s".', _typeOfArg2, href); + } else { + var as = options.as; - for (var propName in diff.extra) { - var propValue = diff.extra[propName]; + switch (as) { + case 'style': + case 'script': + { + break; + } + // We have an invalid as type and need to warn - if (propName === 'crossOrigin' || propName === 'integrity') { - description += "\n \"" + propName + "\" option value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", missing from props"; - } - } + default: + { + var typeOfAs = getValueDescriptorExpectingEnumForWarning(as); - for (var _propName15 in diff.different) { - var latestValue = diff.different[_propName15].latest; - var originalValue = diff.different[_propName15].original; - description += "\n \"" + _propName15 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", prop value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + error('ReactDOM.preinit() expected the second argument to be an options argument containing at least an "as" property' + ' specifying the Resource type. It found %s instead. Currently, valid resource types for for preinit are "style"' + ' and "script". The href for the preinit call where this warning originated is "%s".', typeOfAs, href); + } + } + } } +} - return description; +function getValueDescriptorExpectingObjectForWarning(thing) { + return thing === null ? 'null' : thing === undefined ? 'undefined' : thing === '' ? 'an empty string' : "something with type \"" + typeof thing + "\""; } -var ReactDOMSharedInternals = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; +function getValueDescriptorExpectingEnumForWarning(thing) { + return thing === null ? 'null' : thing === undefined ? 'undefined' : thing === '' ? 'an empty string' : typeof thing === 'string' ? JSON.stringify(thing) : "something with type \"" + typeof thing + "\""; +} -var ReactDOMCurrentDispatcher = ReactDOMSharedInternals.Dispatcher; -var ReactDOMServerDispatcher = { - preload: preload, - preinit: preinit -} ; +function createResources() { + return { + // persistent + preloadsMap: new Map(), + stylesMap: new Map(), + scriptsMap: new Map(), + headsMap: new Map(), + // cleared on flush + charset: null, + bases: new Set(), + preconnects: new Set(), + fontPreloads: new Set(), + // usedImagePreloads: new Set(), + precedences: new Map(), + usedStylePreloads: new Set(), + scripts: new Set(), + usedScriptPreloads: new Set(), + explicitStylePreloads: new Set(), + // explicitImagePreloads: new Set(), + explicitScriptPreloads: new Set(), + headResources: new Set(), + // cache for tracking structured meta tags + structuredMetaKeys: new Map(), + // like a module global for currently rendering boundary + boundaryResources: null + }; +} +function createBoundaryResources() { + return new Set(); +} var currentResources = null; var currentResourcesStack = []; -function prepareToRender(resources) { +function prepareToRenderResources(resources) { currentResourcesStack.push(currentResources); currentResources = resources; - var previousHostDispatcher = ReactDOMCurrentDispatcher.current; - ReactDOMCurrentDispatcher.current = ReactDOMServerDispatcher; - return previousHostDispatcher; } -function cleanupAfterRender(previousDispatcher) { +function finishRenderingResources() { currentResources = currentResourcesStack.pop(); - ReactDOMCurrentDispatcher.current = previousDispatcher; -} // Used to distinguish these contexts from ones used in other renderers. -var ScriptStreamingFormat = 0; -var NothingSent -/* */ -= 0; -var SentCompleteSegmentFunction -/* */ -= 1; -var SentCompleteBoundaryFunction -/* */ -= 2; -var SentClientRenderFunction -/* */ -= 4; -var SentStyleInsertionFunction -/* */ -= 8; // Per response, global state that is not contextual to the rendering subtree. +} +function setCurrentlyRenderingBoundaryResourcesTarget(resources, boundaryResources) { + resources.boundaryResources = boundaryResources; +} +var ReactDOMServerFloatDispatcher = { + preload: preload, + preinit: preinit +}; -var dataElementQuotedEnd = stringToPrecomputedChunk('"></template>'); -var startInlineScript = stringToPrecomputedChunk('<script>'); -var endInlineScript = stringToPrecomputedChunk('</script>'); -var startScriptSrc = stringToPrecomputedChunk('<script src="'); -var startModuleSrc = stringToPrecomputedChunk('<script type="module" src="'); -var scriptIntegirty = stringToPrecomputedChunk('" integrity="'); -var endAsyncScript = stringToPrecomputedChunk('" async=""></script>'); -/** - * This escaping function is designed to work with bootstrapScriptContent only. - * because we know we are escaping the entire script. We can avoid for instance - * escaping html comment string sequences that are valid javascript as well because - * if there are no sebsequent <script sequences the html parser will never enter - * script data double escaped state (see: https://www.w3.org/TR/html53/syntax.html#script-data-double-escaped-state) - * - * While untrusted script content should be made safe before using this api it will - * ensure that the script cannot be early terminated or never terminated state - */ +function preload(href, options) { + if (!currentResources) { + // While we expect that preload calls are primarily going to be observed + // during render because effects and events don't run on the server it is + // still possible that these get called in module scope. This is valid on + // the client since there is still a document to interact with but on the + // server we need a request to associate the call to. Because of this we + // simply return and do not warn. + return; + } + + var resources = currentResources; -function escapeBootstrapScriptContent(scriptText) { { - checkHtmlStringCoercion(scriptText); + validatePreloadArguments(href, options); } - return ('' + scriptText).replace(scriptRegex, scriptReplacer); -} - -var scriptRegex = /(<\/|<)(s)(cript)/gi; + if (typeof href === 'string' && href && typeof options === 'object' && options !== null) { + var as = options.as; + var resource = resources.preloadsMap.get(href); -var scriptReplacer = function (match, prefix, s, suffix) { - return "" + prefix + (s === 's' ? "\\u0073" : "\\u0053") + suffix; -}; // Allows us to keep track of what we've already written so we can refer back to it. -// if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag -// is set, the server will send instructions via data attributes (instead of inline scripts) + if (resource) { + { + var originallyImplicit = resource._dev_implicit_construction === true; + var latestProps = preloadPropsFromPreloadOptions(href, as, options); + validatePreloadResourceDifference(resource.props, originallyImplicit, latestProps, false); + } + } else { + resource = createPreloadResource(resources, href, as, preloadPropsFromPreloadOptions(href, as, options)); + } + switch (as) { + case 'font': + { + resources.fontPreloads.add(resource); + break; + } -function createResponseState(identifierPrefix, nonce, bootstrapScriptContent, bootstrapScripts, bootstrapModules, externalRuntimeConfig) { - var idPrefix = identifierPrefix === undefined ? '' : identifierPrefix; - var inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk('<script nonce="' + escapeTextForBrowser(nonce) + '">'); - var bootstrapChunks = []; - var externalRuntimeDesc = null; - var streamingFormat = ScriptStreamingFormat; + case 'style': + { + resources.explicitStylePreloads.add(resource); + break; + } - if (bootstrapScriptContent !== undefined) { - bootstrapChunks.push(inlineScriptWithNonce, stringToChunk(escapeBootstrapScriptContent(bootstrapScriptContent)), endInlineScript); + case 'script': + { + resources.explicitScriptPreloads.add(resource); + break; + } + } } +} - if (bootstrapScripts !== undefined) { - for (var i = 0; i < bootstrapScripts.length; i++) { - var scriptConfig = bootstrapScripts[i]; - var src = typeof scriptConfig === 'string' ? scriptConfig : scriptConfig.src; - var integrity = typeof scriptConfig === 'string' ? undefined : scriptConfig.integrity; - bootstrapChunks.push(startScriptSrc, stringToChunk(escapeTextForBrowser(src))); +function preinit(href, options) { + if (!currentResources) { + // While we expect that preinit calls are primarily going to be observed + // during render because effects and events don't run on the server it is + // still possible that these get called in module scope. This is valid on + // the client since there is still a document to interact with but on the + // server we need a request to associate the call to. Because of this we + // simply return and do not warn. + return; + } - if (integrity) { - bootstrapChunks.push(scriptIntegirty, stringToChunk(escapeTextForBrowser(integrity))); - } + preinitImpl(currentResources, href, options); +} // On the server, preinit may be called outside of render when sending an +// external SSR runtime as part of the initial resources payload. Since this +// is an internal React call, we do not need to use the resources stack. - bootstrapChunks.push(endAsyncScript); - } + +function preinitImpl(resources, href, options) { + { + validatePreinitArguments(href, options); } - if (bootstrapModules !== undefined) { - for (var _i = 0; _i < bootstrapModules.length; _i++) { - var _scriptConfig = bootstrapModules[_i]; + if (typeof href === 'string' && href && typeof options === 'object' && options !== null) { + var as = options.as; - var _src = typeof _scriptConfig === 'string' ? _scriptConfig : _scriptConfig.src; + switch (as) { + case 'style': + { + var resource = resources.stylesMap.get(href); - var _integrity = typeof _scriptConfig === 'string' ? undefined : _scriptConfig.integrity; + if (resource) { + { + var latestProps = stylePropsFromPreinitOptions(href, resource.precedence, options); + validateStyleResourceDifference(resource.props, latestProps); + } + } else { + var precedence = options.precedence || 'default'; + var resourceProps = stylePropsFromPreinitOptions(href, precedence, options); + resource = createStyleResource(resources, href, precedence, resourceProps); + } - bootstrapChunks.push(startModuleSrc, stringToChunk(escapeTextForBrowser(_src))); + resource.set.add(resource); + resources.explicitStylePreloads.add(resource.hint); + return; + } - if (_integrity) { - bootstrapChunks.push(scriptIntegirty, stringToChunk(escapeTextForBrowser(_integrity))); - } + case 'script': + { + var src = href; - bootstrapChunks.push(endAsyncScript); + var _resource = resources.scriptsMap.get(src); + + if (_resource) { + { + var _latestProps = scriptPropsFromPreinitOptions(src, options); + + validateScriptResourceDifference(_resource.props, _latestProps); + } + } else { + var scriptProps = scriptPropsFromPreinitOptions(src, options); + _resource = createScriptResource(resources, src, scriptProps); + resources.scripts.add(_resource); + } + + return; + } } } +} +function preloadPropsFromPreloadOptions(href, as, options) { return { - bootstrapChunks: bootstrapChunks, - placeholderPrefix: stringToPrecomputedChunk(idPrefix + 'P:'), - segmentPrefix: stringToPrecomputedChunk(idPrefix + 'S:'), - boundaryPrefix: idPrefix + 'B:', - idPrefix: idPrefix, - nextSuspenseID: 0, - streamingFormat: streamingFormat, - startInlineScript: inlineScriptWithNonce, - instructions: NothingSent, - externalRuntimeConfig: externalRuntimeDesc, - htmlChunks: null, - headChunks: null, - hasBody: false, - charsetChunks: [], - preconnectChunks: [], - preloadChunks: [], - hoistableChunks: [] + href: href, + rel: 'preload', + as: as, + crossOrigin: as === 'font' ? '' : options.crossOrigin, + integrity: options.integrity }; -} // Constants for the insertion mode we're currently writing in. We don't encode all HTML5 insertion -// modes. We only include the variants as they matter for the sake of our purposes. -// We don't actually provide the namespace therefore we use constants instead of the string. +} -var ROOT_HTML_MODE = 0; // Used for the root most element tag. -// We have a less than HTML_HTML_MODE check elsewhere. If you add more cases here, make sure it -// still makes sense +function preloadPropsFromRawProps(href, as, rawProps) { + var props = assign({}, rawProps); -var HTML_HTML_MODE = 1; // Used for the <html> if it is at the top level. + props.href = href; + props.rel = 'preload'; + props.as = as; -var HTML_MODE = 2; -var SVG_MODE = 3; -var MATHML_MODE = 4; -var HTML_TABLE_MODE = 5; -var HTML_TABLE_BODY_MODE = 6; -var HTML_TABLE_ROW_MODE = 7; -var HTML_COLGROUP_MODE = 8; // We have a greater than HTML_TABLE_MODE check elsewhere. If you add more cases here, make sure it -// still makes sense -// Lets us keep track of contextual state and pick it back up after suspending. + if (as === 'font') { + // Font preloads always need CORS anonymous mode so we set it here + // regardless of the props provided. This should warn elsewhere in + // dev + props.crossOrigin = ''; + } -function createFormatContext(insertionMode, selectedValue, noscriptTagInScope) { + return props; +} + +function preloadAsStylePropsFromProps(href, props) { return { - insertionMode: insertionMode, - selectedValue: selectedValue, - noscriptTagInScope: noscriptTagInScope + rel: 'preload', + as: 'style', + href: href, + crossOrigin: props.crossOrigin, + integrity: props.integrity, + media: props.media, + hrefLang: props.hrefLang, + referrerPolicy: props.referrerPolicy }; } -function createRootFormatContext(namespaceURI) { - var insertionMode = namespaceURI === 'http://www.w3.org/2000/svg' ? SVG_MODE : namespaceURI === 'http://www.w3.org/1998/Math/MathML' ? MATHML_MODE : ROOT_HTML_MODE; - return createFormatContext(insertionMode, null, false); +function preloadAsScriptPropsFromProps(href, props) { + return { + rel: 'preload', + as: 'script', + href: href, + crossOrigin: props.crossOrigin, + integrity: props.integrity, + referrerPolicy: props.referrerPolicy + }; } -function getChildFormatContext(parentContext, type, props) { - switch (type) { - case 'noscript': - return createFormatContext(HTML_MODE, null, true); - - case 'select': - return createFormatContext(HTML_MODE, props.value != null ? props.value : props.defaultValue, parentContext.noscriptTagInScope); - case 'svg': - return createFormatContext(SVG_MODE, null, parentContext.noscriptTagInScope); +function createPreloadResource(resources, href, as, props) { + var preloadsMap = resources.preloadsMap; - case 'math': - return createFormatContext(MATHML_MODE, null, parentContext.noscriptTagInScope); + { + if (preloadsMap.has(href)) { + error('createPreloadResource was called when a preload Resource matching the same href already exists. This is a bug in React.'); + } + } - case 'foreignObject': - return createFormatContext(HTML_MODE, null, parentContext.noscriptTagInScope); - // Table parents are special in that their children can only be created at all if they're - // wrapped in a table parent. So we need to encode that we're entering this mode. + var resource = { + type: 'preload', + as: as, + href: href, + flushed: false, + props: props + }; + preloadsMap.set(href, resource); + return resource; +} - case 'table': - return createFormatContext(HTML_TABLE_MODE, null, parentContext.noscriptTagInScope); +function stylePropsFromRawProps(href, precedence, rawProps) { + var props = assign({}, rawProps); - case 'thead': - case 'tbody': - case 'tfoot': - return createFormatContext(HTML_TABLE_BODY_MODE, null, parentContext.noscriptTagInScope); + props.href = href; + props.rel = 'stylesheet'; + props['data-precedence'] = precedence; + delete props.precedence; + return props; +} - case 'colgroup': - return createFormatContext(HTML_COLGROUP_MODE, null, parentContext.noscriptTagInScope); +function stylePropsFromPreinitOptions(href, precedence, options) { + return { + rel: 'stylesheet', + href: href, + 'data-precedence': precedence, + crossOrigin: options.crossOrigin + }; +} - case 'tr': - return createFormatContext(HTML_TABLE_ROW_MODE, null, parentContext.noscriptTagInScope); +function createStyleResource(resources, href, precedence, props) { + { + if (resources.stylesMap.has(href)) { + error('createStyleResource was called when a style Resource matching the same href already exists. This is a bug in React.'); + } } - if (parentContext.insertionMode >= HTML_TABLE_MODE) { - // Whatever tag this was, it wasn't a table parent or other special parent, so we must have - // entered plain HTML again. - return createFormatContext(HTML_MODE, null, parentContext.noscriptTagInScope); + var stylesMap = resources.stylesMap, + preloadsMap = resources.preloadsMap, + precedences = resources.precedences; // If this is the first time we've seen this precedence we encode it's position in our set even though + // we don't add the resource to this set yet + + var precedenceSet = precedences.get(precedence); + + if (!precedenceSet) { + precedenceSet = new Set(); + precedences.set(precedence, precedenceSet); } - if (parentContext.insertionMode === ROOT_HTML_MODE) { - if (type === 'html') { - // We've emitted the root and is now in <html> mode. - return createFormatContext(HTML_HTML_MODE, null, false); - } else { - // We've emitted the root and is now in plain HTML mode. - return createFormatContext(HTML_MODE, null, false); + var hint = preloadsMap.get(href); + + if (hint) { + // If a preload for this style Resource already exists there are certain props we want to adopt + // on the style Resource, primarily focussed on making sure the style network pathways utilize + // the preload pathways. For instance if you have diffreent crossOrigin attributes for a preload + // and a stylesheet the stylesheet will make a new request even if the preload had already loaded + adoptPreloadPropsForStyleProps(props, hint.props); + + { + validateStyleAndHintProps(hint.props, props, hint._dev_implicit_construction); + } + } else { + var preloadResourceProps = preloadAsStylePropsFromProps(href, props); + hint = createPreloadResource(resources, href, 'style', preloadResourceProps); + + { + hint._dev_implicit_construction = true; } - } else if (parentContext.insertionMode === HTML_HTML_MODE) { - // We've emitted the document element and is now in plain HTML mode. - return createFormatContext(HTML_MODE, null, false); + + resources.explicitStylePreloads.add(hint); } - return parentContext; -} -var UNINITIALIZED_SUSPENSE_BOUNDARY_ID = null; -function assignSuspenseBoundaryID(responseState) { - var generatedID = responseState.nextSuspenseID++; - return stringToPrecomputedChunk(responseState.boundaryPrefix + generatedID.toString(16)); + var resource = { + type: 'style', + href: href, + precedence: precedence, + flushed: false, + inShell: false, + props: props, + hint: hint, + set: precedenceSet + }; + stylesMap.set(href, resource); + return resource; } -function makeId(responseState, treeId, localId) { - var idPrefix = responseState.idPrefix; - var id = ':' + idPrefix + 'R' + treeId; // Unless this is the first id at this level, append a number at the end - // that represents the position of this useId hook among all the useId - // hooks for this fiber. - if (localId > 0) { - id += 'H' + localId.toString(32); - } +function adoptPreloadPropsForStyleProps(resourceProps, preloadProps) { + if (resourceProps.crossOrigin == null) resourceProps.crossOrigin = preloadProps.crossOrigin; + if (resourceProps.referrerPolicy == null) resourceProps.referrerPolicy = preloadProps.referrerPolicy; + if (resourceProps.title == null) resourceProps.title = preloadProps.title; +} - return id + ':'; +function scriptPropsFromPreinitOptions(src, options) { + return { + src: src, + async: true, + crossOrigin: options.crossOrigin, + integrity: options.integrity + }; } -function encodeHTMLTextNode(text) { - return escapeTextForBrowser(text); +function scriptPropsFromRawProps(src, rawProps) { + var props = assign({}, rawProps); + + props.src = src; + return props; } -var textSeparator = stringToPrecomputedChunk('<!-- -->'); -function pushTextInstance(target, text, responseState, textEmbedded) { - if (text === '') { - // Empty text doesn't have a DOM node representation and the hydration is aware of this. - return textEmbedded; +function createScriptResource(resources, src, props) { + { + if (resources.scriptsMap.has(src)) { + error('createScriptResource was called when a script Resource matching the same src already exists. This is a bug in React.'); + } } - if (textEmbedded) { - target.push(textSeparator); - } + var scriptsMap = resources.scriptsMap, + preloadsMap = resources.preloadsMap; + var hint = preloadsMap.get(src); - target.push(stringToChunk(encodeHTMLTextNode(text))); - return true; -} // Called when Fizz is done with a Segment. Currently the only purpose is to conditionally -// emit a text separator when we don't know for sure it is safe to omit + if (hint) { + // If a preload for this style Resource already exists there are certain props we want to adopt + // on the style Resource, primarily focussed on making sure the style network pathways utilize + // the preload pathways. For instance if you have diffreent crossOrigin attributes for a preload + // and a stylesheet the stylesheet will make a new request even if the preload had already loaded + adoptPreloadPropsForScriptProps(props, hint.props); -function pushSegmentFinale(target, responseState, lastPushedText, textEmbedded) { - if (lastPushedText && textEmbedded) { - target.push(textSeparator); - } -} -var styleNameCache = new Map(); + { + validateScriptAndHintProps(hint.props, props, hint._dev_implicit_construction); + } + } else { + var preloadResourceProps = preloadAsScriptPropsFromProps(src, props); + hint = createPreloadResource(resources, src, 'script', preloadResourceProps); -function processStyleName(styleName) { - var chunk = styleNameCache.get(styleName); + { + hint._dev_implicit_construction = true; + } - if (chunk !== undefined) { - return chunk; + resources.explicitScriptPreloads.add(hint); } - var result = stringToPrecomputedChunk(escapeTextForBrowser(hyphenateStyleName(styleName))); - styleNameCache.set(styleName, result); - return result; + var resource = { + type: 'script', + src: src, + flushed: false, + props: props, + hint: hint + }; + scriptsMap.set(src, resource); + return resource; } -var styleAttributeStart = stringToPrecomputedChunk(' style="'); -var styleAssign = stringToPrecomputedChunk(':'); -var styleSeparator = stringToPrecomputedChunk(';'); +function adoptPreloadPropsForScriptProps(resourceProps, preloadProps) { + if (resourceProps.crossOrigin == null) resourceProps.crossOrigin = preloadProps.crossOrigin; + if (resourceProps.referrerPolicy == null) resourceProps.referrerPolicy = preloadProps.referrerPolicy; + if (resourceProps.integrity == null) resourceProps.integrity = preloadProps.integrity; +} -function pushStyleAttribute(target, style) { - if (typeof style !== 'object') { - throw new Error('The `style` prop expects a mapping from style properties to values, ' + "not a string. For example, style={{marginRight: spacing + 'em'}} when " + 'using JSX.'); +function titlePropsFromRawProps(child, rawProps) { + var props = assign({}, rawProps); + + props.children = child; + return props; +} + +function resourcesFromElement(type, props) { + if (!currentResources) { + throw new Error('"currentResources" was expected to exist. This is a bug in React.'); } - var isFirst = true; + var resources = currentResources; - for (var styleName in style) { - if (!hasOwnProperty.call(style, styleName)) { - continue; - } // If you provide unsafe user data here they can inject arbitrary CSS - // which may be problematic (I couldn't repro this): - // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet - // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/ - // This is not an XSS hole but instead a potential CSS injection issue - // which has lead to a greater discussion about how we're going to - // trust URLs moving forward. See #2115901 - - - var styleValue = style[styleName]; + switch (type) { + case 'title': + { + var children = props.children; + var child; - if (styleValue == null || typeof styleValue === 'boolean' || styleValue === '') { - // TODO: We used to set empty string as a style with an empty value. Does that ever make sense? - continue; - } + if (Array.isArray(children)) { + child = children.length === 1 ? children[0] : null; + } else { + child = children; + } - var nameChunk = void 0; - var valueChunk = void 0; - var isCustomProperty = styleName.indexOf('--') === 0; + if (typeof child !== 'function' && typeof child !== 'symbol' && child !== null && child !== undefined) { + // eslint-disable-next-line react-internal/safe-string-coercion + var childString = '' + child; + var key = 'title::' + childString; + var resource = resources.headsMap.get(key); - if (isCustomProperty) { - nameChunk = stringToChunk(escapeTextForBrowser(styleName)); + if (!resource) { + resource = { + type: 'title', + props: titlePropsFromRawProps(childString, props), + flushed: false + }; + resources.headsMap.set(key, resource); + resources.headResources.add(resource); + } + } - { - checkCSSPropertyStringCoercion(styleValue, styleName); + return true; } - valueChunk = stringToChunk(escapeTextForBrowser(('' + styleValue).trim())); - } else { + case 'meta': { - warnValidStyle$1(styleName, styleValue); - } + var _key, propertyPath; + + if (typeof props.charSet === 'string') { + _key = 'charSet'; + } else if (typeof props.content === 'string') { + var contentKey = '::' + props.content; + + if (typeof props.httpEquiv === 'string') { + _key = 'httpEquiv::' + props.httpEquiv + contentKey; + } else if (typeof props.name === 'string') { + _key = 'name::' + props.name + contentKey; + } else if (typeof props.itemProp === 'string') { + _key = 'itemProp::' + props.itemProp + contentKey; + } else if (typeof props.property === 'string') { + var property = props.property; + _key = 'property::' + property + contentKey; + propertyPath = property; + var parentPath = property.split(':').slice(0, -1).join(':'); + var parentResource = resources.structuredMetaKeys.get(parentPath); + + if (parentResource) { + _key = parentResource.key + '::child::' + _key; + } + } + } - nameChunk = processStyleName(styleName); + if (_key) { + if (!resources.headsMap.has(_key)) { + var _resource2 = { + type: 'meta', + key: _key, + props: assign({}, props), + flushed: false + }; + resources.headsMap.set(_key, _resource2); - if (typeof styleValue === 'number') { - if (styleValue !== 0 && !hasOwnProperty.call(isUnitlessNumber, styleName)) { - valueChunk = stringToChunk(styleValue + 'px'); // Presumes implicit 'px' suffix for unitless numbers - } else { - valueChunk = stringToChunk('' + styleValue); + if (_key === 'charSet') { + resources.charset = _resource2; + } else { + if (propertyPath) { + resources.structuredMetaKeys.set(propertyPath, _resource2); + } + + resources.headResources.add(_resource2); + } + } } - } else { - { - checkCSSPropertyStringCoercion(styleValue, styleName); + + return true; + } + + case 'base': + { + var target = props.target, + href = props.href; // We mirror the key construction on the client since we will likely unify + // this code in the future to better guarantee key semantics are identical + // in both environments + + var _key2 = 'base'; + _key2 += typeof href === 'string' ? "[href=\"" + href + "\"]" : ':not([href])'; + _key2 += typeof target === 'string' ? "[target=\"" + target + "\"]" : ':not([target])'; + + if (!resources.headsMap.has(_key2)) { + var _resource3 = { + type: 'base', + props: assign({}, props), + flushed: false + }; + resources.headsMap.set(_key2, _resource3); + resources.bases.add(_resource3); } - valueChunk = stringToChunk(escapeTextForBrowser(('' + styleValue).trim())); + return true; } - } + } - if (isFirst) { - isFirst = false; // If it's first, we don't need any separators prefixed. + return false; +} // Construct a resource from link props. - target.push(styleAttributeStart, nameChunk, styleAssign, valueChunk); - } else { - target.push(styleSeparator, nameChunk, styleAssign, valueChunk); - } +function resourcesFromLink(props) { + if (!currentResources) { + throw new Error('"currentResources" was expected to exist. This is a bug in React.'); } - if (!isFirst) { - target.push(attributeEnd); + var resources = currentResources; + var rel = props.rel, + href = props.href; + + if (!href || typeof href !== 'string' || !rel || typeof rel !== 'string') { + return false; } -} -var attributeSeparator = stringToPrecomputedChunk(' '); -var attributeAssign = stringToPrecomputedChunk('="'); -var attributeEnd = stringToPrecomputedChunk('"'); -var attributeEmptyString = stringToPrecomputedChunk('=""'); + var key = ''; -function pushAttribute(target, name, value) // not null or undefined -{ - switch (name) { - case 'style': + switch (rel) { + case 'stylesheet': { - pushStyleAttribute(target, value); - return; - } + var onLoad = props.onLoad, + onError = props.onError, + precedence = props.precedence, + disabled = props.disabled; + + if (typeof precedence !== 'string' || onLoad || onError || disabled != null) { + // This stylesheet is either not opted into Resource semantics or has conflicting properties which + // disqualify it for such. We can still create a preload resource to help it load faster on the + // client + { + validateLinkPropsForStyleResource(props); + } - case 'defaultValue': - case 'defaultChecked': // These shouldn't be set as attributes on generic HTML elements. + var preloadResource = resources.preloadsMap.get(href); - case 'innerHTML': // Must use dangerouslySetInnerHTML instead. + if (!preloadResource) { + preloadResource = createPreloadResource(resources, href, 'style', preloadAsStylePropsFromProps(href, props)); - case 'suppressContentEditableWarning': - case 'suppressHydrationWarning': - // Ignored. These are built-in to React on the client. - return; - } + { + preloadResource._dev_implicit_construction = true; + } - if ( // shouldIgnoreAttribute - // We have already filtered out null/undefined and reserved words. - name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) { - return; - } + resources.usedStylePreloads.add(preloadResource); + } - var propertyInfo = getPropertyInfo(name); + return false; + } else { + // We are able to convert this link element to a resource exclusively. We construct the relevant Resource + // and return true indicating that this link was fully consumed. + var _resource4 = resources.stylesMap.get(href); - if (propertyInfo !== null) { - // shouldRemoveAttribute - switch (typeof value) { - case 'function': - case 'symbol': - // eslint-disable-line - return; + if (_resource4) { + { + var resourceProps = stylePropsFromRawProps(href, precedence, props); + adoptPreloadPropsForStyleProps(resourceProps, _resource4.hint.props); + validateStyleResourceDifference(_resource4.props, resourceProps); + } + } else { + var _resourceProps = stylePropsFromRawProps(href, precedence, props); - case 'boolean': - { - if (!propertyInfo.acceptsBooleans) { - return; + _resource4 = createStyleResource( // $FlowFixMe[incompatible-call] found when upgrading Flow + currentResources, href, precedence, _resourceProps); + resources.usedStylePreloads.add(_resource4.hint); } - } - } - var attributeName = propertyInfo.attributeName; - var attributeNameChunk = stringToChunk(attributeName); // TODO: If it's known we can cache the chunk. + if (resources.boundaryResources) { + resources.boundaryResources.add(_resource4); + } else { + _resource4.set.add(_resource4); + } - switch (propertyInfo.type) { - case BOOLEAN: - if (value) { - target.push(attributeSeparator, attributeNameChunk, attributeEmptyString); + return true; } + } - return; + case 'preload': + { + var as = props.as; - case OVERLOADED_BOOLEAN: - if (value === true) { - target.push(attributeSeparator, attributeNameChunk, attributeEmptyString); - } else if (value === false) ; else { - target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); - } + switch (as) { + case 'script': + case 'style': + case 'font': + { + { + validateLinkPropsForPreloadResource(props); + } - return; + var _resource5 = resources.preloadsMap.get(href); - case NUMERIC: - if (!isNaN(value)) { - target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); - } + if (_resource5) { + { + var originallyImplicit = _resource5._dev_implicit_construction === true; + var latestProps = preloadPropsFromRawProps(href, as, props); + validatePreloadResourceDifference(_resource5.props, originallyImplicit, latestProps, false); + } + } else { + _resource5 = createPreloadResource(resources, href, as, preloadPropsFromRawProps(href, as, props)); + + switch (as) { + case 'script': + { + resources.explicitScriptPreloads.add(_resource5); + break; + } - break; + case 'style': + { + resources.explicitStylePreloads.add(_resource5); + break; + } - case POSITIVE_NUMERIC: - if (!isNaN(value) && value >= 1) { - target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); + case 'font': + { + resources.fontPreloads.add(_resource5); + break; + } + } + } + + return true; + } } break; + } + } - default: - if (propertyInfo.sanitizeURL) { - { - checkAttributeStringCoercion(value, attributeName); - } + if (props.onLoad || props.onError) { + // When a link has these props we can't treat it is a Resource but if we rendered it on the + // server it would look like a Resource in the rendered html (the onLoad/onError aren't emitted) + // Instead we expect the client to insert them rather than hydrate them which also guarantees + // that the onLoad and onError won't fire before the event handlers are attached + return true; + } - value = '' + value; - sanitizeURL(value); - } + var sizes = typeof props.sizes === 'string' ? props.sizes : ''; + var media = typeof props.media === 'string' ? props.media : ''; + key = 'rel:' + rel + '::href:' + href + '::sizes:' + sizes + '::media:' + media; + var resource = resources.headsMap.get(key); - target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); - } - } else if (isAttributeNameSafe(name)) { - // shouldRemoveAttribute - switch (typeof value) { - case 'function': - case 'symbol': - // eslint-disable-line - return; + if (!resource) { + resource = { + type: 'link', + props: assign({}, props), + flushed: false + }; + resources.headsMap.set(key, resource); - case 'boolean': + switch (rel) { + case 'preconnect': + case 'dns-prefetch': { - var prefix = name.toLowerCase().slice(0, 5); + resources.preconnects.add(resource); + break; + } - if (prefix !== 'data-' && prefix !== 'aria-') { - return; - } + default: + { + resources.headResources.add(resource); } } - - target.push(attributeSeparator, stringToChunk(name), attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); } -} - -var endOfStartTag = stringToPrecomputedChunk('>'); -var endOfStartTagSelfClosing = stringToPrecomputedChunk('/>'); - -function pushInnerHTML(target, innerHTML, children) { - if (innerHTML != null) { - if (children != null) { - throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.'); - } - if (typeof innerHTML !== 'object' || !('__html' in innerHTML)) { - throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' + 'for more information.'); - } + return true; +} // Construct a resource from link props. - var html = innerHTML.__html; +function resourcesFromScript(props) { + if (!currentResources) { + throw new Error('"currentResources" was expected to exist. This is a bug in React.'); + } - if (html !== null && html !== undefined) { - { - checkHtmlStringCoercion(html); - } + var resources = currentResources; + var src = props.src, + async = props.async, + onLoad = props.onLoad, + onError = props.onError; - target.push(stringToChunk('' + html)); - } + if (!src || typeof src !== 'string') { + return false; } -} // TODO: Move these to ResponseState so that we warn for every request. -// It would help debugging in stateful servers (e.g. service worker). + if (async) { + if (onLoad || onError) { -var didWarnDefaultInputValue = false; -var didWarnDefaultChecked = false; -var didWarnDefaultSelectValue = false; -var didWarnDefaultTextareaValue = false; -var didWarnInvalidOptionChildren = false; -var didWarnInvalidOptionInnerHTML = false; -var didWarnSelectedSetOnOption = false; + var preloadResource = resources.preloadsMap.get(src); -function checkSelectProp(props, propName) { - { - var value = props[propName]; + if (!preloadResource) { + preloadResource = createPreloadResource(resources, src, 'script', preloadAsScriptPropsFromProps(src, props)); - if (value != null) { - var array = isArray(value); + { + preloadResource._dev_implicit_construction = true; + } - if (props.multiple && !array) { - error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.', propName); - } else if (!props.multiple && array) { - error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.', propName); + resources.usedScriptPreloads.add(preloadResource); + } + } else { + var resource = resources.scriptsMap.get(src); + + if (resource) { + { + var latestProps = scriptPropsFromRawProps(src, props); + adoptPreloadPropsForScriptProps(latestProps, resource.hint.props); + validateScriptResourceDifference(resource.props, latestProps); + } + } else { + var resourceProps = scriptPropsFromRawProps(src, props); + resource = createScriptResource(resources, src, resourceProps); + resources.scripts.add(resource); } } + + return true; } + + return false; } +function hoistResources(resources, source) { + var currentBoundaryResources = resources.boundaryResources; -function pushStartSelect(target, props) { - { - checkControlledValueProps('select', props); - checkSelectProp(props, 'value'); - checkSelectProp(props, 'defaultValue'); + if (currentBoundaryResources) { + source.forEach(function (resource) { + return currentBoundaryResources.add(resource); + }); + source.clear(); + } +} +function hoistResourcesToRoot(resources, boundaryResources) { + boundaryResources.forEach(function (resource) { + return resource.set.add(resource); + }); + boundaryResources.clear(); +} - if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultSelectValue) { - error('Select 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 select ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components'); +// The build script is at scripts/rollup/generate-inline-fizz-runtime.js. +// Run `yarn generate-inline-fizz-runtime` to generate. +var clientRenderBoundary = '$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};'; +var completeBoundary = '$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};'; +var completeBoundaryWithStyles = '$RM=new Map;\n$RR=function(p,q,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};'; +var completeSegment = '$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};'; - didWarnDefaultSelectValue = true; - } +var ReactDOMSharedInternals = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; + +var ReactDOMCurrentDispatcher = ReactDOMSharedInternals.Dispatcher; +var ReactDOMServerDispatcher = ReactDOMServerFloatDispatcher ; +function prepareToRender(resources) { + prepareToRenderResources(resources); + var previousHostDispatcher = ReactDOMCurrentDispatcher.current; + ReactDOMCurrentDispatcher.current = ReactDOMServerDispatcher; + return previousHostDispatcher; +} +function cleanupAfterRender(previousDispatcher) { + finishRenderingResources(); + ReactDOMCurrentDispatcher.current = previousDispatcher; +} // Used to distinguish these contexts from ones used in other renderers. +var ScriptStreamingFormat = 0; + +var dataElementQuotedEnd = stringToPrecomputedChunk('"></template>'); +var startInlineScript = stringToPrecomputedChunk('<script>'); +var endInlineScript = stringToPrecomputedChunk('</script>'); +var startScriptSrc = stringToPrecomputedChunk('<script src="'); +var startModuleSrc = stringToPrecomputedChunk('<script type="module" src="'); +var scriptIntegirty = stringToPrecomputedChunk('" integrity="'); +var endAsyncScript = stringToPrecomputedChunk('" async=""></script>'); +/** + * This escaping function is designed to work with bootstrapScriptContent only. + * because we know we are escaping the entire script. We can avoid for instance + * escaping html comment string sequences that are valid javascript as well because + * if there are no sebsequent <script sequences the html parser will never enter + * script data double escaped state (see: https://www.w3.org/TR/html53/syntax.html#script-data-double-escaped-state) + * + * While untrusted script content should be made safe before using this api it will + * ensure that the script cannot be early terminated or never terminated state + */ + +function escapeBootstrapScriptContent(scriptText) { + { + checkHtmlStringCoercion(scriptText); } - target.push(startChunkForTag('select')); - var children = null; - var innerHTML = null; + return ('' + scriptText).replace(scriptRegex, scriptReplacer); +} - for (var propKey in props) { - if (hasOwnProperty.call(props, propKey)) { - var propValue = props[propKey]; +var scriptRegex = /(<\/|<)(s)(cript)/gi; - if (propValue == null) { - continue; - } +var scriptReplacer = function (match, prefix, s, suffix) { + return "" + prefix + (s === 's' ? "\\u0073" : "\\u0053") + suffix; +}; // Allows us to keep track of what we've already written so we can refer back to it. +// if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag +// is set, the server will send instructions via data attributes (instead of inline scripts) - switch (propKey) { - case 'children': - children = propValue; - break; - case 'dangerouslySetInnerHTML': - // TODO: This doesn't really make sense for select since it can't use the controlled - // value in the innerHTML. - innerHTML = propValue; - break; +function createResponseState(identifierPrefix, nonce, bootstrapScriptContent, bootstrapScripts, bootstrapModules, externalRuntimeConfig) { + var idPrefix = identifierPrefix === undefined ? '' : identifierPrefix; + var inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk('<script nonce="' + escapeTextForBrowser(nonce) + '">'); + var bootstrapChunks = []; + var externalRuntimeDesc = null; + var streamingFormat = ScriptStreamingFormat; - case 'defaultValue': - case 'value': - // These are set on the Context instead and applied to the nested options. - break; + if (bootstrapScriptContent !== undefined) { + bootstrapChunks.push(inlineScriptWithNonce, stringToChunk(escapeBootstrapScriptContent(bootstrapScriptContent)), endInlineScript); + } - default: - pushAttribute(target, propKey, propValue); - break; + if (bootstrapScripts !== undefined) { + for (var i = 0; i < bootstrapScripts.length; i++) { + var scriptConfig = bootstrapScripts[i]; + var src = typeof scriptConfig === 'string' ? scriptConfig : scriptConfig.src; + var integrity = typeof scriptConfig === 'string' ? undefined : scriptConfig.integrity; + bootstrapChunks.push(startScriptSrc, stringToChunk(escapeTextForBrowser(src))); + + if (integrity) { + bootstrapChunks.push(scriptIntegirty, stringToChunk(escapeTextForBrowser(integrity))); } + + bootstrapChunks.push(endAsyncScript); } } - target.push(endOfStartTag); - pushInnerHTML(target, innerHTML, children); - return children; -} - -function flattenOptionChildren(children) { - var content = ''; // Flatten children and warn if they aren't strings or numbers; - // invalid types are ignored. + if (bootstrapModules !== undefined) { + for (var _i = 0; _i < bootstrapModules.length; _i++) { + var _scriptConfig = bootstrapModules[_i]; - React.Children.forEach(children, function (child) { - if (child == null) { - return; - } + var _src = typeof _scriptConfig === 'string' ? _scriptConfig : _scriptConfig.src; - content += child; + var _integrity = typeof _scriptConfig === 'string' ? undefined : _scriptConfig.integrity; - { - if (!didWarnInvalidOptionChildren && typeof child !== 'string' && typeof child !== 'number') { - didWarnInvalidOptionChildren = true; + bootstrapChunks.push(startModuleSrc, stringToChunk(escapeTextForBrowser(_src))); - error('Cannot infer the option value of complex children. ' + 'Pass a `value` prop or use a plain string as children to <option>.'); + if (_integrity) { + bootstrapChunks.push(scriptIntegirty, stringToChunk(escapeTextForBrowser(_integrity))); } + + bootstrapChunks.push(endAsyncScript); } - }); - return content; -} + } -var selectedMarkerAttribute = stringToPrecomputedChunk(' selected=""'); + return { + bootstrapChunks: bootstrapChunks, + placeholderPrefix: stringToPrecomputedChunk(idPrefix + 'P:'), + segmentPrefix: stringToPrecomputedChunk(idPrefix + 'S:'), + boundaryPrefix: idPrefix + 'B:', + idPrefix: idPrefix, + nextSuspenseID: 0, + streamingFormat: streamingFormat, + startInlineScript: inlineScriptWithNonce, + sentCompleteSegmentFunction: false, + sentCompleteBoundaryFunction: false, + sentClientRenderFunction: false, + sentStyleInsertionFunction: false, + externalRuntimeConfig: externalRuntimeDesc + }; +} // Constants for the insertion mode we're currently writing in. We don't encode all HTML5 insertion +// modes. We only include the variants as they matter for the sake of our purposes. +// We don't actually provide the namespace therefore we use constants instead of the string. -function pushStartOption(target, props, formatContext) { - var selectedValue = formatContext.selectedValue; - target.push(startChunkForTag('option')); - var children = null; - var value = null; - var selected = null; - var innerHTML = null; +var ROOT_HTML_MODE = 0; // Used for the root most element tag. - for (var propKey in props) { - if (hasOwnProperty.call(props, propKey)) { - var propValue = props[propKey]; +var HTML_MODE = 1; +var SVG_MODE = 2; +var MATHML_MODE = 3; +var HTML_TABLE_MODE = 4; +var HTML_TABLE_BODY_MODE = 5; +var HTML_TABLE_ROW_MODE = 6; +var HTML_COLGROUP_MODE = 7; // We have a greater than HTML_TABLE_MODE check elsewhere. If you add more cases here, make sure it +// still makes sense +// Lets us keep track of contextual state and pick it back up after suspending. - if (propValue == null) { - continue; - } +function createFormatContext(insertionMode, selectedValue, noscriptTagInScope) { + return { + insertionMode: insertionMode, + selectedValue: selectedValue, + noscriptTagInScope: noscriptTagInScope + }; +} - switch (propKey) { - case 'children': - children = propValue; - break; +function createRootFormatContext(namespaceURI) { + var insertionMode = namespaceURI === 'http://www.w3.org/2000/svg' ? SVG_MODE : namespaceURI === 'http://www.w3.org/1998/Math/MathML' ? MATHML_MODE : ROOT_HTML_MODE; + return createFormatContext(insertionMode, null, false); +} +function getChildFormatContext(parentContext, type, props) { + switch (type) { + case 'noscript': + return createFormatContext(HTML_MODE, null, true); - case 'selected': - // ignore - selected = propValue; + case 'select': + return createFormatContext(HTML_MODE, props.value != null ? props.value : props.defaultValue, parentContext.noscriptTagInScope); - { - // TODO: Remove support for `selected` in <option>. - if (!didWarnSelectedSetOnOption) { - error('Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.'); + case 'svg': + return createFormatContext(SVG_MODE, null, parentContext.noscriptTagInScope); - didWarnSelectedSetOnOption = true; - } - } + case 'math': + return createFormatContext(MATHML_MODE, null, parentContext.noscriptTagInScope); - break; + case 'foreignObject': + return createFormatContext(HTML_MODE, null, parentContext.noscriptTagInScope); + // Table parents are special in that their children can only be created at all if they're + // wrapped in a table parent. So we need to encode that we're entering this mode. - case 'dangerouslySetInnerHTML': - innerHTML = propValue; - break; - // eslint-disable-next-line-no-fallthrough + case 'table': + return createFormatContext(HTML_TABLE_MODE, null, parentContext.noscriptTagInScope); - case 'value': - value = propValue; - // We intentionally fallthrough to also set the attribute on the node. - // eslint-disable-next-line-no-fallthrough + case 'thead': + case 'tbody': + case 'tfoot': + return createFormatContext(HTML_TABLE_BODY_MODE, null, parentContext.noscriptTagInScope); - default: - pushAttribute(target, propKey, propValue); - break; - } - } - } + case 'colgroup': + return createFormatContext(HTML_COLGROUP_MODE, null, parentContext.noscriptTagInScope); - if (selectedValue != null) { - var stringValue; + case 'tr': + return createFormatContext(HTML_TABLE_ROW_MODE, null, parentContext.noscriptTagInScope); + } - if (value !== null) { - { - checkAttributeStringCoercion(value, 'value'); - } + if (parentContext.insertionMode >= HTML_TABLE_MODE) { + // Whatever tag this was, it wasn't a table parent or other special parent, so we must have + // entered plain HTML again. + return createFormatContext(HTML_MODE, null, parentContext.noscriptTagInScope); + } - stringValue = '' + value; - } else { - { - if (innerHTML !== null) { - if (!didWarnInvalidOptionInnerHTML) { - didWarnInvalidOptionInnerHTML = true; + if (parentContext.insertionMode === ROOT_HTML_MODE) { + // We've emitted the root and is now in plain HTML mode. + return createFormatContext(HTML_MODE, null, parentContext.noscriptTagInScope); + } - error('Pass a `value` prop if you set dangerouslyInnerHTML so React knows ' + 'which value should be selected.'); - } - } - } + return parentContext; +} +var UNINITIALIZED_SUSPENSE_BOUNDARY_ID = null; +function assignSuspenseBoundaryID(responseState) { + var generatedID = responseState.nextSuspenseID++; + return stringToPrecomputedChunk(responseState.boundaryPrefix + generatedID.toString(16)); +} +function makeId(responseState, treeId, localId) { + var idPrefix = responseState.idPrefix; + var id = ':' + idPrefix + 'R' + treeId; // Unless this is the first id at this level, append a number at the end + // that represents the position of this useId hook among all the useId + // hooks for this fiber. - stringValue = flattenOptionChildren(children); - } + if (localId > 0) { + id += 'H' + localId.toString(32); + } - if (isArray(selectedValue)) { - // multiple - for (var i = 0; i < selectedValue.length; i++) { - { - checkAttributeStringCoercion(selectedValue[i], 'value'); - } + return id + ':'; +} - var v = '' + selectedValue[i]; +function encodeHTMLTextNode(text) { + return escapeTextForBrowser(text); +} - if (v === stringValue) { - target.push(selectedMarkerAttribute); - break; - } - } - } else { - { - checkAttributeStringCoercion(selectedValue, 'select.value'); - } +var textSeparator = stringToPrecomputedChunk('<!-- -->'); +function pushTextInstance(target, text, responseState, textEmbedded) { + if (text === '') { + // Empty text doesn't have a DOM node representation and the hydration is aware of this. + return textEmbedded; + } - if ('' + selectedValue === stringValue) { - target.push(selectedMarkerAttribute); - } - } - } else if (selected) { - target.push(selectedMarkerAttribute); + if (textEmbedded) { + target.push(textSeparator); } - target.push(endOfStartTag); - pushInnerHTML(target, innerHTML, children); - return children; + target.push(stringToChunk(encodeHTMLTextNode(text))); + return true; +} // Called when Fizz is done with a Segment. Currently the only purpose is to conditionally +// emit a text separator when we don't know for sure it is safe to omit + +function pushSegmentFinale(target, responseState, lastPushedText, textEmbedded) { + if (lastPushedText && textEmbedded) { + target.push(textSeparator); + } } +var styleNameCache = new Map(); -function pushInput(target, props) { - { - checkControlledValueProps('input', props); +function processStyleName(styleName) { + var chunk = styleNameCache.get(styleName); - if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnDefaultChecked) { - 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', 'A component', props.type); + if (chunk !== undefined) { + return chunk; + } - didWarnDefaultChecked = true; - } + var result = stringToPrecomputedChunk(escapeTextForBrowser(hyphenateStyleName(styleName))); + styleNameCache.set(styleName, result); + return result; +} - if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultInputValue) { - 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', 'A component', props.type); +var styleAttributeStart = stringToPrecomputedChunk(' style="'); +var styleAssign = stringToPrecomputedChunk(':'); +var styleSeparator = stringToPrecomputedChunk(';'); - didWarnDefaultInputValue = true; - } +function pushStyle(target, responseState, style) { + if (typeof style !== 'object') { + throw new Error('The `style` prop expects a mapping from style properties to values, ' + "not a string. For example, style={{marginRight: spacing + 'em'}} when " + 'using JSX.'); } - target.push(startChunkForTag('input')); - var value = null; - var defaultValue = null; - var checked = null; - var defaultChecked = null; - - for (var propKey in props) { - if (hasOwnProperty.call(props, propKey)) { - var propValue = props[propKey]; + var isFirst = true; - if (propValue == null) { - continue; - } + for (var styleName in style) { + if (!hasOwnProperty.call(style, styleName)) { + continue; + } // If you provide unsafe user data here they can inject arbitrary CSS + // which may be problematic (I couldn't repro this): + // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet + // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/ + // This is not an XSS hole but instead a potential CSS injection issue + // which has lead to a greater discussion about how we're going to + // trust URLs moving forward. See #2115901 - switch (propKey) { - case 'children': - case 'dangerouslySetInnerHTML': - throw new Error('input' + " is a self-closing tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.'); - // eslint-disable-next-line-no-fallthrough - case 'defaultChecked': - defaultChecked = propValue; - break; + var styleValue = style[styleName]; - case 'defaultValue': - defaultValue = propValue; - break; + if (styleValue == null || typeof styleValue === 'boolean' || styleValue === '') { + // TODO: We used to set empty string as a style with an empty value. Does that ever make sense? + continue; + } - case 'checked': - checked = propValue; - break; + var nameChunk = void 0; + var valueChunk = void 0; + var isCustomProperty = styleName.indexOf('--') === 0; - case 'value': - value = propValue; - break; + if (isCustomProperty) { + nameChunk = stringToChunk(escapeTextForBrowser(styleName)); - default: - pushAttribute(target, propKey, propValue); - break; + { + checkCSSPropertyStringCoercion(styleValue, styleName); } - } - } - if (checked !== null) { - pushAttribute(target, 'checked', checked); - } else if (defaultChecked !== null) { - pushAttribute(target, 'checked', defaultChecked); - } + valueChunk = stringToChunk(escapeTextForBrowser(('' + styleValue).trim())); + } else { + { + warnValidStyle$1(styleName, styleValue); + } - if (value !== null) { - pushAttribute(target, 'value', value); - } else if (defaultValue !== null) { - pushAttribute(target, 'value', defaultValue); - } + nameChunk = processStyleName(styleName); - target.push(endOfStartTagSelfClosing); - return null; -} + if (typeof styleValue === 'number') { + if (styleValue !== 0 && !hasOwnProperty.call(isUnitlessNumber, styleName)) { + valueChunk = stringToChunk(styleValue + 'px'); // Presumes implicit 'px' suffix for unitless numbers + } else { + valueChunk = stringToChunk('' + styleValue); + } + } else { + { + checkCSSPropertyStringCoercion(styleValue, styleName); + } -function pushStartTextArea(target, props) { - { - checkControlledValueProps('textarea', props); + valueChunk = stringToChunk(escapeTextForBrowser(('' + styleValue).trim())); + } + } - if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultTextareaValue) { - error('Textarea 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 textarea ' + 'and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components'); + if (isFirst) { + isFirst = false; // If it's first, we don't need any separators prefixed. - didWarnDefaultTextareaValue = true; + target.push(styleAttributeStart, nameChunk, styleAssign, valueChunk); + } else { + target.push(styleSeparator, nameChunk, styleAssign, valueChunk); } } - target.push(startChunkForTag('textarea')); - var value = null; - var defaultValue = null; - var children = null; + if (!isFirst) { + target.push(attributeEnd); + } +} - for (var propKey in props) { - if (hasOwnProperty.call(props, propKey)) { - var propValue = props[propKey]; +var attributeSeparator = stringToPrecomputedChunk(' '); +var attributeAssign = stringToPrecomputedChunk('="'); +var attributeEnd = stringToPrecomputedChunk('"'); +var attributeEmptyString = stringToPrecomputedChunk('=""'); - if (propValue == null) { - continue; +function pushAttribute(target, responseState, name, value) // not null or undefined +{ + switch (name) { + case 'style': + { + pushStyle(target, responseState, value); + return; } - switch (propKey) { - case 'children': - children = propValue; - break; - - case 'value': - value = propValue; - break; - - case 'defaultValue': - defaultValue = propValue; - break; + case 'defaultValue': + case 'defaultChecked': // These shouldn't be set as attributes on generic HTML elements. - case 'dangerouslySetInnerHTML': - throw new Error('`dangerouslySetInnerHTML` does not make sense on <textarea>.'); - // eslint-disable-next-line-no-fallthrough + case 'innerHTML': // Must use dangerouslySetInnerHTML instead. - default: - pushAttribute(target, propKey, propValue); - break; - } - } + case 'suppressContentEditableWarning': + case 'suppressHydrationWarning': + // Ignored. These are built-in to React on the client. + return; } - if (value === null && defaultValue !== null) { - value = defaultValue; + if ( // shouldIgnoreAttribute + // We have already filtered out null/undefined and reserved words. + name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) { + return; } - target.push(endOfStartTag); // TODO (yungsters): Remove support for children content in <textarea>. + var propertyInfo = getPropertyInfo(name); - if (children != null) { - { - error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.'); + if (propertyInfo !== null) { + // shouldRemoveAttribute + switch (typeof value) { + case 'function': + case 'symbol': + // eslint-disable-line + return; + + case 'boolean': + { + if (!propertyInfo.acceptsBooleans) { + return; + } + } } - if (value != null) { - throw new Error('If you supply `defaultValue` on a <textarea>, do not pass children.'); - } - - if (isArray(children)) { - if (children.length > 1) { - throw new Error('<textarea> can only have at most one child.'); - } // TODO: remove the coercion and the DEV check below because it will - // always be overwritten by the coercion several lines below it. #22309 - - - { - checkHtmlStringCoercion(children[0]); - } - - value = '' + children[0]; - } - - { - checkHtmlStringCoercion(children); - } - - value = '' + children; - } - - if (typeof value === 'string' && value[0] === '\n') { - // text/html ignores the first character in these tags if it's a newline - // Prefer to break application/xml over text/html (for now) by adding - // a newline specifically to get eaten by the parser. (Alternately for - // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first - // \r is normalized out by HTMLTextAreaElement#value.) - // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre> - // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions> - // See: <http://www.w3.org/TR/html5/syntax.html#newlines> - // See: Parsing of "textarea" "listing" and "pre" elements - // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody> - target.push(leadingNewline); - } // ToString and push directly instead of recurse over children. - // We don't really support complex children in the value anyway. - // This also currently avoids a trailing comment node which breaks textarea. - - - if (value !== null) { - { - checkAttributeStringCoercion(value, 'value'); - } - - target.push(stringToChunk(encodeHTMLTextNode('' + value))); - } - - return null; -} - -function pushMeta(target, props, responseState, textEmbedded, insertionMode, noscriptTagInScope) { - { - if (insertionMode === SVG_MODE || noscriptTagInScope) { - return pushSelfClosing(target, props, 'meta'); - } else { - if (textEmbedded) { - // This link follows text but we aren't writing a tag. while not as efficient as possible we need - // to be safe and assume text will follow by inserting a textSeparator - target.push(textSeparator); - } + var attributeName = propertyInfo.attributeName; + var attributeNameChunk = stringToChunk(attributeName); // TODO: If it's known we can cache the chunk. - if (typeof props.charSet === 'string') { - return pushSelfClosing(responseState.charsetChunks, props, 'meta'); - } else { - return pushSelfClosing(responseState.hoistableChunks, props, 'meta'); - } - } - } -} + switch (propertyInfo.type) { + case BOOLEAN: + if (value) { + target.push(attributeSeparator, attributeNameChunk, attributeEmptyString); + } -function pushLink(target, props, responseState, resources, textEmbedded, insertionMode, noscriptTagInScope) { - { - var rel = props.rel; - var href = props.href; - var precedence = props.precedence; + return; - if (insertionMode === SVG_MODE || noscriptTagInScope || typeof rel !== 'string' || typeof href !== 'string' || href === '') { - { - if (rel === 'stylesheet' && typeof props.precedence === 'string') { - if (typeof href !== 'string' || !href) { - error('React encountered a `<link rel="stylesheet" .../>` with a `precedence` prop and expected the `href` prop to be a non-empty string but ecountered %s instead. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop ensure there is a non-empty string `href` prop as well, otherwise remove the `precedence` prop.', getValueDescriptorExpectingObjectForWarning(href)); - } + case OVERLOADED_BOOLEAN: + if (value === true) { + target.push(attributeSeparator, attributeNameChunk, attributeEmptyString); + } else if (value === false) ; else { + target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); } - } - pushLinkImpl(target, props); - return null; - } + return; - if (props.rel === 'stylesheet') { - // This <link> may hoistable as a Stylesheet Resource, otherwise it will emit in place - var key = getResourceKey('style', href); + case NUMERIC: + if (!isNaN(value)) { + target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); + } - if (typeof precedence !== 'string' || props.disabled != null || props.onLoad || props.onError) { - // This stylesheet is either not opted into Resource semantics or has conflicting properties which - // disqualify it for such. We can still create a preload resource to help it load faster on the - // client - { - if (typeof precedence === 'string') { - if (props.disabled != null) { - error('React encountered a `<link rel="stylesheet" .../>` with a `precedence` prop and a `disabled` prop. The presence of the `disabled` prop indicates an intent to manage the stylesheet active state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the `disabled` prop, otherwise remove the `precedence` prop.'); - } else if (props.onLoad || props.onError) { - var propDescription = props.onLoad && props.onError ? '`onLoad` and `onError` props' : props.onLoad ? '`onLoad` prop' : '`onError` prop'; + break; - error('React encountered a `<link rel="stylesheet" .../>` with a `precedence` prop and %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.', propDescription, propDescription); - } - } + case POSITIVE_NUMERIC: + if (!isNaN(value) && value >= 1) { + target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); } - var resource = resources.preloadsMap.get(key); - - if (!resource) { - resource = { - type: 'preload', - chunks: [], - state: NoState, - props: preloadAsStylePropsFromProps(href, props) - }; - resources.preloadsMap.set(key, resource); + break; + default: + if (propertyInfo.sanitizeURL) { { - markAsImplicitResourceDEV(resource, props, resource.props); + checkAttributeStringCoercion(value, attributeName); } + + value = '' + value; + sanitizeURL(value); } - pushLinkImpl(resource.chunks, resource.props); - resources.usedStylesheets.add(resource); - return pushLinkImpl(target, props); - } else { - // This stylesheet refers to a Resource and we create a new one if necessary - var _resource = resources.stylesMap.get(key); + target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); + } + } else if (isAttributeNameSafe(name)) { + // shouldRemoveAttribute + switch (typeof value) { + case 'function': + case 'symbol': + // eslint-disable-line + return; + case 'boolean': { - var devResource = getAsResourceDEV(_resource); - - if (devResource) { - switch (devResource.__provenance) { - case 'rendered': - { - var differenceDescription = describeDifferencesForStylesheets( // Diff the props from the JSX element, not the derived resource props - props, devResource.__originalProps); - - if (differenceDescription) { - error('React encountered a <link rel="stylesheet" href="%s" .../> with a `precedence` prop that has props that conflict' + ' with another hoistable stylesheet with the same `href`. When using `precedence` with <link rel="stylsheet" .../>' + ' the props from the first encountered instance will be used and props from later instances will be ignored.' + ' Update the props on either <link rel="stylesheet" .../> instance so they agree.%s', href, differenceDescription); - } - - break; - } - - case 'preinit': - { - var _differenceDescription = describeDifferencesForStylesheetOverPreinit( // Diff the props from the JSX element, not the derived resource props - props, devResource.__propsEquivalent); - - if (_differenceDescription) { - error('React encountered a <link rel="stylesheet" precedence="%s" href="%s" .../> with props that conflict' + ' with the options provided to `ReactDOM.preinit("%s", { as: "style", ... })`. React will use the first props or preinitialization' + ' options encountered when rendering a hoistable stylesheet with a particular `href` and will ignore any newer props or' + ' options. The first instance of this stylesheet resource was created using the `ReactDOM.preinit()` function.' + ' Please note, `ReactDOM.preinit()` is modeled off of module import assertions capabilities and does not support' + ' arbitrary props. If you need to have props not included with the preinit options you will need to rely on rendering' + ' <link> tags only.%s', precedence, href, href, _differenceDescription); - } + var prefix = name.toLowerCase().slice(0, 5); - break; - } - } + if (prefix !== 'data-' && prefix !== 'aria-') { + return; } } + } - if (!_resource) { - var resourceProps = stylesheetPropsFromRawProps(props); - var preloadResource = resources.preloadsMap.get(key); - - if (preloadResource) { - // If we already had a preload we don't want that resource to flush directly. - // We let the newly created resource govern flushing. - preloadResource.state |= Blocked; - adoptPreloadPropsForStylesheetProps(resourceProps, preloadResource.props); - } + target.push(attributeSeparator, stringToChunk(name), attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); + } +} - _resource = { - type: 'stylesheet', - chunks: [], - state: resources.boundaryResources ? Blocked : NoState, - props: resourceProps - }; - resources.stylesMap.set(key, _resource); +var endOfStartTag = stringToPrecomputedChunk('>'); +var endOfStartTagSelfClosing = stringToPrecomputedChunk('/>'); - { - markAsRenderedResourceDEV(_resource, props); - } +function pushInnerHTML(target, innerHTML, children) { + if (innerHTML != null) { + if (children != null) { + throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.'); + } - var precedenceSet = resources.precedences.get(precedence); + if (typeof innerHTML !== 'object' || !('__html' in innerHTML)) { + throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' + 'for more information.'); + } - if (!precedenceSet) { - precedenceSet = new Set(); - resources.precedences.set(precedence, precedenceSet); - } + var html = innerHTML.__html; - precedenceSet.add(_resource); - } + if (html !== null && html !== undefined) { + { + checkHtmlStringCoercion(html); + } - if (resources.boundaryResources) { - resources.boundaryResources.add(_resource); - } + target.push(stringToChunk('' + html)); + } + } +} // TODO: Move these to ResponseState so that we warn for every request. +// It would help debugging in stateful servers (e.g. service worker). - if (textEmbedded) { - // This link follows text but we aren't writing a tag. while not as efficient as possible we need - // to be safe and assume text will follow by inserting a textSeparator - target.push(textSeparator); - } - return null; - } - } else if (props.onLoad || props.onError) { - // When using load handlers we cannot hoist and need to emit links in place - return pushLinkImpl(target, props); - } else { - // We can hoist this link so we may need to emit a text separator. - // @TODO refactor text separators so we don't have to defensively add - // them when we don't end up emitting a tag as a result of pushStartInstance - if (textEmbedded) { - // This link follows text but we aren't writing a tag. while not as efficient as possible we need - // to be safe and assume text will follow by inserting a textSeparator - target.push(textSeparator); - } +var didWarnDefaultInputValue = false; +var didWarnDefaultChecked = false; +var didWarnDefaultSelectValue = false; +var didWarnDefaultTextareaValue = false; +var didWarnInvalidOptionChildren = false; +var didWarnInvalidOptionInnerHTML = false; +var didWarnSelectedSetOnOption = false; - switch (props.rel) { - case 'preconnect': - case 'dns-prefetch': - return pushLinkImpl(responseState.preconnectChunks, props); +function checkSelectProp(props, propName) { + { + var value = props[propName]; - case 'preload': - return pushLinkImpl(responseState.preloadChunks, props); + if (value != null) { + var array = isArray(value); - default: - return pushLinkImpl(responseState.hoistableChunks, props); + if (props.multiple && !array) { + error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.', propName); + } else if (!props.multiple && array) { + error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.', propName); } } } } -function pushLinkImpl(target, props) { - target.push(startChunkForTag('link')); +function pushStartSelect(target, props, responseState) { + { + checkControlledValueProps('select', props); + checkSelectProp(props, 'value'); + checkSelectProp(props, 'defaultValue'); + + if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultSelectValue) { + error('Select 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 select ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components'); + + didWarnDefaultSelectValue = true; + } + } + + target.push(startChunkForTag('select')); + var children = null; + var innerHTML = null; for (var propKey in props) { if (hasOwnProperty.call(props, propKey)) { @@ -3181,86 +3430,62 @@ function pushLinkImpl(target, props) { switch (propKey) { case 'children': + children = propValue; + break; + case 'dangerouslySetInnerHTML': - throw new Error('link' + " is a self-closing tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.'); - // eslint-disable-next-line-no-fallthrough + // TODO: This doesn't really make sense for select since it can't use the controlled + // value in the innerHTML. + innerHTML = propValue; + break; + + case 'defaultValue': + case 'value': + // These are set on the Context instead and applied to the nested options. + break; default: - pushAttribute(target, propKey, propValue); + pushAttribute(target, responseState, propKey, propValue); break; } } } - target.push(endOfStartTagSelfClosing); - return null; + target.push(endOfStartTag); + pushInnerHTML(target, innerHTML, children); + return children; } -function pushStyle(target, props, resources, textEmbedded, insertionMode, noscriptTagInScope) { - { - if (hasOwnProperty.call(props, 'children')) { - var children = props.children; - var child = Array.isArray(children) ? children.length < 2 ? children[0] : null : children; - - if (typeof child === 'function' || typeof child === 'symbol' || Array.isArray(child)) { - var childType = typeof child === 'function' ? 'a Function' : typeof child === 'symbol' ? 'a Sybmol' : 'an Array'; - - error('React expect children of <style> tags to be a string, number, or object with a `toString` method but found %s instead. ' + 'In browsers style Elements can only have `Text` Nodes as children.', childType); - } - } - } - - { - var precedence = props.precedence; - var href = props.href; +function flattenOptionChildren(children) { + var content = ''; // Flatten children and warn if they aren't strings or numbers; + // invalid types are ignored. - if (insertionMode === SVG_MODE || noscriptTagInScope || typeof precedence !== 'string' || typeof href !== 'string' || href === '') { - // This style tag is not able to be turned into a Style Resource - return pushStyleImpl(target, props); + React.Children.forEach(children, function (child) { + if (child == null) { + return; } - var key = getResourceKey('style', href); - var resource = resources.stylesMap.get(key); - - if (!resource) { - resource = { - type: 'style', - chunks: [], - state: resources.boundaryResources ? Blocked : NoState, - props: styleTagPropsFromRawProps(props) - }; - resources.stylesMap.set(key, resource); - - { - markAsRenderedResourceDEV(resource, props); - } - - pushStyleImpl(resource.chunks, resource.props); - var precedenceSet = resources.precedences.get(precedence); - - if (!precedenceSet) { - precedenceSet = new Set(); - resources.precedences.set(precedence, precedenceSet); - } + content += child; - precedenceSet.add(resource); + { + if (!didWarnInvalidOptionChildren && typeof child !== 'string' && typeof child !== 'number') { + didWarnInvalidOptionChildren = true; - if (resources.boundaryResources) { - resources.boundaryResources.add(resource); + error('Cannot infer the option value of complex children. ' + 'Pass a `value` prop or use a plain string as children to <option>.'); } } - - if (textEmbedded) { - // This link follows text but we aren't writing a tag. while not as efficient as possible we need - // to be safe and assume text will follow by inserting a textSeparator - target.push(textSeparator); - } - } + }); + return content; } -function pushStyleImpl(target, props) { - target.push(startChunkForTag('style')); +var selectedMarkerAttribute = stringToPrecomputedChunk(' selected=""'); + +function pushStartOption(target, props, responseState, formatContext) { + var selectedValue = formatContext.selectedValue; + target.push(startChunkForTag('option')); var children = null; + var value = null; + var selected = null; var innerHTML = null; for (var propKey in props) { @@ -3276,60 +3501,115 @@ function pushStyleImpl(target, props) { children = propValue; break; - case 'dangerouslySetInnerHTML': + case 'selected': + // ignore + selected = propValue; + + { + // TODO: Remove support for `selected` in <option>. + if (!didWarnSelectedSetOnOption) { + error('Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.'); + + didWarnSelectedSetOnOption = true; + } + } + + break; + + case 'dangerouslySetInnerHTML': innerHTML = propValue; break; + // eslint-disable-next-line-no-fallthrough + + case 'value': + value = propValue; + // We intentionally fallthrough to also set the attribute on the node. + // eslint-disable-next-line-no-fallthrough default: - pushAttribute(target, propKey, propValue); + pushAttribute(target, responseState, propKey, propValue); break; } } } - target.push(endOfStartTag); - var child = Array.isArray(children) ? children.length < 2 ? children[0] : null : children; + if (selectedValue != null) { + var stringValue; - if (typeof child !== 'function' && typeof child !== 'symbol' && child !== null && child !== undefined) { - // eslint-disable-next-line react-internal/safe-string-coercion - target.push(stringToChunk(escapeTextForBrowser('' + child))); - } + if (value !== null) { + { + checkAttributeStringCoercion(value, 'value'); + } - pushInnerHTML(target, innerHTML, children); - target.push(endTag1, stringToChunk('style'), endTag2); - return null; -} + stringValue = '' + value; + } else { + { + if (innerHTML !== null) { + if (!didWarnInvalidOptionInnerHTML) { + didWarnInvalidOptionInnerHTML = true; -function pushSelfClosing(target, props, tag) { - target.push(startChunkForTag(tag)); + error('Pass a `value` prop if you set dangerouslyInnerHTML so React knows ' + 'which value should be selected.'); + } + } + } - for (var propKey in props) { - if (hasOwnProperty.call(props, propKey)) { - var propValue = props[propKey]; + stringValue = flattenOptionChildren(children); + } - if (propValue == null) { - continue; - } + if (isArray(selectedValue)) { + // multiple + for (var i = 0; i < selectedValue.length; i++) { + { + checkAttributeStringCoercion(selectedValue[i], 'value'); + } - switch (propKey) { - case 'children': - case 'dangerouslySetInnerHTML': - throw new Error(tag + " is a self-closing tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.'); - // eslint-disable-next-line-no-fallthrough + var v = '' + selectedValue[i]; - default: - pushAttribute(target, propKey, propValue); + if (v === stringValue) { + target.push(selectedMarkerAttribute); break; + } + } + } else { + { + checkAttributeStringCoercion(selectedValue, 'select.value'); + } + + if ('' + selectedValue === stringValue) { + target.push(selectedMarkerAttribute); } } + } else if (selected) { + target.push(selectedMarkerAttribute); } - target.push(endOfStartTagSelfClosing); - return null; + target.push(endOfStartTag); + pushInnerHTML(target, innerHTML, children); + return children; } -function pushStartMenuItem(target, props) { - target.push(startChunkForTag('menuitem')); +function pushInput(target, props, responseState) { + { + checkControlledValueProps('input', props); + + if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnDefaultChecked) { + 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', 'A component', props.type); + + didWarnDefaultChecked = true; + } + + if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultInputValue) { + 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', 'A component', props.type); + + didWarnDefaultInputValue = true; + } + } + + target.push(startChunkForTag('input')); + var value = null; + var defaultValue = null; + var checked = null; + var defaultChecked = null; for (var propKey in props) { if (hasOwnProperty.call(props, propKey)) { @@ -3342,56 +3622,63 @@ function pushStartMenuItem(target, props) { switch (propKey) { case 'children': case 'dangerouslySetInnerHTML': - throw new Error('menuitems cannot have `children` nor `dangerouslySetInnerHTML`.'); + throw new Error('input' + " is a self-closing tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.'); // eslint-disable-next-line-no-fallthrough + case 'defaultChecked': + defaultChecked = propValue; + break; + + case 'defaultValue': + defaultValue = propValue; + break; + + case 'checked': + checked = propValue; + break; + + case 'value': + value = propValue; + break; + default: - pushAttribute(target, propKey, propValue); + pushAttribute(target, responseState, propKey, propValue); break; } } } - target.push(endOfStartTag); + if (checked !== null) { + pushAttribute(target, responseState, 'checked', checked); + } else if (defaultChecked !== null) { + pushAttribute(target, responseState, 'checked', defaultChecked); + } + + if (value !== null) { + pushAttribute(target, responseState, 'value', value); + } else if (defaultValue !== null) { + pushAttribute(target, responseState, 'value', defaultValue); + } + + target.push(endOfStartTagSelfClosing); return null; } -function pushTitle(target, props, responseState, insertionMode, noscriptTagInScope) { +function pushStartTextArea(target, props, responseState) { { - if (hasOwnProperty.call(props, 'children')) { - var children = props.children; - var child = Array.isArray(children) ? children.length < 2 ? children[0] : null : children; - - if (Array.isArray(children) && children.length > 1) { - error('React expects the `children` prop of <title> tags to be a string, number, or object with a novel `toString` method but found an Array with length %s instead.' + ' Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert `children` of <title> tags to a single string value' + ' which is why Arrays of length greater than 1 are not supported. When using JSX it can be commong to combine text nodes and value nodes.' + ' For example: <title>hello {nameOfUser}. While not immediately apparent, `children` in this case is an Array with length 2. If your `children` prop' + ' is using this form try rewriting it using a template string: {`hello ${nameOfUser}`}.', children.length); - } else if (typeof child === 'function' || typeof child === 'symbol') { - var childType = typeof child === 'function' ? 'a Function' : 'a Sybmol'; - - error('React expect children of tags to be a string, number, or object with a novel `toString` method but found %s instead.' + ' Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title>' + ' tags to a single string value.', childType); - } else if (child && child.toString === {}.toString) { - if (child.$$typeof != null) { - error('React expects the `children` prop of <title> tags to be a string, number, or object with a novel `toString` method but found an object that appears to be' + ' a React element which never implements a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to' + ' be able to convert children of <title> tags to a single string value which is why rendering React elements is not supported. If the `children` of <title> is' + ' a React Component try moving the <title> tag into that component. If the `children` of <title> is some HTML markup change it to be Text only to be valid HTML.'); - } else { - error('React expects the `children` prop of <title> tags to be a string, number, or object with a novel `toString` method but found an object that does not implement' + ' a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags' + ' to a single string value. Using the default `toString` method available on every object is almost certainly an error. Consider whether the `children` of this <title>' + ' is an object in error and change it to a string or number value if so. Otherwise implement a `toString` method that React can use to produce a valid <title>.'); - } - } - } - } + checkControlledValueProps('textarea', props); - { - if (insertionMode !== SVG_MODE && !noscriptTagInScope) { - pushTitleImpl(responseState.hoistableChunks, props); - return null; - } else { - return pushTitleImpl(target, props); + if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultTextareaValue) { + error('Textarea 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 textarea ' + 'and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components'); + + didWarnDefaultTextareaValue = true; } } -} -function pushTitleImpl(target, props) { - target.push(startChunkForTag('title')); + target.push(startChunkForTag('textarea')); + var value = null; + var defaultValue = null; var children = null; - var innerHTML = null; for (var propKey in props) { if (hasOwnProperty.call(props, propKey)) { @@ -3406,230 +3693,140 @@ function pushTitleImpl(target, props) { children = propValue; break; - case 'dangerouslySetInnerHTML': - innerHTML = propValue; + case 'value': + value = propValue; break; + case 'defaultValue': + defaultValue = propValue; + break; + + case 'dangerouslySetInnerHTML': + throw new Error('`dangerouslySetInnerHTML` does not make sense on <textarea>.'); + // eslint-disable-next-line-no-fallthrough + default: - pushAttribute(target, propKey, propValue); + pushAttribute(target, responseState, propKey, propValue); break; } } } - target.push(endOfStartTag); - var child = Array.isArray(children) ? children.length < 2 ? children[0] : null : children; - - if (typeof child !== 'function' && typeof child !== 'symbol' && child !== null && child !== undefined) { - // eslint-disable-next-line react-internal/safe-string-coercion - target.push(stringToChunk(escapeTextForBrowser('' + child))); + if (value === null && defaultValue !== null) { + value = defaultValue; } - pushInnerHTML(target, innerHTML, children); - target.push(endTag1, stringToChunk('title'), endTag2); - return null; -} + target.push(endOfStartTag); // TODO (yungsters): Remove support for children content in <textarea>. -function pushStartHead(target, props, responseState, insertionMode) { - { - if (insertionMode < HTML_MODE && responseState.headChunks === null) { - // This <head> is the Document.head and should be part of the preamble - responseState.headChunks = []; - return pushStartGenericElement(responseState.headChunks, props, 'head'); - } else { - // This <head> is deep and is likely just an error. we emit it inline though. - // Validation should warn that this tag is the the wrong spot. - return pushStartGenericElement(target, props, 'head'); + if (children != null) { + { + error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.'); } - } -} -function pushStartHtml(target, props, responseState, insertionMode) { - { - if (insertionMode === ROOT_HTML_MODE && responseState.htmlChunks === null) { - // This <html> is the Document.documentElement and should be part of the preamble - responseState.htmlChunks = [DOCTYPE]; - return pushStartGenericElement(responseState.htmlChunks, props, 'html'); - } else { - // This <html> is deep and is likely just an error. we emit it inline though. - // Validation should warn that this tag is the the wrong spot. - return pushStartGenericElement(target, props, 'html'); + if (value != null) { + throw new Error('If you supply `defaultValue` on a <textarea>, do not pass children.'); } - } -} -function pushScript(target, props, resources, textEmbedded, insertionMode, noscriptTagInScope) { - { - if (insertionMode === SVG_MODE || noscriptTagInScope || typeof props.src !== 'string' || !props.src) { - // This script will not be a resource nor can it be preloaded, we bailout early - // and emit it in place. - return pushScriptImpl(target, props); - } - - var src = props.src; - var key = getResourceKey('script', src); - - if (props.async !== true || props.onLoad || props.onError) { - // We can't resourcify scripts with load listeners. To avoid ambiguity with - // other Resourcified async scripts on the server we omit them from the server - // stream and expect them to be inserted during hydration on the client. - // We can still preload them however so the client can start fetching the script - // as soon as possible - var resource = resources.preloadsMap.get(key); - - if (!resource) { - resource = { - type: 'preload', - chunks: [], - state: NoState, - props: preloadAsScriptPropsFromProps(props.src, props) - }; - resources.preloadsMap.set(key, resource); + if (isArray(children)) { + if (children.length > 1) { + throw new Error('<textarea> can only have at most one child.'); + } // TODO: remove the coercion and the DEV check below because it will + // always be overwritten by the coercion several lines below it. #22309 - { - markAsImplicitResourceDEV(resource, props, resource.props); - } - resources.usedScripts.add(resource); - pushLinkImpl(resource.chunks, resource.props); + { + checkHtmlStringCoercion(children[0]); } - if (props.async !== true) { - // This is not an async script, we can preloaded it but it still needs to - // be emitted in place since it needs to hydrate on the client - pushScriptImpl(target, props); - return null; - } - } else { - // We can make this <script> into a ScriptResource - var _resource2 = resources.scriptsMap.get(key); + value = '' + children[0]; + } - { - var devResource = getAsResourceDEV(_resource2); + { + checkHtmlStringCoercion(children); + } - if (devResource) { - switch (devResource.__provenance) { - case 'rendered': - { - var differenceDescription = describeDifferencesForScripts( // Diff the props from the JSX element, not the derived resource props - props, devResource.__originalProps); + value = '' + children; + } - if (differenceDescription) { - error('React encountered a <script async={true} src="%s" .../> that has props that conflict' + ' with another hoistable script with the same `src`. When rendering hoistable scripts (async scripts without any loading handlers)' + ' the props from the first encountered instance will be used and props from later instances will be ignored.' + ' Update the props on both <script async={true} .../> instance so they agree.%s', src, differenceDescription); - } + if (typeof value === 'string' && value[0] === '\n') { + // text/html ignores the first character in these tags if it's a newline + // Prefer to break application/xml over text/html (for now) by adding + // a newline specifically to get eaten by the parser. (Alternately for + // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first + // \r is normalized out by HTMLTextAreaElement#value.) + // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre> + // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions> + // See: <http://www.w3.org/TR/html5/syntax.html#newlines> + // See: Parsing of "textarea" "listing" and "pre" elements + // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody> + target.push(leadingNewline); + } // ToString and push directly instead of recurse over children. + // We don't really support complex children in the value anyway. + // This also currently avoids a trailing comment node which breaks textarea. - break; - } - case 'preinit': - { - var _differenceDescription2 = describeDifferencesForScriptOverPreinit( // Diff the props from the JSX element, not the derived resource props - props, devResource.__propsEquivalent); + if (value !== null) { + { + checkAttributeStringCoercion(value, 'value'); + } - if (_differenceDescription2) { - error('React encountered a <script async={true} src="%s" .../> with props that conflict' + ' with the options provided to `ReactDOM.preinit("%s", { as: "script", ... })`. React will use the first props or preinitialization' + ' options encountered when rendering a hoistable script with a particular `src` and will ignore any newer props or' + ' options. The first instance of this script resource was created using the `ReactDOM.preinit()` function.' + ' Please note, `ReactDOM.preinit()` is modeled off of module import assertions capabilities and does not support' + ' arbitrary props. If you need to have props not included with the preinit options you will need to rely on rendering' + ' <script> tags only.%s', src, src, _differenceDescription2); - } + target.push(stringToChunk(encodeHTMLTextNode('' + value))); + } - break; - } - } - } - } + return null; +} - if (!_resource2) { - _resource2 = { - type: 'script', - chunks: [], - state: NoState, - props: null - }; - resources.scriptsMap.set(key, _resource2); +function pushBase(target, props, responseState, textEmbedded, noscriptTagInScope) { + if ( !noscriptTagInScope && resourcesFromElement('base', props)) { + if (textEmbedded) { + // This link follows text but we aren't writing a tag. while not as efficient as possible we need + // to be safe and assume text will follow by inserting a textSeparator + target.push(textSeparator); + } // We have converted this link exclusively to a resource and no longer + // need to emit it - { - markAsRenderedResourceDEV(_resource2, props); - } // Add to the script flushing queue + return null; + } - resources.scripts.add(_resource2); - var scriptProps = props; - var preloadResource = resources.preloadsMap.get(key); - - if (preloadResource) { - // If we already had a preload we don't want that resource to flush directly. - // We let the newly created resource govern flushing. - preloadResource.state |= Blocked; - scriptProps = assign({}, props); - adoptPreloadPropsForScriptProps(scriptProps, preloadResource.props); - } // encode the tag as Chunks - - - pushScriptImpl(_resource2.chunks, scriptProps); - } - } + return pushSelfClosing(target, props, 'base', responseState); +} +function pushMeta(target, props, responseState, textEmbedded, noscriptTagInScope) { + if ( !noscriptTagInScope && resourcesFromElement('meta', props)) { if (textEmbedded) { - // This script follows text but we aren't writing a tag. while not as efficient as possible we need + // This link follows text but we aren't writing a tag. while not as efficient as possible we need // to be safe and assume text will follow by inserting a textSeparator target.push(textSeparator); - } + } // We have converted this link exclusively to a resource and no longer + // need to emit it - return null; - } -} -function pushScriptImpl(target, props) { - target.push(startChunkForTag('script')); - var children = null; - var innerHTML = null; - - for (var propKey in props) { - if (hasOwnProperty.call(props, propKey)) { - var propValue = props[propKey]; - - if (propValue == null) { - continue; - } - - switch (propKey) { - case 'children': - children = propValue; - break; - - case 'dangerouslySetInnerHTML': - innerHTML = propValue; - break; - - default: - pushAttribute(target, propKey, propValue); - break; - } - } + return null; } - target.push(endOfStartTag); - - { - if (children != null && typeof children !== 'string') { - var descriptiveStatement = typeof children === 'number' ? 'a number for children' : Array.isArray(children) ? 'an array for children' : 'something unexpected for children'; + return pushSelfClosing(target, props, 'meta', responseState); +} - error('A script element was rendered with %s. If script element has children it must be a single string.' + ' Consider using dangerouslySetInnerHTML or passing a plain string as children.', descriptiveStatement); - } - } +function pushLink(target, props, responseState, textEmbedded, noscriptTagInScope) { + if ( !noscriptTagInScope && resourcesFromLink(props)) { + if (textEmbedded) { + // This link follows text but we aren't writing a tag. while not as efficient as possible we need + // to be safe and assume text will follow by inserting a textSeparator + target.push(textSeparator); + } // We have converted this link exclusively to a resource and no longer + // need to emit it - pushInnerHTML(target, innerHTML, children); - if (typeof children === 'string') { - target.push(stringToChunk(encodeHTMLTextNode(children))); + return null; } - target.push(endTag1, stringToChunk('script'), endTag2); - return null; + return pushLinkImpl(target, props, responseState); } -function pushStartGenericElement(target, props, tag) { - target.push(startChunkForTag(tag)); - var children = null; - var innerHTML = null; +function pushLinkImpl(target, props, responseState) { + var isStylesheet = props.rel === 'stylesheet'; + target.push(startChunkForTag('link')); for (var propKey in props) { if (hasOwnProperty.call(props, propKey)) { @@ -3641,37 +3838,32 @@ function pushStartGenericElement(target, props, tag) { switch (propKey) { case 'children': - children = propValue; - break; - case 'dangerouslySetInnerHTML': - innerHTML = propValue; - break; + throw new Error('link' + " is a self-closing tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.'); + + case 'precedence': + { + if ( isStylesheet) { + // precedence is a reversed property for stylesheets to opt-into resource semantcs + continue; + } // intentionally fall through + + } + // eslint-disable-next-line-no-fallthrough default: - pushAttribute(target, propKey, propValue); + pushAttribute(target, responseState, propKey, propValue); break; } } } - target.push(endOfStartTag); - pushInnerHTML(target, innerHTML, children); - - if (typeof children === 'string') { - // Special case children as a string to avoid the unnecessary comment. - // TODO: Remove this special case after the general optimization is in place. - target.push(stringToChunk(encodeHTMLTextNode(children))); - return null; - } - - return children; + target.push(endOfStartTagSelfClosing); + return null; } -function pushStartCustomElement(target, props, tag) { +function pushSelfClosing(target, props, tag, responseState) { target.push(startChunkForTag(tag)); - var children = null; - var innerHTML = null; for (var propKey in props) { if (hasOwnProperty.call(props, propKey)) { @@ -3683,43 +3875,23 @@ function pushStartCustomElement(target, props, tag) { switch (propKey) { case 'children': - children = propValue; - break; - case 'dangerouslySetInnerHTML': - innerHTML = propValue; - break; - - case 'style': - pushStyleAttribute(target, propValue); - break; - - case 'suppressContentEditableWarning': - case 'suppressHydrationWarning': - // Ignored. These are built-in to React on the client. - break; + throw new Error(tag + " is a self-closing tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.'); + // eslint-disable-next-line-no-fallthrough default: - if (isAttributeNameSafe(propKey) && typeof propValue !== 'function' && typeof propValue !== 'symbol') { - target.push(attributeSeparator, stringToChunk(propKey), attributeAssign, stringToChunk(escapeTextForBrowser(propValue)), attributeEnd); - } - + pushAttribute(target, responseState, propKey, propValue); break; } } } - target.push(endOfStartTag); - pushInnerHTML(target, innerHTML, children); - return children; + target.push(endOfStartTagSelfClosing); + return null; } -var leadingNewline = stringToPrecomputedChunk('\n'); - -function pushStartPreformattedElement(target, props, tag) { - target.push(startChunkForTag(tag)); - var children = null; - var innerHTML = null; +function pushStartMenuItem(target, props, responseState) { + target.push(startChunkForTag('menuitem')); for (var propKey in props) { if (hasOwnProperty.call(props, propKey)) { @@ -3731,1741 +3903,1361 @@ function pushStartPreformattedElement(target, props, tag) { switch (propKey) { case 'children': - children = propValue; - break; - case 'dangerouslySetInnerHTML': - innerHTML = propValue; - break; + throw new Error('menuitems cannot have `children` nor `dangerouslySetInnerHTML`.'); + // eslint-disable-next-line-no-fallthrough default: - pushAttribute(target, propKey, propValue); + pushAttribute(target, responseState, propKey, propValue); break; } } } - target.push(endOfStartTag); // text/html ignores the first character in these tags if it's a newline - // Prefer to break application/xml over text/html (for now) by adding - // a newline specifically to get eaten by the parser. (Alternately for - // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first - // \r is normalized out by HTMLTextAreaElement#value.) - // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre> - // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions> - // See: <http://www.w3.org/TR/html5/syntax.html#newlines> - // See: Parsing of "textarea" "listing" and "pre" elements - // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody> - // TODO: This doesn't deal with the case where the child is an array - // or component that returns a string. - - if (innerHTML != null) { - if (children != null) { - throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.'); - } - - if (typeof innerHTML !== 'object' || !('__html' in innerHTML)) { - throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' + 'for more information.'); - } - - var html = innerHTML.__html; - - if (html !== null && html !== undefined) { - if (typeof html === 'string' && html.length > 0 && html[0] === '\n') { - target.push(leadingNewline, stringToChunk(html)); - } else { - { - checkHtmlStringCoercion(html); - } - - target.push(stringToChunk('' + html)); - } - } - } - - if (typeof children === 'string' && children[0] === '\n') { - target.push(leadingNewline); - } - - return children; -} // We accept any tag to be rendered but since this gets injected into arbitrary -// HTML, we want to make sure that it's a safe tag. -// http://www.w3.org/TR/REC-xml/#NT-Name - - -var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset - -var validatedTagCache = new Map(); - -function startChunkForTag(tag) { - var tagStartChunk = validatedTagCache.get(tag); - - if (tagStartChunk === undefined) { - if (!VALID_TAG_REGEX.test(tag)) { - throw new Error("Invalid tag: " + tag); - } - - tagStartChunk = stringToPrecomputedChunk('<' + tag); - validatedTagCache.set(tag, tagStartChunk); - } - - return tagStartChunk; + target.push(endOfStartTag); + return null; } -var DOCTYPE = stringToPrecomputedChunk('<!DOCTYPE html>'); -function pushStartInstance(target, type, props, resources, responseState, formatContext, textEmbedded) { +function pushTitle(target, props, responseState, insertionMode, noscriptTagInScope) { { - validateProperties(type, props); - validateProperties$1(type, props); - validateProperties$2(type, props, null); - - if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) { - error('A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.'); - } + var children = props.children; + var childForValidation = Array.isArray(children) && children.length < 2 ? children[0] || null : children; - if (formatContext.insertionMode !== SVG_MODE && formatContext.insertionMode !== MATHML_MODE) { - if (type.indexOf('-') === -1 && typeof props.is !== 'string' && type.toLowerCase() !== type) { - error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type); - } + if (Array.isArray(children) && children.length > 1) { + error('A title element received an array with more than 1 element as children. ' + 'In browsers title Elements can only have Text Nodes as children. If ' + 'the children being rendered output more than a single text node in aggregate the browser ' + 'will display markup and comments as text in the title and hydration will likely fail and ' + 'fall back to client rendering'); + } else if (childForValidation != null && childForValidation.$$typeof != null) { + error('A title element received a React element for children. ' + 'In the browser title Elements can only have Text Nodes as children. If ' + 'the children being rendered output more than a single text node in aggregate the browser ' + 'will display markup and comments as text in the title and hydration will likely fail and ' + 'fall back to client rendering'); + } else if (childForValidation != null && typeof childForValidation !== 'string' && typeof childForValidation !== 'number') { + error('A title element received a value that was not a string or number for children. ' + 'In the browser title Elements can only have Text Nodes as children. If ' + 'the children being rendered output more than a single text node in aggregate the browser ' + 'will display markup and comments as text in the title and hydration will likely fail and ' + 'fall back to client rendering'); } } - switch (type) { - // Special tags - case 'select': - return pushStartSelect(target, props); - - case 'option': - return pushStartOption(target, props, formatContext); - - case 'textarea': - return pushStartTextArea(target, props); - - case 'input': - return pushInput(target, props); - - case 'menuitem': - return pushStartMenuItem(target, props); - - case 'title': - return pushTitle(target, props, responseState, formatContext.insertionMode, formatContext.noscriptTagInScope) ; - - case 'link': - return pushLink(target, props, responseState, resources, textEmbedded, formatContext.insertionMode, formatContext.noscriptTagInScope); - - case 'script': - return pushScript(target, props, resources, textEmbedded, formatContext.insertionMode, formatContext.noscriptTagInScope) ; - - case 'style': - return pushStyle(target, props, resources, textEmbedded, formatContext.insertionMode, formatContext.noscriptTagInScope); - - case 'meta': - return pushMeta(target, props, responseState, textEmbedded, formatContext.insertionMode, formatContext.noscriptTagInScope); - // Newline eating tags - - case 'listing': - case 'pre': - { - return pushStartPreformattedElement(target, props, type); - } - // Omitted close tags - - case 'base': - case 'area': - case 'br': - case 'col': - case 'embed': - case 'hr': - case 'img': - case 'keygen': - case 'param': - case 'source': - case 'track': - case 'wbr': - { - return pushSelfClosing(target, props, type); - } - // These are reserved SVG and MathML elements, that are never custom elements. - // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts - - case 'annotation-xml': - case 'color-profile': - case 'font-face': - case 'font-face-src': - case 'font-face-uri': - case 'font-face-format': - case 'font-face-name': - case 'missing-glyph': - { - return pushStartGenericElement(target, props, type); - } - // Preamble start tags - - case 'head': - return pushStartHead(target, props, responseState, formatContext.insertionMode); - - case 'html': - { - return pushStartHtml(target, props, responseState, formatContext.insertionMode); - } - - default: - { - if (type.indexOf('-') === -1 && typeof props.is !== 'string') { - // Generic element - return pushStartGenericElement(target, props, type); - } else { - // Custom element - return pushStartCustomElement(target, props, type); - } - } - } -} -var endTag1 = stringToPrecomputedChunk('</'); -var endTag2 = stringToPrecomputedChunk('>'); -function pushEndInstance(target, type, props, responseState, formatContext) { - switch (type) { - // When float is on we expect title and script tags to always be pushed in - // a unit and never return children. when we end up pushing the end tag we - // want to ensure there is no extra closing tag pushed - case 'title': - case 'style': - case 'script': - // Omitted close tags - // TODO: Instead of repeating this switch we could try to pass a flag from above. - // That would require returning a tuple. Which might be ok if it gets inlined. - // eslint-disable-next-line-no-fallthrough - - case 'area': - case 'base': - case 'br': - case 'col': - case 'embed': - case 'hr': - case 'img': - case 'input': - case 'keygen': - case 'link': - case 'meta': - case 'param': - case 'source': - case 'track': - case 'wbr': - { - // No close tag needed. - return; - } - // Postamble end tags - // When float is enabled we omit the end tags for body and html when - // they represent the Document.body and Document.documentElement Nodes. - // This is so we can withhold them until the postamble when we know - // we won't emit any more tags - - case 'body': - { - if ( formatContext.insertionMode <= HTML_HTML_MODE) { - responseState.hasBody = true; - return; - } - - break; - } - - case 'html': - if ( formatContext.insertionMode === ROOT_HTML_MODE) { - return; - } - - break; - } - - target.push(endTag1, stringToChunk(type), endTag2); -} -function writeCompletedRoot(destination, responseState) { - var bootstrapChunks = responseState.bootstrapChunks; - var i = 0; - - for (; i < bootstrapChunks.length - 1; i++) { - writeChunk(destination, bootstrapChunks[i]); - } - - if (i < bootstrapChunks.length) { - return writeChunkAndReturn(destination, bootstrapChunks[i]); - } - - return true; -} // Structural Nodes -// A placeholder is a node inside a hidden partial tree that can be filled in later, but before -// display. It's never visible to users. We use the template tag because it can be used in every -// type of parent. <script> tags also work in every other tag except <colgroup>. - -var placeholder1 = stringToPrecomputedChunk('<template id="'); -var placeholder2 = stringToPrecomputedChunk('"></template>'); -function writePlaceholder(destination, responseState, id) { - writeChunk(destination, placeholder1); - writeChunk(destination, responseState.placeholderPrefix); - var formattedID = stringToChunk(id.toString(16)); - writeChunk(destination, formattedID); - return writeChunkAndReturn(destination, placeholder2); -} // Suspense boundaries are encoded as comments. - -var startCompletedSuspenseBoundary = stringToPrecomputedChunk('<!--$-->'); -var startPendingSuspenseBoundary1 = stringToPrecomputedChunk('<!--$?--><template id="'); -var startPendingSuspenseBoundary2 = stringToPrecomputedChunk('"></template>'); -var startClientRenderedSuspenseBoundary = stringToPrecomputedChunk('<!--$!-->'); -var endSuspenseBoundary = stringToPrecomputedChunk('<!--/$-->'); -var clientRenderedSuspenseBoundaryError1 = stringToPrecomputedChunk('<template'); -var clientRenderedSuspenseBoundaryErrorAttrInterstitial = stringToPrecomputedChunk('"'); -var clientRenderedSuspenseBoundaryError1A = stringToPrecomputedChunk(' data-dgst="'); -var clientRenderedSuspenseBoundaryError1B = stringToPrecomputedChunk(' data-msg="'); -var clientRenderedSuspenseBoundaryError1C = stringToPrecomputedChunk(' data-stck="'); -var clientRenderedSuspenseBoundaryError2 = stringToPrecomputedChunk('></template>'); -function writeStartCompletedSuspenseBoundary(destination, responseState) { - return writeChunkAndReturn(destination, startCompletedSuspenseBoundary); -} -function writeStartPendingSuspenseBoundary(destination, responseState, id) { - writeChunk(destination, startPendingSuspenseBoundary1); - - if (id === null) { - throw new Error('An ID must have been assigned before we can complete the boundary.'); + if ( // title is valid in SVG so we avoid resour + insertionMode !== SVG_MODE && !noscriptTagInScope && resourcesFromElement('title', props)) { + // We have converted this link exclusively to a resource and no longer + // need to emit it + return null; } - writeChunk(destination, id); - return writeChunkAndReturn(destination, startPendingSuspenseBoundary2); + return pushTitleImpl(target, props, responseState); } -function writeStartClientRenderedSuspenseBoundary(destination, responseState, errorDigest, errorMesssage, errorComponentStack) { - var result; - result = writeChunkAndReturn(destination, startClientRenderedSuspenseBoundary); - writeChunk(destination, clientRenderedSuspenseBoundaryError1); - - if (errorDigest) { - writeChunk(destination, clientRenderedSuspenseBoundaryError1A); - writeChunk(destination, stringToChunk(escapeTextForBrowser(errorDigest))); - writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial); - } - { - if (errorMesssage) { - writeChunk(destination, clientRenderedSuspenseBoundaryError1B); - writeChunk(destination, stringToChunk(escapeTextForBrowser(errorMesssage))); - writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial); - } +function pushTitleImpl(target, props, responseState) { + target.push(startChunkForTag('title')); + var children = null; - if (errorComponentStack) { - writeChunk(destination, clientRenderedSuspenseBoundaryError1C); - writeChunk(destination, stringToChunk(escapeTextForBrowser(errorComponentStack))); - writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial); - } - } + for (var propKey in props) { + if (hasOwnProperty.call(props, propKey)) { + var propValue = props[propKey]; - result = writeChunkAndReturn(destination, clientRenderedSuspenseBoundaryError2); - return result; -} -function writeEndCompletedSuspenseBoundary(destination, responseState) { - return writeChunkAndReturn(destination, endSuspenseBoundary); -} -function writeEndPendingSuspenseBoundary(destination, responseState) { - return writeChunkAndReturn(destination, endSuspenseBoundary); -} -function writeEndClientRenderedSuspenseBoundary(destination, responseState) { - return writeChunkAndReturn(destination, endSuspenseBoundary); -} -var startSegmentHTML = stringToPrecomputedChunk('<div hidden id="'); -var startSegmentHTML2 = stringToPrecomputedChunk('">'); -var endSegmentHTML = stringToPrecomputedChunk('</div>'); -var startSegmentSVG = stringToPrecomputedChunk('<svg aria-hidden="true" style="display:none" id="'); -var startSegmentSVG2 = stringToPrecomputedChunk('">'); -var endSegmentSVG = stringToPrecomputedChunk('</svg>'); -var startSegmentMathML = stringToPrecomputedChunk('<math aria-hidden="true" style="display:none" id="'); -var startSegmentMathML2 = stringToPrecomputedChunk('">'); -var endSegmentMathML = stringToPrecomputedChunk('</math>'); -var startSegmentTable = stringToPrecomputedChunk('<table hidden id="'); -var startSegmentTable2 = stringToPrecomputedChunk('">'); -var endSegmentTable = stringToPrecomputedChunk('</table>'); -var startSegmentTableBody = stringToPrecomputedChunk('<table hidden><tbody id="'); -var startSegmentTableBody2 = stringToPrecomputedChunk('">'); -var endSegmentTableBody = stringToPrecomputedChunk('</tbody></table>'); -var startSegmentTableRow = stringToPrecomputedChunk('<table hidden><tr id="'); -var startSegmentTableRow2 = stringToPrecomputedChunk('">'); -var endSegmentTableRow = stringToPrecomputedChunk('</tr></table>'); -var startSegmentColGroup = stringToPrecomputedChunk('<table hidden><colgroup id="'); -var startSegmentColGroup2 = stringToPrecomputedChunk('">'); -var endSegmentColGroup = stringToPrecomputedChunk('</colgroup></table>'); -function writeStartSegment(destination, responseState, formatContext, id) { - switch (formatContext.insertionMode) { - case ROOT_HTML_MODE: - case HTML_HTML_MODE: - case HTML_MODE: - { - writeChunk(destination, startSegmentHTML); - writeChunk(destination, responseState.segmentPrefix); - writeChunk(destination, stringToChunk(id.toString(16))); - return writeChunkAndReturn(destination, startSegmentHTML2); + if (propValue == null) { + continue; } - case SVG_MODE: - { - writeChunk(destination, startSegmentSVG); - writeChunk(destination, responseState.segmentPrefix); - writeChunk(destination, stringToChunk(id.toString(16))); - return writeChunkAndReturn(destination, startSegmentSVG2); - } + switch (propKey) { + case 'children': + children = propValue; + break; - case MATHML_MODE: - { - writeChunk(destination, startSegmentMathML); - writeChunk(destination, responseState.segmentPrefix); - writeChunk(destination, stringToChunk(id.toString(16))); - return writeChunkAndReturn(destination, startSegmentMathML2); - } + case 'dangerouslySetInnerHTML': + throw new Error('`dangerouslySetInnerHTML` does not make sense on <title>.'); + // eslint-disable-next-line-no-fallthrough - case HTML_TABLE_MODE: - { - writeChunk(destination, startSegmentTable); - writeChunk(destination, responseState.segmentPrefix); - writeChunk(destination, stringToChunk(id.toString(16))); - return writeChunkAndReturn(destination, startSegmentTable2); + default: + pushAttribute(target, responseState, propKey, propValue); + break; } - // TODO: For the rest of these, there will be extra wrapper nodes that never - // get deleted from the document. We need to delete the table too as part - // of the injected scripts. They are invisible though so it's not too terrible - // and it's kind of an edge case to suspend in a table. Totally supported though. + } + } - case HTML_TABLE_BODY_MODE: - { - writeChunk(destination, startSegmentTableBody); - writeChunk(destination, responseState.segmentPrefix); - writeChunk(destination, stringToChunk(id.toString(16))); - return writeChunkAndReturn(destination, startSegmentTableBody2); - } + target.push(endOfStartTag); + var child = Array.isArray(children) ? children.length < 2 ? children[0] : null : children; - case HTML_TABLE_ROW_MODE: - { - writeChunk(destination, startSegmentTableRow); - writeChunk(destination, responseState.segmentPrefix); - writeChunk(destination, stringToChunk(id.toString(16))); - return writeChunkAndReturn(destination, startSegmentTableRow2); - } + if (typeof child !== 'function' && typeof child !== 'symbol' && child !== null && child !== undefined) { + // eslint-disable-next-line react-internal/safe-string-coercion + target.push(stringToChunk(escapeTextForBrowser('' + child))); + } - case HTML_COLGROUP_MODE: - { - writeChunk(destination, startSegmentColGroup); - writeChunk(destination, responseState.segmentPrefix); - writeChunk(destination, stringToChunk(id.toString(16))); - return writeChunkAndReturn(destination, startSegmentColGroup2); - } + target.push(endTag1, stringToChunk('title'), endTag2); + return null; +} - default: - { - throw new Error('Unknown insertion mode. This is a bug in React.'); - } +function pushStartHead(target, preamble, props, tag, responseState) { + return pushStartGenericElement( preamble , props, tag, responseState); +} + +function pushStartHtml(target, preamble, props, tag, responseState, formatContext) { + target = preamble ; + + if (formatContext.insertionMode === ROOT_HTML_MODE) { + // If we're rendering the html tag and we're at the root (i.e. not in foreignObject) + // then we also emit the DOCTYPE as part of the root content as a convenience for + // rendering the whole document. + target.push(DOCTYPE); } + + return pushStartGenericElement(target, props, tag, responseState); } -function writeEndSegment(destination, formatContext) { - switch (formatContext.insertionMode) { - case ROOT_HTML_MODE: - case HTML_HTML_MODE: - case HTML_MODE: - { - return writeChunkAndReturn(destination, endSegmentHTML); - } - case SVG_MODE: - { - return writeChunkAndReturn(destination, endSegmentSVG); - } +function pushScript(target, props, responseState, textEmbedded, noscriptTagInScope) { + if ( !noscriptTagInScope && resourcesFromScript(props)) { + if (textEmbedded) { + // This link follows text but we aren't writing a tag. while not as efficient as possible we need + // to be safe and assume text will follow by inserting a textSeparator + target.push(textSeparator); + } // We have converted this link exclusively to a resource and no longer + // need to emit it - case MATHML_MODE: - { - return writeChunkAndReturn(destination, endSegmentMathML); - } - case HTML_TABLE_MODE: - { - return writeChunkAndReturn(destination, endSegmentTable); - } + return null; + } - case HTML_TABLE_BODY_MODE: - { - return writeChunkAndReturn(destination, endSegmentTableBody); - } + return pushScriptImpl(target, props, responseState); +} - case HTML_TABLE_ROW_MODE: - { - return writeChunkAndReturn(destination, endSegmentTableRow); - } +function pushScriptImpl(target, props, responseState) { + target.push(startChunkForTag('script')); + var children = null; + var innerHTML = null; - case HTML_COLGROUP_MODE: - { - return writeChunkAndReturn(destination, endSegmentColGroup); + for (var propKey in props) { + if (hasOwnProperty.call(props, propKey)) { + var propValue = props[propKey]; + + if (propValue == null) { + continue; } - default: - { - throw new Error('Unknown insertion mode. This is a bug in React.'); + switch (propKey) { + case 'children': + children = propValue; + break; + + case 'dangerouslySetInnerHTML': + innerHTML = propValue; + break; + + default: + pushAttribute(target, responseState, propKey, propValue); + break; } + } } -} -var completeSegmentScript1Full = stringToPrecomputedChunk(completeSegment + ';$RS("'); -var completeSegmentScript1Partial = stringToPrecomputedChunk('$RS("'); -var completeSegmentScript2 = stringToPrecomputedChunk('","'); -var completeSegmentScriptEnd = stringToPrecomputedChunk('")</script>'); -var completeSegmentData1 = stringToPrecomputedChunk('<template data-rsi="" data-sid="'); -var completeSegmentData2 = stringToPrecomputedChunk('" data-pid="'); -function writeCompletedSegmentInstruction(destination, responseState, contentSegmentID) { + + target.push(endOfStartTag); { - writeChunk(destination, responseState.startInlineScript); + if (children != null && typeof children !== 'string') { + var descriptiveStatement = typeof children === 'number' ? 'a number for children' : Array.isArray(children) ? 'an array for children' : 'something unexpected for children'; - if ((responseState.instructions & SentCompleteSegmentFunction) === NothingSent) { - // The first time we write this, we'll need to include the full implementation. - responseState.instructions |= SentCompleteSegmentFunction; - writeChunk(destination, completeSegmentScript1Full); - } else { - // Future calls can just reuse the same function. - writeChunk(destination, completeSegmentScript1Partial); + error('A script element was rendered with %s. If script element has children it must be a single string.' + ' Consider using dangerouslySetInnerHTML or passing a plain string as children.', descriptiveStatement); } - } // Write function arguments, which are string literals + } + pushInnerHTML(target, innerHTML, children); - writeChunk(destination, responseState.segmentPrefix); - var formattedID = stringToChunk(contentSegmentID.toString(16)); - writeChunk(destination, formattedID); + if (typeof children === 'string') { + target.push(stringToChunk(encodeHTMLTextNode(children))); + } - { - writeChunk(destination, completeSegmentScript2); + target.push(endTag1, stringToChunk('script'), endTag2); + return null; +} + +function pushStartGenericElement(target, props, tag, responseState) { + target.push(startChunkForTag(tag)); + var children = null; + var innerHTML = null; + + for (var propKey in props) { + if (hasOwnProperty.call(props, propKey)) { + var propValue = props[propKey]; + + if (propValue == null) { + continue; + } + + switch (propKey) { + case 'children': + children = propValue; + break; + + case 'dangerouslySetInnerHTML': + innerHTML = propValue; + break; + + default: + pushAttribute(target, responseState, propKey, propValue); + break; + } + } } - writeChunk(destination, responseState.placeholderPrefix); - writeChunk(destination, formattedID); + target.push(endOfStartTag); + pushInnerHTML(target, innerHTML, children); - { - return writeChunkAndReturn(destination, completeSegmentScriptEnd); + if (typeof children === 'string') { + // Special case children as a string to avoid the unnecessary comment. + // TODO: Remove this special case after the general optimization is in place. + target.push(stringToChunk(encodeHTMLTextNode(children))); + return null; } + + return children; } -var completeBoundaryScript1Full = stringToPrecomputedChunk(completeBoundary + '$RC("'); -var completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC("'); -var completeBoundaryWithStylesScript1FullBoth = stringToPrecomputedChunk(completeBoundary + completeBoundaryWithStyles + '$RR("'); -var completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk(completeBoundaryWithStyles + '$RR("'); -var completeBoundaryWithStylesScript1Partial = stringToPrecomputedChunk('$RR("'); -var completeBoundaryScript2 = stringToPrecomputedChunk('","'); -var completeBoundaryScript3a = stringToPrecomputedChunk('",'); -var completeBoundaryScript3b = stringToPrecomputedChunk('"'); -var completeBoundaryScriptEnd = stringToPrecomputedChunk(')</script>'); -var completeBoundaryData1 = stringToPrecomputedChunk('<template data-rci="" data-bid="'); -var completeBoundaryWithStylesData1 = stringToPrecomputedChunk('<template data-rri="" data-bid="'); -var completeBoundaryData2 = stringToPrecomputedChunk('" data-sid="'); -var completeBoundaryData3a = stringToPrecomputedChunk('" data-sty="'); -function writeCompletedBoundaryInstruction(destination, responseState, boundaryID, contentSegmentID, boundaryResources) { - var hasStyleDependencies; - { - hasStyleDependencies = hasStyleResourceDependencies(boundaryResources); - } +function pushStartCustomElement(target, props, tag, responseState) { + target.push(startChunkForTag(tag)); + var children = null; + var innerHTML = null; - { - writeChunk(destination, responseState.startInlineScript); + for (var propKey in props) { + if (hasOwnProperty.call(props, propKey)) { + var propValue = props[propKey]; - if ( hasStyleDependencies) { - if ((responseState.instructions & SentCompleteBoundaryFunction) === NothingSent) { - responseState.instructions |= SentStyleInsertionFunction | SentCompleteBoundaryFunction; - writeChunk(destination, clonePrecomputedChunk(completeBoundaryWithStylesScript1FullBoth)); - } else if ((responseState.instructions & SentStyleInsertionFunction) === NothingSent) { - responseState.instructions |= SentStyleInsertionFunction; - writeChunk(destination, completeBoundaryWithStylesScript1FullPartial); - } else { - writeChunk(destination, completeBoundaryWithStylesScript1Partial); + if (propValue == null) { + continue; } - } else { - if ((responseState.instructions & SentCompleteBoundaryFunction) === NothingSent) { - responseState.instructions |= SentCompleteBoundaryFunction; - writeChunk(destination, completeBoundaryScript1Full); - } else { - writeChunk(destination, completeBoundaryScript1Partial); + + switch (propKey) { + case 'children': + children = propValue; + break; + + case 'dangerouslySetInnerHTML': + innerHTML = propValue; + break; + + case 'style': + pushStyle(target, responseState, propValue); + break; + + case 'suppressContentEditableWarning': + case 'suppressHydrationWarning': + // Ignored. These are built-in to React on the client. + break; + + default: + if (isAttributeNameSafe(propKey) && typeof propValue !== 'function' && typeof propValue !== 'symbol') { + target.push(attributeSeparator, stringToChunk(propKey), attributeAssign, stringToChunk(escapeTextForBrowser(propValue)), attributeEnd); + } + + break; } } } - if (boundaryID === null) { - throw new Error('An ID must have been assigned before we can complete the boundary.'); - } // Write function arguments, which are string and array literals + target.push(endOfStartTag); + pushInnerHTML(target, innerHTML, children); + return children; +} +var leadingNewline = stringToPrecomputedChunk('\n'); - var formattedContentID = stringToChunk(contentSegmentID.toString(16)); - writeChunk(destination, boundaryID); +function pushStartPreformattedElement(target, props, tag, responseState) { + target.push(startChunkForTag(tag)); + var children = null; + var innerHTML = null; - { - writeChunk(destination, completeBoundaryScript2); - } + for (var propKey in props) { + if (hasOwnProperty.call(props, propKey)) { + var propValue = props[propKey]; - writeChunk(destination, responseState.segmentPrefix); - writeChunk(destination, formattedContentID); + if (propValue == null) { + continue; + } - if ( hasStyleDependencies) { - // Script and data writers must format this differently: - // - script writer emits an array literal, whose string elements are - // escaped for javascript e.g. ["A", "B"] - // - data writer emits a string literal, which is escaped as html - // e.g. ["A", "B"] - { - writeChunk(destination, completeBoundaryScript3a); // boundaryResources encodes an array literal + switch (propKey) { + case 'children': + children = propValue; + break; - writeStyleResourceDependenciesInJS(destination, boundaryResources); - } - } else { - { - writeChunk(destination, completeBoundaryScript3b); - } - } + case 'dangerouslySetInnerHTML': + innerHTML = propValue; + break; - { - return writeChunkAndReturn(destination, completeBoundaryScriptEnd); + default: + pushAttribute(target, responseState, propKey, propValue); + break; + } + } } -} -var clientRenderScript1Full = stringToPrecomputedChunk(clientRenderBoundary + ';$RX("'); -var clientRenderScript1Partial = stringToPrecomputedChunk('$RX("'); -var clientRenderScript1A = stringToPrecomputedChunk('"'); -var clientRenderErrorScriptArgInterstitial = stringToPrecomputedChunk(','); -var clientRenderScriptEnd = stringToPrecomputedChunk(')</script>'); -var clientRenderData1 = stringToPrecomputedChunk('<template data-rxi="" data-bid="'); -var clientRenderData2 = stringToPrecomputedChunk('" data-dgst="'); -var clientRenderData3 = stringToPrecomputedChunk('" data-msg="'); -var clientRenderData4 = stringToPrecomputedChunk('" data-stck="'); -function writeClientRenderBoundaryInstruction(destination, responseState, boundaryID, errorDigest, errorMessage, errorComponentStack) { - { - writeChunk(destination, responseState.startInlineScript); + target.push(endOfStartTag); // text/html ignores the first character in these tags if it's a newline + // Prefer to break application/xml over text/html (for now) by adding + // a newline specifically to get eaten by the parser. (Alternately for + // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first + // \r is normalized out by HTMLTextAreaElement#value.) + // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre> + // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions> + // See: <http://www.w3.org/TR/html5/syntax.html#newlines> + // See: Parsing of "textarea" "listing" and "pre" elements + // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody> + // TODO: This doesn't deal with the case where the child is an array + // or component that returns a string. - if ((responseState.instructions & SentClientRenderFunction) === NothingSent) { - // The first time we write this, we'll need to include the full implementation. - responseState.instructions |= SentClientRenderFunction; - writeChunk(destination, clientRenderScript1Full); - } else { - // Future calls can just reuse the same function. - writeChunk(destination, clientRenderScript1Partial); + if (innerHTML != null) { + if (children != null) { + throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.'); } - } - if (boundaryID === null) { - throw new Error('An ID must have been assigned before we can complete the boundary.'); - } + if (typeof innerHTML !== 'object' || !('__html' in innerHTML)) { + throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' + 'for more information.'); + } - writeChunk(destination, boundaryID); + var html = innerHTML.__html; - { - // " needs to be inserted for scripts, since ArgInterstitual does not contain - // leading or trailing quotes - writeChunk(destination, clientRenderScript1A); - } + if (html !== null && html !== undefined) { + if (typeof html === 'string' && html.length > 0 && html[0] === '\n') { + target.push(leadingNewline, stringToChunk(html)); + } else { + { + checkHtmlStringCoercion(html); + } - if (errorDigest || errorMessage || errorComponentStack) { - { - // ,"JSONString" - writeChunk(destination, clientRenderErrorScriptArgInterstitial); - writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorDigest || ''))); + target.push(stringToChunk('' + html)); + } } } - if (errorMessage || errorComponentStack) { - { - // ,"JSONString" - writeChunk(destination, clientRenderErrorScriptArgInterstitial); - writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorMessage || ''))); - } + if (typeof children === 'string' && children[0] === '\n') { + target.push(leadingNewline); } - if (errorComponentStack) { - // ,"JSONString" - { - writeChunk(destination, clientRenderErrorScriptArgInterstitial); - writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorComponentStack))); - } - } + return children; +} // We accept any tag to be rendered but since this gets injected into arbitrary +// HTML, we want to make sure that it's a safe tag. +// http://www.w3.org/TR/REC-xml/#NT-Name - { - // ></script> - return writeChunkAndReturn(destination, clientRenderScriptEnd); - } -} -var regexForJSStringsInInstructionScripts = /[<\u2028\u2029]/g; -function escapeJSStringsForInstructionScripts(input) { - var escaped = JSON.stringify(input); - return escaped.replace(regexForJSStringsInInstructionScripts, function (match) { - switch (match) { - // santizing breaking out of strings and script tags - case '<': - return "\\u003c"; +var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset - case "\u2028": - return "\\u2028"; +var validatedTagCache = new Map(); - case "\u2029": - return "\\u2029"; +function startChunkForTag(tag) { + var tagStartChunk = validatedTagCache.get(tag); - default: - { - // eslint-disable-next-line react-internal/prod-error-codes - throw new Error('escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React'); - } + if (tagStartChunk === undefined) { + if (!VALID_TAG_REGEX.test(tag)) { + throw new Error("Invalid tag: " + tag); } - }); -} - -var regexForJSStringsInScripts = /[&><\u2028\u2029]/g; - -function escapeJSObjectForInstructionScripts(input) { - var escaped = JSON.stringify(input); - return escaped.replace(regexForJSStringsInScripts, function (match) { - switch (match) { - // santizing breaking out of strings and script tags - case '&': - return "\\u0026"; - case '>': - return "\\u003e"; + tagStartChunk = stringToPrecomputedChunk('<' + tag); + validatedTagCache.set(tag, tagStartChunk); + } - case '<': - return "\\u003c"; + return tagStartChunk; +} - case "\u2028": - return "\\u2028"; +var DOCTYPE = stringToPrecomputedChunk('<!DOCTYPE html>'); +function pushStartInstance(target, preamble, type, props, responseState, formatContext, textEmbedded) { + { + validateProperties(type, props); + validateProperties$1(type, props); + validateProperties$2(type, props, null); - case "\u2029": - return "\\u2029"; + if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) { + error('A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.'); + } - default: - { - // eslint-disable-next-line react-internal/prod-error-codes - throw new Error('escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React'); - } + if (formatContext.insertionMode !== SVG_MODE && formatContext.insertionMode !== MATHML_MODE) { + if (type.indexOf('-') === -1 && typeof props.is !== 'string' && type.toLowerCase() !== type) { + error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type); + } } - }); -} + } -var styleTagTemplateOpen = stringToPrecomputedChunk('<template data-precedence="">'); -var styleTagTemplateClose = stringToPrecomputedChunk('</template>'); // Tracks whether we wrote any late style tags. We use this to determine -// whether we need to emit a closing template tag after flushing late style tags + switch (type) { + // Special tags + case 'select': + return pushStartSelect(target, props, responseState); -var didWrite = false; + case 'option': + return pushStartOption(target, props, responseState, formatContext); -function flushStyleTagsLateForBoundary(resource) { - if (resource.type === 'style' && (resource.state & Flushed) === NoState) { - if (didWrite === false) { - // we are going to write so we need to emit the open tag - didWrite = true; - writeChunk(this, styleTagTemplateOpen); - } // This <style> tag can be flushed now + case 'textarea': + return pushStartTextArea(target, props, responseState); + case 'input': + return pushInput(target, props, responseState); - var chunks = resource.chunks; + case 'menuitem': + return pushStartMenuItem(target, props, responseState); - for (var i = 0; i < chunks.length; i++) { - writeChunk(this, chunks[i]); - } + case 'title': + return pushTitle(target, props, responseState, formatContext.insertionMode, formatContext.noscriptTagInScope) ; - resource.state |= FlushedLate; - } -} + case 'link': + return pushLink(target, props, responseState, textEmbedded, formatContext.noscriptTagInScope); -function writeResourcesForBoundary(destination, boundaryResources) { - didWrite = false; - boundaryResources.forEach(flushStyleTagsLateForBoundary, destination); + case 'script': + return pushScript(target, props, responseState, textEmbedded, formatContext.noscriptTagInScope) ; - if (didWrite) { - return writeChunkAndReturn(destination, styleTagTemplateClose); - } else { - return true; - } -} -var precedencePlaceholderStart = stringToPrecomputedChunk('<style data-precedence="'); -var precedencePlaceholderEnd = stringToPrecomputedChunk('"></style>'); + case 'meta': + return pushMeta(target, props, responseState, textEmbedded, formatContext.noscriptTagInScope); -function flushResourceInPreamble(resource) { - if ((resource.state & (Flushed | Blocked)) === NoState) { - var chunks = resource.chunks; + case 'base': + return pushBase(target, props, responseState, textEmbedded, formatContext.noscriptTagInScope); + // Newline eating tags - for (var i = 0; i < chunks.length; i++) { - writeChunk(this, chunks[i]); - } + case 'listing': + case 'pre': + { + return pushStartPreformattedElement(target, props, type, responseState); + } + // Omitted close tags + + case 'area': + case 'br': + case 'col': + case 'embed': + case 'hr': + case 'img': + case 'keygen': + case 'param': + case 'source': + case 'track': + case 'wbr': + { + return pushSelfClosing(target, props, type, responseState); + } + // These are reserved SVG and MathML elements, that are never custom elements. + // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts - resource.state |= FlushedInPreamble; - } -} + case 'annotation-xml': + case 'color-profile': + case 'font-face': + case 'font-face-src': + case 'font-face-uri': + case 'font-face-format': + case 'font-face-name': + case 'missing-glyph': + { + return pushStartGenericElement(target, props, type, responseState); + } + // Preamble start tags -function flushResourceLate(resource) { - if ((resource.state & Flushed) === NoState) { - var chunks = resource.chunks; + case 'head': + return pushStartHead(target, preamble, props, type, responseState); - for (var i = 0; i < chunks.length; i++) { - writeChunk(this, chunks[i]); - } + case 'html': + { + return pushStartHtml(target, preamble, props, type, responseState, formatContext); + } - resource.state |= FlushedLate; + default: + { + if (type.indexOf('-') === -1 && typeof props.is !== 'string') { + // Generic element + return pushStartGenericElement(target, props, type, responseState); + } else { + // Custom element + return pushStartCustomElement(target, props, type, responseState); + } + } } } +var endTag1 = stringToPrecomputedChunk('</'); +var endTag2 = stringToPrecomputedChunk('>'); +function pushEndInstance(target, postamble, type, props) { + switch (type) { + // When float is on we expect title and script tags to always be pushed in + // a unit and never return children. when we end up pushing the end tag we + // want to ensure there is no extra closing tag pushed + case 'title': + case 'script': + // Omitted close tags + // TODO: Instead of repeating this switch we could try to pass a flag from above. + // That would require returning a tuple. Which might be ok if it gets inlined. + // eslint-disable-next-line-no-fallthrough -var didFlush = false; - -function flushUnblockedStyle(resource, key, set) { - var chunks = resource.chunks; - - if (resource.state & Flushed) { - // In theory this should never happen because we clear from the - // Set on flush but to ensure correct semantics we don't emit - // anything if we are in this state. - set.delete(resource); - } else if (resource.state & Blocked) ; else { - didFlush = true; // We can emit this style or stylesheet as is. - - if (resource.type === 'stylesheet') { - // We still need to encode stylesheet chunks - // because unlike most Hoistables and Resources we do not eagerly encode - // them during render. This is because if we flush late we have to send a - // different encoding and we don't want to encode multiple times - pushLinkImpl(chunks, resource.props); - } + case 'area': + case 'base': + case 'br': + case 'col': + case 'embed': + case 'hr': + case 'img': + case 'input': + case 'keygen': + case 'link': + case 'meta': + case 'param': + case 'source': + case 'track': + case 'wbr': + { + // No close tag needed. + return; + } + // Postamble end tags - for (var i = 0; i < chunks.length; i++) { - writeChunk(this, chunks[i]); - } + case 'body': + { + { + postamble.unshift(endTag1, stringToChunk(type), endTag2); + return; + } + } - resource.state |= FlushedInPreamble; - set.delete(resource); + case 'html': + { + postamble.push(endTag1, stringToChunk(type), endTag2); + return; + } } -} -function flushUnblockedStyles(set, precedence) { - didFlush = false; - set.forEach(flushUnblockedStyle, this); - - if (!didFlush) { - // if we did not flush anything for this precedence slot we emit - // an empty <style data-precedence="..." /> tag to ensure the - // precedence remains in the correct order - writeChunk(this, precedencePlaceholderStart); - writeChunk(this, stringToChunk(escapeTextForBrowser(precedence))); - writeChunk(this, precedencePlaceholderEnd); - } + target.push(endTag1, stringToChunk(type), endTag2); } +function writeCompletedRoot(destination, responseState) { + var bootstrapChunks = responseState.bootstrapChunks; + var i = 0; -function preloadBlockedStyle(resource) { - // The only Resources that should remain are Blocked resources - { - if ((resource.state & Blocked) === NoState) { - error('React encountered a Stylesheet Resource that was not Blocked when it was expected to be. This is a bug in React.'); - } else if (resource.state & PreloadFlushed) { - error('React encountered a Stylesheet Resource that already flushed a Preload when it was not expected to. This is a bug in React.'); - } + for (; i < bootstrapChunks.length - 1; i++) { + writeChunk(destination, bootstrapChunks[i]); } - if (resource.type === 'style') { - // <style> tags do not need to be preloaded - return; + if (i < bootstrapChunks.length) { + return writeChunkAndReturn(destination, bootstrapChunks[i]); } - var chunks = resource.chunks; - var preloadProps = preloadAsStylePropsFromProps(resource.props.href, resource.props); - pushLinkImpl(chunks, preloadProps); - - for (var i = 0; i < chunks.length; i++) { - writeChunk(this, chunks[i]); - } + return true; +} // Structural Nodes +// A placeholder is a node inside a hidden partial tree that can be filled in later, but before +// display. It's never visible to users. We use the template tag because it can be used in every +// type of parent. <script> tags also work in every other tag except <colgroup>. - resource.state |= PreloadFlushed; - chunks.length = 0; -} +var placeholder1 = stringToPrecomputedChunk('<template id="'); +var placeholder2 = stringToPrecomputedChunk('"></template>'); +function writePlaceholder(destination, responseState, id) { + writeChunk(destination, placeholder1); + writeChunk(destination, responseState.placeholderPrefix); + var formattedID = stringToChunk(id.toString(16)); + writeChunk(destination, formattedID); + return writeChunkAndReturn(destination, placeholder2); +} // Suspense boundaries are encoded as comments. -function preloadBlockedStyles(set, precedence) { - set.forEach(preloadBlockedStyle, this); - set.clear(); +var startCompletedSuspenseBoundary = stringToPrecomputedChunk('<!--$-->'); +var startPendingSuspenseBoundary1 = stringToPrecomputedChunk('<!--$?--><template id="'); +var startPendingSuspenseBoundary2 = stringToPrecomputedChunk('"></template>'); +var startClientRenderedSuspenseBoundary = stringToPrecomputedChunk('<!--$!-->'); +var endSuspenseBoundary = stringToPrecomputedChunk('<!--/$-->'); +var clientRenderedSuspenseBoundaryError1 = stringToPrecomputedChunk('<template'); +var clientRenderedSuspenseBoundaryErrorAttrInterstitial = stringToPrecomputedChunk('"'); +var clientRenderedSuspenseBoundaryError1A = stringToPrecomputedChunk(' data-dgst="'); +var clientRenderedSuspenseBoundaryError1B = stringToPrecomputedChunk(' data-msg="'); +var clientRenderedSuspenseBoundaryError1C = stringToPrecomputedChunk(' data-stck="'); +var clientRenderedSuspenseBoundaryError2 = stringToPrecomputedChunk('></template>'); +function writeStartCompletedSuspenseBoundary(destination, responseState) { + return writeChunkAndReturn(destination, startCompletedSuspenseBoundary); } +function writeStartPendingSuspenseBoundary(destination, responseState, id) { + writeChunk(destination, startPendingSuspenseBoundary1); -function preloadLateStyle(resource) { - { - if (resource.state & PreloadFlushed) { - error('React encountered a Stylesheet Resource that already flushed a Preload when it was not expected to. This is a bug in React.'); - } - } - - if (resource.type === 'style') { - // <style> tags do not need to be preloaded - return; - } - - var chunks = resource.chunks; - var preloadProps = preloadAsStylePropsFromProps(resource.props.href, resource.props); - pushLinkImpl(chunks, preloadProps); - - for (var i = 0; i < chunks.length; i++) { - writeChunk(this, chunks[i]); + if (id === null) { + throw new Error('An ID must have been assigned before we can complete the boundary.'); } - resource.state |= PreloadFlushed; - chunks.length = 0; + writeChunk(destination, id); + return writeChunkAndReturn(destination, startPendingSuspenseBoundary2); } +function writeStartClientRenderedSuspenseBoundary(destination, responseState, errorDigest, errorMesssage, errorComponentStack) { + var result; + result = writeChunkAndReturn(destination, startClientRenderedSuspenseBoundary); + writeChunk(destination, clientRenderedSuspenseBoundaryError1); -function preloadLateStyles(set, precedence) { - set.forEach(preloadLateStyle, this); - set.clear(); -} // We don't bother reporting backpressure at the moment because we expect to -// flush the entire preamble in a single pass. This probably should be modified -// in the future to be backpressure sensitive but that requires a larger refactor -// of the flushing code in Fizz. - - -function writePreamble(destination, resources, responseState, willFlushAllSegments) { - - var htmlChunks = responseState.htmlChunks; - var headChunks = responseState.headChunks; - var i = 0; // Emit open tags before Hoistables and Resources + if (errorDigest) { + writeChunk(destination, clientRenderedSuspenseBoundaryError1A); + writeChunk(destination, stringToChunk(escapeTextForBrowser(errorDigest))); + writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial); + } - if (htmlChunks) { - // We have an <html> to emit as part of the preamble - for (i = 0; i < htmlChunks.length; i++) { - writeChunk(destination, htmlChunks[i]); + { + if (errorMesssage) { + writeChunk(destination, clientRenderedSuspenseBoundaryError1B); + writeChunk(destination, stringToChunk(escapeTextForBrowser(errorMesssage))); + writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial); } - if (headChunks) { - for (i = 0; i < headChunks.length; i++) { - writeChunk(destination, headChunks[i]); - } - } else { - // We did not render a head but we emitted an <html> so we emit one now - writeChunk(destination, startChunkForTag('head')); - writeChunk(destination, endOfStartTag); - } - } else if (headChunks) { - // We do not have an <html> but we do have a <head> - for (i = 0; i < headChunks.length; i++) { - writeChunk(destination, headChunks[i]); + if (errorComponentStack) { + writeChunk(destination, clientRenderedSuspenseBoundaryError1C); + writeChunk(destination, stringToChunk(escapeTextForBrowser(errorComponentStack))); + writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial); } - } // Emit high priority Hoistables - - - var charsetChunks = responseState.charsetChunks; - - for (i = 0; i < charsetChunks.length; i++) { - writeChunk(destination, charsetChunks[i]); } - charsetChunks.length = 0; - var preconnectChunks = responseState.preconnectChunks; - - for (i = 0; i < preconnectChunks.length; i++) { - writeChunk(destination, preconnectChunks[i]); - } - - preconnectChunks.length = 0; - resources.fontPreloads.forEach(flushResourceInPreamble, destination); - resources.fontPreloads.clear(); // Flush unblocked stylesheets by precedence - - resources.precedences.forEach(flushUnblockedStyles, destination); // Flush preloads for Blocked stylesheets - - resources.precedences.forEach(preloadBlockedStyles, destination); - resources.usedStylesheets.forEach(function (resource) { - var key = getResourceKey(resource.props.as, resource.props.href); - - if (resources.stylesMap.has(key)) ; else { - var chunks = resource.chunks; - - for (i = 0; i < chunks.length; i++) { - writeChunk(destination, chunks[i]); + result = writeChunkAndReturn(destination, clientRenderedSuspenseBoundaryError2); + return result; +} +function writeEndCompletedSuspenseBoundary(destination, responseState) { + return writeChunkAndReturn(destination, endSuspenseBoundary); +} +function writeEndPendingSuspenseBoundary(destination, responseState) { + return writeChunkAndReturn(destination, endSuspenseBoundary); +} +function writeEndClientRenderedSuspenseBoundary(destination, responseState) { + return writeChunkAndReturn(destination, endSuspenseBoundary); +} +var startSegmentHTML = stringToPrecomputedChunk('<div hidden id="'); +var startSegmentHTML2 = stringToPrecomputedChunk('">'); +var endSegmentHTML = stringToPrecomputedChunk('</div>'); +var startSegmentSVG = stringToPrecomputedChunk('<svg aria-hidden="true" style="display:none" id="'); +var startSegmentSVG2 = stringToPrecomputedChunk('">'); +var endSegmentSVG = stringToPrecomputedChunk('</svg>'); +var startSegmentMathML = stringToPrecomputedChunk('<math aria-hidden="true" style="display:none" id="'); +var startSegmentMathML2 = stringToPrecomputedChunk('">'); +var endSegmentMathML = stringToPrecomputedChunk('</math>'); +var startSegmentTable = stringToPrecomputedChunk('<table hidden id="'); +var startSegmentTable2 = stringToPrecomputedChunk('">'); +var endSegmentTable = stringToPrecomputedChunk('</table>'); +var startSegmentTableBody = stringToPrecomputedChunk('<table hidden><tbody id="'); +var startSegmentTableBody2 = stringToPrecomputedChunk('">'); +var endSegmentTableBody = stringToPrecomputedChunk('</tbody></table>'); +var startSegmentTableRow = stringToPrecomputedChunk('<table hidden><tr id="'); +var startSegmentTableRow2 = stringToPrecomputedChunk('">'); +var endSegmentTableRow = stringToPrecomputedChunk('</tr></table>'); +var startSegmentColGroup = stringToPrecomputedChunk('<table hidden><colgroup id="'); +var startSegmentColGroup2 = stringToPrecomputedChunk('">'); +var endSegmentColGroup = stringToPrecomputedChunk('</colgroup></table>'); +function writeStartSegment(destination, responseState, formatContext, id) { + switch (formatContext.insertionMode) { + case ROOT_HTML_MODE: + case HTML_MODE: + { + writeChunk(destination, startSegmentHTML); + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, stringToChunk(id.toString(16))); + return writeChunkAndReturn(destination, startSegmentHTML2); } - } - }); - resources.usedStylesheets.clear(); - resources.scripts.forEach(flushResourceInPreamble, destination); - resources.scripts.clear(); - resources.usedScripts.forEach(flushResourceInPreamble, destination); - resources.usedScripts.clear(); - resources.explicitStylesheetPreloads.forEach(flushResourceInPreamble, destination); - resources.explicitStylesheetPreloads.clear(); - resources.explicitScriptPreloads.forEach(flushResourceInPreamble, destination); - resources.explicitScriptPreloads.clear(); - resources.explicitOtherPreloads.forEach(flushResourceInPreamble, destination); - resources.explicitOtherPreloads.clear(); // Write embedding preloadChunks - - var preloadChunks = responseState.preloadChunks; - for (i = 0; i < preloadChunks.length; i++) { - writeChunk(destination, preloadChunks[i]); - } - - preloadChunks.length = 0; // Write embedding hoistableChunks - - var hoistableChunks = responseState.hoistableChunks; + case SVG_MODE: + { + writeChunk(destination, startSegmentSVG); + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, stringToChunk(id.toString(16))); + return writeChunkAndReturn(destination, startSegmentSVG2); + } - for (i = 0; i < hoistableChunks.length; i++) { - writeChunk(destination, hoistableChunks[i]); - } + case MATHML_MODE: + { + writeChunk(destination, startSegmentMathML); + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, stringToChunk(id.toString(16))); + return writeChunkAndReturn(destination, startSegmentMathML2); + } - hoistableChunks.length = 0; // Flush closing head if necessary + case HTML_TABLE_MODE: + { + writeChunk(destination, startSegmentTable); + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, stringToChunk(id.toString(16))); + return writeChunkAndReturn(destination, startSegmentTable2); + } + // TODO: For the rest of these, there will be extra wrapper nodes that never + // get deleted from the document. We need to delete the table too as part + // of the injected scripts. They are invisible though so it's not too terrible + // and it's kind of an edge case to suspend in a table. Totally supported though. - if (htmlChunks && headChunks === null) { - // We have an <html> rendered but no <head> rendered. We however inserted - // a <head> up above so we need to emit the </head> now. This is safe because - // if the main content contained the </head> it would also have provided a - // <head>. This means that all the content inside <html> is either <body> or - // invalid HTML - writeChunk(destination, endTag1); - writeChunk(destination, stringToChunk('head')); - writeChunk(destination, endTag2); - } -} // We don't bother reporting backpressure at the moment because we expect to -// flush the entire preamble in a single pass. This probably should be modified -// in the future to be backpressure sensitive but that requires a larger refactor -// of the flushing code in Fizz. + case HTML_TABLE_BODY_MODE: + { + writeChunk(destination, startSegmentTableBody); + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, stringToChunk(id.toString(16))); + return writeChunkAndReturn(destination, startSegmentTableBody2); + } -function writeHoistables(destination, resources, responseState) { - var i = 0; // Emit high priority Hoistables - // We omit charsetChunks because we have already sent the shell and if it wasn't - // already sent it is too late now. + case HTML_TABLE_ROW_MODE: + { + writeChunk(destination, startSegmentTableRow); + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, stringToChunk(id.toString(16))); + return writeChunkAndReturn(destination, startSegmentTableRow2); + } - var preconnectChunks = responseState.preconnectChunks; + case HTML_COLGROUP_MODE: + { + writeChunk(destination, startSegmentColGroup); + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, stringToChunk(id.toString(16))); + return writeChunkAndReturn(destination, startSegmentColGroup2); + } - for (i = 0; i < preconnectChunks.length; i++) { - writeChunk(destination, preconnectChunks[i]); + default: + { + throw new Error('Unknown insertion mode. This is a bug in React.'); + } } - - preconnectChunks.length = 0; - resources.fontPreloads.forEach(flushResourceLate, destination); - resources.fontPreloads.clear(); // Preload any stylesheets. these will emit in a render instruction that follows this - // but we want to kick off preloading as soon as possible - - resources.precedences.forEach(preloadLateStyles, destination); - resources.usedStylesheets.forEach(function (resource) { - var key = getResourceKey(resource.props.as, resource.props.href); - - if (resources.stylesMap.has(key)) ; else { - var chunks = resource.chunks; - - for (i = 0; i < chunks.length; i++) { - writeChunk(destination, chunks[i]); +} +function writeEndSegment(destination, formatContext) { + switch (formatContext.insertionMode) { + case ROOT_HTML_MODE: + case HTML_MODE: + { + return writeChunkAndReturn(destination, endSegmentHTML); } - } - }); - resources.usedStylesheets.clear(); - resources.scripts.forEach(flushResourceLate, destination); - resources.scripts.clear(); - resources.usedScripts.forEach(flushResourceLate, destination); - resources.usedScripts.clear(); - resources.explicitStylesheetPreloads.forEach(flushResourceLate, destination); - resources.explicitStylesheetPreloads.clear(); - resources.explicitScriptPreloads.forEach(flushResourceLate, destination); - resources.explicitScriptPreloads.clear(); - resources.explicitOtherPreloads.forEach(flushResourceLate, destination); - resources.explicitOtherPreloads.clear(); // Write embedding preloadChunks - var preloadChunks = responseState.preloadChunks; + case SVG_MODE: + { + return writeChunkAndReturn(destination, endSegmentSVG); + } - for (i = 0; i < preloadChunks.length; i++) { - writeChunk(destination, preloadChunks[i]); - } + case MATHML_MODE: + { + return writeChunkAndReturn(destination, endSegmentMathML); + } - preloadChunks.length = 0; // Write embedding hoistableChunks + case HTML_TABLE_MODE: + { + return writeChunkAndReturn(destination, endSegmentTable); + } - var hoistableChunks = responseState.hoistableChunks; + case HTML_TABLE_BODY_MODE: + { + return writeChunkAndReturn(destination, endSegmentTableBody); + } - for (i = 0; i < hoistableChunks.length; i++) { - writeChunk(destination, hoistableChunks[i]); - } + case HTML_TABLE_ROW_MODE: + { + return writeChunkAndReturn(destination, endSegmentTableRow); + } - hoistableChunks.length = 0; -} -function writePostamble(destination, responseState) { - if (responseState.hasBody) { - writeChunk(destination, endTag1); - writeChunk(destination, stringToChunk('body')); - writeChunk(destination, endTag2); - } + case HTML_COLGROUP_MODE: + { + return writeChunkAndReturn(destination, endSegmentColGroup); + } - if (responseState.htmlChunks) { - writeChunk(destination, endTag1); - writeChunk(destination, stringToChunk('html')); - writeChunk(destination, endTag2); + default: + { + throw new Error('Unknown insertion mode. This is a bug in React.'); + } } } +var completeSegmentScript1Full = stringToPrecomputedChunk(completeSegment + ';$RS("'); +var completeSegmentScript1Partial = stringToPrecomputedChunk('$RS("'); +var completeSegmentScript2 = stringToPrecomputedChunk('","'); +var completeSegmentScriptEnd = stringToPrecomputedChunk('")</script>'); +var completeSegmentData1 = stringToPrecomputedChunk('<template data-rsi="" data-sid="'); +var completeSegmentData2 = stringToPrecomputedChunk('" data-pid="'); +function writeCompletedSegmentInstruction(destination, responseState, contentSegmentID) { -function hasStyleResourceDependencies(boundaryResources) { - var iter = boundaryResources.values(); // At the moment boundaries only accumulate style resources - // so we assume the type is correct and don't check it - - while (true) { - var _iter$next = iter.next(), - resource = _iter$next.value; - - if (!resource) break; // If every style Resource flushed in the shell we do not need to send - // any dependencies + { + writeChunk(destination, responseState.startInlineScript); - if ((resource.state & FlushedInPreamble) === NoState) { - return true; + if (!responseState.sentCompleteSegmentFunction) { + // The first time we write this, we'll need to include the full implementation. + responseState.sentCompleteSegmentFunction = true; + writeChunk(destination, completeSegmentScript1Full); + } else { + // Future calls can just reuse the same function. + writeChunk(destination, completeSegmentScript1Partial); } - } - - return false; -} - -var arrayFirstOpenBracket = stringToPrecomputedChunk('['); -var arraySubsequentOpenBracket = stringToPrecomputedChunk(',['); -var arrayInterstitial = stringToPrecomputedChunk(','); -var arrayCloseBracket = stringToPrecomputedChunk(']'); // This function writes a 2D array of strings to be embedded in javascript. -// E.g. -// [["JS_escaped_string1", "JS_escaped_string2"]] + } // Write function arguments, which are string literals -function writeStyleResourceDependenciesInJS(destination, boundaryResources) { - writeChunk(destination, arrayFirstOpenBracket); - var nextArrayOpenBrackChunk = arrayFirstOpenBracket; - boundaryResources.forEach(function (resource) { - if (resource.state & FlushedInPreamble) ; else if (resource.state & Flushed) { - // We only need to emit the href because this resource flushed in an earlier - // boundary already which encoded the attributes necessary to construct - // the resource instance on the client. - writeChunk(destination, nextArrayOpenBrackChunk); - writeStyleResourceDependencyHrefOnlyInJS(destination, resource.type === 'style' ? resource.props['data-href'] : resource.props.href); - writeChunk(destination, arrayCloseBracket); - nextArrayOpenBrackChunk = arraySubsequentOpenBracket; - } else if (resource.type === 'stylesheet') { - // We need to emit the whole resource for insertion on the client - writeChunk(destination, nextArrayOpenBrackChunk); - writeStyleResourceDependencyInJS(destination, resource.props.href, resource.props['data-precedence'], resource.props); - writeChunk(destination, arrayCloseBracket); - nextArrayOpenBrackChunk = arraySubsequentOpenBracket; - resource.state |= FlushedLate; - } - }); - writeChunk(destination, arrayCloseBracket); -} -/* Helper functions */ + writeChunk(destination, responseState.segmentPrefix); + var formattedID = stringToChunk(contentSegmentID.toString(16)); + writeChunk(destination, formattedID); -function writeStyleResourceDependencyHrefOnlyInJS(destination, href) { - // We should actually enforce this earlier when the resource is created but for - // now we make sure we are actually dealing with a string here. { - checkAttributeStringCoercion(href, 'href'); + writeChunk(destination, completeSegmentScript2); } - var coercedHref = '' + href; - writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedHref))); -} + writeChunk(destination, responseState.placeholderPrefix); + writeChunk(destination, formattedID); -function writeStyleResourceDependencyInJS(destination, href, precedence, props) { { - checkAttributeStringCoercion(href, 'href'); + return writeChunkAndReturn(destination, completeSegmentScriptEnd); } - - var coercedHref = '' + href; - sanitizeURL(coercedHref); - writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedHref))); +} +var completeBoundaryScript1Full = stringToPrecomputedChunk(completeBoundary + ';$RC("'); +var completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC("'); +var completeBoundaryWithStylesScript1FullBoth = stringToPrecomputedChunk(completeBoundary + ';' + completeBoundaryWithStyles + ';$RR("'); +var completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk(completeBoundaryWithStyles + ';$RR("'); +var completeBoundaryWithStylesScript1Partial = stringToPrecomputedChunk('$RR("'); +var completeBoundaryScript2 = stringToPrecomputedChunk('","'); +var completeBoundaryScript3a = stringToPrecomputedChunk('",'); +var completeBoundaryScript3b = stringToPrecomputedChunk('"'); +var completeBoundaryScriptEnd = stringToPrecomputedChunk(')</script>'); +var completeBoundaryData1 = stringToPrecomputedChunk('<template data-rci="" data-bid="'); +var completeBoundaryWithStylesData1 = stringToPrecomputedChunk('<template data-rri="" data-bid="'); +var completeBoundaryData2 = stringToPrecomputedChunk('" data-sid="'); +var completeBoundaryData3a = stringToPrecomputedChunk('" data-sty="'); +function writeCompletedBoundaryInstruction(destination, responseState, boundaryID, contentSegmentID, boundaryResources) { + var hasStyleDependencies; { - checkAttributeStringCoercion(precedence, 'precedence'); + hasStyleDependencies = hasStyleResourceDependencies(boundaryResources); } - var coercedPrecedence = '' + precedence; - writeChunk(destination, arrayInterstitial); - writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedPrecedence))); - - for (var propKey in props) { - if (hasOwnProperty.call(props, propKey)) { - var propValue = props[propKey]; + { + writeChunk(destination, responseState.startInlineScript); - if (propValue == null) { - continue; + if ( hasStyleDependencies) { + if (!responseState.sentCompleteBoundaryFunction) { + responseState.sentCompleteBoundaryFunction = true; + responseState.sentStyleInsertionFunction = true; + writeChunk(destination, clonePrecomputedChunk(completeBoundaryWithStylesScript1FullBoth)); + } else if (!responseState.sentStyleInsertionFunction) { + responseState.sentStyleInsertionFunction = true; + writeChunk(destination, completeBoundaryWithStylesScript1FullPartial); + } else { + writeChunk(destination, completeBoundaryWithStylesScript1Partial); } - - switch (propKey) { - case 'href': - case 'rel': - case 'precedence': - case 'data-precedence': - { - break; - } - - case 'children': - case 'dangerouslySetInnerHTML': - throw new Error('link' + " is a self-closing tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.'); - // eslint-disable-next-line-no-fallthrough - - default: - writeStyleResourceAttributeInJS(destination, propKey, propValue); - break; + } else { + if (!responseState.sentCompleteBoundaryFunction) { + responseState.sentCompleteBoundaryFunction = true; + writeChunk(destination, completeBoundaryScript1Full); + } else { + writeChunk(destination, completeBoundaryScript1Partial); } } } - return null; -} - -function writeStyleResourceAttributeInJS(destination, name, value) // not null or undefined -{ - var attributeName = name.toLowerCase(); - var attributeValue; - - switch (typeof value) { - case 'function': - case 'symbol': - return; - } - - switch (name) { - // Reserved names - case 'innerHTML': - case 'dangerouslySetInnerHTML': - case 'suppressContentEditableWarning': - case 'suppressHydrationWarning': - case 'style': - // Ignored - return; - // Attribute renames + if (boundaryID === null) { + throw new Error('An ID must have been assigned before we can complete the boundary.'); + } // Write function arguments, which are string and array literals - case 'className': - attributeName = 'class'; - break; - // Booleans - case 'hidden': - if (value === false) { - return; - } + var formattedContentID = stringToChunk(contentSegmentID.toString(16)); + writeChunk(destination, boundaryID); - attributeValue = ''; - break; - // Santized URLs + { + writeChunk(destination, completeBoundaryScript2); + } - case 'src': - case 'href': - { - { - checkAttributeStringCoercion(value, attributeName); - } + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, formattedContentID); - attributeValue = '' + value; - sanitizeURL(attributeValue); - break; - } + if ( hasStyleDependencies) { + // Script and data writers must format this differently: + // - script writer emits an array literal, whose string elements are + // escaped for javascript e.g. ["A", "B"] + // - data writer emits a string literal, which is escaped as html + // e.g. ["A", "B"] + { + writeChunk(destination, completeBoundaryScript3a); // boundaryResources encodes an array literal - default: - { - if (!isAttributeNameSafe(name)) { - return; - } - } + writeStyleResourceDependenciesInJS(destination, boundaryResources); + } + } else { + { + writeChunk(destination, completeBoundaryScript3b); + } } - if ( // shouldIgnoreAttribute - // We have already filtered out null/undefined and reserved words. - name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) { - return; + { + return writeChunkAndReturn(destination, completeBoundaryScriptEnd); } +} +var clientRenderScript1Full = stringToPrecomputedChunk(clientRenderBoundary + ';$RX("'); +var clientRenderScript1Partial = stringToPrecomputedChunk('$RX("'); +var clientRenderScript1A = stringToPrecomputedChunk('"'); +var clientRenderErrorScriptArgInterstitial = stringToPrecomputedChunk(','); +var clientRenderScriptEnd = stringToPrecomputedChunk(')</script>'); +var clientRenderData1 = stringToPrecomputedChunk('<template data-rxi="" data-bid="'); +var clientRenderData2 = stringToPrecomputedChunk('" data-dgst="'); +var clientRenderData3 = stringToPrecomputedChunk('" data-msg="'); +var clientRenderData4 = stringToPrecomputedChunk('" data-stck="'); +function writeClientRenderBoundaryInstruction(destination, responseState, boundaryID, errorDigest, errorMessage, errorComponentStack) { { - checkAttributeStringCoercion(value, attributeName); - } + writeChunk(destination, responseState.startInlineScript); - attributeValue = '' + value; - writeChunk(destination, arrayInterstitial); - writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(attributeName))); - writeChunk(destination, arrayInterstitial); - writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(attributeValue))); -} // This function writes a 2D array of strings to be embedded in an attribute -/** - * Resources - */ + if (!responseState.sentClientRenderFunction) { + // The first time we write this, we'll need to include the full implementation. + responseState.sentClientRenderFunction = true; + writeChunk(destination, clientRenderScript1Full); + } else { + // Future calls can just reuse the same function. + writeChunk(destination, clientRenderScript1Partial); + } + } + if (boundaryID === null) { + throw new Error('An ID must have been assigned before we can complete the boundary.'); + } -var NoState -/* */ -= 0; // These tags indicate whether the Resource was flushed and in which phase - -var FlushedInPreamble -/* */ -= 1; -var FlushedLate -/* */ -= 2; -var Flushed -/* */ -= 3; // This tag indicates whether this Resource is blocked from flushing. -// This currently is only used with stylesheets that are blocked by a Boundary - -var Blocked -/* */ -= 4; // This tag indicates whether this Resource has been preloaded. -// This generally only makes sense for Resources other than PreloadResource - -var PreloadFlushed -/* */ -= 8; // Dev extensions. -// Stylesheets and Scripts rendered with jsx -// Preloads, Stylesheets, and Scripts from ReactDOM.preload or ReactDOM.preinit -// Preloads created for normal components we rendered but know we can preload early such as -// sync Scripts and stylesheets without precedence or with onLoad/onError handlers -// @TODO add bootstrap script to implicit preloads + writeChunk(destination, boundaryID); -function createResources() { - return { - // persistent - preloadsMap: new Map(), - stylesMap: new Map(), - scriptsMap: new Map(), - // cleared on flush - fontPreloads: new Set(), - // usedImagePreloads: new Set(), - precedences: new Map(), - usedStylesheets: new Set(), - scripts: new Set(), - usedScripts: new Set(), - explicitStylesheetPreloads: new Set(), - // explicitImagePreloads: new Set(), - explicitScriptPreloads: new Set(), - explicitOtherPreloads: new Set(), - // like a module global for currently rendering boundary - boundaryResources: null - }; -} -function createBoundaryResources() { - return new Set(); -} -function setCurrentlyRenderingBoundaryResourcesTarget(resources, boundaryResources) { - resources.boundaryResources = boundaryResources; -} + { + // " needs to be inserted for scripts, since ArgInterstitual does not contain + // leading or trailing quotes + writeChunk(destination, clientRenderScript1A); + } -function getResourceKey(as, href) { - return "[" + as + "]" + href; -} + if (errorDigest || errorMessage || errorComponentStack) { + { + // ,"JSONString" + writeChunk(destination, clientRenderErrorScriptArgInterstitial); + writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorDigest || ''))); + } + } -function preload(href, options) { - if (!currentResources) { - // While we expect that preload calls are primarily going to be observed - // during render because effects and events don't run on the server it is - // still possible that these get called in module scope. This is valid on - // the client since there is still a document to interact with but on the - // server we need a request to associate the call to. Because of this we - // simply return and do not warn. - return; + if (errorMessage || errorComponentStack) { + { + // ,"JSONString" + writeChunk(destination, clientRenderErrorScriptArgInterstitial); + writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorMessage || ''))); + } } - var resources = currentResources; + if (errorComponentStack) { + // ,"JSONString" + { + writeChunk(destination, clientRenderErrorScriptArgInterstitial); + writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorComponentStack))); + } + } { - if (typeof href !== 'string' || !href) { - error('ReactDOM.preload(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.', getValueDescriptorExpectingObjectForWarning(href)); - } else if (options == null || typeof options !== 'object') { - error('ReactDOM.preload(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preloaded but encountered %s instead.', getValueDescriptorExpectingEnumForWarning(options)); - } else if (typeof options.as !== 'string') { - error('ReactDOM.preload(): Expected the `as` property in the `options` argument (second) to contain a string value describing the type of resource to be preloaded but encountered %s instead. Values that are valid in for the `as` attribute of a `<link rel="preload" as="..." />` tag are valid here.', getValueDescriptorExpectingEnumForWarning(options.as)); - } + // ></script> + return writeChunkAndReturn(destination, clientRenderScriptEnd); } +} +var regexForJSStringsInInstructionScripts = /[<\u2028\u2029]/g; - if (typeof href === 'string' && href && typeof options === 'object' && options !== null && typeof options.as === 'string') { - var as = options.as; - var key = getResourceKey(as, href); - var resource = resources.preloadsMap.get(key); +function escapeJSStringsForInstructionScripts(input) { + var escaped = JSON.stringify(input); + return escaped.replace(regexForJSStringsInInstructionScripts, function (match) { + switch (match) { + // santizing breaking out of strings and script tags + case '<': + return "\\u003c"; - { - var devResource = getAsResourceDEV(resource); + case "\u2028": + return "\\u2028"; - if (devResource) { - switch (devResource.__provenance) { - case 'preload': - { - var differenceDescription = describeDifferencesForPreloads(options, devResource.__originalOptions); + case "\u2029": + return "\\u2029"; - if (differenceDescription) { - error('ReactDOM.preload(): The options provided conflict with another call to `ReactDOM.preload("%s", { as: "%s", ...})`.' + ' React will always use the options it first encounters when preloading a resource for a given `href` and `as` type, and any later options will be ignored if different.' + ' Try updating all calls to `ReactDOM.preload()` with the same `href` and `as` type to use the same options, or eliminate one of the calls.%s', href, as, differenceDescription); - } + default: + { + // eslint-disable-next-line react-internal/prod-error-codes + throw new Error('escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React'); + } + } + }); +} - break; - } +var regexForJSStringsInScripts = /[&><\u2028\u2029]/g; - case 'implicit': - { - var _differenceDescription3 = describeDifferencesForPreloadOverImplicitPreload(options, devResource.__impliedProps); +function escapeJSObjectForInstructionScripts(input) { + var escaped = JSON.stringify(input); + return escaped.replace(regexForJSStringsInScripts, function (match) { + switch (match) { + // santizing breaking out of strings and script tags + case '&': + return "\\u0026"; - if (_differenceDescription3) { - var elementDescription = as === 'style' ? '<link rel="stylesheet" ... />' : as === 'script' ? '<script ... />' : null; + case '>': + return "\\u003e"; - if (elementDescription) { - error('ReactDOM.preload(): For `href` "%s", The options provided conflict with props on a matching %s element. When the preload' + ' options disagree with the underlying resource it usually means the browser will not be able to use the preload when the resource' + ' is fetched, negating any benefit the preload would provide. React will preload the resource using props derived from the resource instead' + ' and ignore the options provided to the `ReactDOM.preload()` call. In general, preloading is useful when you expect to' + ' render a resource soon but have not yet done so. In this case since the underlying resource was already rendered the preload call' + ' may be extraneous. Try removing the call, otherwise try adjusting both the props on the %s and the options' + ' passed to `ReactDOM.preload()` to agree.%s', href, elementDescription, elementDescription, _differenceDescription3); - } - } + case '<': + return "\\u003c"; - break; - } + case "\u2028": + return "\\u2028"; + + case "\u2029": + return "\\u2029"; + + default: + { + // eslint-disable-next-line react-internal/prod-error-codes + throw new Error('escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React'); } - } } + }); +} - if (!resource) { - resource = { - type: 'preload', - chunks: [], - state: NoState, - props: preloadPropsFromPreloadOptions(href, as, options) - }; - resources.preloadsMap.set(key, resource); +var precedencePlaceholderStart = stringToPrecomputedChunk('<style data-precedence="'); +var precedencePlaceholderEnd = stringToPrecomputedChunk('"></style>'); +function writeInitialResources(destination, resources, responseState, willFlushAllSegments) { - { - markAsImperativeResourceDEV(resource, 'preload', href, options, resource.props); - } - pushLinkImpl(resource.chunks, resource.props); + function flushLinkResource(resource) { + if (!resource.flushed) { + pushLinkImpl(target, resource.props, responseState); + resource.flushed = true; } + } - switch (as) { - case 'font': - { - resources.fontPreloads.add(resource); - break; - } + var target = []; + var charset = resources.charset, + bases = resources.bases, + preconnects = resources.preconnects, + fontPreloads = resources.fontPreloads, + precedences = resources.precedences, + usedStylePreloads = resources.usedStylePreloads, + scripts = resources.scripts, + usedScriptPreloads = resources.usedScriptPreloads, + explicitStylePreloads = resources.explicitStylePreloads, + explicitScriptPreloads = resources.explicitScriptPreloads, + headResources = resources.headResources; - case 'style': + if (charset) { + pushSelfClosing(target, charset.props, 'meta', responseState); + charset.flushed = true; + resources.charset = null; + } + + bases.forEach(function (r) { + pushSelfClosing(target, r.props, 'base', responseState); + r.flushed = true; + }); + bases.clear(); + preconnects.forEach(function (r) { + // font preload Resources should not already be flushed so we elide this check + pushLinkImpl(target, r.props, responseState); + r.flushed = true; + }); + preconnects.clear(); + fontPreloads.forEach(function (r) { + // font preload Resources should not already be flushed so we elide this check + pushLinkImpl(target, r.props, responseState); + r.flushed = true; + }); + fontPreloads.clear(); // Flush stylesheets first by earliest precedence + + precedences.forEach(function (p, precedence) { + if (p.size) { + p.forEach(function (r) { + // resources should not already be flushed so we elide this check + pushLinkImpl(target, r.props, responseState); + r.flushed = true; + r.inShell = true; + r.hint.flushed = true; + }); + p.clear(); + } else { + target.push(precedencePlaceholderStart, stringToChunk(escapeTextForBrowser(precedence)), precedencePlaceholderEnd); + } + }); + usedStylePreloads.forEach(flushLinkResource); + usedStylePreloads.clear(); + scripts.forEach(function (r) { + // should never be flushed already + pushScriptImpl(target, r.props, responseState); + r.flushed = true; + r.hint.flushed = true; + }); + scripts.clear(); + usedScriptPreloads.forEach(flushLinkResource); + usedScriptPreloads.clear(); + explicitStylePreloads.forEach(flushLinkResource); + explicitStylePreloads.clear(); + explicitScriptPreloads.forEach(flushLinkResource); + explicitScriptPreloads.clear(); + headResources.forEach(function (r) { + switch (r.type) { + case 'title': { - resources.explicitStylesheetPreloads.add(resource); + pushTitleImpl(target, r.props, responseState); break; } - case 'script': + case 'meta': { - resources.explicitScriptPreloads.add(resource); + pushSelfClosing(target, r.props, 'meta', responseState); break; } - default: + case 'link': { - resources.explicitOtherPreloads.add(resource); + pushLinkImpl(target, r.props, responseState); + break; } } - } -} -function preinit(href, options) { - if (!currentResources) { - // While we expect that preinit calls are primarily going to be observed - // during render because effects and events don't run on the server it is - // still possible that these get called in module scope. This is valid on - // the client since there is still a document to interact with but on the - // server we need a request to associate the call to. Because of this we - // simply return and do not warn. - return; - } - preinitImpl(currentResources, href, options); -} // On the server, preinit may be called outside of render when sending an -// external SSR runtime as part of the initial resources payload. Since this -// is an internal React call, we do not need to use the resources stack. + r.flushed = true; + }); + headResources.clear(); + var i; + var r = true; -function preinitImpl(resources, href, options) { - { - if (typeof href !== 'string' || !href) { - error('ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.', getValueDescriptorExpectingObjectForWarning(href)); - } else if (options == null || typeof options !== 'object') { - error('ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.', getValueDescriptorExpectingEnumForWarning(options)); - } else if (options.as !== 'style' && options.as !== 'script') { - error('ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".', getValueDescriptorExpectingEnumForWarning(options.as)); - } + for (i = 0; i < target.length - 1; i++) { + writeChunk(destination, target[i]); } - if (typeof href === 'string' && href && typeof options === 'object' && options !== null) { - var as = options.as; + if (i < target.length) { + r = writeChunkAndReturn(destination, target[i]); + } - switch (as) { - case 'style': + return r; +} +function writeImmediateResources(destination, resources, responseState) { + // $FlowFixMe[missing-local-annot] + function flushLinkResource(resource) { + if (!resource.flushed) { + pushLinkImpl(target, resource.props, responseState); + resource.flushed = true; + } + } + + var target = []; + var charset = resources.charset, + preconnects = resources.preconnects, + fontPreloads = resources.fontPreloads, + usedStylePreloads = resources.usedStylePreloads, + scripts = resources.scripts, + usedScriptPreloads = resources.usedScriptPreloads, + explicitStylePreloads = resources.explicitStylePreloads, + explicitScriptPreloads = resources.explicitScriptPreloads, + headResources = resources.headResources; + + if (charset) { + pushSelfClosing(target, charset.props, 'meta', responseState); + charset.flushed = true; + resources.charset = null; + } + + preconnects.forEach(function (r) { + // font preload Resources should not already be flushed so we elide this check + pushLinkImpl(target, r.props, responseState); + r.flushed = true; + }); + preconnects.clear(); + fontPreloads.forEach(function (r) { + // font preload Resources should not already be flushed so we elide this check + pushLinkImpl(target, r.props, responseState); + r.flushed = true; + }); + fontPreloads.clear(); + usedStylePreloads.forEach(flushLinkResource); + usedStylePreloads.clear(); + scripts.forEach(function (r) { + // should never be flushed already + pushStartGenericElement(target, r.props, 'script', responseState); + pushEndInstance(target, target, 'script', r.props); + r.flushed = true; + r.hint.flushed = true; + }); + scripts.clear(); + usedScriptPreloads.forEach(flushLinkResource); + usedScriptPreloads.clear(); + explicitStylePreloads.forEach(flushLinkResource); + explicitStylePreloads.clear(); + explicitScriptPreloads.forEach(flushLinkResource); + explicitScriptPreloads.clear(); + headResources.forEach(function (r) { + switch (r.type) { + case 'title': { - var key = getResourceKey(as, href); - var resource = resources.stylesMap.get(key); - var precedence = options.precedence || 'default'; - - { - var devResource = getAsResourceDEV(resource); - - if (devResource) { - var resourceProps = stylesheetPropsFromPreinitOptions(href, precedence, options); - - var propsEquivalent = assign({}, resourceProps, _defineProperty({ - precedence: options.precedence - }, 'data-precedence', null)); - - switch (devResource.__provenance) { - case 'rendered': - { - var differenceDescription = describeDifferencesForPreinitOverStylesheet( // Diff the props from the JSX element, not the derived resource props - propsEquivalent, devResource.__originalProps); - - if (differenceDescription) { - error('ReactDOM.preinit(): For `href` "%s", the options provided conflict with props found on a <link rel="stylesheet" precedence="%s" href="%s" .../> that was already rendered.' + ' React will always use the props or options it first encounters for a hoistable stylesheet for a given `href` and any later props or options will be ignored if different.' + ' Generally, ReactDOM.preinit() is useful when you are not yet rendering a stylesheet but you anticipate it will be used soon.' + ' In this case the stylesheet was already rendered so preinitializing it does not provide any additional benefit.' + ' To resolve, try making the props and options agree between the <link rel="stylesheet" .../> and the `ReactDOM.preinit()` call or' + ' remove the `ReactDOM.preinit()` call.%s', href, devResource.__originalProps.precedence, href, differenceDescription); - } - - break; - } - - case 'preinit': - { - var _differenceDescription4 = describeDifferencesForPreinits( // Diff the props from the JSX element, not the derived resource props - propsEquivalent, devResource.__propsEquivalent); - - if (_differenceDescription4) { - error('ReactDOM.preinit(): For `href` "%s", the options provided conflict with another call to `ReactDOM.preinit("%s", { as: "style", ... })`.' + ' React will always use the options it first encounters when preinitializing a hoistable stylesheet for a given `href` and any later options will be ignored if different.' + ' Try updating all calls to `ReactDOM.preinit()` for a given `href` to use the same options, or only call `ReactDOM.preinit()` once per `href`.%s', href, href, _differenceDescription4); - } - - break; - } - } - } - } - - if (!resource) { - resource = { - type: 'stylesheet', - chunks: [], - state: NoState, - props: stylesheetPropsFromPreinitOptions(href, precedence, options) - }; - resources.stylesMap.set(key, resource); - - { - markAsImperativeResourceDEV(resource, 'preinit', href, options, assign({}, resource.props, _defineProperty({ - precedence: precedence - }, 'data-precedence', undefined))); - } - - var precedenceSet = resources.precedences.get(precedence); - - if (!precedenceSet) { - precedenceSet = new Set(); - resources.precedences.set(precedence, precedenceSet); - } - - precedenceSet.add(resource); - } - - return; + pushTitleImpl(target, r.props, responseState); + break; } - case 'script': + case 'meta': { - var src = href; - - var _key = getResourceKey(as, src); - - var _resource3 = resources.scriptsMap.get(_key); - - { - var _devResource = getAsResourceDEV(_resource3); + pushSelfClosing(target, r.props, 'meta', responseState); + break; + } - if (_devResource) { - var _propsEquivalent = scriptPropsFromPreinitOptions(src, options); + case 'link': + { + pushLinkImpl(target, r.props, responseState); + break; + } + } - switch (_devResource.__provenance) { - case 'rendered': - { - var _differenceDescription5 = describeDifferencesForPreinitOverScript( // Diff the props from the JSX element, not the derived resource props - _propsEquivalent, _devResource.__originalProps); + r.flushed = true; + }); + headResources.clear(); + var i; + var r = true; - if (_differenceDescription5) { - error('ReactDOM.preinit(): For `href` "%s", the options provided conflict with props found on a <script async={true} src="%s" .../> that was already rendered.' + ' React will always use the props or options it first encounters for a hoistable script for a given `href` and any later props or options will be ignored if different.' + ' Generally, ReactDOM.preinit() is useful when you are not yet rendering a script but you anticipate it will be used soon and want to go beyond preloading it and have it' + ' execute early. In this case the script was already rendered so preinitializing it does not provide any additional benefit.' + ' To resolve, try making the props and options agree between the <script .../> and the `ReactDOM.preinit()` call or remove the `ReactDOM.preinit()` call.%s', href, href, _differenceDescription5); - } + for (i = 0; i < target.length - 1; i++) { + writeChunk(destination, target[i]); + } - break; - } + if (i < target.length) { + r = writeChunkAndReturn(destination, target[i]); + } - case 'preinit': - { - var _differenceDescription6 = describeDifferencesForPreinits( // Diff the props from the JSX element, not the derived resource props - _propsEquivalent, _devResource.__propsEquivalent); + return r; +} - if (_differenceDescription6) { - error('ReactDOM.preinit(): For `href` "%s", the options provided conflict with another call to `ReactDOM.preinit("%s", { as: "script", ... })`.' + ' React will always use the options it first encounters when preinitializing a hoistable script for a given `href` and any later options will be ignored if different.' + ' Try updating all calls to `ReactDOM.preinit()` for a given `href` to use the same options, or only call `ReactDOM.preinit()` once per `href`.%s', href, href, _differenceDescription6); - } +function hasStyleResourceDependencies(boundaryResources) { + var iter = boundaryResources.values(); // At the moment boundaries only accumulate style resources + // so we assume the type is correct and don't check it - break; - } - } - } - } + while (true) { + var _iter$next = iter.next(), + resource = _iter$next.value; - if (!_resource3) { - _resource3 = { - type: 'script', - chunks: [], - state: NoState, - props: null - }; - resources.scriptsMap.set(_key, _resource3); + if (!resource) break; // If every style Resource flushed in the shell we do not need to send + // any dependencies - var _resourceProps = scriptPropsFromPreinitOptions(src, options); + if (!resource.inShell) { + return true; + } + } - { - markAsImperativeResourceDEV(_resource3, 'preinit', href, options, _resourceProps); - } + return false; +} - resources.scripts.add(_resource3); - pushScriptImpl(_resource3.chunks, _resourceProps); - } +var arrayFirstOpenBracket = stringToPrecomputedChunk('['); +var arraySubsequentOpenBracket = stringToPrecomputedChunk(',['); +var arrayInterstitial = stringToPrecomputedChunk(','); +var arrayCloseBracket = stringToPrecomputedChunk(']'); // This function writes a 2D array of strings to be embedded in javascript. +// E.g. +// [["JS_escaped_string1", "JS_escaped_string2"]] - return; - } +function writeStyleResourceDependenciesInJS(destination, boundaryResources) { + writeChunk(destination, arrayFirstOpenBracket); + var nextArrayOpenBrackChunk = arrayFirstOpenBracket; + boundaryResources.forEach(function (resource) { + if (resource.inShell) ; else if (resource.flushed) { + writeChunk(destination, nextArrayOpenBrackChunk); + writeStyleResourceDependencyHrefOnlyInJS(destination, resource.href); + writeChunk(destination, arrayCloseBracket); + nextArrayOpenBrackChunk = arraySubsequentOpenBracket; + } else { + writeChunk(destination, nextArrayOpenBrackChunk); + writeStyleResourceDependencyInJS(destination, resource.href, resource.precedence, resource.props); + writeChunk(destination, arrayCloseBracket); + nextArrayOpenBrackChunk = arraySubsequentOpenBracket; + resource.flushed = true; + resource.hint.flushed = true; } - } + }); + writeChunk(destination, arrayCloseBracket); } +/* Helper functions */ -function preloadPropsFromPreloadOptions(href, as, options) { - return { - rel: 'preload', - as: as, - href: href, - crossOrigin: as === 'font' ? '' : options.crossOrigin, - integrity: options.integrity - }; -} -function preloadAsStylePropsFromProps(href, props) { - return { - rel: 'preload', - as: 'style', - href: href, - crossOrigin: props.crossOrigin, - integrity: props.integrity, - media: props.media, - hrefLang: props.hrefLang, - referrerPolicy: props.referrerPolicy - }; -} +function writeStyleResourceDependencyHrefOnlyInJS(destination, href) { + // We should actually enforce this earlier when the resource is created but for + // now we make sure we are actually dealing with a string here. + { + checkAttributeStringCoercion(href, 'href'); + } -function preloadAsScriptPropsFromProps(href, props) { - return { - rel: 'preload', - as: 'script', - href: href, - crossOrigin: props.crossOrigin, - integrity: props.integrity, - referrerPolicy: props.referrerPolicy - }; + var coercedHref = '' + href; + writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedHref))); } -function stylesheetPropsFromPreinitOptions(href, precedence, options) { - return { - rel: 'stylesheet', - href: href, - 'data-precedence': precedence, - crossOrigin: options.crossOrigin, - integrity: options.integrity - }; -} +function writeStyleResourceDependencyInJS(destination, href, precedence, props) { + { + checkAttributeStringCoercion(href, 'href'); + } -function stylesheetPropsFromRawProps(rawProps) { - return assign({}, rawProps, { - 'data-precedence': rawProps.precedence, - precedence: null - }); -} + var coercedHref = '' + href; + sanitizeURL(coercedHref); + writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedHref))); -function adoptPreloadPropsForStylesheetProps(resourceProps, preloadProps) { - if (resourceProps.crossOrigin == null) resourceProps.crossOrigin = preloadProps.crossOrigin; - if (resourceProps.integrity == null) resourceProps.integrity = preloadProps.integrity; -} + { + checkAttributeStringCoercion(precedence, 'precedence'); + } -function styleTagPropsFromRawProps(rawProps) { - return assign({}, rawProps, { - 'data-precedence': rawProps.precedence, - precedence: null, - 'data-href': rawProps.href, - href: null - }); -} + var coercedPrecedence = '' + precedence; + writeChunk(destination, arrayInterstitial); + writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedPrecedence))); -function scriptPropsFromPreinitOptions(src, options) { - return { - src: src, - async: true, - crossOrigin: options.crossOrigin, - integrity: options.integrity - }; -} + for (var propKey in props) { + if (hasOwnProperty.call(props, propKey)) { + var propValue = props[propKey]; -function adoptPreloadPropsForScriptProps(resourceProps, preloadProps) { - if (resourceProps.crossOrigin == null) resourceProps.crossOrigin = preloadProps.crossOrigin; - if (resourceProps.integrity == null) resourceProps.integrity = preloadProps.integrity; -} + if (propValue == null) { + continue; + } -function hoistStylesheetResource(resource) { - this.add(resource); -} + switch (propKey) { + case 'href': + case 'rel': + case 'precedence': + case 'data-precedence': + { + break; + } -function hoistResources(resources, source) { - var currentBoundaryResources = resources.boundaryResources; + case 'children': + case 'dangerouslySetInnerHTML': + throw new Error('link' + " is a self-closing tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.'); + // eslint-disable-next-line-no-fallthrough - if (currentBoundaryResources) { - source.forEach(hoistStylesheetResource, currentBoundaryResources); - source.clear(); + default: + writeStyleResourceAttributeInJS(destination, propKey, propValue); + break; + } + } } -} - -function unblockStylesheet(resource) { - resource.state &= ~Blocked; -} -function hoistResourcesToRoot(resources, boundaryResources) { - boundaryResources.forEach(unblockStylesheet); - boundaryResources.clear(); + return null; } -function markAsRenderedResourceDEV(resource, originalProps) { - { - var devResource = resource; - - if (typeof devResource.__provenance === 'string') { - error('Resource already marked for DEV type. This is a bug in React.'); - } +function writeStyleResourceAttributeInJS(destination, name, value) // not null or undefined +{ + var attributeName = name.toLowerCase(); + var attributeValue; - devResource.__provenance = 'rendered'; - devResource.__originalProps = originalProps; + switch (typeof value) { + case 'function': + case 'symbol': + return; } -} -function markAsImperativeResourceDEV(resource, provenance, originalHref, originalOptions, propsEquivalent) { - { - var devResource = resource; + switch (name) { + // Reserved names + case 'innerHTML': + case 'dangerouslySetInnerHTML': + case 'suppressContentEditableWarning': + case 'suppressHydrationWarning': + case 'style': + // Ignored + return; + // Attribute renames - if (typeof devResource.__provenance === 'string') { - error('Resource already marked for DEV type. This is a bug in React.'); - } + case 'className': + attributeName = 'class'; + break; + // Booleans - devResource.__provenance = provenance; - devResource.__originalHref = originalHref; - devResource.__originalOptions = originalOptions; - devResource.__propsEquivalent = propsEquivalent; - } -} + case 'hidden': + if (value === false) { + return; + } -function markAsImplicitResourceDEV(resource, underlyingProps, impliedProps) { - { - var devResource = resource; + attributeValue = ''; + break; + // Santized URLs - if (typeof devResource.__provenance === 'string') { - error('Resource already marked for DEV type. This is a bug in React.'); - } + case 'src': + case 'href': + { + { + checkAttributeStringCoercion(value, attributeName); + } - devResource.__provenance = 'implicit'; - devResource.__underlyingProps = underlyingProps; - devResource.__impliedProps = impliedProps; - } -} + attributeValue = '' + value; + sanitizeURL(attributeValue); + break; + } -function getAsResourceDEV(resource) { - { - if (resource) { - if (typeof resource.__provenance === 'string') { - return resource; + default: + { + if (!isAttributeNameSafe(name)) { + return; + } } + } - error('Resource was not marked for DEV type. This is a bug in React.'); - } + if ( // shouldIgnoreAttribute + // We have already filtered out null/undefined and reserved words. + name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) { + return; + } - return null; + { + checkAttributeStringCoercion(value, attributeName); } -} + + attributeValue = '' + value; + writeChunk(destination, arrayInterstitial); + writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(attributeName))); + writeChunk(destination, arrayInterstitial); + writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(attributeValue))); +} // This function writes a 2D array of strings to be embedded in an attribute // ATTENTION // When adding new symbols to this file, @@ -7644,6 +7436,8 @@ function createRequest(children, responseState, rootFormatContext, progressiveCh clientRenderedBoundaries: [], completedBoundaries: [], partialBoundaries: [], + preamble: [], + postamble: [], onError: onError === undefined ? defaultErrorHandler : onError, onAllReady: onAllReady === undefined ? noop$2 : onAllReady, onShellReady: onShellReady === undefined ? noop$2 : onShellReady, @@ -7947,7 +7741,7 @@ function hoistCompletedBoundaryResources(request, completedBoundary) { function renderHostElement(request, task, type, props) { pushBuiltInComponentStackInDEV(task, type); var segment = task.blockedSegment; - var children = pushStartInstance(segment.chunks, type, props, request.resources, request.responseState, segment.formatContext, segment.lastPushedText); + var children = pushStartInstance(segment.chunks, request.preamble, type, props, request.responseState, segment.formatContext, segment.lastPushedText); segment.lastPushedText = false; var prevContext = segment.formatContext; segment.formatContext = getChildFormatContext(prevContext, type, props); // We use the non-destructive form because if something suspends, we still @@ -7957,7 +7751,7 @@ function renderHostElement(request, task, type, props) { // the correct context. Therefore this is not in a finally. segment.formatContext = prevContext; - pushEndInstance(segment.chunks, type, props, request.responseState, prevContext); + pushEndInstance(segment.chunks, request.postamble, type); segment.lastPushedText = false; popComponentStackInDEV(task); } @@ -9112,6 +8906,14 @@ function flushSegment(request, destination, segment) { } } +function flushInitialResources(destination, resources, responseState, willFlushAllSegments) { + writeInitialResources(destination, resources, responseState); +} + +function flushImmediateResources(destination, request) { + writeImmediateResources(destination, request.resources, request.responseState); +} + function flushClientRenderedBoundary(request, destination, boundary) { return writeClientRenderBoundaryInstruction(destination, request.responseState, boundary.id, boundary.errorDigest, boundary.errorMessage, boundary.errorComponentStack); } @@ -9136,11 +8938,6 @@ function flushCompletedBoundary(request, destination, boundary) { } completedSegments.length = 0; - - { - writeResourcesForBoundary(destination, boundary.resources); - } - return writeCompletedBoundaryInstruction(destination, request.responseState, boundary.id, boundary.rootSegmentID, boundary.resources); } @@ -9165,14 +8962,7 @@ function flushPartialBoundary(request, destination, boundary) { } completedSegments.splice(0, i); - - { - // The way this is structured we only write resources for partial boundaries - // if there is no backpressure. Later before we complete the boundary we - // will write resources regardless of backpressure before we emit the - // completion instruction - return writeResourcesForBoundary(destination, boundary.resources); - } + return true; } function flushPartiallyCompletedSegment(request, destination, boundary, segment) { @@ -9213,7 +9003,14 @@ function flushCompletedQueues(request, destination) { if (completedRootSegment !== null) { if (request.pendingRootTasks === 0) { if (enableFloat) { - writePreamble(destination, request.resources, request.responseState, request.allPendingTasks === 0); + var preamble = request.preamble; + + for (i = 0; i < preamble.length; i++) { + // we expect the preamble to be tiny and will ignore backpressure + writeChunk(destination, preamble[i]); + } + + flushInitialResources(destination, request.resources, request.responseState, request.allPendingTasks === 0); } flushSegment(request, destination, completedRootSegment); @@ -9224,7 +9021,7 @@ function flushCompletedQueues(request, destination) { return; } } else if (enableFloat) { - writeHoistables(destination, request.resources, request.responseState); + flushImmediateResources(destination, request); } // We emit client rendering instructions for already emitted boundaries first. // This is so that we can signal to the client to start client rendering them as // soon as possible. @@ -9304,7 +9101,11 @@ function flushCompletedQueues(request, destination) { // either they have pending task or they're complete. ) { { - writePostamble(destination, request.responseState); + var postamble = request.postamble; + + for (var _i = 0; _i < postamble.length; _i++) { + writeChunk(destination, postamble[_i]); + } } completeWriting(destination); diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.production.min.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.production.min.js index 4863b87179710..bcc559687f1cd 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.production.min.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.production.min.js @@ -8,122 +8,120 @@ * LICENSE file in the root directory of this source tree. */ 'use strict';var ba=require("react"),ca=require("react-dom");function k(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var l=null,p=0; -function q(a,b){if(0!==b.length)if(512<b.length)0<p&&(a.enqueue(new Uint8Array(l.buffer,0,p)),l=new Uint8Array(512),p=0),a.enqueue(b);else{var c=l.length-p;c<b.length&&(0===c?a.enqueue(l):(l.set(b.subarray(0,c),p),a.enqueue(l),b=b.subarray(c)),l=new Uint8Array(512),p=0);l.set(b,p);p+=b.length}}function t(a,b){q(a,b);return!0}function da(a){l&&0<p&&(a.enqueue(new Uint8Array(l.buffer,0,p)),l=null,p=0)}var ea=new TextEncoder;function v(a){return ea.encode(a)}function w(a){return ea.encode(a)} -function fa(a,b){"function"===typeof a.error?a.error(b):a.close()}var x=Object.assign,y=Object.prototype.hasOwnProperty,ha=/^[: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][: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\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ia={},ja={}; -function ka(a){if(y.call(ja,a))return!0;if(y.call(ia,a))return!1;if(ha.test(a))return ja[a]=!0;ia[a]=!0;return!1}function z(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var B={}; -"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){B[a]=new z(a,0,!1,a,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];B[b]=new z(b,1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){B[a]=new z(a,2,!1,a.toLowerCase(),null,!1,!1)}); -["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){B[a]=new z(a,2,!1,a,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){B[a]=new z(a,3,!1,a.toLowerCase(),null,!1,!1)}); -["checked","multiple","muted","selected"].forEach(function(a){B[a]=new z(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){B[a]=new z(a,4,!1,a,null,!1,!1)});["cols","rows","size","span"].forEach(function(a){B[a]=new z(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){B[a]=new z(a,5,!1,a.toLowerCase(),null,!1,!1)});var la=/[\-:]([a-z])/g;function ma(a){return a[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 transform-origin 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".split(" ").forEach(function(a){var b=a.replace(la, -ma);B[b]=new z(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(la,ma);B[b]=new z(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(la,ma);B[b]=new z(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){B[a]=new z(a,1,!1,a.toLowerCase(),null,!1,!1)}); -B.xlinkHref=new z("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){B[a]=new z(a,1,!1,a.toLowerCase(),null,!0,!0)}); -var oa={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,tabSize:!0,widows:!0,zIndex:!0, -zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pa=["Webkit","ms","Moz","O"];Object.keys(oa).forEach(function(a){pa.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);oa[b]=oa[a]})});var qa=/["'&<>]/; -function C(a){if("boolean"===typeof a||"number"===typeof a)return""+a;a=""+a;var b=qa.exec(a);if(b){var c="",d,e=0;for(d=b.index;d<a.length;d++){switch(a.charCodeAt(d)){case 34:b=""";break;case 38:b="&";break;case 39:b="'";break;case 60:b="<";break;case 62:b=">";break;default:continue}e!==d&&(c+=a.substring(e,d));e=d+1;c+=b}a=e!==d?c+a.substring(e,d):c}return a} -var ra=/([A-Z])/g,sa=/^ms-/,ta=Array.isArray,ua=ca.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Dispatcher,xa={preload:va,preinit:wa},D=null,ya=[];w('"></template>');var za=w("<script>"),Aa=w("\x3c/script>"),Ba=w('<script src="'),Ca=w('<script type="module" src="'),Da=w('" integrity="'),Ea=w('" async="">\x3c/script>'),Fa=/(<\/|<)(s)(cript)/gi;function Ga(a,b,c,d){return""+b+("s"===c?"\\u0073":"\\u0053")+d} -function Ha(a,b,c,d,e){a=void 0===a?"":a;b=void 0===b?za:w('<script nonce="'+C(b)+'">');var f=[];void 0!==c&&f.push(b,v((""+c).replace(Fa,Ga)),Aa);if(void 0!==d)for(c=0;c<d.length;c++){var g=d[c],m="string"===typeof g?void 0:g.integrity;f.push(Ba,v(C("string"===typeof g?g:g.src)));m&&f.push(Da,v(C(m)));f.push(Ea)}if(void 0!==e)for(d=0;d<e.length;d++)c=e[d],g="string"===typeof c?void 0:c.integrity,f.push(Ca,v(C("string"===typeof c?c:c.src))),g&&f.push(Da,v(C(g))),f.push(Ea);return{bootstrapChunks:f, -placeholderPrefix:w(a+"P:"),segmentPrefix:w(a+"S:"),boundaryPrefix:a+"B:",idPrefix:a,nextSuspenseID:0,streamingFormat:0,startInlineScript:b,instructions:0,externalRuntimeConfig:null,htmlChunks:null,headChunks:null,hasBody:!1,charsetChunks:[],preconnectChunks:[],preloadChunks:[],hoistableChunks:[]}}function F(a,b,c){return{insertionMode:a,selectedValue:b,noscriptTagInScope:c}}function Ia(a){return F("http://www.w3.org/2000/svg"===a?3:"http://www.w3.org/1998/Math/MathML"===a?4:0,null,!1)} -function Ja(a,b,c){switch(b){case "noscript":return F(2,null,!0);case "select":return F(2,null!=c.value?c.value:c.defaultValue,a.noscriptTagInScope);case "svg":return F(3,null,a.noscriptTagInScope);case "math":return F(4,null,a.noscriptTagInScope);case "foreignObject":return F(2,null,a.noscriptTagInScope);case "table":return F(5,null,a.noscriptTagInScope);case "thead":case "tbody":case "tfoot":return F(6,null,a.noscriptTagInScope);case "colgroup":return F(8,null,a.noscriptTagInScope);case "tr":return F(7, -null,a.noscriptTagInScope)}return 5<=a.insertionMode?F(2,null,a.noscriptTagInScope):0===a.insertionMode?"html"===b?F(1,null,!1):F(2,null,!1):1===a.insertionMode?F(2,null,!1):a}var G=w("\x3c!-- --\x3e");function Ka(a,b,c,d){if(""===b)return d;d&&a.push(G);a.push(v(C(b)));return!0}var La=new Map,Ma=w(' style="'),Na=w(":"),Oa=w(";"); -function Pa(a,b){if("object"!==typeof b)throw Error(k(62));var c=!0,d;for(d in b)if(y.call(b,d)){var e=b[d];if(null!=e&&"boolean"!==typeof e&&""!==e){if(0===d.indexOf("--")){var f=v(C(d));e=v(C((""+e).trim()))}else{f=d;var g=La.get(f);void 0!==g?f=g:(g=w(C(f.replace(ra,"-$1").toLowerCase().replace(sa,"-ms-"))),La.set(f,g),f=g);e="number"===typeof e?0===e||y.call(oa,d)?v(""+e):v(e+"px"):v(C((""+e).trim()))}c?(c=!1,a.push(Ma,f,Na,e)):a.push(Oa,f,Na,e)}}c||a.push(H)} -var I=w(" "),Qa=w('="'),H=w('"'),Ra=w('=""'); -function J(a,b,c){switch(b){case "style":Pa(a,c);return;case "defaultValue":case "defaultChecked":case "innerHTML":case "suppressContentEditableWarning":case "suppressHydrationWarning":return}if(!(2<b.length)||"o"!==b[0]&&"O"!==b[0]||"n"!==b[1]&&"N"!==b[1]){var d=B.hasOwnProperty(b)?B[b]:null;if(null!==d){switch(typeof c){case "function":case "symbol":return;case "boolean":if(!d.acceptsBooleans)return}b=v(d.attributeName);switch(d.type){case 3:c&&a.push(I,b,Ra);break;case 4:!0===c?a.push(I,b,Ra): -!1!==c&&a.push(I,b,Qa,v(C(c)),H);break;case 5:isNaN(c)||a.push(I,b,Qa,v(C(c)),H);break;case 6:!isNaN(c)&&1<=c&&a.push(I,b,Qa,v(C(c)),H);break;default:d.sanitizeURL&&(c=""+c),a.push(I,b,Qa,v(C(c)),H)}}else if(ka(b)){switch(typeof c){case "function":case "symbol":return;case "boolean":if(d=b.toLowerCase().slice(0,5),"data-"!==d&&"aria-"!==d)return}a.push(I,v(b),Qa,v(C(c)),H)}}}var L=w(">"),Sa=w("/>"); -function N(a,b,c){if(null!=b){if(null!=c)throw Error(k(60));if("object"!==typeof b||!("__html"in b))throw Error(k(61));b=b.__html;null!==b&&void 0!==b&&a.push(v(""+b))}}function Ta(a){var b="";ba.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}var Ua=w(' selected=""'); -function Va(a,b,c,d,e,f,g){var m=b.rel,h=b.href,n=b.precedence;if(3===f||g||"string"!==typeof m||"string"!==typeof h||""===h)return O(a,b),null;if("stylesheet"===b.rel){c="[style]"+h;if("string"!==typeof n||null!=b.disabled||b.onLoad||b.onError)return e=d.preloadsMap.get(c),e||(e={type:"preload",chunks:[],state:0,props:Wa(h,b)},d.preloadsMap.set(c,e)),O(e.chunks,e.props),d.usedStylesheets.add(e),O(a,b);h=d.stylesMap.get(c);if(!h){b=x({},b,{"data-precedence":b.precedence,precedence:null});if(h=d.preloadsMap.get(c))h.state|= -4,h=h.props,null==b.crossOrigin&&(b.crossOrigin=h.crossOrigin),null==b.integrity&&(b.integrity=h.integrity);h={type:"stylesheet",chunks:[],state:d.boundaryResources?4:0,props:b};d.stylesMap.set(c,h);b=d.precedences.get(n);b||(b=new Set,d.precedences.set(n,b));b.add(h)}d.boundaryResources&&d.boundaryResources.add(h);e&&a.push(G);return null}if(b.onLoad||b.onError)return O(a,b);e&&a.push(G);switch(b.rel){case "preconnect":case "dns-prefetch":return O(c.preconnectChunks,b);case "preload":return O(c.preloadChunks, -b);default:return O(c.hoistableChunks,b)}}function O(a,b){a.push(P("link"));for(var c in b)if(y.call(b,c)){var d=b[c];if(null!=d)switch(c){case "children":case "dangerouslySetInnerHTML":throw Error(k(399,"link"));default:J(a,c,d)}}a.push(Sa);return null} -function Xa(a,b){a.push(P("style"));var c=null,d=null,e;for(e in b)if(y.call(b,e)){var f=b[e];if(null!=f)switch(e){case "children":c=f;break;case "dangerouslySetInnerHTML":d=f;break;default:J(a,e,f)}}a.push(L);b=Array.isArray(c)?2>c.length?c[0]:null:c;"function"!==typeof b&&"symbol"!==typeof b&&null!==b&&void 0!==b&&a.push(v(C(""+b)));N(a,d,c);a.push(Q,v("style"),R);return null} -function Ya(a,b,c){a.push(P(c));for(var d in b)if(y.call(b,d)){var e=b[d];if(null!=e)switch(d){case "children":case "dangerouslySetInnerHTML":throw Error(k(399,c));default:J(a,d,e)}}a.push(Sa);return null} -function Za(a,b){a.push(P("title"));var c=null,d=null,e;for(e in b)if(y.call(b,e)){var f=b[e];if(null!=f)switch(e){case "children":c=f;break;case "dangerouslySetInnerHTML":d=f;break;default:J(a,e,f)}}a.push(L);b=Array.isArray(c)?2>c.length?c[0]:null:c;"function"!==typeof b&&"symbol"!==typeof b&&null!==b&&void 0!==b&&a.push(v(C(""+b)));N(a,d,c);a.push(Q,v("title"),R);return null} -function $a(a,b){a.push(P("script"));var c=null,d=null,e;for(e in b)if(y.call(b,e)){var f=b[e];if(null!=f)switch(e){case "children":c=f;break;case "dangerouslySetInnerHTML":d=f;break;default:J(a,e,f)}}a.push(L);N(a,d,c);"string"===typeof c&&a.push(v(C(c)));a.push(Q,v("script"),R);return null} -function ab(a,b,c){a.push(P(c));var d=c=null,e;for(e in b)if(y.call(b,e)){var f=b[e];if(null!=f)switch(e){case "children":c=f;break;case "dangerouslySetInnerHTML":d=f;break;default:J(a,e,f)}}a.push(L);N(a,d,c);return"string"===typeof c?(a.push(v(C(c))),null):c}var bb=w("\n"),cb=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,db=new Map;function P(a){var b=db.get(a);if(void 0===b){if(!cb.test(a))throw Error(k(65,a));b=w("<"+a);db.set(a,b)}return b}var eb=w("<!DOCTYPE html>"); -function fb(a,b,c,d,e,f,g){switch(b){case "select":a.push(P("select"));d=g=null;for(var m in c)if(y.call(c,m)){var h=c[m];if(null!=h)switch(m){case "children":g=h;break;case "dangerouslySetInnerHTML":d=h;break;case "defaultValue":case "value":break;default:J(a,m,h)}}a.push(L);N(a,d,g);return g;case "option":g=f.selectedValue;a.push(P("option"));var n=d=null,r=m=null;for(h in c)if(y.call(c,h)){var u=c[h];if(null!=u)switch(h){case "children":d=u;break;case "selected":m=u;break;case "dangerouslySetInnerHTML":r= -u;break;case "value":n=u;default:J(a,h,u)}}if(null!=g)if(c=null!==n?""+n:Ta(d),ta(g))for(h=0;h<g.length;h++){if(""+g[h]===c){a.push(Ua);break}}else""+g===c&&a.push(Ua);else m&&a.push(Ua);a.push(L);N(a,r,d);return d;case "textarea":a.push(P("textarea"));h=d=g=null;for(n in c)if(y.call(c,n)&&(r=c[n],null!=r))switch(n){case "children":h=r;break;case "value":g=r;break;case "defaultValue":d=r;break;case "dangerouslySetInnerHTML":throw Error(k(91));default:J(a,n,r)}null===g&&null!==d&&(g=d);a.push(L);if(null!= -h){if(null!=g)throw Error(k(92));if(ta(h)&&1<h.length)throw Error(k(93));g=""+h}"string"===typeof g&&"\n"===g[0]&&a.push(bb);null!==g&&a.push(v(C(""+g)));return null;case "input":a.push(P("input"));n=h=d=g=null;for(r in c)if(y.call(c,r)&&(m=c[r],null!=m))switch(r){case "children":case "dangerouslySetInnerHTML":throw Error(k(399,"input"));case "defaultChecked":n=m;break;case "defaultValue":d=m;break;case "checked":h=m;break;case "value":g=m;break;default:J(a,r,m)}null!==h?J(a,"checked",h):null!==n&& -J(a,"checked",n);null!==g?J(a,"value",g):null!==d&&J(a,"value",d);a.push(Sa);return null;case "menuitem":a.push(P("menuitem"));for(var E in c)if(y.call(c,E)&&(g=c[E],null!=g))switch(E){case "children":case "dangerouslySetInnerHTML":throw Error(k(400));default:J(a,E,g)}a.push(L);return null;case "title":return 3===f.insertionMode||f.noscriptTagInScope?a=Za(a,c):(Za(e.hoistableChunks,c),a=null),a;case "link":return Va(a,c,e,d,g,f.insertionMode,f.noscriptTagInScope);case "script":a:if(3===f.insertionMode|| -f.noscriptTagInScope||"string"!==typeof c.src||!c.src)a=$a(a,c);else{n="[script]"+c.src;if(!0!==c.async||c.onLoad||c.onError){if(h=d.preloadsMap.get(n),h||(h={type:"preload",chunks:[],state:0,props:{rel:"preload",as:"script",href:c.src,crossOrigin:c.crossOrigin,integrity:c.integrity,referrerPolicy:c.referrerPolicy}},d.preloadsMap.set(n,h),d.usedScripts.add(h),O(h.chunks,h.props)),!0!==c.async){$a(a,c);a=null;break a}}else if(h=d.scriptsMap.get(n),!h){h={type:"script",chunks:[],state:0,props:null}; -d.scriptsMap.set(n,h);d.scripts.add(h);r=c;if(d=d.preloadsMap.get(n))d.state|=4,c=r=x({},c),d=d.props,null==c.crossOrigin&&(c.crossOrigin=d.crossOrigin),null==c.integrity&&(c.integrity=d.integrity);$a(h.chunks,r)}g&&a.push(G);a=null}return a;case "style":return h=c.precedence,r=c.href,3===f.insertionMode||f.noscriptTagInScope||"string"!==typeof h||"string"!==typeof r||""===r?a=Xa(a,c):(n="[style]"+r,r=d.stylesMap.get(n),r||(r={type:"style",chunks:[],state:d.boundaryResources?4:0,props:x({},c,{"data-precedence":c.precedence, -precedence:null,"data-href":c.href,href:null})},d.stylesMap.set(n,r),Xa(r.chunks,r.props),c=d.precedences.get(h),c||(c=new Set,d.precedences.set(h,c)),c.add(r),d.boundaryResources&&d.boundaryResources.add(r)),g&&a.push(G),a=void 0),a;case "meta":return 3===f.insertionMode||f.noscriptTagInScope?a=Ya(a,c,"meta"):(g&&a.push(G),a="string"===typeof c.charSet?Ya(e.charsetChunks,c,"meta"):Ya(e.hoistableChunks,c,"meta")),a;case "listing":case "pre":a.push(P(b));d=g=null;for(u in c)if(y.call(c,u)&&(h=c[u], -null!=h))switch(u){case "children":g=h;break;case "dangerouslySetInnerHTML":d=h;break;default:J(a,u,h)}a.push(L);if(null!=d){if(null!=g)throw Error(k(60));if("object"!==typeof d||!("__html"in d))throw Error(k(61));c=d.__html;null!==c&&void 0!==c&&("string"===typeof c&&0<c.length&&"\n"===c[0]?a.push(bb,v(c)):a.push(v(""+c)))}"string"===typeof g&&"\n"===g[0]&&a.push(bb);return g;case "base":case "area":case "br":case "col":case "embed":case "hr":case "img":case "keygen":case "param":case "source":case "track":case "wbr":return Ya(a, -c,b);case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return ab(a,c,b);case "head":return 2>f.insertionMode&&null===e.headChunks?(e.headChunks=[],a=ab(e.headChunks,c,"head")):a=ab(a,c,"head"),a;case "html":return 0===f.insertionMode&&null===e.htmlChunks?(e.htmlChunks=[eb],a=ab(e.htmlChunks,c,"html")):a=ab(a,c,"html"),a;default:if(-1===b.indexOf("-")&&"string"!==typeof c.is)return ab(a, -c,b);a.push(P(b));d=g=null;for(var A in c)if(y.call(c,A)&&(h=c[A],null!=h))switch(A){case "children":g=h;break;case "dangerouslySetInnerHTML":d=h;break;case "style":Pa(a,h);break;case "suppressContentEditableWarning":case "suppressHydrationWarning":break;default:ka(A)&&"function"!==typeof h&&"symbol"!==typeof h&&a.push(I,v(A),Qa,v(C(h)),H)}a.push(L);N(a,d,g);return g}} -var Q=w("</"),R=w(">"),gb=w('<template id="'),hb=w('"></template>'),ib=w("\x3c!--$--\x3e"),jb=w('\x3c!--$?--\x3e<template id="'),kb=w('"></template>'),lb=w("\x3c!--$!--\x3e"),mb=w("\x3c!--/$--\x3e"),nb=w("<template"),ob=w('"'),pb=w(' data-dgst="');w(' data-msg="');w(' data-stck="');var qb=w("></template>");function rb(a,b,c){q(a,jb);if(null===c)throw Error(k(395));q(a,c);return t(a,kb)} -var sb=w('<div hidden id="'),tb=w('">'),ub=w("</div>"),vb=w('<svg aria-hidden="true" style="display:none" id="'),wb=w('">'),xb=w("</svg>"),yb=w('<math aria-hidden="true" style="display:none" id="'),zb=w('">'),Ab=w("</math>"),Bb=w('<table hidden id="'),Cb=w('">'),Db=w("</table>"),Eb=w('<table hidden><tbody id="'),Fb=w('">'),Gb=w("</tbody></table>"),Hb=w('<table hidden><tr id="'),Ib=w('">'),Jb=w("</tr></table>"),Kb=w('<table hidden><colgroup id="'),Lb=w('">'),Mb=w("</colgroup></table>"); -function Nb(a,b,c,d){switch(c.insertionMode){case 0:case 1:case 2:return q(a,sb),q(a,b.segmentPrefix),q(a,v(d.toString(16))),t(a,tb);case 3:return q(a,vb),q(a,b.segmentPrefix),q(a,v(d.toString(16))),t(a,wb);case 4:return q(a,yb),q(a,b.segmentPrefix),q(a,v(d.toString(16))),t(a,zb);case 5:return q(a,Bb),q(a,b.segmentPrefix),q(a,v(d.toString(16))),t(a,Cb);case 6:return q(a,Eb),q(a,b.segmentPrefix),q(a,v(d.toString(16))),t(a,Fb);case 7:return q(a,Hb),q(a,b.segmentPrefix),q(a,v(d.toString(16))),t(a,Ib); -case 8:return q(a,Kb),q(a,b.segmentPrefix),q(a,v(d.toString(16))),t(a,Lb);default:throw Error(k(397));}}function Ob(a,b){switch(b.insertionMode){case 0:case 1:case 2:return t(a,ub);case 3:return t(a,xb);case 4:return t(a,Ab);case 5:return t(a,Db);case 6:return t(a,Gb);case 7:return t(a,Jb);case 8:return t(a,Mb);default:throw Error(k(397));}} -var Pb=w('$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};;$RS("'),Qb=w('$RS("'),Rb=w('","'),Sb=w('")\x3c/script>');w('<template data-rsi="" data-sid="');w('" data-pid="'); -var Tb=w('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RC("'),Ub=w('$RC("'), -Vb=w('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RM=new Map;\n$RR=function(p,q,w){function r(l){this.s=l}for(var t=$RC,m=$RM,u=new Map,n=new Map,g=document,h,e,f=g.querySelectorAll("template[data-precedence]"),c=0;e=f[c++];){for(var b=e.content.firstChild;b;b=b.nextSibling)u.set(b.getAttribute("data-href"),b);e.parentNode.removeChild(e)}f=g.querySelectorAll("link[data-precedence],style[data-precedence]");for(c=0;e=f[c++];)m.set(e.getAttribute("STYLE"===e.nodeName?"data-href":"href"),e),n.set(e.dataset.precedence,h=e);e=0;f=[];for(var d,\nv,a;d=w[e++];){var k=0;b=d[k++];if(!(a=m.get(b))){if(a=u.get(b))c=a.getAttribute("data-precedence");else{a=g.createElement("link");a.href=b;a.rel="stylesheet";for(a.dataset.precedence=c=d[k++];v=d[k++];)a.setAttribute(v,d[k++]);d=a._p=new Promise(function(l,x){a.onload=l;a.onerror=x});d.then(r.bind(d,"l"),r.bind(d,"e"))}m.set(b,a);b=n.get(c)||h;b===h&&(h=a);n.set(c,a);b?b.parentNode.insertBefore(a,b.nextSibling):(c=g.head,c.insertBefore(a,c.firstChild))}d=a._p;c=a.getAttribute("media");!d||"l"===\nd.s||c&&!matchMedia(c).matches||f.push(d)}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};$RR("'), -Wb=w('$RM=new Map;\n$RR=function(p,q,w){function r(l){this.s=l}for(var t=$RC,m=$RM,u=new Map,n=new Map,g=document,h,e,f=g.querySelectorAll("template[data-precedence]"),c=0;e=f[c++];){for(var b=e.content.firstChild;b;b=b.nextSibling)u.set(b.getAttribute("data-href"),b);e.parentNode.removeChild(e)}f=g.querySelectorAll("link[data-precedence],style[data-precedence]");for(c=0;e=f[c++];)m.set(e.getAttribute("STYLE"===e.nodeName?"data-href":"href"),e),n.set(e.dataset.precedence,h=e);e=0;f=[];for(var d,\nv,a;d=w[e++];){var k=0;b=d[k++];if(!(a=m.get(b))){if(a=u.get(b))c=a.getAttribute("data-precedence");else{a=g.createElement("link");a.href=b;a.rel="stylesheet";for(a.dataset.precedence=c=d[k++];v=d[k++];)a.setAttribute(v,d[k++]);d=a._p=new Promise(function(l,x){a.onload=l;a.onerror=x});d.then(r.bind(d,"l"),r.bind(d,"e"))}m.set(b,a);b=n.get(c)||h;b===h&&(h=a);n.set(c,a);b?b.parentNode.insertBefore(a,b.nextSibling):(c=g.head,c.insertBefore(a,c.firstChild))}d=a._p;c=a.getAttribute("media");!d||"l"===\nd.s||c&&!matchMedia(c).matches||f.push(d)}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};$RR("'), -Xb=w('$RR("'),Yb=w('","'),Zb=w('",'),$b=w('"'),ac=w(")\x3c/script>");w('<template data-rci="" data-bid="');w('<template data-rri="" data-bid="');w('" data-sid="');w('" data-sty="');var bc=w('$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};;$RX("'),cc=w('$RX("'),dc=w('"'),ec=w(","),fc=w(")\x3c/script>");w('<template data-rxi="" data-bid="');w('" data-dgst="');w('" data-msg="'); -w('" data-stck="');var gc=/[<\u2028\u2029]/g;function hc(a){return JSON.stringify(a).replace(gc,function(a){switch(a){case "<":return"\\u003c";case "\u2028":return"\\u2028";case "\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React");}})}var ic=/[&><\u2028\u2029]/g; -function jc(a){return JSON.stringify(a).replace(ic,function(a){switch(a){case "&":return"\\u0026";case ">":return"\\u003e";case "<":return"\\u003c";case "\u2028":return"\\u2028";case "\u2029":return"\\u2029";default:throw Error("escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React");}})}var kc=w('<template data-precedence="">'),lc=w("</template>"),mc=!1; -function nc(a){if("style"===a.type&&0===(a.state&3)){!1===mc&&(mc=!0,q(this,kc));for(var b=a.chunks,c=0;c<b.length;c++)q(this,b[c]);a.state|=2}}function oc(a,b){mc=!1;b.forEach(nc,a);return mc?t(a,lc):!0}var pc=w('<style data-precedence="'),qc=w('"></style>');function rc(a){if(0===(a.state&7)){for(var b=a.chunks,c=0;c<b.length;c++)q(this,b[c]);a.state|=1}}function sc(a){if(0===(a.state&3)){for(var b=a.chunks,c=0;c<b.length;c++)q(this,b[c]);a.state|=2}}var tc=!1; -function uc(a,b,c){b=a.chunks;if(a.state&3)c.delete(a);else if(!(a.state&4)){tc=!0;"stylesheet"===a.type&&O(b,a.props);for(var d=0;d<b.length;d++)q(this,b[d]);a.state|=1;c.delete(a)}}function vc(a,b){tc=!1;a.forEach(uc,this);tc||(q(this,pc),q(this,v(C(b))),q(this,qc))}function wc(a){if("style"!==a.type){var b=a.chunks,c=Wa(a.props.href,a.props);O(b,c);for(c=0;c<b.length;c++)q(this,b[c]);a.state|=8;b.length=0}}function xc(a){a.forEach(wc,this);a.clear()} -function yc(a){if("style"!==a.type){var b=a.chunks,c=Wa(a.props.href,a.props);O(b,c);for(c=0;c<b.length;c++)q(this,b[c]);a.state|=8;b.length=0}}function zc(a){a.forEach(yc,this);a.clear()} -function Ac(a,b,c){var d=c.htmlChunks,e=c.headChunks,f=0;if(d){for(f=0;f<d.length;f++)q(a,d[f]);if(e)for(f=0;f<e.length;f++)q(a,e[f]);else q(a,P("head")),q(a,L)}else if(e)for(f=0;f<e.length;f++)q(a,e[f]);var g=c.charsetChunks;for(f=0;f<g.length;f++)q(a,g[f]);g.length=0;g=c.preconnectChunks;for(f=0;f<g.length;f++)q(a,g[f]);g.length=0;b.fontPreloads.forEach(rc,a);b.fontPreloads.clear();b.precedences.forEach(vc,a);b.precedences.forEach(xc,a);b.usedStylesheets.forEach(function(c){if(!b.stylesMap.has("["+ -c.props.as+"]"+c.props.href))for(c=c.chunks,f=0;f<c.length;f++)q(a,c[f])});b.usedStylesheets.clear();b.scripts.forEach(rc,a);b.scripts.clear();b.usedScripts.forEach(rc,a);b.usedScripts.clear();b.explicitStylesheetPreloads.forEach(rc,a);b.explicitStylesheetPreloads.clear();b.explicitScriptPreloads.forEach(rc,a);b.explicitScriptPreloads.clear();b.explicitOtherPreloads.forEach(rc,a);b.explicitOtherPreloads.clear();g=c.preloadChunks;for(f=0;f<g.length;f++)q(a,g[f]);g.length=0;c=c.hoistableChunks;for(f= -0;f<c.length;f++)q(a,c[f]);c.length=0;d&&null===e&&(q(a,Q),q(a,v("head")),q(a,R))} -function Bc(a,b,c){var d=0,e=c.preconnectChunks;for(d=0;d<e.length;d++)q(a,e[d]);e.length=0;b.fontPreloads.forEach(sc,a);b.fontPreloads.clear();b.precedences.forEach(zc,a);b.usedStylesheets.forEach(function(c){if(!b.stylesMap.has("["+c.props.as+"]"+c.props.href))for(c=c.chunks,d=0;d<c.length;d++)q(a,c[d])});b.usedStylesheets.clear();b.scripts.forEach(sc,a);b.scripts.clear();b.usedScripts.forEach(sc,a);b.usedScripts.clear();b.explicitStylesheetPreloads.forEach(sc,a);b.explicitStylesheetPreloads.clear(); -b.explicitScriptPreloads.forEach(sc,a);b.explicitScriptPreloads.clear();b.explicitOtherPreloads.forEach(sc,a);b.explicitOtherPreloads.clear();e=c.preloadChunks;for(d=0;d<e.length;d++)q(a,e[d]);e.length=0;c=c.hoistableChunks;for(d=0;d<c.length;d++)q(a,c[d]);c.length=0}var Cc=w("["),Dc=w(",["),Ec=w(","),Fc=w("]"); -function Gc(a,b){q(a,Cc);var c=Cc;b.forEach(function(b){if(!(b.state&1))if(b.state&3)q(a,c),q(a,v(jc(""+("style"===b.type?b.props["data-href"]:b.props.href)))),q(a,Fc),c=Dc;else if("stylesheet"===b.type){q(a,c);var d=b.props["data-precedence"],f=b.props;q(a,v(jc(""+b.props.href)));d=""+d;q(a,Ec);q(a,v(jc(d)));for(var g in f)if(y.call(f,g)){var m=f[g];if(null!=m)switch(g){case "href":case "rel":case "precedence":case "data-precedence":break;case "children":case "dangerouslySetInnerHTML":throw Error(k(399, -"link"));default:a:{d=a;var h=g,n=h.toLowerCase();switch(typeof m){case "function":case "symbol":break a}switch(h){case "innerHTML":case "dangerouslySetInnerHTML":case "suppressContentEditableWarning":case "suppressHydrationWarning":case "style":break a;case "className":n="class";break;case "hidden":if(!1===m)break a;break;case "src":case "href":break;default:if(!ka(h))break a}if(!(2<h.length)||"o"!==h[0]&&"O"!==h[0]||"n"!==h[1]&&"N"!==h[1])m=""+m,q(d,Ec),q(d,v(jc(n))),q(d,Ec),q(d,v(jc(m)))}}}q(a, -Fc);c=Dc;b.state|=2}});q(a,Fc)} -function va(a,b){if(D){var c=D;if("string"===typeof a&&a&&"object"===typeof b&&null!==b&&"string"===typeof b.as){var d=b.as,e="["+d+"]"+a,f=c.preloadsMap.get(e);f||(f={type:"preload",chunks:[],state:0,props:{rel:"preload",as:d,href:a,crossOrigin:"font"===d?"":b.crossOrigin,integrity:b.integrity}},c.preloadsMap.set(e,f),O(f.chunks,f.props));switch(d){case "font":c.fontPreloads.add(f);break;case "style":c.explicitStylesheetPreloads.add(f);break;case "script":c.explicitScriptPreloads.add(f);break;default:c.explicitOtherPreloads.add(f)}}}} -function wa(a,b){if(D)a:{var c=D;if("string"===typeof a&&a&&"object"===typeof b&&null!==b){var d=b.as;switch(d){case "style":var e="["+d+"]"+a;d=c.stylesMap.get(e);var f=b.precedence||"default";d||(d={type:"stylesheet",chunks:[],state:0,props:{rel:"stylesheet",href:a,"data-precedence":f,crossOrigin:b.crossOrigin,integrity:b.integrity}},c.stylesMap.set(e,d),a=c.precedences.get(f),a||(a=new Set,c.precedences.set(f,a)),a.add(d));break a;case "script":f="["+d+"]"+a,d=c.scriptsMap.get(f),d||(d={type:"script", -chunks:[],state:0,props:null},c.scriptsMap.set(f,d),a={src:a,async:!0,crossOrigin:b.crossOrigin,integrity:b.integrity},c.scripts.add(d),$a(d.chunks,a))}}}}function Wa(a,b){return{rel:"preload",as:"style",href:a,crossOrigin:b.crossOrigin,integrity:b.integrity,media:b.media,hrefLang:b.hrefLang,referrerPolicy:b.referrerPolicy}}function Hc(a){this.add(a)}function Ic(a){a.state&=-5} -var Jc=Symbol.for("react.element"),Kc=Symbol.for("react.portal"),Lc=Symbol.for("react.fragment"),Mc=Symbol.for("react.strict_mode"),Nc=Symbol.for("react.profiler"),Oc=Symbol.for("react.provider"),Pc=Symbol.for("react.context"),Qc=Symbol.for("react.server_context"),Rc=Symbol.for("react.forward_ref"),Sc=Symbol.for("react.suspense"),Tc=Symbol.for("react.suspense_list"),Uc=Symbol.for("react.memo"),Vc=Symbol.for("react.lazy"),Wc=Symbol.for("react.scope"),Xc=Symbol.for("react.debug_trace_mode"),Yc=Symbol.for("react.offscreen"), -Zc=Symbol.for("react.legacy_hidden"),$c=Symbol.for("react.cache"),ad=Symbol.for("react.default_value"),bd=Symbol.iterator; -function cd(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case Lc:return"Fragment";case Kc:return"Portal";case Nc:return"Profiler";case Mc:return"StrictMode";case Sc:return"Suspense";case Tc:return"SuspenseList";case $c:return"Cache"}if("object"===typeof a)switch(a.$$typeof){case Pc:return(a.displayName||"Context")+".Consumer";case Oc:return(a._context.displayName||"Context")+".Provider";case Rc:var b=a.render;a=a.displayName; -a||(a=b.displayName||b.name||"",a=""!==a?"ForwardRef("+a+")":"ForwardRef");return a;case Uc:return b=a.displayName||null,null!==b?b:cd(a.type)||"Memo";case Vc:b=a._payload;a=a._init;try{return cd(a(b))}catch(c){break}case Qc:return(a.displayName||a._globalName)+".Provider"}return null}var dd=ba.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ed={};function fd(a,b){a=a.contextTypes;if(!a)return ed;var c={},d;for(d in a)c[d]=b[d];return c}var S=null; -function gd(a,b){if(a!==b){a.context._currentValue=a.parentValue;a=a.parent;var c=b.parent;if(null===a){if(null!==c)throw Error(k(401));}else{if(null===c)throw Error(k(401));gd(a,c)}b.context._currentValue=b.value}}function hd(a){a.context._currentValue=a.parentValue;a=a.parent;null!==a&&hd(a)}function id(a){var b=a.parent;null!==b&&id(b);a.context._currentValue=a.value} -function jd(a,b){a.context._currentValue=a.parentValue;a=a.parent;if(null===a)throw Error(k(402));a.depth===b.depth?gd(a,b):jd(a,b)}function kd(a,b){var c=b.parent;if(null===c)throw Error(k(402));a.depth===c.depth?gd(a,c):kd(a,c);b.context._currentValue=b.value}function ld(a){var b=S;b!==a&&(null===b?id(a):null===a?hd(b):b.depth===a.depth?gd(b,a):b.depth>a.depth?jd(b,a):kd(b,a),S=a)} -var md={isMounted:function(){return!1},enqueueSetState:function(a,b){a=a._reactInternals;null!==a.queue&&a.queue.push(b)},enqueueReplaceState:function(a,b){a=a._reactInternals;a.replace=!0;a.queue=[b]},enqueueForceUpdate:function(){}}; -function nd(a,b,c,d){var e=void 0!==a.state?a.state:null;a.updater=md;a.props=c;a.state=e;var f={queue:[],replace:!1};a._reactInternals=f;var g=b.contextType;a.context="object"===typeof g&&null!==g?g._currentValue:d;g=b.getDerivedStateFromProps;"function"===typeof g&&(g=g(c,e),e=null===g||void 0===g?e:x({},e,g),a.state=e);if("function"!==typeof b.getDerivedStateFromProps&&"function"!==typeof a.getSnapshotBeforeUpdate&&("function"===typeof a.UNSAFE_componentWillMount||"function"===typeof a.componentWillMount))if(b= -a.state,"function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),b!==a.state&&md.enqueueReplaceState(a,a.state,null),null!==f.queue&&0<f.queue.length)if(b=f.queue,g=f.replace,f.queue=null,f.replace=!1,g&&1===b.length)a.state=b[0];else{f=g?b[0]:a.state;e=!0;for(g=g?1:0;g<b.length;g++){var m=b[g];m="function"===typeof m?m.call(a,f,c,d):m;null!=m&&(e?(e=!1,f=x({},f,m)):x(f,m))}a.state=f}else f.queue=null} -var od={id:1,overflow:""};function pd(a,b,c){var d=a.id;a=a.overflow;var e=32-qd(d)-1;d&=~(1<<e);c+=1;var f=32-qd(b)+e;if(30<f){var g=e-e%5;f=(d&(1<<g)-1).toString(32);d>>=g;e-=g;return{id:1<<32-qd(b)+e|c<<e|d,overflow:f+a}}return{id:1<<f|c<<e|d,overflow:a}}var qd=Math.clz32?Math.clz32:rd,sd=Math.log,td=Math.LN2;function rd(a){a>>>=0;return 0===a?32:31-(sd(a)/td|0)|0}var ud=Error(k(460));function vd(){} -function wd(a,b,c){c=a[c];void 0===c?a.push(b):c!==b&&(b.then(vd,vd),b=c);switch(b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;default:if("string"!==typeof b.status)switch(a=b,a.status="pending",a.then(function(a){if("pending"===b.status){var c=b;c.status="fulfilled";c.value=a}},function(a){if("pending"===b.status){var c=b;c.status="rejected";c.reason=a}}),b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;}xd=b;throw ud;}}var xd=null; -function yd(){if(null===xd)throw Error(k(459));var a=xd;xd=null;return a}function zd(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var Ad="function"===typeof Object.is?Object.is:zd,T=null,Bd=null,Cd=null,U=null,Dd=!1,Ed=!1,Fd=0,Gd=0,V=null,W=null,Hd=0;function X(){if(null===T)throw Error(k(321));return T}function Id(){if(0<Hd)throw Error(k(312));return{memoizedState:null,queue:null,next:null}} -function Jd(){null===U?null===Cd?(Dd=!1,Cd=U=Id()):(Dd=!0,U=Cd):null===U.next?(Dd=!1,U=U.next=Id()):(Dd=!0,U=U.next);return U}function Kd(a,b,c,d){for(;Ed;)Ed=!1,Gd=Fd=0,Hd+=1,U=null,c=a(b,d);Ld();return c}function Md(){var a=V;V=null;return a}function Ld(){Bd=T=null;Ed=!1;Cd=null;Hd=0;U=W=null}function Nd(a,b){return"function"===typeof b?b(a):b} -function Od(a,b,c){T=X();U=Jd();if(Dd){var d=U.queue;b=d.dispatch;if(null!==W&&(c=W.get(d),void 0!==c)){W.delete(d);d=U.memoizedState;do d=a(d,c.action),c=c.next;while(null!==c);U.memoizedState=d;return[d,b]}return[U.memoizedState,b]}a=a===Nd?"function"===typeof b?b():b:void 0!==c?c(b):b;U.memoizedState=a;a=U.queue={last:null,dispatch:null};a=a.dispatch=Pd.bind(null,T,a);return[U.memoizedState,a]} -function Qd(a,b){T=X();U=Jd();b=void 0===b?null:b;if(null!==U){var c=U.memoizedState;if(null!==c&&null!==b){var d=c[1];a:if(null===d)d=!1;else{for(var e=0;e<d.length&&e<b.length;e++)if(!Ad(b[e],d[e])){d=!1;break a}d=!0}if(d)return c[0]}}a=a();U.memoizedState=[a,b];return a}function Pd(a,b,c){if(25<=Hd)throw Error(k(301));if(a===T)if(Ed=!0,a={action:c,next:null},null===W&&(W=new Map),c=W.get(b),void 0===c)W.set(b,a);else{for(b=c;null!==b.next;)b=b.next;b.next=a}} -function Rd(){throw Error(k(394));}function Sd(){throw Error(k(393));}function Td(){} -var Vd={readContext:function(a){return a._currentValue},useContext:function(a){X();return a._currentValue},useMemo:Qd,useReducer:Od,useRef:function(a){T=X();U=Jd();var b=U.memoizedState;return null===b?(a={current:a},U.memoizedState=a):b},useState:function(a){return Od(Nd,a)},useInsertionEffect:Td,useLayoutEffect:function(){},useCallback:function(a,b){return Qd(function(){return a},b)},useImperativeHandle:Td,useEffect:Td,useDebugValue:Td,useDeferredValue:function(a){X();return a},useTransition:function(){X(); -return[!1,Rd]},useId:function(){var a=Bd.treeContext;var b=a.overflow;a=a.id;a=(a&~(1<<32-qd(a)-1)).toString(32)+b;var c=Ud;if(null===c)throw Error(k(404));b=Fd++;a=":"+c.idPrefix+"R"+a;0<b&&(a+="H"+b.toString(32));return a+":"},useMutableSource:function(a,b){X();return b(a._source)},useSyncExternalStore:function(a,b,c){if(void 0===c)throw Error(k(407));return c()},useCacheRefresh:function(){return Sd},use:function(a){if(null!==a&&"object"===typeof a){if("function"===typeof a.then){var b=Gd;Gd+=1; -null===V&&(V=[]);return wd(V,a,b)}if(a.$$typeof===Pc||a.$$typeof===Qc)return a._currentValue}throw Error(k(438,String(a)));}},Ud=null,Wd={getCacheSignal:function(){throw Error(k(248));},getCacheForType:function(){throw Error(k(248));}},Xd=dd.ReactCurrentDispatcher,Yd=dd.ReactCurrentCache;function Zd(a){console.error(a);return null}function $d(){} -function ae(a,b,c,d,e,f,g,m,h){var n=[],r=new Set,u={preloadsMap:new Map,stylesMap:new Map,scriptsMap:new Map,fontPreloads:new Set,precedences:new Map,usedStylesheets:new Set,scripts:new Set,usedScripts:new Set,explicitStylesheetPreloads:new Set,explicitScriptPreloads:new Set,explicitOtherPreloads:new Set,boundaryResources:null};b={destination:null,responseState:b,progressiveChunkSize:void 0===d?12800:d,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,resources:u,completedRootSegment:null, -abortableTasks:r,pingedTasks:n,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:void 0===e?Zd:e,onAllReady:void 0===f?$d:f,onShellReady:void 0===g?$d:g,onShellError:void 0===m?$d:m,onFatalError:void 0===h?$d:h};c=be(b,0,null,c,!1,!1);c.parentFlushed=!0;a=ce(b,null,a,null,c,r,ed,null,od);n.push(a);return b} -function ce(a,b,c,d,e,f,g,m,h){a.allPendingTasks++;null===d?a.pendingRootTasks++:d.pendingTasks++;var n={node:c,ping:function(){var b=a.pingedTasks;b.push(n);1===b.length&&de(a)},blockedBoundary:d,blockedSegment:e,abortSet:f,legacyContext:g,context:m,treeContext:h,thenableState:b};f.add(n);return n}function be(a,b,c,d,e,f){return{status:0,id:-1,index:b,parentFlushed:!1,chunks:[],children:[],formatContext:d,boundary:c,lastPushedText:e,textEmbedded:f}} -function ee(a,b){a=a.onError(b);if(null!=a&&"string"!==typeof a)throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof a+'" instead');return a}function fe(a,b){var c=a.onShellError;c(b);c=a.onFatalError;c(b);null!==a.destination?(a.status=2,fa(a.destination,b)):(a.status=1,a.fatalError=b)} -function ge(a,b){if(null!==a.completedRootSegment||0<a.pendingRootTasks)a=b.resources,a.forEach(Ic),a.clear()}function he(a,b,c,d){var e=c.render(),f=d.childContextTypes;if(null!==f&&void 0!==f){var g=b.legacyContext;if("function"!==typeof c.getChildContext)d=g;else{c=c.getChildContext();for(var m in c)if(!(m in f))throw Error(k(108,cd(d)||"Unknown",m));d=x({},g,c)}b.legacyContext=d;Y(a,b,null,e);b.legacyContext=g}else Y(a,b,null,e)} -function ie(a,b){if(a&&a.defaultProps){b=x({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c]);return b}return b} -function je(a,b,c,d,e,f){if("function"===typeof d)if(d.prototype&&d.prototype.isReactComponent)c=fd(d,b.legacyContext),f=d.contextType,f=new d(e,"object"===typeof f&&null!==f?f._currentValue:c),nd(f,d,e,c),he(a,b,f,d);else{f=fd(d,b.legacyContext);T={};Bd=b;Gd=Fd=0;V=c;c=d(e,f);c=Kd(d,e,c,f);var g=0!==Fd;if("object"===typeof c&&null!==c&&"function"===typeof c.render&&void 0===c.$$typeof)nd(c,d,e,f),he(a,b,c,d);else if(g){e=b.treeContext;b.treeContext=pd(e,1,0);try{Y(a,b,null,c)}finally{b.treeContext= -e}}else Y(a,b,null,c)}else if("string"===typeof d){c=b.blockedSegment;g=fb(c.chunks,d,e,a.resources,a.responseState,c.formatContext,c.lastPushedText);c.lastPushedText=!1;f=c.formatContext;c.formatContext=Ja(f,d,e);ke(a,b,g);c.formatContext=f;a:{b=c.chunks;switch(d){case "title":case "style":case "script":case "area":case "base":case "br":case "col":case "embed":case "hr":case "img":case "input":case "keygen":case "link":case "meta":case "param":case "source":case "track":case "wbr":break a;case "body":if(1>= -f.insertionMode){a.responseState.hasBody=!0;break a}break;case "html":if(0===f.insertionMode)break a}b.push(Q,v(d),R)}c.lastPushedText=!1}else{switch(d){case Zc:case Xc:case Mc:case Nc:case Lc:Y(a,b,null,e.children);return;case Yc:"hidden"!==e.mode&&Y(a,b,null,e.children);return;case Tc:Y(a,b,null,e.children);return;case Wc:throw Error(k(343));case Sc:a:{d=b.blockedBoundary;c=b.blockedSegment;f=e.fallback;e=e.children;g=new Set;var m={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1, -completedSegments:[],byteSize:0,fallbackAbortableTasks:g,errorDigest:null,resources:new Set},h=be(a,c.chunks.length,m,c.formatContext,!1,!1);c.children.push(h);c.lastPushedText=!1;var n=be(a,0,null,c.formatContext,!1,!1);n.parentFlushed=!0;b.blockedBoundary=m;b.blockedSegment=n;a.resources.boundaryResources=m.resources;try{if(ke(a,b,e),n.lastPushedText&&n.textEmbedded&&n.chunks.push(G),n.status=1,0===m.pendingTasks&&ge(a,m),le(m,n),0===m.pendingTasks)break a}catch(r){n.status=4,m.forceClientRender= -!0,m.errorDigest=ee(a,r)}finally{a.resources.boundaryResources=d?d.resources:null,b.blockedBoundary=d,b.blockedSegment=c}b=ce(a,null,f,d,h,g,b.legacyContext,b.context,b.treeContext);a.pingedTasks.push(b)}return}if("object"===typeof d&&null!==d)switch(d.$$typeof){case Rc:d=d.render;T={};Bd=b;Gd=Fd=0;V=c;c=d(e,f);e=Kd(d,e,c,f);if(0!==Fd){d=b.treeContext;b.treeContext=pd(d,1,0);try{Y(a,b,null,e)}finally{b.treeContext=d}}else Y(a,b,null,e);return;case Uc:d=d.type;e=ie(d,e);je(a,b,c,d,e,f);return;case Oc:c= -e.children;d=d._context;e=e.value;f=d._currentValue;d._currentValue=e;g=S;S=e={parent:g,depth:null===g?0:g.depth+1,context:d,parentValue:f,value:e};b.context=e;Y(a,b,null,c);a=S;if(null===a)throw Error(k(403));e=a.parentValue;a.context._currentValue=e===ad?a.context._defaultValue:e;a=S=a.parent;b.context=a;return;case Pc:e=e.children;e=e(d._currentValue);Y(a,b,null,e);return;case Vc:f=d._init;d=f(d._payload);e=ie(d,e);je(a,b,c,d,e,void 0);return}throw Error(k(130,null==d?d:typeof d,""));}} -function Y(a,b,c,d){b.node=d;if("object"===typeof d&&null!==d){switch(d.$$typeof){case Jc:je(a,b,c,d.type,d.props,d.ref);return;case Kc:throw Error(k(257));case Vc:c=d._init;d=c(d._payload);Y(a,b,null,d);return}if(ta(d)){me(a,b,d);return}null===d||"object"!==typeof d?c=null:(c=bd&&d[bd]||d["@@iterator"],c="function"===typeof c?c:null);if(c&&(c=c.call(d))){d=c.next();if(!d.done){var e=[];do e.push(d.value),d=c.next();while(!d.done);me(a,b,e)}return}a=Object.prototype.toString.call(d);throw Error(k(31, -"[object Object]"===a?"object with keys {"+Object.keys(d).join(", ")+"}":a));}"string"===typeof d?(c=b.blockedSegment,c.lastPushedText=Ka(b.blockedSegment.chunks,d,a.responseState,c.lastPushedText)):"number"===typeof d&&(c=b.blockedSegment,c.lastPushedText=Ka(b.blockedSegment.chunks,""+d,a.responseState,c.lastPushedText))}function me(a,b,c){for(var d=c.length,e=0;e<d;e++){var f=b.treeContext;b.treeContext=pd(f,d,e);try{ke(a,b,c[e])}finally{b.treeContext=f}}} -function ke(a,b,c){var d=b.blockedSegment.formatContext,e=b.legacyContext,f=b.context;try{return Y(a,b,null,c)}catch(n){if(Ld(),c=n===ud?yd():n,"object"===typeof c&&null!==c&&"function"===typeof c.then){var g=Md(),m=b.blockedSegment,h=be(a,m.chunks.length,null,m.formatContext,m.lastPushedText,!0);m.children.push(h);m.lastPushedText=!1;a=ce(a,g,b.node,b.blockedBoundary,h,b.abortSet,b.legacyContext,b.context,b.treeContext).ping;c.then(a,a);b.blockedSegment.formatContext=d;b.legacyContext=e;b.context= -f;ld(f)}else throw b.blockedSegment.formatContext=d,b.legacyContext=e,b.context=f,ld(f),c;}}function ne(a){var b=a.blockedBoundary;a=a.blockedSegment;a.status=3;oe(this,b,a)} -function pe(a,b,c){var d=a.blockedBoundary;a.blockedSegment.status=3;null===d?(b.allPendingTasks--,1!==b.status&&2!==b.status&&(ee(b,c),fe(b,c))):(d.pendingTasks--,d.forceClientRender||(d.forceClientRender=!0,d.errorDigest=b.onError(c),d.parentFlushed&&b.clientRenderedBoundaries.push(d)),d.fallbackAbortableTasks.forEach(function(a){return pe(a,b,c)}),d.fallbackAbortableTasks.clear(),b.allPendingTasks--,0===b.allPendingTasks&&(a=b.onAllReady,a()))} -function le(a,b){if(0===b.chunks.length&&1===b.children.length&&null===b.children[0].boundary){var c=b.children[0];c.id=b.id;c.parentFlushed=!0;1===c.status&&le(a,c)}else a.completedSegments.push(b)} -function oe(a,b,c){if(null===b){if(c.parentFlushed){if(null!==a.completedRootSegment)throw Error(k(389));a.completedRootSegment=c}a.pendingRootTasks--;0===a.pendingRootTasks&&(a.onShellError=$d,b=a.onShellReady,b())}else b.pendingTasks--,b.forceClientRender||(0===b.pendingTasks?(c.parentFlushed&&1===c.status&&le(b,c),ge(a,b),b.parentFlushed&&a.completedBoundaries.push(b),b.fallbackAbortableTasks.forEach(ne,a),b.fallbackAbortableTasks.clear()):c.parentFlushed&&1===c.status&&(le(b,c),1===b.completedSegments.length&& -b.parentFlushed&&a.partialBoundaries.push(b)));a.allPendingTasks--;0===a.allPendingTasks&&(a=a.onAllReady,a())} -function de(a){if(2!==a.status){var b=S,c=Xd.current;Xd.current=Vd;var d=Yd.current;Yd.current=Wd;var e=a.resources;ya.push(D);D=e;e=ua.current;ua.current=xa;var f=Ud;Ud=a.responseState;try{var g=a.pingedTasks,m;for(m=0;m<g.length;m++){var h=g[m];var n=a,r=h.blockedBoundary;n.resources.boundaryResources=r?r.resources:null;var u=h.blockedSegment;if(0===u.status){ld(h.context);try{var E=h.thenableState;h.thenableState=null;Y(n,h,E,h.node);u.lastPushedText&&u.textEmbedded&&u.chunks.push(G);h.abortSet.delete(h); -u.status=1;oe(n,h.blockedBoundary,u)}catch(na){Ld();var A=na===ud?yd():na;if("object"===typeof A&&null!==A&&"function"===typeof A.then){var Z=h.ping;A.then(Z,Z);h.thenableState=Md()}else{h.abortSet.delete(h);u.status=4;var K=n,M=h.blockedBoundary,aa=A,xe=ee(K,aa);null===M?fe(K,aa):(M.pendingTasks--,M.forceClientRender||(M.forceClientRender=!0,M.errorDigest=xe,M.parentFlushed&&K.clientRenderedBoundaries.push(M)));K.allPendingTasks--;if(0===K.allPendingTasks){var ye=K.onAllReady;ye()}}}finally{n.resources.boundaryResources= -null}}}g.splice(0,m);null!==a.destination&&qe(a,a.destination)}catch(na){ee(a,na),fe(a,na)}finally{Ud=f,Xd.current=c,Yd.current=d,D=ya.pop(),ua.current=e,c===Vd&&ld(b)}}} -function re(a,b,c){c.parentFlushed=!0;switch(c.status){case 0:var d=c.id=a.nextSegmentId++;c.lastPushedText=!1;c.textEmbedded=!1;a=a.responseState;q(b,gb);q(b,a.placeholderPrefix);a=v(d.toString(16));q(b,a);return t(b,hb);case 1:c.status=2;var e=!0;d=c.chunks;var f=0;c=c.children;for(var g=0;g<c.length;g++){for(e=c[g];f<e.index;f++)q(b,d[f]);e=se(a,b,e)}for(;f<d.length-1;f++)q(b,d[f]);f<d.length&&(e=t(b,d[f]));return e;default:throw Error(k(390));}} -function se(a,b,c){var d=c.boundary;if(null===d)return re(a,b,c);d.parentFlushed=!0;if(d.forceClientRender)d=d.errorDigest,t(b,lb),q(b,nb),d&&(q(b,pb),q(b,v(C(d))),q(b,ob)),t(b,qb),re(a,b,c);else if(0<d.pendingTasks){d.rootSegmentID=a.nextSegmentId++;0<d.completedSegments.length&&a.partialBoundaries.push(d);var e=a.responseState;var f=e.nextSuspenseID++;e=w(e.boundaryPrefix+f.toString(16));d=d.id=e;rb(b,a.responseState,d);re(a,b,c)}else if(d.byteSize>a.progressiveChunkSize)d.rootSegmentID=a.nextSegmentId++, -a.completedBoundaries.push(d),rb(b,a.responseState,d.id),re(a,b,c);else{c=d.resources;if(e=a.resources.boundaryResources)c.forEach(Hc,e),c.clear();t(b,ib);c=d.completedSegments;if(1!==c.length)throw Error(k(391));se(a,b,c[0])}return t(b,mb)}function te(a,b,c){Nb(b,a.responseState,c.formatContext,c.id);se(a,b,c);return Ob(b,c.formatContext)} -function ue(a,b,c){a.resources.boundaryResources=c.resources;for(var d=c.completedSegments,e=0;e<d.length;e++)ve(a,b,c,d[e]);d.length=0;oc(b,c.resources);a=a.responseState;d=c.id;e=c.rootSegmentID;c=c.resources;var f;b:{for(f=c.values();;){var g=f.next().value;if(!g)break;if(0===(g.state&1)){f=!0;break b}}f=!1}q(b,a.startInlineScript);f?0===(a.instructions&2)?(a.instructions|=10,q(b,512<Vb.length?Vb.slice():Vb)):0===(a.instructions&8)?(a.instructions|=8,q(b,Wb)):q(b,Xb):0===(a.instructions&2)?(a.instructions|= -2,q(b,Tb)):q(b,Ub);if(null===d)throw Error(k(395));e=v(e.toString(16));q(b,d);q(b,Yb);q(b,a.segmentPrefix);q(b,e);f?(q(b,Zb),Gc(b,c)):q(b,$b);b=t(b,ac);return b} -function ve(a,b,c,d){if(2===d.status)return!0;var e=d.id;if(-1===e){if(-1===(d.id=c.rootSegmentID))throw Error(k(392));return te(a,b,d)}te(a,b,d);a=a.responseState;q(b,a.startInlineScript);0===(a.instructions&1)?(a.instructions|=1,q(b,Pb)):q(b,Qb);q(b,a.segmentPrefix);e=v(e.toString(16));q(b,e);q(b,Rb);q(b,a.placeholderPrefix);q(b,e);b=t(b,Sb);return b} -function qe(a,b){l=new Uint8Array(512);p=0;try{var c,d=a.completedRootSegment;if(null!==d)if(0===a.pendingRootTasks){Ac(b,a.resources,a.responseState,0===a.allPendingTasks);se(a,b,d);a.completedRootSegment=null;var e=a.responseState.bootstrapChunks;for(d=0;d<e.length-1;d++)q(b,e[d]);d<e.length&&t(b,e[d])}else return;else Bc(b,a.resources,a.responseState);var f=a.clientRenderedBoundaries;for(c=0;c<f.length;c++){var g=f[c];e=b;var m=a.responseState,h=g.id,n=g.errorDigest,r=g.errorMessage,u=g.errorComponentStack; -q(e,m.startInlineScript);0===(m.instructions&4)?(m.instructions|=4,q(e,bc)):q(e,cc);if(null===h)throw Error(k(395));q(e,h);q(e,dc);if(n||r||u)q(e,ec),q(e,v(hc(n||"")));if(r||u)q(e,ec),q(e,v(hc(r||"")));u&&(q(e,ec),q(e,v(hc(u))));if(!t(e,fc)){a.destination=null;c++;f.splice(0,c);return}}f.splice(0,c);var E=a.completedBoundaries;for(c=0;c<E.length;c++)if(!ue(a,b,E[c])){a.destination=null;c++;E.splice(0,c);return}E.splice(0,c);da(b);l=new Uint8Array(512);p=0;var A=a.partialBoundaries;for(c=0;c<A.length;c++){var Z= -A[c];a:{f=a;g=b;f.resources.boundaryResources=Z.resources;var K=Z.completedSegments;for(m=0;m<K.length;m++)if(!ve(f,g,Z,K[m])){m++;K.splice(0,m);var M=!1;break a}K.splice(0,m);M=oc(g,Z.resources)}if(!M){a.destination=null;c++;A.splice(0,c);return}}A.splice(0,c);var aa=a.completedBoundaries;for(c=0;c<aa.length;c++)if(!ue(a,b,aa[c])){a.destination=null;c++;aa.splice(0,c);return}aa.splice(0,c)}finally{0===a.allPendingTasks&&0===a.pingedTasks.length&&0===a.clientRenderedBoundaries.length&&0===a.completedBoundaries.length? -(a=a.responseState,a.hasBody&&(q(b,Q),q(b,v("body")),q(b,R)),a.htmlChunks&&(q(b,Q),q(b,v("html")),q(b,R)),da(b),b.close()):da(b)}}function we(a,b){try{var c=a.abortableTasks;if(0<c.size){var d=void 0===b?Error(k(432)):b;c.forEach(function(b){return pe(b,a,d)});c.clear()}null!==a.destination&&qe(a,a.destination)}catch(e){ee(a,e),fe(a,e)}} -exports.renderToReadableStream=function(a,b){return new Promise(function(c,d){var e,f,g=new Promise(function(a,b){f=a;e=b}),m=ae(a,Ha(b?b.identifierPrefix:void 0,b?b.nonce:void 0,b?b.bootstrapScriptContent:void 0,b?b.bootstrapScripts:void 0,b?b.bootstrapModules:void 0,b?b.unstable_externalRuntimeSrc:void 0),Ia(b?b.namespaceURI:void 0),b?b.progressiveChunkSize:void 0,b?b.onError:void 0,f,function(){var a=new ReadableStream({type:"bytes",pull:function(a){if(1===m.status)m.status=2,fa(a,m.fatalError); -else if(2!==m.status&&null===m.destination){m.destination=a;try{qe(m,a)}catch(E){ee(m,E),fe(m,E)}}},cancel:function(){we(m)}},{highWaterMark:0});a.allReady=g;c(a)},function(a){g.catch(function(){});d(a)},e);if(b&&b.signal){var h=b.signal;if(h.aborted)we(m,h.reason);else{var n=function(){we(m,h.reason);h.removeEventListener("abort",n)};h.addEventListener("abort",n)}}de(m)})};exports.version="18.3.0-next-4fcc9184a-20230217"; +function q(a,b){if(0!==b.length)if(512<b.length)0<p&&(a.enqueue(new Uint8Array(l.buffer,0,p)),l=new Uint8Array(512),p=0),a.enqueue(b);else{var c=l.length-p;c<b.length&&(0===c?a.enqueue(l):(l.set(b.subarray(0,c),p),a.enqueue(l),b=b.subarray(c)),l=new Uint8Array(512),p=0);l.set(b,p);p+=b.length}}function v(a,b){q(a,b);return!0}function da(a){l&&0<p&&(a.enqueue(new Uint8Array(l.buffer,0,p)),l=null,p=0)}var ea=new TextEncoder;function w(a){return ea.encode(a)}function x(a){return ea.encode(a)} +function fa(a,b){"function"===typeof a.error?a.error(b):a.close()}var z=Object.prototype.hasOwnProperty,ha=/^[: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][: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\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ia={},ka={}; +function la(a){if(z.call(ka,a))return!0;if(z.call(ia,a))return!1;if(ha.test(a))return ka[a]=!0;ia[a]=!0;return!1}function A(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var B={}; +"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){B[a]=new A(a,0,!1,a,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];B[b]=new A(b,1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){B[a]=new A(a,2,!1,a.toLowerCase(),null,!1,!1)}); +["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){B[a]=new A(a,2,!1,a,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){B[a]=new A(a,3,!1,a.toLowerCase(),null,!1,!1)}); +["checked","multiple","muted","selected"].forEach(function(a){B[a]=new A(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){B[a]=new A(a,4,!1,a,null,!1,!1)});["cols","rows","size","span"].forEach(function(a){B[a]=new A(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){B[a]=new A(a,5,!1,a.toLowerCase(),null,!1,!1)});var ma=/[\-:]([a-z])/g;function na(a){return a[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 transform-origin 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".split(" ").forEach(function(a){var b=a.replace(ma, +na);B[b]=new A(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(ma,na);B[b]=new A(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(ma,na);B[b]=new A(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){B[a]=new A(a,1,!1,a.toLowerCase(),null,!1,!1)}); +B.xlinkHref=new A("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){B[a]=new A(a,1,!1,a.toLowerCase(),null,!0,!0)}); +var pa={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0, +zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},qa=["Webkit","ms","Moz","O"];Object.keys(pa).forEach(function(a){qa.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);pa[b]=pa[a]})});var ra=/["'&<>]/; +function C(a){if("boolean"===typeof a||"number"===typeof a)return""+a;a=""+a;var b=ra.exec(a);if(b){var c="",d,e=0;for(d=b.index;d<a.length;d++){switch(a.charCodeAt(d)){case 34:b=""";break;case 38:b="&";break;case 39:b="'";break;case 60:b="<";break;case 62:b=">";break;default:continue}e!==d&&(c+=a.substring(e,d));e=d+1;c+=b}a=e!==d?c+a.substring(e,d):c}return a}var sa=/([A-Z])/g,ta=/^ms-/,ua=Array.isArray,D=Object.assign,E=null,va=[],ya={preload:wa,preinit:xa}; +function wa(a,b){if(E){var c=E;if("string"===typeof a&&a&&"object"===typeof b&&null!==b){var d=b.as,e=c.preloadsMap.get(a);e||(e=F(c,a,d,{href:a,rel:"preload",as:d,crossOrigin:"font"===d?"":b.crossOrigin,integrity:b.integrity}));switch(d){case "font":c.fontPreloads.add(e);break;case "style":c.explicitStylePreloads.add(e);break;case "script":c.explicitScriptPreloads.add(e)}}}} +function xa(a,b){if(E)a:{var c=E;if("string"===typeof a&&a&&"object"===typeof b&&null!==b)switch(b.as){case "style":var d=c.stylesMap.get(a);d||(d=b.precedence||"default",d=za(c,a,d,{rel:"stylesheet",href:a,"data-precedence":d,crossOrigin:b.crossOrigin}));d.set.add(d);c.explicitStylePreloads.add(d.hint);break a;case "script":d=c.scriptsMap.get(a),d||(d=Aa(c,a,{src:a,async:!0,crossOrigin:b.crossOrigin,integrity:b.integrity}),c.scripts.add(d))}}} +function Ba(a,b){return{rel:"preload",as:"style",href:a,crossOrigin:b.crossOrigin,integrity:b.integrity,media:b.media,hrefLang:b.hrefLang,referrerPolicy:b.referrerPolicy}}function Ca(a,b){return{rel:"preload",as:"script",href:a,crossOrigin:b.crossOrigin,integrity:b.integrity,referrerPolicy:b.referrerPolicy}}function F(a,b,c,d){c={type:"preload",as:c,href:b,flushed:!1,props:d};a.preloadsMap.set(b,c);return c} +function za(a,b,c,d){var e=a.stylesMap,f=a.preloadsMap,g=a.precedences,h=g.get(c);h||(h=new Set,g.set(c,h));(f=f.get(b))?(a=f.props,null==d.crossOrigin&&(d.crossOrigin=a.crossOrigin),null==d.referrerPolicy&&(d.referrerPolicy=a.referrerPolicy),null==d.title&&(d.title=a.title)):(f=Ba(b,d),f=F(a,b,"style",f),a.explicitStylePreloads.add(f));c={type:"style",href:b,precedence:c,flushed:!1,inShell:!1,props:d,hint:f,set:h};e.set(b,c);return c} +function Aa(a,b,c){var d=a.scriptsMap,e=a.preloadsMap.get(b);e?(a=e.props,null==c.crossOrigin&&(c.crossOrigin=a.crossOrigin),null==c.referrerPolicy&&(c.referrerPolicy=a.referrerPolicy),null==c.integrity&&(c.integrity=a.integrity)):(e=Ca(b,c),e=F(a,b,"script",e),a.explicitScriptPreloads.add(e));c={type:"script",src:b,flushed:!1,props:c,hint:e};d.set(b,c);return c} +function Da(a,b){if(!E)throw Error(k(445));var c=E;switch(a){case "title":var d=b.children;d=Array.isArray(d)?1===d.length?d[0]:null:d;if("function"!==typeof d&&"symbol"!==typeof d&&null!==d&&void 0!==d){d=""+d;var e="title::"+d;a=c.headsMap.get(e);a||(b=D({},b),b.children=d,a={type:"title",props:b,flushed:!1},c.headsMap.set(e,a),c.headResources.add(a))}return!0;case "meta":if("string"===typeof b.charSet)d="charSet";else if("string"===typeof b.content)if(a="::"+b.content,"string"===typeof b.httpEquiv)d= +"httpEquiv::"+b.httpEquiv+a;else if("string"===typeof b.name)d="name::"+b.name+a;else if("string"===typeof b.itemProp)d="itemProp::"+b.itemProp+a;else if("string"===typeof b.property){var f=b.property;d="property::"+f+a;e=f;a=f.split(":").slice(0,-1).join(":");(a=c.structuredMetaKeys.get(a))&&(d=a.key+"::child::"+d)}d&&!c.headsMap.has(d)&&(b={type:"meta",key:d,props:D({},b),flushed:!1},c.headsMap.set(d,b),"charSet"===d?c.charset=b:(e&&c.structuredMetaKeys.set(e,b),c.headResources.add(b)));return!0; +case "base":return d=b.target,e=b.href,d="base"+("string"===typeof e?'[href="'+e+'"]':":not([href])")+("string"===typeof d?'[target="'+d+'"]':":not([target])"),c.headsMap.has(d)||(b={type:"base",props:D({},b),flushed:!1},c.headsMap.set(d,b),c.bases.add(b)),!0}return!1} +function Ea(a){if(!E)throw Error(k(445));var b=E,c=a.rel,d=a.href;if(!d||"string"!==typeof d||!c||"string"!==typeof c)return!1;switch(c){case "stylesheet":var e=a.onLoad,f=a.onError;c=a.precedence;var g=a.disabled;if("string"!==typeof c||e||f||null!=g)return c=b.preloadsMap.get(d),c||(c=F(b,d,"style",Ba(d,a)),b.usedStylePreloads.add(c)),!1;e=b.stylesMap.get(d);e||(a=D({},a),a.href=d,a.rel="stylesheet",a["data-precedence"]=c,delete a.precedence,e=za(E,d,c,a),b.usedStylePreloads.add(e.hint));b.boundaryResources? +b.boundaryResources.add(e):e.set.add(e);return!0;case "preload":switch(e=a.as,e){case "script":case "style":case "font":c=b.preloadsMap.get(d);if(!c)switch(a=D({},a),a.href=d,a.rel="preload",a.as=e,"font"===e&&(a.crossOrigin=""),c=F(b,d,e,a),e){case "script":b.explicitScriptPreloads.add(c);break;case "style":b.explicitStylePreloads.add(c);break;case "font":b.fontPreloads.add(c)}return!0}}if(a.onLoad||a.onError)return!0;d="rel:"+c+"::href:"+d+"::sizes:"+("string"===typeof a.sizes?a.sizes:"")+"::media:"+ +("string"===typeof a.media?a.media:"");e=b.headsMap.get(d);if(!e)switch(e={type:"link",props:D({},a),flushed:!1},b.headsMap.set(d,e),c){case "preconnect":case "dns-prefetch":b.preconnects.add(e);break;default:b.headResources.add(e)}return!0}function Fa(a,b){var c=a.boundaryResources;c&&(b.forEach(function(a){return c.add(a)}),b.clear())}function Ga(a,b){b.forEach(function(a){return a.set.add(a)});b.clear()}var Ha=ca.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Dispatcher;x('"></template>'); +var Ia=x("<script>"),Ja=x("\x3c/script>"),Ka=x('<script src="'),La=x('<script type="module" src="'),Ma=x('" integrity="'),Na=x('" async="">\x3c/script>'),Oa=/(<\/|<)(s)(cript)/gi;function Pa(a,b,c,d){return""+b+("s"===c?"\\u0073":"\\u0053")+d} +function Qa(a,b,c,d,e){a=void 0===a?"":a;b=void 0===b?Ia:x('<script nonce="'+C(b)+'">');var f=[];void 0!==c&&f.push(b,w((""+c).replace(Oa,Pa)),Ja);if(void 0!==d)for(c=0;c<d.length;c++){var g=d[c],h="string"===typeof g?void 0:g.integrity;f.push(Ka,w(C("string"===typeof g?g:g.src)));h&&f.push(Ma,w(C(h)));f.push(Na)}if(void 0!==e)for(d=0;d<e.length;d++)c=e[d],g="string"===typeof c?void 0:c.integrity,f.push(La,w(C("string"===typeof c?c:c.src))),g&&f.push(Ma,w(C(g))),f.push(Na);return{bootstrapChunks:f, +placeholderPrefix:x(a+"P:"),segmentPrefix:x(a+"S:"),boundaryPrefix:a+"B:",idPrefix:a,nextSuspenseID:0,streamingFormat:0,startInlineScript:b,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1,sentStyleInsertionFunction:!1,externalRuntimeConfig:null}}function G(a,b,c){return{insertionMode:a,selectedValue:b,noscriptTagInScope:c}}function Ra(a){return G("http://www.w3.org/2000/svg"===a?2:"http://www.w3.org/1998/Math/MathML"===a?3:0,null,!1)} +function Sa(a,b,c){switch(b){case "noscript":return G(1,null,!0);case "select":return G(1,null!=c.value?c.value:c.defaultValue,a.noscriptTagInScope);case "svg":return G(2,null,a.noscriptTagInScope);case "math":return G(3,null,a.noscriptTagInScope);case "foreignObject":return G(1,null,a.noscriptTagInScope);case "table":return G(4,null,a.noscriptTagInScope);case "thead":case "tbody":case "tfoot":return G(5,null,a.noscriptTagInScope);case "colgroup":return G(7,null,a.noscriptTagInScope);case "tr":return G(6, +null,a.noscriptTagInScope)}return 4<=a.insertionMode||0===a.insertionMode?G(1,null,a.noscriptTagInScope):a}var I=x("\x3c!-- --\x3e");function Ta(a,b,c,d){if(""===b)return d;d&&a.push(I);a.push(w(C(b)));return!0}var Ua=new Map,Va=x(' style="'),Wa=x(":"),Xa=x(";"); +function Ya(a,b,c){if("object"!==typeof c)throw Error(k(62));b=!0;for(var d in c)if(z.call(c,d)){var e=c[d];if(null!=e&&"boolean"!==typeof e&&""!==e){if(0===d.indexOf("--")){var f=w(C(d));e=w(C((""+e).trim()))}else{f=d;var g=Ua.get(f);void 0!==g?f=g:(g=x(C(f.replace(sa,"-$1").toLowerCase().replace(ta,"-ms-"))),Ua.set(f,g),f=g);e="number"===typeof e?0===e||z.call(pa,d)?w(""+e):w(e+"px"):w(C((""+e).trim()))}b?(b=!1,a.push(Va,f,Wa,e)):a.push(Xa,f,Wa,e)}}b||a.push(J)} +var L=x(" "),M=x('="'),J=x('"'),Za=x('=""'); +function O(a,b,c,d){switch(c){case "style":Ya(a,b,d);return;case "defaultValue":case "defaultChecked":case "innerHTML":case "suppressContentEditableWarning":case "suppressHydrationWarning":return}if(!(2<c.length)||"o"!==c[0]&&"O"!==c[0]||"n"!==c[1]&&"N"!==c[1])if(b=B.hasOwnProperty(c)?B[c]:null,null!==b){switch(typeof d){case "function":case "symbol":return;case "boolean":if(!b.acceptsBooleans)return}c=w(b.attributeName);switch(b.type){case 3:d&&a.push(L,c,Za);break;case 4:!0===d?a.push(L,c,Za):!1!== +d&&a.push(L,c,M,w(C(d)),J);break;case 5:isNaN(d)||a.push(L,c,M,w(C(d)),J);break;case 6:!isNaN(d)&&1<=d&&a.push(L,c,M,w(C(d)),J);break;default:b.sanitizeURL&&(d=""+d),a.push(L,c,M,w(C(d)),J)}}else if(la(c)){switch(typeof d){case "function":case "symbol":return;case "boolean":if(b=c.toLowerCase().slice(0,5),"data-"!==b&&"aria-"!==b)return}a.push(L,w(c),M,w(C(d)),J)}}var P=x(">"),$a=x("/>"); +function ab(a,b,c){if(null!=b){if(null!=c)throw Error(k(60));if("object"!==typeof b||!("__html"in b))throw Error(k(61));b=b.__html;null!==b&&void 0!==b&&a.push(w(""+b))}}function bb(a){var b="";ba.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}var cb=x(' selected=""'); +function Q(a,b,c){var d="stylesheet"===b.rel;a.push(R("link"));for(var e in b)if(z.call(b,e)){var f=b[e];if(null!=f)switch(e){case "children":case "dangerouslySetInnerHTML":throw Error(k(399,"link"));case "precedence":if(d)continue;default:O(a,c,e,f)}}a.push($a);return null}function S(a,b,c,d){a.push(R(c));for(var e in b)if(z.call(b,e)){var f=b[e];if(null!=f)switch(e){case "children":case "dangerouslySetInnerHTML":throw Error(k(399,c));default:O(a,d,e,f)}}a.push($a);return null} +function db(a,b,c){a.push(R("title"));var d=null,e;for(e in b)if(z.call(b,e)){var f=b[e];if(null!=f)switch(e){case "children":d=f;break;case "dangerouslySetInnerHTML":throw Error(k(434));default:O(a,c,e,f)}}a.push(P);b=Array.isArray(d)?2>d.length?d[0]:null:d;"function"!==typeof b&&"symbol"!==typeof b&&null!==b&&void 0!==b&&a.push(w(C(""+b)));a.push(eb,w("title"),fb);return null} +function gb(a,b,c){a.push(R("script"));var d=null,e=null,f;for(f in b)if(z.call(b,f)){var g=b[f];if(null!=g)switch(f){case "children":d=g;break;case "dangerouslySetInnerHTML":e=g;break;default:O(a,c,f,g)}}a.push(P);ab(a,e,d);"string"===typeof d&&a.push(w(C(d)));a.push(eb,w("script"),fb);return null} +function hb(a,b,c,d){a.push(R(c));var e=c=null,f;for(f in b)if(z.call(b,f)){var g=b[f];if(null!=g)switch(f){case "children":c=g;break;case "dangerouslySetInnerHTML":e=g;break;default:O(a,d,f,g)}}a.push(P);ab(a,e,c);return"string"===typeof c?(a.push(w(C(c))),null):c}var ib=x("\n"),jb=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,kb=new Map;function R(a){var b=kb.get(a);if(void 0===b){if(!jb.test(a))throw Error(k(65,a));b=x("<"+a);kb.set(a,b)}return b}var lb=x("<!DOCTYPE html>"); +function mb(a,b,c,d,e,f,g){switch(c){case "select":a.push(R("select"));var h=g=null,n;for(n in d)if(z.call(d,n)){var m=d[n];if(null!=m)switch(n){case "children":g=m;break;case "dangerouslySetInnerHTML":h=m;break;case "defaultValue":case "value":break;default:O(a,e,n,m)}}a.push(P);ab(a,h,g);return g;case "option":g=f.selectedValue;a.push(R("option"));var t=n=m=null,r=null;for(h in d)if(z.call(d,h)){var u=d[h];if(null!=u)switch(h){case "children":m=u;break;case "selected":t=u;break;case "dangerouslySetInnerHTML":r= +u;break;case "value":n=u;default:O(a,e,h,u)}}if(null!=g)if(d=null!==n?""+n:bb(m),ua(g))for(e=0;e<g.length;e++){if(""+g[e]===d){a.push(cb);break}}else""+g===d&&a.push(cb);else t&&a.push(cb);a.push(P);ab(a,r,m);return m;case "textarea":a.push(R("textarea"));m=h=g=null;for(r in d)if(z.call(d,r)&&(n=d[r],null!=n))switch(r){case "children":m=n;break;case "value":g=n;break;case "defaultValue":h=n;break;case "dangerouslySetInnerHTML":throw Error(k(91));default:O(a,e,r,n)}null===g&&null!==h&&(g=h);a.push(P); +if(null!=m){if(null!=g)throw Error(k(92));if(ua(m)&&1<m.length)throw Error(k(93));g=""+m}"string"===typeof g&&"\n"===g[0]&&a.push(ib);null!==g&&a.push(w(C(""+g)));return null;case "input":a.push(R("input"));n=r=h=g=null;for(m in d)if(z.call(d,m)&&(t=d[m],null!=t))switch(m){case "children":case "dangerouslySetInnerHTML":throw Error(k(399,"input"));case "defaultChecked":n=t;break;case "defaultValue":h=t;break;case "checked":r=t;break;case "value":g=t;break;default:O(a,e,m,t)}null!==r?O(a,e,"checked", +r):null!==n&&O(a,e,"checked",n);null!==g?O(a,e,"value",g):null!==h&&O(a,e,"value",h);a.push($a);return null;case "menuitem":a.push(R("menuitem"));for(var y in d)if(z.call(d,y)&&(g=d[y],null!=g))switch(y){case "children":case "dangerouslySetInnerHTML":throw Error(k(400));default:O(a,e,y,g)}a.push(P);return null;case "title":return a=2!==f.insertionMode&&!f.noscriptTagInScope&&Da("title",d)?null:db(a,d,e),a;case "link":return!f.noscriptTagInScope&&Ea(d)?(g&&a.push(I),a=null):a=Q(a,d,e),a;case "script":if(h= +!f.noscriptTagInScope){if(!E)throw Error(k(445));h=E;m=d.src;r=d.onLoad;n=d.onError;m&&"string"===typeof m?d.async?(r||n?(r=h.preloadsMap.get(m),r||(r=F(h,m,"script",Ca(m,d)),h.usedScriptPreloads.add(r))):(r=h.scriptsMap.get(m),r||(r=D({},d),r.src=m,r=Aa(h,m,r),h.scripts.add(r))),h=!0):h=!1:h=!1}h?(g&&a.push(I),a=null):a=gb(a,d,e);return a;case "meta":return!f.noscriptTagInScope&&Da("meta",d)?(g&&a.push(I),a=null):a=S(a,d,"meta",e),a;case "base":return!f.noscriptTagInScope&&Da("base",d)?(g&&a.push(I), +a=null):a=S(a,d,"base",e),a;case "listing":case "pre":a.push(R(c));h=g=null;for(t in d)if(z.call(d,t)&&(m=d[t],null!=m))switch(t){case "children":g=m;break;case "dangerouslySetInnerHTML":h=m;break;default:O(a,e,t,m)}a.push(P);if(null!=h){if(null!=g)throw Error(k(60));if("object"!==typeof h||!("__html"in h))throw Error(k(61));d=h.__html;null!==d&&void 0!==d&&("string"===typeof d&&0<d.length&&"\n"===d[0]?a.push(ib,w(d)):a.push(w(""+d)))}"string"===typeof g&&"\n"===g[0]&&a.push(ib);return g;case "area":case "br":case "col":case "embed":case "hr":case "img":case "keygen":case "param":case "source":case "track":case "wbr":return S(a, +d,c,e);case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return hb(a,d,c,e);case "head":return hb(b,d,c,e);case "html":return 0===f.insertionMode&&b.push(lb),hb(b,d,c,e);default:if(-1===c.indexOf("-")&&"string"!==typeof d.is)return hb(a,d,c,e);a.push(R(c));h=g=null;for(u in d)if(z.call(d,u)&&(m=d[u],null!=m))switch(u){case "children":g=m;break;case "dangerouslySetInnerHTML":h=m;break; +case "style":Ya(a,e,m);break;case "suppressContentEditableWarning":case "suppressHydrationWarning":break;default:la(u)&&"function"!==typeof m&&"symbol"!==typeof m&&a.push(L,w(u),M,w(C(m)),J)}a.push(P);ab(a,h,g);return g}}var eb=x("</"),fb=x(">"); +function nb(a,b,c){switch(c){case "title":case "script":case "area":case "base":case "br":case "col":case "embed":case "hr":case "img":case "input":case "keygen":case "link":case "meta":case "param":case "source":case "track":case "wbr":return;case "body":b.unshift(eb,w(c),fb);return;case "html":b.push(eb,w(c),fb);return}a.push(eb,w(c),fb)} +var ob=x('<template id="'),pb=x('"></template>'),qb=x("\x3c!--$--\x3e"),rb=x('\x3c!--$?--\x3e<template id="'),sb=x('"></template>'),tb=x("\x3c!--$!--\x3e"),ub=x("\x3c!--/$--\x3e"),vb=x("<template"),wb=x('"'),xb=x(' data-dgst="');x(' data-msg="');x(' data-stck="');var yb=x("></template>");function zb(a,b,c){q(a,rb);if(null===c)throw Error(k(395));q(a,c);return v(a,sb)} +var Ab=x('<div hidden id="'),Bb=x('">'),Cb=x("</div>"),Db=x('<svg aria-hidden="true" style="display:none" id="'),Eb=x('">'),Fb=x("</svg>"),Gb=x('<math aria-hidden="true" style="display:none" id="'),Hb=x('">'),Ib=x("</math>"),Jb=x('<table hidden id="'),Kb=x('">'),Lb=x("</table>"),Mb=x('<table hidden><tbody id="'),Nb=x('">'),Ob=x("</tbody></table>"),Pb=x('<table hidden><tr id="'),Qb=x('">'),Rb=x("</tr></table>"),Sb=x('<table hidden><colgroup id="'),Tb=x('">'),Ub=x("</colgroup></table>"); +function Vb(a,b,c,d){switch(c.insertionMode){case 0:case 1:return q(a,Ab),q(a,b.segmentPrefix),q(a,w(d.toString(16))),v(a,Bb);case 2:return q(a,Db),q(a,b.segmentPrefix),q(a,w(d.toString(16))),v(a,Eb);case 3:return q(a,Gb),q(a,b.segmentPrefix),q(a,w(d.toString(16))),v(a,Hb);case 4:return q(a,Jb),q(a,b.segmentPrefix),q(a,w(d.toString(16))),v(a,Kb);case 5:return q(a,Mb),q(a,b.segmentPrefix),q(a,w(d.toString(16))),v(a,Nb);case 6:return q(a,Pb),q(a,b.segmentPrefix),q(a,w(d.toString(16))),v(a,Qb);case 7:return q(a, +Sb),q(a,b.segmentPrefix),q(a,w(d.toString(16))),v(a,Tb);default:throw Error(k(397));}}function Wb(a,b){switch(b.insertionMode){case 0:case 1:return v(a,Cb);case 2:return v(a,Fb);case 3:return v(a,Ib);case 4:return v(a,Lb);case 5:return v(a,Ob);case 6:return v(a,Rb);case 7:return v(a,Ub);default:throw Error(k(397));}} +var Xb=x('$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};;$RS("'),Yb=x('$RS("'),Zb=x('","'),$b=x('")\x3c/script>');x('<template data-rsi="" data-sid="');x('" data-pid="'); +var ac=x('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};;$RC("'),bc=x('$RC("'), +cc=x('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};;$RM=new Map;\n$RR=function(p,q,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};;$RR("'), +dc=x('$RM=new Map;\n$RR=function(p,q,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};;$RR("'), +ec=x('$RR("'),fc=x('","'),gc=x('",'),hc=x('"'),ic=x(")\x3c/script>");x('<template data-rci="" data-bid="');x('<template data-rri="" data-bid="');x('" data-sid="');x('" data-sty="');var jc=x('$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};;$RX("'),kc=x('$RX("'),lc=x('"'),mc=x(","),nc=x(")\x3c/script>");x('<template data-rxi="" data-bid="');x('" data-dgst="');x('" data-msg="'); +x('" data-stck="');var oc=/[<\u2028\u2029]/g;function pc(a){return JSON.stringify(a).replace(oc,function(a){switch(a){case "<":return"\\u003c";case "\u2028":return"\\u2028";case "\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React");}})}var qc=/[&><\u2028\u2029]/g; +function rc(a){return JSON.stringify(a).replace(qc,function(a){switch(a){case "&":return"\\u0026";case ">":return"\\u003e";case "<":return"\\u003c";case "\u2028":return"\\u2028";case "\u2029":return"\\u2029";default:throw Error("escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React");}})}var sc=x('<style data-precedence="'),tc=x('"></style>'); +function uc(a,b,c){function d(a){a.flushed||(Q(e,a.props,c),a.flushed=!0)}var e=[],f=b.charset,g=b.bases,h=b.preconnects,n=b.fontPreloads,m=b.precedences,t=b.usedStylePreloads,r=b.scripts,u=b.usedScriptPreloads,y=b.explicitStylePreloads,N=b.explicitScriptPreloads,H=b.headResources;f&&(S(e,f.props,"meta",c),f.flushed=!0,b.charset=null);g.forEach(function(a){S(e,a.props,"base",c);a.flushed=!0});g.clear();h.forEach(function(a){Q(e,a.props,c);a.flushed=!0});h.clear();n.forEach(function(a){Q(e,a.props, +c);a.flushed=!0});n.clear();m.forEach(function(a,b){a.size?(a.forEach(function(a){Q(e,a.props,c);a.flushed=!0;a.inShell=!0;a.hint.flushed=!0}),a.clear()):e.push(sc,w(C(b)),tc)});t.forEach(d);t.clear();r.forEach(function(a){gb(e,a.props,c);a.flushed=!0;a.hint.flushed=!0});r.clear();u.forEach(d);u.clear();y.forEach(d);y.clear();N.forEach(d);N.clear();H.forEach(function(a){switch(a.type){case "title":db(e,a.props,c);break;case "meta":S(e,a.props,"meta",c);break;case "link":Q(e,a.props,c)}a.flushed=!0}); +H.clear();f=!0;for(b=0;b<e.length-1;b++)q(a,e[b]);b<e.length&&(f=v(a,e[b]));return f} +function vc(a,b,c){function d(a){a.flushed||(Q(e,a.props,c),a.flushed=!0)}var e=[],f=b.charset,g=b.preconnects,h=b.fontPreloads,n=b.usedStylePreloads,m=b.scripts,t=b.usedScriptPreloads,r=b.explicitStylePreloads,u=b.explicitScriptPreloads,y=b.headResources;f&&(S(e,f.props,"meta",c),f.flushed=!0,b.charset=null);g.forEach(function(a){Q(e,a.props,c);a.flushed=!0});g.clear();h.forEach(function(a){Q(e,a.props,c);a.flushed=!0});h.clear();n.forEach(d);n.clear();m.forEach(function(a){hb(e,a.props,"script", +c);nb(e,e,"script",a.props);a.flushed=!0;a.hint.flushed=!0});m.clear();t.forEach(d);t.clear();r.forEach(d);r.clear();u.forEach(d);u.clear();y.forEach(function(a){switch(a.type){case "title":db(e,a.props,c);break;case "meta":S(e,a.props,"meta",c);break;case "link":Q(e,a.props,c)}a.flushed=!0});y.clear();f=!0;for(b=0;b<e.length-1;b++)q(a,e[b]);b<e.length&&(f=v(a,e[b]));return f}var wc=x("["),xc=x(",["),yc=x(","),zc=x("]"); +function Ac(a,b){q(a,wc);var c=wc;b.forEach(function(b){if(!b.inShell)if(b.flushed)q(a,c),q(a,w(rc(""+b.href))),q(a,zc),c=xc;else{q(a,c);var d=b.precedence,f=b.props;q(a,w(rc(""+b.href)));d=""+d;q(a,yc);q(a,w(rc(d)));for(var g in f)if(z.call(f,g)){var h=f[g];if(null!=h)switch(g){case "href":case "rel":case "precedence":case "data-precedence":break;case "children":case "dangerouslySetInnerHTML":throw Error(k(399,"link"));default:a:{d=a;var n=g,m=n.toLowerCase();switch(typeof h){case "function":case "symbol":break a}switch(n){case "innerHTML":case "dangerouslySetInnerHTML":case "suppressContentEditableWarning":case "suppressHydrationWarning":case "style":break a; +case "className":m="class";break;case "hidden":if(!1===h)break a;break;case "src":case "href":break;default:if(!la(n))break a}if(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])h=""+h,q(d,yc),q(d,w(rc(m))),q(d,yc),q(d,w(rc(h)))}}}q(a,zc);c=xc;b.flushed=!0;b.hint.flushed=!0}});q(a,zc)} +var Bc=Symbol.for("react.element"),Cc=Symbol.for("react.portal"),Dc=Symbol.for("react.fragment"),Ec=Symbol.for("react.strict_mode"),Fc=Symbol.for("react.profiler"),Gc=Symbol.for("react.provider"),Hc=Symbol.for("react.context"),Ic=Symbol.for("react.server_context"),Jc=Symbol.for("react.forward_ref"),Kc=Symbol.for("react.suspense"),Lc=Symbol.for("react.suspense_list"),Mc=Symbol.for("react.memo"),Nc=Symbol.for("react.lazy"),Oc=Symbol.for("react.scope"),Pc=Symbol.for("react.debug_trace_mode"),Qc=Symbol.for("react.offscreen"), +Rc=Symbol.for("react.legacy_hidden"),Sc=Symbol.for("react.cache"),Tc=Symbol.for("react.default_value"),Uc=Symbol.iterator; +function Vc(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case Dc:return"Fragment";case Cc:return"Portal";case Fc:return"Profiler";case Ec:return"StrictMode";case Kc:return"Suspense";case Lc:return"SuspenseList";case Sc:return"Cache"}if("object"===typeof a)switch(a.$$typeof){case Hc:return(a.displayName||"Context")+".Consumer";case Gc:return(a._context.displayName||"Context")+".Provider";case Jc:var b=a.render;a=a.displayName; +a||(a=b.displayName||b.name||"",a=""!==a?"ForwardRef("+a+")":"ForwardRef");return a;case Mc:return b=a.displayName||null,null!==b?b:Vc(a.type)||"Memo";case Nc:b=a._payload;a=a._init;try{return Vc(a(b))}catch(c){break}case Ic:return(a.displayName||a._globalName)+".Provider"}return null}var Wc=ba.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Xc={};function Yc(a,b){a=a.contextTypes;if(!a)return Xc;var c={},d;for(d in a)c[d]=b[d];return c}var T=null; +function Zc(a,b){if(a!==b){a.context._currentValue=a.parentValue;a=a.parent;var c=b.parent;if(null===a){if(null!==c)throw Error(k(401));}else{if(null===c)throw Error(k(401));Zc(a,c)}b.context._currentValue=b.value}}function $c(a){a.context._currentValue=a.parentValue;a=a.parent;null!==a&&$c(a)}function ad(a){var b=a.parent;null!==b&&ad(b);a.context._currentValue=a.value} +function bd(a,b){a.context._currentValue=a.parentValue;a=a.parent;if(null===a)throw Error(k(402));a.depth===b.depth?Zc(a,b):bd(a,b)}function cd(a,b){var c=b.parent;if(null===c)throw Error(k(402));a.depth===c.depth?Zc(a,c):cd(a,c);b.context._currentValue=b.value}function dd(a){var b=T;b!==a&&(null===b?ad(a):null===a?$c(b):b.depth===a.depth?Zc(b,a):b.depth>a.depth?bd(b,a):cd(b,a),T=a)} +var ed={isMounted:function(){return!1},enqueueSetState:function(a,b){a=a._reactInternals;null!==a.queue&&a.queue.push(b)},enqueueReplaceState:function(a,b){a=a._reactInternals;a.replace=!0;a.queue=[b]},enqueueForceUpdate:function(){}}; +function fd(a,b,c,d){var e=void 0!==a.state?a.state:null;a.updater=ed;a.props=c;a.state=e;var f={queue:[],replace:!1};a._reactInternals=f;var g=b.contextType;a.context="object"===typeof g&&null!==g?g._currentValue:d;g=b.getDerivedStateFromProps;"function"===typeof g&&(g=g(c,e),e=null===g||void 0===g?e:D({},e,g),a.state=e);if("function"!==typeof b.getDerivedStateFromProps&&"function"!==typeof a.getSnapshotBeforeUpdate&&("function"===typeof a.UNSAFE_componentWillMount||"function"===typeof a.componentWillMount))if(b= +a.state,"function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),b!==a.state&&ed.enqueueReplaceState(a,a.state,null),null!==f.queue&&0<f.queue.length)if(b=f.queue,g=f.replace,f.queue=null,f.replace=!1,g&&1===b.length)a.state=b[0];else{f=g?b[0]:a.state;e=!0;for(g=g?1:0;g<b.length;g++){var h=b[g];h="function"===typeof h?h.call(a,f,c,d):h;null!=h&&(e?(e=!1,f=D({},f,h)):D(f,h))}a.state=f}else f.queue=null} +var gd={id:1,overflow:""};function hd(a,b,c){var d=a.id;a=a.overflow;var e=32-id(d)-1;d&=~(1<<e);c+=1;var f=32-id(b)+e;if(30<f){var g=e-e%5;f=(d&(1<<g)-1).toString(32);d>>=g;e-=g;return{id:1<<32-id(b)+e|c<<e|d,overflow:f+a}}return{id:1<<f|c<<e|d,overflow:a}}var id=Math.clz32?Math.clz32:jd,kd=Math.log,ld=Math.LN2;function jd(a){a>>>=0;return 0===a?32:31-(kd(a)/ld|0)|0}var md=Error(k(460));function nd(){} +function od(a,b,c){c=a[c];void 0===c?a.push(b):c!==b&&(b.then(nd,nd),b=c);switch(b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;default:if("string"!==typeof b.status)switch(a=b,a.status="pending",a.then(function(a){if("pending"===b.status){var c=b;c.status="fulfilled";c.value=a}},function(a){if("pending"===b.status){var c=b;c.status="rejected";c.reason=a}}),b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;}pd=b;throw md;}}var pd=null; +function qd(){if(null===pd)throw Error(k(459));var a=pd;pd=null;return a}function rd(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var sd="function"===typeof Object.is?Object.is:rd,U=null,td=null,ud=null,V=null,vd=!1,wd=!1,xd=0,yd=0,W=null,X=null,zd=0;function Y(){if(null===U)throw Error(k(321));return U}function Ad(){if(0<zd)throw Error(k(312));return{memoizedState:null,queue:null,next:null}} +function Bd(){null===V?null===ud?(vd=!1,ud=V=Ad()):(vd=!0,V=ud):null===V.next?(vd=!1,V=V.next=Ad()):(vd=!0,V=V.next);return V}function Cd(a,b,c,d){for(;wd;)wd=!1,yd=xd=0,zd+=1,V=null,c=a(b,d);Dd();return c}function Ed(){var a=W;W=null;return a}function Dd(){td=U=null;wd=!1;ud=null;zd=0;V=X=null}function Fd(a,b){return"function"===typeof b?b(a):b} +function Gd(a,b,c){U=Y();V=Bd();if(vd){var d=V.queue;b=d.dispatch;if(null!==X&&(c=X.get(d),void 0!==c)){X.delete(d);d=V.memoizedState;do d=a(d,c.action),c=c.next;while(null!==c);V.memoizedState=d;return[d,b]}return[V.memoizedState,b]}a=a===Fd?"function"===typeof b?b():b:void 0!==c?c(b):b;V.memoizedState=a;a=V.queue={last:null,dispatch:null};a=a.dispatch=Hd.bind(null,U,a);return[V.memoizedState,a]} +function Id(a,b){U=Y();V=Bd();b=void 0===b?null:b;if(null!==V){var c=V.memoizedState;if(null!==c&&null!==b){var d=c[1];a:if(null===d)d=!1;else{for(var e=0;e<d.length&&e<b.length;e++)if(!sd(b[e],d[e])){d=!1;break a}d=!0}if(d)return c[0]}}a=a();V.memoizedState=[a,b];return a}function Hd(a,b,c){if(25<=zd)throw Error(k(301));if(a===U)if(wd=!0,a={action:c,next:null},null===X&&(X=new Map),c=X.get(b),void 0===c)X.set(b,a);else{for(b=c;null!==b.next;)b=b.next;b.next=a}} +function Jd(){throw Error(k(394));}function Kd(){throw Error(k(393));}function Ld(){} +var Nd={readContext:function(a){return a._currentValue},useContext:function(a){Y();return a._currentValue},useMemo:Id,useReducer:Gd,useRef:function(a){U=Y();V=Bd();var b=V.memoizedState;return null===b?(a={current:a},V.memoizedState=a):b},useState:function(a){return Gd(Fd,a)},useInsertionEffect:Ld,useLayoutEffect:function(){},useCallback:function(a,b){return Id(function(){return a},b)},useImperativeHandle:Ld,useEffect:Ld,useDebugValue:Ld,useDeferredValue:function(a){Y();return a},useTransition:function(){Y(); +return[!1,Jd]},useId:function(){var a=td.treeContext;var b=a.overflow;a=a.id;a=(a&~(1<<32-id(a)-1)).toString(32)+b;var c=Md;if(null===c)throw Error(k(404));b=xd++;a=":"+c.idPrefix+"R"+a;0<b&&(a+="H"+b.toString(32));return a+":"},useMutableSource:function(a,b){Y();return b(a._source)},useSyncExternalStore:function(a,b,c){if(void 0===c)throw Error(k(407));return c()},useCacheRefresh:function(){return Kd},use:function(a){if(null!==a&&"object"===typeof a){if("function"===typeof a.then){var b=yd;yd+=1; +null===W&&(W=[]);return od(W,a,b)}if(a.$$typeof===Hc||a.$$typeof===Ic)return a._currentValue}throw Error(k(438,String(a)));}},Md=null,Od={getCacheSignal:function(){throw Error(k(248));},getCacheForType:function(){throw Error(k(248));}},Pd=Wc.ReactCurrentDispatcher,Qd=Wc.ReactCurrentCache;function Rd(a){console.error(a);return null}function Sd(){} +function Td(a,b,c,d,e,f,g,h,n){var m=[],t=new Set,r={preloadsMap:new Map,stylesMap:new Map,scriptsMap:new Map,headsMap:new Map,charset:null,bases:new Set,preconnects:new Set,fontPreloads:new Set,precedences:new Map,usedStylePreloads:new Set,scripts:new Set,usedScriptPreloads:new Set,explicitStylePreloads:new Set,explicitScriptPreloads:new Set,headResources:new Set,structuredMetaKeys:new Map,boundaryResources:null};b={destination:null,responseState:b,progressiveChunkSize:void 0===d?12800:d,status:0, +fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,resources:r,completedRootSegment:null,abortableTasks:t,pingedTasks:m,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],preamble:[],postamble:[],onError:void 0===e?Rd:e,onAllReady:void 0===f?Sd:f,onShellReady:void 0===g?Sd:g,onShellError:void 0===h?Sd:h,onFatalError:void 0===n?Sd:n};c=Ud(b,0,null,c,!1,!1);c.parentFlushed=!0;a=Vd(b,null,a,null,c,t,Xc,null,gd);m.push(a);return b} +function Vd(a,b,c,d,e,f,g,h,n){a.allPendingTasks++;null===d?a.pendingRootTasks++:d.pendingTasks++;var m={node:c,ping:function(){var b=a.pingedTasks;b.push(m);1===b.length&&Wd(a)},blockedBoundary:d,blockedSegment:e,abortSet:f,legacyContext:g,context:h,treeContext:n,thenableState:b};f.add(m);return m}function Ud(a,b,c,d,e,f){return{status:0,id:-1,index:b,parentFlushed:!1,chunks:[],children:[],formatContext:d,boundary:c,lastPushedText:e,textEmbedded:f}} +function Xd(a,b){a=a.onError(b);if(null!=a&&"string"!==typeof a)throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof a+'" instead');return a}function Yd(a,b){var c=a.onShellError;c(b);c=a.onFatalError;c(b);null!==a.destination?(a.status=2,fa(a.destination,b)):(a.status=1,a.fatalError=b)} +function Zd(a,b,c,d){var e=c.render(),f=d.childContextTypes;if(null!==f&&void 0!==f){var g=b.legacyContext;if("function"!==typeof c.getChildContext)d=g;else{c=c.getChildContext();for(var h in c)if(!(h in f))throw Error(k(108,Vc(d)||"Unknown",h));d=D({},g,c)}b.legacyContext=d;Z(a,b,null,e);b.legacyContext=g}else Z(a,b,null,e)}function $d(a,b){if(a&&a.defaultProps){b=D({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c]);return b}return b} +function ae(a,b,c,d,e,f){if("function"===typeof d)if(d.prototype&&d.prototype.isReactComponent)c=Yc(d,b.legacyContext),f=d.contextType,f=new d(e,"object"===typeof f&&null!==f?f._currentValue:c),fd(f,d,e,c),Zd(a,b,f,d);else{f=Yc(d,b.legacyContext);U={};td=b;yd=xd=0;W=c;c=d(e,f);c=Cd(d,e,c,f);var g=0!==xd;if("object"===typeof c&&null!==c&&"function"===typeof c.render&&void 0===c.$$typeof)fd(c,d,e,f),Zd(a,b,c,d);else if(g){e=b.treeContext;b.treeContext=hd(e,1,0);try{Z(a,b,null,c)}finally{b.treeContext= +e}}else Z(a,b,null,c)}else if("string"===typeof d)c=b.blockedSegment,f=mb(c.chunks,a.preamble,d,e,a.responseState,c.formatContext,c.lastPushedText),c.lastPushedText=!1,g=c.formatContext,c.formatContext=Sa(g,d,e),be(a,b,f),c.formatContext=g,nb(c.chunks,a.postamble,d),c.lastPushedText=!1;else{switch(d){case Rc:case Pc:case Ec:case Fc:case Dc:Z(a,b,null,e.children);return;case Qc:"hidden"!==e.mode&&Z(a,b,null,e.children);return;case Lc:Z(a,b,null,e.children);return;case Oc:throw Error(k(343));case Kc:a:{d= +b.blockedBoundary;c=b.blockedSegment;f=e.fallback;e=e.children;g=new Set;var h={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:g,errorDigest:null,resources:new Set},n=Ud(a,c.chunks.length,h,c.formatContext,!1,!1);c.children.push(n);c.lastPushedText=!1;var m=Ud(a,0,null,c.formatContext,!1,!1);m.parentFlushed=!0;b.blockedBoundary=h;b.blockedSegment=m;a.resources.boundaryResources=h.resources;try{if(be(a,b,e),m.lastPushedText&& +m.textEmbedded&&m.chunks.push(I),m.status=1,0===h.pendingTasks&&(null!==a.completedRootSegment||0<a.pendingRootTasks)&&Ga(a.resources,h.resources),ce(h,m),0===h.pendingTasks)break a}catch(t){m.status=4,h.forceClientRender=!0,h.errorDigest=Xd(a,t)}finally{a.resources.boundaryResources=d?d.resources:null,b.blockedBoundary=d,b.blockedSegment=c}b=Vd(a,null,f,d,n,g,b.legacyContext,b.context,b.treeContext);a.pingedTasks.push(b)}return}if("object"===typeof d&&null!==d)switch(d.$$typeof){case Jc:d=d.render; +U={};td=b;yd=xd=0;W=c;c=d(e,f);e=Cd(d,e,c,f);if(0!==xd){d=b.treeContext;b.treeContext=hd(d,1,0);try{Z(a,b,null,e)}finally{b.treeContext=d}}else Z(a,b,null,e);return;case Mc:d=d.type;e=$d(d,e);ae(a,b,c,d,e,f);return;case Gc:c=e.children;d=d._context;e=e.value;f=d._currentValue;d._currentValue=e;g=T;T=e={parent:g,depth:null===g?0:g.depth+1,context:d,parentValue:f,value:e};b.context=e;Z(a,b,null,c);a=T;if(null===a)throw Error(k(403));e=a.parentValue;a.context._currentValue=e===Tc?a.context._defaultValue: +e;a=T=a.parent;b.context=a;return;case Hc:e=e.children;e=e(d._currentValue);Z(a,b,null,e);return;case Nc:f=d._init;d=f(d._payload);e=$d(d,e);ae(a,b,c,d,e,void 0);return}throw Error(k(130,null==d?d:typeof d,""));}} +function Z(a,b,c,d){b.node=d;if("object"===typeof d&&null!==d){switch(d.$$typeof){case Bc:ae(a,b,c,d.type,d.props,d.ref);return;case Cc:throw Error(k(257));case Nc:c=d._init;d=c(d._payload);Z(a,b,null,d);return}if(ua(d)){de(a,b,d);return}null===d||"object"!==typeof d?c=null:(c=Uc&&d[Uc]||d["@@iterator"],c="function"===typeof c?c:null);if(c&&(c=c.call(d))){d=c.next();if(!d.done){var e=[];do e.push(d.value),d=c.next();while(!d.done);de(a,b,e)}return}a=Object.prototype.toString.call(d);throw Error(k(31, +"[object Object]"===a?"object with keys {"+Object.keys(d).join(", ")+"}":a));}"string"===typeof d?(c=b.blockedSegment,c.lastPushedText=Ta(b.blockedSegment.chunks,d,a.responseState,c.lastPushedText)):"number"===typeof d&&(c=b.blockedSegment,c.lastPushedText=Ta(b.blockedSegment.chunks,""+d,a.responseState,c.lastPushedText))}function de(a,b,c){for(var d=c.length,e=0;e<d;e++){var f=b.treeContext;b.treeContext=hd(f,d,e);try{be(a,b,c[e])}finally{b.treeContext=f}}} +function be(a,b,c){var d=b.blockedSegment.formatContext,e=b.legacyContext,f=b.context;try{return Z(a,b,null,c)}catch(m){if(Dd(),c=m===md?qd():m,"object"===typeof c&&null!==c&&"function"===typeof c.then){var g=Ed(),h=b.blockedSegment,n=Ud(a,h.chunks.length,null,h.formatContext,h.lastPushedText,!0);h.children.push(n);h.lastPushedText=!1;a=Vd(a,g,b.node,b.blockedBoundary,n,b.abortSet,b.legacyContext,b.context,b.treeContext).ping;c.then(a,a);b.blockedSegment.formatContext=d;b.legacyContext=e;b.context= +f;dd(f)}else throw b.blockedSegment.formatContext=d,b.legacyContext=e,b.context=f,dd(f),c;}}function ee(a){var b=a.blockedBoundary;a=a.blockedSegment;a.status=3;fe(this,b,a)} +function ge(a,b,c){var d=a.blockedBoundary;a.blockedSegment.status=3;null===d?(b.allPendingTasks--,1!==b.status&&2!==b.status&&(Xd(b,c),Yd(b,c))):(d.pendingTasks--,d.forceClientRender||(d.forceClientRender=!0,d.errorDigest=b.onError(c),d.parentFlushed&&b.clientRenderedBoundaries.push(d)),d.fallbackAbortableTasks.forEach(function(a){return ge(a,b,c)}),d.fallbackAbortableTasks.clear(),b.allPendingTasks--,0===b.allPendingTasks&&(a=b.onAllReady,a()))} +function ce(a,b){if(0===b.chunks.length&&1===b.children.length&&null===b.children[0].boundary){var c=b.children[0];c.id=b.id;c.parentFlushed=!0;1===c.status&&ce(a,c)}else a.completedSegments.push(b)} +function fe(a,b,c){if(null===b){if(c.parentFlushed){if(null!==a.completedRootSegment)throw Error(k(389));a.completedRootSegment=c}a.pendingRootTasks--;0===a.pendingRootTasks&&(a.onShellError=Sd,b=a.onShellReady,b())}else b.pendingTasks--,b.forceClientRender||(0===b.pendingTasks?(c.parentFlushed&&1===c.status&&ce(b,c),(null!==a.completedRootSegment||0<a.pendingRootTasks)&&Ga(a.resources,b.resources),b.parentFlushed&&a.completedBoundaries.push(b),b.fallbackAbortableTasks.forEach(ee,a),b.fallbackAbortableTasks.clear()): +c.parentFlushed&&1===c.status&&(ce(b,c),1===b.completedSegments.length&&b.parentFlushed&&a.partialBoundaries.push(b)));a.allPendingTasks--;0===a.allPendingTasks&&(a=a.onAllReady,a())} +function Wd(a){if(2!==a.status){var b=T,c=Pd.current;Pd.current=Nd;var d=Qd.current;Qd.current=Od;var e=a.resources;va.push(E);E=e;e=Ha.current;Ha.current=ya;var f=Md;Md=a.responseState;try{var g=a.pingedTasks,h;for(h=0;h<g.length;h++){var n=g[h];var m=a,t=n.blockedBoundary;m.resources.boundaryResources=t?t.resources:null;var r=n.blockedSegment;if(0===r.status){dd(n.context);try{var u=n.thenableState;n.thenableState=null;Z(m,n,u,n.node);r.lastPushedText&&r.textEmbedded&&r.chunks.push(I);n.abortSet.delete(n); +r.status=1;fe(m,n.blockedBoundary,r)}catch(oa){Dd();var y=oa===md?qd():oa;if("object"===typeof y&&null!==y&&"function"===typeof y.then){var N=n.ping;y.then(N,N);n.thenableState=Ed()}else{n.abortSet.delete(n);r.status=4;var H=m,K=n.blockedBoundary,ja=y,aa=Xd(H,ja);null===K?Yd(H,ja):(K.pendingTasks--,K.forceClientRender||(K.forceClientRender=!0,K.errorDigest=aa,K.parentFlushed&&H.clientRenderedBoundaries.push(K)));H.allPendingTasks--;if(0===H.allPendingTasks){var oe=H.onAllReady;oe()}}}finally{m.resources.boundaryResources= +null}}}g.splice(0,h);null!==a.destination&&he(a,a.destination)}catch(oa){Xd(a,oa),Yd(a,oa)}finally{Md=f,Pd.current=c,Qd.current=d,E=va.pop(),Ha.current=e,c===Nd&&dd(b)}}} +function ie(a,b,c){c.parentFlushed=!0;switch(c.status){case 0:var d=c.id=a.nextSegmentId++;c.lastPushedText=!1;c.textEmbedded=!1;a=a.responseState;q(b,ob);q(b,a.placeholderPrefix);a=w(d.toString(16));q(b,a);return v(b,pb);case 1:c.status=2;var e=!0;d=c.chunks;var f=0;c=c.children;for(var g=0;g<c.length;g++){for(e=c[g];f<e.index;f++)q(b,d[f]);e=je(a,b,e)}for(;f<d.length-1;f++)q(b,d[f]);f<d.length&&(e=v(b,d[f]));return e;default:throw Error(k(390));}} +function je(a,b,c){var d=c.boundary;if(null===d)return ie(a,b,c);d.parentFlushed=!0;if(d.forceClientRender)d=d.errorDigest,v(b,tb),q(b,vb),d&&(q(b,xb),q(b,w(C(d))),q(b,wb)),v(b,yb),ie(a,b,c);else if(0<d.pendingTasks){d.rootSegmentID=a.nextSegmentId++;0<d.completedSegments.length&&a.partialBoundaries.push(d);var e=a.responseState;var f=e.nextSuspenseID++;e=x(e.boundaryPrefix+f.toString(16));d=d.id=e;zb(b,a.responseState,d);ie(a,b,c)}else if(d.byteSize>a.progressiveChunkSize)d.rootSegmentID=a.nextSegmentId++, +a.completedBoundaries.push(d),zb(b,a.responseState,d.id),ie(a,b,c);else{Fa(a.resources,d.resources);v(b,qb);c=d.completedSegments;if(1!==c.length)throw Error(k(391));je(a,b,c[0])}return v(b,ub)}function ke(a,b,c){Vb(b,a.responseState,c.formatContext,c.id);je(a,b,c);return Wb(b,c.formatContext)} +function le(a,b,c){a.resources.boundaryResources=c.resources;for(var d=c.completedSegments,e=0;e<d.length;e++)me(a,b,c,d[e]);d.length=0;a=a.responseState;d=c.id;e=c.rootSegmentID;c=c.resources;var f;b:{for(f=c.values();;){var g=f.next().value;if(!g)break;if(!g.inShell){f=!0;break b}}f=!1}q(b,a.startInlineScript);f?a.sentCompleteBoundaryFunction?a.sentStyleInsertionFunction?q(b,ec):(a.sentStyleInsertionFunction=!0,q(b,dc)):(a.sentCompleteBoundaryFunction=!0,a.sentStyleInsertionFunction=!0,q(b,512< +cc.length?cc.slice():cc)):a.sentCompleteBoundaryFunction?q(b,bc):(a.sentCompleteBoundaryFunction=!0,q(b,ac));if(null===d)throw Error(k(395));e=w(e.toString(16));q(b,d);q(b,fc);q(b,a.segmentPrefix);q(b,e);f?(q(b,gc),Ac(b,c)):q(b,hc);b=v(b,ic);return b} +function me(a,b,c,d){if(2===d.status)return!0;var e=d.id;if(-1===e){if(-1===(d.id=c.rootSegmentID))throw Error(k(392));return ke(a,b,d)}ke(a,b,d);a=a.responseState;q(b,a.startInlineScript);a.sentCompleteSegmentFunction?q(b,Yb):(a.sentCompleteSegmentFunction=!0,q(b,Xb));q(b,a.segmentPrefix);e=w(e.toString(16));q(b,e);q(b,Zb);q(b,a.placeholderPrefix);q(b,e);b=v(b,$b);return b} +function he(a,b){l=new Uint8Array(512);p=0;try{var c,d=a.completedRootSegment;if(null!==d)if(0===a.pendingRootTasks){var e=a.preamble;for(c=0;c<e.length;c++)q(b,e[c]);uc(b,a.resources,a.responseState);je(a,b,d);a.completedRootSegment=null;var f=a.responseState.bootstrapChunks;for(d=0;d<f.length-1;d++)q(b,f[d]);d<f.length&&v(b,f[d])}else return;else vc(b,a.resources,a.responseState);var g=a.clientRenderedBoundaries;for(c=0;c<g.length;c++){var h=g[c];f=b;var n=a.responseState,m=h.id,t=h.errorDigest, +r=h.errorMessage,u=h.errorComponentStack;q(f,n.startInlineScript);n.sentClientRenderFunction?q(f,kc):(n.sentClientRenderFunction=!0,q(f,jc));if(null===m)throw Error(k(395));q(f,m);q(f,lc);if(t||r||u)q(f,mc),q(f,w(pc(t||"")));if(r||u)q(f,mc),q(f,w(pc(r||"")));u&&(q(f,mc),q(f,w(pc(u))));if(!v(f,nc)){a.destination=null;c++;g.splice(0,c);return}}g.splice(0,c);var y=a.completedBoundaries;for(c=0;c<y.length;c++)if(!le(a,b,y[c])){a.destination=null;c++;y.splice(0,c);return}y.splice(0,c);da(b);l=new Uint8Array(512); +p=0;var N=a.partialBoundaries;for(c=0;c<N.length;c++){var H=N[c];a:{g=a;h=b;g.resources.boundaryResources=H.resources;var K=H.completedSegments;for(n=0;n<K.length;n++)if(!me(g,h,H,K[n])){n++;K.splice(0,n);var ja=!1;break a}K.splice(0,n);ja=!0}if(!ja){a.destination=null;c++;N.splice(0,c);return}}N.splice(0,c);var aa=a.completedBoundaries;for(c=0;c<aa.length;c++)if(!le(a,b,aa[c])){a.destination=null;c++;aa.splice(0,c);return}aa.splice(0,c)}finally{if(0===a.allPendingTasks&&0===a.pingedTasks.length&& +0===a.clientRenderedBoundaries.length&&0===a.completedBoundaries.length){a=a.postamble;for(c=0;c<a.length;c++)q(b,a[c]);da(b);b.close()}else da(b)}}function ne(a,b){try{var c=a.abortableTasks;if(0<c.size){var d=void 0===b?Error(k(432)):b;c.forEach(function(b){return ge(b,a,d)});c.clear()}null!==a.destination&&he(a,a.destination)}catch(e){Xd(a,e),Yd(a,e)}} +exports.renderToReadableStream=function(a,b){return new Promise(function(c,d){var e,f,g=new Promise(function(a,b){f=a;e=b}),h=Td(a,Qa(b?b.identifierPrefix:void 0,b?b.nonce:void 0,b?b.bootstrapScriptContent:void 0,b?b.bootstrapScripts:void 0,b?b.bootstrapModules:void 0,b?b.unstable_externalRuntimeSrc:void 0),Ra(b?b.namespaceURI:void 0),b?b.progressiveChunkSize:void 0,b?b.onError:void 0,f,function(){var a=new ReadableStream({type:"bytes",pull:function(a){if(1===h.status)h.status=2,fa(a,h.fatalError); +else if(2!==h.status&&null===h.destination){h.destination=a;try{he(h,a)}catch(u){Xd(h,u),Yd(h,u)}}},cancel:function(){ne(h)}},{highWaterMark:0});a.allReady=g;c(a)},function(a){g.catch(function(){});d(a)},e);if(b&&b.signal){var n=b.signal;if(n.aborted)ne(h,n.reason);else{var m=function(){ne(h,n.reason);n.removeEventListener("abort",m)};n.addEventListener("abort",m)}}Wd(h)})};exports.version="18.3.0-next-6ddcbd4f9-20230209"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.development.js index e78cbb48c4d14..a1cdda3209009 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.development.js @@ -17,7 +17,7 @@ if (process.env.NODE_ENV !== "production") { var React = require('react'); var ReactDOM = require('react-dom'); -var ReactVersion = '18.3.0-next-4fcc9184a-20230217'; +var ReactVersion = '18.3.0-next-6ddcbd4f9-20230209'; var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; @@ -185,23 +185,6 @@ function closeWithError(destination, error) { } } -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - - return obj; -} - -var assign = Object.assign; - /* * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol * and Temporal.* types. See https://github.com/facebook/react/pull/22064. @@ -616,7 +599,6 @@ var isUnitlessNumber = { opacity: true, order: true, orphans: true, - scale: true, tabSize: true, widows: true, zIndex: true, @@ -1775,1404 +1757,1671 @@ function isArray(a) { return isArrayImpl(a); } -// The build script is at scripts/rollup/generate-inline-fizz-runtime.js. -// Run `yarn generate-inline-fizz-runtime` to generate. -var clientRenderBoundary = '$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};'; -var completeBoundary = '$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};'; -var completeBoundaryWithStyles = '$RM=new Map;\n$RR=function(p,q,w){function r(l){this.s=l}for(var t=$RC,m=$RM,u=new Map,n=new Map,g=document,h,e,f=g.querySelectorAll("template[data-precedence]"),c=0;e=f[c++];){for(var b=e.content.firstChild;b;b=b.nextSibling)u.set(b.getAttribute("data-href"),b);e.parentNode.removeChild(e)}f=g.querySelectorAll("link[data-precedence],style[data-precedence]");for(c=0;e=f[c++];)m.set(e.getAttribute("STYLE"===e.nodeName?"data-href":"href"),e),n.set(e.dataset.precedence,h=e);e=0;f=[];for(var d,\nv,a;d=w[e++];){var k=0;b=d[k++];if(!(a=m.get(b))){if(a=u.get(b))c=a.getAttribute("data-precedence");else{a=g.createElement("link");a.href=b;a.rel="stylesheet";for(a.dataset.precedence=c=d[k++];v=d[k++];)a.setAttribute(v,d[k++]);d=a._p=new Promise(function(l,x){a.onload=l;a.onerror=x});d.then(r.bind(d,"l"),r.bind(d,"e"))}m.set(b,a);b=n.get(c)||h;b===h&&(h=a);n.set(c,a);b?b.parentNode.insertBefore(a,b.nextSibling):(c=g.head,c.insertBefore(a,c.firstChild))}d=a._p;c=a.getAttribute("media");!d||"l"===\nd.s||c&&!matchMedia(c).matches||f.push(d)}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};'; -var completeSegment = '$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};'; - -function getValueDescriptorExpectingObjectForWarning(thing) { - return thing === null ? '`null`' : thing === undefined ? '`undefined`' : thing === '' ? 'an empty string' : "something with type \"" + typeof thing + "\""; -} -function getValueDescriptorExpectingEnumForWarning(thing) { - return thing === null ? '`null`' : thing === undefined ? '`undefined`' : thing === '' ? 'an empty string' : typeof thing === 'string' ? JSON.stringify(thing) : "something with type \"" + typeof thing + "\""; -} +var assign = Object.assign; -function compareResourcePropsForWarning(newProps, currentProps) { +function validatePreloadResourceDifference(originalProps, originalImplicit, latestProps, latestImplicit) { { - var propDiffs = null; - var allProps = Array.from(new Set(Object.keys(currentProps).concat(Object.keys(newProps)))); - - for (var i = 0; i < allProps.length; i++) { - var propName = allProps[i]; - var newValue = newProps[propName]; - var currentValue = currentProps[propName]; - - if (newValue !== currentValue && !(newValue == null && currentValue == null)) { - if (newValue == null) { - if (propDiffs === null) { - propDiffs = { - missing: {}, - extra: {}, - different: {} - }; - } + var href = originalProps.href; + var originalWarningName = getResourceNameForWarning('preload', originalProps, originalImplicit); + var latestWarningName = getResourceNameForWarning('preload', latestProps, latestImplicit); - propDiffs.missing[propName] = currentValue; - } else if (currentValue == null) { - if (propDiffs === null) { - propDiffs = { - missing: {}, - extra: {}, - different: {} - }; - } + if (latestProps.as !== originalProps.as) { + error('A %s is using the same href "%s" as a %s. This is always an error and React will only keep the first preload' + ' for any given href, discarding subsequent instances. To fix, find where you are using this href in link' + ' tags or in calls to ReactDOM.preload() or ReactDOM.preinit() and either make the Resource types agree or' + ' update the hrefs to be distinct for different Resource types.', latestWarningName, href, originalWarningName); + } else { + var missingProps = null; + var extraProps = null; + var differentProps = null; - propDiffs.extra[propName] = newValue; - } else { - if (propDiffs === null) { - propDiffs = { - missing: {}, - extra: {}, - different: {} + if (originalProps.media != null && latestProps.media == null) { + missingProps = missingProps || {}; + missingProps.media = originalProps.media; + } + + for (var propName in latestProps) { + var propValue = latestProps[propName]; + var originalValue = originalProps[propName]; + + if (propValue != null && propValue !== originalValue) { + if (originalValue == null) { + extraProps = extraProps || {}; + extraProps[propName] = propValue; + } else { + differentProps = differentProps || {}; + differentProps[propName] = { + original: originalValue, + latest: propValue }; } + } + } + + if (missingProps || extraProps || differentProps) { + warnDifferentProps(href, 'href', originalWarningName, latestWarningName, extraProps, missingProps, differentProps); + } + } + } +} +function validateStyleResourceDifference(originalProps, latestProps) { + { + var href = originalProps.href; // eslint-disable-next-line no-labels + + var originalWarningName = getResourceNameForWarning('style', originalProps, false); + var latestWarningName = getResourceNameForWarning('style', latestProps, false); + var missingProps = null; + var extraProps = null; + var differentProps = null; + + if (originalProps.media != null && latestProps.media == null) { + missingProps = missingProps || {}; + missingProps.media = originalProps.media; + } - propDiffs.different[propName] = { - original: currentValue, - latest: newValue + for (var propName in latestProps) { + var propValue = latestProps[propName]; + var originalValue = originalProps[propName]; + + if (propValue != null && propValue !== originalValue) { + propName = propName === 'data-precedence' ? 'precedence' : propName; + + if (originalValue == null) { + extraProps = extraProps || {}; + extraProps[propName] = propValue; + } else { + differentProps = differentProps || {}; + differentProps[propName] = { + original: originalValue, + latest: propValue }; } } } - return propDiffs; + if (missingProps || extraProps || differentProps) { + warnDifferentProps(href, 'href', originalWarningName, latestWarningName, extraProps, missingProps, differentProps); + } } } +function validateScriptResourceDifference(originalProps, latestProps) { + { + var src = originalProps.src; // eslint-disable-next-line no-labels -function describeDifferencesForStylesheets(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; + var originalWarningName = getResourceNameForWarning('script', originalProps, false); + var latestWarningName = getResourceNameForWarning('script', latestProps, false); + var extraProps = null; + var differentProps = null; - for (var propName in diff.missing) { - var propValue = diff.missing[propName]; + for (var propName in latestProps) { + var propValue = latestProps[propName]; + var originalValue = originalProps[propName]; - if (propName === 'media') { - description += "\n \"" + propName + "\" missing for props, original value: " + getValueDescriptorExpectingEnumForWarning(propValue); + if (propValue != null && propValue !== originalValue) { + if (originalValue == null) { + extraProps = extraProps || {}; + extraProps[propName] = propValue; + } else { + differentProps = differentProps || {}; + differentProps[propName] = { + original: originalValue, + latest: propValue + }; + } + } } - } - for (var _propName in diff.extra) { - var _propValue = diff.extra[_propName]; - description += "\n \"" + _propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(_propValue) + ", missing from original props"; + if (extraProps || differentProps) { + warnDifferentProps(src, 'src', originalWarningName, latestWarningName, extraProps, null, differentProps); + } } +} +function validateStyleAndHintProps(preloadProps, styleProps, implicitPreload) { + { + var href = preloadProps.href; + var originalWarningName = getResourceNameForWarning('preload', preloadProps, implicitPreload); + var latestWarningName = getResourceNameForWarning('style', styleProps, false); - for (var _propName2 in diff.different) { - var latestValue = diff.different[_propName2].latest; - var originalValue = diff.different[_propName2].original; - description += "\n \"" + _propName2 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", original value: " + getValueDescriptorExpectingEnumForWarning(originalValue); - } + if (preloadProps.as !== 'style') { + error('While creating a %s for href "%s" a %s for this same href was found. When preloading a stylesheet the' + ' "as" prop must be of type "style". This most likely ocurred by rendering a preload link with an incorrect' + ' "as" prop or by calling ReactDOM.preload with an incorrect "as" option.', latestWarningName, href, originalWarningName); + } - return description; -} -function describeDifferencesForStylesheetOverPreinit(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; + var missingProps = null; + var extraProps = null; + var differentProps = null; - for (var propName in diff.extra) { - var propValue = diff.extra[propName]; + for (var propName in styleProps) { + var styleValue = styleProps[propName]; + var preloadValue = preloadProps[propName]; - if (propName === 'precedence' || propName === 'crossOrigin' || propName === 'integrity') { - description += "\n \"" + propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", option missing"; - } else { - description += "\n \"" + propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", option not available with ReactDOM.preinit()"; + switch (propName) { + // Check for difference on specific props that cross over or influence + // the relationship between the preload and stylesheet + case 'crossOrigin': + case 'referrerPolicy': + case 'media': + case 'title': + { + if (preloadValue !== styleValue && !(preloadValue == null && styleValue == null)) { + if (styleValue == null) { + missingProps = missingProps || {}; + missingProps[propName] = preloadValue; + } else if (preloadValue == null) { + extraProps = extraProps || {}; + extraProps[propName] = styleValue; + } else { + differentProps = differentProps || {}; + differentProps[propName] = { + original: preloadValue, + latest: styleValue + }; + } + } + } + } } - } - - for (var _propName3 in diff.different) { - var latestValue = diff.different[_propName3].latest; - var originalValue = diff.different[_propName3].original; - if (_propName3 === 'precedence' && originalValue === 'default') { - description += "\n \"" + _propName3 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", missing from options"; - } else { - description += "\n \"" + _propName3 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", option value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + if (missingProps || extraProps || differentProps) { + warnDifferentProps(href, 'href', originalWarningName, latestWarningName, extraProps, missingProps, differentProps); } } - - return description; } -function describeDifferencesForPreinitOverStylesheet(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; - - for (var propName in diff.missing) { - var propValue = diff.missing[propName]; +function validateScriptAndHintProps(preloadProps, scriptProps, implicitPreload) { + { + var href = preloadProps.href; + var originalWarningName = getResourceNameForWarning('preload', preloadProps, implicitPreload); + var latestWarningName = getResourceNameForWarning('script', scriptProps, false); - if (propName === 'precedence' && propValue !== 'default') { - description += "\n \"" + propName + "\" missing from options, prop value: " + getValueDescriptorExpectingEnumForWarning(propValue); + if (preloadProps.as !== 'script') { + error('While creating a %s for href "%s" a %s for this same url was found. When preloading a script the' + ' "as" prop must be of type "script". This most likely ocurred by rendering a preload link with an incorrect' + ' "as" prop or by calling ReactDOM.preload with an incorrect "as" option.', latestWarningName, href, originalWarningName); } - } - for (var _propName4 in diff.extra) { - var _propValue2 = diff.extra[_propName4]; + var missingProps = null; + var extraProps = null; + var differentProps = null; + + for (var propName in scriptProps) { + var scriptValue = scriptProps[propName]; + var preloadValue = preloadProps[propName]; - if (_propName4 === 'precedence' || _propName4 === 'crossOrigin' || _propName4 === 'integrity') { - description += "\n \"" + _propName4 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(_propValue2) + ", missing from props"; + switch (propName) { + // Check for difference on specific props that cross over or influence + // the relationship between the preload and stylesheet + case 'crossOrigin': + case 'referrerPolicy': + case 'integrity': + { + if (preloadValue !== scriptValue && !(preloadValue == null && scriptValue == null)) { + if (scriptValue == null) { + missingProps = missingProps || {}; + missingProps[propName] = preloadValue; + } else if (preloadValue == null) { + extraProps = extraProps || {}; + extraProps[propName] = scriptValue; + } else { + differentProps = differentProps || {}; + differentProps[propName] = { + original: preloadValue, + latest: scriptValue + }; + } + } + } + } } - } - for (var _propName5 in diff.different) { - var latestValue = diff.different[_propName5].latest; - var originalValue = diff.different[_propName5].original; - description += "\n \"" + _propName5 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", prop value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + if (missingProps || extraProps || differentProps) { + warnDifferentProps(href, 'href', originalWarningName, latestWarningName, extraProps, missingProps, differentProps); + } } - - return description; } -function describeDifferencesForPreinits(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; - for (var propName in diff.missing) { - var propValue = diff.missing[propName]; +function warnDifferentProps(url, urlPropKey, originalName, latestName, extraProps, missingProps, differentProps) { + { + var juxtaposedNameStatement = latestName === originalName ? 'an earlier instance of this Resource' : "a " + originalName + " with the same " + urlPropKey; + var comparisonStatement = ''; - if (propName === 'precedence' && propValue !== 'default') { - description += "\n \"" + propName + "\" missing from options, original option value: " + getValueDescriptorExpectingEnumForWarning(propValue); + if (missingProps !== null && typeof missingProps === 'object') { + for (var propName in missingProps) { + comparisonStatement += "\n " + propName + ": missing or null in latest props, \"" + missingProps[propName] + "\" in original props"; + } } - } - for (var _propName6 in diff.extra) { - var _propValue3 = diff.extra[_propName6]; + if (extraProps !== null && typeof extraProps === 'object') { + for (var _propName in extraProps) { + comparisonStatement += "\n " + _propName + ": \"" + extraProps[_propName] + "\" in latest props, missing or null in original props"; + } + } - if (_propName6 === 'precedence' && _propValue3 !== 'default' || _propName6 === 'crossOrigin' || _propName6 === 'integrity') { - description += "\n \"" + _propName6 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(_propValue3) + ", missing from original options"; + if (differentProps !== null && typeof differentProps === 'object') { + for (var _propName2 in differentProps) { + comparisonStatement += "\n " + _propName2 + ": \"" + differentProps[_propName2].latest + "\" in latest props, \"" + differentProps[_propName2].original + "\" in original props"; + } } - } - for (var _propName7 in diff.different) { - var latestValue = diff.different[_propName7].latest; - var originalValue = diff.different[_propName7].original; - description += "\n \"" + _propName7 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", original option value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + error('A %s with %s "%s" has props that disagree with those found on %s. Resources always use the props' + ' that were provided the first time they are encountered so any differences will be ignored. Please' + ' update Resources that share an %s to have props that agree. The differences are described below.%s', latestName, urlPropKey, url, juxtaposedNameStatement, urlPropKey, comparisonStatement); } - - return description; } -var preloadOptionsForComparison = ['as', 'crossOrigin', 'integrity', 'media']; -function describeDifferencesForPreloads(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; - for (var propName in diff.missing) { - var propValue = diff.missing[propName]; +function getResourceNameForWarning(type, props, implicit) { + { + switch (type) { + case 'style': + { + return 'style Resource'; + } - if (preloadOptionsForComparison.includes(propName)) { - description += "\n \"" + propName + "\" missing from options, original option value: " + getValueDescriptorExpectingEnumForWarning(propValue); - } - } + case 'script': + { + return 'script Resource'; + } - for (var _propName8 in diff.extra) { - var _propValue4 = diff.extra[_propName8]; + case 'preload': + { + if (implicit) { + return "preload for a " + props.as + " Resource"; + } - if (preloadOptionsForComparison.includes(_propName8)) { - description += "\n \"" + _propName8 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(_propValue4) + ", missing from original options"; + return "preload Resource (as \"" + props.as + "\")"; + } } } - for (var _propName9 in diff.different) { - var latestValue = diff.different[_propName9].latest; - var originalValue = diff.different[_propName9].original; + return 'Resource'; +} +function validateLinkPropsForStyleResource(props) { + { + // This should only be called when we know we are opting into Resource semantics (i.e. precedence is not null) + var href = props.href, + onLoad = props.onLoad, + onError = props.onError, + disabled = props.disabled; + var allProps = ['onLoad', 'onError', 'disabled']; + var includedProps = []; + if (onLoad) includedProps.push('onLoad'); + if (onError) includedProps.push('onError'); + if (disabled != null) includedProps.push('disabled'); + var allPropsUnionPhrase = propNamesListJoin(allProps, 'or'); + var includedPropsPhrase = propNamesListJoin(includedProps, 'and'); + includedPropsPhrase += includedProps.length === 1 ? ' prop' : ' props'; + + if (includedProps.length) { + error('A link (rel="stylesheet") element with href "%s" has the precedence prop but also included the %s.' + ' When using %s React will opt out of Resource behavior. If you meant for this' + ' element to be treated as a Resource remove the %s. Otherwise remove the precedence prop.', href, includedPropsPhrase, allPropsUnionPhrase, includedPropsPhrase); - if (preloadOptionsForComparison.includes(_propName9)) { - description += "\n \"" + _propName9 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", original option value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + return true; } } - return description; + return false; } -function describeDifferencesForPreloadOverImplicitPreload(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; - for (var propName in diff.missing) { - var propValue = diff.missing[propName]; +function propNamesListJoin(list, combinator) { + switch (list.length) { + case 0: + return ''; - if (preloadOptionsForComparison.includes(propName)) { - description += "\n \"" + propName + "\" missing from options, underlying prop value: " + getValueDescriptorExpectingEnumForWarning(propValue); - } - } + case 1: + return list[0]; - for (var _propName10 in diff.extra) { - var _propValue5 = diff.extra[_propName10]; + case 2: + return list[0] + ' ' + combinator + ' ' + list[1]; - if (preloadOptionsForComparison.includes(_propName10)) { - description += "\n \"" + _propName10 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(_propValue5) + ", missing from underlying props"; - } + default: + return list.slice(0, -1).join(', ') + ', ' + combinator + ' ' + list[list.length - 1]; } +} - for (var _propName11 in diff.different) { - var latestValue = diff.different[_propName11].latest; - var originalValue = diff.different[_propName11].original; +function validateLinkPropsForPreloadResource(linkProps) { + { + var href = linkProps.href, + as = linkProps.as; + + if (as === 'font') { + var name = getResourceNameForWarning('preload', linkProps, false); - if (preloadOptionsForComparison.includes(_propName11)) { - description += "\n \"" + _propName11 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", underlying prop value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + if (!hasOwnProperty.call(linkProps, 'crossOrigin')) { + error('A %s with href "%s" did not specify the crossOrigin prop. Font preloads must always use' + ' anonymouse CORS mode. To fix add an empty string, "anonymous", or any other string' + ' value except "use-credentials" for the crossOrigin prop of all font preloads.', name, href); + } else if (linkProps.crossOrigin === 'use-credentials') { + error('A %s with href "%s" specified a crossOrigin value of "use-credentials". Font preloads must always use' + ' anonymouse CORS mode. To fix use an empty string, "anonymous", or any other string' + ' value except "use-credentials" for the crossOrigin prop of all font preloads.', name, href); + } } } - - return description; } -function describeDifferencesForScripts(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; +function validatePreloadArguments(href, options) { + { + if (!href || typeof href !== 'string') { + var typeOfArg = getValueDescriptorExpectingObjectForWarning(href); - for (var propName in diff.missing) { - var propValue = diff.missing[propName]; - description += "\n \"" + propName + "\" missing for props, original value: " + getValueDescriptorExpectingEnumForWarning(propValue); - } + error('ReactDOM.preload() expected the first argument to be a string representing an href but found %s instead.', typeOfArg); + } else if (typeof options !== 'object' || options === null) { + var _typeOfArg = getValueDescriptorExpectingObjectForWarning(options); - for (var _propName12 in diff.extra) { - var _propValue6 = diff.extra[_propName12]; - description += "\n \"" + _propName12 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(_propValue6) + ", missing from original props"; - } + error('ReactDOM.preload() expected the second argument to be an options argument containing at least an "as" property' + ' specifying the Resource type. It found %s instead. The href for the preload call where this warning originated is "%s".', _typeOfArg, href); + } else { + var as = options.as; - for (var _propName13 in diff.different) { - var latestValue = diff.different[_propName13].latest; - var originalValue = diff.different[_propName13].original; - description += "\n \"" + _propName13 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", original value: " + getValueDescriptorExpectingEnumForWarning(originalValue); - } + switch (as) { + // Font specific validation of options + case 'font': + { + if (options.crossOrigin === 'use-credentials') { + error('ReactDOM.preload() was called with an "as" type of "font" and with a "crossOrigin" option of "use-credentials".' + ' Fonts preloading must use crossOrigin "anonymous" to be functional. Please update your font preload to omit' + ' the crossOrigin option or change it to any other value than "use-credentials" (Browsers default all other values' + ' to anonymous mode). The href for the preload call where this warning originated is "%s"', href); + } - return description; -} -function describeDifferencesForScriptOverPreinit(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; + break; + } - for (var propName in diff.extra) { - var propValue = diff.extra[propName]; + case 'script': + case 'style': + { + break; + } + // We have an invalid as type and need to warn - if (propName === 'crossOrigin' || propName === 'integrity') { - description += "\n \"" + propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", option missing"; - } else { - description += "\n \"" + propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", option not available with ReactDOM.preinit()"; + default: + { + var typeOfAs = getValueDescriptorExpectingEnumForWarning(as); + + error('ReactDOM.preload() expected a valid "as" type in the options (second) argument but found %s instead.' + ' Please use one of the following valid values instead: %s. The href for the preload call where this' + ' warning originated is "%s".', typeOfAs, '"style", "font", or "script"', href); + } + } } } +} +function validatePreinitArguments(href, options) { + { + if (!href || typeof href !== 'string') { + var typeOfArg = getValueDescriptorExpectingObjectForWarning(href); - for (var _propName14 in diff.different) { - var latestValue = diff.different[_propName14].latest; - var originalValue = diff.different[_propName14].original; - description += "\n \"" + _propName14 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", option value: " + getValueDescriptorExpectingEnumForWarning(originalValue); - } + error('ReactDOM.preinit() expected the first argument to be a string representing an href but found %s instead.', typeOfArg); + } else if (typeof options !== 'object' || options === null) { + var _typeOfArg2 = getValueDescriptorExpectingObjectForWarning(options); - return description; -} -function describeDifferencesForPreinitOverScript(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; + error('ReactDOM.preinit() expected the second argument to be an options argument containing at least an "as" property' + ' specifying the Resource type. It found %s instead. The href for the preload call where this warning originated is "%s".', _typeOfArg2, href); + } else { + var as = options.as; - for (var propName in diff.extra) { - var propValue = diff.extra[propName]; + switch (as) { + case 'style': + case 'script': + { + break; + } + // We have an invalid as type and need to warn - if (propName === 'crossOrigin' || propName === 'integrity') { - description += "\n \"" + propName + "\" option value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", missing from props"; - } - } + default: + { + var typeOfAs = getValueDescriptorExpectingEnumForWarning(as); - for (var _propName15 in diff.different) { - var latestValue = diff.different[_propName15].latest; - var originalValue = diff.different[_propName15].original; - description += "\n \"" + _propName15 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", prop value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + error('ReactDOM.preinit() expected the second argument to be an options argument containing at least an "as" property' + ' specifying the Resource type. It found %s instead. Currently, valid resource types for for preinit are "style"' + ' and "script". The href for the preinit call where this warning originated is "%s".', typeOfAs, href); + } + } + } } +} - return description; +function getValueDescriptorExpectingObjectForWarning(thing) { + return thing === null ? 'null' : thing === undefined ? 'undefined' : thing === '' ? 'an empty string' : "something with type \"" + typeof thing + "\""; } -var ReactDOMSharedInternals = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; +function getValueDescriptorExpectingEnumForWarning(thing) { + return thing === null ? 'null' : thing === undefined ? 'undefined' : thing === '' ? 'an empty string' : typeof thing === 'string' ? JSON.stringify(thing) : "something with type \"" + typeof thing + "\""; +} -var ReactDOMCurrentDispatcher = ReactDOMSharedInternals.Dispatcher; -var ReactDOMServerDispatcher = { - preload: preload, - preinit: preinit -} ; +function createResources() { + return { + // persistent + preloadsMap: new Map(), + stylesMap: new Map(), + scriptsMap: new Map(), + headsMap: new Map(), + // cleared on flush + charset: null, + bases: new Set(), + preconnects: new Set(), + fontPreloads: new Set(), + // usedImagePreloads: new Set(), + precedences: new Map(), + usedStylePreloads: new Set(), + scripts: new Set(), + usedScriptPreloads: new Set(), + explicitStylePreloads: new Set(), + // explicitImagePreloads: new Set(), + explicitScriptPreloads: new Set(), + headResources: new Set(), + // cache for tracking structured meta tags + structuredMetaKeys: new Map(), + // like a module global for currently rendering boundary + boundaryResources: null + }; +} +function createBoundaryResources() { + return new Set(); +} var currentResources = null; var currentResourcesStack = []; -function prepareToRender(resources) { +function prepareToRenderResources(resources) { currentResourcesStack.push(currentResources); currentResources = resources; - var previousHostDispatcher = ReactDOMCurrentDispatcher.current; - ReactDOMCurrentDispatcher.current = ReactDOMServerDispatcher; - return previousHostDispatcher; } -function cleanupAfterRender(previousDispatcher) { +function finishRenderingResources() { currentResources = currentResourcesStack.pop(); - ReactDOMCurrentDispatcher.current = previousDispatcher; -} // Used to distinguish these contexts from ones used in other renderers. -var ScriptStreamingFormat = 0; -var NothingSent -/* */ -= 0; -var SentCompleteSegmentFunction -/* */ -= 1; -var SentCompleteBoundaryFunction -/* */ -= 2; -var SentClientRenderFunction -/* */ -= 4; -var SentStyleInsertionFunction -/* */ -= 8; // Per response, global state that is not contextual to the rendering subtree. +} +function setCurrentlyRenderingBoundaryResourcesTarget(resources, boundaryResources) { + resources.boundaryResources = boundaryResources; +} +var ReactDOMServerFloatDispatcher = { + preload: preload, + preinit: preinit +}; -var dataElementQuotedEnd = stringToPrecomputedChunk('"></template>'); -var startInlineScript = stringToPrecomputedChunk('<script>'); -var endInlineScript = stringToPrecomputedChunk('</script>'); -var startScriptSrc = stringToPrecomputedChunk('<script src="'); -var startModuleSrc = stringToPrecomputedChunk('<script type="module" src="'); -var scriptIntegirty = stringToPrecomputedChunk('" integrity="'); -var endAsyncScript = stringToPrecomputedChunk('" async=""></script>'); -/** - * This escaping function is designed to work with bootstrapScriptContent only. - * because we know we are escaping the entire script. We can avoid for instance - * escaping html comment string sequences that are valid javascript as well because - * if there are no sebsequent <script sequences the html parser will never enter - * script data double escaped state (see: https://www.w3.org/TR/html53/syntax.html#script-data-double-escaped-state) - * - * While untrusted script content should be made safe before using this api it will - * ensure that the script cannot be early terminated or never terminated state - */ +function preload(href, options) { + if (!currentResources) { + // While we expect that preload calls are primarily going to be observed + // during render because effects and events don't run on the server it is + // still possible that these get called in module scope. This is valid on + // the client since there is still a document to interact with but on the + // server we need a request to associate the call to. Because of this we + // simply return and do not warn. + return; + } + + var resources = currentResources; -function escapeBootstrapScriptContent(scriptText) { { - checkHtmlStringCoercion(scriptText); + validatePreloadArguments(href, options); } - return ('' + scriptText).replace(scriptRegex, scriptReplacer); -} - -var scriptRegex = /(<\/|<)(s)(cript)/gi; + if (typeof href === 'string' && href && typeof options === 'object' && options !== null) { + var as = options.as; + var resource = resources.preloadsMap.get(href); -var scriptReplacer = function (match, prefix, s, suffix) { - return "" + prefix + (s === 's' ? "\\u0073" : "\\u0053") + suffix; -}; // Allows us to keep track of what we've already written so we can refer back to it. -// if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag -// is set, the server will send instructions via data attributes (instead of inline scripts) + if (resource) { + { + var originallyImplicit = resource._dev_implicit_construction === true; + var latestProps = preloadPropsFromPreloadOptions(href, as, options); + validatePreloadResourceDifference(resource.props, originallyImplicit, latestProps, false); + } + } else { + resource = createPreloadResource(resources, href, as, preloadPropsFromPreloadOptions(href, as, options)); + } + switch (as) { + case 'font': + { + resources.fontPreloads.add(resource); + break; + } -function createResponseState(identifierPrefix, nonce, bootstrapScriptContent, bootstrapScripts, bootstrapModules, externalRuntimeConfig) { - var idPrefix = identifierPrefix === undefined ? '' : identifierPrefix; - var inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk('<script nonce="' + escapeTextForBrowser(nonce) + '">'); - var bootstrapChunks = []; - var externalRuntimeDesc = null; - var streamingFormat = ScriptStreamingFormat; + case 'style': + { + resources.explicitStylePreloads.add(resource); + break; + } - if (bootstrapScriptContent !== undefined) { - bootstrapChunks.push(inlineScriptWithNonce, stringToChunk(escapeBootstrapScriptContent(bootstrapScriptContent)), endInlineScript); + case 'script': + { + resources.explicitScriptPreloads.add(resource); + break; + } + } } +} - if (bootstrapScripts !== undefined) { - for (var i = 0; i < bootstrapScripts.length; i++) { - var scriptConfig = bootstrapScripts[i]; - var src = typeof scriptConfig === 'string' ? scriptConfig : scriptConfig.src; - var integrity = typeof scriptConfig === 'string' ? undefined : scriptConfig.integrity; - bootstrapChunks.push(startScriptSrc, stringToChunk(escapeTextForBrowser(src))); +function preinit(href, options) { + if (!currentResources) { + // While we expect that preinit calls are primarily going to be observed + // during render because effects and events don't run on the server it is + // still possible that these get called in module scope. This is valid on + // the client since there is still a document to interact with but on the + // server we need a request to associate the call to. Because of this we + // simply return and do not warn. + return; + } - if (integrity) { - bootstrapChunks.push(scriptIntegirty, stringToChunk(escapeTextForBrowser(integrity))); - } + preinitImpl(currentResources, href, options); +} // On the server, preinit may be called outside of render when sending an +// external SSR runtime as part of the initial resources payload. Since this +// is an internal React call, we do not need to use the resources stack. - bootstrapChunks.push(endAsyncScript); - } + +function preinitImpl(resources, href, options) { + { + validatePreinitArguments(href, options); } - if (bootstrapModules !== undefined) { - for (var _i = 0; _i < bootstrapModules.length; _i++) { - var _scriptConfig = bootstrapModules[_i]; + if (typeof href === 'string' && href && typeof options === 'object' && options !== null) { + var as = options.as; - var _src = typeof _scriptConfig === 'string' ? _scriptConfig : _scriptConfig.src; + switch (as) { + case 'style': + { + var resource = resources.stylesMap.get(href); - var _integrity = typeof _scriptConfig === 'string' ? undefined : _scriptConfig.integrity; + if (resource) { + { + var latestProps = stylePropsFromPreinitOptions(href, resource.precedence, options); + validateStyleResourceDifference(resource.props, latestProps); + } + } else { + var precedence = options.precedence || 'default'; + var resourceProps = stylePropsFromPreinitOptions(href, precedence, options); + resource = createStyleResource(resources, href, precedence, resourceProps); + } - bootstrapChunks.push(startModuleSrc, stringToChunk(escapeTextForBrowser(_src))); + resource.set.add(resource); + resources.explicitStylePreloads.add(resource.hint); + return; + } - if (_integrity) { - bootstrapChunks.push(scriptIntegirty, stringToChunk(escapeTextForBrowser(_integrity))); - } + case 'script': + { + var src = href; - bootstrapChunks.push(endAsyncScript); + var _resource = resources.scriptsMap.get(src); + + if (_resource) { + { + var _latestProps = scriptPropsFromPreinitOptions(src, options); + + validateScriptResourceDifference(_resource.props, _latestProps); + } + } else { + var scriptProps = scriptPropsFromPreinitOptions(src, options); + _resource = createScriptResource(resources, src, scriptProps); + resources.scripts.add(_resource); + } + + return; + } } } +} +function preloadPropsFromPreloadOptions(href, as, options) { return { - bootstrapChunks: bootstrapChunks, - placeholderPrefix: stringToPrecomputedChunk(idPrefix + 'P:'), - segmentPrefix: stringToPrecomputedChunk(idPrefix + 'S:'), - boundaryPrefix: idPrefix + 'B:', - idPrefix: idPrefix, - nextSuspenseID: 0, - streamingFormat: streamingFormat, - startInlineScript: inlineScriptWithNonce, - instructions: NothingSent, - externalRuntimeConfig: externalRuntimeDesc, - htmlChunks: null, - headChunks: null, - hasBody: false, - charsetChunks: [], - preconnectChunks: [], - preloadChunks: [], - hoistableChunks: [] + href: href, + rel: 'preload', + as: as, + crossOrigin: as === 'font' ? '' : options.crossOrigin, + integrity: options.integrity }; -} // Constants for the insertion mode we're currently writing in. We don't encode all HTML5 insertion -// modes. We only include the variants as they matter for the sake of our purposes. -// We don't actually provide the namespace therefore we use constants instead of the string. +} -var ROOT_HTML_MODE = 0; // Used for the root most element tag. -// We have a less than HTML_HTML_MODE check elsewhere. If you add more cases here, make sure it -// still makes sense +function preloadPropsFromRawProps(href, as, rawProps) { + var props = assign({}, rawProps); -var HTML_HTML_MODE = 1; // Used for the <html> if it is at the top level. + props.href = href; + props.rel = 'preload'; + props.as = as; -var HTML_MODE = 2; -var SVG_MODE = 3; -var MATHML_MODE = 4; -var HTML_TABLE_MODE = 5; -var HTML_TABLE_BODY_MODE = 6; -var HTML_TABLE_ROW_MODE = 7; -var HTML_COLGROUP_MODE = 8; // We have a greater than HTML_TABLE_MODE check elsewhere. If you add more cases here, make sure it -// still makes sense -// Lets us keep track of contextual state and pick it back up after suspending. + if (as === 'font') { + // Font preloads always need CORS anonymous mode so we set it here + // regardless of the props provided. This should warn elsewhere in + // dev + props.crossOrigin = ''; + } -function createFormatContext(insertionMode, selectedValue, noscriptTagInScope) { + return props; +} + +function preloadAsStylePropsFromProps(href, props) { return { - insertionMode: insertionMode, - selectedValue: selectedValue, - noscriptTagInScope: noscriptTagInScope + rel: 'preload', + as: 'style', + href: href, + crossOrigin: props.crossOrigin, + integrity: props.integrity, + media: props.media, + hrefLang: props.hrefLang, + referrerPolicy: props.referrerPolicy }; } -function createRootFormatContext(namespaceURI) { - var insertionMode = namespaceURI === 'http://www.w3.org/2000/svg' ? SVG_MODE : namespaceURI === 'http://www.w3.org/1998/Math/MathML' ? MATHML_MODE : ROOT_HTML_MODE; - return createFormatContext(insertionMode, null, false); +function preloadAsScriptPropsFromProps(href, props) { + return { + rel: 'preload', + as: 'script', + href: href, + crossOrigin: props.crossOrigin, + integrity: props.integrity, + referrerPolicy: props.referrerPolicy + }; } -function getChildFormatContext(parentContext, type, props) { - switch (type) { - case 'noscript': - return createFormatContext(HTML_MODE, null, true); - - case 'select': - return createFormatContext(HTML_MODE, props.value != null ? props.value : props.defaultValue, parentContext.noscriptTagInScope); - case 'svg': - return createFormatContext(SVG_MODE, null, parentContext.noscriptTagInScope); +function createPreloadResource(resources, href, as, props) { + var preloadsMap = resources.preloadsMap; - case 'math': - return createFormatContext(MATHML_MODE, null, parentContext.noscriptTagInScope); + { + if (preloadsMap.has(href)) { + error('createPreloadResource was called when a preload Resource matching the same href already exists. This is a bug in React.'); + } + } - case 'foreignObject': - return createFormatContext(HTML_MODE, null, parentContext.noscriptTagInScope); - // Table parents are special in that their children can only be created at all if they're - // wrapped in a table parent. So we need to encode that we're entering this mode. + var resource = { + type: 'preload', + as: as, + href: href, + flushed: false, + props: props + }; + preloadsMap.set(href, resource); + return resource; +} - case 'table': - return createFormatContext(HTML_TABLE_MODE, null, parentContext.noscriptTagInScope); +function stylePropsFromRawProps(href, precedence, rawProps) { + var props = assign({}, rawProps); - case 'thead': - case 'tbody': - case 'tfoot': - return createFormatContext(HTML_TABLE_BODY_MODE, null, parentContext.noscriptTagInScope); + props.href = href; + props.rel = 'stylesheet'; + props['data-precedence'] = precedence; + delete props.precedence; + return props; +} - case 'colgroup': - return createFormatContext(HTML_COLGROUP_MODE, null, parentContext.noscriptTagInScope); +function stylePropsFromPreinitOptions(href, precedence, options) { + return { + rel: 'stylesheet', + href: href, + 'data-precedence': precedence, + crossOrigin: options.crossOrigin + }; +} - case 'tr': - return createFormatContext(HTML_TABLE_ROW_MODE, null, parentContext.noscriptTagInScope); +function createStyleResource(resources, href, precedence, props) { + { + if (resources.stylesMap.has(href)) { + error('createStyleResource was called when a style Resource matching the same href already exists. This is a bug in React.'); + } } - if (parentContext.insertionMode >= HTML_TABLE_MODE) { - // Whatever tag this was, it wasn't a table parent or other special parent, so we must have - // entered plain HTML again. - return createFormatContext(HTML_MODE, null, parentContext.noscriptTagInScope); + var stylesMap = resources.stylesMap, + preloadsMap = resources.preloadsMap, + precedences = resources.precedences; // If this is the first time we've seen this precedence we encode it's position in our set even though + // we don't add the resource to this set yet + + var precedenceSet = precedences.get(precedence); + + if (!precedenceSet) { + precedenceSet = new Set(); + precedences.set(precedence, precedenceSet); } - if (parentContext.insertionMode === ROOT_HTML_MODE) { - if (type === 'html') { - // We've emitted the root and is now in <html> mode. - return createFormatContext(HTML_HTML_MODE, null, false); - } else { - // We've emitted the root and is now in plain HTML mode. - return createFormatContext(HTML_MODE, null, false); + var hint = preloadsMap.get(href); + + if (hint) { + // If a preload for this style Resource already exists there are certain props we want to adopt + // on the style Resource, primarily focussed on making sure the style network pathways utilize + // the preload pathways. For instance if you have diffreent crossOrigin attributes for a preload + // and a stylesheet the stylesheet will make a new request even if the preload had already loaded + adoptPreloadPropsForStyleProps(props, hint.props); + + { + validateStyleAndHintProps(hint.props, props, hint._dev_implicit_construction); + } + } else { + var preloadResourceProps = preloadAsStylePropsFromProps(href, props); + hint = createPreloadResource(resources, href, 'style', preloadResourceProps); + + { + hint._dev_implicit_construction = true; } - } else if (parentContext.insertionMode === HTML_HTML_MODE) { - // We've emitted the document element and is now in plain HTML mode. - return createFormatContext(HTML_MODE, null, false); + + resources.explicitStylePreloads.add(hint); } - return parentContext; -} -var UNINITIALIZED_SUSPENSE_BOUNDARY_ID = null; -function assignSuspenseBoundaryID(responseState) { - var generatedID = responseState.nextSuspenseID++; - return stringToPrecomputedChunk(responseState.boundaryPrefix + generatedID.toString(16)); + var resource = { + type: 'style', + href: href, + precedence: precedence, + flushed: false, + inShell: false, + props: props, + hint: hint, + set: precedenceSet + }; + stylesMap.set(href, resource); + return resource; } -function makeId(responseState, treeId, localId) { - var idPrefix = responseState.idPrefix; - var id = ':' + idPrefix + 'R' + treeId; // Unless this is the first id at this level, append a number at the end - // that represents the position of this useId hook among all the useId - // hooks for this fiber. - if (localId > 0) { - id += 'H' + localId.toString(32); - } +function adoptPreloadPropsForStyleProps(resourceProps, preloadProps) { + if (resourceProps.crossOrigin == null) resourceProps.crossOrigin = preloadProps.crossOrigin; + if (resourceProps.referrerPolicy == null) resourceProps.referrerPolicy = preloadProps.referrerPolicy; + if (resourceProps.title == null) resourceProps.title = preloadProps.title; +} - return id + ':'; +function scriptPropsFromPreinitOptions(src, options) { + return { + src: src, + async: true, + crossOrigin: options.crossOrigin, + integrity: options.integrity + }; } -function encodeHTMLTextNode(text) { - return escapeTextForBrowser(text); +function scriptPropsFromRawProps(src, rawProps) { + var props = assign({}, rawProps); + + props.src = src; + return props; } -var textSeparator = stringToPrecomputedChunk('<!-- -->'); -function pushTextInstance(target, text, responseState, textEmbedded) { - if (text === '') { - // Empty text doesn't have a DOM node representation and the hydration is aware of this. - return textEmbedded; +function createScriptResource(resources, src, props) { + { + if (resources.scriptsMap.has(src)) { + error('createScriptResource was called when a script Resource matching the same src already exists. This is a bug in React.'); + } } - if (textEmbedded) { - target.push(textSeparator); - } + var scriptsMap = resources.scriptsMap, + preloadsMap = resources.preloadsMap; + var hint = preloadsMap.get(src); - target.push(stringToChunk(encodeHTMLTextNode(text))); - return true; -} // Called when Fizz is done with a Segment. Currently the only purpose is to conditionally -// emit a text separator when we don't know for sure it is safe to omit + if (hint) { + // If a preload for this style Resource already exists there are certain props we want to adopt + // on the style Resource, primarily focussed on making sure the style network pathways utilize + // the preload pathways. For instance if you have diffreent crossOrigin attributes for a preload + // and a stylesheet the stylesheet will make a new request even if the preload had already loaded + adoptPreloadPropsForScriptProps(props, hint.props); -function pushSegmentFinale(target, responseState, lastPushedText, textEmbedded) { - if (lastPushedText && textEmbedded) { - target.push(textSeparator); - } -} -var styleNameCache = new Map(); + { + validateScriptAndHintProps(hint.props, props, hint._dev_implicit_construction); + } + } else { + var preloadResourceProps = preloadAsScriptPropsFromProps(src, props); + hint = createPreloadResource(resources, src, 'script', preloadResourceProps); -function processStyleName(styleName) { - var chunk = styleNameCache.get(styleName); + { + hint._dev_implicit_construction = true; + } - if (chunk !== undefined) { - return chunk; + resources.explicitScriptPreloads.add(hint); } - var result = stringToPrecomputedChunk(escapeTextForBrowser(hyphenateStyleName(styleName))); - styleNameCache.set(styleName, result); - return result; + var resource = { + type: 'script', + src: src, + flushed: false, + props: props, + hint: hint + }; + scriptsMap.set(src, resource); + return resource; } -var styleAttributeStart = stringToPrecomputedChunk(' style="'); -var styleAssign = stringToPrecomputedChunk(':'); -var styleSeparator = stringToPrecomputedChunk(';'); +function adoptPreloadPropsForScriptProps(resourceProps, preloadProps) { + if (resourceProps.crossOrigin == null) resourceProps.crossOrigin = preloadProps.crossOrigin; + if (resourceProps.referrerPolicy == null) resourceProps.referrerPolicy = preloadProps.referrerPolicy; + if (resourceProps.integrity == null) resourceProps.integrity = preloadProps.integrity; +} -function pushStyleAttribute(target, style) { - if (typeof style !== 'object') { - throw new Error('The `style` prop expects a mapping from style properties to values, ' + "not a string. For example, style={{marginRight: spacing + 'em'}} when " + 'using JSX.'); +function titlePropsFromRawProps(child, rawProps) { + var props = assign({}, rawProps); + + props.children = child; + return props; +} + +function resourcesFromElement(type, props) { + if (!currentResources) { + throw new Error('"currentResources" was expected to exist. This is a bug in React.'); } - var isFirst = true; + var resources = currentResources; - for (var styleName in style) { - if (!hasOwnProperty.call(style, styleName)) { - continue; - } // If you provide unsafe user data here they can inject arbitrary CSS - // which may be problematic (I couldn't repro this): - // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet - // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/ - // This is not an XSS hole but instead a potential CSS injection issue - // which has lead to a greater discussion about how we're going to - // trust URLs moving forward. See #2115901 - - - var styleValue = style[styleName]; + switch (type) { + case 'title': + { + var children = props.children; + var child; - if (styleValue == null || typeof styleValue === 'boolean' || styleValue === '') { - // TODO: We used to set empty string as a style with an empty value. Does that ever make sense? - continue; - } + if (Array.isArray(children)) { + child = children.length === 1 ? children[0] : null; + } else { + child = children; + } - var nameChunk = void 0; - var valueChunk = void 0; - var isCustomProperty = styleName.indexOf('--') === 0; + if (typeof child !== 'function' && typeof child !== 'symbol' && child !== null && child !== undefined) { + // eslint-disable-next-line react-internal/safe-string-coercion + var childString = '' + child; + var key = 'title::' + childString; + var resource = resources.headsMap.get(key); - if (isCustomProperty) { - nameChunk = stringToChunk(escapeTextForBrowser(styleName)); + if (!resource) { + resource = { + type: 'title', + props: titlePropsFromRawProps(childString, props), + flushed: false + }; + resources.headsMap.set(key, resource); + resources.headResources.add(resource); + } + } - { - checkCSSPropertyStringCoercion(styleValue, styleName); + return true; } - valueChunk = stringToChunk(escapeTextForBrowser(('' + styleValue).trim())); - } else { + case 'meta': { - warnValidStyle$1(styleName, styleValue); - } + var _key, propertyPath; + + if (typeof props.charSet === 'string') { + _key = 'charSet'; + } else if (typeof props.content === 'string') { + var contentKey = '::' + props.content; + + if (typeof props.httpEquiv === 'string') { + _key = 'httpEquiv::' + props.httpEquiv + contentKey; + } else if (typeof props.name === 'string') { + _key = 'name::' + props.name + contentKey; + } else if (typeof props.itemProp === 'string') { + _key = 'itemProp::' + props.itemProp + contentKey; + } else if (typeof props.property === 'string') { + var property = props.property; + _key = 'property::' + property + contentKey; + propertyPath = property; + var parentPath = property.split(':').slice(0, -1).join(':'); + var parentResource = resources.structuredMetaKeys.get(parentPath); + + if (parentResource) { + _key = parentResource.key + '::child::' + _key; + } + } + } - nameChunk = processStyleName(styleName); + if (_key) { + if (!resources.headsMap.has(_key)) { + var _resource2 = { + type: 'meta', + key: _key, + props: assign({}, props), + flushed: false + }; + resources.headsMap.set(_key, _resource2); - if (typeof styleValue === 'number') { - if (styleValue !== 0 && !hasOwnProperty.call(isUnitlessNumber, styleName)) { - valueChunk = stringToChunk(styleValue + 'px'); // Presumes implicit 'px' suffix for unitless numbers - } else { - valueChunk = stringToChunk('' + styleValue); + if (_key === 'charSet') { + resources.charset = _resource2; + } else { + if (propertyPath) { + resources.structuredMetaKeys.set(propertyPath, _resource2); + } + + resources.headResources.add(_resource2); + } + } } - } else { - { - checkCSSPropertyStringCoercion(styleValue, styleName); + + return true; + } + + case 'base': + { + var target = props.target, + href = props.href; // We mirror the key construction on the client since we will likely unify + // this code in the future to better guarantee key semantics are identical + // in both environments + + var _key2 = 'base'; + _key2 += typeof href === 'string' ? "[href=\"" + href + "\"]" : ':not([href])'; + _key2 += typeof target === 'string' ? "[target=\"" + target + "\"]" : ':not([target])'; + + if (!resources.headsMap.has(_key2)) { + var _resource3 = { + type: 'base', + props: assign({}, props), + flushed: false + }; + resources.headsMap.set(_key2, _resource3); + resources.bases.add(_resource3); } - valueChunk = stringToChunk(escapeTextForBrowser(('' + styleValue).trim())); + return true; } - } + } - if (isFirst) { - isFirst = false; // If it's first, we don't need any separators prefixed. + return false; +} // Construct a resource from link props. - target.push(styleAttributeStart, nameChunk, styleAssign, valueChunk); - } else { - target.push(styleSeparator, nameChunk, styleAssign, valueChunk); - } +function resourcesFromLink(props) { + if (!currentResources) { + throw new Error('"currentResources" was expected to exist. This is a bug in React.'); } - if (!isFirst) { - target.push(attributeEnd); + var resources = currentResources; + var rel = props.rel, + href = props.href; + + if (!href || typeof href !== 'string' || !rel || typeof rel !== 'string') { + return false; } -} -var attributeSeparator = stringToPrecomputedChunk(' '); -var attributeAssign = stringToPrecomputedChunk('="'); -var attributeEnd = stringToPrecomputedChunk('"'); -var attributeEmptyString = stringToPrecomputedChunk('=""'); + var key = ''; -function pushAttribute(target, name, value) // not null or undefined -{ - switch (name) { - case 'style': + switch (rel) { + case 'stylesheet': { - pushStyleAttribute(target, value); - return; - } + var onLoad = props.onLoad, + onError = props.onError, + precedence = props.precedence, + disabled = props.disabled; + + if (typeof precedence !== 'string' || onLoad || onError || disabled != null) { + // This stylesheet is either not opted into Resource semantics or has conflicting properties which + // disqualify it for such. We can still create a preload resource to help it load faster on the + // client + { + validateLinkPropsForStyleResource(props); + } - case 'defaultValue': - case 'defaultChecked': // These shouldn't be set as attributes on generic HTML elements. + var preloadResource = resources.preloadsMap.get(href); - case 'innerHTML': // Must use dangerouslySetInnerHTML instead. + if (!preloadResource) { + preloadResource = createPreloadResource(resources, href, 'style', preloadAsStylePropsFromProps(href, props)); - case 'suppressContentEditableWarning': - case 'suppressHydrationWarning': - // Ignored. These are built-in to React on the client. - return; - } + { + preloadResource._dev_implicit_construction = true; + } - if ( // shouldIgnoreAttribute - // We have already filtered out null/undefined and reserved words. - name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) { - return; - } + resources.usedStylePreloads.add(preloadResource); + } - var propertyInfo = getPropertyInfo(name); + return false; + } else { + // We are able to convert this link element to a resource exclusively. We construct the relevant Resource + // and return true indicating that this link was fully consumed. + var _resource4 = resources.stylesMap.get(href); - if (propertyInfo !== null) { - // shouldRemoveAttribute - switch (typeof value) { - case 'function': - case 'symbol': - // eslint-disable-line - return; + if (_resource4) { + { + var resourceProps = stylePropsFromRawProps(href, precedence, props); + adoptPreloadPropsForStyleProps(resourceProps, _resource4.hint.props); + validateStyleResourceDifference(_resource4.props, resourceProps); + } + } else { + var _resourceProps = stylePropsFromRawProps(href, precedence, props); - case 'boolean': - { - if (!propertyInfo.acceptsBooleans) { - return; + _resource4 = createStyleResource( // $FlowFixMe[incompatible-call] found when upgrading Flow + currentResources, href, precedence, _resourceProps); + resources.usedStylePreloads.add(_resource4.hint); } - } - } - var attributeName = propertyInfo.attributeName; - var attributeNameChunk = stringToChunk(attributeName); // TODO: If it's known we can cache the chunk. + if (resources.boundaryResources) { + resources.boundaryResources.add(_resource4); + } else { + _resource4.set.add(_resource4); + } - switch (propertyInfo.type) { - case BOOLEAN: - if (value) { - target.push(attributeSeparator, attributeNameChunk, attributeEmptyString); + return true; } + } - return; + case 'preload': + { + var as = props.as; - case OVERLOADED_BOOLEAN: - if (value === true) { - target.push(attributeSeparator, attributeNameChunk, attributeEmptyString); - } else if (value === false) ; else { - target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); - } + switch (as) { + case 'script': + case 'style': + case 'font': + { + { + validateLinkPropsForPreloadResource(props); + } - return; + var _resource5 = resources.preloadsMap.get(href); - case NUMERIC: - if (!isNaN(value)) { - target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); - } + if (_resource5) { + { + var originallyImplicit = _resource5._dev_implicit_construction === true; + var latestProps = preloadPropsFromRawProps(href, as, props); + validatePreloadResourceDifference(_resource5.props, originallyImplicit, latestProps, false); + } + } else { + _resource5 = createPreloadResource(resources, href, as, preloadPropsFromRawProps(href, as, props)); + + switch (as) { + case 'script': + { + resources.explicitScriptPreloads.add(_resource5); + break; + } - break; + case 'style': + { + resources.explicitStylePreloads.add(_resource5); + break; + } - case POSITIVE_NUMERIC: - if (!isNaN(value) && value >= 1) { - target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); + case 'font': + { + resources.fontPreloads.add(_resource5); + break; + } + } + } + + return true; + } } break; + } + } - default: - if (propertyInfo.sanitizeURL) { - { - checkAttributeStringCoercion(value, attributeName); - } + if (props.onLoad || props.onError) { + // When a link has these props we can't treat it is a Resource but if we rendered it on the + // server it would look like a Resource in the rendered html (the onLoad/onError aren't emitted) + // Instead we expect the client to insert them rather than hydrate them which also guarantees + // that the onLoad and onError won't fire before the event handlers are attached + return true; + } - value = '' + value; - sanitizeURL(value); - } + var sizes = typeof props.sizes === 'string' ? props.sizes : ''; + var media = typeof props.media === 'string' ? props.media : ''; + key = 'rel:' + rel + '::href:' + href + '::sizes:' + sizes + '::media:' + media; + var resource = resources.headsMap.get(key); - target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); - } - } else if (isAttributeNameSafe(name)) { - // shouldRemoveAttribute - switch (typeof value) { - case 'function': - case 'symbol': - // eslint-disable-line - return; + if (!resource) { + resource = { + type: 'link', + props: assign({}, props), + flushed: false + }; + resources.headsMap.set(key, resource); - case 'boolean': + switch (rel) { + case 'preconnect': + case 'dns-prefetch': { - var prefix = name.toLowerCase().slice(0, 5); + resources.preconnects.add(resource); + break; + } - if (prefix !== 'data-' && prefix !== 'aria-') { - return; - } + default: + { + resources.headResources.add(resource); } } - - target.push(attributeSeparator, stringToChunk(name), attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); } -} - -var endOfStartTag = stringToPrecomputedChunk('>'); -var endOfStartTagSelfClosing = stringToPrecomputedChunk('/>'); - -function pushInnerHTML(target, innerHTML, children) { - if (innerHTML != null) { - if (children != null) { - throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.'); - } - if (typeof innerHTML !== 'object' || !('__html' in innerHTML)) { - throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' + 'for more information.'); - } + return true; +} // Construct a resource from link props. - var html = innerHTML.__html; +function resourcesFromScript(props) { + if (!currentResources) { + throw new Error('"currentResources" was expected to exist. This is a bug in React.'); + } - if (html !== null && html !== undefined) { - { - checkHtmlStringCoercion(html); - } + var resources = currentResources; + var src = props.src, + async = props.async, + onLoad = props.onLoad, + onError = props.onError; - target.push(stringToChunk('' + html)); - } + if (!src || typeof src !== 'string') { + return false; } -} // TODO: Move these to ResponseState so that we warn for every request. -// It would help debugging in stateful servers (e.g. service worker). + if (async) { + if (onLoad || onError) { -var didWarnDefaultInputValue = false; -var didWarnDefaultChecked = false; -var didWarnDefaultSelectValue = false; -var didWarnDefaultTextareaValue = false; -var didWarnInvalidOptionChildren = false; -var didWarnInvalidOptionInnerHTML = false; -var didWarnSelectedSetOnOption = false; + var preloadResource = resources.preloadsMap.get(src); -function checkSelectProp(props, propName) { - { - var value = props[propName]; + if (!preloadResource) { + preloadResource = createPreloadResource(resources, src, 'script', preloadAsScriptPropsFromProps(src, props)); - if (value != null) { - var array = isArray(value); + { + preloadResource._dev_implicit_construction = true; + } - if (props.multiple && !array) { - error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.', propName); - } else if (!props.multiple && array) { - error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.', propName); + resources.usedScriptPreloads.add(preloadResource); + } + } else { + var resource = resources.scriptsMap.get(src); + + if (resource) { + { + var latestProps = scriptPropsFromRawProps(src, props); + adoptPreloadPropsForScriptProps(latestProps, resource.hint.props); + validateScriptResourceDifference(resource.props, latestProps); + } + } else { + var resourceProps = scriptPropsFromRawProps(src, props); + resource = createScriptResource(resources, src, resourceProps); + resources.scripts.add(resource); } } + + return true; } + + return false; } +function hoistResources(resources, source) { + var currentBoundaryResources = resources.boundaryResources; -function pushStartSelect(target, props) { - { - checkControlledValueProps('select', props); - checkSelectProp(props, 'value'); - checkSelectProp(props, 'defaultValue'); + if (currentBoundaryResources) { + source.forEach(function (resource) { + return currentBoundaryResources.add(resource); + }); + source.clear(); + } +} +function hoistResourcesToRoot(resources, boundaryResources) { + boundaryResources.forEach(function (resource) { + return resource.set.add(resource); + }); + boundaryResources.clear(); +} - if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultSelectValue) { - error('Select 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 select ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components'); +// The build script is at scripts/rollup/generate-inline-fizz-runtime.js. +// Run `yarn generate-inline-fizz-runtime` to generate. +var clientRenderBoundary = '$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};'; +var completeBoundary = '$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};'; +var completeBoundaryWithStyles = '$RM=new Map;\n$RR=function(p,q,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};'; +var completeSegment = '$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};'; - didWarnDefaultSelectValue = true; - } +var ReactDOMSharedInternals = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; + +var ReactDOMCurrentDispatcher = ReactDOMSharedInternals.Dispatcher; +var ReactDOMServerDispatcher = ReactDOMServerFloatDispatcher ; +function prepareToRender(resources) { + prepareToRenderResources(resources); + var previousHostDispatcher = ReactDOMCurrentDispatcher.current; + ReactDOMCurrentDispatcher.current = ReactDOMServerDispatcher; + return previousHostDispatcher; +} +function cleanupAfterRender(previousDispatcher) { + finishRenderingResources(); + ReactDOMCurrentDispatcher.current = previousDispatcher; +} // Used to distinguish these contexts from ones used in other renderers. +var ScriptStreamingFormat = 0; + +var dataElementQuotedEnd = stringToPrecomputedChunk('"></template>'); +var startInlineScript = stringToPrecomputedChunk('<script>'); +var endInlineScript = stringToPrecomputedChunk('</script>'); +var startScriptSrc = stringToPrecomputedChunk('<script src="'); +var startModuleSrc = stringToPrecomputedChunk('<script type="module" src="'); +var scriptIntegirty = stringToPrecomputedChunk('" integrity="'); +var endAsyncScript = stringToPrecomputedChunk('" async=""></script>'); +/** + * This escaping function is designed to work with bootstrapScriptContent only. + * because we know we are escaping the entire script. We can avoid for instance + * escaping html comment string sequences that are valid javascript as well because + * if there are no sebsequent <script sequences the html parser will never enter + * script data double escaped state (see: https://www.w3.org/TR/html53/syntax.html#script-data-double-escaped-state) + * + * While untrusted script content should be made safe before using this api it will + * ensure that the script cannot be early terminated or never terminated state + */ + +function escapeBootstrapScriptContent(scriptText) { + { + checkHtmlStringCoercion(scriptText); } - target.push(startChunkForTag('select')); - var children = null; - var innerHTML = null; + return ('' + scriptText).replace(scriptRegex, scriptReplacer); +} - for (var propKey in props) { - if (hasOwnProperty.call(props, propKey)) { - var propValue = props[propKey]; +var scriptRegex = /(<\/|<)(s)(cript)/gi; - if (propValue == null) { - continue; - } +var scriptReplacer = function (match, prefix, s, suffix) { + return "" + prefix + (s === 's' ? "\\u0073" : "\\u0053") + suffix; +}; // Allows us to keep track of what we've already written so we can refer back to it. +// if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag +// is set, the server will send instructions via data attributes (instead of inline scripts) - switch (propKey) { - case 'children': - children = propValue; - break; - case 'dangerouslySetInnerHTML': - // TODO: This doesn't really make sense for select since it can't use the controlled - // value in the innerHTML. - innerHTML = propValue; - break; +function createResponseState(identifierPrefix, nonce, bootstrapScriptContent, bootstrapScripts, bootstrapModules, externalRuntimeConfig) { + var idPrefix = identifierPrefix === undefined ? '' : identifierPrefix; + var inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk('<script nonce="' + escapeTextForBrowser(nonce) + '">'); + var bootstrapChunks = []; + var externalRuntimeDesc = null; + var streamingFormat = ScriptStreamingFormat; - case 'defaultValue': - case 'value': - // These are set on the Context instead and applied to the nested options. - break; + if (bootstrapScriptContent !== undefined) { + bootstrapChunks.push(inlineScriptWithNonce, stringToChunk(escapeBootstrapScriptContent(bootstrapScriptContent)), endInlineScript); + } - default: - pushAttribute(target, propKey, propValue); - break; + if (bootstrapScripts !== undefined) { + for (var i = 0; i < bootstrapScripts.length; i++) { + var scriptConfig = bootstrapScripts[i]; + var src = typeof scriptConfig === 'string' ? scriptConfig : scriptConfig.src; + var integrity = typeof scriptConfig === 'string' ? undefined : scriptConfig.integrity; + bootstrapChunks.push(startScriptSrc, stringToChunk(escapeTextForBrowser(src))); + + if (integrity) { + bootstrapChunks.push(scriptIntegirty, stringToChunk(escapeTextForBrowser(integrity))); } + + bootstrapChunks.push(endAsyncScript); } } - target.push(endOfStartTag); - pushInnerHTML(target, innerHTML, children); - return children; -} - -function flattenOptionChildren(children) { - var content = ''; // Flatten children and warn if they aren't strings or numbers; - // invalid types are ignored. + if (bootstrapModules !== undefined) { + for (var _i = 0; _i < bootstrapModules.length; _i++) { + var _scriptConfig = bootstrapModules[_i]; - React.Children.forEach(children, function (child) { - if (child == null) { - return; - } + var _src = typeof _scriptConfig === 'string' ? _scriptConfig : _scriptConfig.src; - content += child; + var _integrity = typeof _scriptConfig === 'string' ? undefined : _scriptConfig.integrity; - { - if (!didWarnInvalidOptionChildren && typeof child !== 'string' && typeof child !== 'number') { - didWarnInvalidOptionChildren = true; + bootstrapChunks.push(startModuleSrc, stringToChunk(escapeTextForBrowser(_src))); - error('Cannot infer the option value of complex children. ' + 'Pass a `value` prop or use a plain string as children to <option>.'); + if (_integrity) { + bootstrapChunks.push(scriptIntegirty, stringToChunk(escapeTextForBrowser(_integrity))); } + + bootstrapChunks.push(endAsyncScript); } - }); - return content; -} + } -var selectedMarkerAttribute = stringToPrecomputedChunk(' selected=""'); + return { + bootstrapChunks: bootstrapChunks, + placeholderPrefix: stringToPrecomputedChunk(idPrefix + 'P:'), + segmentPrefix: stringToPrecomputedChunk(idPrefix + 'S:'), + boundaryPrefix: idPrefix + 'B:', + idPrefix: idPrefix, + nextSuspenseID: 0, + streamingFormat: streamingFormat, + startInlineScript: inlineScriptWithNonce, + sentCompleteSegmentFunction: false, + sentCompleteBoundaryFunction: false, + sentClientRenderFunction: false, + sentStyleInsertionFunction: false, + externalRuntimeConfig: externalRuntimeDesc + }; +} // Constants for the insertion mode we're currently writing in. We don't encode all HTML5 insertion +// modes. We only include the variants as they matter for the sake of our purposes. +// We don't actually provide the namespace therefore we use constants instead of the string. -function pushStartOption(target, props, formatContext) { - var selectedValue = formatContext.selectedValue; - target.push(startChunkForTag('option')); - var children = null; - var value = null; - var selected = null; - var innerHTML = null; +var ROOT_HTML_MODE = 0; // Used for the root most element tag. - for (var propKey in props) { - if (hasOwnProperty.call(props, propKey)) { - var propValue = props[propKey]; +var HTML_MODE = 1; +var SVG_MODE = 2; +var MATHML_MODE = 3; +var HTML_TABLE_MODE = 4; +var HTML_TABLE_BODY_MODE = 5; +var HTML_TABLE_ROW_MODE = 6; +var HTML_COLGROUP_MODE = 7; // We have a greater than HTML_TABLE_MODE check elsewhere. If you add more cases here, make sure it +// still makes sense +// Lets us keep track of contextual state and pick it back up after suspending. - if (propValue == null) { - continue; - } +function createFormatContext(insertionMode, selectedValue, noscriptTagInScope) { + return { + insertionMode: insertionMode, + selectedValue: selectedValue, + noscriptTagInScope: noscriptTagInScope + }; +} - switch (propKey) { - case 'children': - children = propValue; - break; +function createRootFormatContext(namespaceURI) { + var insertionMode = namespaceURI === 'http://www.w3.org/2000/svg' ? SVG_MODE : namespaceURI === 'http://www.w3.org/1998/Math/MathML' ? MATHML_MODE : ROOT_HTML_MODE; + return createFormatContext(insertionMode, null, false); +} +function getChildFormatContext(parentContext, type, props) { + switch (type) { + case 'noscript': + return createFormatContext(HTML_MODE, null, true); - case 'selected': - // ignore - selected = propValue; + case 'select': + return createFormatContext(HTML_MODE, props.value != null ? props.value : props.defaultValue, parentContext.noscriptTagInScope); - { - // TODO: Remove support for `selected` in <option>. - if (!didWarnSelectedSetOnOption) { - error('Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.'); + case 'svg': + return createFormatContext(SVG_MODE, null, parentContext.noscriptTagInScope); - didWarnSelectedSetOnOption = true; - } - } + case 'math': + return createFormatContext(MATHML_MODE, null, parentContext.noscriptTagInScope); - break; + case 'foreignObject': + return createFormatContext(HTML_MODE, null, parentContext.noscriptTagInScope); + // Table parents are special in that their children can only be created at all if they're + // wrapped in a table parent. So we need to encode that we're entering this mode. - case 'dangerouslySetInnerHTML': - innerHTML = propValue; - break; - // eslint-disable-next-line-no-fallthrough + case 'table': + return createFormatContext(HTML_TABLE_MODE, null, parentContext.noscriptTagInScope); - case 'value': - value = propValue; - // We intentionally fallthrough to also set the attribute on the node. - // eslint-disable-next-line-no-fallthrough + case 'thead': + case 'tbody': + case 'tfoot': + return createFormatContext(HTML_TABLE_BODY_MODE, null, parentContext.noscriptTagInScope); - default: - pushAttribute(target, propKey, propValue); - break; - } - } - } + case 'colgroup': + return createFormatContext(HTML_COLGROUP_MODE, null, parentContext.noscriptTagInScope); - if (selectedValue != null) { - var stringValue; + case 'tr': + return createFormatContext(HTML_TABLE_ROW_MODE, null, parentContext.noscriptTagInScope); + } - if (value !== null) { - { - checkAttributeStringCoercion(value, 'value'); - } + if (parentContext.insertionMode >= HTML_TABLE_MODE) { + // Whatever tag this was, it wasn't a table parent or other special parent, so we must have + // entered plain HTML again. + return createFormatContext(HTML_MODE, null, parentContext.noscriptTagInScope); + } - stringValue = '' + value; - } else { - { - if (innerHTML !== null) { - if (!didWarnInvalidOptionInnerHTML) { - didWarnInvalidOptionInnerHTML = true; + if (parentContext.insertionMode === ROOT_HTML_MODE) { + // We've emitted the root and is now in plain HTML mode. + return createFormatContext(HTML_MODE, null, parentContext.noscriptTagInScope); + } - error('Pass a `value` prop if you set dangerouslyInnerHTML so React knows ' + 'which value should be selected.'); - } - } - } + return parentContext; +} +var UNINITIALIZED_SUSPENSE_BOUNDARY_ID = null; +function assignSuspenseBoundaryID(responseState) { + var generatedID = responseState.nextSuspenseID++; + return stringToPrecomputedChunk(responseState.boundaryPrefix + generatedID.toString(16)); +} +function makeId(responseState, treeId, localId) { + var idPrefix = responseState.idPrefix; + var id = ':' + idPrefix + 'R' + treeId; // Unless this is the first id at this level, append a number at the end + // that represents the position of this useId hook among all the useId + // hooks for this fiber. - stringValue = flattenOptionChildren(children); - } + if (localId > 0) { + id += 'H' + localId.toString(32); + } - if (isArray(selectedValue)) { - // multiple - for (var i = 0; i < selectedValue.length; i++) { - { - checkAttributeStringCoercion(selectedValue[i], 'value'); - } + return id + ':'; +} - var v = '' + selectedValue[i]; +function encodeHTMLTextNode(text) { + return escapeTextForBrowser(text); +} - if (v === stringValue) { - target.push(selectedMarkerAttribute); - break; - } - } - } else { - { - checkAttributeStringCoercion(selectedValue, 'select.value'); - } +var textSeparator = stringToPrecomputedChunk('<!-- -->'); +function pushTextInstance(target, text, responseState, textEmbedded) { + if (text === '') { + // Empty text doesn't have a DOM node representation and the hydration is aware of this. + return textEmbedded; + } - if ('' + selectedValue === stringValue) { - target.push(selectedMarkerAttribute); - } - } - } else if (selected) { - target.push(selectedMarkerAttribute); + if (textEmbedded) { + target.push(textSeparator); } - target.push(endOfStartTag); - pushInnerHTML(target, innerHTML, children); - return children; + target.push(stringToChunk(encodeHTMLTextNode(text))); + return true; +} // Called when Fizz is done with a Segment. Currently the only purpose is to conditionally +// emit a text separator when we don't know for sure it is safe to omit + +function pushSegmentFinale(target, responseState, lastPushedText, textEmbedded) { + if (lastPushedText && textEmbedded) { + target.push(textSeparator); + } } +var styleNameCache = new Map(); -function pushInput(target, props) { - { - checkControlledValueProps('input', props); +function processStyleName(styleName) { + var chunk = styleNameCache.get(styleName); - if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnDefaultChecked) { - 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', 'A component', props.type); + if (chunk !== undefined) { + return chunk; + } - didWarnDefaultChecked = true; - } + var result = stringToPrecomputedChunk(escapeTextForBrowser(hyphenateStyleName(styleName))); + styleNameCache.set(styleName, result); + return result; +} - if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultInputValue) { - 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', 'A component', props.type); +var styleAttributeStart = stringToPrecomputedChunk(' style="'); +var styleAssign = stringToPrecomputedChunk(':'); +var styleSeparator = stringToPrecomputedChunk(';'); - didWarnDefaultInputValue = true; - } +function pushStyle(target, responseState, style) { + if (typeof style !== 'object') { + throw new Error('The `style` prop expects a mapping from style properties to values, ' + "not a string. For example, style={{marginRight: spacing + 'em'}} when " + 'using JSX.'); } - target.push(startChunkForTag('input')); - var value = null; - var defaultValue = null; - var checked = null; - var defaultChecked = null; - - for (var propKey in props) { - if (hasOwnProperty.call(props, propKey)) { - var propValue = props[propKey]; + var isFirst = true; - if (propValue == null) { - continue; - } + for (var styleName in style) { + if (!hasOwnProperty.call(style, styleName)) { + continue; + } // If you provide unsafe user data here they can inject arbitrary CSS + // which may be problematic (I couldn't repro this): + // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet + // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/ + // This is not an XSS hole but instead a potential CSS injection issue + // which has lead to a greater discussion about how we're going to + // trust URLs moving forward. See #2115901 - switch (propKey) { - case 'children': - case 'dangerouslySetInnerHTML': - throw new Error('input' + " is a self-closing tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.'); - // eslint-disable-next-line-no-fallthrough - case 'defaultChecked': - defaultChecked = propValue; - break; + var styleValue = style[styleName]; - case 'defaultValue': - defaultValue = propValue; - break; + if (styleValue == null || typeof styleValue === 'boolean' || styleValue === '') { + // TODO: We used to set empty string as a style with an empty value. Does that ever make sense? + continue; + } - case 'checked': - checked = propValue; - break; + var nameChunk = void 0; + var valueChunk = void 0; + var isCustomProperty = styleName.indexOf('--') === 0; - case 'value': - value = propValue; - break; + if (isCustomProperty) { + nameChunk = stringToChunk(escapeTextForBrowser(styleName)); - default: - pushAttribute(target, propKey, propValue); - break; + { + checkCSSPropertyStringCoercion(styleValue, styleName); } - } - } - if (checked !== null) { - pushAttribute(target, 'checked', checked); - } else if (defaultChecked !== null) { - pushAttribute(target, 'checked', defaultChecked); - } + valueChunk = stringToChunk(escapeTextForBrowser(('' + styleValue).trim())); + } else { + { + warnValidStyle$1(styleName, styleValue); + } - if (value !== null) { - pushAttribute(target, 'value', value); - } else if (defaultValue !== null) { - pushAttribute(target, 'value', defaultValue); - } + nameChunk = processStyleName(styleName); - target.push(endOfStartTagSelfClosing); - return null; -} + if (typeof styleValue === 'number') { + if (styleValue !== 0 && !hasOwnProperty.call(isUnitlessNumber, styleName)) { + valueChunk = stringToChunk(styleValue + 'px'); // Presumes implicit 'px' suffix for unitless numbers + } else { + valueChunk = stringToChunk('' + styleValue); + } + } else { + { + checkCSSPropertyStringCoercion(styleValue, styleName); + } -function pushStartTextArea(target, props) { - { - checkControlledValueProps('textarea', props); + valueChunk = stringToChunk(escapeTextForBrowser(('' + styleValue).trim())); + } + } - if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultTextareaValue) { - error('Textarea 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 textarea ' + 'and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components'); + if (isFirst) { + isFirst = false; // If it's first, we don't need any separators prefixed. - didWarnDefaultTextareaValue = true; + target.push(styleAttributeStart, nameChunk, styleAssign, valueChunk); + } else { + target.push(styleSeparator, nameChunk, styleAssign, valueChunk); } } - target.push(startChunkForTag('textarea')); - var value = null; - var defaultValue = null; - var children = null; + if (!isFirst) { + target.push(attributeEnd); + } +} - for (var propKey in props) { - if (hasOwnProperty.call(props, propKey)) { - var propValue = props[propKey]; +var attributeSeparator = stringToPrecomputedChunk(' '); +var attributeAssign = stringToPrecomputedChunk('="'); +var attributeEnd = stringToPrecomputedChunk('"'); +var attributeEmptyString = stringToPrecomputedChunk('=""'); - if (propValue == null) { - continue; +function pushAttribute(target, responseState, name, value) // not null or undefined +{ + switch (name) { + case 'style': + { + pushStyle(target, responseState, value); + return; } - switch (propKey) { - case 'children': - children = propValue; - break; - - case 'value': - value = propValue; - break; - - case 'defaultValue': - defaultValue = propValue; - break; + case 'defaultValue': + case 'defaultChecked': // These shouldn't be set as attributes on generic HTML elements. - case 'dangerouslySetInnerHTML': - throw new Error('`dangerouslySetInnerHTML` does not make sense on <textarea>.'); - // eslint-disable-next-line-no-fallthrough + case 'innerHTML': // Must use dangerouslySetInnerHTML instead. - default: - pushAttribute(target, propKey, propValue); - break; - } - } + case 'suppressContentEditableWarning': + case 'suppressHydrationWarning': + // Ignored. These are built-in to React on the client. + return; } - if (value === null && defaultValue !== null) { - value = defaultValue; + if ( // shouldIgnoreAttribute + // We have already filtered out null/undefined and reserved words. + name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) { + return; } - target.push(endOfStartTag); // TODO (yungsters): Remove support for children content in <textarea>. + var propertyInfo = getPropertyInfo(name); - if (children != null) { - { - error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.'); + if (propertyInfo !== null) { + // shouldRemoveAttribute + switch (typeof value) { + case 'function': + case 'symbol': + // eslint-disable-line + return; + + case 'boolean': + { + if (!propertyInfo.acceptsBooleans) { + return; + } + } } - if (value != null) { - throw new Error('If you supply `defaultValue` on a <textarea>, do not pass children.'); - } - - if (isArray(children)) { - if (children.length > 1) { - throw new Error('<textarea> can only have at most one child.'); - } // TODO: remove the coercion and the DEV check below because it will - // always be overwritten by the coercion several lines below it. #22309 - - - { - checkHtmlStringCoercion(children[0]); - } - - value = '' + children[0]; - } - - { - checkHtmlStringCoercion(children); - } - - value = '' + children; - } - - if (typeof value === 'string' && value[0] === '\n') { - // text/html ignores the first character in these tags if it's a newline - // Prefer to break application/xml over text/html (for now) by adding - // a newline specifically to get eaten by the parser. (Alternately for - // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first - // \r is normalized out by HTMLTextAreaElement#value.) - // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre> - // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions> - // See: <http://www.w3.org/TR/html5/syntax.html#newlines> - // See: Parsing of "textarea" "listing" and "pre" elements - // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody> - target.push(leadingNewline); - } // ToString and push directly instead of recurse over children. - // We don't really support complex children in the value anyway. - // This also currently avoids a trailing comment node which breaks textarea. - - - if (value !== null) { - { - checkAttributeStringCoercion(value, 'value'); - } - - target.push(stringToChunk(encodeHTMLTextNode('' + value))); - } - - return null; -} - -function pushMeta(target, props, responseState, textEmbedded, insertionMode, noscriptTagInScope) { - { - if (insertionMode === SVG_MODE || noscriptTagInScope) { - return pushSelfClosing(target, props, 'meta'); - } else { - if (textEmbedded) { - // This link follows text but we aren't writing a tag. while not as efficient as possible we need - // to be safe and assume text will follow by inserting a textSeparator - target.push(textSeparator); - } + var attributeName = propertyInfo.attributeName; + var attributeNameChunk = stringToChunk(attributeName); // TODO: If it's known we can cache the chunk. - if (typeof props.charSet === 'string') { - return pushSelfClosing(responseState.charsetChunks, props, 'meta'); - } else { - return pushSelfClosing(responseState.hoistableChunks, props, 'meta'); - } - } - } -} + switch (propertyInfo.type) { + case BOOLEAN: + if (value) { + target.push(attributeSeparator, attributeNameChunk, attributeEmptyString); + } -function pushLink(target, props, responseState, resources, textEmbedded, insertionMode, noscriptTagInScope) { - { - var rel = props.rel; - var href = props.href; - var precedence = props.precedence; + return; - if (insertionMode === SVG_MODE || noscriptTagInScope || typeof rel !== 'string' || typeof href !== 'string' || href === '') { - { - if (rel === 'stylesheet' && typeof props.precedence === 'string') { - if (typeof href !== 'string' || !href) { - error('React encountered a `<link rel="stylesheet" .../>` with a `precedence` prop and expected the `href` prop to be a non-empty string but ecountered %s instead. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop ensure there is a non-empty string `href` prop as well, otherwise remove the `precedence` prop.', getValueDescriptorExpectingObjectForWarning(href)); - } + case OVERLOADED_BOOLEAN: + if (value === true) { + target.push(attributeSeparator, attributeNameChunk, attributeEmptyString); + } else if (value === false) ; else { + target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); } - } - pushLinkImpl(target, props); - return null; - } + return; - if (props.rel === 'stylesheet') { - // This <link> may hoistable as a Stylesheet Resource, otherwise it will emit in place - var key = getResourceKey('style', href); + case NUMERIC: + if (!isNaN(value)) { + target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); + } - if (typeof precedence !== 'string' || props.disabled != null || props.onLoad || props.onError) { - // This stylesheet is either not opted into Resource semantics or has conflicting properties which - // disqualify it for such. We can still create a preload resource to help it load faster on the - // client - { - if (typeof precedence === 'string') { - if (props.disabled != null) { - error('React encountered a `<link rel="stylesheet" .../>` with a `precedence` prop and a `disabled` prop. The presence of the `disabled` prop indicates an intent to manage the stylesheet active state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the `disabled` prop, otherwise remove the `precedence` prop.'); - } else if (props.onLoad || props.onError) { - var propDescription = props.onLoad && props.onError ? '`onLoad` and `onError` props' : props.onLoad ? '`onLoad` prop' : '`onError` prop'; + break; - error('React encountered a `<link rel="stylesheet" .../>` with a `precedence` prop and %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.', propDescription, propDescription); - } - } + case POSITIVE_NUMERIC: + if (!isNaN(value) && value >= 1) { + target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); } - var resource = resources.preloadsMap.get(key); - - if (!resource) { - resource = { - type: 'preload', - chunks: [], - state: NoState, - props: preloadAsStylePropsFromProps(href, props) - }; - resources.preloadsMap.set(key, resource); + break; + default: + if (propertyInfo.sanitizeURL) { { - markAsImplicitResourceDEV(resource, props, resource.props); + checkAttributeStringCoercion(value, attributeName); } + + value = '' + value; + sanitizeURL(value); } - pushLinkImpl(resource.chunks, resource.props); - resources.usedStylesheets.add(resource); - return pushLinkImpl(target, props); - } else { - // This stylesheet refers to a Resource and we create a new one if necessary - var _resource = resources.stylesMap.get(key); + target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); + } + } else if (isAttributeNameSafe(name)) { + // shouldRemoveAttribute + switch (typeof value) { + case 'function': + case 'symbol': + // eslint-disable-line + return; + case 'boolean': { - var devResource = getAsResourceDEV(_resource); - - if (devResource) { - switch (devResource.__provenance) { - case 'rendered': - { - var differenceDescription = describeDifferencesForStylesheets( // Diff the props from the JSX element, not the derived resource props - props, devResource.__originalProps); - - if (differenceDescription) { - error('React encountered a <link rel="stylesheet" href="%s" .../> with a `precedence` prop that has props that conflict' + ' with another hoistable stylesheet with the same `href`. When using `precedence` with <link rel="stylsheet" .../>' + ' the props from the first encountered instance will be used and props from later instances will be ignored.' + ' Update the props on either <link rel="stylesheet" .../> instance so they agree.%s', href, differenceDescription); - } - - break; - } - - case 'preinit': - { - var _differenceDescription = describeDifferencesForStylesheetOverPreinit( // Diff the props from the JSX element, not the derived resource props - props, devResource.__propsEquivalent); - - if (_differenceDescription) { - error('React encountered a <link rel="stylesheet" precedence="%s" href="%s" .../> with props that conflict' + ' with the options provided to `ReactDOM.preinit("%s", { as: "style", ... })`. React will use the first props or preinitialization' + ' options encountered when rendering a hoistable stylesheet with a particular `href` and will ignore any newer props or' + ' options. The first instance of this stylesheet resource was created using the `ReactDOM.preinit()` function.' + ' Please note, `ReactDOM.preinit()` is modeled off of module import assertions capabilities and does not support' + ' arbitrary props. If you need to have props not included with the preinit options you will need to rely on rendering' + ' <link> tags only.%s', precedence, href, href, _differenceDescription); - } + var prefix = name.toLowerCase().slice(0, 5); - break; - } - } + if (prefix !== 'data-' && prefix !== 'aria-') { + return; } } + } - if (!_resource) { - var resourceProps = stylesheetPropsFromRawProps(props); - var preloadResource = resources.preloadsMap.get(key); - - if (preloadResource) { - // If we already had a preload we don't want that resource to flush directly. - // We let the newly created resource govern flushing. - preloadResource.state |= Blocked; - adoptPreloadPropsForStylesheetProps(resourceProps, preloadResource.props); - } + target.push(attributeSeparator, stringToChunk(name), attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); + } +} - _resource = { - type: 'stylesheet', - chunks: [], - state: resources.boundaryResources ? Blocked : NoState, - props: resourceProps - }; - resources.stylesMap.set(key, _resource); +var endOfStartTag = stringToPrecomputedChunk('>'); +var endOfStartTagSelfClosing = stringToPrecomputedChunk('/>'); - { - markAsRenderedResourceDEV(_resource, props); - } +function pushInnerHTML(target, innerHTML, children) { + if (innerHTML != null) { + if (children != null) { + throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.'); + } - var precedenceSet = resources.precedences.get(precedence); + if (typeof innerHTML !== 'object' || !('__html' in innerHTML)) { + throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' + 'for more information.'); + } - if (!precedenceSet) { - precedenceSet = new Set(); - resources.precedences.set(precedence, precedenceSet); - } + var html = innerHTML.__html; - precedenceSet.add(_resource); - } + if (html !== null && html !== undefined) { + { + checkHtmlStringCoercion(html); + } - if (resources.boundaryResources) { - resources.boundaryResources.add(_resource); - } + target.push(stringToChunk('' + html)); + } + } +} // TODO: Move these to ResponseState so that we warn for every request. +// It would help debugging in stateful servers (e.g. service worker). - if (textEmbedded) { - // This link follows text but we aren't writing a tag. while not as efficient as possible we need - // to be safe and assume text will follow by inserting a textSeparator - target.push(textSeparator); - } - return null; - } - } else if (props.onLoad || props.onError) { - // When using load handlers we cannot hoist and need to emit links in place - return pushLinkImpl(target, props); - } else { - // We can hoist this link so we may need to emit a text separator. - // @TODO refactor text separators so we don't have to defensively add - // them when we don't end up emitting a tag as a result of pushStartInstance - if (textEmbedded) { - // This link follows text but we aren't writing a tag. while not as efficient as possible we need - // to be safe and assume text will follow by inserting a textSeparator - target.push(textSeparator); - } +var didWarnDefaultInputValue = false; +var didWarnDefaultChecked = false; +var didWarnDefaultSelectValue = false; +var didWarnDefaultTextareaValue = false; +var didWarnInvalidOptionChildren = false; +var didWarnInvalidOptionInnerHTML = false; +var didWarnSelectedSetOnOption = false; - switch (props.rel) { - case 'preconnect': - case 'dns-prefetch': - return pushLinkImpl(responseState.preconnectChunks, props); +function checkSelectProp(props, propName) { + { + var value = props[propName]; - case 'preload': - return pushLinkImpl(responseState.preloadChunks, props); + if (value != null) { + var array = isArray(value); - default: - return pushLinkImpl(responseState.hoistableChunks, props); + if (props.multiple && !array) { + error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.', propName); + } else if (!props.multiple && array) { + error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.', propName); } } } } -function pushLinkImpl(target, props) { - target.push(startChunkForTag('link')); +function pushStartSelect(target, props, responseState) { + { + checkControlledValueProps('select', props); + checkSelectProp(props, 'value'); + checkSelectProp(props, 'defaultValue'); + + if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultSelectValue) { + error('Select 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 select ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components'); + + didWarnDefaultSelectValue = true; + } + } + + target.push(startChunkForTag('select')); + var children = null; + var innerHTML = null; for (var propKey in props) { if (hasOwnProperty.call(props, propKey)) { @@ -3184,86 +3433,62 @@ function pushLinkImpl(target, props) { switch (propKey) { case 'children': + children = propValue; + break; + case 'dangerouslySetInnerHTML': - throw new Error('link' + " is a self-closing tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.'); - // eslint-disable-next-line-no-fallthrough + // TODO: This doesn't really make sense for select since it can't use the controlled + // value in the innerHTML. + innerHTML = propValue; + break; + + case 'defaultValue': + case 'value': + // These are set on the Context instead and applied to the nested options. + break; default: - pushAttribute(target, propKey, propValue); + pushAttribute(target, responseState, propKey, propValue); break; } } } - target.push(endOfStartTagSelfClosing); - return null; + target.push(endOfStartTag); + pushInnerHTML(target, innerHTML, children); + return children; } -function pushStyle(target, props, resources, textEmbedded, insertionMode, noscriptTagInScope) { - { - if (hasOwnProperty.call(props, 'children')) { - var children = props.children; - var child = Array.isArray(children) ? children.length < 2 ? children[0] : null : children; - - if (typeof child === 'function' || typeof child === 'symbol' || Array.isArray(child)) { - var childType = typeof child === 'function' ? 'a Function' : typeof child === 'symbol' ? 'a Sybmol' : 'an Array'; - - error('React expect children of <style> tags to be a string, number, or object with a `toString` method but found %s instead. ' + 'In browsers style Elements can only have `Text` Nodes as children.', childType); - } - } - } - - { - var precedence = props.precedence; - var href = props.href; +function flattenOptionChildren(children) { + var content = ''; // Flatten children and warn if they aren't strings or numbers; + // invalid types are ignored. - if (insertionMode === SVG_MODE || noscriptTagInScope || typeof precedence !== 'string' || typeof href !== 'string' || href === '') { - // This style tag is not able to be turned into a Style Resource - return pushStyleImpl(target, props); + React.Children.forEach(children, function (child) { + if (child == null) { + return; } - var key = getResourceKey('style', href); - var resource = resources.stylesMap.get(key); - - if (!resource) { - resource = { - type: 'style', - chunks: [], - state: resources.boundaryResources ? Blocked : NoState, - props: styleTagPropsFromRawProps(props) - }; - resources.stylesMap.set(key, resource); - - { - markAsRenderedResourceDEV(resource, props); - } - - pushStyleImpl(resource.chunks, resource.props); - var precedenceSet = resources.precedences.get(precedence); - - if (!precedenceSet) { - precedenceSet = new Set(); - resources.precedences.set(precedence, precedenceSet); - } + content += child; - precedenceSet.add(resource); + { + if (!didWarnInvalidOptionChildren && typeof child !== 'string' && typeof child !== 'number') { + didWarnInvalidOptionChildren = true; - if (resources.boundaryResources) { - resources.boundaryResources.add(resource); + error('Cannot infer the option value of complex children. ' + 'Pass a `value` prop or use a plain string as children to <option>.'); } } - - if (textEmbedded) { - // This link follows text but we aren't writing a tag. while not as efficient as possible we need - // to be safe and assume text will follow by inserting a textSeparator - target.push(textSeparator); - } - } + }); + return content; } -function pushStyleImpl(target, props) { - target.push(startChunkForTag('style')); +var selectedMarkerAttribute = stringToPrecomputedChunk(' selected=""'); + +function pushStartOption(target, props, responseState, formatContext) { + var selectedValue = formatContext.selectedValue; + target.push(startChunkForTag('option')); var children = null; + var value = null; + var selected = null; var innerHTML = null; for (var propKey in props) { @@ -3279,60 +3504,115 @@ function pushStyleImpl(target, props) { children = propValue; break; - case 'dangerouslySetInnerHTML': + case 'selected': + // ignore + selected = propValue; + + { + // TODO: Remove support for `selected` in <option>. + if (!didWarnSelectedSetOnOption) { + error('Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.'); + + didWarnSelectedSetOnOption = true; + } + } + + break; + + case 'dangerouslySetInnerHTML': innerHTML = propValue; break; + // eslint-disable-next-line-no-fallthrough + + case 'value': + value = propValue; + // We intentionally fallthrough to also set the attribute on the node. + // eslint-disable-next-line-no-fallthrough default: - pushAttribute(target, propKey, propValue); + pushAttribute(target, responseState, propKey, propValue); break; } } } - target.push(endOfStartTag); - var child = Array.isArray(children) ? children.length < 2 ? children[0] : null : children; + if (selectedValue != null) { + var stringValue; - if (typeof child !== 'function' && typeof child !== 'symbol' && child !== null && child !== undefined) { - // eslint-disable-next-line react-internal/safe-string-coercion - target.push(stringToChunk(escapeTextForBrowser('' + child))); - } + if (value !== null) { + { + checkAttributeStringCoercion(value, 'value'); + } - pushInnerHTML(target, innerHTML, children); - target.push(endTag1, stringToChunk('style'), endTag2); - return null; -} + stringValue = '' + value; + } else { + { + if (innerHTML !== null) { + if (!didWarnInvalidOptionInnerHTML) { + didWarnInvalidOptionInnerHTML = true; -function pushSelfClosing(target, props, tag) { - target.push(startChunkForTag(tag)); + error('Pass a `value` prop if you set dangerouslyInnerHTML so React knows ' + 'which value should be selected.'); + } + } + } - for (var propKey in props) { - if (hasOwnProperty.call(props, propKey)) { - var propValue = props[propKey]; + stringValue = flattenOptionChildren(children); + } - if (propValue == null) { - continue; - } + if (isArray(selectedValue)) { + // multiple + for (var i = 0; i < selectedValue.length; i++) { + { + checkAttributeStringCoercion(selectedValue[i], 'value'); + } - switch (propKey) { - case 'children': - case 'dangerouslySetInnerHTML': - throw new Error(tag + " is a self-closing tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.'); - // eslint-disable-next-line-no-fallthrough + var v = '' + selectedValue[i]; - default: - pushAttribute(target, propKey, propValue); + if (v === stringValue) { + target.push(selectedMarkerAttribute); break; + } + } + } else { + { + checkAttributeStringCoercion(selectedValue, 'select.value'); + } + + if ('' + selectedValue === stringValue) { + target.push(selectedMarkerAttribute); } } + } else if (selected) { + target.push(selectedMarkerAttribute); } - target.push(endOfStartTagSelfClosing); - return null; + target.push(endOfStartTag); + pushInnerHTML(target, innerHTML, children); + return children; } -function pushStartMenuItem(target, props) { - target.push(startChunkForTag('menuitem')); +function pushInput(target, props, responseState) { + { + checkControlledValueProps('input', props); + + if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnDefaultChecked) { + 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', 'A component', props.type); + + didWarnDefaultChecked = true; + } + + if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultInputValue) { + 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', 'A component', props.type); + + didWarnDefaultInputValue = true; + } + } + + target.push(startChunkForTag('input')); + var value = null; + var defaultValue = null; + var checked = null; + var defaultChecked = null; for (var propKey in props) { if (hasOwnProperty.call(props, propKey)) { @@ -3345,56 +3625,63 @@ function pushStartMenuItem(target, props) { switch (propKey) { case 'children': case 'dangerouslySetInnerHTML': - throw new Error('menuitems cannot have `children` nor `dangerouslySetInnerHTML`.'); + throw new Error('input' + " is a self-closing tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.'); // eslint-disable-next-line-no-fallthrough + case 'defaultChecked': + defaultChecked = propValue; + break; + + case 'defaultValue': + defaultValue = propValue; + break; + + case 'checked': + checked = propValue; + break; + + case 'value': + value = propValue; + break; + default: - pushAttribute(target, propKey, propValue); + pushAttribute(target, responseState, propKey, propValue); break; } } } - target.push(endOfStartTag); + if (checked !== null) { + pushAttribute(target, responseState, 'checked', checked); + } else if (defaultChecked !== null) { + pushAttribute(target, responseState, 'checked', defaultChecked); + } + + if (value !== null) { + pushAttribute(target, responseState, 'value', value); + } else if (defaultValue !== null) { + pushAttribute(target, responseState, 'value', defaultValue); + } + + target.push(endOfStartTagSelfClosing); return null; } -function pushTitle(target, props, responseState, insertionMode, noscriptTagInScope) { +function pushStartTextArea(target, props, responseState) { { - if (hasOwnProperty.call(props, 'children')) { - var children = props.children; - var child = Array.isArray(children) ? children.length < 2 ? children[0] : null : children; - - if (Array.isArray(children) && children.length > 1) { - error('React expects the `children` prop of <title> tags to be a string, number, or object with a novel `toString` method but found an Array with length %s instead.' + ' Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert `children` of <title> tags to a single string value' + ' which is why Arrays of length greater than 1 are not supported. When using JSX it can be commong to combine text nodes and value nodes.' + ' For example: <title>hello {nameOfUser}. While not immediately apparent, `children` in this case is an Array with length 2. If your `children` prop' + ' is using this form try rewriting it using a template string: {`hello ${nameOfUser}`}.', children.length); - } else if (typeof child === 'function' || typeof child === 'symbol') { - var childType = typeof child === 'function' ? 'a Function' : 'a Sybmol'; - - error('React expect children of tags to be a string, number, or object with a novel `toString` method but found %s instead.' + ' Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title>' + ' tags to a single string value.', childType); - } else if (child && child.toString === {}.toString) { - if (child.$$typeof != null) { - error('React expects the `children` prop of <title> tags to be a string, number, or object with a novel `toString` method but found an object that appears to be' + ' a React element which never implements a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to' + ' be able to convert children of <title> tags to a single string value which is why rendering React elements is not supported. If the `children` of <title> is' + ' a React Component try moving the <title> tag into that component. If the `children` of <title> is some HTML markup change it to be Text only to be valid HTML.'); - } else { - error('React expects the `children` prop of <title> tags to be a string, number, or object with a novel `toString` method but found an object that does not implement' + ' a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags' + ' to a single string value. Using the default `toString` method available on every object is almost certainly an error. Consider whether the `children` of this <title>' + ' is an object in error and change it to a string or number value if so. Otherwise implement a `toString` method that React can use to produce a valid <title>.'); - } - } - } - } + checkControlledValueProps('textarea', props); - { - if (insertionMode !== SVG_MODE && !noscriptTagInScope) { - pushTitleImpl(responseState.hoistableChunks, props); - return null; - } else { - return pushTitleImpl(target, props); + if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultTextareaValue) { + error('Textarea 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 textarea ' + 'and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components'); + + didWarnDefaultTextareaValue = true; } } -} -function pushTitleImpl(target, props) { - target.push(startChunkForTag('title')); + target.push(startChunkForTag('textarea')); + var value = null; + var defaultValue = null; var children = null; - var innerHTML = null; for (var propKey in props) { if (hasOwnProperty.call(props, propKey)) { @@ -3409,230 +3696,140 @@ function pushTitleImpl(target, props) { children = propValue; break; - case 'dangerouslySetInnerHTML': - innerHTML = propValue; + case 'value': + value = propValue; break; + case 'defaultValue': + defaultValue = propValue; + break; + + case 'dangerouslySetInnerHTML': + throw new Error('`dangerouslySetInnerHTML` does not make sense on <textarea>.'); + // eslint-disable-next-line-no-fallthrough + default: - pushAttribute(target, propKey, propValue); + pushAttribute(target, responseState, propKey, propValue); break; } } } - target.push(endOfStartTag); - var child = Array.isArray(children) ? children.length < 2 ? children[0] : null : children; - - if (typeof child !== 'function' && typeof child !== 'symbol' && child !== null && child !== undefined) { - // eslint-disable-next-line react-internal/safe-string-coercion - target.push(stringToChunk(escapeTextForBrowser('' + child))); + if (value === null && defaultValue !== null) { + value = defaultValue; } - pushInnerHTML(target, innerHTML, children); - target.push(endTag1, stringToChunk('title'), endTag2); - return null; -} + target.push(endOfStartTag); // TODO (yungsters): Remove support for children content in <textarea>. -function pushStartHead(target, props, responseState, insertionMode) { - { - if (insertionMode < HTML_MODE && responseState.headChunks === null) { - // This <head> is the Document.head and should be part of the preamble - responseState.headChunks = []; - return pushStartGenericElement(responseState.headChunks, props, 'head'); - } else { - // This <head> is deep and is likely just an error. we emit it inline though. - // Validation should warn that this tag is the the wrong spot. - return pushStartGenericElement(target, props, 'head'); + if (children != null) { + { + error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.'); } - } -} -function pushStartHtml(target, props, responseState, insertionMode) { - { - if (insertionMode === ROOT_HTML_MODE && responseState.htmlChunks === null) { - // This <html> is the Document.documentElement and should be part of the preamble - responseState.htmlChunks = [DOCTYPE]; - return pushStartGenericElement(responseState.htmlChunks, props, 'html'); - } else { - // This <html> is deep and is likely just an error. we emit it inline though. - // Validation should warn that this tag is the the wrong spot. - return pushStartGenericElement(target, props, 'html'); + if (value != null) { + throw new Error('If you supply `defaultValue` on a <textarea>, do not pass children.'); } - } -} -function pushScript(target, props, resources, textEmbedded, insertionMode, noscriptTagInScope) { - { - if (insertionMode === SVG_MODE || noscriptTagInScope || typeof props.src !== 'string' || !props.src) { - // This script will not be a resource nor can it be preloaded, we bailout early - // and emit it in place. - return pushScriptImpl(target, props); - } - - var src = props.src; - var key = getResourceKey('script', src); - - if (props.async !== true || props.onLoad || props.onError) { - // We can't resourcify scripts with load listeners. To avoid ambiguity with - // other Resourcified async scripts on the server we omit them from the server - // stream and expect them to be inserted during hydration on the client. - // We can still preload them however so the client can start fetching the script - // as soon as possible - var resource = resources.preloadsMap.get(key); - - if (!resource) { - resource = { - type: 'preload', - chunks: [], - state: NoState, - props: preloadAsScriptPropsFromProps(props.src, props) - }; - resources.preloadsMap.set(key, resource); + if (isArray(children)) { + if (children.length > 1) { + throw new Error('<textarea> can only have at most one child.'); + } // TODO: remove the coercion and the DEV check below because it will + // always be overwritten by the coercion several lines below it. #22309 - { - markAsImplicitResourceDEV(resource, props, resource.props); - } - resources.usedScripts.add(resource); - pushLinkImpl(resource.chunks, resource.props); + { + checkHtmlStringCoercion(children[0]); } - if (props.async !== true) { - // This is not an async script, we can preloaded it but it still needs to - // be emitted in place since it needs to hydrate on the client - pushScriptImpl(target, props); - return null; - } - } else { - // We can make this <script> into a ScriptResource - var _resource2 = resources.scriptsMap.get(key); + value = '' + children[0]; + } - { - var devResource = getAsResourceDEV(_resource2); + { + checkHtmlStringCoercion(children); + } - if (devResource) { - switch (devResource.__provenance) { - case 'rendered': - { - var differenceDescription = describeDifferencesForScripts( // Diff the props from the JSX element, not the derived resource props - props, devResource.__originalProps); + value = '' + children; + } - if (differenceDescription) { - error('React encountered a <script async={true} src="%s" .../> that has props that conflict' + ' with another hoistable script with the same `src`. When rendering hoistable scripts (async scripts without any loading handlers)' + ' the props from the first encountered instance will be used and props from later instances will be ignored.' + ' Update the props on both <script async={true} .../> instance so they agree.%s', src, differenceDescription); - } + if (typeof value === 'string' && value[0] === '\n') { + // text/html ignores the first character in these tags if it's a newline + // Prefer to break application/xml over text/html (for now) by adding + // a newline specifically to get eaten by the parser. (Alternately for + // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first + // \r is normalized out by HTMLTextAreaElement#value.) + // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre> + // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions> + // See: <http://www.w3.org/TR/html5/syntax.html#newlines> + // See: Parsing of "textarea" "listing" and "pre" elements + // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody> + target.push(leadingNewline); + } // ToString and push directly instead of recurse over children. + // We don't really support complex children in the value anyway. + // This also currently avoids a trailing comment node which breaks textarea. - break; - } - case 'preinit': - { - var _differenceDescription2 = describeDifferencesForScriptOverPreinit( // Diff the props from the JSX element, not the derived resource props - props, devResource.__propsEquivalent); + if (value !== null) { + { + checkAttributeStringCoercion(value, 'value'); + } - if (_differenceDescription2) { - error('React encountered a <script async={true} src="%s" .../> with props that conflict' + ' with the options provided to `ReactDOM.preinit("%s", { as: "script", ... })`. React will use the first props or preinitialization' + ' options encountered when rendering a hoistable script with a particular `src` and will ignore any newer props or' + ' options. The first instance of this script resource was created using the `ReactDOM.preinit()` function.' + ' Please note, `ReactDOM.preinit()` is modeled off of module import assertions capabilities and does not support' + ' arbitrary props. If you need to have props not included with the preinit options you will need to rely on rendering' + ' <script> tags only.%s', src, src, _differenceDescription2); - } + target.push(stringToChunk(encodeHTMLTextNode('' + value))); + } - break; - } - } - } - } + return null; +} - if (!_resource2) { - _resource2 = { - type: 'script', - chunks: [], - state: NoState, - props: null - }; - resources.scriptsMap.set(key, _resource2); +function pushBase(target, props, responseState, textEmbedded, noscriptTagInScope) { + if ( !noscriptTagInScope && resourcesFromElement('base', props)) { + if (textEmbedded) { + // This link follows text but we aren't writing a tag. while not as efficient as possible we need + // to be safe and assume text will follow by inserting a textSeparator + target.push(textSeparator); + } // We have converted this link exclusively to a resource and no longer + // need to emit it - { - markAsRenderedResourceDEV(_resource2, props); - } // Add to the script flushing queue + return null; + } - resources.scripts.add(_resource2); - var scriptProps = props; - var preloadResource = resources.preloadsMap.get(key); - - if (preloadResource) { - // If we already had a preload we don't want that resource to flush directly. - // We let the newly created resource govern flushing. - preloadResource.state |= Blocked; - scriptProps = assign({}, props); - adoptPreloadPropsForScriptProps(scriptProps, preloadResource.props); - } // encode the tag as Chunks - - - pushScriptImpl(_resource2.chunks, scriptProps); - } - } + return pushSelfClosing(target, props, 'base', responseState); +} +function pushMeta(target, props, responseState, textEmbedded, noscriptTagInScope) { + if ( !noscriptTagInScope && resourcesFromElement('meta', props)) { if (textEmbedded) { - // This script follows text but we aren't writing a tag. while not as efficient as possible we need + // This link follows text but we aren't writing a tag. while not as efficient as possible we need // to be safe and assume text will follow by inserting a textSeparator target.push(textSeparator); - } + } // We have converted this link exclusively to a resource and no longer + // need to emit it - return null; - } -} -function pushScriptImpl(target, props) { - target.push(startChunkForTag('script')); - var children = null; - var innerHTML = null; - - for (var propKey in props) { - if (hasOwnProperty.call(props, propKey)) { - var propValue = props[propKey]; - - if (propValue == null) { - continue; - } - - switch (propKey) { - case 'children': - children = propValue; - break; - - case 'dangerouslySetInnerHTML': - innerHTML = propValue; - break; - - default: - pushAttribute(target, propKey, propValue); - break; - } - } + return null; } - target.push(endOfStartTag); - - { - if (children != null && typeof children !== 'string') { - var descriptiveStatement = typeof children === 'number' ? 'a number for children' : Array.isArray(children) ? 'an array for children' : 'something unexpected for children'; + return pushSelfClosing(target, props, 'meta', responseState); +} - error('A script element was rendered with %s. If script element has children it must be a single string.' + ' Consider using dangerouslySetInnerHTML or passing a plain string as children.', descriptiveStatement); - } - } +function pushLink(target, props, responseState, textEmbedded, noscriptTagInScope) { + if ( !noscriptTagInScope && resourcesFromLink(props)) { + if (textEmbedded) { + // This link follows text but we aren't writing a tag. while not as efficient as possible we need + // to be safe and assume text will follow by inserting a textSeparator + target.push(textSeparator); + } // We have converted this link exclusively to a resource and no longer + // need to emit it - pushInnerHTML(target, innerHTML, children); - if (typeof children === 'string') { - target.push(stringToChunk(encodeHTMLTextNode(children))); + return null; } - target.push(endTag1, stringToChunk('script'), endTag2); - return null; + return pushLinkImpl(target, props, responseState); } -function pushStartGenericElement(target, props, tag) { - target.push(startChunkForTag(tag)); - var children = null; - var innerHTML = null; +function pushLinkImpl(target, props, responseState) { + var isStylesheet = props.rel === 'stylesheet'; + target.push(startChunkForTag('link')); for (var propKey in props) { if (hasOwnProperty.call(props, propKey)) { @@ -3644,37 +3841,32 @@ function pushStartGenericElement(target, props, tag) { switch (propKey) { case 'children': - children = propValue; - break; - case 'dangerouslySetInnerHTML': - innerHTML = propValue; - break; + throw new Error('link' + " is a self-closing tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.'); + + case 'precedence': + { + if ( isStylesheet) { + // precedence is a reversed property for stylesheets to opt-into resource semantcs + continue; + } // intentionally fall through + + } + // eslint-disable-next-line-no-fallthrough default: - pushAttribute(target, propKey, propValue); + pushAttribute(target, responseState, propKey, propValue); break; } } } - target.push(endOfStartTag); - pushInnerHTML(target, innerHTML, children); - - if (typeof children === 'string') { - // Special case children as a string to avoid the unnecessary comment. - // TODO: Remove this special case after the general optimization is in place. - target.push(stringToChunk(encodeHTMLTextNode(children))); - return null; - } - - return children; + target.push(endOfStartTagSelfClosing); + return null; } -function pushStartCustomElement(target, props, tag) { +function pushSelfClosing(target, props, tag, responseState) { target.push(startChunkForTag(tag)); - var children = null; - var innerHTML = null; for (var propKey in props) { if (hasOwnProperty.call(props, propKey)) { @@ -3686,43 +3878,23 @@ function pushStartCustomElement(target, props, tag) { switch (propKey) { case 'children': - children = propValue; - break; - case 'dangerouslySetInnerHTML': - innerHTML = propValue; - break; - - case 'style': - pushStyleAttribute(target, propValue); - break; - - case 'suppressContentEditableWarning': - case 'suppressHydrationWarning': - // Ignored. These are built-in to React on the client. - break; + throw new Error(tag + " is a self-closing tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.'); + // eslint-disable-next-line-no-fallthrough default: - if (isAttributeNameSafe(propKey) && typeof propValue !== 'function' && typeof propValue !== 'symbol') { - target.push(attributeSeparator, stringToChunk(propKey), attributeAssign, stringToChunk(escapeTextForBrowser(propValue)), attributeEnd); - } - + pushAttribute(target, responseState, propKey, propValue); break; } } } - target.push(endOfStartTag); - pushInnerHTML(target, innerHTML, children); - return children; + target.push(endOfStartTagSelfClosing); + return null; } -var leadingNewline = stringToPrecomputedChunk('\n'); - -function pushStartPreformattedElement(target, props, tag) { - target.push(startChunkForTag(tag)); - var children = null; - var innerHTML = null; +function pushStartMenuItem(target, props, responseState) { + target.push(startChunkForTag('menuitem')); for (var propKey in props) { if (hasOwnProperty.call(props, propKey)) { @@ -3734,1741 +3906,1361 @@ function pushStartPreformattedElement(target, props, tag) { switch (propKey) { case 'children': - children = propValue; - break; - case 'dangerouslySetInnerHTML': - innerHTML = propValue; - break; + throw new Error('menuitems cannot have `children` nor `dangerouslySetInnerHTML`.'); + // eslint-disable-next-line-no-fallthrough default: - pushAttribute(target, propKey, propValue); + pushAttribute(target, responseState, propKey, propValue); break; } } } - target.push(endOfStartTag); // text/html ignores the first character in these tags if it's a newline - // Prefer to break application/xml over text/html (for now) by adding - // a newline specifically to get eaten by the parser. (Alternately for - // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first - // \r is normalized out by HTMLTextAreaElement#value.) - // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre> - // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions> - // See: <http://www.w3.org/TR/html5/syntax.html#newlines> - // See: Parsing of "textarea" "listing" and "pre" elements - // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody> - // TODO: This doesn't deal with the case where the child is an array - // or component that returns a string. - - if (innerHTML != null) { - if (children != null) { - throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.'); - } - - if (typeof innerHTML !== 'object' || !('__html' in innerHTML)) { - throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' + 'for more information.'); - } - - var html = innerHTML.__html; - - if (html !== null && html !== undefined) { - if (typeof html === 'string' && html.length > 0 && html[0] === '\n') { - target.push(leadingNewline, stringToChunk(html)); - } else { - { - checkHtmlStringCoercion(html); - } - - target.push(stringToChunk('' + html)); - } - } - } - - if (typeof children === 'string' && children[0] === '\n') { - target.push(leadingNewline); - } - - return children; -} // We accept any tag to be rendered but since this gets injected into arbitrary -// HTML, we want to make sure that it's a safe tag. -// http://www.w3.org/TR/REC-xml/#NT-Name - - -var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset - -var validatedTagCache = new Map(); - -function startChunkForTag(tag) { - var tagStartChunk = validatedTagCache.get(tag); - - if (tagStartChunk === undefined) { - if (!VALID_TAG_REGEX.test(tag)) { - throw new Error("Invalid tag: " + tag); - } - - tagStartChunk = stringToPrecomputedChunk('<' + tag); - validatedTagCache.set(tag, tagStartChunk); - } - - return tagStartChunk; + target.push(endOfStartTag); + return null; } -var DOCTYPE = stringToPrecomputedChunk('<!DOCTYPE html>'); -function pushStartInstance(target, type, props, resources, responseState, formatContext, textEmbedded) { +function pushTitle(target, props, responseState, insertionMode, noscriptTagInScope) { { - validateProperties(type, props); - validateProperties$1(type, props); - validateProperties$2(type, props, null); - - if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) { - error('A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.'); - } + var children = props.children; + var childForValidation = Array.isArray(children) && children.length < 2 ? children[0] || null : children; - if (formatContext.insertionMode !== SVG_MODE && formatContext.insertionMode !== MATHML_MODE) { - if (type.indexOf('-') === -1 && typeof props.is !== 'string' && type.toLowerCase() !== type) { - error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type); - } + if (Array.isArray(children) && children.length > 1) { + error('A title element received an array with more than 1 element as children. ' + 'In browsers title Elements can only have Text Nodes as children. If ' + 'the children being rendered output more than a single text node in aggregate the browser ' + 'will display markup and comments as text in the title and hydration will likely fail and ' + 'fall back to client rendering'); + } else if (childForValidation != null && childForValidation.$$typeof != null) { + error('A title element received a React element for children. ' + 'In the browser title Elements can only have Text Nodes as children. If ' + 'the children being rendered output more than a single text node in aggregate the browser ' + 'will display markup and comments as text in the title and hydration will likely fail and ' + 'fall back to client rendering'); + } else if (childForValidation != null && typeof childForValidation !== 'string' && typeof childForValidation !== 'number') { + error('A title element received a value that was not a string or number for children. ' + 'In the browser title Elements can only have Text Nodes as children. If ' + 'the children being rendered output more than a single text node in aggregate the browser ' + 'will display markup and comments as text in the title and hydration will likely fail and ' + 'fall back to client rendering'); } } - switch (type) { - // Special tags - case 'select': - return pushStartSelect(target, props); - - case 'option': - return pushStartOption(target, props, formatContext); - - case 'textarea': - return pushStartTextArea(target, props); - - case 'input': - return pushInput(target, props); - - case 'menuitem': - return pushStartMenuItem(target, props); - - case 'title': - return pushTitle(target, props, responseState, formatContext.insertionMode, formatContext.noscriptTagInScope) ; - - case 'link': - return pushLink(target, props, responseState, resources, textEmbedded, formatContext.insertionMode, formatContext.noscriptTagInScope); - - case 'script': - return pushScript(target, props, resources, textEmbedded, formatContext.insertionMode, formatContext.noscriptTagInScope) ; - - case 'style': - return pushStyle(target, props, resources, textEmbedded, formatContext.insertionMode, formatContext.noscriptTagInScope); - - case 'meta': - return pushMeta(target, props, responseState, textEmbedded, formatContext.insertionMode, formatContext.noscriptTagInScope); - // Newline eating tags - - case 'listing': - case 'pre': - { - return pushStartPreformattedElement(target, props, type); - } - // Omitted close tags - - case 'base': - case 'area': - case 'br': - case 'col': - case 'embed': - case 'hr': - case 'img': - case 'keygen': - case 'param': - case 'source': - case 'track': - case 'wbr': - { - return pushSelfClosing(target, props, type); - } - // These are reserved SVG and MathML elements, that are never custom elements. - // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts - - case 'annotation-xml': - case 'color-profile': - case 'font-face': - case 'font-face-src': - case 'font-face-uri': - case 'font-face-format': - case 'font-face-name': - case 'missing-glyph': - { - return pushStartGenericElement(target, props, type); - } - // Preamble start tags - - case 'head': - return pushStartHead(target, props, responseState, formatContext.insertionMode); - - case 'html': - { - return pushStartHtml(target, props, responseState, formatContext.insertionMode); - } - - default: - { - if (type.indexOf('-') === -1 && typeof props.is !== 'string') { - // Generic element - return pushStartGenericElement(target, props, type); - } else { - // Custom element - return pushStartCustomElement(target, props, type); - } - } - } -} -var endTag1 = stringToPrecomputedChunk('</'); -var endTag2 = stringToPrecomputedChunk('>'); -function pushEndInstance(target, type, props, responseState, formatContext) { - switch (type) { - // When float is on we expect title and script tags to always be pushed in - // a unit and never return children. when we end up pushing the end tag we - // want to ensure there is no extra closing tag pushed - case 'title': - case 'style': - case 'script': - // Omitted close tags - // TODO: Instead of repeating this switch we could try to pass a flag from above. - // That would require returning a tuple. Which might be ok if it gets inlined. - // eslint-disable-next-line-no-fallthrough - - case 'area': - case 'base': - case 'br': - case 'col': - case 'embed': - case 'hr': - case 'img': - case 'input': - case 'keygen': - case 'link': - case 'meta': - case 'param': - case 'source': - case 'track': - case 'wbr': - { - // No close tag needed. - return; - } - // Postamble end tags - // When float is enabled we omit the end tags for body and html when - // they represent the Document.body and Document.documentElement Nodes. - // This is so we can withhold them until the postamble when we know - // we won't emit any more tags - - case 'body': - { - if ( formatContext.insertionMode <= HTML_HTML_MODE) { - responseState.hasBody = true; - return; - } - - break; - } - - case 'html': - if ( formatContext.insertionMode === ROOT_HTML_MODE) { - return; - } - - break; - } - - target.push(endTag1, stringToChunk(type), endTag2); -} -function writeCompletedRoot(destination, responseState) { - var bootstrapChunks = responseState.bootstrapChunks; - var i = 0; - - for (; i < bootstrapChunks.length - 1; i++) { - writeChunk(destination, bootstrapChunks[i]); - } - - if (i < bootstrapChunks.length) { - return writeChunkAndReturn(destination, bootstrapChunks[i]); - } - - return true; -} // Structural Nodes -// A placeholder is a node inside a hidden partial tree that can be filled in later, but before -// display. It's never visible to users. We use the template tag because it can be used in every -// type of parent. <script> tags also work in every other tag except <colgroup>. - -var placeholder1 = stringToPrecomputedChunk('<template id="'); -var placeholder2 = stringToPrecomputedChunk('"></template>'); -function writePlaceholder(destination, responseState, id) { - writeChunk(destination, placeholder1); - writeChunk(destination, responseState.placeholderPrefix); - var formattedID = stringToChunk(id.toString(16)); - writeChunk(destination, formattedID); - return writeChunkAndReturn(destination, placeholder2); -} // Suspense boundaries are encoded as comments. - -var startCompletedSuspenseBoundary = stringToPrecomputedChunk('<!--$-->'); -var startPendingSuspenseBoundary1 = stringToPrecomputedChunk('<!--$?--><template id="'); -var startPendingSuspenseBoundary2 = stringToPrecomputedChunk('"></template>'); -var startClientRenderedSuspenseBoundary = stringToPrecomputedChunk('<!--$!-->'); -var endSuspenseBoundary = stringToPrecomputedChunk('<!--/$-->'); -var clientRenderedSuspenseBoundaryError1 = stringToPrecomputedChunk('<template'); -var clientRenderedSuspenseBoundaryErrorAttrInterstitial = stringToPrecomputedChunk('"'); -var clientRenderedSuspenseBoundaryError1A = stringToPrecomputedChunk(' data-dgst="'); -var clientRenderedSuspenseBoundaryError1B = stringToPrecomputedChunk(' data-msg="'); -var clientRenderedSuspenseBoundaryError1C = stringToPrecomputedChunk(' data-stck="'); -var clientRenderedSuspenseBoundaryError2 = stringToPrecomputedChunk('></template>'); -function writeStartCompletedSuspenseBoundary(destination, responseState) { - return writeChunkAndReturn(destination, startCompletedSuspenseBoundary); -} -function writeStartPendingSuspenseBoundary(destination, responseState, id) { - writeChunk(destination, startPendingSuspenseBoundary1); - - if (id === null) { - throw new Error('An ID must have been assigned before we can complete the boundary.'); + if ( // title is valid in SVG so we avoid resour + insertionMode !== SVG_MODE && !noscriptTagInScope && resourcesFromElement('title', props)) { + // We have converted this link exclusively to a resource and no longer + // need to emit it + return null; } - writeChunk(destination, id); - return writeChunkAndReturn(destination, startPendingSuspenseBoundary2); + return pushTitleImpl(target, props, responseState); } -function writeStartClientRenderedSuspenseBoundary(destination, responseState, errorDigest, errorMesssage, errorComponentStack) { - var result; - result = writeChunkAndReturn(destination, startClientRenderedSuspenseBoundary); - writeChunk(destination, clientRenderedSuspenseBoundaryError1); - - if (errorDigest) { - writeChunk(destination, clientRenderedSuspenseBoundaryError1A); - writeChunk(destination, stringToChunk(escapeTextForBrowser(errorDigest))); - writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial); - } - { - if (errorMesssage) { - writeChunk(destination, clientRenderedSuspenseBoundaryError1B); - writeChunk(destination, stringToChunk(escapeTextForBrowser(errorMesssage))); - writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial); - } +function pushTitleImpl(target, props, responseState) { + target.push(startChunkForTag('title')); + var children = null; - if (errorComponentStack) { - writeChunk(destination, clientRenderedSuspenseBoundaryError1C); - writeChunk(destination, stringToChunk(escapeTextForBrowser(errorComponentStack))); - writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial); - } - } + for (var propKey in props) { + if (hasOwnProperty.call(props, propKey)) { + var propValue = props[propKey]; - result = writeChunkAndReturn(destination, clientRenderedSuspenseBoundaryError2); - return result; -} -function writeEndCompletedSuspenseBoundary(destination, responseState) { - return writeChunkAndReturn(destination, endSuspenseBoundary); -} -function writeEndPendingSuspenseBoundary(destination, responseState) { - return writeChunkAndReturn(destination, endSuspenseBoundary); -} -function writeEndClientRenderedSuspenseBoundary(destination, responseState) { - return writeChunkAndReturn(destination, endSuspenseBoundary); -} -var startSegmentHTML = stringToPrecomputedChunk('<div hidden id="'); -var startSegmentHTML2 = stringToPrecomputedChunk('">'); -var endSegmentHTML = stringToPrecomputedChunk('</div>'); -var startSegmentSVG = stringToPrecomputedChunk('<svg aria-hidden="true" style="display:none" id="'); -var startSegmentSVG2 = stringToPrecomputedChunk('">'); -var endSegmentSVG = stringToPrecomputedChunk('</svg>'); -var startSegmentMathML = stringToPrecomputedChunk('<math aria-hidden="true" style="display:none" id="'); -var startSegmentMathML2 = stringToPrecomputedChunk('">'); -var endSegmentMathML = stringToPrecomputedChunk('</math>'); -var startSegmentTable = stringToPrecomputedChunk('<table hidden id="'); -var startSegmentTable2 = stringToPrecomputedChunk('">'); -var endSegmentTable = stringToPrecomputedChunk('</table>'); -var startSegmentTableBody = stringToPrecomputedChunk('<table hidden><tbody id="'); -var startSegmentTableBody2 = stringToPrecomputedChunk('">'); -var endSegmentTableBody = stringToPrecomputedChunk('</tbody></table>'); -var startSegmentTableRow = stringToPrecomputedChunk('<table hidden><tr id="'); -var startSegmentTableRow2 = stringToPrecomputedChunk('">'); -var endSegmentTableRow = stringToPrecomputedChunk('</tr></table>'); -var startSegmentColGroup = stringToPrecomputedChunk('<table hidden><colgroup id="'); -var startSegmentColGroup2 = stringToPrecomputedChunk('">'); -var endSegmentColGroup = stringToPrecomputedChunk('</colgroup></table>'); -function writeStartSegment(destination, responseState, formatContext, id) { - switch (formatContext.insertionMode) { - case ROOT_HTML_MODE: - case HTML_HTML_MODE: - case HTML_MODE: - { - writeChunk(destination, startSegmentHTML); - writeChunk(destination, responseState.segmentPrefix); - writeChunk(destination, stringToChunk(id.toString(16))); - return writeChunkAndReturn(destination, startSegmentHTML2); + if (propValue == null) { + continue; } - case SVG_MODE: - { - writeChunk(destination, startSegmentSVG); - writeChunk(destination, responseState.segmentPrefix); - writeChunk(destination, stringToChunk(id.toString(16))); - return writeChunkAndReturn(destination, startSegmentSVG2); - } + switch (propKey) { + case 'children': + children = propValue; + break; - case MATHML_MODE: - { - writeChunk(destination, startSegmentMathML); - writeChunk(destination, responseState.segmentPrefix); - writeChunk(destination, stringToChunk(id.toString(16))); - return writeChunkAndReturn(destination, startSegmentMathML2); - } + case 'dangerouslySetInnerHTML': + throw new Error('`dangerouslySetInnerHTML` does not make sense on <title>.'); + // eslint-disable-next-line-no-fallthrough - case HTML_TABLE_MODE: - { - writeChunk(destination, startSegmentTable); - writeChunk(destination, responseState.segmentPrefix); - writeChunk(destination, stringToChunk(id.toString(16))); - return writeChunkAndReturn(destination, startSegmentTable2); + default: + pushAttribute(target, responseState, propKey, propValue); + break; } - // TODO: For the rest of these, there will be extra wrapper nodes that never - // get deleted from the document. We need to delete the table too as part - // of the injected scripts. They are invisible though so it's not too terrible - // and it's kind of an edge case to suspend in a table. Totally supported though. + } + } - case HTML_TABLE_BODY_MODE: - { - writeChunk(destination, startSegmentTableBody); - writeChunk(destination, responseState.segmentPrefix); - writeChunk(destination, stringToChunk(id.toString(16))); - return writeChunkAndReturn(destination, startSegmentTableBody2); - } + target.push(endOfStartTag); + var child = Array.isArray(children) ? children.length < 2 ? children[0] : null : children; - case HTML_TABLE_ROW_MODE: - { - writeChunk(destination, startSegmentTableRow); - writeChunk(destination, responseState.segmentPrefix); - writeChunk(destination, stringToChunk(id.toString(16))); - return writeChunkAndReturn(destination, startSegmentTableRow2); - } + if (typeof child !== 'function' && typeof child !== 'symbol' && child !== null && child !== undefined) { + // eslint-disable-next-line react-internal/safe-string-coercion + target.push(stringToChunk(escapeTextForBrowser('' + child))); + } - case HTML_COLGROUP_MODE: - { - writeChunk(destination, startSegmentColGroup); - writeChunk(destination, responseState.segmentPrefix); - writeChunk(destination, stringToChunk(id.toString(16))); - return writeChunkAndReturn(destination, startSegmentColGroup2); - } + target.push(endTag1, stringToChunk('title'), endTag2); + return null; +} - default: - { - throw new Error('Unknown insertion mode. This is a bug in React.'); - } +function pushStartHead(target, preamble, props, tag, responseState) { + return pushStartGenericElement( preamble , props, tag, responseState); +} + +function pushStartHtml(target, preamble, props, tag, responseState, formatContext) { + target = preamble ; + + if (formatContext.insertionMode === ROOT_HTML_MODE) { + // If we're rendering the html tag and we're at the root (i.e. not in foreignObject) + // then we also emit the DOCTYPE as part of the root content as a convenience for + // rendering the whole document. + target.push(DOCTYPE); } + + return pushStartGenericElement(target, props, tag, responseState); } -function writeEndSegment(destination, formatContext) { - switch (formatContext.insertionMode) { - case ROOT_HTML_MODE: - case HTML_HTML_MODE: - case HTML_MODE: - { - return writeChunkAndReturn(destination, endSegmentHTML); - } - case SVG_MODE: - { - return writeChunkAndReturn(destination, endSegmentSVG); - } +function pushScript(target, props, responseState, textEmbedded, noscriptTagInScope) { + if ( !noscriptTagInScope && resourcesFromScript(props)) { + if (textEmbedded) { + // This link follows text but we aren't writing a tag. while not as efficient as possible we need + // to be safe and assume text will follow by inserting a textSeparator + target.push(textSeparator); + } // We have converted this link exclusively to a resource and no longer + // need to emit it - case MATHML_MODE: - { - return writeChunkAndReturn(destination, endSegmentMathML); - } - case HTML_TABLE_MODE: - { - return writeChunkAndReturn(destination, endSegmentTable); - } + return null; + } - case HTML_TABLE_BODY_MODE: - { - return writeChunkAndReturn(destination, endSegmentTableBody); - } + return pushScriptImpl(target, props, responseState); +} - case HTML_TABLE_ROW_MODE: - { - return writeChunkAndReturn(destination, endSegmentTableRow); - } +function pushScriptImpl(target, props, responseState) { + target.push(startChunkForTag('script')); + var children = null; + var innerHTML = null; - case HTML_COLGROUP_MODE: - { - return writeChunkAndReturn(destination, endSegmentColGroup); + for (var propKey in props) { + if (hasOwnProperty.call(props, propKey)) { + var propValue = props[propKey]; + + if (propValue == null) { + continue; } - default: - { - throw new Error('Unknown insertion mode. This is a bug in React.'); + switch (propKey) { + case 'children': + children = propValue; + break; + + case 'dangerouslySetInnerHTML': + innerHTML = propValue; + break; + + default: + pushAttribute(target, responseState, propKey, propValue); + break; } + } } -} -var completeSegmentScript1Full = stringToPrecomputedChunk(completeSegment + ';$RS("'); -var completeSegmentScript1Partial = stringToPrecomputedChunk('$RS("'); -var completeSegmentScript2 = stringToPrecomputedChunk('","'); -var completeSegmentScriptEnd = stringToPrecomputedChunk('")</script>'); -var completeSegmentData1 = stringToPrecomputedChunk('<template data-rsi="" data-sid="'); -var completeSegmentData2 = stringToPrecomputedChunk('" data-pid="'); -function writeCompletedSegmentInstruction(destination, responseState, contentSegmentID) { + + target.push(endOfStartTag); { - writeChunk(destination, responseState.startInlineScript); + if (children != null && typeof children !== 'string') { + var descriptiveStatement = typeof children === 'number' ? 'a number for children' : Array.isArray(children) ? 'an array for children' : 'something unexpected for children'; - if ((responseState.instructions & SentCompleteSegmentFunction) === NothingSent) { - // The first time we write this, we'll need to include the full implementation. - responseState.instructions |= SentCompleteSegmentFunction; - writeChunk(destination, completeSegmentScript1Full); - } else { - // Future calls can just reuse the same function. - writeChunk(destination, completeSegmentScript1Partial); + error('A script element was rendered with %s. If script element has children it must be a single string.' + ' Consider using dangerouslySetInnerHTML or passing a plain string as children.', descriptiveStatement); } - } // Write function arguments, which are string literals + } + pushInnerHTML(target, innerHTML, children); - writeChunk(destination, responseState.segmentPrefix); - var formattedID = stringToChunk(contentSegmentID.toString(16)); - writeChunk(destination, formattedID); + if (typeof children === 'string') { + target.push(stringToChunk(encodeHTMLTextNode(children))); + } - { - writeChunk(destination, completeSegmentScript2); + target.push(endTag1, stringToChunk('script'), endTag2); + return null; +} + +function pushStartGenericElement(target, props, tag, responseState) { + target.push(startChunkForTag(tag)); + var children = null; + var innerHTML = null; + + for (var propKey in props) { + if (hasOwnProperty.call(props, propKey)) { + var propValue = props[propKey]; + + if (propValue == null) { + continue; + } + + switch (propKey) { + case 'children': + children = propValue; + break; + + case 'dangerouslySetInnerHTML': + innerHTML = propValue; + break; + + default: + pushAttribute(target, responseState, propKey, propValue); + break; + } + } } - writeChunk(destination, responseState.placeholderPrefix); - writeChunk(destination, formattedID); + target.push(endOfStartTag); + pushInnerHTML(target, innerHTML, children); - { - return writeChunkAndReturn(destination, completeSegmentScriptEnd); + if (typeof children === 'string') { + // Special case children as a string to avoid the unnecessary comment. + // TODO: Remove this special case after the general optimization is in place. + target.push(stringToChunk(encodeHTMLTextNode(children))); + return null; } + + return children; } -var completeBoundaryScript1Full = stringToPrecomputedChunk(completeBoundary + '$RC("'); -var completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC("'); -var completeBoundaryWithStylesScript1FullBoth = stringToPrecomputedChunk(completeBoundary + completeBoundaryWithStyles + '$RR("'); -var completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk(completeBoundaryWithStyles + '$RR("'); -var completeBoundaryWithStylesScript1Partial = stringToPrecomputedChunk('$RR("'); -var completeBoundaryScript2 = stringToPrecomputedChunk('","'); -var completeBoundaryScript3a = stringToPrecomputedChunk('",'); -var completeBoundaryScript3b = stringToPrecomputedChunk('"'); -var completeBoundaryScriptEnd = stringToPrecomputedChunk(')</script>'); -var completeBoundaryData1 = stringToPrecomputedChunk('<template data-rci="" data-bid="'); -var completeBoundaryWithStylesData1 = stringToPrecomputedChunk('<template data-rri="" data-bid="'); -var completeBoundaryData2 = stringToPrecomputedChunk('" data-sid="'); -var completeBoundaryData3a = stringToPrecomputedChunk('" data-sty="'); -function writeCompletedBoundaryInstruction(destination, responseState, boundaryID, contentSegmentID, boundaryResources) { - var hasStyleDependencies; - { - hasStyleDependencies = hasStyleResourceDependencies(boundaryResources); - } +function pushStartCustomElement(target, props, tag, responseState) { + target.push(startChunkForTag(tag)); + var children = null; + var innerHTML = null; - { - writeChunk(destination, responseState.startInlineScript); + for (var propKey in props) { + if (hasOwnProperty.call(props, propKey)) { + var propValue = props[propKey]; - if ( hasStyleDependencies) { - if ((responseState.instructions & SentCompleteBoundaryFunction) === NothingSent) { - responseState.instructions |= SentStyleInsertionFunction | SentCompleteBoundaryFunction; - writeChunk(destination, clonePrecomputedChunk(completeBoundaryWithStylesScript1FullBoth)); - } else if ((responseState.instructions & SentStyleInsertionFunction) === NothingSent) { - responseState.instructions |= SentStyleInsertionFunction; - writeChunk(destination, completeBoundaryWithStylesScript1FullPartial); - } else { - writeChunk(destination, completeBoundaryWithStylesScript1Partial); + if (propValue == null) { + continue; } - } else { - if ((responseState.instructions & SentCompleteBoundaryFunction) === NothingSent) { - responseState.instructions |= SentCompleteBoundaryFunction; - writeChunk(destination, completeBoundaryScript1Full); - } else { - writeChunk(destination, completeBoundaryScript1Partial); + + switch (propKey) { + case 'children': + children = propValue; + break; + + case 'dangerouslySetInnerHTML': + innerHTML = propValue; + break; + + case 'style': + pushStyle(target, responseState, propValue); + break; + + case 'suppressContentEditableWarning': + case 'suppressHydrationWarning': + // Ignored. These are built-in to React on the client. + break; + + default: + if (isAttributeNameSafe(propKey) && typeof propValue !== 'function' && typeof propValue !== 'symbol') { + target.push(attributeSeparator, stringToChunk(propKey), attributeAssign, stringToChunk(escapeTextForBrowser(propValue)), attributeEnd); + } + + break; } } } - if (boundaryID === null) { - throw new Error('An ID must have been assigned before we can complete the boundary.'); - } // Write function arguments, which are string and array literals + target.push(endOfStartTag); + pushInnerHTML(target, innerHTML, children); + return children; +} +var leadingNewline = stringToPrecomputedChunk('\n'); - var formattedContentID = stringToChunk(contentSegmentID.toString(16)); - writeChunk(destination, boundaryID); +function pushStartPreformattedElement(target, props, tag, responseState) { + target.push(startChunkForTag(tag)); + var children = null; + var innerHTML = null; - { - writeChunk(destination, completeBoundaryScript2); - } + for (var propKey in props) { + if (hasOwnProperty.call(props, propKey)) { + var propValue = props[propKey]; - writeChunk(destination, responseState.segmentPrefix); - writeChunk(destination, formattedContentID); + if (propValue == null) { + continue; + } - if ( hasStyleDependencies) { - // Script and data writers must format this differently: - // - script writer emits an array literal, whose string elements are - // escaped for javascript e.g. ["A", "B"] - // - data writer emits a string literal, which is escaped as html - // e.g. ["A", "B"] - { - writeChunk(destination, completeBoundaryScript3a); // boundaryResources encodes an array literal + switch (propKey) { + case 'children': + children = propValue; + break; - writeStyleResourceDependenciesInJS(destination, boundaryResources); - } - } else { - { - writeChunk(destination, completeBoundaryScript3b); - } - } + case 'dangerouslySetInnerHTML': + innerHTML = propValue; + break; - { - return writeChunkAndReturn(destination, completeBoundaryScriptEnd); + default: + pushAttribute(target, responseState, propKey, propValue); + break; + } + } } -} -var clientRenderScript1Full = stringToPrecomputedChunk(clientRenderBoundary + ';$RX("'); -var clientRenderScript1Partial = stringToPrecomputedChunk('$RX("'); -var clientRenderScript1A = stringToPrecomputedChunk('"'); -var clientRenderErrorScriptArgInterstitial = stringToPrecomputedChunk(','); -var clientRenderScriptEnd = stringToPrecomputedChunk(')</script>'); -var clientRenderData1 = stringToPrecomputedChunk('<template data-rxi="" data-bid="'); -var clientRenderData2 = stringToPrecomputedChunk('" data-dgst="'); -var clientRenderData3 = stringToPrecomputedChunk('" data-msg="'); -var clientRenderData4 = stringToPrecomputedChunk('" data-stck="'); -function writeClientRenderBoundaryInstruction(destination, responseState, boundaryID, errorDigest, errorMessage, errorComponentStack) { - { - writeChunk(destination, responseState.startInlineScript); + target.push(endOfStartTag); // text/html ignores the first character in these tags if it's a newline + // Prefer to break application/xml over text/html (for now) by adding + // a newline specifically to get eaten by the parser. (Alternately for + // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first + // \r is normalized out by HTMLTextAreaElement#value.) + // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre> + // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions> + // See: <http://www.w3.org/TR/html5/syntax.html#newlines> + // See: Parsing of "textarea" "listing" and "pre" elements + // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody> + // TODO: This doesn't deal with the case where the child is an array + // or component that returns a string. - if ((responseState.instructions & SentClientRenderFunction) === NothingSent) { - // The first time we write this, we'll need to include the full implementation. - responseState.instructions |= SentClientRenderFunction; - writeChunk(destination, clientRenderScript1Full); - } else { - // Future calls can just reuse the same function. - writeChunk(destination, clientRenderScript1Partial); + if (innerHTML != null) { + if (children != null) { + throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.'); } - } - if (boundaryID === null) { - throw new Error('An ID must have been assigned before we can complete the boundary.'); - } + if (typeof innerHTML !== 'object' || !('__html' in innerHTML)) { + throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' + 'for more information.'); + } - writeChunk(destination, boundaryID); + var html = innerHTML.__html; - { - // " needs to be inserted for scripts, since ArgInterstitual does not contain - // leading or trailing quotes - writeChunk(destination, clientRenderScript1A); - } + if (html !== null && html !== undefined) { + if (typeof html === 'string' && html.length > 0 && html[0] === '\n') { + target.push(leadingNewline, stringToChunk(html)); + } else { + { + checkHtmlStringCoercion(html); + } - if (errorDigest || errorMessage || errorComponentStack) { - { - // ,"JSONString" - writeChunk(destination, clientRenderErrorScriptArgInterstitial); - writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorDigest || ''))); + target.push(stringToChunk('' + html)); + } } } - if (errorMessage || errorComponentStack) { - { - // ,"JSONString" - writeChunk(destination, clientRenderErrorScriptArgInterstitial); - writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorMessage || ''))); - } + if (typeof children === 'string' && children[0] === '\n') { + target.push(leadingNewline); } - if (errorComponentStack) { - // ,"JSONString" - { - writeChunk(destination, clientRenderErrorScriptArgInterstitial); - writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorComponentStack))); - } - } + return children; +} // We accept any tag to be rendered but since this gets injected into arbitrary +// HTML, we want to make sure that it's a safe tag. +// http://www.w3.org/TR/REC-xml/#NT-Name - { - // ></script> - return writeChunkAndReturn(destination, clientRenderScriptEnd); - } -} -var regexForJSStringsInInstructionScripts = /[<\u2028\u2029]/g; -function escapeJSStringsForInstructionScripts(input) { - var escaped = JSON.stringify(input); - return escaped.replace(regexForJSStringsInInstructionScripts, function (match) { - switch (match) { - // santizing breaking out of strings and script tags - case '<': - return "\\u003c"; +var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset - case "\u2028": - return "\\u2028"; +var validatedTagCache = new Map(); - case "\u2029": - return "\\u2029"; +function startChunkForTag(tag) { + var tagStartChunk = validatedTagCache.get(tag); - default: - { - // eslint-disable-next-line react-internal/prod-error-codes - throw new Error('escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React'); - } + if (tagStartChunk === undefined) { + if (!VALID_TAG_REGEX.test(tag)) { + throw new Error("Invalid tag: " + tag); } - }); -} - -var regexForJSStringsInScripts = /[&><\u2028\u2029]/g; - -function escapeJSObjectForInstructionScripts(input) { - var escaped = JSON.stringify(input); - return escaped.replace(regexForJSStringsInScripts, function (match) { - switch (match) { - // santizing breaking out of strings and script tags - case '&': - return "\\u0026"; - case '>': - return "\\u003e"; + tagStartChunk = stringToPrecomputedChunk('<' + tag); + validatedTagCache.set(tag, tagStartChunk); + } - case '<': - return "\\u003c"; + return tagStartChunk; +} - case "\u2028": - return "\\u2028"; +var DOCTYPE = stringToPrecomputedChunk('<!DOCTYPE html>'); +function pushStartInstance(target, preamble, type, props, responseState, formatContext, textEmbedded) { + { + validateProperties(type, props); + validateProperties$1(type, props); + validateProperties$2(type, props, null); - case "\u2029": - return "\\u2029"; + if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) { + error('A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.'); + } - default: - { - // eslint-disable-next-line react-internal/prod-error-codes - throw new Error('escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React'); - } + if (formatContext.insertionMode !== SVG_MODE && formatContext.insertionMode !== MATHML_MODE) { + if (type.indexOf('-') === -1 && typeof props.is !== 'string' && type.toLowerCase() !== type) { + error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type); + } } - }); -} + } -var styleTagTemplateOpen = stringToPrecomputedChunk('<template data-precedence="">'); -var styleTagTemplateClose = stringToPrecomputedChunk('</template>'); // Tracks whether we wrote any late style tags. We use this to determine -// whether we need to emit a closing template tag after flushing late style tags + switch (type) { + // Special tags + case 'select': + return pushStartSelect(target, props, responseState); -var didWrite = false; + case 'option': + return pushStartOption(target, props, responseState, formatContext); -function flushStyleTagsLateForBoundary(resource) { - if (resource.type === 'style' && (resource.state & Flushed) === NoState) { - if (didWrite === false) { - // we are going to write so we need to emit the open tag - didWrite = true; - writeChunk(this, styleTagTemplateOpen); - } // This <style> tag can be flushed now + case 'textarea': + return pushStartTextArea(target, props, responseState); + case 'input': + return pushInput(target, props, responseState); - var chunks = resource.chunks; + case 'menuitem': + return pushStartMenuItem(target, props, responseState); - for (var i = 0; i < chunks.length; i++) { - writeChunk(this, chunks[i]); - } + case 'title': + return pushTitle(target, props, responseState, formatContext.insertionMode, formatContext.noscriptTagInScope) ; - resource.state |= FlushedLate; - } -} + case 'link': + return pushLink(target, props, responseState, textEmbedded, formatContext.noscriptTagInScope); -function writeResourcesForBoundary(destination, boundaryResources) { - didWrite = false; - boundaryResources.forEach(flushStyleTagsLateForBoundary, destination); + case 'script': + return pushScript(target, props, responseState, textEmbedded, formatContext.noscriptTagInScope) ; - if (didWrite) { - return writeChunkAndReturn(destination, styleTagTemplateClose); - } else { - return true; - } -} -var precedencePlaceholderStart = stringToPrecomputedChunk('<style data-precedence="'); -var precedencePlaceholderEnd = stringToPrecomputedChunk('"></style>'); + case 'meta': + return pushMeta(target, props, responseState, textEmbedded, formatContext.noscriptTagInScope); -function flushResourceInPreamble(resource) { - if ((resource.state & (Flushed | Blocked)) === NoState) { - var chunks = resource.chunks; + case 'base': + return pushBase(target, props, responseState, textEmbedded, formatContext.noscriptTagInScope); + // Newline eating tags - for (var i = 0; i < chunks.length; i++) { - writeChunk(this, chunks[i]); - } + case 'listing': + case 'pre': + { + return pushStartPreformattedElement(target, props, type, responseState); + } + // Omitted close tags + + case 'area': + case 'br': + case 'col': + case 'embed': + case 'hr': + case 'img': + case 'keygen': + case 'param': + case 'source': + case 'track': + case 'wbr': + { + return pushSelfClosing(target, props, type, responseState); + } + // These are reserved SVG and MathML elements, that are never custom elements. + // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts - resource.state |= FlushedInPreamble; - } -} + case 'annotation-xml': + case 'color-profile': + case 'font-face': + case 'font-face-src': + case 'font-face-uri': + case 'font-face-format': + case 'font-face-name': + case 'missing-glyph': + { + return pushStartGenericElement(target, props, type, responseState); + } + // Preamble start tags -function flushResourceLate(resource) { - if ((resource.state & Flushed) === NoState) { - var chunks = resource.chunks; + case 'head': + return pushStartHead(target, preamble, props, type, responseState); - for (var i = 0; i < chunks.length; i++) { - writeChunk(this, chunks[i]); - } + case 'html': + { + return pushStartHtml(target, preamble, props, type, responseState, formatContext); + } - resource.state |= FlushedLate; + default: + { + if (type.indexOf('-') === -1 && typeof props.is !== 'string') { + // Generic element + return pushStartGenericElement(target, props, type, responseState); + } else { + // Custom element + return pushStartCustomElement(target, props, type, responseState); + } + } } } +var endTag1 = stringToPrecomputedChunk('</'); +var endTag2 = stringToPrecomputedChunk('>'); +function pushEndInstance(target, postamble, type, props) { + switch (type) { + // When float is on we expect title and script tags to always be pushed in + // a unit and never return children. when we end up pushing the end tag we + // want to ensure there is no extra closing tag pushed + case 'title': + case 'script': + // Omitted close tags + // TODO: Instead of repeating this switch we could try to pass a flag from above. + // That would require returning a tuple. Which might be ok if it gets inlined. + // eslint-disable-next-line-no-fallthrough -var didFlush = false; - -function flushUnblockedStyle(resource, key, set) { - var chunks = resource.chunks; - - if (resource.state & Flushed) { - // In theory this should never happen because we clear from the - // Set on flush but to ensure correct semantics we don't emit - // anything if we are in this state. - set.delete(resource); - } else if (resource.state & Blocked) ; else { - didFlush = true; // We can emit this style or stylesheet as is. - - if (resource.type === 'stylesheet') { - // We still need to encode stylesheet chunks - // because unlike most Hoistables and Resources we do not eagerly encode - // them during render. This is because if we flush late we have to send a - // different encoding and we don't want to encode multiple times - pushLinkImpl(chunks, resource.props); - } + case 'area': + case 'base': + case 'br': + case 'col': + case 'embed': + case 'hr': + case 'img': + case 'input': + case 'keygen': + case 'link': + case 'meta': + case 'param': + case 'source': + case 'track': + case 'wbr': + { + // No close tag needed. + return; + } + // Postamble end tags - for (var i = 0; i < chunks.length; i++) { - writeChunk(this, chunks[i]); - } + case 'body': + { + { + postamble.unshift(endTag1, stringToChunk(type), endTag2); + return; + } + } - resource.state |= FlushedInPreamble; - set.delete(resource); + case 'html': + { + postamble.push(endTag1, stringToChunk(type), endTag2); + return; + } } -} -function flushUnblockedStyles(set, precedence) { - didFlush = false; - set.forEach(flushUnblockedStyle, this); - - if (!didFlush) { - // if we did not flush anything for this precedence slot we emit - // an empty <style data-precedence="..." /> tag to ensure the - // precedence remains in the correct order - writeChunk(this, precedencePlaceholderStart); - writeChunk(this, stringToChunk(escapeTextForBrowser(precedence))); - writeChunk(this, precedencePlaceholderEnd); - } + target.push(endTag1, stringToChunk(type), endTag2); } +function writeCompletedRoot(destination, responseState) { + var bootstrapChunks = responseState.bootstrapChunks; + var i = 0; -function preloadBlockedStyle(resource) { - // The only Resources that should remain are Blocked resources - { - if ((resource.state & Blocked) === NoState) { - error('React encountered a Stylesheet Resource that was not Blocked when it was expected to be. This is a bug in React.'); - } else if (resource.state & PreloadFlushed) { - error('React encountered a Stylesheet Resource that already flushed a Preload when it was not expected to. This is a bug in React.'); - } + for (; i < bootstrapChunks.length - 1; i++) { + writeChunk(destination, bootstrapChunks[i]); } - if (resource.type === 'style') { - // <style> tags do not need to be preloaded - return; + if (i < bootstrapChunks.length) { + return writeChunkAndReturn(destination, bootstrapChunks[i]); } - var chunks = resource.chunks; - var preloadProps = preloadAsStylePropsFromProps(resource.props.href, resource.props); - pushLinkImpl(chunks, preloadProps); - - for (var i = 0; i < chunks.length; i++) { - writeChunk(this, chunks[i]); - } + return true; +} // Structural Nodes +// A placeholder is a node inside a hidden partial tree that can be filled in later, but before +// display. It's never visible to users. We use the template tag because it can be used in every +// type of parent. <script> tags also work in every other tag except <colgroup>. - resource.state |= PreloadFlushed; - chunks.length = 0; -} +var placeholder1 = stringToPrecomputedChunk('<template id="'); +var placeholder2 = stringToPrecomputedChunk('"></template>'); +function writePlaceholder(destination, responseState, id) { + writeChunk(destination, placeholder1); + writeChunk(destination, responseState.placeholderPrefix); + var formattedID = stringToChunk(id.toString(16)); + writeChunk(destination, formattedID); + return writeChunkAndReturn(destination, placeholder2); +} // Suspense boundaries are encoded as comments. -function preloadBlockedStyles(set, precedence) { - set.forEach(preloadBlockedStyle, this); - set.clear(); +var startCompletedSuspenseBoundary = stringToPrecomputedChunk('<!--$-->'); +var startPendingSuspenseBoundary1 = stringToPrecomputedChunk('<!--$?--><template id="'); +var startPendingSuspenseBoundary2 = stringToPrecomputedChunk('"></template>'); +var startClientRenderedSuspenseBoundary = stringToPrecomputedChunk('<!--$!-->'); +var endSuspenseBoundary = stringToPrecomputedChunk('<!--/$-->'); +var clientRenderedSuspenseBoundaryError1 = stringToPrecomputedChunk('<template'); +var clientRenderedSuspenseBoundaryErrorAttrInterstitial = stringToPrecomputedChunk('"'); +var clientRenderedSuspenseBoundaryError1A = stringToPrecomputedChunk(' data-dgst="'); +var clientRenderedSuspenseBoundaryError1B = stringToPrecomputedChunk(' data-msg="'); +var clientRenderedSuspenseBoundaryError1C = stringToPrecomputedChunk(' data-stck="'); +var clientRenderedSuspenseBoundaryError2 = stringToPrecomputedChunk('></template>'); +function writeStartCompletedSuspenseBoundary(destination, responseState) { + return writeChunkAndReturn(destination, startCompletedSuspenseBoundary); } +function writeStartPendingSuspenseBoundary(destination, responseState, id) { + writeChunk(destination, startPendingSuspenseBoundary1); -function preloadLateStyle(resource) { - { - if (resource.state & PreloadFlushed) { - error('React encountered a Stylesheet Resource that already flushed a Preload when it was not expected to. This is a bug in React.'); - } - } - - if (resource.type === 'style') { - // <style> tags do not need to be preloaded - return; - } - - var chunks = resource.chunks; - var preloadProps = preloadAsStylePropsFromProps(resource.props.href, resource.props); - pushLinkImpl(chunks, preloadProps); - - for (var i = 0; i < chunks.length; i++) { - writeChunk(this, chunks[i]); + if (id === null) { + throw new Error('An ID must have been assigned before we can complete the boundary.'); } - resource.state |= PreloadFlushed; - chunks.length = 0; + writeChunk(destination, id); + return writeChunkAndReturn(destination, startPendingSuspenseBoundary2); } +function writeStartClientRenderedSuspenseBoundary(destination, responseState, errorDigest, errorMesssage, errorComponentStack) { + var result; + result = writeChunkAndReturn(destination, startClientRenderedSuspenseBoundary); + writeChunk(destination, clientRenderedSuspenseBoundaryError1); -function preloadLateStyles(set, precedence) { - set.forEach(preloadLateStyle, this); - set.clear(); -} // We don't bother reporting backpressure at the moment because we expect to -// flush the entire preamble in a single pass. This probably should be modified -// in the future to be backpressure sensitive but that requires a larger refactor -// of the flushing code in Fizz. - - -function writePreamble(destination, resources, responseState, willFlushAllSegments) { - - var htmlChunks = responseState.htmlChunks; - var headChunks = responseState.headChunks; - var i = 0; // Emit open tags before Hoistables and Resources + if (errorDigest) { + writeChunk(destination, clientRenderedSuspenseBoundaryError1A); + writeChunk(destination, stringToChunk(escapeTextForBrowser(errorDigest))); + writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial); + } - if (htmlChunks) { - // We have an <html> to emit as part of the preamble - for (i = 0; i < htmlChunks.length; i++) { - writeChunk(destination, htmlChunks[i]); + { + if (errorMesssage) { + writeChunk(destination, clientRenderedSuspenseBoundaryError1B); + writeChunk(destination, stringToChunk(escapeTextForBrowser(errorMesssage))); + writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial); } - if (headChunks) { - for (i = 0; i < headChunks.length; i++) { - writeChunk(destination, headChunks[i]); - } - } else { - // We did not render a head but we emitted an <html> so we emit one now - writeChunk(destination, startChunkForTag('head')); - writeChunk(destination, endOfStartTag); - } - } else if (headChunks) { - // We do not have an <html> but we do have a <head> - for (i = 0; i < headChunks.length; i++) { - writeChunk(destination, headChunks[i]); + if (errorComponentStack) { + writeChunk(destination, clientRenderedSuspenseBoundaryError1C); + writeChunk(destination, stringToChunk(escapeTextForBrowser(errorComponentStack))); + writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial); } - } // Emit high priority Hoistables - - - var charsetChunks = responseState.charsetChunks; - - for (i = 0; i < charsetChunks.length; i++) { - writeChunk(destination, charsetChunks[i]); } - charsetChunks.length = 0; - var preconnectChunks = responseState.preconnectChunks; - - for (i = 0; i < preconnectChunks.length; i++) { - writeChunk(destination, preconnectChunks[i]); - } - - preconnectChunks.length = 0; - resources.fontPreloads.forEach(flushResourceInPreamble, destination); - resources.fontPreloads.clear(); // Flush unblocked stylesheets by precedence - - resources.precedences.forEach(flushUnblockedStyles, destination); // Flush preloads for Blocked stylesheets - - resources.precedences.forEach(preloadBlockedStyles, destination); - resources.usedStylesheets.forEach(function (resource) { - var key = getResourceKey(resource.props.as, resource.props.href); - - if (resources.stylesMap.has(key)) ; else { - var chunks = resource.chunks; - - for (i = 0; i < chunks.length; i++) { - writeChunk(destination, chunks[i]); + result = writeChunkAndReturn(destination, clientRenderedSuspenseBoundaryError2); + return result; +} +function writeEndCompletedSuspenseBoundary(destination, responseState) { + return writeChunkAndReturn(destination, endSuspenseBoundary); +} +function writeEndPendingSuspenseBoundary(destination, responseState) { + return writeChunkAndReturn(destination, endSuspenseBoundary); +} +function writeEndClientRenderedSuspenseBoundary(destination, responseState) { + return writeChunkAndReturn(destination, endSuspenseBoundary); +} +var startSegmentHTML = stringToPrecomputedChunk('<div hidden id="'); +var startSegmentHTML2 = stringToPrecomputedChunk('">'); +var endSegmentHTML = stringToPrecomputedChunk('</div>'); +var startSegmentSVG = stringToPrecomputedChunk('<svg aria-hidden="true" style="display:none" id="'); +var startSegmentSVG2 = stringToPrecomputedChunk('">'); +var endSegmentSVG = stringToPrecomputedChunk('</svg>'); +var startSegmentMathML = stringToPrecomputedChunk('<math aria-hidden="true" style="display:none" id="'); +var startSegmentMathML2 = stringToPrecomputedChunk('">'); +var endSegmentMathML = stringToPrecomputedChunk('</math>'); +var startSegmentTable = stringToPrecomputedChunk('<table hidden id="'); +var startSegmentTable2 = stringToPrecomputedChunk('">'); +var endSegmentTable = stringToPrecomputedChunk('</table>'); +var startSegmentTableBody = stringToPrecomputedChunk('<table hidden><tbody id="'); +var startSegmentTableBody2 = stringToPrecomputedChunk('">'); +var endSegmentTableBody = stringToPrecomputedChunk('</tbody></table>'); +var startSegmentTableRow = stringToPrecomputedChunk('<table hidden><tr id="'); +var startSegmentTableRow2 = stringToPrecomputedChunk('">'); +var endSegmentTableRow = stringToPrecomputedChunk('</tr></table>'); +var startSegmentColGroup = stringToPrecomputedChunk('<table hidden><colgroup id="'); +var startSegmentColGroup2 = stringToPrecomputedChunk('">'); +var endSegmentColGroup = stringToPrecomputedChunk('</colgroup></table>'); +function writeStartSegment(destination, responseState, formatContext, id) { + switch (formatContext.insertionMode) { + case ROOT_HTML_MODE: + case HTML_MODE: + { + writeChunk(destination, startSegmentHTML); + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, stringToChunk(id.toString(16))); + return writeChunkAndReturn(destination, startSegmentHTML2); } - } - }); - resources.usedStylesheets.clear(); - resources.scripts.forEach(flushResourceInPreamble, destination); - resources.scripts.clear(); - resources.usedScripts.forEach(flushResourceInPreamble, destination); - resources.usedScripts.clear(); - resources.explicitStylesheetPreloads.forEach(flushResourceInPreamble, destination); - resources.explicitStylesheetPreloads.clear(); - resources.explicitScriptPreloads.forEach(flushResourceInPreamble, destination); - resources.explicitScriptPreloads.clear(); - resources.explicitOtherPreloads.forEach(flushResourceInPreamble, destination); - resources.explicitOtherPreloads.clear(); // Write embedding preloadChunks - - var preloadChunks = responseState.preloadChunks; - for (i = 0; i < preloadChunks.length; i++) { - writeChunk(destination, preloadChunks[i]); - } - - preloadChunks.length = 0; // Write embedding hoistableChunks - - var hoistableChunks = responseState.hoistableChunks; + case SVG_MODE: + { + writeChunk(destination, startSegmentSVG); + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, stringToChunk(id.toString(16))); + return writeChunkAndReturn(destination, startSegmentSVG2); + } - for (i = 0; i < hoistableChunks.length; i++) { - writeChunk(destination, hoistableChunks[i]); - } + case MATHML_MODE: + { + writeChunk(destination, startSegmentMathML); + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, stringToChunk(id.toString(16))); + return writeChunkAndReturn(destination, startSegmentMathML2); + } - hoistableChunks.length = 0; // Flush closing head if necessary + case HTML_TABLE_MODE: + { + writeChunk(destination, startSegmentTable); + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, stringToChunk(id.toString(16))); + return writeChunkAndReturn(destination, startSegmentTable2); + } + // TODO: For the rest of these, there will be extra wrapper nodes that never + // get deleted from the document. We need to delete the table too as part + // of the injected scripts. They are invisible though so it's not too terrible + // and it's kind of an edge case to suspend in a table. Totally supported though. - if (htmlChunks && headChunks === null) { - // We have an <html> rendered but no <head> rendered. We however inserted - // a <head> up above so we need to emit the </head> now. This is safe because - // if the main content contained the </head> it would also have provided a - // <head>. This means that all the content inside <html> is either <body> or - // invalid HTML - writeChunk(destination, endTag1); - writeChunk(destination, stringToChunk('head')); - writeChunk(destination, endTag2); - } -} // We don't bother reporting backpressure at the moment because we expect to -// flush the entire preamble in a single pass. This probably should be modified -// in the future to be backpressure sensitive but that requires a larger refactor -// of the flushing code in Fizz. + case HTML_TABLE_BODY_MODE: + { + writeChunk(destination, startSegmentTableBody); + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, stringToChunk(id.toString(16))); + return writeChunkAndReturn(destination, startSegmentTableBody2); + } -function writeHoistables(destination, resources, responseState) { - var i = 0; // Emit high priority Hoistables - // We omit charsetChunks because we have already sent the shell and if it wasn't - // already sent it is too late now. + case HTML_TABLE_ROW_MODE: + { + writeChunk(destination, startSegmentTableRow); + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, stringToChunk(id.toString(16))); + return writeChunkAndReturn(destination, startSegmentTableRow2); + } - var preconnectChunks = responseState.preconnectChunks; + case HTML_COLGROUP_MODE: + { + writeChunk(destination, startSegmentColGroup); + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, stringToChunk(id.toString(16))); + return writeChunkAndReturn(destination, startSegmentColGroup2); + } - for (i = 0; i < preconnectChunks.length; i++) { - writeChunk(destination, preconnectChunks[i]); + default: + { + throw new Error('Unknown insertion mode. This is a bug in React.'); + } } - - preconnectChunks.length = 0; - resources.fontPreloads.forEach(flushResourceLate, destination); - resources.fontPreloads.clear(); // Preload any stylesheets. these will emit in a render instruction that follows this - // but we want to kick off preloading as soon as possible - - resources.precedences.forEach(preloadLateStyles, destination); - resources.usedStylesheets.forEach(function (resource) { - var key = getResourceKey(resource.props.as, resource.props.href); - - if (resources.stylesMap.has(key)) ; else { - var chunks = resource.chunks; - - for (i = 0; i < chunks.length; i++) { - writeChunk(destination, chunks[i]); +} +function writeEndSegment(destination, formatContext) { + switch (formatContext.insertionMode) { + case ROOT_HTML_MODE: + case HTML_MODE: + { + return writeChunkAndReturn(destination, endSegmentHTML); } - } - }); - resources.usedStylesheets.clear(); - resources.scripts.forEach(flushResourceLate, destination); - resources.scripts.clear(); - resources.usedScripts.forEach(flushResourceLate, destination); - resources.usedScripts.clear(); - resources.explicitStylesheetPreloads.forEach(flushResourceLate, destination); - resources.explicitStylesheetPreloads.clear(); - resources.explicitScriptPreloads.forEach(flushResourceLate, destination); - resources.explicitScriptPreloads.clear(); - resources.explicitOtherPreloads.forEach(flushResourceLate, destination); - resources.explicitOtherPreloads.clear(); // Write embedding preloadChunks - var preloadChunks = responseState.preloadChunks; + case SVG_MODE: + { + return writeChunkAndReturn(destination, endSegmentSVG); + } - for (i = 0; i < preloadChunks.length; i++) { - writeChunk(destination, preloadChunks[i]); - } + case MATHML_MODE: + { + return writeChunkAndReturn(destination, endSegmentMathML); + } - preloadChunks.length = 0; // Write embedding hoistableChunks + case HTML_TABLE_MODE: + { + return writeChunkAndReturn(destination, endSegmentTable); + } - var hoistableChunks = responseState.hoistableChunks; + case HTML_TABLE_BODY_MODE: + { + return writeChunkAndReturn(destination, endSegmentTableBody); + } - for (i = 0; i < hoistableChunks.length; i++) { - writeChunk(destination, hoistableChunks[i]); - } + case HTML_TABLE_ROW_MODE: + { + return writeChunkAndReturn(destination, endSegmentTableRow); + } - hoistableChunks.length = 0; -} -function writePostamble(destination, responseState) { - if (responseState.hasBody) { - writeChunk(destination, endTag1); - writeChunk(destination, stringToChunk('body')); - writeChunk(destination, endTag2); - } + case HTML_COLGROUP_MODE: + { + return writeChunkAndReturn(destination, endSegmentColGroup); + } - if (responseState.htmlChunks) { - writeChunk(destination, endTag1); - writeChunk(destination, stringToChunk('html')); - writeChunk(destination, endTag2); + default: + { + throw new Error('Unknown insertion mode. This is a bug in React.'); + } } } +var completeSegmentScript1Full = stringToPrecomputedChunk(completeSegment + ';$RS("'); +var completeSegmentScript1Partial = stringToPrecomputedChunk('$RS("'); +var completeSegmentScript2 = stringToPrecomputedChunk('","'); +var completeSegmentScriptEnd = stringToPrecomputedChunk('")</script>'); +var completeSegmentData1 = stringToPrecomputedChunk('<template data-rsi="" data-sid="'); +var completeSegmentData2 = stringToPrecomputedChunk('" data-pid="'); +function writeCompletedSegmentInstruction(destination, responseState, contentSegmentID) { -function hasStyleResourceDependencies(boundaryResources) { - var iter = boundaryResources.values(); // At the moment boundaries only accumulate style resources - // so we assume the type is correct and don't check it - - while (true) { - var _iter$next = iter.next(), - resource = _iter$next.value; - - if (!resource) break; // If every style Resource flushed in the shell we do not need to send - // any dependencies + { + writeChunk(destination, responseState.startInlineScript); - if ((resource.state & FlushedInPreamble) === NoState) { - return true; + if (!responseState.sentCompleteSegmentFunction) { + // The first time we write this, we'll need to include the full implementation. + responseState.sentCompleteSegmentFunction = true; + writeChunk(destination, completeSegmentScript1Full); + } else { + // Future calls can just reuse the same function. + writeChunk(destination, completeSegmentScript1Partial); } - } - - return false; -} - -var arrayFirstOpenBracket = stringToPrecomputedChunk('['); -var arraySubsequentOpenBracket = stringToPrecomputedChunk(',['); -var arrayInterstitial = stringToPrecomputedChunk(','); -var arrayCloseBracket = stringToPrecomputedChunk(']'); // This function writes a 2D array of strings to be embedded in javascript. -// E.g. -// [["JS_escaped_string1", "JS_escaped_string2"]] + } // Write function arguments, which are string literals -function writeStyleResourceDependenciesInJS(destination, boundaryResources) { - writeChunk(destination, arrayFirstOpenBracket); - var nextArrayOpenBrackChunk = arrayFirstOpenBracket; - boundaryResources.forEach(function (resource) { - if (resource.state & FlushedInPreamble) ; else if (resource.state & Flushed) { - // We only need to emit the href because this resource flushed in an earlier - // boundary already which encoded the attributes necessary to construct - // the resource instance on the client. - writeChunk(destination, nextArrayOpenBrackChunk); - writeStyleResourceDependencyHrefOnlyInJS(destination, resource.type === 'style' ? resource.props['data-href'] : resource.props.href); - writeChunk(destination, arrayCloseBracket); - nextArrayOpenBrackChunk = arraySubsequentOpenBracket; - } else if (resource.type === 'stylesheet') { - // We need to emit the whole resource for insertion on the client - writeChunk(destination, nextArrayOpenBrackChunk); - writeStyleResourceDependencyInJS(destination, resource.props.href, resource.props['data-precedence'], resource.props); - writeChunk(destination, arrayCloseBracket); - nextArrayOpenBrackChunk = arraySubsequentOpenBracket; - resource.state |= FlushedLate; - } - }); - writeChunk(destination, arrayCloseBracket); -} -/* Helper functions */ + writeChunk(destination, responseState.segmentPrefix); + var formattedID = stringToChunk(contentSegmentID.toString(16)); + writeChunk(destination, formattedID); -function writeStyleResourceDependencyHrefOnlyInJS(destination, href) { - // We should actually enforce this earlier when the resource is created but for - // now we make sure we are actually dealing with a string here. { - checkAttributeStringCoercion(href, 'href'); + writeChunk(destination, completeSegmentScript2); } - var coercedHref = '' + href; - writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedHref))); -} + writeChunk(destination, responseState.placeholderPrefix); + writeChunk(destination, formattedID); -function writeStyleResourceDependencyInJS(destination, href, precedence, props) { { - checkAttributeStringCoercion(href, 'href'); + return writeChunkAndReturn(destination, completeSegmentScriptEnd); } - - var coercedHref = '' + href; - sanitizeURL(coercedHref); - writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedHref))); +} +var completeBoundaryScript1Full = stringToPrecomputedChunk(completeBoundary + ';$RC("'); +var completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC("'); +var completeBoundaryWithStylesScript1FullBoth = stringToPrecomputedChunk(completeBoundary + ';' + completeBoundaryWithStyles + ';$RR("'); +var completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk(completeBoundaryWithStyles + ';$RR("'); +var completeBoundaryWithStylesScript1Partial = stringToPrecomputedChunk('$RR("'); +var completeBoundaryScript2 = stringToPrecomputedChunk('","'); +var completeBoundaryScript3a = stringToPrecomputedChunk('",'); +var completeBoundaryScript3b = stringToPrecomputedChunk('"'); +var completeBoundaryScriptEnd = stringToPrecomputedChunk(')</script>'); +var completeBoundaryData1 = stringToPrecomputedChunk('<template data-rci="" data-bid="'); +var completeBoundaryWithStylesData1 = stringToPrecomputedChunk('<template data-rri="" data-bid="'); +var completeBoundaryData2 = stringToPrecomputedChunk('" data-sid="'); +var completeBoundaryData3a = stringToPrecomputedChunk('" data-sty="'); +function writeCompletedBoundaryInstruction(destination, responseState, boundaryID, contentSegmentID, boundaryResources) { + var hasStyleDependencies; { - checkAttributeStringCoercion(precedence, 'precedence'); + hasStyleDependencies = hasStyleResourceDependencies(boundaryResources); } - var coercedPrecedence = '' + precedence; - writeChunk(destination, arrayInterstitial); - writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedPrecedence))); - - for (var propKey in props) { - if (hasOwnProperty.call(props, propKey)) { - var propValue = props[propKey]; + { + writeChunk(destination, responseState.startInlineScript); - if (propValue == null) { - continue; + if ( hasStyleDependencies) { + if (!responseState.sentCompleteBoundaryFunction) { + responseState.sentCompleteBoundaryFunction = true; + responseState.sentStyleInsertionFunction = true; + writeChunk(destination, clonePrecomputedChunk(completeBoundaryWithStylesScript1FullBoth)); + } else if (!responseState.sentStyleInsertionFunction) { + responseState.sentStyleInsertionFunction = true; + writeChunk(destination, completeBoundaryWithStylesScript1FullPartial); + } else { + writeChunk(destination, completeBoundaryWithStylesScript1Partial); } - - switch (propKey) { - case 'href': - case 'rel': - case 'precedence': - case 'data-precedence': - { - break; - } - - case 'children': - case 'dangerouslySetInnerHTML': - throw new Error('link' + " is a self-closing tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.'); - // eslint-disable-next-line-no-fallthrough - - default: - writeStyleResourceAttributeInJS(destination, propKey, propValue); - break; + } else { + if (!responseState.sentCompleteBoundaryFunction) { + responseState.sentCompleteBoundaryFunction = true; + writeChunk(destination, completeBoundaryScript1Full); + } else { + writeChunk(destination, completeBoundaryScript1Partial); } } } - return null; -} - -function writeStyleResourceAttributeInJS(destination, name, value) // not null or undefined -{ - var attributeName = name.toLowerCase(); - var attributeValue; - - switch (typeof value) { - case 'function': - case 'symbol': - return; - } - - switch (name) { - // Reserved names - case 'innerHTML': - case 'dangerouslySetInnerHTML': - case 'suppressContentEditableWarning': - case 'suppressHydrationWarning': - case 'style': - // Ignored - return; - // Attribute renames + if (boundaryID === null) { + throw new Error('An ID must have been assigned before we can complete the boundary.'); + } // Write function arguments, which are string and array literals - case 'className': - attributeName = 'class'; - break; - // Booleans - case 'hidden': - if (value === false) { - return; - } + var formattedContentID = stringToChunk(contentSegmentID.toString(16)); + writeChunk(destination, boundaryID); - attributeValue = ''; - break; - // Santized URLs + { + writeChunk(destination, completeBoundaryScript2); + } - case 'src': - case 'href': - { - { - checkAttributeStringCoercion(value, attributeName); - } + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, formattedContentID); - attributeValue = '' + value; - sanitizeURL(attributeValue); - break; - } + if ( hasStyleDependencies) { + // Script and data writers must format this differently: + // - script writer emits an array literal, whose string elements are + // escaped for javascript e.g. ["A", "B"] + // - data writer emits a string literal, which is escaped as html + // e.g. ["A", "B"] + { + writeChunk(destination, completeBoundaryScript3a); // boundaryResources encodes an array literal - default: - { - if (!isAttributeNameSafe(name)) { - return; - } - } + writeStyleResourceDependenciesInJS(destination, boundaryResources); + } + } else { + { + writeChunk(destination, completeBoundaryScript3b); + } } - if ( // shouldIgnoreAttribute - // We have already filtered out null/undefined and reserved words. - name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) { - return; + { + return writeChunkAndReturn(destination, completeBoundaryScriptEnd); } +} +var clientRenderScript1Full = stringToPrecomputedChunk(clientRenderBoundary + ';$RX("'); +var clientRenderScript1Partial = stringToPrecomputedChunk('$RX("'); +var clientRenderScript1A = stringToPrecomputedChunk('"'); +var clientRenderErrorScriptArgInterstitial = stringToPrecomputedChunk(','); +var clientRenderScriptEnd = stringToPrecomputedChunk(')</script>'); +var clientRenderData1 = stringToPrecomputedChunk('<template data-rxi="" data-bid="'); +var clientRenderData2 = stringToPrecomputedChunk('" data-dgst="'); +var clientRenderData3 = stringToPrecomputedChunk('" data-msg="'); +var clientRenderData4 = stringToPrecomputedChunk('" data-stck="'); +function writeClientRenderBoundaryInstruction(destination, responseState, boundaryID, errorDigest, errorMessage, errorComponentStack) { { - checkAttributeStringCoercion(value, attributeName); - } + writeChunk(destination, responseState.startInlineScript); - attributeValue = '' + value; - writeChunk(destination, arrayInterstitial); - writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(attributeName))); - writeChunk(destination, arrayInterstitial); - writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(attributeValue))); -} // This function writes a 2D array of strings to be embedded in an attribute -/** - * Resources - */ + if (!responseState.sentClientRenderFunction) { + // The first time we write this, we'll need to include the full implementation. + responseState.sentClientRenderFunction = true; + writeChunk(destination, clientRenderScript1Full); + } else { + // Future calls can just reuse the same function. + writeChunk(destination, clientRenderScript1Partial); + } + } + if (boundaryID === null) { + throw new Error('An ID must have been assigned before we can complete the boundary.'); + } -var NoState -/* */ -= 0; // These tags indicate whether the Resource was flushed and in which phase - -var FlushedInPreamble -/* */ -= 1; -var FlushedLate -/* */ -= 2; -var Flushed -/* */ -= 3; // This tag indicates whether this Resource is blocked from flushing. -// This currently is only used with stylesheets that are blocked by a Boundary - -var Blocked -/* */ -= 4; // This tag indicates whether this Resource has been preloaded. -// This generally only makes sense for Resources other than PreloadResource - -var PreloadFlushed -/* */ -= 8; // Dev extensions. -// Stylesheets and Scripts rendered with jsx -// Preloads, Stylesheets, and Scripts from ReactDOM.preload or ReactDOM.preinit -// Preloads created for normal components we rendered but know we can preload early such as -// sync Scripts and stylesheets without precedence or with onLoad/onError handlers -// @TODO add bootstrap script to implicit preloads + writeChunk(destination, boundaryID); -function createResources() { - return { - // persistent - preloadsMap: new Map(), - stylesMap: new Map(), - scriptsMap: new Map(), - // cleared on flush - fontPreloads: new Set(), - // usedImagePreloads: new Set(), - precedences: new Map(), - usedStylesheets: new Set(), - scripts: new Set(), - usedScripts: new Set(), - explicitStylesheetPreloads: new Set(), - // explicitImagePreloads: new Set(), - explicitScriptPreloads: new Set(), - explicitOtherPreloads: new Set(), - // like a module global for currently rendering boundary - boundaryResources: null - }; -} -function createBoundaryResources() { - return new Set(); -} -function setCurrentlyRenderingBoundaryResourcesTarget(resources, boundaryResources) { - resources.boundaryResources = boundaryResources; -} + { + // " needs to be inserted for scripts, since ArgInterstitual does not contain + // leading or trailing quotes + writeChunk(destination, clientRenderScript1A); + } -function getResourceKey(as, href) { - return "[" + as + "]" + href; -} + if (errorDigest || errorMessage || errorComponentStack) { + { + // ,"JSONString" + writeChunk(destination, clientRenderErrorScriptArgInterstitial); + writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorDigest || ''))); + } + } -function preload(href, options) { - if (!currentResources) { - // While we expect that preload calls are primarily going to be observed - // during render because effects and events don't run on the server it is - // still possible that these get called in module scope. This is valid on - // the client since there is still a document to interact with but on the - // server we need a request to associate the call to. Because of this we - // simply return and do not warn. - return; + if (errorMessage || errorComponentStack) { + { + // ,"JSONString" + writeChunk(destination, clientRenderErrorScriptArgInterstitial); + writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorMessage || ''))); + } } - var resources = currentResources; + if (errorComponentStack) { + // ,"JSONString" + { + writeChunk(destination, clientRenderErrorScriptArgInterstitial); + writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorComponentStack))); + } + } { - if (typeof href !== 'string' || !href) { - error('ReactDOM.preload(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.', getValueDescriptorExpectingObjectForWarning(href)); - } else if (options == null || typeof options !== 'object') { - error('ReactDOM.preload(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preloaded but encountered %s instead.', getValueDescriptorExpectingEnumForWarning(options)); - } else if (typeof options.as !== 'string') { - error('ReactDOM.preload(): Expected the `as` property in the `options` argument (second) to contain a string value describing the type of resource to be preloaded but encountered %s instead. Values that are valid in for the `as` attribute of a `<link rel="preload" as="..." />` tag are valid here.', getValueDescriptorExpectingEnumForWarning(options.as)); - } + // ></script> + return writeChunkAndReturn(destination, clientRenderScriptEnd); } +} +var regexForJSStringsInInstructionScripts = /[<\u2028\u2029]/g; - if (typeof href === 'string' && href && typeof options === 'object' && options !== null && typeof options.as === 'string') { - var as = options.as; - var key = getResourceKey(as, href); - var resource = resources.preloadsMap.get(key); +function escapeJSStringsForInstructionScripts(input) { + var escaped = JSON.stringify(input); + return escaped.replace(regexForJSStringsInInstructionScripts, function (match) { + switch (match) { + // santizing breaking out of strings and script tags + case '<': + return "\\u003c"; - { - var devResource = getAsResourceDEV(resource); + case "\u2028": + return "\\u2028"; - if (devResource) { - switch (devResource.__provenance) { - case 'preload': - { - var differenceDescription = describeDifferencesForPreloads(options, devResource.__originalOptions); + case "\u2029": + return "\\u2029"; - if (differenceDescription) { - error('ReactDOM.preload(): The options provided conflict with another call to `ReactDOM.preload("%s", { as: "%s", ...})`.' + ' React will always use the options it first encounters when preloading a resource for a given `href` and `as` type, and any later options will be ignored if different.' + ' Try updating all calls to `ReactDOM.preload()` with the same `href` and `as` type to use the same options, or eliminate one of the calls.%s', href, as, differenceDescription); - } + default: + { + // eslint-disable-next-line react-internal/prod-error-codes + throw new Error('escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React'); + } + } + }); +} - break; - } +var regexForJSStringsInScripts = /[&><\u2028\u2029]/g; - case 'implicit': - { - var _differenceDescription3 = describeDifferencesForPreloadOverImplicitPreload(options, devResource.__impliedProps); +function escapeJSObjectForInstructionScripts(input) { + var escaped = JSON.stringify(input); + return escaped.replace(regexForJSStringsInScripts, function (match) { + switch (match) { + // santizing breaking out of strings and script tags + case '&': + return "\\u0026"; - if (_differenceDescription3) { - var elementDescription = as === 'style' ? '<link rel="stylesheet" ... />' : as === 'script' ? '<script ... />' : null; + case '>': + return "\\u003e"; - if (elementDescription) { - error('ReactDOM.preload(): For `href` "%s", The options provided conflict with props on a matching %s element. When the preload' + ' options disagree with the underlying resource it usually means the browser will not be able to use the preload when the resource' + ' is fetched, negating any benefit the preload would provide. React will preload the resource using props derived from the resource instead' + ' and ignore the options provided to the `ReactDOM.preload()` call. In general, preloading is useful when you expect to' + ' render a resource soon but have not yet done so. In this case since the underlying resource was already rendered the preload call' + ' may be extraneous. Try removing the call, otherwise try adjusting both the props on the %s and the options' + ' passed to `ReactDOM.preload()` to agree.%s', href, elementDescription, elementDescription, _differenceDescription3); - } - } + case '<': + return "\\u003c"; - break; - } + case "\u2028": + return "\\u2028"; + + case "\u2029": + return "\\u2029"; + + default: + { + // eslint-disable-next-line react-internal/prod-error-codes + throw new Error('escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React'); } - } } + }); +} - if (!resource) { - resource = { - type: 'preload', - chunks: [], - state: NoState, - props: preloadPropsFromPreloadOptions(href, as, options) - }; - resources.preloadsMap.set(key, resource); +var precedencePlaceholderStart = stringToPrecomputedChunk('<style data-precedence="'); +var precedencePlaceholderEnd = stringToPrecomputedChunk('"></style>'); +function writeInitialResources(destination, resources, responseState, willFlushAllSegments) { - { - markAsImperativeResourceDEV(resource, 'preload', href, options, resource.props); - } - pushLinkImpl(resource.chunks, resource.props); + function flushLinkResource(resource) { + if (!resource.flushed) { + pushLinkImpl(target, resource.props, responseState); + resource.flushed = true; } + } - switch (as) { - case 'font': - { - resources.fontPreloads.add(resource); - break; - } + var target = []; + var charset = resources.charset, + bases = resources.bases, + preconnects = resources.preconnects, + fontPreloads = resources.fontPreloads, + precedences = resources.precedences, + usedStylePreloads = resources.usedStylePreloads, + scripts = resources.scripts, + usedScriptPreloads = resources.usedScriptPreloads, + explicitStylePreloads = resources.explicitStylePreloads, + explicitScriptPreloads = resources.explicitScriptPreloads, + headResources = resources.headResources; - case 'style': + if (charset) { + pushSelfClosing(target, charset.props, 'meta', responseState); + charset.flushed = true; + resources.charset = null; + } + + bases.forEach(function (r) { + pushSelfClosing(target, r.props, 'base', responseState); + r.flushed = true; + }); + bases.clear(); + preconnects.forEach(function (r) { + // font preload Resources should not already be flushed so we elide this check + pushLinkImpl(target, r.props, responseState); + r.flushed = true; + }); + preconnects.clear(); + fontPreloads.forEach(function (r) { + // font preload Resources should not already be flushed so we elide this check + pushLinkImpl(target, r.props, responseState); + r.flushed = true; + }); + fontPreloads.clear(); // Flush stylesheets first by earliest precedence + + precedences.forEach(function (p, precedence) { + if (p.size) { + p.forEach(function (r) { + // resources should not already be flushed so we elide this check + pushLinkImpl(target, r.props, responseState); + r.flushed = true; + r.inShell = true; + r.hint.flushed = true; + }); + p.clear(); + } else { + target.push(precedencePlaceholderStart, stringToChunk(escapeTextForBrowser(precedence)), precedencePlaceholderEnd); + } + }); + usedStylePreloads.forEach(flushLinkResource); + usedStylePreloads.clear(); + scripts.forEach(function (r) { + // should never be flushed already + pushScriptImpl(target, r.props, responseState); + r.flushed = true; + r.hint.flushed = true; + }); + scripts.clear(); + usedScriptPreloads.forEach(flushLinkResource); + usedScriptPreloads.clear(); + explicitStylePreloads.forEach(flushLinkResource); + explicitStylePreloads.clear(); + explicitScriptPreloads.forEach(flushLinkResource); + explicitScriptPreloads.clear(); + headResources.forEach(function (r) { + switch (r.type) { + case 'title': { - resources.explicitStylesheetPreloads.add(resource); + pushTitleImpl(target, r.props, responseState); break; } - case 'script': + case 'meta': { - resources.explicitScriptPreloads.add(resource); + pushSelfClosing(target, r.props, 'meta', responseState); break; } - default: + case 'link': { - resources.explicitOtherPreloads.add(resource); + pushLinkImpl(target, r.props, responseState); + break; } } - } -} -function preinit(href, options) { - if (!currentResources) { - // While we expect that preinit calls are primarily going to be observed - // during render because effects and events don't run on the server it is - // still possible that these get called in module scope. This is valid on - // the client since there is still a document to interact with but on the - // server we need a request to associate the call to. Because of this we - // simply return and do not warn. - return; - } - preinitImpl(currentResources, href, options); -} // On the server, preinit may be called outside of render when sending an -// external SSR runtime as part of the initial resources payload. Since this -// is an internal React call, we do not need to use the resources stack. + r.flushed = true; + }); + headResources.clear(); + var i; + var r = true; -function preinitImpl(resources, href, options) { - { - if (typeof href !== 'string' || !href) { - error('ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.', getValueDescriptorExpectingObjectForWarning(href)); - } else if (options == null || typeof options !== 'object') { - error('ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.', getValueDescriptorExpectingEnumForWarning(options)); - } else if (options.as !== 'style' && options.as !== 'script') { - error('ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".', getValueDescriptorExpectingEnumForWarning(options.as)); - } + for (i = 0; i < target.length - 1; i++) { + writeChunk(destination, target[i]); } - if (typeof href === 'string' && href && typeof options === 'object' && options !== null) { - var as = options.as; + if (i < target.length) { + r = writeChunkAndReturn(destination, target[i]); + } - switch (as) { - case 'style': + return r; +} +function writeImmediateResources(destination, resources, responseState) { + // $FlowFixMe[missing-local-annot] + function flushLinkResource(resource) { + if (!resource.flushed) { + pushLinkImpl(target, resource.props, responseState); + resource.flushed = true; + } + } + + var target = []; + var charset = resources.charset, + preconnects = resources.preconnects, + fontPreloads = resources.fontPreloads, + usedStylePreloads = resources.usedStylePreloads, + scripts = resources.scripts, + usedScriptPreloads = resources.usedScriptPreloads, + explicitStylePreloads = resources.explicitStylePreloads, + explicitScriptPreloads = resources.explicitScriptPreloads, + headResources = resources.headResources; + + if (charset) { + pushSelfClosing(target, charset.props, 'meta', responseState); + charset.flushed = true; + resources.charset = null; + } + + preconnects.forEach(function (r) { + // font preload Resources should not already be flushed so we elide this check + pushLinkImpl(target, r.props, responseState); + r.flushed = true; + }); + preconnects.clear(); + fontPreloads.forEach(function (r) { + // font preload Resources should not already be flushed so we elide this check + pushLinkImpl(target, r.props, responseState); + r.flushed = true; + }); + fontPreloads.clear(); + usedStylePreloads.forEach(flushLinkResource); + usedStylePreloads.clear(); + scripts.forEach(function (r) { + // should never be flushed already + pushStartGenericElement(target, r.props, 'script', responseState); + pushEndInstance(target, target, 'script', r.props); + r.flushed = true; + r.hint.flushed = true; + }); + scripts.clear(); + usedScriptPreloads.forEach(flushLinkResource); + usedScriptPreloads.clear(); + explicitStylePreloads.forEach(flushLinkResource); + explicitStylePreloads.clear(); + explicitScriptPreloads.forEach(flushLinkResource); + explicitScriptPreloads.clear(); + headResources.forEach(function (r) { + switch (r.type) { + case 'title': { - var key = getResourceKey(as, href); - var resource = resources.stylesMap.get(key); - var precedence = options.precedence || 'default'; - - { - var devResource = getAsResourceDEV(resource); - - if (devResource) { - var resourceProps = stylesheetPropsFromPreinitOptions(href, precedence, options); - - var propsEquivalent = assign({}, resourceProps, _defineProperty({ - precedence: options.precedence - }, 'data-precedence', null)); - - switch (devResource.__provenance) { - case 'rendered': - { - var differenceDescription = describeDifferencesForPreinitOverStylesheet( // Diff the props from the JSX element, not the derived resource props - propsEquivalent, devResource.__originalProps); - - if (differenceDescription) { - error('ReactDOM.preinit(): For `href` "%s", the options provided conflict with props found on a <link rel="stylesheet" precedence="%s" href="%s" .../> that was already rendered.' + ' React will always use the props or options it first encounters for a hoistable stylesheet for a given `href` and any later props or options will be ignored if different.' + ' Generally, ReactDOM.preinit() is useful when you are not yet rendering a stylesheet but you anticipate it will be used soon.' + ' In this case the stylesheet was already rendered so preinitializing it does not provide any additional benefit.' + ' To resolve, try making the props and options agree between the <link rel="stylesheet" .../> and the `ReactDOM.preinit()` call or' + ' remove the `ReactDOM.preinit()` call.%s', href, devResource.__originalProps.precedence, href, differenceDescription); - } - - break; - } - - case 'preinit': - { - var _differenceDescription4 = describeDifferencesForPreinits( // Diff the props from the JSX element, not the derived resource props - propsEquivalent, devResource.__propsEquivalent); - - if (_differenceDescription4) { - error('ReactDOM.preinit(): For `href` "%s", the options provided conflict with another call to `ReactDOM.preinit("%s", { as: "style", ... })`.' + ' React will always use the options it first encounters when preinitializing a hoistable stylesheet for a given `href` and any later options will be ignored if different.' + ' Try updating all calls to `ReactDOM.preinit()` for a given `href` to use the same options, or only call `ReactDOM.preinit()` once per `href`.%s', href, href, _differenceDescription4); - } - - break; - } - } - } - } - - if (!resource) { - resource = { - type: 'stylesheet', - chunks: [], - state: NoState, - props: stylesheetPropsFromPreinitOptions(href, precedence, options) - }; - resources.stylesMap.set(key, resource); - - { - markAsImperativeResourceDEV(resource, 'preinit', href, options, assign({}, resource.props, _defineProperty({ - precedence: precedence - }, 'data-precedence', undefined))); - } - - var precedenceSet = resources.precedences.get(precedence); - - if (!precedenceSet) { - precedenceSet = new Set(); - resources.precedences.set(precedence, precedenceSet); - } - - precedenceSet.add(resource); - } - - return; + pushTitleImpl(target, r.props, responseState); + break; } - case 'script': + case 'meta': { - var src = href; - - var _key = getResourceKey(as, src); - - var _resource3 = resources.scriptsMap.get(_key); - - { - var _devResource = getAsResourceDEV(_resource3); + pushSelfClosing(target, r.props, 'meta', responseState); + break; + } - if (_devResource) { - var _propsEquivalent = scriptPropsFromPreinitOptions(src, options); + case 'link': + { + pushLinkImpl(target, r.props, responseState); + break; + } + } - switch (_devResource.__provenance) { - case 'rendered': - { - var _differenceDescription5 = describeDifferencesForPreinitOverScript( // Diff the props from the JSX element, not the derived resource props - _propsEquivalent, _devResource.__originalProps); + r.flushed = true; + }); + headResources.clear(); + var i; + var r = true; - if (_differenceDescription5) { - error('ReactDOM.preinit(): For `href` "%s", the options provided conflict with props found on a <script async={true} src="%s" .../> that was already rendered.' + ' React will always use the props or options it first encounters for a hoistable script for a given `href` and any later props or options will be ignored if different.' + ' Generally, ReactDOM.preinit() is useful when you are not yet rendering a script but you anticipate it will be used soon and want to go beyond preloading it and have it' + ' execute early. In this case the script was already rendered so preinitializing it does not provide any additional benefit.' + ' To resolve, try making the props and options agree between the <script .../> and the `ReactDOM.preinit()` call or remove the `ReactDOM.preinit()` call.%s', href, href, _differenceDescription5); - } + for (i = 0; i < target.length - 1; i++) { + writeChunk(destination, target[i]); + } - break; - } + if (i < target.length) { + r = writeChunkAndReturn(destination, target[i]); + } - case 'preinit': - { - var _differenceDescription6 = describeDifferencesForPreinits( // Diff the props from the JSX element, not the derived resource props - _propsEquivalent, _devResource.__propsEquivalent); + return r; +} - if (_differenceDescription6) { - error('ReactDOM.preinit(): For `href` "%s", the options provided conflict with another call to `ReactDOM.preinit("%s", { as: "script", ... })`.' + ' React will always use the options it first encounters when preinitializing a hoistable script for a given `href` and any later options will be ignored if different.' + ' Try updating all calls to `ReactDOM.preinit()` for a given `href` to use the same options, or only call `ReactDOM.preinit()` once per `href`.%s', href, href, _differenceDescription6); - } +function hasStyleResourceDependencies(boundaryResources) { + var iter = boundaryResources.values(); // At the moment boundaries only accumulate style resources + // so we assume the type is correct and don't check it - break; - } - } - } - } + while (true) { + var _iter$next = iter.next(), + resource = _iter$next.value; - if (!_resource3) { - _resource3 = { - type: 'script', - chunks: [], - state: NoState, - props: null - }; - resources.scriptsMap.set(_key, _resource3); + if (!resource) break; // If every style Resource flushed in the shell we do not need to send + // any dependencies - var _resourceProps = scriptPropsFromPreinitOptions(src, options); + if (!resource.inShell) { + return true; + } + } - { - markAsImperativeResourceDEV(_resource3, 'preinit', href, options, _resourceProps); - } + return false; +} - resources.scripts.add(_resource3); - pushScriptImpl(_resource3.chunks, _resourceProps); - } +var arrayFirstOpenBracket = stringToPrecomputedChunk('['); +var arraySubsequentOpenBracket = stringToPrecomputedChunk(',['); +var arrayInterstitial = stringToPrecomputedChunk(','); +var arrayCloseBracket = stringToPrecomputedChunk(']'); // This function writes a 2D array of strings to be embedded in javascript. +// E.g. +// [["JS_escaped_string1", "JS_escaped_string2"]] - return; - } +function writeStyleResourceDependenciesInJS(destination, boundaryResources) { + writeChunk(destination, arrayFirstOpenBracket); + var nextArrayOpenBrackChunk = arrayFirstOpenBracket; + boundaryResources.forEach(function (resource) { + if (resource.inShell) ; else if (resource.flushed) { + writeChunk(destination, nextArrayOpenBrackChunk); + writeStyleResourceDependencyHrefOnlyInJS(destination, resource.href); + writeChunk(destination, arrayCloseBracket); + nextArrayOpenBrackChunk = arraySubsequentOpenBracket; + } else { + writeChunk(destination, nextArrayOpenBrackChunk); + writeStyleResourceDependencyInJS(destination, resource.href, resource.precedence, resource.props); + writeChunk(destination, arrayCloseBracket); + nextArrayOpenBrackChunk = arraySubsequentOpenBracket; + resource.flushed = true; + resource.hint.flushed = true; } - } + }); + writeChunk(destination, arrayCloseBracket); } +/* Helper functions */ -function preloadPropsFromPreloadOptions(href, as, options) { - return { - rel: 'preload', - as: as, - href: href, - crossOrigin: as === 'font' ? '' : options.crossOrigin, - integrity: options.integrity - }; -} -function preloadAsStylePropsFromProps(href, props) { - return { - rel: 'preload', - as: 'style', - href: href, - crossOrigin: props.crossOrigin, - integrity: props.integrity, - media: props.media, - hrefLang: props.hrefLang, - referrerPolicy: props.referrerPolicy - }; -} +function writeStyleResourceDependencyHrefOnlyInJS(destination, href) { + // We should actually enforce this earlier when the resource is created but for + // now we make sure we are actually dealing with a string here. + { + checkAttributeStringCoercion(href, 'href'); + } -function preloadAsScriptPropsFromProps(href, props) { - return { - rel: 'preload', - as: 'script', - href: href, - crossOrigin: props.crossOrigin, - integrity: props.integrity, - referrerPolicy: props.referrerPolicy - }; + var coercedHref = '' + href; + writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedHref))); } -function stylesheetPropsFromPreinitOptions(href, precedence, options) { - return { - rel: 'stylesheet', - href: href, - 'data-precedence': precedence, - crossOrigin: options.crossOrigin, - integrity: options.integrity - }; -} +function writeStyleResourceDependencyInJS(destination, href, precedence, props) { + { + checkAttributeStringCoercion(href, 'href'); + } -function stylesheetPropsFromRawProps(rawProps) { - return assign({}, rawProps, { - 'data-precedence': rawProps.precedence, - precedence: null - }); -} + var coercedHref = '' + href; + sanitizeURL(coercedHref); + writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedHref))); -function adoptPreloadPropsForStylesheetProps(resourceProps, preloadProps) { - if (resourceProps.crossOrigin == null) resourceProps.crossOrigin = preloadProps.crossOrigin; - if (resourceProps.integrity == null) resourceProps.integrity = preloadProps.integrity; -} + { + checkAttributeStringCoercion(precedence, 'precedence'); + } -function styleTagPropsFromRawProps(rawProps) { - return assign({}, rawProps, { - 'data-precedence': rawProps.precedence, - precedence: null, - 'data-href': rawProps.href, - href: null - }); -} + var coercedPrecedence = '' + precedence; + writeChunk(destination, arrayInterstitial); + writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedPrecedence))); -function scriptPropsFromPreinitOptions(src, options) { - return { - src: src, - async: true, - crossOrigin: options.crossOrigin, - integrity: options.integrity - }; -} + for (var propKey in props) { + if (hasOwnProperty.call(props, propKey)) { + var propValue = props[propKey]; -function adoptPreloadPropsForScriptProps(resourceProps, preloadProps) { - if (resourceProps.crossOrigin == null) resourceProps.crossOrigin = preloadProps.crossOrigin; - if (resourceProps.integrity == null) resourceProps.integrity = preloadProps.integrity; -} + if (propValue == null) { + continue; + } -function hoistStylesheetResource(resource) { - this.add(resource); -} + switch (propKey) { + case 'href': + case 'rel': + case 'precedence': + case 'data-precedence': + { + break; + } -function hoistResources(resources, source) { - var currentBoundaryResources = resources.boundaryResources; + case 'children': + case 'dangerouslySetInnerHTML': + throw new Error('link' + " is a self-closing tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.'); + // eslint-disable-next-line-no-fallthrough - if (currentBoundaryResources) { - source.forEach(hoistStylesheetResource, currentBoundaryResources); - source.clear(); + default: + writeStyleResourceAttributeInJS(destination, propKey, propValue); + break; + } + } } -} - -function unblockStylesheet(resource) { - resource.state &= ~Blocked; -} -function hoistResourcesToRoot(resources, boundaryResources) { - boundaryResources.forEach(unblockStylesheet); - boundaryResources.clear(); + return null; } -function markAsRenderedResourceDEV(resource, originalProps) { - { - var devResource = resource; - - if (typeof devResource.__provenance === 'string') { - error('Resource already marked for DEV type. This is a bug in React.'); - } +function writeStyleResourceAttributeInJS(destination, name, value) // not null or undefined +{ + var attributeName = name.toLowerCase(); + var attributeValue; - devResource.__provenance = 'rendered'; - devResource.__originalProps = originalProps; + switch (typeof value) { + case 'function': + case 'symbol': + return; } -} -function markAsImperativeResourceDEV(resource, provenance, originalHref, originalOptions, propsEquivalent) { - { - var devResource = resource; + switch (name) { + // Reserved names + case 'innerHTML': + case 'dangerouslySetInnerHTML': + case 'suppressContentEditableWarning': + case 'suppressHydrationWarning': + case 'style': + // Ignored + return; + // Attribute renames - if (typeof devResource.__provenance === 'string') { - error('Resource already marked for DEV type. This is a bug in React.'); - } + case 'className': + attributeName = 'class'; + break; + // Booleans - devResource.__provenance = provenance; - devResource.__originalHref = originalHref; - devResource.__originalOptions = originalOptions; - devResource.__propsEquivalent = propsEquivalent; - } -} + case 'hidden': + if (value === false) { + return; + } -function markAsImplicitResourceDEV(resource, underlyingProps, impliedProps) { - { - var devResource = resource; + attributeValue = ''; + break; + // Santized URLs - if (typeof devResource.__provenance === 'string') { - error('Resource already marked for DEV type. This is a bug in React.'); - } + case 'src': + case 'href': + { + { + checkAttributeStringCoercion(value, attributeName); + } - devResource.__provenance = 'implicit'; - devResource.__underlyingProps = underlyingProps; - devResource.__impliedProps = impliedProps; - } -} + attributeValue = '' + value; + sanitizeURL(attributeValue); + break; + } -function getAsResourceDEV(resource) { - { - if (resource) { - if (typeof resource.__provenance === 'string') { - return resource; + default: + { + if (!isAttributeNameSafe(name)) { + return; + } } + } - error('Resource was not marked for DEV type. This is a bug in React.'); - } + if ( // shouldIgnoreAttribute + // We have already filtered out null/undefined and reserved words. + name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) { + return; + } - return null; + { + checkAttributeStringCoercion(value, attributeName); } -} + + attributeValue = '' + value; + writeChunk(destination, arrayInterstitial); + writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(attributeName))); + writeChunk(destination, arrayInterstitial); + writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(attributeValue))); +} // This function writes a 2D array of strings to be embedded in an attribute // ATTENTION // When adding new symbols to this file, @@ -7647,6 +7439,8 @@ function createRequest(children, responseState, rootFormatContext, progressiveCh clientRenderedBoundaries: [], completedBoundaries: [], partialBoundaries: [], + preamble: [], + postamble: [], onError: onError === undefined ? defaultErrorHandler : onError, onAllReady: onAllReady === undefined ? noop$2 : onAllReady, onShellReady: onShellReady === undefined ? noop$2 : onShellReady, @@ -7950,7 +7744,7 @@ function hoistCompletedBoundaryResources(request, completedBoundary) { function renderHostElement(request, task, type, props) { pushBuiltInComponentStackInDEV(task, type); var segment = task.blockedSegment; - var children = pushStartInstance(segment.chunks, type, props, request.resources, request.responseState, segment.formatContext, segment.lastPushedText); + var children = pushStartInstance(segment.chunks, request.preamble, type, props, request.responseState, segment.formatContext, segment.lastPushedText); segment.lastPushedText = false; var prevContext = segment.formatContext; segment.formatContext = getChildFormatContext(prevContext, type, props); // We use the non-destructive form because if something suspends, we still @@ -7960,7 +7754,7 @@ function renderHostElement(request, task, type, props) { // the correct context. Therefore this is not in a finally. segment.formatContext = prevContext; - pushEndInstance(segment.chunks, type, props, request.responseState, prevContext); + pushEndInstance(segment.chunks, request.postamble, type); segment.lastPushedText = false; popComponentStackInDEV(task); } @@ -9115,6 +8909,14 @@ function flushSegment(request, destination, segment) { } } +function flushInitialResources(destination, resources, responseState, willFlushAllSegments) { + writeInitialResources(destination, resources, responseState); +} + +function flushImmediateResources(destination, request) { + writeImmediateResources(destination, request.resources, request.responseState); +} + function flushClientRenderedBoundary(request, destination, boundary) { return writeClientRenderBoundaryInstruction(destination, request.responseState, boundary.id, boundary.errorDigest, boundary.errorMessage, boundary.errorComponentStack); } @@ -9139,11 +8941,6 @@ function flushCompletedBoundary(request, destination, boundary) { } completedSegments.length = 0; - - { - writeResourcesForBoundary(destination, boundary.resources); - } - return writeCompletedBoundaryInstruction(destination, request.responseState, boundary.id, boundary.rootSegmentID, boundary.resources); } @@ -9168,14 +8965,7 @@ function flushPartialBoundary(request, destination, boundary) { } completedSegments.splice(0, i); - - { - // The way this is structured we only write resources for partial boundaries - // if there is no backpressure. Later before we complete the boundary we - // will write resources regardless of backpressure before we emit the - // completion instruction - return writeResourcesForBoundary(destination, boundary.resources); - } + return true; } function flushPartiallyCompletedSegment(request, destination, boundary, segment) { @@ -9216,7 +9006,14 @@ function flushCompletedQueues(request, destination) { if (completedRootSegment !== null) { if (request.pendingRootTasks === 0) { if (enableFloat) { - writePreamble(destination, request.resources, request.responseState, request.allPendingTasks === 0); + var preamble = request.preamble; + + for (i = 0; i < preamble.length; i++) { + // we expect the preamble to be tiny and will ignore backpressure + writeChunk(destination, preamble[i]); + } + + flushInitialResources(destination, request.resources, request.responseState, request.allPendingTasks === 0); } flushSegment(request, destination, completedRootSegment); @@ -9227,7 +9024,7 @@ function flushCompletedQueues(request, destination) { return; } } else if (enableFloat) { - writeHoistables(destination, request.resources, request.responseState); + flushImmediateResources(destination, request); } // We emit client rendering instructions for already emitted boundaries first. // This is so that we can signal to the client to start client rendering them as // soon as possible. @@ -9307,7 +9104,11 @@ function flushCompletedQueues(request, destination) { // either they have pending task or they're complete. ) { { - writePostamble(destination, request.responseState); + var postamble = request.postamble; + + for (var _i = 0; _i < postamble.length; _i++) { + writeChunk(destination, postamble[_i]); + } } completeWriting(destination); diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.production.min.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.production.min.js index 917389874295f..a2e4e6dffd0ff 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.production.min.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.production.min.js @@ -7,131 +7,130 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -'use strict';var aa=require("react"),ba=require("react-dom");"function"===typeof AsyncLocalStorage&&new AsyncLocalStorage;var k=null,l=0;function p(a,b){if(0!==b.length)if(512<b.length)0<l&&(a.enqueue(new Uint8Array(k.buffer,0,l)),k=new Uint8Array(512),l=0),a.enqueue(b);else{var c=k.length-l;c<b.length&&(0===c?a.enqueue(k):(k.set(b.subarray(0,c),l),a.enqueue(k),b=b.subarray(c)),k=new Uint8Array(512),l=0);k.set(b,l);l+=b.length}}function r(a,b){p(a,b);return!0} -function ca(a){k&&0<l&&(a.enqueue(new Uint8Array(k.buffer,0,l)),k=null,l=0)}var da=new TextEncoder;function u(a){return da.encode(a)}function v(a){return da.encode(a)}function ea(a,b){"function"===typeof a.error?a.error(b):a.close()} -var w=Object.assign,x=Object.prototype.hasOwnProperty,fa=/^[: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][: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\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ha={},ia={}; -function ja(a){if(x.call(ia,a))return!0;if(x.call(ha,a))return!1;if(fa.test(a))return ia[a]=!0;ha[a]=!0;return!1}function y(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var A={}; -"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){A[a]=new y(a,0,!1,a,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];A[b]=new y(b,1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){A[a]=new y(a,2,!1,a.toLowerCase(),null,!1,!1)}); -["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){A[a]=new y(a,2,!1,a,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){A[a]=new y(a,3,!1,a.toLowerCase(),null,!1,!1)}); -["checked","multiple","muted","selected"].forEach(function(a){A[a]=new y(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){A[a]=new y(a,4,!1,a,null,!1,!1)});["cols","rows","size","span"].forEach(function(a){A[a]=new y(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){A[a]=new y(a,5,!1,a.toLowerCase(),null,!1,!1)});var ka=/[\-:]([a-z])/g;function la(a){return a[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 transform-origin 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".split(" ").forEach(function(a){var b=a.replace(ka, -la);A[b]=new y(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(ka,la);A[b]=new y(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(ka,la);A[b]=new y(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){A[a]=new y(a,1,!1,a.toLowerCase(),null,!1,!1)}); -A.xlinkHref=new y("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){A[a]=new y(a,1,!1,a.toLowerCase(),null,!0,!0)}); -var na={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,tabSize:!0,widows:!0,zIndex:!0, -zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},oa=["Webkit","ms","Moz","O"];Object.keys(na).forEach(function(a){oa.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);na[b]=na[a]})});var pa=/["'&<>]/; -function B(a){if("boolean"===typeof a||"number"===typeof a)return""+a;a=""+a;var b=pa.exec(a);if(b){var c="",d,e=0;for(d=b.index;d<a.length;d++){switch(a.charCodeAt(d)){case 34:b=""";break;case 38:b="&";break;case 39:b="'";break;case 60:b="<";break;case 62:b=">";break;default:continue}e!==d&&(c+=a.substring(e,d));e=d+1;c+=b}a=e!==d?c+a.substring(e,d):c}return a} -var qa=/([A-Z])/g,ra=/^ms-/,sa=Array.isArray,ta=ba.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Dispatcher,wa={preload:ua,preinit:va},C=null,xa=[];v('"></template>');var ya=v("<script>"),za=v("\x3c/script>"),Aa=v('<script src="'),Ba=v('<script type="module" src="'),Ca=v('" integrity="'),Da=v('" async="">\x3c/script>'),Ea=/(<\/|<)(s)(cript)/gi;function Fa(a,b,c,d){return""+b+("s"===c?"\\u0073":"\\u0053")+d} -function Ga(a,b,c,d,e){a=void 0===a?"":a;b=void 0===b?ya:v('<script nonce="'+B(b)+'">');var f=[];void 0!==c&&f.push(b,u((""+c).replace(Ea,Fa)),za);if(void 0!==d)for(c=0;c<d.length;c++){var g=d[c],m="string"===typeof g?void 0:g.integrity;f.push(Aa,u(B("string"===typeof g?g:g.src)));m&&f.push(Ca,u(B(m)));f.push(Da)}if(void 0!==e)for(d=0;d<e.length;d++)c=e[d],g="string"===typeof c?void 0:c.integrity,f.push(Ba,u(B("string"===typeof c?c:c.src))),g&&f.push(Ca,u(B(g))),f.push(Da);return{bootstrapChunks:f, -placeholderPrefix:v(a+"P:"),segmentPrefix:v(a+"S:"),boundaryPrefix:a+"B:",idPrefix:a,nextSuspenseID:0,streamingFormat:0,startInlineScript:b,instructions:0,externalRuntimeConfig:null,htmlChunks:null,headChunks:null,hasBody:!1,charsetChunks:[],preconnectChunks:[],preloadChunks:[],hoistableChunks:[]}}function E(a,b,c){return{insertionMode:a,selectedValue:b,noscriptTagInScope:c}}function Ha(a){return E("http://www.w3.org/2000/svg"===a?3:"http://www.w3.org/1998/Math/MathML"===a?4:0,null,!1)} -function Ia(a,b,c){switch(b){case "noscript":return E(2,null,!0);case "select":return E(2,null!=c.value?c.value:c.defaultValue,a.noscriptTagInScope);case "svg":return E(3,null,a.noscriptTagInScope);case "math":return E(4,null,a.noscriptTagInScope);case "foreignObject":return E(2,null,a.noscriptTagInScope);case "table":return E(5,null,a.noscriptTagInScope);case "thead":case "tbody":case "tfoot":return E(6,null,a.noscriptTagInScope);case "colgroup":return E(8,null,a.noscriptTagInScope);case "tr":return E(7, -null,a.noscriptTagInScope)}return 5<=a.insertionMode?E(2,null,a.noscriptTagInScope):0===a.insertionMode?"html"===b?E(1,null,!1):E(2,null,!1):1===a.insertionMode?E(2,null,!1):a}var F=v("\x3c!-- --\x3e");function Ja(a,b,c,d){if(""===b)return d;d&&a.push(F);a.push(u(B(b)));return!0}var Ka=new Map,La=v(' style="'),Ma=v(":"),Na=v(";"); -function Oa(a,b){if("object"!==typeof b)throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");var c=!0,d;for(d in b)if(x.call(b,d)){var e=b[d];if(null!=e&&"boolean"!==typeof e&&""!==e){if(0===d.indexOf("--")){var f=u(B(d));e=u(B((""+e).trim()))}else{f=d;var g=Ka.get(f);void 0!==g?f=g:(g=v(B(f.replace(qa,"-$1").toLowerCase().replace(ra,"-ms-"))),Ka.set(f,g),f=g);e="number"===typeof e?0===e|| -x.call(na,d)?u(""+e):u(e+"px"):u(B((""+e).trim()))}c?(c=!1,a.push(La,f,Ma,e)):a.push(Na,f,Ma,e)}}c||a.push(G)}var H=v(" "),Pa=v('="'),G=v('"'),Qa=v('=""'); -function I(a,b,c){switch(b){case "style":Oa(a,c);return;case "defaultValue":case "defaultChecked":case "innerHTML":case "suppressContentEditableWarning":case "suppressHydrationWarning":return}if(!(2<b.length)||"o"!==b[0]&&"O"!==b[0]||"n"!==b[1]&&"N"!==b[1]){var d=A.hasOwnProperty(b)?A[b]:null;if(null!==d){switch(typeof c){case "function":case "symbol":return;case "boolean":if(!d.acceptsBooleans)return}b=u(d.attributeName);switch(d.type){case 3:c&&a.push(H,b,Qa);break;case 4:!0===c?a.push(H,b,Qa): -!1!==c&&a.push(H,b,Pa,u(B(c)),G);break;case 5:isNaN(c)||a.push(H,b,Pa,u(B(c)),G);break;case 6:!isNaN(c)&&1<=c&&a.push(H,b,Pa,u(B(c)),G);break;default:d.sanitizeURL&&(c=""+c),a.push(H,b,Pa,u(B(c)),G)}}else if(ja(b)){switch(typeof c){case "function":case "symbol":return;case "boolean":if(d=b.toLowerCase().slice(0,5),"data-"!==d&&"aria-"!==d)return}a.push(H,u(b),Pa,u(B(c)),G)}}}var K=v(">"),Ra=v("/>"); -function M(a,b,c){if(null!=b){if(null!=c)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if("object"!==typeof b||!("__html"in b))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.");b=b.__html;null!==b&&void 0!==b&&a.push(u(""+b))}}function Sa(a){var b="";aa.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}var Ta=v(' selected=""'); -function Ua(a,b,c,d,e,f,g){var m=b.rel,h=b.href,n=b.precedence;if(3===f||g||"string"!==typeof m||"string"!==typeof h||""===h)return N(a,b),null;if("stylesheet"===b.rel){c="[style]"+h;if("string"!==typeof n||null!=b.disabled||b.onLoad||b.onError)return e=d.preloadsMap.get(c),e||(e={type:"preload",chunks:[],state:0,props:Va(h,b)},d.preloadsMap.set(c,e)),N(e.chunks,e.props),d.usedStylesheets.add(e),N(a,b);h=d.stylesMap.get(c);if(!h){b=w({},b,{"data-precedence":b.precedence,precedence:null});if(h=d.preloadsMap.get(c))h.state|= -4,h=h.props,null==b.crossOrigin&&(b.crossOrigin=h.crossOrigin),null==b.integrity&&(b.integrity=h.integrity);h={type:"stylesheet",chunks:[],state:d.boundaryResources?4:0,props:b};d.stylesMap.set(c,h);b=d.precedences.get(n);b||(b=new Set,d.precedences.set(n,b));b.add(h)}d.boundaryResources&&d.boundaryResources.add(h);e&&a.push(F);return null}if(b.onLoad||b.onError)return N(a,b);e&&a.push(F);switch(b.rel){case "preconnect":case "dns-prefetch":return N(c.preconnectChunks,b);case "preload":return N(c.preloadChunks, -b);default:return N(c.hoistableChunks,b)}}function N(a,b){a.push(O("link"));for(var c in b)if(x.call(b,c)){var d=b[c];if(null!=d)switch(c){case "children":case "dangerouslySetInnerHTML":throw Error("link is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:I(a,c,d)}}a.push(Ra);return null} -function Wa(a,b){a.push(O("style"));var c=null,d=null,e;for(e in b)if(x.call(b,e)){var f=b[e];if(null!=f)switch(e){case "children":c=f;break;case "dangerouslySetInnerHTML":d=f;break;default:I(a,e,f)}}a.push(K);b=Array.isArray(c)?2>c.length?c[0]:null:c;"function"!==typeof b&&"symbol"!==typeof b&&null!==b&&void 0!==b&&a.push(u(B(""+b)));M(a,d,c);a.push(P,u("style"),Q);return null} -function Xa(a,b,c){a.push(O(c));for(var d in b)if(x.call(b,d)){var e=b[d];if(null!=e)switch(d){case "children":case "dangerouslySetInnerHTML":throw Error(c+" is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:I(a,d,e)}}a.push(Ra);return null} -function Ya(a,b){a.push(O("title"));var c=null,d=null,e;for(e in b)if(x.call(b,e)){var f=b[e];if(null!=f)switch(e){case "children":c=f;break;case "dangerouslySetInnerHTML":d=f;break;default:I(a,e,f)}}a.push(K);b=Array.isArray(c)?2>c.length?c[0]:null:c;"function"!==typeof b&&"symbol"!==typeof b&&null!==b&&void 0!==b&&a.push(u(B(""+b)));M(a,d,c);a.push(P,u("title"),Q);return null} -function Za(a,b){a.push(O("script"));var c=null,d=null,e;for(e in b)if(x.call(b,e)){var f=b[e];if(null!=f)switch(e){case "children":c=f;break;case "dangerouslySetInnerHTML":d=f;break;default:I(a,e,f)}}a.push(K);M(a,d,c);"string"===typeof c&&a.push(u(B(c)));a.push(P,u("script"),Q);return null} -function $a(a,b,c){a.push(O(c));var d=c=null,e;for(e in b)if(x.call(b,e)){var f=b[e];if(null!=f)switch(e){case "children":c=f;break;case "dangerouslySetInnerHTML":d=f;break;default:I(a,e,f)}}a.push(K);M(a,d,c);return"string"===typeof c?(a.push(u(B(c))),null):c}var ab=v("\n"),bb=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,cb=new Map;function O(a){var b=cb.get(a);if(void 0===b){if(!bb.test(a))throw Error("Invalid tag: "+a);b=v("<"+a);cb.set(a,b)}return b}var db=v("<!DOCTYPE html>"); -function eb(a,b,c,d,e,f,g){switch(b){case "select":a.push(O("select"));d=g=null;for(var m in c)if(x.call(c,m)){var h=c[m];if(null!=h)switch(m){case "children":g=h;break;case "dangerouslySetInnerHTML":d=h;break;case "defaultValue":case "value":break;default:I(a,m,h)}}a.push(K);M(a,d,g);return g;case "option":g=f.selectedValue;a.push(O("option"));var n=d=null,q=m=null;for(h in c)if(x.call(c,h)){var t=c[h];if(null!=t)switch(h){case "children":d=t;break;case "selected":m=t;break;case "dangerouslySetInnerHTML":q= -t;break;case "value":n=t;default:I(a,h,t)}}if(null!=g)if(c=null!==n?""+n:Sa(d),sa(g))for(h=0;h<g.length;h++){if(""+g[h]===c){a.push(Ta);break}}else""+g===c&&a.push(Ta);else m&&a.push(Ta);a.push(K);M(a,q,d);return d;case "textarea":a.push(O("textarea"));h=d=g=null;for(n in c)if(x.call(c,n)&&(q=c[n],null!=q))switch(n){case "children":h=q;break;case "value":g=q;break;case "defaultValue":d=q;break;case "dangerouslySetInnerHTML":throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>."); -default:I(a,n,q)}null===g&&null!==d&&(g=d);a.push(K);if(null!=h){if(null!=g)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(sa(h)&&1<h.length)throw Error("<textarea> can only have at most one child.");g=""+h}"string"===typeof g&&"\n"===g[0]&&a.push(ab);null!==g&&a.push(u(B(""+g)));return null;case "input":a.push(O("input"));n=h=d=g=null;for(q in c)if(x.call(c,q)&&(m=c[q],null!=m))switch(q){case "children":case "dangerouslySetInnerHTML":throw Error("input is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."); -case "defaultChecked":n=m;break;case "defaultValue":d=m;break;case "checked":h=m;break;case "value":g=m;break;default:I(a,q,m)}null!==h?I(a,"checked",h):null!==n&&I(a,"checked",n);null!==g?I(a,"value",g):null!==d&&I(a,"value",d);a.push(Ra);return null;case "menuitem":a.push(O("menuitem"));for(var D in c)if(x.call(c,D)&&(g=c[D],null!=g))switch(D){case "children":case "dangerouslySetInnerHTML":throw Error("menuitems cannot have `children` nor `dangerouslySetInnerHTML`.");default:I(a,D,g)}a.push(K); -return null;case "title":return 3===f.insertionMode||f.noscriptTagInScope?a=Ya(a,c):(Ya(e.hoistableChunks,c),a=null),a;case "link":return Ua(a,c,e,d,g,f.insertionMode,f.noscriptTagInScope);case "script":a:if(3===f.insertionMode||f.noscriptTagInScope||"string"!==typeof c.src||!c.src)a=Za(a,c);else{n="[script]"+c.src;if(!0!==c.async||c.onLoad||c.onError){if(h=d.preloadsMap.get(n),h||(h={type:"preload",chunks:[],state:0,props:{rel:"preload",as:"script",href:c.src,crossOrigin:c.crossOrigin,integrity:c.integrity, -referrerPolicy:c.referrerPolicy}},d.preloadsMap.set(n,h),d.usedScripts.add(h),N(h.chunks,h.props)),!0!==c.async){Za(a,c);a=null;break a}}else if(h=d.scriptsMap.get(n),!h){h={type:"script",chunks:[],state:0,props:null};d.scriptsMap.set(n,h);d.scripts.add(h);q=c;if(d=d.preloadsMap.get(n))d.state|=4,c=q=w({},c),d=d.props,null==c.crossOrigin&&(c.crossOrigin=d.crossOrigin),null==c.integrity&&(c.integrity=d.integrity);Za(h.chunks,q)}g&&a.push(F);a=null}return a;case "style":return h=c.precedence,q=c.href, -3===f.insertionMode||f.noscriptTagInScope||"string"!==typeof h||"string"!==typeof q||""===q?a=Wa(a,c):(n="[style]"+q,q=d.stylesMap.get(n),q||(q={type:"style",chunks:[],state:d.boundaryResources?4:0,props:w({},c,{"data-precedence":c.precedence,precedence:null,"data-href":c.href,href:null})},d.stylesMap.set(n,q),Wa(q.chunks,q.props),c=d.precedences.get(h),c||(c=new Set,d.precedences.set(h,c)),c.add(q),d.boundaryResources&&d.boundaryResources.add(q)),g&&a.push(F),a=void 0),a;case "meta":return 3===f.insertionMode|| -f.noscriptTagInScope?a=Xa(a,c,"meta"):(g&&a.push(F),a="string"===typeof c.charSet?Xa(e.charsetChunks,c,"meta"):Xa(e.hoistableChunks,c,"meta")),a;case "listing":case "pre":a.push(O(b));d=g=null;for(t in c)if(x.call(c,t)&&(h=c[t],null!=h))switch(t){case "children":g=h;break;case "dangerouslySetInnerHTML":d=h;break;default:I(a,t,h)}a.push(K);if(null!=d){if(null!=g)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if("object"!==typeof d||!("__html"in d))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information."); -c=d.__html;null!==c&&void 0!==c&&("string"===typeof c&&0<c.length&&"\n"===c[0]?a.push(ab,u(c)):a.push(u(""+c)))}"string"===typeof g&&"\n"===g[0]&&a.push(ab);return g;case "base":case "area":case "br":case "col":case "embed":case "hr":case "img":case "keygen":case "param":case "source":case "track":case "wbr":return Xa(a,c,b);case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return $a(a, -c,b);case "head":return 2>f.insertionMode&&null===e.headChunks?(e.headChunks=[],a=$a(e.headChunks,c,"head")):a=$a(a,c,"head"),a;case "html":return 0===f.insertionMode&&null===e.htmlChunks?(e.htmlChunks=[db],a=$a(e.htmlChunks,c,"html")):a=$a(a,c,"html"),a;default:if(-1===b.indexOf("-")&&"string"!==typeof c.is)return $a(a,c,b);a.push(O(b));d=g=null;for(var z in c)if(x.call(c,z)&&(h=c[z],null!=h))switch(z){case "children":g=h;break;case "dangerouslySetInnerHTML":d=h;break;case "style":Oa(a,h);break; -case "suppressContentEditableWarning":case "suppressHydrationWarning":break;default:ja(z)&&"function"!==typeof h&&"symbol"!==typeof h&&a.push(H,u(z),Pa,u(B(h)),G)}a.push(K);M(a,d,g);return g}}var P=v("</"),Q=v(">"),fb=v('<template id="'),gb=v('"></template>'),hb=v("\x3c!--$--\x3e"),ib=v('\x3c!--$?--\x3e<template id="'),jb=v('"></template>'),kb=v("\x3c!--$!--\x3e"),lb=v("\x3c!--/$--\x3e"),mb=v("<template"),nb=v('"'),ob=v(' data-dgst="');v(' data-msg="');v(' data-stck="');var pb=v("></template>"); -function qb(a,b,c){p(a,ib);if(null===c)throw Error("An ID must have been assigned before we can complete the boundary.");p(a,c);return r(a,jb)} -var rb=v('<div hidden id="'),sb=v('">'),tb=v("</div>"),ub=v('<svg aria-hidden="true" style="display:none" id="'),vb=v('">'),wb=v("</svg>"),xb=v('<math aria-hidden="true" style="display:none" id="'),yb=v('">'),zb=v("</math>"),Ab=v('<table hidden id="'),Bb=v('">'),Cb=v("</table>"),Db=v('<table hidden><tbody id="'),Eb=v('">'),Fb=v("</tbody></table>"),Gb=v('<table hidden><tr id="'),Hb=v('">'),Ib=v("</tr></table>"),Jb=v('<table hidden><colgroup id="'),Kb=v('">'),Lb=v("</colgroup></table>"); -function Mb(a,b,c,d){switch(c.insertionMode){case 0:case 1:case 2:return p(a,rb),p(a,b.segmentPrefix),p(a,u(d.toString(16))),r(a,sb);case 3:return p(a,ub),p(a,b.segmentPrefix),p(a,u(d.toString(16))),r(a,vb);case 4:return p(a,xb),p(a,b.segmentPrefix),p(a,u(d.toString(16))),r(a,yb);case 5:return p(a,Ab),p(a,b.segmentPrefix),p(a,u(d.toString(16))),r(a,Bb);case 6:return p(a,Db),p(a,b.segmentPrefix),p(a,u(d.toString(16))),r(a,Eb);case 7:return p(a,Gb),p(a,b.segmentPrefix),p(a,u(d.toString(16))),r(a,Hb); -case 8:return p(a,Jb),p(a,b.segmentPrefix),p(a,u(d.toString(16))),r(a,Kb);default:throw Error("Unknown insertion mode. This is a bug in React.");}}function Nb(a,b){switch(b.insertionMode){case 0:case 1:case 2:return r(a,tb);case 3:return r(a,wb);case 4:return r(a,zb);case 5:return r(a,Cb);case 6:return r(a,Fb);case 7:return r(a,Ib);case 8:return r(a,Lb);default:throw Error("Unknown insertion mode. This is a bug in React.");}} -var Ob=v('$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};;$RS("'),Pb=v('$RS("'),Qb=v('","'),Rb=v('")\x3c/script>');v('<template data-rsi="" data-sid="');v('" data-pid="'); -var Sb=v('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RC("'),Tb=v('$RC("'), -Ub=v('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RM=new Map;\n$RR=function(p,q,w){function r(l){this.s=l}for(var t=$RC,m=$RM,u=new Map,n=new Map,g=document,h,e,f=g.querySelectorAll("template[data-precedence]"),c=0;e=f[c++];){for(var b=e.content.firstChild;b;b=b.nextSibling)u.set(b.getAttribute("data-href"),b);e.parentNode.removeChild(e)}f=g.querySelectorAll("link[data-precedence],style[data-precedence]");for(c=0;e=f[c++];)m.set(e.getAttribute("STYLE"===e.nodeName?"data-href":"href"),e),n.set(e.dataset.precedence,h=e);e=0;f=[];for(var d,\nv,a;d=w[e++];){var k=0;b=d[k++];if(!(a=m.get(b))){if(a=u.get(b))c=a.getAttribute("data-precedence");else{a=g.createElement("link");a.href=b;a.rel="stylesheet";for(a.dataset.precedence=c=d[k++];v=d[k++];)a.setAttribute(v,d[k++]);d=a._p=new Promise(function(l,x){a.onload=l;a.onerror=x});d.then(r.bind(d,"l"),r.bind(d,"e"))}m.set(b,a);b=n.get(c)||h;b===h&&(h=a);n.set(c,a);b?b.parentNode.insertBefore(a,b.nextSibling):(c=g.head,c.insertBefore(a,c.firstChild))}d=a._p;c=a.getAttribute("media");!d||"l"===\nd.s||c&&!matchMedia(c).matches||f.push(d)}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};$RR("'), -Vb=v('$RM=new Map;\n$RR=function(p,q,w){function r(l){this.s=l}for(var t=$RC,m=$RM,u=new Map,n=new Map,g=document,h,e,f=g.querySelectorAll("template[data-precedence]"),c=0;e=f[c++];){for(var b=e.content.firstChild;b;b=b.nextSibling)u.set(b.getAttribute("data-href"),b);e.parentNode.removeChild(e)}f=g.querySelectorAll("link[data-precedence],style[data-precedence]");for(c=0;e=f[c++];)m.set(e.getAttribute("STYLE"===e.nodeName?"data-href":"href"),e),n.set(e.dataset.precedence,h=e);e=0;f=[];for(var d,\nv,a;d=w[e++];){var k=0;b=d[k++];if(!(a=m.get(b))){if(a=u.get(b))c=a.getAttribute("data-precedence");else{a=g.createElement("link");a.href=b;a.rel="stylesheet";for(a.dataset.precedence=c=d[k++];v=d[k++];)a.setAttribute(v,d[k++]);d=a._p=new Promise(function(l,x){a.onload=l;a.onerror=x});d.then(r.bind(d,"l"),r.bind(d,"e"))}m.set(b,a);b=n.get(c)||h;b===h&&(h=a);n.set(c,a);b?b.parentNode.insertBefore(a,b.nextSibling):(c=g.head,c.insertBefore(a,c.firstChild))}d=a._p;c=a.getAttribute("media");!d||"l"===\nd.s||c&&!matchMedia(c).matches||f.push(d)}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};$RR("'), -Wb=v('$RR("'),Xb=v('","'),Yb=v('",'),Zb=v('"'),$b=v(")\x3c/script>");v('<template data-rci="" data-bid="');v('<template data-rri="" data-bid="');v('" data-sid="');v('" data-sty="');var ac=v('$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};;$RX("'),bc=v('$RX("'),cc=v('"'),dc=v(","),ec=v(")\x3c/script>");v('<template data-rxi="" data-bid="');v('" data-dgst="');v('" data-msg="'); -v('" data-stck="');var fc=/[<\u2028\u2029]/g;function gc(a){return JSON.stringify(a).replace(fc,function(a){switch(a){case "<":return"\\u003c";case "\u2028":return"\\u2028";case "\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React");}})}var hc=/[&><\u2028\u2029]/g; -function ic(a){return JSON.stringify(a).replace(hc,function(a){switch(a){case "&":return"\\u0026";case ">":return"\\u003e";case "<":return"\\u003c";case "\u2028":return"\\u2028";case "\u2029":return"\\u2029";default:throw Error("escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React");}})}var jc=v('<template data-precedence="">'),kc=v("</template>"),lc=!1; -function mc(a){if("style"===a.type&&0===(a.state&3)){!1===lc&&(lc=!0,p(this,jc));for(var b=a.chunks,c=0;c<b.length;c++)p(this,b[c]);a.state|=2}}function nc(a,b){lc=!1;b.forEach(mc,a);return lc?r(a,kc):!0}var oc=v('<style data-precedence="'),pc=v('"></style>');function qc(a){if(0===(a.state&7)){for(var b=a.chunks,c=0;c<b.length;c++)p(this,b[c]);a.state|=1}}function rc(a){if(0===(a.state&3)){for(var b=a.chunks,c=0;c<b.length;c++)p(this,b[c]);a.state|=2}}var sc=!1; -function tc(a,b,c){b=a.chunks;if(a.state&3)c.delete(a);else if(!(a.state&4)){sc=!0;"stylesheet"===a.type&&N(b,a.props);for(var d=0;d<b.length;d++)p(this,b[d]);a.state|=1;c.delete(a)}}function uc(a,b){sc=!1;a.forEach(tc,this);sc||(p(this,oc),p(this,u(B(b))),p(this,pc))}function vc(a){if("style"!==a.type){var b=a.chunks,c=Va(a.props.href,a.props);N(b,c);for(c=0;c<b.length;c++)p(this,b[c]);a.state|=8;b.length=0}}function wc(a){a.forEach(vc,this);a.clear()} -function xc(a){if("style"!==a.type){var b=a.chunks,c=Va(a.props.href,a.props);N(b,c);for(c=0;c<b.length;c++)p(this,b[c]);a.state|=8;b.length=0}}function yc(a){a.forEach(xc,this);a.clear()} -function zc(a,b,c){var d=c.htmlChunks,e=c.headChunks,f=0;if(d){for(f=0;f<d.length;f++)p(a,d[f]);if(e)for(f=0;f<e.length;f++)p(a,e[f]);else p(a,O("head")),p(a,K)}else if(e)for(f=0;f<e.length;f++)p(a,e[f]);var g=c.charsetChunks;for(f=0;f<g.length;f++)p(a,g[f]);g.length=0;g=c.preconnectChunks;for(f=0;f<g.length;f++)p(a,g[f]);g.length=0;b.fontPreloads.forEach(qc,a);b.fontPreloads.clear();b.precedences.forEach(uc,a);b.precedences.forEach(wc,a);b.usedStylesheets.forEach(function(c){if(!b.stylesMap.has("["+ -c.props.as+"]"+c.props.href))for(c=c.chunks,f=0;f<c.length;f++)p(a,c[f])});b.usedStylesheets.clear();b.scripts.forEach(qc,a);b.scripts.clear();b.usedScripts.forEach(qc,a);b.usedScripts.clear();b.explicitStylesheetPreloads.forEach(qc,a);b.explicitStylesheetPreloads.clear();b.explicitScriptPreloads.forEach(qc,a);b.explicitScriptPreloads.clear();b.explicitOtherPreloads.forEach(qc,a);b.explicitOtherPreloads.clear();g=c.preloadChunks;for(f=0;f<g.length;f++)p(a,g[f]);g.length=0;c=c.hoistableChunks;for(f= -0;f<c.length;f++)p(a,c[f]);c.length=0;d&&null===e&&(p(a,P),p(a,u("head")),p(a,Q))} -function Ac(a,b,c){var d=0,e=c.preconnectChunks;for(d=0;d<e.length;d++)p(a,e[d]);e.length=0;b.fontPreloads.forEach(rc,a);b.fontPreloads.clear();b.precedences.forEach(yc,a);b.usedStylesheets.forEach(function(c){if(!b.stylesMap.has("["+c.props.as+"]"+c.props.href))for(c=c.chunks,d=0;d<c.length;d++)p(a,c[d])});b.usedStylesheets.clear();b.scripts.forEach(rc,a);b.scripts.clear();b.usedScripts.forEach(rc,a);b.usedScripts.clear();b.explicitStylesheetPreloads.forEach(rc,a);b.explicitStylesheetPreloads.clear(); -b.explicitScriptPreloads.forEach(rc,a);b.explicitScriptPreloads.clear();b.explicitOtherPreloads.forEach(rc,a);b.explicitOtherPreloads.clear();e=c.preloadChunks;for(d=0;d<e.length;d++)p(a,e[d]);e.length=0;c=c.hoistableChunks;for(d=0;d<c.length;d++)p(a,c[d]);c.length=0}var Bc=v("["),Cc=v(",["),Dc=v(","),Ec=v("]"); -function Fc(a,b){p(a,Bc);var c=Bc;b.forEach(function(b){if(!(b.state&1))if(b.state&3)p(a,c),p(a,u(ic(""+("style"===b.type?b.props["data-href"]:b.props.href)))),p(a,Ec),c=Cc;else if("stylesheet"===b.type){p(a,c);var d=b.props["data-precedence"],f=b.props;p(a,u(ic(""+b.props.href)));d=""+d;p(a,Dc);p(a,u(ic(d)));for(var g in f)if(x.call(f,g)){var m=f[g];if(null!=m)switch(g){case "href":case "rel":case "precedence":case "data-precedence":break;case "children":case "dangerouslySetInnerHTML":throw Error("link is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."); -default:a:{d=a;var h=g,n=h.toLowerCase();switch(typeof m){case "function":case "symbol":break a}switch(h){case "innerHTML":case "dangerouslySetInnerHTML":case "suppressContentEditableWarning":case "suppressHydrationWarning":case "style":break a;case "className":n="class";break;case "hidden":if(!1===m)break a;break;case "src":case "href":break;default:if(!ja(h))break a}if(!(2<h.length)||"o"!==h[0]&&"O"!==h[0]||"n"!==h[1]&&"N"!==h[1])m=""+m,p(d,Dc),p(d,u(ic(n))),p(d,Dc),p(d,u(ic(m)))}}}p(a,Ec);c=Cc; -b.state|=2}});p(a,Ec)} -function ua(a,b){if(C){var c=C;if("string"===typeof a&&a&&"object"===typeof b&&null!==b&&"string"===typeof b.as){var d=b.as,e="["+d+"]"+a,f=c.preloadsMap.get(e);f||(f={type:"preload",chunks:[],state:0,props:{rel:"preload",as:d,href:a,crossOrigin:"font"===d?"":b.crossOrigin,integrity:b.integrity}},c.preloadsMap.set(e,f),N(f.chunks,f.props));switch(d){case "font":c.fontPreloads.add(f);break;case "style":c.explicitStylesheetPreloads.add(f);break;case "script":c.explicitScriptPreloads.add(f);break;default:c.explicitOtherPreloads.add(f)}}}} -function va(a,b){if(C)a:{var c=C;if("string"===typeof a&&a&&"object"===typeof b&&null!==b){var d=b.as;switch(d){case "style":var e="["+d+"]"+a;d=c.stylesMap.get(e);var f=b.precedence||"default";d||(d={type:"stylesheet",chunks:[],state:0,props:{rel:"stylesheet",href:a,"data-precedence":f,crossOrigin:b.crossOrigin,integrity:b.integrity}},c.stylesMap.set(e,d),a=c.precedences.get(f),a||(a=new Set,c.precedences.set(f,a)),a.add(d));break a;case "script":f="["+d+"]"+a,d=c.scriptsMap.get(f),d||(d={type:"script", -chunks:[],state:0,props:null},c.scriptsMap.set(f,d),a={src:a,async:!0,crossOrigin:b.crossOrigin,integrity:b.integrity},c.scripts.add(d),Za(d.chunks,a))}}}}function Va(a,b){return{rel:"preload",as:"style",href:a,crossOrigin:b.crossOrigin,integrity:b.integrity,media:b.media,hrefLang:b.hrefLang,referrerPolicy:b.referrerPolicy}}function Gc(a){this.add(a)}function Hc(a){a.state&=-5} -var Ic=Symbol.for("react.element"),Jc=Symbol.for("react.portal"),Kc=Symbol.for("react.fragment"),Lc=Symbol.for("react.strict_mode"),Mc=Symbol.for("react.profiler"),Nc=Symbol.for("react.provider"),Oc=Symbol.for("react.context"),Pc=Symbol.for("react.server_context"),Qc=Symbol.for("react.forward_ref"),Rc=Symbol.for("react.suspense"),Sc=Symbol.for("react.suspense_list"),Tc=Symbol.for("react.memo"),Uc=Symbol.for("react.lazy"),Vc=Symbol.for("react.scope"),Wc=Symbol.for("react.debug_trace_mode"),Xc=Symbol.for("react.offscreen"), -Yc=Symbol.for("react.legacy_hidden"),Zc=Symbol.for("react.cache"),$c=Symbol.for("react.default_value"),ad=Symbol.iterator; -function bd(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case Kc:return"Fragment";case Jc:return"Portal";case Mc:return"Profiler";case Lc:return"StrictMode";case Rc:return"Suspense";case Sc:return"SuspenseList";case Zc:return"Cache"}if("object"===typeof a)switch(a.$$typeof){case Oc:return(a.displayName||"Context")+".Consumer";case Nc:return(a._context.displayName||"Context")+".Provider";case Qc:var b=a.render;a=a.displayName; -a||(a=b.displayName||b.name||"",a=""!==a?"ForwardRef("+a+")":"ForwardRef");return a;case Tc:return b=a.displayName||null,null!==b?b:bd(a.type)||"Memo";case Uc:b=a._payload;a=a._init;try{return bd(a(b))}catch(c){break}case Pc:return(a.displayName||a._globalName)+".Provider"}return null}var cd=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,dd={};function ed(a,b){a=a.contextTypes;if(!a)return dd;var c={},d;for(d in a)c[d]=b[d];return c}var R=null; -function fd(a,b){if(a!==b){a.context._currentValue=a.parentValue;a=a.parent;var c=b.parent;if(null===a){if(null!==c)throw Error("The stacks must reach the root at the same time. This is a bug in React.");}else{if(null===c)throw Error("The stacks must reach the root at the same time. This is a bug in React.");fd(a,c)}b.context._currentValue=b.value}}function gd(a){a.context._currentValue=a.parentValue;a=a.parent;null!==a&&gd(a)} -function hd(a){var b=a.parent;null!==b&&hd(b);a.context._currentValue=a.value}function id(a,b){a.context._currentValue=a.parentValue;a=a.parent;if(null===a)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===b.depth?fd(a,b):id(a,b)} -function jd(a,b){var c=b.parent;if(null===c)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===c.depth?fd(a,c):jd(a,c);b.context._currentValue=b.value}function kd(a){var b=R;b!==a&&(null===b?hd(a):null===a?gd(b):b.depth===a.depth?fd(b,a):b.depth>a.depth?id(b,a):jd(b,a),R=a)} -var ld={isMounted:function(){return!1},enqueueSetState:function(a,b){a=a._reactInternals;null!==a.queue&&a.queue.push(b)},enqueueReplaceState:function(a,b){a=a._reactInternals;a.replace=!0;a.queue=[b]},enqueueForceUpdate:function(){}}; -function md(a,b,c,d){var e=void 0!==a.state?a.state:null;a.updater=ld;a.props=c;a.state=e;var f={queue:[],replace:!1};a._reactInternals=f;var g=b.contextType;a.context="object"===typeof g&&null!==g?g._currentValue:d;g=b.getDerivedStateFromProps;"function"===typeof g&&(g=g(c,e),e=null===g||void 0===g?e:w({},e,g),a.state=e);if("function"!==typeof b.getDerivedStateFromProps&&"function"!==typeof a.getSnapshotBeforeUpdate&&("function"===typeof a.UNSAFE_componentWillMount||"function"===typeof a.componentWillMount))if(b= -a.state,"function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),b!==a.state&&ld.enqueueReplaceState(a,a.state,null),null!==f.queue&&0<f.queue.length)if(b=f.queue,g=f.replace,f.queue=null,f.replace=!1,g&&1===b.length)a.state=b[0];else{f=g?b[0]:a.state;e=!0;for(g=g?1:0;g<b.length;g++){var m=b[g];m="function"===typeof m?m.call(a,f,c,d):m;null!=m&&(e?(e=!1,f=w({},f,m)):w(f,m))}a.state=f}else f.queue=null} -var nd={id:1,overflow:""};function od(a,b,c){var d=a.id;a=a.overflow;var e=32-pd(d)-1;d&=~(1<<e);c+=1;var f=32-pd(b)+e;if(30<f){var g=e-e%5;f=(d&(1<<g)-1).toString(32);d>>=g;e-=g;return{id:1<<32-pd(b)+e|c<<e|d,overflow:f+a}}return{id:1<<f|c<<e|d,overflow:a}}var pd=Math.clz32?Math.clz32:qd,rd=Math.log,sd=Math.LN2;function qd(a){a>>>=0;return 0===a?32:31-(rd(a)/sd|0)|0}var td=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`"); -function ud(){}function vd(a,b,c){c=a[c];void 0===c?a.push(b):c!==b&&(b.then(ud,ud),b=c);switch(b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;default:if("string"!==typeof b.status)switch(a=b,a.status="pending",a.then(function(a){if("pending"===b.status){var c=b;c.status="fulfilled";c.value=a}},function(a){if("pending"===b.status){var c=b;c.status="rejected";c.reason=a}}),b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;}wd=b;throw td;}}var wd=null; -function xd(){if(null===wd)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var a=wd;wd=null;return a}function yd(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var zd="function"===typeof Object.is?Object.is:yd,S=null,Ad=null,Bd=null,T=null,Cd=!1,Dd=!1,Ed=0,Fd=0,U=null,V=null,Gd=0; -function W(){if(null===S)throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.");return S} -function Hd(){if(0<Gd)throw Error("Rendered more hooks than during the previous render");return{memoizedState:null,queue:null,next:null}}function Id(){null===T?null===Bd?(Cd=!1,Bd=T=Hd()):(Cd=!0,T=Bd):null===T.next?(Cd=!1,T=T.next=Hd()):(Cd=!0,T=T.next);return T}function Jd(a,b,c,d){for(;Dd;)Dd=!1,Fd=Ed=0,Gd+=1,T=null,c=a(b,d);Kd();return c}function Ld(){var a=U;U=null;return a}function Kd(){Ad=S=null;Dd=!1;Bd=null;Gd=0;T=V=null}function Md(a,b){return"function"===typeof b?b(a):b} -function Nd(a,b,c){S=W();T=Id();if(Cd){var d=T.queue;b=d.dispatch;if(null!==V&&(c=V.get(d),void 0!==c)){V.delete(d);d=T.memoizedState;do d=a(d,c.action),c=c.next;while(null!==c);T.memoizedState=d;return[d,b]}return[T.memoizedState,b]}a=a===Md?"function"===typeof b?b():b:void 0!==c?c(b):b;T.memoizedState=a;a=T.queue={last:null,dispatch:null};a=a.dispatch=Od.bind(null,S,a);return[T.memoizedState,a]} -function Pd(a,b){S=W();T=Id();b=void 0===b?null:b;if(null!==T){var c=T.memoizedState;if(null!==c&&null!==b){var d=c[1];a:if(null===d)d=!1;else{for(var e=0;e<d.length&&e<b.length;e++)if(!zd(b[e],d[e])){d=!1;break a}d=!0}if(d)return c[0]}}a=a();T.memoizedState=[a,b];return a} -function Od(a,b,c){if(25<=Gd)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(a===S)if(Dd=!0,a={action:c,next:null},null===V&&(V=new Map),c=V.get(b),void 0===c)V.set(b,a);else{for(b=c;null!==b.next;)b=b.next;b.next=a}}function Qd(){throw Error("startTransition cannot be called during server rendering.");}function Rd(){throw Error("Cache cannot be refreshed during server rendering.");}function Sd(){} -var Ud={readContext:function(a){return a._currentValue},useContext:function(a){W();return a._currentValue},useMemo:Pd,useReducer:Nd,useRef:function(a){S=W();T=Id();var b=T.memoizedState;return null===b?(a={current:a},T.memoizedState=a):b},useState:function(a){return Nd(Md,a)},useInsertionEffect:Sd,useLayoutEffect:function(){},useCallback:function(a,b){return Pd(function(){return a},b)},useImperativeHandle:Sd,useEffect:Sd,useDebugValue:Sd,useDeferredValue:function(a){W();return a},useTransition:function(){W(); -return[!1,Qd]},useId:function(){var a=Ad.treeContext;var b=a.overflow;a=a.id;a=(a&~(1<<32-pd(a)-1)).toString(32)+b;var c=Td;if(null===c)throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component.");b=Ed++;a=":"+c.idPrefix+"R"+a;0<b&&(a+="H"+b.toString(32));return a+":"},useMutableSource:function(a,b){W();return b(a._source)},useSyncExternalStore:function(a,b,c){if(void 0===c)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering."); -return c()},useCacheRefresh:function(){return Rd},use:function(a){if(null!==a&&"object"===typeof a){if("function"===typeof a.then){var b=Fd;Fd+=1;null===U&&(U=[]);return vd(U,a,b)}if(a.$$typeof===Oc||a.$$typeof===Pc)return a._currentValue}throw Error("An unsupported type was passed to use(): "+String(a));}},Td=null,Vd={getCacheSignal:function(){throw Error("Not implemented.");},getCacheForType:function(){throw Error("Not implemented.");}},Wd=cd.ReactCurrentDispatcher,Xd=cd.ReactCurrentCache; -function Yd(a){console.error(a);return null}function Zd(){} -function $d(a,b,c,d,e,f,g,m,h){var n=[],q=new Set,t={preloadsMap:new Map,stylesMap:new Map,scriptsMap:new Map,fontPreloads:new Set,precedences:new Map,usedStylesheets:new Set,scripts:new Set,usedScripts:new Set,explicitStylesheetPreloads:new Set,explicitScriptPreloads:new Set,explicitOtherPreloads:new Set,boundaryResources:null};b={destination:null,responseState:b,progressiveChunkSize:void 0===d?12800:d,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,resources:t,completedRootSegment:null, -abortableTasks:q,pingedTasks:n,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:void 0===e?Yd:e,onAllReady:void 0===f?Zd:f,onShellReady:void 0===g?Zd:g,onShellError:void 0===m?Zd:m,onFatalError:void 0===h?Zd:h};c=ae(b,0,null,c,!1,!1);c.parentFlushed=!0;a=be(b,null,a,null,c,q,dd,null,nd);n.push(a);return b} -function be(a,b,c,d,e,f,g,m,h){a.allPendingTasks++;null===d?a.pendingRootTasks++:d.pendingTasks++;var n={node:c,ping:function(){var b=a.pingedTasks;b.push(n);1===b.length&&ce(a)},blockedBoundary:d,blockedSegment:e,abortSet:f,legacyContext:g,context:m,treeContext:h,thenableState:b};f.add(n);return n}function ae(a,b,c,d,e,f){return{status:0,id:-1,index:b,parentFlushed:!1,chunks:[],children:[],formatContext:d,boundary:c,lastPushedText:e,textEmbedded:f}} -function de(a,b){a=a.onError(b);if(null!=a&&"string"!==typeof a)throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof a+'" instead');return a}function ee(a,b){var c=a.onShellError;c(b);c=a.onFatalError;c(b);null!==a.destination?(a.status=2,ea(a.destination,b)):(a.status=1,a.fatalError=b)} -function fe(a,b){if(null!==a.completedRootSegment||0<a.pendingRootTasks)a=b.resources,a.forEach(Hc),a.clear()} -function ge(a,b,c,d){var e=c.render(),f=d.childContextTypes;if(null!==f&&void 0!==f){var g=b.legacyContext;if("function"!==typeof c.getChildContext)d=g;else{c=c.getChildContext();for(var m in c)if(!(m in f))throw Error((bd(d)||"Unknown")+'.getChildContext(): key "'+m+'" is not defined in childContextTypes.');d=w({},g,c)}b.legacyContext=d;X(a,b,null,e);b.legacyContext=g}else X(a,b,null,e)} -function he(a,b){if(a&&a.defaultProps){b=w({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c]);return b}return b} -function ie(a,b,c,d,e,f){if("function"===typeof d)if(d.prototype&&d.prototype.isReactComponent)c=ed(d,b.legacyContext),f=d.contextType,f=new d(e,"object"===typeof f&&null!==f?f._currentValue:c),md(f,d,e,c),ge(a,b,f,d);else{f=ed(d,b.legacyContext);S={};Ad=b;Fd=Ed=0;U=c;c=d(e,f);c=Jd(d,e,c,f);var g=0!==Ed;if("object"===typeof c&&null!==c&&"function"===typeof c.render&&void 0===c.$$typeof)md(c,d,e,f),ge(a,b,c,d);else if(g){e=b.treeContext;b.treeContext=od(e,1,0);try{X(a,b,null,c)}finally{b.treeContext= -e}}else X(a,b,null,c)}else if("string"===typeof d){c=b.blockedSegment;g=eb(c.chunks,d,e,a.resources,a.responseState,c.formatContext,c.lastPushedText);c.lastPushedText=!1;f=c.formatContext;c.formatContext=Ia(f,d,e);je(a,b,g);c.formatContext=f;a:{b=c.chunks;switch(d){case "title":case "style":case "script":case "area":case "base":case "br":case "col":case "embed":case "hr":case "img":case "input":case "keygen":case "link":case "meta":case "param":case "source":case "track":case "wbr":break a;case "body":if(1>= -f.insertionMode){a.responseState.hasBody=!0;break a}break;case "html":if(0===f.insertionMode)break a}b.push(P,u(d),Q)}c.lastPushedText=!1}else{switch(d){case Yc:case Wc:case Lc:case Mc:case Kc:X(a,b,null,e.children);return;case Xc:"hidden"!==e.mode&&X(a,b,null,e.children);return;case Sc:X(a,b,null,e.children);return;case Vc:throw Error("ReactDOMServer does not yet support scope components.");case Rc:a:{d=b.blockedBoundary;c=b.blockedSegment;f=e.fallback;e=e.children;g=new Set;var m={id:null,rootSegmentID:-1, -parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:g,errorDigest:null,resources:new Set},h=ae(a,c.chunks.length,m,c.formatContext,!1,!1);c.children.push(h);c.lastPushedText=!1;var n=ae(a,0,null,c.formatContext,!1,!1);n.parentFlushed=!0;b.blockedBoundary=m;b.blockedSegment=n;a.resources.boundaryResources=m.resources;try{if(je(a,b,e),n.lastPushedText&&n.textEmbedded&&n.chunks.push(F),n.status=1,0===m.pendingTasks&&fe(a,m),ke(m,n),0===m.pendingTasks)break a}catch(q){n.status= -4,m.forceClientRender=!0,m.errorDigest=de(a,q)}finally{a.resources.boundaryResources=d?d.resources:null,b.blockedBoundary=d,b.blockedSegment=c}b=be(a,null,f,d,h,g,b.legacyContext,b.context,b.treeContext);a.pingedTasks.push(b)}return}if("object"===typeof d&&null!==d)switch(d.$$typeof){case Qc:d=d.render;S={};Ad=b;Fd=Ed=0;U=c;c=d(e,f);e=Jd(d,e,c,f);if(0!==Ed){d=b.treeContext;b.treeContext=od(d,1,0);try{X(a,b,null,e)}finally{b.treeContext=d}}else X(a,b,null,e);return;case Tc:d=d.type;e=he(d,e);ie(a, -b,c,d,e,f);return;case Nc:c=e.children;d=d._context;e=e.value;f=d._currentValue;d._currentValue=e;g=R;R=e={parent:g,depth:null===g?0:g.depth+1,context:d,parentValue:f,value:e};b.context=e;X(a,b,null,c);a=R;if(null===a)throw Error("Tried to pop a Context at the root of the app. This is a bug in React.");e=a.parentValue;a.context._currentValue=e===$c?a.context._defaultValue:e;a=R=a.parent;b.context=a;return;case Oc:e=e.children;e=e(d._currentValue);X(a,b,null,e);return;case Uc:f=d._init;d=f(d._payload); -e=he(d,e);ie(a,b,c,d,e,void 0);return}throw Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+((null==d?d:typeof d)+"."));}} -function X(a,b,c,d){b.node=d;if("object"===typeof d&&null!==d){switch(d.$$typeof){case Ic:ie(a,b,c,d.type,d.props,d.ref);return;case Jc:throw Error("Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.");case Uc:c=d._init;d=c(d._payload);X(a,b,null,d);return}if(sa(d)){le(a,b,d);return}null===d||"object"!==typeof d?c=null:(c=ad&&d[ad]||d["@@iterator"],c="function"===typeof c?c:null);if(c&&(c=c.call(d))){d=c.next();if(!d.done){var e= -[];do e.push(d.value),d=c.next();while(!d.done);le(a,b,e)}return}a=Object.prototype.toString.call(d);throw Error("Objects are not valid as a React child (found: "+("[object Object]"===a?"object with keys {"+Object.keys(d).join(", ")+"}":a)+"). If you meant to render a collection of children, use an array instead.");}"string"===typeof d?(c=b.blockedSegment,c.lastPushedText=Ja(b.blockedSegment.chunks,d,a.responseState,c.lastPushedText)):"number"===typeof d&&(c=b.blockedSegment,c.lastPushedText=Ja(b.blockedSegment.chunks, -""+d,a.responseState,c.lastPushedText))}function le(a,b,c){for(var d=c.length,e=0;e<d;e++){var f=b.treeContext;b.treeContext=od(f,d,e);try{je(a,b,c[e])}finally{b.treeContext=f}}} -function je(a,b,c){var d=b.blockedSegment.formatContext,e=b.legacyContext,f=b.context;try{return X(a,b,null,c)}catch(n){if(Kd(),c=n===td?xd():n,"object"===typeof c&&null!==c&&"function"===typeof c.then){var g=Ld(),m=b.blockedSegment,h=ae(a,m.chunks.length,null,m.formatContext,m.lastPushedText,!0);m.children.push(h);m.lastPushedText=!1;a=be(a,g,b.node,b.blockedBoundary,h,b.abortSet,b.legacyContext,b.context,b.treeContext).ping;c.then(a,a);b.blockedSegment.formatContext=d;b.legacyContext=e;b.context= -f;kd(f)}else throw b.blockedSegment.formatContext=d,b.legacyContext=e,b.context=f,kd(f),c;}}function me(a){var b=a.blockedBoundary;a=a.blockedSegment;a.status=3;ne(this,b,a)} -function oe(a,b,c){var d=a.blockedBoundary;a.blockedSegment.status=3;null===d?(b.allPendingTasks--,1!==b.status&&2!==b.status&&(de(b,c),ee(b,c))):(d.pendingTasks--,d.forceClientRender||(d.forceClientRender=!0,d.errorDigest=b.onError(c),d.parentFlushed&&b.clientRenderedBoundaries.push(d)),d.fallbackAbortableTasks.forEach(function(a){return oe(a,b,c)}),d.fallbackAbortableTasks.clear(),b.allPendingTasks--,0===b.allPendingTasks&&(a=b.onAllReady,a()))} -function ke(a,b){if(0===b.chunks.length&&1===b.children.length&&null===b.children[0].boundary){var c=b.children[0];c.id=b.id;c.parentFlushed=!0;1===c.status&&ke(a,c)}else a.completedSegments.push(b)} -function ne(a,b,c){if(null===b){if(c.parentFlushed){if(null!==a.completedRootSegment)throw Error("There can only be one root segment. This is a bug in React.");a.completedRootSegment=c}a.pendingRootTasks--;0===a.pendingRootTasks&&(a.onShellError=Zd,b=a.onShellReady,b())}else b.pendingTasks--,b.forceClientRender||(0===b.pendingTasks?(c.parentFlushed&&1===c.status&&ke(b,c),fe(a,b),b.parentFlushed&&a.completedBoundaries.push(b),b.fallbackAbortableTasks.forEach(me,a),b.fallbackAbortableTasks.clear()): -c.parentFlushed&&1===c.status&&(ke(b,c),1===b.completedSegments.length&&b.parentFlushed&&a.partialBoundaries.push(b)));a.allPendingTasks--;0===a.allPendingTasks&&(a=a.onAllReady,a())} -function ce(a){if(2!==a.status){var b=R,c=Wd.current;Wd.current=Ud;var d=Xd.current;Xd.current=Vd;var e=a.resources;xa.push(C);C=e;e=ta.current;ta.current=wa;var f=Td;Td=a.responseState;try{var g=a.pingedTasks,m;for(m=0;m<g.length;m++){var h=g[m];var n=a,q=h.blockedBoundary;n.resources.boundaryResources=q?q.resources:null;var t=h.blockedSegment;if(0===t.status){kd(h.context);try{var D=h.thenableState;h.thenableState=null;X(n,h,D,h.node);t.lastPushedText&&t.textEmbedded&&t.chunks.push(F);h.abortSet.delete(h); -t.status=1;ne(n,h.blockedBoundary,t)}catch(ma){Kd();var z=ma===td?xd():ma;if("object"===typeof z&&null!==z&&"function"===typeof z.then){var Y=h.ping;z.then(Y,Y);h.thenableState=Ld()}else{h.abortSet.delete(h);t.status=4;var J=n,L=h.blockedBoundary,Z=z,we=de(J,Z);null===L?ee(J,Z):(L.pendingTasks--,L.forceClientRender||(L.forceClientRender=!0,L.errorDigest=we,L.parentFlushed&&J.clientRenderedBoundaries.push(L)));J.allPendingTasks--;if(0===J.allPendingTasks){var xe=J.onAllReady;xe()}}}finally{n.resources.boundaryResources= -null}}}g.splice(0,m);null!==a.destination&&pe(a,a.destination)}catch(ma){de(a,ma),ee(a,ma)}finally{Td=f,Wd.current=c,Xd.current=d,C=xa.pop(),ta.current=e,c===Ud&&kd(b)}}} -function qe(a,b,c){c.parentFlushed=!0;switch(c.status){case 0:var d=c.id=a.nextSegmentId++;c.lastPushedText=!1;c.textEmbedded=!1;a=a.responseState;p(b,fb);p(b,a.placeholderPrefix);a=u(d.toString(16));p(b,a);return r(b,gb);case 1:c.status=2;var e=!0;d=c.chunks;var f=0;c=c.children;for(var g=0;g<c.length;g++){for(e=c[g];f<e.index;f++)p(b,d[f]);e=re(a,b,e)}for(;f<d.length-1;f++)p(b,d[f]);f<d.length&&(e=r(b,d[f]));return e;default:throw Error("Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React."); +'use strict';var aa=require("react"),ba=require("react-dom");"function"===typeof AsyncLocalStorage&&new AsyncLocalStorage;var k=null,l=0;function p(a,b){if(0!==b.length)if(512<b.length)0<l&&(a.enqueue(new Uint8Array(k.buffer,0,l)),k=new Uint8Array(512),l=0),a.enqueue(b);else{var c=k.length-l;c<b.length&&(0===c?a.enqueue(k):(k.set(b.subarray(0,c),l),a.enqueue(k),b=b.subarray(c)),k=new Uint8Array(512),l=0);k.set(b,l);l+=b.length}}function u(a,b){p(a,b);return!0} +function ca(a){k&&0<l&&(a.enqueue(new Uint8Array(k.buffer,0,l)),k=null,l=0)}var da=new TextEncoder;function v(a){return da.encode(a)}function w(a){return da.encode(a)}function ea(a,b){"function"===typeof a.error?a.error(b):a.close()} +var y=Object.prototype.hasOwnProperty,fa=/^[: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][: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\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ha={},ja={}; +function ka(a){if(y.call(ja,a))return!0;if(y.call(ha,a))return!1;if(fa.test(a))return ja[a]=!0;ha[a]=!0;return!1}function z(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var A={}; +"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){A[a]=new z(a,0,!1,a,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];A[b]=new z(b,1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){A[a]=new z(a,2,!1,a.toLowerCase(),null,!1,!1)}); +["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){A[a]=new z(a,2,!1,a,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){A[a]=new z(a,3,!1,a.toLowerCase(),null,!1,!1)}); +["checked","multiple","muted","selected"].forEach(function(a){A[a]=new z(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){A[a]=new z(a,4,!1,a,null,!1,!1)});["cols","rows","size","span"].forEach(function(a){A[a]=new z(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){A[a]=new z(a,5,!1,a.toLowerCase(),null,!1,!1)});var la=/[\-:]([a-z])/g;function ma(a){return a[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 transform-origin 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".split(" ").forEach(function(a){var b=a.replace(la, +ma);A[b]=new z(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(la,ma);A[b]=new z(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(la,ma);A[b]=new z(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){A[a]=new z(a,1,!1,a.toLowerCase(),null,!1,!1)}); +A.xlinkHref=new z("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){A[a]=new z(a,1,!1,a.toLowerCase(),null,!0,!0)}); +var oa={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0, +zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pa=["Webkit","ms","Moz","O"];Object.keys(oa).forEach(function(a){pa.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);oa[b]=oa[a]})});var qa=/["'&<>]/; +function B(a){if("boolean"===typeof a||"number"===typeof a)return""+a;a=""+a;var b=qa.exec(a);if(b){var c="",d,e=0;for(d=b.index;d<a.length;d++){switch(a.charCodeAt(d)){case 34:b=""";break;case 38:b="&";break;case 39:b="'";break;case 60:b="<";break;case 62:b=">";break;default:continue}e!==d&&(c+=a.substring(e,d));e=d+1;c+=b}a=e!==d?c+a.substring(e,d):c}return a}var ra=/([A-Z])/g,sa=/^ms-/,ta=Array.isArray,C=Object.assign,D=null,ua=[],xa={preload:va,preinit:wa}; +function va(a,b){if(D){var c=D;if("string"===typeof a&&a&&"object"===typeof b&&null!==b){var d=b.as,e=c.preloadsMap.get(a);e||(e=E(c,a,d,{href:a,rel:"preload",as:d,crossOrigin:"font"===d?"":b.crossOrigin,integrity:b.integrity}));switch(d){case "font":c.fontPreloads.add(e);break;case "style":c.explicitStylePreloads.add(e);break;case "script":c.explicitScriptPreloads.add(e)}}}} +function wa(a,b){if(D)a:{var c=D;if("string"===typeof a&&a&&"object"===typeof b&&null!==b)switch(b.as){case "style":var d=c.stylesMap.get(a);d||(d=b.precedence||"default",d=ya(c,a,d,{rel:"stylesheet",href:a,"data-precedence":d,crossOrigin:b.crossOrigin}));d.set.add(d);c.explicitStylePreloads.add(d.hint);break a;case "script":d=c.scriptsMap.get(a),d||(d=za(c,a,{src:a,async:!0,crossOrigin:b.crossOrigin,integrity:b.integrity}),c.scripts.add(d))}}} +function Aa(a,b){return{rel:"preload",as:"style",href:a,crossOrigin:b.crossOrigin,integrity:b.integrity,media:b.media,hrefLang:b.hrefLang,referrerPolicy:b.referrerPolicy}}function Ba(a,b){return{rel:"preload",as:"script",href:a,crossOrigin:b.crossOrigin,integrity:b.integrity,referrerPolicy:b.referrerPolicy}}function E(a,b,c,d){c={type:"preload",as:c,href:b,flushed:!1,props:d};a.preloadsMap.set(b,c);return c} +function ya(a,b,c,d){var e=a.stylesMap,f=a.preloadsMap,g=a.precedences,h=g.get(c);h||(h=new Set,g.set(c,h));(f=f.get(b))?(a=f.props,null==d.crossOrigin&&(d.crossOrigin=a.crossOrigin),null==d.referrerPolicy&&(d.referrerPolicy=a.referrerPolicy),null==d.title&&(d.title=a.title)):(f=Aa(b,d),f=E(a,b,"style",f),a.explicitStylePreloads.add(f));c={type:"style",href:b,precedence:c,flushed:!1,inShell:!1,props:d,hint:f,set:h};e.set(b,c);return c} +function za(a,b,c){var d=a.scriptsMap,e=a.preloadsMap.get(b);e?(a=e.props,null==c.crossOrigin&&(c.crossOrigin=a.crossOrigin),null==c.referrerPolicy&&(c.referrerPolicy=a.referrerPolicy),null==c.integrity&&(c.integrity=a.integrity)):(e=Ba(b,c),e=E(a,b,"script",e),a.explicitScriptPreloads.add(e));c={type:"script",src:b,flushed:!1,props:c,hint:e};d.set(b,c);return c} +function Ca(a,b){if(!D)throw Error('"currentResources" was expected to exist. This is a bug in React.');var c=D;switch(a){case "title":var d=b.children;d=Array.isArray(d)?1===d.length?d[0]:null:d;if("function"!==typeof d&&"symbol"!==typeof d&&null!==d&&void 0!==d){d=""+d;var e="title::"+d;a=c.headsMap.get(e);a||(b=C({},b),b.children=d,a={type:"title",props:b,flushed:!1},c.headsMap.set(e,a),c.headResources.add(a))}return!0;case "meta":if("string"===typeof b.charSet)d="charSet";else if("string"===typeof b.content)if(a= +"::"+b.content,"string"===typeof b.httpEquiv)d="httpEquiv::"+b.httpEquiv+a;else if("string"===typeof b.name)d="name::"+b.name+a;else if("string"===typeof b.itemProp)d="itemProp::"+b.itemProp+a;else if("string"===typeof b.property){var f=b.property;d="property::"+f+a;e=f;a=f.split(":").slice(0,-1).join(":");(a=c.structuredMetaKeys.get(a))&&(d=a.key+"::child::"+d)}d&&!c.headsMap.has(d)&&(b={type:"meta",key:d,props:C({},b),flushed:!1},c.headsMap.set(d,b),"charSet"===d?c.charset=b:(e&&c.structuredMetaKeys.set(e, +b),c.headResources.add(b)));return!0;case "base":return d=b.target,e=b.href,d="base"+("string"===typeof e?'[href="'+e+'"]':":not([href])")+("string"===typeof d?'[target="'+d+'"]':":not([target])"),c.headsMap.has(d)||(b={type:"base",props:C({},b),flushed:!1},c.headsMap.set(d,b),c.bases.add(b)),!0}return!1} +function Da(a){if(!D)throw Error('"currentResources" was expected to exist. This is a bug in React.');var b=D,c=a.rel,d=a.href;if(!d||"string"!==typeof d||!c||"string"!==typeof c)return!1;switch(c){case "stylesheet":var e=a.onLoad,f=a.onError;c=a.precedence;var g=a.disabled;if("string"!==typeof c||e||f||null!=g)return c=b.preloadsMap.get(d),c||(c=E(b,d,"style",Aa(d,a)),b.usedStylePreloads.add(c)),!1;e=b.stylesMap.get(d);e||(a=C({},a),a.href=d,a.rel="stylesheet",a["data-precedence"]=c,delete a.precedence, +e=ya(D,d,c,a),b.usedStylePreloads.add(e.hint));b.boundaryResources?b.boundaryResources.add(e):e.set.add(e);return!0;case "preload":switch(e=a.as,e){case "script":case "style":case "font":c=b.preloadsMap.get(d);if(!c)switch(a=C({},a),a.href=d,a.rel="preload",a.as=e,"font"===e&&(a.crossOrigin=""),c=E(b,d,e,a),e){case "script":b.explicitScriptPreloads.add(c);break;case "style":b.explicitStylePreloads.add(c);break;case "font":b.fontPreloads.add(c)}return!0}}if(a.onLoad||a.onError)return!0;d="rel:"+c+ +"::href:"+d+"::sizes:"+("string"===typeof a.sizes?a.sizes:"")+"::media:"+("string"===typeof a.media?a.media:"");e=b.headsMap.get(d);if(!e)switch(e={type:"link",props:C({},a),flushed:!1},b.headsMap.set(d,e),c){case "preconnect":case "dns-prefetch":b.preconnects.add(e);break;default:b.headResources.add(e)}return!0}function Ea(a,b){var c=a.boundaryResources;c&&(b.forEach(function(a){return c.add(a)}),b.clear())}function Fa(a,b){b.forEach(function(a){return a.set.add(a)});b.clear()}var Ga=ba.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Dispatcher; +w('"></template>');var Ha=w("<script>"),Ia=w("\x3c/script>"),Ja=w('<script src="'),Ka=w('<script type="module" src="'),La=w('" integrity="'),Ma=w('" async="">\x3c/script>'),Na=/(<\/|<)(s)(cript)/gi;function Oa(a,b,c,d){return""+b+("s"===c?"\\u0073":"\\u0053")+d} +function Pa(a,b,c,d,e){a=void 0===a?"":a;b=void 0===b?Ha:w('<script nonce="'+B(b)+'">');var f=[];void 0!==c&&f.push(b,v((""+c).replace(Na,Oa)),Ia);if(void 0!==d)for(c=0;c<d.length;c++){var g=d[c],h="string"===typeof g?void 0:g.integrity;f.push(Ja,v(B("string"===typeof g?g:g.src)));h&&f.push(La,v(B(h)));f.push(Ma)}if(void 0!==e)for(d=0;d<e.length;d++)c=e[d],g="string"===typeof c?void 0:c.integrity,f.push(Ka,v(B("string"===typeof c?c:c.src))),g&&f.push(La,v(B(g))),f.push(Ma);return{bootstrapChunks:f, +placeholderPrefix:w(a+"P:"),segmentPrefix:w(a+"S:"),boundaryPrefix:a+"B:",idPrefix:a,nextSuspenseID:0,streamingFormat:0,startInlineScript:b,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1,sentStyleInsertionFunction:!1,externalRuntimeConfig:null}}function F(a,b,c){return{insertionMode:a,selectedValue:b,noscriptTagInScope:c}}function Qa(a){return F("http://www.w3.org/2000/svg"===a?2:"http://www.w3.org/1998/Math/MathML"===a?3:0,null,!1)} +function Ra(a,b,c){switch(b){case "noscript":return F(1,null,!0);case "select":return F(1,null!=c.value?c.value:c.defaultValue,a.noscriptTagInScope);case "svg":return F(2,null,a.noscriptTagInScope);case "math":return F(3,null,a.noscriptTagInScope);case "foreignObject":return F(1,null,a.noscriptTagInScope);case "table":return F(4,null,a.noscriptTagInScope);case "thead":case "tbody":case "tfoot":return F(5,null,a.noscriptTagInScope);case "colgroup":return F(7,null,a.noscriptTagInScope);case "tr":return F(6, +null,a.noscriptTagInScope)}return 4<=a.insertionMode||0===a.insertionMode?F(1,null,a.noscriptTagInScope):a}var H=w("\x3c!-- --\x3e");function Sa(a,b,c,d){if(""===b)return d;d&&a.push(H);a.push(v(B(b)));return!0}var Ta=new Map,Ua=w(' style="'),Va=w(":"),Wa=w(";"); +function Xa(a,b,c){if("object"!==typeof c)throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");b=!0;for(var d in c)if(y.call(c,d)){var e=c[d];if(null!=e&&"boolean"!==typeof e&&""!==e){if(0===d.indexOf("--")){var f=v(B(d));e=v(B((""+e).trim()))}else{f=d;var g=Ta.get(f);void 0!==g?f=g:(g=w(B(f.replace(ra,"-$1").toLowerCase().replace(sa,"-ms-"))),Ta.set(f,g),f=g);e="number"===typeof e?0===e|| +y.call(oa,d)?v(""+e):v(e+"px"):v(B((""+e).trim()))}b?(b=!1,a.push(Ua,f,Va,e)):a.push(Wa,f,Va,e)}}b||a.push(I)}var K=w(" "),L=w('="'),I=w('"'),Ya=w('=""'); +function N(a,b,c,d){switch(c){case "style":Xa(a,b,d);return;case "defaultValue":case "defaultChecked":case "innerHTML":case "suppressContentEditableWarning":case "suppressHydrationWarning":return}if(!(2<c.length)||"o"!==c[0]&&"O"!==c[0]||"n"!==c[1]&&"N"!==c[1])if(b=A.hasOwnProperty(c)?A[c]:null,null!==b){switch(typeof d){case "function":case "symbol":return;case "boolean":if(!b.acceptsBooleans)return}c=v(b.attributeName);switch(b.type){case 3:d&&a.push(K,c,Ya);break;case 4:!0===d?a.push(K,c,Ya):!1!== +d&&a.push(K,c,L,v(B(d)),I);break;case 5:isNaN(d)||a.push(K,c,L,v(B(d)),I);break;case 6:!isNaN(d)&&1<=d&&a.push(K,c,L,v(B(d)),I);break;default:b.sanitizeURL&&(d=""+d),a.push(K,c,L,v(B(d)),I)}}else if(ka(c)){switch(typeof d){case "function":case "symbol":return;case "boolean":if(b=c.toLowerCase().slice(0,5),"data-"!==b&&"aria-"!==b)return}a.push(K,v(c),L,v(B(d)),I)}}var O=w(">"),Za=w("/>"); +function $a(a,b,c){if(null!=b){if(null!=c)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if("object"!==typeof b||!("__html"in b))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.");b=b.__html;null!==b&&void 0!==b&&a.push(v(""+b))}}function ab(a){var b="";aa.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}var bb=w(' selected=""'); +function P(a,b,c){var d="stylesheet"===b.rel;a.push(Q("link"));for(var e in b)if(y.call(b,e)){var f=b[e];if(null!=f)switch(e){case "children":case "dangerouslySetInnerHTML":throw Error("link is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");case "precedence":if(d)continue;default:N(a,c,e,f)}}a.push(Za);return null} +function R(a,b,c,d){a.push(Q(c));for(var e in b)if(y.call(b,e)){var f=b[e];if(null!=f)switch(e){case "children":case "dangerouslySetInnerHTML":throw Error(c+" is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:N(a,d,e,f)}}a.push(Za);return null} +function cb(a,b,c){a.push(Q("title"));var d=null,e;for(e in b)if(y.call(b,e)){var f=b[e];if(null!=f)switch(e){case "children":d=f;break;case "dangerouslySetInnerHTML":throw Error("`dangerouslySetInnerHTML` does not make sense on <title>.");default:N(a,c,e,f)}}a.push(O);b=Array.isArray(d)?2>d.length?d[0]:null:d;"function"!==typeof b&&"symbol"!==typeof b&&null!==b&&void 0!==b&&a.push(v(B(""+b)));a.push(db,v("title"),eb);return null} +function fb(a,b,c){a.push(Q("script"));var d=null,e=null,f;for(f in b)if(y.call(b,f)){var g=b[f];if(null!=g)switch(f){case "children":d=g;break;case "dangerouslySetInnerHTML":e=g;break;default:N(a,c,f,g)}}a.push(O);$a(a,e,d);"string"===typeof d&&a.push(v(B(d)));a.push(db,v("script"),eb);return null} +function gb(a,b,c,d){a.push(Q(c));var e=c=null,f;for(f in b)if(y.call(b,f)){var g=b[f];if(null!=g)switch(f){case "children":c=g;break;case "dangerouslySetInnerHTML":e=g;break;default:N(a,d,f,g)}}a.push(O);$a(a,e,c);return"string"===typeof c?(a.push(v(B(c))),null):c}var hb=w("\n"),ib=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,jb=new Map;function Q(a){var b=jb.get(a);if(void 0===b){if(!ib.test(a))throw Error("Invalid tag: "+a);b=w("<"+a);jb.set(a,b)}return b}var kb=w("<!DOCTYPE html>"); +function lb(a,b,c,d,e,f,g){switch(c){case "select":a.push(Q("select"));var h=g=null,n;for(n in d)if(y.call(d,n)){var m=d[n];if(null!=m)switch(n){case "children":g=m;break;case "dangerouslySetInnerHTML":h=m;break;case "defaultValue":case "value":break;default:N(a,e,n,m)}}a.push(O);$a(a,h,g);return g;case "option":g=f.selectedValue;a.push(Q("option"));var r=n=m=null,q=null;for(h in d)if(y.call(d,h)){var t=d[h];if(null!=t)switch(h){case "children":m=t;break;case "selected":r=t;break;case "dangerouslySetInnerHTML":q= +t;break;case "value":n=t;default:N(a,e,h,t)}}if(null!=g)if(d=null!==n?""+n:ab(m),ta(g))for(e=0;e<g.length;e++){if(""+g[e]===d){a.push(bb);break}}else""+g===d&&a.push(bb);else r&&a.push(bb);a.push(O);$a(a,q,m);return m;case "textarea":a.push(Q("textarea"));m=h=g=null;for(q in d)if(y.call(d,q)&&(n=d[q],null!=n))switch(q){case "children":m=n;break;case "value":g=n;break;case "defaultValue":h=n;break;case "dangerouslySetInnerHTML":throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>."); +default:N(a,e,q,n)}null===g&&null!==h&&(g=h);a.push(O);if(null!=m){if(null!=g)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(ta(m)&&1<m.length)throw Error("<textarea> can only have at most one child.");g=""+m}"string"===typeof g&&"\n"===g[0]&&a.push(hb);null!==g&&a.push(v(B(""+g)));return null;case "input":a.push(Q("input"));n=q=h=g=null;for(m in d)if(y.call(d,m)&&(r=d[m],null!=r))switch(m){case "children":case "dangerouslySetInnerHTML":throw Error("input is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."); +case "defaultChecked":n=r;break;case "defaultValue":h=r;break;case "checked":q=r;break;case "value":g=r;break;default:N(a,e,m,r)}null!==q?N(a,e,"checked",q):null!==n&&N(a,e,"checked",n);null!==g?N(a,e,"value",g):null!==h&&N(a,e,"value",h);a.push(Za);return null;case "menuitem":a.push(Q("menuitem"));for(var x in d)if(y.call(d,x)&&(g=d[x],null!=g))switch(x){case "children":case "dangerouslySetInnerHTML":throw Error("menuitems cannot have `children` nor `dangerouslySetInnerHTML`.");default:N(a,e,x,g)}a.push(O); +return null;case "title":return a=2!==f.insertionMode&&!f.noscriptTagInScope&&Ca("title",d)?null:cb(a,d,e),a;case "link":return!f.noscriptTagInScope&&Da(d)?(g&&a.push(H),a=null):a=P(a,d,e),a;case "script":if(h=!f.noscriptTagInScope){if(!D)throw Error('"currentResources" was expected to exist. This is a bug in React.');h=D;m=d.src;q=d.onLoad;n=d.onError;m&&"string"===typeof m?d.async?(q||n?(q=h.preloadsMap.get(m),q||(q=E(h,m,"script",Ba(m,d)),h.usedScriptPreloads.add(q))):(q=h.scriptsMap.get(m),q|| +(q=C({},d),q.src=m,q=za(h,m,q),h.scripts.add(q))),h=!0):h=!1:h=!1}h?(g&&a.push(H),a=null):a=fb(a,d,e);return a;case "meta":return!f.noscriptTagInScope&&Ca("meta",d)?(g&&a.push(H),a=null):a=R(a,d,"meta",e),a;case "base":return!f.noscriptTagInScope&&Ca("base",d)?(g&&a.push(H),a=null):a=R(a,d,"base",e),a;case "listing":case "pre":a.push(Q(c));h=g=null;for(r in d)if(y.call(d,r)&&(m=d[r],null!=m))switch(r){case "children":g=m;break;case "dangerouslySetInnerHTML":h=m;break;default:N(a,e,r,m)}a.push(O); +if(null!=h){if(null!=g)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if("object"!==typeof h||!("__html"in h))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.");d=h.__html;null!==d&&void 0!==d&&("string"===typeof d&&0<d.length&&"\n"===d[0]?a.push(hb,v(d)):a.push(v(""+d)))}"string"===typeof g&&"\n"===g[0]&&a.push(hb);return g;case "area":case "br":case "col":case "embed":case "hr":case "img":case "keygen":case "param":case "source":case "track":case "wbr":return R(a, +d,c,e);case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return gb(a,d,c,e);case "head":return gb(b,d,c,e);case "html":return 0===f.insertionMode&&b.push(kb),gb(b,d,c,e);default:if(-1===c.indexOf("-")&&"string"!==typeof d.is)return gb(a,d,c,e);a.push(Q(c));h=g=null;for(t in d)if(y.call(d,t)&&(m=d[t],null!=m))switch(t){case "children":g=m;break;case "dangerouslySetInnerHTML":h=m;break; +case "style":Xa(a,e,m);break;case "suppressContentEditableWarning":case "suppressHydrationWarning":break;default:ka(t)&&"function"!==typeof m&&"symbol"!==typeof m&&a.push(K,v(t),L,v(B(m)),I)}a.push(O);$a(a,h,g);return g}}var db=w("</"),eb=w(">"); +function mb(a,b,c){switch(c){case "title":case "script":case "area":case "base":case "br":case "col":case "embed":case "hr":case "img":case "input":case "keygen":case "link":case "meta":case "param":case "source":case "track":case "wbr":return;case "body":b.unshift(db,v(c),eb);return;case "html":b.push(db,v(c),eb);return}a.push(db,v(c),eb)} +var nb=w('<template id="'),ob=w('"></template>'),pb=w("\x3c!--$--\x3e"),qb=w('\x3c!--$?--\x3e<template id="'),rb=w('"></template>'),sb=w("\x3c!--$!--\x3e"),tb=w("\x3c!--/$--\x3e"),ub=w("<template"),vb=w('"'),wb=w(' data-dgst="');w(' data-msg="');w(' data-stck="');var xb=w("></template>");function yb(a,b,c){p(a,qb);if(null===c)throw Error("An ID must have been assigned before we can complete the boundary.");p(a,c);return u(a,rb)} +var zb=w('<div hidden id="'),Ab=w('">'),Bb=w("</div>"),Cb=w('<svg aria-hidden="true" style="display:none" id="'),Db=w('">'),Eb=w("</svg>"),Fb=w('<math aria-hidden="true" style="display:none" id="'),Gb=w('">'),Hb=w("</math>"),Ib=w('<table hidden id="'),Jb=w('">'),Kb=w("</table>"),Lb=w('<table hidden><tbody id="'),Mb=w('">'),Nb=w("</tbody></table>"),Ob=w('<table hidden><tr id="'),Pb=w('">'),Qb=w("</tr></table>"),Rb=w('<table hidden><colgroup id="'),Sb=w('">'),Tb=w("</colgroup></table>"); +function Ub(a,b,c,d){switch(c.insertionMode){case 0:case 1:return p(a,zb),p(a,b.segmentPrefix),p(a,v(d.toString(16))),u(a,Ab);case 2:return p(a,Cb),p(a,b.segmentPrefix),p(a,v(d.toString(16))),u(a,Db);case 3:return p(a,Fb),p(a,b.segmentPrefix),p(a,v(d.toString(16))),u(a,Gb);case 4:return p(a,Ib),p(a,b.segmentPrefix),p(a,v(d.toString(16))),u(a,Jb);case 5:return p(a,Lb),p(a,b.segmentPrefix),p(a,v(d.toString(16))),u(a,Mb);case 6:return p(a,Ob),p(a,b.segmentPrefix),p(a,v(d.toString(16))),u(a,Pb);case 7:return p(a, +Rb),p(a,b.segmentPrefix),p(a,v(d.toString(16))),u(a,Sb);default:throw Error("Unknown insertion mode. This is a bug in React.");}}function Vb(a,b){switch(b.insertionMode){case 0:case 1:return u(a,Bb);case 2:return u(a,Eb);case 3:return u(a,Hb);case 4:return u(a,Kb);case 5:return u(a,Nb);case 6:return u(a,Qb);case 7:return u(a,Tb);default:throw Error("Unknown insertion mode. This is a bug in React.");}} +var Wb=w('$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};;$RS("'),Xb=w('$RS("'),Yb=w('","'),Zb=w('")\x3c/script>');w('<template data-rsi="" data-sid="');w('" data-pid="'); +var $b=w('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};;$RC("'),ac=w('$RC("'), +bc=w('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};;$RM=new Map;\n$RR=function(p,q,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};;$RR("'), +cc=w('$RM=new Map;\n$RR=function(p,q,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};;$RR("'), +dc=w('$RR("'),ec=w('","'),fc=w('",'),gc=w('"'),hc=w(")\x3c/script>");w('<template data-rci="" data-bid="');w('<template data-rri="" data-bid="');w('" data-sid="');w('" data-sty="');var ic=w('$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};;$RX("'),jc=w('$RX("'),kc=w('"'),lc=w(","),mc=w(")\x3c/script>");w('<template data-rxi="" data-bid="');w('" data-dgst="');w('" data-msg="'); +w('" data-stck="');var nc=/[<\u2028\u2029]/g;function oc(a){return JSON.stringify(a).replace(nc,function(a){switch(a){case "<":return"\\u003c";case "\u2028":return"\\u2028";case "\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React");}})}var pc=/[&><\u2028\u2029]/g; +function qc(a){return JSON.stringify(a).replace(pc,function(a){switch(a){case "&":return"\\u0026";case ">":return"\\u003e";case "<":return"\\u003c";case "\u2028":return"\\u2028";case "\u2029":return"\\u2029";default:throw Error("escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React");}})}var rc=w('<style data-precedence="'),sc=w('"></style>'); +function tc(a,b,c){function d(a){a.flushed||(P(e,a.props,c),a.flushed=!0)}var e=[],f=b.charset,g=b.bases,h=b.preconnects,n=b.fontPreloads,m=b.precedences,r=b.usedStylePreloads,q=b.scripts,t=b.usedScriptPreloads,x=b.explicitStylePreloads,M=b.explicitScriptPreloads,G=b.headResources;f&&(R(e,f.props,"meta",c),f.flushed=!0,b.charset=null);g.forEach(function(a){R(e,a.props,"base",c);a.flushed=!0});g.clear();h.forEach(function(a){P(e,a.props,c);a.flushed=!0});h.clear();n.forEach(function(a){P(e,a.props, +c);a.flushed=!0});n.clear();m.forEach(function(a,b){a.size?(a.forEach(function(a){P(e,a.props,c);a.flushed=!0;a.inShell=!0;a.hint.flushed=!0}),a.clear()):e.push(rc,v(B(b)),sc)});r.forEach(d);r.clear();q.forEach(function(a){fb(e,a.props,c);a.flushed=!0;a.hint.flushed=!0});q.clear();t.forEach(d);t.clear();x.forEach(d);x.clear();M.forEach(d);M.clear();G.forEach(function(a){switch(a.type){case "title":cb(e,a.props,c);break;case "meta":R(e,a.props,"meta",c);break;case "link":P(e,a.props,c)}a.flushed=!0}); +G.clear();f=!0;for(b=0;b<e.length-1;b++)p(a,e[b]);b<e.length&&(f=u(a,e[b]));return f} +function uc(a,b,c){function d(a){a.flushed||(P(e,a.props,c),a.flushed=!0)}var e=[],f=b.charset,g=b.preconnects,h=b.fontPreloads,n=b.usedStylePreloads,m=b.scripts,r=b.usedScriptPreloads,q=b.explicitStylePreloads,t=b.explicitScriptPreloads,x=b.headResources;f&&(R(e,f.props,"meta",c),f.flushed=!0,b.charset=null);g.forEach(function(a){P(e,a.props,c);a.flushed=!0});g.clear();h.forEach(function(a){P(e,a.props,c);a.flushed=!0});h.clear();n.forEach(d);n.clear();m.forEach(function(a){gb(e,a.props,"script", +c);mb(e,e,"script",a.props);a.flushed=!0;a.hint.flushed=!0});m.clear();r.forEach(d);r.clear();q.forEach(d);q.clear();t.forEach(d);t.clear();x.forEach(function(a){switch(a.type){case "title":cb(e,a.props,c);break;case "meta":R(e,a.props,"meta",c);break;case "link":P(e,a.props,c)}a.flushed=!0});x.clear();f=!0;for(b=0;b<e.length-1;b++)p(a,e[b]);b<e.length&&(f=u(a,e[b]));return f}var vc=w("["),wc=w(",["),xc=w(","),yc=w("]"); +function zc(a,b){p(a,vc);var c=vc;b.forEach(function(b){if(!b.inShell)if(b.flushed)p(a,c),p(a,v(qc(""+b.href))),p(a,yc),c=wc;else{p(a,c);var d=b.precedence,f=b.props;p(a,v(qc(""+b.href)));d=""+d;p(a,xc);p(a,v(qc(d)));for(var g in f)if(y.call(f,g)){var h=f[g];if(null!=h)switch(g){case "href":case "rel":case "precedence":case "data-precedence":break;case "children":case "dangerouslySetInnerHTML":throw Error("link is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."); +default:a:{d=a;var n=g,m=n.toLowerCase();switch(typeof h){case "function":case "symbol":break a}switch(n){case "innerHTML":case "dangerouslySetInnerHTML":case "suppressContentEditableWarning":case "suppressHydrationWarning":case "style":break a;case "className":m="class";break;case "hidden":if(!1===h)break a;break;case "src":case "href":break;default:if(!ka(n))break a}if(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])h=""+h,p(d,xc),p(d,v(qc(m))),p(d,xc),p(d,v(qc(h)))}}}p(a,yc);c=wc; +b.flushed=!0;b.hint.flushed=!0}});p(a,yc)} +var Ac=Symbol.for("react.element"),Bc=Symbol.for("react.portal"),Cc=Symbol.for("react.fragment"),Dc=Symbol.for("react.strict_mode"),Ec=Symbol.for("react.profiler"),Fc=Symbol.for("react.provider"),Gc=Symbol.for("react.context"),Hc=Symbol.for("react.server_context"),Ic=Symbol.for("react.forward_ref"),Jc=Symbol.for("react.suspense"),Kc=Symbol.for("react.suspense_list"),Lc=Symbol.for("react.memo"),Mc=Symbol.for("react.lazy"),Nc=Symbol.for("react.scope"),Oc=Symbol.for("react.debug_trace_mode"),Pc=Symbol.for("react.offscreen"), +Qc=Symbol.for("react.legacy_hidden"),Rc=Symbol.for("react.cache"),Sc=Symbol.for("react.default_value"),Tc=Symbol.iterator; +function Uc(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case Cc:return"Fragment";case Bc:return"Portal";case Ec:return"Profiler";case Dc:return"StrictMode";case Jc:return"Suspense";case Kc:return"SuspenseList";case Rc:return"Cache"}if("object"===typeof a)switch(a.$$typeof){case Gc:return(a.displayName||"Context")+".Consumer";case Fc:return(a._context.displayName||"Context")+".Provider";case Ic:var b=a.render;a=a.displayName; +a||(a=b.displayName||b.name||"",a=""!==a?"ForwardRef("+a+")":"ForwardRef");return a;case Lc:return b=a.displayName||null,null!==b?b:Uc(a.type)||"Memo";case Mc:b=a._payload;a=a._init;try{return Uc(a(b))}catch(c){break}case Hc:return(a.displayName||a._globalName)+".Provider"}return null}var Vc=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Wc={};function Xc(a,b){a=a.contextTypes;if(!a)return Wc;var c={},d;for(d in a)c[d]=b[d];return c}var S=null; +function Yc(a,b){if(a!==b){a.context._currentValue=a.parentValue;a=a.parent;var c=b.parent;if(null===a){if(null!==c)throw Error("The stacks must reach the root at the same time. This is a bug in React.");}else{if(null===c)throw Error("The stacks must reach the root at the same time. This is a bug in React.");Yc(a,c)}b.context._currentValue=b.value}}function Zc(a){a.context._currentValue=a.parentValue;a=a.parent;null!==a&&Zc(a)} +function $c(a){var b=a.parent;null!==b&&$c(b);a.context._currentValue=a.value}function ad(a,b){a.context._currentValue=a.parentValue;a=a.parent;if(null===a)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===b.depth?Yc(a,b):ad(a,b)} +function bd(a,b){var c=b.parent;if(null===c)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===c.depth?Yc(a,c):bd(a,c);b.context._currentValue=b.value}function cd(a){var b=S;b!==a&&(null===b?$c(a):null===a?Zc(b):b.depth===a.depth?Yc(b,a):b.depth>a.depth?ad(b,a):bd(b,a),S=a)} +var dd={isMounted:function(){return!1},enqueueSetState:function(a,b){a=a._reactInternals;null!==a.queue&&a.queue.push(b)},enqueueReplaceState:function(a,b){a=a._reactInternals;a.replace=!0;a.queue=[b]},enqueueForceUpdate:function(){}}; +function ed(a,b,c,d){var e=void 0!==a.state?a.state:null;a.updater=dd;a.props=c;a.state=e;var f={queue:[],replace:!1};a._reactInternals=f;var g=b.contextType;a.context="object"===typeof g&&null!==g?g._currentValue:d;g=b.getDerivedStateFromProps;"function"===typeof g&&(g=g(c,e),e=null===g||void 0===g?e:C({},e,g),a.state=e);if("function"!==typeof b.getDerivedStateFromProps&&"function"!==typeof a.getSnapshotBeforeUpdate&&("function"===typeof a.UNSAFE_componentWillMount||"function"===typeof a.componentWillMount))if(b= +a.state,"function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),b!==a.state&&dd.enqueueReplaceState(a,a.state,null),null!==f.queue&&0<f.queue.length)if(b=f.queue,g=f.replace,f.queue=null,f.replace=!1,g&&1===b.length)a.state=b[0];else{f=g?b[0]:a.state;e=!0;for(g=g?1:0;g<b.length;g++){var h=b[g];h="function"===typeof h?h.call(a,f,c,d):h;null!=h&&(e?(e=!1,f=C({},f,h)):C(f,h))}a.state=f}else f.queue=null} +var fd={id:1,overflow:""};function gd(a,b,c){var d=a.id;a=a.overflow;var e=32-hd(d)-1;d&=~(1<<e);c+=1;var f=32-hd(b)+e;if(30<f){var g=e-e%5;f=(d&(1<<g)-1).toString(32);d>>=g;e-=g;return{id:1<<32-hd(b)+e|c<<e|d,overflow:f+a}}return{id:1<<f|c<<e|d,overflow:a}}var hd=Math.clz32?Math.clz32:id,jd=Math.log,kd=Math.LN2;function id(a){a>>>=0;return 0===a?32:31-(jd(a)/kd|0)|0}var ld=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`"); +function md(){}function nd(a,b,c){c=a[c];void 0===c?a.push(b):c!==b&&(b.then(md,md),b=c);switch(b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;default:if("string"!==typeof b.status)switch(a=b,a.status="pending",a.then(function(a){if("pending"===b.status){var c=b;c.status="fulfilled";c.value=a}},function(a){if("pending"===b.status){var c=b;c.status="rejected";c.reason=a}}),b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;}od=b;throw ld;}}var od=null; +function pd(){if(null===od)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var a=od;od=null;return a}function qd(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var rd="function"===typeof Object.is?Object.is:qd,T=null,sd=null,td=null,U=null,ud=!1,vd=!1,wd=0,xd=0,V=null,W=null,yd=0; +function X(){if(null===T)throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.");return T} +function zd(){if(0<yd)throw Error("Rendered more hooks than during the previous render");return{memoizedState:null,queue:null,next:null}}function Ad(){null===U?null===td?(ud=!1,td=U=zd()):(ud=!0,U=td):null===U.next?(ud=!1,U=U.next=zd()):(ud=!0,U=U.next);return U}function Bd(a,b,c,d){for(;vd;)vd=!1,xd=wd=0,yd+=1,U=null,c=a(b,d);Cd();return c}function Dd(){var a=V;V=null;return a}function Cd(){sd=T=null;vd=!1;td=null;yd=0;U=W=null}function Ed(a,b){return"function"===typeof b?b(a):b} +function Fd(a,b,c){T=X();U=Ad();if(ud){var d=U.queue;b=d.dispatch;if(null!==W&&(c=W.get(d),void 0!==c)){W.delete(d);d=U.memoizedState;do d=a(d,c.action),c=c.next;while(null!==c);U.memoizedState=d;return[d,b]}return[U.memoizedState,b]}a=a===Ed?"function"===typeof b?b():b:void 0!==c?c(b):b;U.memoizedState=a;a=U.queue={last:null,dispatch:null};a=a.dispatch=Gd.bind(null,T,a);return[U.memoizedState,a]} +function Hd(a,b){T=X();U=Ad();b=void 0===b?null:b;if(null!==U){var c=U.memoizedState;if(null!==c&&null!==b){var d=c[1];a:if(null===d)d=!1;else{for(var e=0;e<d.length&&e<b.length;e++)if(!rd(b[e],d[e])){d=!1;break a}d=!0}if(d)return c[0]}}a=a();U.memoizedState=[a,b];return a} +function Gd(a,b,c){if(25<=yd)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(a===T)if(vd=!0,a={action:c,next:null},null===W&&(W=new Map),c=W.get(b),void 0===c)W.set(b,a);else{for(b=c;null!==b.next;)b=b.next;b.next=a}}function Id(){throw Error("startTransition cannot be called during server rendering.");}function Jd(){throw Error("Cache cannot be refreshed during server rendering.");}function Kd(){} +var Md={readContext:function(a){return a._currentValue},useContext:function(a){X();return a._currentValue},useMemo:Hd,useReducer:Fd,useRef:function(a){T=X();U=Ad();var b=U.memoizedState;return null===b?(a={current:a},U.memoizedState=a):b},useState:function(a){return Fd(Ed,a)},useInsertionEffect:Kd,useLayoutEffect:function(){},useCallback:function(a,b){return Hd(function(){return a},b)},useImperativeHandle:Kd,useEffect:Kd,useDebugValue:Kd,useDeferredValue:function(a){X();return a},useTransition:function(){X(); +return[!1,Id]},useId:function(){var a=sd.treeContext;var b=a.overflow;a=a.id;a=(a&~(1<<32-hd(a)-1)).toString(32)+b;var c=Ld;if(null===c)throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component.");b=wd++;a=":"+c.idPrefix+"R"+a;0<b&&(a+="H"+b.toString(32));return a+":"},useMutableSource:function(a,b){X();return b(a._source)},useSyncExternalStore:function(a,b,c){if(void 0===c)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering."); +return c()},useCacheRefresh:function(){return Jd},use:function(a){if(null!==a&&"object"===typeof a){if("function"===typeof a.then){var b=xd;xd+=1;null===V&&(V=[]);return nd(V,a,b)}if(a.$$typeof===Gc||a.$$typeof===Hc)return a._currentValue}throw Error("An unsupported type was passed to use(): "+String(a));}},Ld=null,Nd={getCacheSignal:function(){throw Error("Not implemented.");},getCacheForType:function(){throw Error("Not implemented.");}},Od=Vc.ReactCurrentDispatcher,Pd=Vc.ReactCurrentCache; +function Qd(a){console.error(a);return null}function Rd(){} +function Sd(a,b,c,d,e,f,g,h,n){var m=[],r=new Set,q={preloadsMap:new Map,stylesMap:new Map,scriptsMap:new Map,headsMap:new Map,charset:null,bases:new Set,preconnects:new Set,fontPreloads:new Set,precedences:new Map,usedStylePreloads:new Set,scripts:new Set,usedScriptPreloads:new Set,explicitStylePreloads:new Set,explicitScriptPreloads:new Set,headResources:new Set,structuredMetaKeys:new Map,boundaryResources:null};b={destination:null,responseState:b,progressiveChunkSize:void 0===d?12800:d,status:0, +fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,resources:q,completedRootSegment:null,abortableTasks:r,pingedTasks:m,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],preamble:[],postamble:[],onError:void 0===e?Qd:e,onAllReady:void 0===f?Rd:f,onShellReady:void 0===g?Rd:g,onShellError:void 0===h?Rd:h,onFatalError:void 0===n?Rd:n};c=Td(b,0,null,c,!1,!1);c.parentFlushed=!0;a=Ud(b,null,a,null,c,r,Wc,null,fd);m.push(a);return b} +function Ud(a,b,c,d,e,f,g,h,n){a.allPendingTasks++;null===d?a.pendingRootTasks++:d.pendingTasks++;var m={node:c,ping:function(){var b=a.pingedTasks;b.push(m);1===b.length&&Vd(a)},blockedBoundary:d,blockedSegment:e,abortSet:f,legacyContext:g,context:h,treeContext:n,thenableState:b};f.add(m);return m}function Td(a,b,c,d,e,f){return{status:0,id:-1,index:b,parentFlushed:!1,chunks:[],children:[],formatContext:d,boundary:c,lastPushedText:e,textEmbedded:f}} +function Wd(a,b){a=a.onError(b);if(null!=a&&"string"!==typeof a)throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof a+'" instead');return a}function Xd(a,b){var c=a.onShellError;c(b);c=a.onFatalError;c(b);null!==a.destination?(a.status=2,ea(a.destination,b)):(a.status=1,a.fatalError=b)} +function Yd(a,b,c,d){var e=c.render(),f=d.childContextTypes;if(null!==f&&void 0!==f){var g=b.legacyContext;if("function"!==typeof c.getChildContext)d=g;else{c=c.getChildContext();for(var h in c)if(!(h in f))throw Error((Uc(d)||"Unknown")+'.getChildContext(): key "'+h+'" is not defined in childContextTypes.');d=C({},g,c)}b.legacyContext=d;Y(a,b,null,e);b.legacyContext=g}else Y(a,b,null,e)} +function Zd(a,b){if(a&&a.defaultProps){b=C({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c]);return b}return b} +function $d(a,b,c,d,e,f){if("function"===typeof d)if(d.prototype&&d.prototype.isReactComponent)c=Xc(d,b.legacyContext),f=d.contextType,f=new d(e,"object"===typeof f&&null!==f?f._currentValue:c),ed(f,d,e,c),Yd(a,b,f,d);else{f=Xc(d,b.legacyContext);T={};sd=b;xd=wd=0;V=c;c=d(e,f);c=Bd(d,e,c,f);var g=0!==wd;if("object"===typeof c&&null!==c&&"function"===typeof c.render&&void 0===c.$$typeof)ed(c,d,e,f),Yd(a,b,c,d);else if(g){e=b.treeContext;b.treeContext=gd(e,1,0);try{Y(a,b,null,c)}finally{b.treeContext= +e}}else Y(a,b,null,c)}else if("string"===typeof d)c=b.blockedSegment,f=lb(c.chunks,a.preamble,d,e,a.responseState,c.formatContext,c.lastPushedText),c.lastPushedText=!1,g=c.formatContext,c.formatContext=Ra(g,d,e),ae(a,b,f),c.formatContext=g,mb(c.chunks,a.postamble,d),c.lastPushedText=!1;else{switch(d){case Qc:case Oc:case Dc:case Ec:case Cc:Y(a,b,null,e.children);return;case Pc:"hidden"!==e.mode&&Y(a,b,null,e.children);return;case Kc:Y(a,b,null,e.children);return;case Nc:throw Error("ReactDOMServer does not yet support scope components."); +case Jc:a:{d=b.blockedBoundary;c=b.blockedSegment;f=e.fallback;e=e.children;g=new Set;var h={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:g,errorDigest:null,resources:new Set},n=Td(a,c.chunks.length,h,c.formatContext,!1,!1);c.children.push(n);c.lastPushedText=!1;var m=Td(a,0,null,c.formatContext,!1,!1);m.parentFlushed=!0;b.blockedBoundary=h;b.blockedSegment=m;a.resources.boundaryResources=h.resources;try{if(ae(a, +b,e),m.lastPushedText&&m.textEmbedded&&m.chunks.push(H),m.status=1,0===h.pendingTasks&&(null!==a.completedRootSegment||0<a.pendingRootTasks)&&Fa(a.resources,h.resources),be(h,m),0===h.pendingTasks)break a}catch(r){m.status=4,h.forceClientRender=!0,h.errorDigest=Wd(a,r)}finally{a.resources.boundaryResources=d?d.resources:null,b.blockedBoundary=d,b.blockedSegment=c}b=Ud(a,null,f,d,n,g,b.legacyContext,b.context,b.treeContext);a.pingedTasks.push(b)}return}if("object"===typeof d&&null!==d)switch(d.$$typeof){case Ic:d= +d.render;T={};sd=b;xd=wd=0;V=c;c=d(e,f);e=Bd(d,e,c,f);if(0!==wd){d=b.treeContext;b.treeContext=gd(d,1,0);try{Y(a,b,null,e)}finally{b.treeContext=d}}else Y(a,b,null,e);return;case Lc:d=d.type;e=Zd(d,e);$d(a,b,c,d,e,f);return;case Fc:c=e.children;d=d._context;e=e.value;f=d._currentValue;d._currentValue=e;g=S;S=e={parent:g,depth:null===g?0:g.depth+1,context:d,parentValue:f,value:e};b.context=e;Y(a,b,null,c);a=S;if(null===a)throw Error("Tried to pop a Context at the root of the app. This is a bug in React."); +e=a.parentValue;a.context._currentValue=e===Sc?a.context._defaultValue:e;a=S=a.parent;b.context=a;return;case Gc:e=e.children;e=e(d._currentValue);Y(a,b,null,e);return;case Mc:f=d._init;d=f(d._payload);e=Zd(d,e);$d(a,b,c,d,e,void 0);return}throw Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+((null==d?d:typeof d)+"."));}} +function Y(a,b,c,d){b.node=d;if("object"===typeof d&&null!==d){switch(d.$$typeof){case Ac:$d(a,b,c,d.type,d.props,d.ref);return;case Bc:throw Error("Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.");case Mc:c=d._init;d=c(d._payload);Y(a,b,null,d);return}if(ta(d)){ce(a,b,d);return}null===d||"object"!==typeof d?c=null:(c=Tc&&d[Tc]||d["@@iterator"],c="function"===typeof c?c:null);if(c&&(c=c.call(d))){d=c.next();if(!d.done){var e= +[];do e.push(d.value),d=c.next();while(!d.done);ce(a,b,e)}return}a=Object.prototype.toString.call(d);throw Error("Objects are not valid as a React child (found: "+("[object Object]"===a?"object with keys {"+Object.keys(d).join(", ")+"}":a)+"). If you meant to render a collection of children, use an array instead.");}"string"===typeof d?(c=b.blockedSegment,c.lastPushedText=Sa(b.blockedSegment.chunks,d,a.responseState,c.lastPushedText)):"number"===typeof d&&(c=b.blockedSegment,c.lastPushedText=Sa(b.blockedSegment.chunks, +""+d,a.responseState,c.lastPushedText))}function ce(a,b,c){for(var d=c.length,e=0;e<d;e++){var f=b.treeContext;b.treeContext=gd(f,d,e);try{ae(a,b,c[e])}finally{b.treeContext=f}}} +function ae(a,b,c){var d=b.blockedSegment.formatContext,e=b.legacyContext,f=b.context;try{return Y(a,b,null,c)}catch(m){if(Cd(),c=m===ld?pd():m,"object"===typeof c&&null!==c&&"function"===typeof c.then){var g=Dd(),h=b.blockedSegment,n=Td(a,h.chunks.length,null,h.formatContext,h.lastPushedText,!0);h.children.push(n);h.lastPushedText=!1;a=Ud(a,g,b.node,b.blockedBoundary,n,b.abortSet,b.legacyContext,b.context,b.treeContext).ping;c.then(a,a);b.blockedSegment.formatContext=d;b.legacyContext=e;b.context= +f;cd(f)}else throw b.blockedSegment.formatContext=d,b.legacyContext=e,b.context=f,cd(f),c;}}function de(a){var b=a.blockedBoundary;a=a.blockedSegment;a.status=3;ee(this,b,a)} +function fe(a,b,c){var d=a.blockedBoundary;a.blockedSegment.status=3;null===d?(b.allPendingTasks--,1!==b.status&&2!==b.status&&(Wd(b,c),Xd(b,c))):(d.pendingTasks--,d.forceClientRender||(d.forceClientRender=!0,d.errorDigest=b.onError(c),d.parentFlushed&&b.clientRenderedBoundaries.push(d)),d.fallbackAbortableTasks.forEach(function(a){return fe(a,b,c)}),d.fallbackAbortableTasks.clear(),b.allPendingTasks--,0===b.allPendingTasks&&(a=b.onAllReady,a()))} +function be(a,b){if(0===b.chunks.length&&1===b.children.length&&null===b.children[0].boundary){var c=b.children[0];c.id=b.id;c.parentFlushed=!0;1===c.status&&be(a,c)}else a.completedSegments.push(b)} +function ee(a,b,c){if(null===b){if(c.parentFlushed){if(null!==a.completedRootSegment)throw Error("There can only be one root segment. This is a bug in React.");a.completedRootSegment=c}a.pendingRootTasks--;0===a.pendingRootTasks&&(a.onShellError=Rd,b=a.onShellReady,b())}else b.pendingTasks--,b.forceClientRender||(0===b.pendingTasks?(c.parentFlushed&&1===c.status&&be(b,c),(null!==a.completedRootSegment||0<a.pendingRootTasks)&&Fa(a.resources,b.resources),b.parentFlushed&&a.completedBoundaries.push(b), +b.fallbackAbortableTasks.forEach(de,a),b.fallbackAbortableTasks.clear()):c.parentFlushed&&1===c.status&&(be(b,c),1===b.completedSegments.length&&b.parentFlushed&&a.partialBoundaries.push(b)));a.allPendingTasks--;0===a.allPendingTasks&&(a=a.onAllReady,a())} +function Vd(a){if(2!==a.status){var b=S,c=Od.current;Od.current=Md;var d=Pd.current;Pd.current=Nd;var e=a.resources;ua.push(D);D=e;e=Ga.current;Ga.current=xa;var f=Ld;Ld=a.responseState;try{var g=a.pingedTasks,h;for(h=0;h<g.length;h++){var n=g[h];var m=a,r=n.blockedBoundary;m.resources.boundaryResources=r?r.resources:null;var q=n.blockedSegment;if(0===q.status){cd(n.context);try{var t=n.thenableState;n.thenableState=null;Y(m,n,t,n.node);q.lastPushedText&&q.textEmbedded&&q.chunks.push(H);n.abortSet.delete(n); +q.status=1;ee(m,n.blockedBoundary,q)}catch(na){Cd();var x=na===ld?pd():na;if("object"===typeof x&&null!==x&&"function"===typeof x.then){var M=n.ping;x.then(M,M);n.thenableState=Dd()}else{n.abortSet.delete(n);q.status=4;var G=m,J=n.blockedBoundary,ia=x,Z=Wd(G,ia);null===J?Xd(G,ia):(J.pendingTasks--,J.forceClientRender||(J.forceClientRender=!0,J.errorDigest=Z,J.parentFlushed&&G.clientRenderedBoundaries.push(J)));G.allPendingTasks--;if(0===G.allPendingTasks){var ne=G.onAllReady;ne()}}}finally{m.resources.boundaryResources= +null}}}g.splice(0,h);null!==a.destination&&ge(a,a.destination)}catch(na){Wd(a,na),Xd(a,na)}finally{Ld=f,Od.current=c,Pd.current=d,D=ua.pop(),Ga.current=e,c===Md&&cd(b)}}} +function he(a,b,c){c.parentFlushed=!0;switch(c.status){case 0:var d=c.id=a.nextSegmentId++;c.lastPushedText=!1;c.textEmbedded=!1;a=a.responseState;p(b,nb);p(b,a.placeholderPrefix);a=v(d.toString(16));p(b,a);return u(b,ob);case 1:c.status=2;var e=!0;d=c.chunks;var f=0;c=c.children;for(var g=0;g<c.length;g++){for(e=c[g];f<e.index;f++)p(b,d[f]);e=ie(a,b,e)}for(;f<d.length-1;f++)p(b,d[f]);f<d.length&&(e=u(b,d[f]));return e;default:throw Error("Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React."); }} -function re(a,b,c){var d=c.boundary;if(null===d)return qe(a,b,c);d.parentFlushed=!0;if(d.forceClientRender)d=d.errorDigest,r(b,kb),p(b,mb),d&&(p(b,ob),p(b,u(B(d))),p(b,nb)),r(b,pb),qe(a,b,c);else if(0<d.pendingTasks){d.rootSegmentID=a.nextSegmentId++;0<d.completedSegments.length&&a.partialBoundaries.push(d);var e=a.responseState;var f=e.nextSuspenseID++;e=v(e.boundaryPrefix+f.toString(16));d=d.id=e;qb(b,a.responseState,d);qe(a,b,c)}else if(d.byteSize>a.progressiveChunkSize)d.rootSegmentID=a.nextSegmentId++,a.completedBoundaries.push(d), -qb(b,a.responseState,d.id),qe(a,b,c);else{c=d.resources;if(e=a.resources.boundaryResources)c.forEach(Gc,e),c.clear();r(b,hb);c=d.completedSegments;if(1!==c.length)throw Error("A previously unvisited boundary must have exactly one root segment. This is a bug in React.");re(a,b,c[0])}return r(b,lb)}function se(a,b,c){Mb(b,a.responseState,c.formatContext,c.id);re(a,b,c);return Nb(b,c.formatContext)} -function te(a,b,c){a.resources.boundaryResources=c.resources;for(var d=c.completedSegments,e=0;e<d.length;e++)ue(a,b,c,d[e]);d.length=0;nc(b,c.resources);a=a.responseState;d=c.id;e=c.rootSegmentID;c=c.resources;var f;b:{for(f=c.values();;){var g=f.next().value;if(!g)break;if(0===(g.state&1)){f=!0;break b}}f=!1}p(b,a.startInlineScript);f?0===(a.instructions&2)?(a.instructions|=10,p(b,512<Ub.length?Ub.slice():Ub)):0===(a.instructions&8)?(a.instructions|=8,p(b,Vb)):p(b,Wb):0===(a.instructions&2)?(a.instructions|= -2,p(b,Sb)):p(b,Tb);if(null===d)throw Error("An ID must have been assigned before we can complete the boundary.");e=u(e.toString(16));p(b,d);p(b,Xb);p(b,a.segmentPrefix);p(b,e);f?(p(b,Yb),Fc(b,c)):p(b,Zb);b=r(b,$b);return b} -function ue(a,b,c,d){if(2===d.status)return!0;var e=d.id;if(-1===e){if(-1===(d.id=c.rootSegmentID))throw Error("A root segment ID must have been assigned by now. This is a bug in React.");return se(a,b,d)}se(a,b,d);a=a.responseState;p(b,a.startInlineScript);0===(a.instructions&1)?(a.instructions|=1,p(b,Ob)):p(b,Pb);p(b,a.segmentPrefix);e=u(e.toString(16));p(b,e);p(b,Qb);p(b,a.placeholderPrefix);p(b,e);b=r(b,Rb);return b} -function pe(a,b){k=new Uint8Array(512);l=0;try{var c,d=a.completedRootSegment;if(null!==d)if(0===a.pendingRootTasks){zc(b,a.resources,a.responseState,0===a.allPendingTasks);re(a,b,d);a.completedRootSegment=null;var e=a.responseState.bootstrapChunks;for(d=0;d<e.length-1;d++)p(b,e[d]);d<e.length&&r(b,e[d])}else return;else Ac(b,a.resources,a.responseState);var f=a.clientRenderedBoundaries;for(c=0;c<f.length;c++){var g=f[c];e=b;var m=a.responseState,h=g.id,n=g.errorDigest,q=g.errorMessage,t=g.errorComponentStack; -p(e,m.startInlineScript);0===(m.instructions&4)?(m.instructions|=4,p(e,ac)):p(e,bc);if(null===h)throw Error("An ID must have been assigned before we can complete the boundary.");p(e,h);p(e,cc);if(n||q||t)p(e,dc),p(e,u(gc(n||"")));if(q||t)p(e,dc),p(e,u(gc(q||"")));t&&(p(e,dc),p(e,u(gc(t))));if(!r(e,ec)){a.destination=null;c++;f.splice(0,c);return}}f.splice(0,c);var D=a.completedBoundaries;for(c=0;c<D.length;c++)if(!te(a,b,D[c])){a.destination=null;c++;D.splice(0,c);return}D.splice(0,c);ca(b);k=new Uint8Array(512); -l=0;var z=a.partialBoundaries;for(c=0;c<z.length;c++){var Y=z[c];a:{f=a;g=b;f.resources.boundaryResources=Y.resources;var J=Y.completedSegments;for(m=0;m<J.length;m++)if(!ue(f,g,Y,J[m])){m++;J.splice(0,m);var L=!1;break a}J.splice(0,m);L=nc(g,Y.resources)}if(!L){a.destination=null;c++;z.splice(0,c);return}}z.splice(0,c);var Z=a.completedBoundaries;for(c=0;c<Z.length;c++)if(!te(a,b,Z[c])){a.destination=null;c++;Z.splice(0,c);return}Z.splice(0,c)}finally{0===a.allPendingTasks&&0===a.pingedTasks.length&& -0===a.clientRenderedBoundaries.length&&0===a.completedBoundaries.length?(a=a.responseState,a.hasBody&&(p(b,P),p(b,u("body")),p(b,Q)),a.htmlChunks&&(p(b,P),p(b,u("html")),p(b,Q)),ca(b),b.close()):ca(b)}}function ve(a,b){try{var c=a.abortableTasks;if(0<c.size){var d=void 0===b?Error("The render was aborted by the server without a reason."):b;c.forEach(function(b){return oe(b,a,d)});c.clear()}null!==a.destination&&pe(a,a.destination)}catch(e){de(a,e),ee(a,e)}} -exports.renderToReadableStream=function(a,b){return new Promise(function(c,d){var e,f,g=new Promise(function(a,b){f=a;e=b}),m=$d(a,Ga(b?b.identifierPrefix:void 0,b?b.nonce:void 0,b?b.bootstrapScriptContent:void 0,b?b.bootstrapScripts:void 0,b?b.bootstrapModules:void 0,b?b.unstable_externalRuntimeSrc:void 0),Ha(b?b.namespaceURI:void 0),b?b.progressiveChunkSize:void 0,b?b.onError:void 0,f,function(){var a=new ReadableStream({type:"bytes",pull:function(a){if(1===m.status)m.status=2,ea(a,m.fatalError); -else if(2!==m.status&&null===m.destination){m.destination=a;try{pe(m,a)}catch(D){de(m,D),ee(m,D)}}},cancel:function(){ve(m)}},{highWaterMark:0});a.allReady=g;c(a)},function(a){g.catch(function(){});d(a)},e);if(b&&b.signal){var h=b.signal;if(h.aborted)ve(m,h.reason);else{var n=function(){ve(m,h.reason);h.removeEventListener("abort",n)};h.addEventListener("abort",n)}}ce(m)})};exports.version="18.3.0-next-4fcc9184a-20230217"; +function ie(a,b,c){var d=c.boundary;if(null===d)return he(a,b,c);d.parentFlushed=!0;if(d.forceClientRender)d=d.errorDigest,u(b,sb),p(b,ub),d&&(p(b,wb),p(b,v(B(d))),p(b,vb)),u(b,xb),he(a,b,c);else if(0<d.pendingTasks){d.rootSegmentID=a.nextSegmentId++;0<d.completedSegments.length&&a.partialBoundaries.push(d);var e=a.responseState;var f=e.nextSuspenseID++;e=w(e.boundaryPrefix+f.toString(16));d=d.id=e;yb(b,a.responseState,d);he(a,b,c)}else if(d.byteSize>a.progressiveChunkSize)d.rootSegmentID=a.nextSegmentId++,a.completedBoundaries.push(d), +yb(b,a.responseState,d.id),he(a,b,c);else{Ea(a.resources,d.resources);u(b,pb);c=d.completedSegments;if(1!==c.length)throw Error("A previously unvisited boundary must have exactly one root segment. This is a bug in React.");ie(a,b,c[0])}return u(b,tb)}function je(a,b,c){Ub(b,a.responseState,c.formatContext,c.id);ie(a,b,c);return Vb(b,c.formatContext)} +function ke(a,b,c){a.resources.boundaryResources=c.resources;for(var d=c.completedSegments,e=0;e<d.length;e++)le(a,b,c,d[e]);d.length=0;a=a.responseState;d=c.id;e=c.rootSegmentID;c=c.resources;var f;b:{for(f=c.values();;){var g=f.next().value;if(!g)break;if(!g.inShell){f=!0;break b}}f=!1}p(b,a.startInlineScript);f?a.sentCompleteBoundaryFunction?a.sentStyleInsertionFunction?p(b,dc):(a.sentStyleInsertionFunction=!0,p(b,cc)):(a.sentCompleteBoundaryFunction=!0,a.sentStyleInsertionFunction=!0,p(b,512< +bc.length?bc.slice():bc)):a.sentCompleteBoundaryFunction?p(b,ac):(a.sentCompleteBoundaryFunction=!0,p(b,$b));if(null===d)throw Error("An ID must have been assigned before we can complete the boundary.");e=v(e.toString(16));p(b,d);p(b,ec);p(b,a.segmentPrefix);p(b,e);f?(p(b,fc),zc(b,c)):p(b,gc);b=u(b,hc);return b} +function le(a,b,c,d){if(2===d.status)return!0;var e=d.id;if(-1===e){if(-1===(d.id=c.rootSegmentID))throw Error("A root segment ID must have been assigned by now. This is a bug in React.");return je(a,b,d)}je(a,b,d);a=a.responseState;p(b,a.startInlineScript);a.sentCompleteSegmentFunction?p(b,Xb):(a.sentCompleteSegmentFunction=!0,p(b,Wb));p(b,a.segmentPrefix);e=v(e.toString(16));p(b,e);p(b,Yb);p(b,a.placeholderPrefix);p(b,e);b=u(b,Zb);return b} +function ge(a,b){k=new Uint8Array(512);l=0;try{var c,d=a.completedRootSegment;if(null!==d)if(0===a.pendingRootTasks){var e=a.preamble;for(c=0;c<e.length;c++)p(b,e[c]);tc(b,a.resources,a.responseState);ie(a,b,d);a.completedRootSegment=null;var f=a.responseState.bootstrapChunks;for(d=0;d<f.length-1;d++)p(b,f[d]);d<f.length&&u(b,f[d])}else return;else uc(b,a.resources,a.responseState);var g=a.clientRenderedBoundaries;for(c=0;c<g.length;c++){var h=g[c];f=b;var n=a.responseState,m=h.id,r=h.errorDigest, +q=h.errorMessage,t=h.errorComponentStack;p(f,n.startInlineScript);n.sentClientRenderFunction?p(f,jc):(n.sentClientRenderFunction=!0,p(f,ic));if(null===m)throw Error("An ID must have been assigned before we can complete the boundary.");p(f,m);p(f,kc);if(r||q||t)p(f,lc),p(f,v(oc(r||"")));if(q||t)p(f,lc),p(f,v(oc(q||"")));t&&(p(f,lc),p(f,v(oc(t))));if(!u(f,mc)){a.destination=null;c++;g.splice(0,c);return}}g.splice(0,c);var x=a.completedBoundaries;for(c=0;c<x.length;c++)if(!ke(a,b,x[c])){a.destination= +null;c++;x.splice(0,c);return}x.splice(0,c);ca(b);k=new Uint8Array(512);l=0;var M=a.partialBoundaries;for(c=0;c<M.length;c++){var G=M[c];a:{g=a;h=b;g.resources.boundaryResources=G.resources;var J=G.completedSegments;for(n=0;n<J.length;n++)if(!le(g,h,G,J[n])){n++;J.splice(0,n);var ia=!1;break a}J.splice(0,n);ia=!0}if(!ia){a.destination=null;c++;M.splice(0,c);return}}M.splice(0,c);var Z=a.completedBoundaries;for(c=0;c<Z.length;c++)if(!ke(a,b,Z[c])){a.destination=null;c++;Z.splice(0,c);return}Z.splice(0, +c)}finally{if(0===a.allPendingTasks&&0===a.pingedTasks.length&&0===a.clientRenderedBoundaries.length&&0===a.completedBoundaries.length){a=a.postamble;for(c=0;c<a.length;c++)p(b,a[c]);ca(b);b.close()}else ca(b)}}function me(a,b){try{var c=a.abortableTasks;if(0<c.size){var d=void 0===b?Error("The render was aborted by the server without a reason."):b;c.forEach(function(b){return fe(b,a,d)});c.clear()}null!==a.destination&&ge(a,a.destination)}catch(e){Wd(a,e),Xd(a,e)}} +exports.renderToReadableStream=function(a,b){return new Promise(function(c,d){var e,f,g=new Promise(function(a,b){f=a;e=b}),h=Sd(a,Pa(b?b.identifierPrefix:void 0,b?b.nonce:void 0,b?b.bootstrapScriptContent:void 0,b?b.bootstrapScripts:void 0,b?b.bootstrapModules:void 0,b?b.unstable_externalRuntimeSrc:void 0),Qa(b?b.namespaceURI:void 0),b?b.progressiveChunkSize:void 0,b?b.onError:void 0,f,function(){var a=new ReadableStream({type:"bytes",pull:function(a){if(1===h.status)h.status=2,ea(a,h.fatalError); +else if(2!==h.status&&null===h.destination){h.destination=a;try{ge(h,a)}catch(t){Wd(h,t),Xd(h,t)}}},cancel:function(){me(h)}},{highWaterMark:0});a.allReady=g;c(a)},function(a){g.catch(function(){});d(a)},e);if(b&&b.signal){var n=b.signal;if(n.aborted)me(h,n.reason);else{var m=function(){me(h,n.reason);n.removeEventListener("abort",m)};n.addEventListener("abort",m)}}Vd(h)})};exports.version="18.3.0-next-6ddcbd4f9-20230209"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.development.js index c39b01fb69fee..e117ce887ec49 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.development.js @@ -19,7 +19,7 @@ var util = require('util'); var async_hooks = require('async_hooks'); var ReactDOM = require('react-dom'); -var ReactVersion = '18.3.0-next-4fcc9184a-20230217'; +var ReactVersion = '18.3.0-next-6ddcbd4f9-20230209'; var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; @@ -252,23 +252,6 @@ function closeWithError(destination, error) { destination.destroy(error); } -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - - return obj; -} - -var assign = Object.assign; - /* * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol * and Temporal.* types. See https://github.com/facebook/react/pull/22064. @@ -683,7 +666,6 @@ var isUnitlessNumber = { opacity: true, order: true, orphans: true, - scale: true, tabSize: true, widows: true, zIndex: true, @@ -1842,1404 +1824,1671 @@ function isArray(a) { return isArrayImpl(a); } -// The build script is at scripts/rollup/generate-inline-fizz-runtime.js. -// Run `yarn generate-inline-fizz-runtime` to generate. -var clientRenderBoundary = '$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};'; -var completeBoundary = '$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};'; -var completeBoundaryWithStyles = '$RM=new Map;\n$RR=function(p,q,w){function r(l){this.s=l}for(var t=$RC,m=$RM,u=new Map,n=new Map,g=document,h,e,f=g.querySelectorAll("template[data-precedence]"),c=0;e=f[c++];){for(var b=e.content.firstChild;b;b=b.nextSibling)u.set(b.getAttribute("data-href"),b);e.parentNode.removeChild(e)}f=g.querySelectorAll("link[data-precedence],style[data-precedence]");for(c=0;e=f[c++];)m.set(e.getAttribute("STYLE"===e.nodeName?"data-href":"href"),e),n.set(e.dataset.precedence,h=e);e=0;f=[];for(var d,\nv,a;d=w[e++];){var k=0;b=d[k++];if(!(a=m.get(b))){if(a=u.get(b))c=a.getAttribute("data-precedence");else{a=g.createElement("link");a.href=b;a.rel="stylesheet";for(a.dataset.precedence=c=d[k++];v=d[k++];)a.setAttribute(v,d[k++]);d=a._p=new Promise(function(l,x){a.onload=l;a.onerror=x});d.then(r.bind(d,"l"),r.bind(d,"e"))}m.set(b,a);b=n.get(c)||h;b===h&&(h=a);n.set(c,a);b?b.parentNode.insertBefore(a,b.nextSibling):(c=g.head,c.insertBefore(a,c.firstChild))}d=a._p;c=a.getAttribute("media");!d||"l"===\nd.s||c&&!matchMedia(c).matches||f.push(d)}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};'; -var completeSegment = '$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};'; - -function getValueDescriptorExpectingObjectForWarning(thing) { - return thing === null ? '`null`' : thing === undefined ? '`undefined`' : thing === '' ? 'an empty string' : "something with type \"" + typeof thing + "\""; -} -function getValueDescriptorExpectingEnumForWarning(thing) { - return thing === null ? '`null`' : thing === undefined ? '`undefined`' : thing === '' ? 'an empty string' : typeof thing === 'string' ? JSON.stringify(thing) : "something with type \"" + typeof thing + "\""; -} +var assign = Object.assign; -function compareResourcePropsForWarning(newProps, currentProps) { +function validatePreloadResourceDifference(originalProps, originalImplicit, latestProps, latestImplicit) { { - var propDiffs = null; - var allProps = Array.from(new Set(Object.keys(currentProps).concat(Object.keys(newProps)))); - - for (var i = 0; i < allProps.length; i++) { - var propName = allProps[i]; - var newValue = newProps[propName]; - var currentValue = currentProps[propName]; - - if (newValue !== currentValue && !(newValue == null && currentValue == null)) { - if (newValue == null) { - if (propDiffs === null) { - propDiffs = { - missing: {}, - extra: {}, - different: {} - }; - } + var href = originalProps.href; + var originalWarningName = getResourceNameForWarning('preload', originalProps, originalImplicit); + var latestWarningName = getResourceNameForWarning('preload', latestProps, latestImplicit); - propDiffs.missing[propName] = currentValue; - } else if (currentValue == null) { - if (propDiffs === null) { - propDiffs = { - missing: {}, - extra: {}, - different: {} - }; - } + if (latestProps.as !== originalProps.as) { + error('A %s is using the same href "%s" as a %s. This is always an error and React will only keep the first preload' + ' for any given href, discarding subsequent instances. To fix, find where you are using this href in link' + ' tags or in calls to ReactDOM.preload() or ReactDOM.preinit() and either make the Resource types agree or' + ' update the hrefs to be distinct for different Resource types.', latestWarningName, href, originalWarningName); + } else { + var missingProps = null; + var extraProps = null; + var differentProps = null; - propDiffs.extra[propName] = newValue; - } else { - if (propDiffs === null) { - propDiffs = { - missing: {}, - extra: {}, - different: {} + if (originalProps.media != null && latestProps.media == null) { + missingProps = missingProps || {}; + missingProps.media = originalProps.media; + } + + for (var propName in latestProps) { + var propValue = latestProps[propName]; + var originalValue = originalProps[propName]; + + if (propValue != null && propValue !== originalValue) { + if (originalValue == null) { + extraProps = extraProps || {}; + extraProps[propName] = propValue; + } else { + differentProps = differentProps || {}; + differentProps[propName] = { + original: originalValue, + latest: propValue }; } + } + } + + if (missingProps || extraProps || differentProps) { + warnDifferentProps(href, 'href', originalWarningName, latestWarningName, extraProps, missingProps, differentProps); + } + } + } +} +function validateStyleResourceDifference(originalProps, latestProps) { + { + var href = originalProps.href; // eslint-disable-next-line no-labels + + var originalWarningName = getResourceNameForWarning('style', originalProps, false); + var latestWarningName = getResourceNameForWarning('style', latestProps, false); + var missingProps = null; + var extraProps = null; + var differentProps = null; + + if (originalProps.media != null && latestProps.media == null) { + missingProps = missingProps || {}; + missingProps.media = originalProps.media; + } - propDiffs.different[propName] = { - original: currentValue, - latest: newValue + for (var propName in latestProps) { + var propValue = latestProps[propName]; + var originalValue = originalProps[propName]; + + if (propValue != null && propValue !== originalValue) { + propName = propName === 'data-precedence' ? 'precedence' : propName; + + if (originalValue == null) { + extraProps = extraProps || {}; + extraProps[propName] = propValue; + } else { + differentProps = differentProps || {}; + differentProps[propName] = { + original: originalValue, + latest: propValue }; } } } - return propDiffs; + if (missingProps || extraProps || differentProps) { + warnDifferentProps(href, 'href', originalWarningName, latestWarningName, extraProps, missingProps, differentProps); + } } } +function validateScriptResourceDifference(originalProps, latestProps) { + { + var src = originalProps.src; // eslint-disable-next-line no-labels -function describeDifferencesForStylesheets(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; + var originalWarningName = getResourceNameForWarning('script', originalProps, false); + var latestWarningName = getResourceNameForWarning('script', latestProps, false); + var extraProps = null; + var differentProps = null; - for (var propName in diff.missing) { - var propValue = diff.missing[propName]; + for (var propName in latestProps) { + var propValue = latestProps[propName]; + var originalValue = originalProps[propName]; - if (propName === 'media') { - description += "\n \"" + propName + "\" missing for props, original value: " + getValueDescriptorExpectingEnumForWarning(propValue); + if (propValue != null && propValue !== originalValue) { + if (originalValue == null) { + extraProps = extraProps || {}; + extraProps[propName] = propValue; + } else { + differentProps = differentProps || {}; + differentProps[propName] = { + original: originalValue, + latest: propValue + }; + } + } } - } - for (var _propName in diff.extra) { - var _propValue = diff.extra[_propName]; - description += "\n \"" + _propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(_propValue) + ", missing from original props"; + if (extraProps || differentProps) { + warnDifferentProps(src, 'src', originalWarningName, latestWarningName, extraProps, null, differentProps); + } } +} +function validateStyleAndHintProps(preloadProps, styleProps, implicitPreload) { + { + var href = preloadProps.href; + var originalWarningName = getResourceNameForWarning('preload', preloadProps, implicitPreload); + var latestWarningName = getResourceNameForWarning('style', styleProps, false); - for (var _propName2 in diff.different) { - var latestValue = diff.different[_propName2].latest; - var originalValue = diff.different[_propName2].original; - description += "\n \"" + _propName2 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", original value: " + getValueDescriptorExpectingEnumForWarning(originalValue); - } + if (preloadProps.as !== 'style') { + error('While creating a %s for href "%s" a %s for this same href was found. When preloading a stylesheet the' + ' "as" prop must be of type "style". This most likely ocurred by rendering a preload link with an incorrect' + ' "as" prop or by calling ReactDOM.preload with an incorrect "as" option.', latestWarningName, href, originalWarningName); + } - return description; -} -function describeDifferencesForStylesheetOverPreinit(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; + var missingProps = null; + var extraProps = null; + var differentProps = null; - for (var propName in diff.extra) { - var propValue = diff.extra[propName]; + for (var propName in styleProps) { + var styleValue = styleProps[propName]; + var preloadValue = preloadProps[propName]; - if (propName === 'precedence' || propName === 'crossOrigin' || propName === 'integrity') { - description += "\n \"" + propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", option missing"; - } else { - description += "\n \"" + propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", option not available with ReactDOM.preinit()"; + switch (propName) { + // Check for difference on specific props that cross over or influence + // the relationship between the preload and stylesheet + case 'crossOrigin': + case 'referrerPolicy': + case 'media': + case 'title': + { + if (preloadValue !== styleValue && !(preloadValue == null && styleValue == null)) { + if (styleValue == null) { + missingProps = missingProps || {}; + missingProps[propName] = preloadValue; + } else if (preloadValue == null) { + extraProps = extraProps || {}; + extraProps[propName] = styleValue; + } else { + differentProps = differentProps || {}; + differentProps[propName] = { + original: preloadValue, + latest: styleValue + }; + } + } + } + } } - } - - for (var _propName3 in diff.different) { - var latestValue = diff.different[_propName3].latest; - var originalValue = diff.different[_propName3].original; - if (_propName3 === 'precedence' && originalValue === 'default') { - description += "\n \"" + _propName3 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", missing from options"; - } else { - description += "\n \"" + _propName3 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", option value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + if (missingProps || extraProps || differentProps) { + warnDifferentProps(href, 'href', originalWarningName, latestWarningName, extraProps, missingProps, differentProps); } } - - return description; } -function describeDifferencesForPreinitOverStylesheet(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; - - for (var propName in diff.missing) { - var propValue = diff.missing[propName]; +function validateScriptAndHintProps(preloadProps, scriptProps, implicitPreload) { + { + var href = preloadProps.href; + var originalWarningName = getResourceNameForWarning('preload', preloadProps, implicitPreload); + var latestWarningName = getResourceNameForWarning('script', scriptProps, false); - if (propName === 'precedence' && propValue !== 'default') { - description += "\n \"" + propName + "\" missing from options, prop value: " + getValueDescriptorExpectingEnumForWarning(propValue); + if (preloadProps.as !== 'script') { + error('While creating a %s for href "%s" a %s for this same url was found. When preloading a script the' + ' "as" prop must be of type "script". This most likely ocurred by rendering a preload link with an incorrect' + ' "as" prop or by calling ReactDOM.preload with an incorrect "as" option.', latestWarningName, href, originalWarningName); } - } - for (var _propName4 in diff.extra) { - var _propValue2 = diff.extra[_propName4]; + var missingProps = null; + var extraProps = null; + var differentProps = null; + + for (var propName in scriptProps) { + var scriptValue = scriptProps[propName]; + var preloadValue = preloadProps[propName]; - if (_propName4 === 'precedence' || _propName4 === 'crossOrigin' || _propName4 === 'integrity') { - description += "\n \"" + _propName4 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(_propValue2) + ", missing from props"; + switch (propName) { + // Check for difference on specific props that cross over or influence + // the relationship between the preload and stylesheet + case 'crossOrigin': + case 'referrerPolicy': + case 'integrity': + { + if (preloadValue !== scriptValue && !(preloadValue == null && scriptValue == null)) { + if (scriptValue == null) { + missingProps = missingProps || {}; + missingProps[propName] = preloadValue; + } else if (preloadValue == null) { + extraProps = extraProps || {}; + extraProps[propName] = scriptValue; + } else { + differentProps = differentProps || {}; + differentProps[propName] = { + original: preloadValue, + latest: scriptValue + }; + } + } + } + } } - } - for (var _propName5 in diff.different) { - var latestValue = diff.different[_propName5].latest; - var originalValue = diff.different[_propName5].original; - description += "\n \"" + _propName5 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", prop value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + if (missingProps || extraProps || differentProps) { + warnDifferentProps(href, 'href', originalWarningName, latestWarningName, extraProps, missingProps, differentProps); + } } - - return description; } -function describeDifferencesForPreinits(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; - for (var propName in diff.missing) { - var propValue = diff.missing[propName]; +function warnDifferentProps(url, urlPropKey, originalName, latestName, extraProps, missingProps, differentProps) { + { + var juxtaposedNameStatement = latestName === originalName ? 'an earlier instance of this Resource' : "a " + originalName + " with the same " + urlPropKey; + var comparisonStatement = ''; - if (propName === 'precedence' && propValue !== 'default') { - description += "\n \"" + propName + "\" missing from options, original option value: " + getValueDescriptorExpectingEnumForWarning(propValue); + if (missingProps !== null && typeof missingProps === 'object') { + for (var propName in missingProps) { + comparisonStatement += "\n " + propName + ": missing or null in latest props, \"" + missingProps[propName] + "\" in original props"; + } } - } - for (var _propName6 in diff.extra) { - var _propValue3 = diff.extra[_propName6]; + if (extraProps !== null && typeof extraProps === 'object') { + for (var _propName in extraProps) { + comparisonStatement += "\n " + _propName + ": \"" + extraProps[_propName] + "\" in latest props, missing or null in original props"; + } + } - if (_propName6 === 'precedence' && _propValue3 !== 'default' || _propName6 === 'crossOrigin' || _propName6 === 'integrity') { - description += "\n \"" + _propName6 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(_propValue3) + ", missing from original options"; + if (differentProps !== null && typeof differentProps === 'object') { + for (var _propName2 in differentProps) { + comparisonStatement += "\n " + _propName2 + ": \"" + differentProps[_propName2].latest + "\" in latest props, \"" + differentProps[_propName2].original + "\" in original props"; + } } - } - for (var _propName7 in diff.different) { - var latestValue = diff.different[_propName7].latest; - var originalValue = diff.different[_propName7].original; - description += "\n \"" + _propName7 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", original option value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + error('A %s with %s "%s" has props that disagree with those found on %s. Resources always use the props' + ' that were provided the first time they are encountered so any differences will be ignored. Please' + ' update Resources that share an %s to have props that agree. The differences are described below.%s', latestName, urlPropKey, url, juxtaposedNameStatement, urlPropKey, comparisonStatement); } - - return description; } -var preloadOptionsForComparison = ['as', 'crossOrigin', 'integrity', 'media']; -function describeDifferencesForPreloads(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; - for (var propName in diff.missing) { - var propValue = diff.missing[propName]; +function getResourceNameForWarning(type, props, implicit) { + { + switch (type) { + case 'style': + { + return 'style Resource'; + } - if (preloadOptionsForComparison.includes(propName)) { - description += "\n \"" + propName + "\" missing from options, original option value: " + getValueDescriptorExpectingEnumForWarning(propValue); - } - } + case 'script': + { + return 'script Resource'; + } - for (var _propName8 in diff.extra) { - var _propValue4 = diff.extra[_propName8]; + case 'preload': + { + if (implicit) { + return "preload for a " + props.as + " Resource"; + } - if (preloadOptionsForComparison.includes(_propName8)) { - description += "\n \"" + _propName8 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(_propValue4) + ", missing from original options"; + return "preload Resource (as \"" + props.as + "\")"; + } } } - for (var _propName9 in diff.different) { - var latestValue = diff.different[_propName9].latest; - var originalValue = diff.different[_propName9].original; + return 'Resource'; +} +function validateLinkPropsForStyleResource(props) { + { + // This should only be called when we know we are opting into Resource semantics (i.e. precedence is not null) + var href = props.href, + onLoad = props.onLoad, + onError = props.onError, + disabled = props.disabled; + var allProps = ['onLoad', 'onError', 'disabled']; + var includedProps = []; + if (onLoad) includedProps.push('onLoad'); + if (onError) includedProps.push('onError'); + if (disabled != null) includedProps.push('disabled'); + var allPropsUnionPhrase = propNamesListJoin(allProps, 'or'); + var includedPropsPhrase = propNamesListJoin(includedProps, 'and'); + includedPropsPhrase += includedProps.length === 1 ? ' prop' : ' props'; + + if (includedProps.length) { + error('A link (rel="stylesheet") element with href "%s" has the precedence prop but also included the %s.' + ' When using %s React will opt out of Resource behavior. If you meant for this' + ' element to be treated as a Resource remove the %s. Otherwise remove the precedence prop.', href, includedPropsPhrase, allPropsUnionPhrase, includedPropsPhrase); - if (preloadOptionsForComparison.includes(_propName9)) { - description += "\n \"" + _propName9 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", original option value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + return true; } } - return description; + return false; } -function describeDifferencesForPreloadOverImplicitPreload(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; - for (var propName in diff.missing) { - var propValue = diff.missing[propName]; +function propNamesListJoin(list, combinator) { + switch (list.length) { + case 0: + return ''; - if (preloadOptionsForComparison.includes(propName)) { - description += "\n \"" + propName + "\" missing from options, underlying prop value: " + getValueDescriptorExpectingEnumForWarning(propValue); - } - } + case 1: + return list[0]; - for (var _propName10 in diff.extra) { - var _propValue5 = diff.extra[_propName10]; + case 2: + return list[0] + ' ' + combinator + ' ' + list[1]; - if (preloadOptionsForComparison.includes(_propName10)) { - description += "\n \"" + _propName10 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(_propValue5) + ", missing from underlying props"; - } + default: + return list.slice(0, -1).join(', ') + ', ' + combinator + ' ' + list[list.length - 1]; } +} - for (var _propName11 in diff.different) { - var latestValue = diff.different[_propName11].latest; - var originalValue = diff.different[_propName11].original; +function validateLinkPropsForPreloadResource(linkProps) { + { + var href = linkProps.href, + as = linkProps.as; + + if (as === 'font') { + var name = getResourceNameForWarning('preload', linkProps, false); - if (preloadOptionsForComparison.includes(_propName11)) { - description += "\n \"" + _propName11 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", underlying prop value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + if (!hasOwnProperty.call(linkProps, 'crossOrigin')) { + error('A %s with href "%s" did not specify the crossOrigin prop. Font preloads must always use' + ' anonymouse CORS mode. To fix add an empty string, "anonymous", or any other string' + ' value except "use-credentials" for the crossOrigin prop of all font preloads.', name, href); + } else if (linkProps.crossOrigin === 'use-credentials') { + error('A %s with href "%s" specified a crossOrigin value of "use-credentials". Font preloads must always use' + ' anonymouse CORS mode. To fix use an empty string, "anonymous", or any other string' + ' value except "use-credentials" for the crossOrigin prop of all font preloads.', name, href); + } } } - - return description; } -function describeDifferencesForScripts(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; +function validatePreloadArguments(href, options) { + { + if (!href || typeof href !== 'string') { + var typeOfArg = getValueDescriptorExpectingObjectForWarning(href); - for (var propName in diff.missing) { - var propValue = diff.missing[propName]; - description += "\n \"" + propName + "\" missing for props, original value: " + getValueDescriptorExpectingEnumForWarning(propValue); - } + error('ReactDOM.preload() expected the first argument to be a string representing an href but found %s instead.', typeOfArg); + } else if (typeof options !== 'object' || options === null) { + var _typeOfArg = getValueDescriptorExpectingObjectForWarning(options); - for (var _propName12 in diff.extra) { - var _propValue6 = diff.extra[_propName12]; - description += "\n \"" + _propName12 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(_propValue6) + ", missing from original props"; - } + error('ReactDOM.preload() expected the second argument to be an options argument containing at least an "as" property' + ' specifying the Resource type. It found %s instead. The href for the preload call where this warning originated is "%s".', _typeOfArg, href); + } else { + var as = options.as; - for (var _propName13 in diff.different) { - var latestValue = diff.different[_propName13].latest; - var originalValue = diff.different[_propName13].original; - description += "\n \"" + _propName13 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", original value: " + getValueDescriptorExpectingEnumForWarning(originalValue); - } + switch (as) { + // Font specific validation of options + case 'font': + { + if (options.crossOrigin === 'use-credentials') { + error('ReactDOM.preload() was called with an "as" type of "font" and with a "crossOrigin" option of "use-credentials".' + ' Fonts preloading must use crossOrigin "anonymous" to be functional. Please update your font preload to omit' + ' the crossOrigin option or change it to any other value than "use-credentials" (Browsers default all other values' + ' to anonymous mode). The href for the preload call where this warning originated is "%s"', href); + } - return description; -} -function describeDifferencesForScriptOverPreinit(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; + break; + } - for (var propName in diff.extra) { - var propValue = diff.extra[propName]; + case 'script': + case 'style': + { + break; + } + // We have an invalid as type and need to warn - if (propName === 'crossOrigin' || propName === 'integrity') { - description += "\n \"" + propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", option missing"; - } else { - description += "\n \"" + propName + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", option not available with ReactDOM.preinit()"; + default: + { + var typeOfAs = getValueDescriptorExpectingEnumForWarning(as); + + error('ReactDOM.preload() expected a valid "as" type in the options (second) argument but found %s instead.' + ' Please use one of the following valid values instead: %s. The href for the preload call where this' + ' warning originated is "%s".', typeOfAs, '"style", "font", or "script"', href); + } + } } } +} +function validatePreinitArguments(href, options) { + { + if (!href || typeof href !== 'string') { + var typeOfArg = getValueDescriptorExpectingObjectForWarning(href); - for (var _propName14 in diff.different) { - var latestValue = diff.different[_propName14].latest; - var originalValue = diff.different[_propName14].original; - description += "\n \"" + _propName14 + "\" prop value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", option value: " + getValueDescriptorExpectingEnumForWarning(originalValue); - } + error('ReactDOM.preinit() expected the first argument to be a string representing an href but found %s instead.', typeOfArg); + } else if (typeof options !== 'object' || options === null) { + var _typeOfArg2 = getValueDescriptorExpectingObjectForWarning(options); - return description; -} -function describeDifferencesForPreinitOverScript(newProps, currentProps) { - var diff = compareResourcePropsForWarning(newProps, currentProps); - if (!diff) return ''; - var description = ''; + error('ReactDOM.preinit() expected the second argument to be an options argument containing at least an "as" property' + ' specifying the Resource type. It found %s instead. The href for the preload call where this warning originated is "%s".', _typeOfArg2, href); + } else { + var as = options.as; - for (var propName in diff.extra) { - var propValue = diff.extra[propName]; + switch (as) { + case 'style': + case 'script': + { + break; + } + // We have an invalid as type and need to warn - if (propName === 'crossOrigin' || propName === 'integrity') { - description += "\n \"" + propName + "\" option value: " + getValueDescriptorExpectingEnumForWarning(propValue) + ", missing from props"; - } - } + default: + { + var typeOfAs = getValueDescriptorExpectingEnumForWarning(as); - for (var _propName15 in diff.different) { - var latestValue = diff.different[_propName15].latest; - var originalValue = diff.different[_propName15].original; - description += "\n \"" + _propName15 + "\" option value: " + getValueDescriptorExpectingEnumForWarning(latestValue) + ", prop value: " + getValueDescriptorExpectingEnumForWarning(originalValue); + error('ReactDOM.preinit() expected the second argument to be an options argument containing at least an "as" property' + ' specifying the Resource type. It found %s instead. Currently, valid resource types for for preinit are "style"' + ' and "script". The href for the preinit call where this warning originated is "%s".', typeOfAs, href); + } + } + } } +} - return description; +function getValueDescriptorExpectingObjectForWarning(thing) { + return thing === null ? 'null' : thing === undefined ? 'undefined' : thing === '' ? 'an empty string' : "something with type \"" + typeof thing + "\""; } -var ReactDOMSharedInternals = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; +function getValueDescriptorExpectingEnumForWarning(thing) { + return thing === null ? 'null' : thing === undefined ? 'undefined' : thing === '' ? 'an empty string' : typeof thing === 'string' ? JSON.stringify(thing) : "something with type \"" + typeof thing + "\""; +} -var ReactDOMCurrentDispatcher = ReactDOMSharedInternals.Dispatcher; -var ReactDOMServerDispatcher = { - preload: preload, - preinit: preinit -} ; +function createResources() { + return { + // persistent + preloadsMap: new Map(), + stylesMap: new Map(), + scriptsMap: new Map(), + headsMap: new Map(), + // cleared on flush + charset: null, + bases: new Set(), + preconnects: new Set(), + fontPreloads: new Set(), + // usedImagePreloads: new Set(), + precedences: new Map(), + usedStylePreloads: new Set(), + scripts: new Set(), + usedScriptPreloads: new Set(), + explicitStylePreloads: new Set(), + // explicitImagePreloads: new Set(), + explicitScriptPreloads: new Set(), + headResources: new Set(), + // cache for tracking structured meta tags + structuredMetaKeys: new Map(), + // like a module global for currently rendering boundary + boundaryResources: null + }; +} +function createBoundaryResources() { + return new Set(); +} var currentResources = null; var currentResourcesStack = []; -function prepareToRender(resources) { +function prepareToRenderResources(resources) { currentResourcesStack.push(currentResources); currentResources = resources; - var previousHostDispatcher = ReactDOMCurrentDispatcher.current; - ReactDOMCurrentDispatcher.current = ReactDOMServerDispatcher; - return previousHostDispatcher; } -function cleanupAfterRender(previousDispatcher) { +function finishRenderingResources() { currentResources = currentResourcesStack.pop(); - ReactDOMCurrentDispatcher.current = previousDispatcher; -} // Used to distinguish these contexts from ones used in other renderers. -var ScriptStreamingFormat = 0; -var NothingSent -/* */ -= 0; -var SentCompleteSegmentFunction -/* */ -= 1; -var SentCompleteBoundaryFunction -/* */ -= 2; -var SentClientRenderFunction -/* */ -= 4; -var SentStyleInsertionFunction -/* */ -= 8; // Per response, global state that is not contextual to the rendering subtree. +} +function setCurrentlyRenderingBoundaryResourcesTarget(resources, boundaryResources) { + resources.boundaryResources = boundaryResources; +} +var ReactDOMServerFloatDispatcher = { + preload: preload, + preinit: preinit +}; -var dataElementQuotedEnd = stringToPrecomputedChunk('"></template>'); -var startInlineScript = stringToPrecomputedChunk('<script>'); -var endInlineScript = stringToPrecomputedChunk('</script>'); -var startScriptSrc = stringToPrecomputedChunk('<script src="'); -var startModuleSrc = stringToPrecomputedChunk('<script type="module" src="'); -var scriptIntegirty = stringToPrecomputedChunk('" integrity="'); -var endAsyncScript = stringToPrecomputedChunk('" async=""></script>'); -/** - * This escaping function is designed to work with bootstrapScriptContent only. - * because we know we are escaping the entire script. We can avoid for instance - * escaping html comment string sequences that are valid javascript as well because - * if there are no sebsequent <script sequences the html parser will never enter - * script data double escaped state (see: https://www.w3.org/TR/html53/syntax.html#script-data-double-escaped-state) - * - * While untrusted script content should be made safe before using this api it will - * ensure that the script cannot be early terminated or never terminated state - */ +function preload(href, options) { + if (!currentResources) { + // While we expect that preload calls are primarily going to be observed + // during render because effects and events don't run on the server it is + // still possible that these get called in module scope. This is valid on + // the client since there is still a document to interact with but on the + // server we need a request to associate the call to. Because of this we + // simply return and do not warn. + return; + } + + var resources = currentResources; -function escapeBootstrapScriptContent(scriptText) { { - checkHtmlStringCoercion(scriptText); + validatePreloadArguments(href, options); } - return ('' + scriptText).replace(scriptRegex, scriptReplacer); -} - -var scriptRegex = /(<\/|<)(s)(cript)/gi; + if (typeof href === 'string' && href && typeof options === 'object' && options !== null) { + var as = options.as; + var resource = resources.preloadsMap.get(href); -var scriptReplacer = function (match, prefix, s, suffix) { - return "" + prefix + (s === 's' ? "\\u0073" : "\\u0053") + suffix; -}; // Allows us to keep track of what we've already written so we can refer back to it. -// if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag -// is set, the server will send instructions via data attributes (instead of inline scripts) + if (resource) { + { + var originallyImplicit = resource._dev_implicit_construction === true; + var latestProps = preloadPropsFromPreloadOptions(href, as, options); + validatePreloadResourceDifference(resource.props, originallyImplicit, latestProps, false); + } + } else { + resource = createPreloadResource(resources, href, as, preloadPropsFromPreloadOptions(href, as, options)); + } + switch (as) { + case 'font': + { + resources.fontPreloads.add(resource); + break; + } -function createResponseState(identifierPrefix, nonce, bootstrapScriptContent, bootstrapScripts, bootstrapModules, externalRuntimeConfig) { - var idPrefix = identifierPrefix === undefined ? '' : identifierPrefix; - var inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk('<script nonce="' + escapeTextForBrowser(nonce) + '">'); - var bootstrapChunks = []; - var externalRuntimeDesc = null; - var streamingFormat = ScriptStreamingFormat; + case 'style': + { + resources.explicitStylePreloads.add(resource); + break; + } - if (bootstrapScriptContent !== undefined) { - bootstrapChunks.push(inlineScriptWithNonce, stringToChunk(escapeBootstrapScriptContent(bootstrapScriptContent)), endInlineScript); + case 'script': + { + resources.explicitScriptPreloads.add(resource); + break; + } + } } +} - if (bootstrapScripts !== undefined) { - for (var i = 0; i < bootstrapScripts.length; i++) { - var scriptConfig = bootstrapScripts[i]; - var src = typeof scriptConfig === 'string' ? scriptConfig : scriptConfig.src; - var integrity = typeof scriptConfig === 'string' ? undefined : scriptConfig.integrity; - bootstrapChunks.push(startScriptSrc, stringToChunk(escapeTextForBrowser(src))); +function preinit(href, options) { + if (!currentResources) { + // While we expect that preinit calls are primarily going to be observed + // during render because effects and events don't run on the server it is + // still possible that these get called in module scope. This is valid on + // the client since there is still a document to interact with but on the + // server we need a request to associate the call to. Because of this we + // simply return and do not warn. + return; + } - if (integrity) { - bootstrapChunks.push(scriptIntegirty, stringToChunk(escapeTextForBrowser(integrity))); - } + preinitImpl(currentResources, href, options); +} // On the server, preinit may be called outside of render when sending an +// external SSR runtime as part of the initial resources payload. Since this +// is an internal React call, we do not need to use the resources stack. - bootstrapChunks.push(endAsyncScript); - } + +function preinitImpl(resources, href, options) { + { + validatePreinitArguments(href, options); } - if (bootstrapModules !== undefined) { - for (var _i = 0; _i < bootstrapModules.length; _i++) { - var _scriptConfig = bootstrapModules[_i]; + if (typeof href === 'string' && href && typeof options === 'object' && options !== null) { + var as = options.as; - var _src = typeof _scriptConfig === 'string' ? _scriptConfig : _scriptConfig.src; + switch (as) { + case 'style': + { + var resource = resources.stylesMap.get(href); - var _integrity = typeof _scriptConfig === 'string' ? undefined : _scriptConfig.integrity; + if (resource) { + { + var latestProps = stylePropsFromPreinitOptions(href, resource.precedence, options); + validateStyleResourceDifference(resource.props, latestProps); + } + } else { + var precedence = options.precedence || 'default'; + var resourceProps = stylePropsFromPreinitOptions(href, precedence, options); + resource = createStyleResource(resources, href, precedence, resourceProps); + } - bootstrapChunks.push(startModuleSrc, stringToChunk(escapeTextForBrowser(_src))); + resource.set.add(resource); + resources.explicitStylePreloads.add(resource.hint); + return; + } - if (_integrity) { - bootstrapChunks.push(scriptIntegirty, stringToChunk(escapeTextForBrowser(_integrity))); - } + case 'script': + { + var src = href; - bootstrapChunks.push(endAsyncScript); + var _resource = resources.scriptsMap.get(src); + + if (_resource) { + { + var _latestProps = scriptPropsFromPreinitOptions(src, options); + + validateScriptResourceDifference(_resource.props, _latestProps); + } + } else { + var scriptProps = scriptPropsFromPreinitOptions(src, options); + _resource = createScriptResource(resources, src, scriptProps); + resources.scripts.add(_resource); + } + + return; + } } } +} +function preloadPropsFromPreloadOptions(href, as, options) { return { - bootstrapChunks: bootstrapChunks, - placeholderPrefix: stringToPrecomputedChunk(idPrefix + 'P:'), - segmentPrefix: stringToPrecomputedChunk(idPrefix + 'S:'), - boundaryPrefix: idPrefix + 'B:', - idPrefix: idPrefix, - nextSuspenseID: 0, - streamingFormat: streamingFormat, - startInlineScript: inlineScriptWithNonce, - instructions: NothingSent, - externalRuntimeConfig: externalRuntimeDesc, - htmlChunks: null, - headChunks: null, - hasBody: false, - charsetChunks: [], - preconnectChunks: [], - preloadChunks: [], - hoistableChunks: [] + href: href, + rel: 'preload', + as: as, + crossOrigin: as === 'font' ? '' : options.crossOrigin, + integrity: options.integrity }; -} // Constants for the insertion mode we're currently writing in. We don't encode all HTML5 insertion -// modes. We only include the variants as they matter for the sake of our purposes. -// We don't actually provide the namespace therefore we use constants instead of the string. +} -var ROOT_HTML_MODE = 0; // Used for the root most element tag. -// We have a less than HTML_HTML_MODE check elsewhere. If you add more cases here, make sure it -// still makes sense +function preloadPropsFromRawProps(href, as, rawProps) { + var props = assign({}, rawProps); -var HTML_HTML_MODE = 1; // Used for the <html> if it is at the top level. + props.href = href; + props.rel = 'preload'; + props.as = as; -var HTML_MODE = 2; -var SVG_MODE = 3; -var MATHML_MODE = 4; -var HTML_TABLE_MODE = 5; -var HTML_TABLE_BODY_MODE = 6; -var HTML_TABLE_ROW_MODE = 7; -var HTML_COLGROUP_MODE = 8; // We have a greater than HTML_TABLE_MODE check elsewhere. If you add more cases here, make sure it -// still makes sense -// Lets us keep track of contextual state and pick it back up after suspending. + if (as === 'font') { + // Font preloads always need CORS anonymous mode so we set it here + // regardless of the props provided. This should warn elsewhere in + // dev + props.crossOrigin = ''; + } -function createFormatContext(insertionMode, selectedValue, noscriptTagInScope) { + return props; +} + +function preloadAsStylePropsFromProps(href, props) { return { - insertionMode: insertionMode, - selectedValue: selectedValue, - noscriptTagInScope: noscriptTagInScope + rel: 'preload', + as: 'style', + href: href, + crossOrigin: props.crossOrigin, + integrity: props.integrity, + media: props.media, + hrefLang: props.hrefLang, + referrerPolicy: props.referrerPolicy }; } -function createRootFormatContext(namespaceURI) { - var insertionMode = namespaceURI === 'http://www.w3.org/2000/svg' ? SVG_MODE : namespaceURI === 'http://www.w3.org/1998/Math/MathML' ? MATHML_MODE : ROOT_HTML_MODE; - return createFormatContext(insertionMode, null, false); +function preloadAsScriptPropsFromProps(href, props) { + return { + rel: 'preload', + as: 'script', + href: href, + crossOrigin: props.crossOrigin, + integrity: props.integrity, + referrerPolicy: props.referrerPolicy + }; } -function getChildFormatContext(parentContext, type, props) { - switch (type) { - case 'noscript': - return createFormatContext(HTML_MODE, null, true); - - case 'select': - return createFormatContext(HTML_MODE, props.value != null ? props.value : props.defaultValue, parentContext.noscriptTagInScope); - case 'svg': - return createFormatContext(SVG_MODE, null, parentContext.noscriptTagInScope); +function createPreloadResource(resources, href, as, props) { + var preloadsMap = resources.preloadsMap; - case 'math': - return createFormatContext(MATHML_MODE, null, parentContext.noscriptTagInScope); + { + if (preloadsMap.has(href)) { + error('createPreloadResource was called when a preload Resource matching the same href already exists. This is a bug in React.'); + } + } - case 'foreignObject': - return createFormatContext(HTML_MODE, null, parentContext.noscriptTagInScope); - // Table parents are special in that their children can only be created at all if they're - // wrapped in a table parent. So we need to encode that we're entering this mode. + var resource = { + type: 'preload', + as: as, + href: href, + flushed: false, + props: props + }; + preloadsMap.set(href, resource); + return resource; +} - case 'table': - return createFormatContext(HTML_TABLE_MODE, null, parentContext.noscriptTagInScope); +function stylePropsFromRawProps(href, precedence, rawProps) { + var props = assign({}, rawProps); - case 'thead': - case 'tbody': - case 'tfoot': - return createFormatContext(HTML_TABLE_BODY_MODE, null, parentContext.noscriptTagInScope); + props.href = href; + props.rel = 'stylesheet'; + props['data-precedence'] = precedence; + delete props.precedence; + return props; +} - case 'colgroup': - return createFormatContext(HTML_COLGROUP_MODE, null, parentContext.noscriptTagInScope); +function stylePropsFromPreinitOptions(href, precedence, options) { + return { + rel: 'stylesheet', + href: href, + 'data-precedence': precedence, + crossOrigin: options.crossOrigin + }; +} - case 'tr': - return createFormatContext(HTML_TABLE_ROW_MODE, null, parentContext.noscriptTagInScope); +function createStyleResource(resources, href, precedence, props) { + { + if (resources.stylesMap.has(href)) { + error('createStyleResource was called when a style Resource matching the same href already exists. This is a bug in React.'); + } } - if (parentContext.insertionMode >= HTML_TABLE_MODE) { - // Whatever tag this was, it wasn't a table parent or other special parent, so we must have - // entered plain HTML again. - return createFormatContext(HTML_MODE, null, parentContext.noscriptTagInScope); + var stylesMap = resources.stylesMap, + preloadsMap = resources.preloadsMap, + precedences = resources.precedences; // If this is the first time we've seen this precedence we encode it's position in our set even though + // we don't add the resource to this set yet + + var precedenceSet = precedences.get(precedence); + + if (!precedenceSet) { + precedenceSet = new Set(); + precedences.set(precedence, precedenceSet); } - if (parentContext.insertionMode === ROOT_HTML_MODE) { - if (type === 'html') { - // We've emitted the root and is now in <html> mode. - return createFormatContext(HTML_HTML_MODE, null, false); - } else { - // We've emitted the root and is now in plain HTML mode. - return createFormatContext(HTML_MODE, null, false); + var hint = preloadsMap.get(href); + + if (hint) { + // If a preload for this style Resource already exists there are certain props we want to adopt + // on the style Resource, primarily focussed on making sure the style network pathways utilize + // the preload pathways. For instance if you have diffreent crossOrigin attributes for a preload + // and a stylesheet the stylesheet will make a new request even if the preload had already loaded + adoptPreloadPropsForStyleProps(props, hint.props); + + { + validateStyleAndHintProps(hint.props, props, hint._dev_implicit_construction); + } + } else { + var preloadResourceProps = preloadAsStylePropsFromProps(href, props); + hint = createPreloadResource(resources, href, 'style', preloadResourceProps); + + { + hint._dev_implicit_construction = true; } - } else if (parentContext.insertionMode === HTML_HTML_MODE) { - // We've emitted the document element and is now in plain HTML mode. - return createFormatContext(HTML_MODE, null, false); + + resources.explicitStylePreloads.add(hint); } - return parentContext; -} -var UNINITIALIZED_SUSPENSE_BOUNDARY_ID = null; -function assignSuspenseBoundaryID(responseState) { - var generatedID = responseState.nextSuspenseID++; - return stringToPrecomputedChunk(responseState.boundaryPrefix + generatedID.toString(16)); + var resource = { + type: 'style', + href: href, + precedence: precedence, + flushed: false, + inShell: false, + props: props, + hint: hint, + set: precedenceSet + }; + stylesMap.set(href, resource); + return resource; } -function makeId(responseState, treeId, localId) { - var idPrefix = responseState.idPrefix; - var id = ':' + idPrefix + 'R' + treeId; // Unless this is the first id at this level, append a number at the end - // that represents the position of this useId hook among all the useId - // hooks for this fiber. - if (localId > 0) { - id += 'H' + localId.toString(32); - } +function adoptPreloadPropsForStyleProps(resourceProps, preloadProps) { + if (resourceProps.crossOrigin == null) resourceProps.crossOrigin = preloadProps.crossOrigin; + if (resourceProps.referrerPolicy == null) resourceProps.referrerPolicy = preloadProps.referrerPolicy; + if (resourceProps.title == null) resourceProps.title = preloadProps.title; +} - return id + ':'; +function scriptPropsFromPreinitOptions(src, options) { + return { + src: src, + async: true, + crossOrigin: options.crossOrigin, + integrity: options.integrity + }; } -function encodeHTMLTextNode(text) { - return escapeTextForBrowser(text); +function scriptPropsFromRawProps(src, rawProps) { + var props = assign({}, rawProps); + + props.src = src; + return props; } -var textSeparator = stringToPrecomputedChunk('<!-- -->'); -function pushTextInstance(target, text, responseState, textEmbedded) { - if (text === '') { - // Empty text doesn't have a DOM node representation and the hydration is aware of this. - return textEmbedded; +function createScriptResource(resources, src, props) { + { + if (resources.scriptsMap.has(src)) { + error('createScriptResource was called when a script Resource matching the same src already exists. This is a bug in React.'); + } } - if (textEmbedded) { - target.push(textSeparator); - } + var scriptsMap = resources.scriptsMap, + preloadsMap = resources.preloadsMap; + var hint = preloadsMap.get(src); - target.push(stringToChunk(encodeHTMLTextNode(text))); - return true; -} // Called when Fizz is done with a Segment. Currently the only purpose is to conditionally -// emit a text separator when we don't know for sure it is safe to omit + if (hint) { + // If a preload for this style Resource already exists there are certain props we want to adopt + // on the style Resource, primarily focussed on making sure the style network pathways utilize + // the preload pathways. For instance if you have diffreent crossOrigin attributes for a preload + // and a stylesheet the stylesheet will make a new request even if the preload had already loaded + adoptPreloadPropsForScriptProps(props, hint.props); -function pushSegmentFinale(target, responseState, lastPushedText, textEmbedded) { - if (lastPushedText && textEmbedded) { - target.push(textSeparator); - } -} -var styleNameCache = new Map(); + { + validateScriptAndHintProps(hint.props, props, hint._dev_implicit_construction); + } + } else { + var preloadResourceProps = preloadAsScriptPropsFromProps(src, props); + hint = createPreloadResource(resources, src, 'script', preloadResourceProps); -function processStyleName(styleName) { - var chunk = styleNameCache.get(styleName); + { + hint._dev_implicit_construction = true; + } - if (chunk !== undefined) { - return chunk; + resources.explicitScriptPreloads.add(hint); } - var result = stringToPrecomputedChunk(escapeTextForBrowser(hyphenateStyleName(styleName))); - styleNameCache.set(styleName, result); - return result; + var resource = { + type: 'script', + src: src, + flushed: false, + props: props, + hint: hint + }; + scriptsMap.set(src, resource); + return resource; } -var styleAttributeStart = stringToPrecomputedChunk(' style="'); -var styleAssign = stringToPrecomputedChunk(':'); -var styleSeparator = stringToPrecomputedChunk(';'); +function adoptPreloadPropsForScriptProps(resourceProps, preloadProps) { + if (resourceProps.crossOrigin == null) resourceProps.crossOrigin = preloadProps.crossOrigin; + if (resourceProps.referrerPolicy == null) resourceProps.referrerPolicy = preloadProps.referrerPolicy; + if (resourceProps.integrity == null) resourceProps.integrity = preloadProps.integrity; +} -function pushStyleAttribute(target, style) { - if (typeof style !== 'object') { - throw new Error('The `style` prop expects a mapping from style properties to values, ' + "not a string. For example, style={{marginRight: spacing + 'em'}} when " + 'using JSX.'); +function titlePropsFromRawProps(child, rawProps) { + var props = assign({}, rawProps); + + props.children = child; + return props; +} + +function resourcesFromElement(type, props) { + if (!currentResources) { + throw new Error('"currentResources" was expected to exist. This is a bug in React.'); } - var isFirst = true; + var resources = currentResources; - for (var styleName in style) { - if (!hasOwnProperty.call(style, styleName)) { - continue; - } // If you provide unsafe user data here they can inject arbitrary CSS - // which may be problematic (I couldn't repro this): - // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet - // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/ - // This is not an XSS hole but instead a potential CSS injection issue - // which has lead to a greater discussion about how we're going to - // trust URLs moving forward. See #2115901 - - - var styleValue = style[styleName]; + switch (type) { + case 'title': + { + var children = props.children; + var child; - if (styleValue == null || typeof styleValue === 'boolean' || styleValue === '') { - // TODO: We used to set empty string as a style with an empty value. Does that ever make sense? - continue; - } + if (Array.isArray(children)) { + child = children.length === 1 ? children[0] : null; + } else { + child = children; + } - var nameChunk = void 0; - var valueChunk = void 0; - var isCustomProperty = styleName.indexOf('--') === 0; + if (typeof child !== 'function' && typeof child !== 'symbol' && child !== null && child !== undefined) { + // eslint-disable-next-line react-internal/safe-string-coercion + var childString = '' + child; + var key = 'title::' + childString; + var resource = resources.headsMap.get(key); - if (isCustomProperty) { - nameChunk = stringToChunk(escapeTextForBrowser(styleName)); + if (!resource) { + resource = { + type: 'title', + props: titlePropsFromRawProps(childString, props), + flushed: false + }; + resources.headsMap.set(key, resource); + resources.headResources.add(resource); + } + } - { - checkCSSPropertyStringCoercion(styleValue, styleName); + return true; } - valueChunk = stringToChunk(escapeTextForBrowser(('' + styleValue).trim())); - } else { + case 'meta': { - warnValidStyle$1(styleName, styleValue); - } + var _key, propertyPath; + + if (typeof props.charSet === 'string') { + _key = 'charSet'; + } else if (typeof props.content === 'string') { + var contentKey = '::' + props.content; + + if (typeof props.httpEquiv === 'string') { + _key = 'httpEquiv::' + props.httpEquiv + contentKey; + } else if (typeof props.name === 'string') { + _key = 'name::' + props.name + contentKey; + } else if (typeof props.itemProp === 'string') { + _key = 'itemProp::' + props.itemProp + contentKey; + } else if (typeof props.property === 'string') { + var property = props.property; + _key = 'property::' + property + contentKey; + propertyPath = property; + var parentPath = property.split(':').slice(0, -1).join(':'); + var parentResource = resources.structuredMetaKeys.get(parentPath); + + if (parentResource) { + _key = parentResource.key + '::child::' + _key; + } + } + } - nameChunk = processStyleName(styleName); + if (_key) { + if (!resources.headsMap.has(_key)) { + var _resource2 = { + type: 'meta', + key: _key, + props: assign({}, props), + flushed: false + }; + resources.headsMap.set(_key, _resource2); - if (typeof styleValue === 'number') { - if (styleValue !== 0 && !hasOwnProperty.call(isUnitlessNumber, styleName)) { - valueChunk = stringToChunk(styleValue + 'px'); // Presumes implicit 'px' suffix for unitless numbers - } else { - valueChunk = stringToChunk('' + styleValue); + if (_key === 'charSet') { + resources.charset = _resource2; + } else { + if (propertyPath) { + resources.structuredMetaKeys.set(propertyPath, _resource2); + } + + resources.headResources.add(_resource2); + } + } } - } else { - { - checkCSSPropertyStringCoercion(styleValue, styleName); + + return true; + } + + case 'base': + { + var target = props.target, + href = props.href; // We mirror the key construction on the client since we will likely unify + // this code in the future to better guarantee key semantics are identical + // in both environments + + var _key2 = 'base'; + _key2 += typeof href === 'string' ? "[href=\"" + href + "\"]" : ':not([href])'; + _key2 += typeof target === 'string' ? "[target=\"" + target + "\"]" : ':not([target])'; + + if (!resources.headsMap.has(_key2)) { + var _resource3 = { + type: 'base', + props: assign({}, props), + flushed: false + }; + resources.headsMap.set(_key2, _resource3); + resources.bases.add(_resource3); } - valueChunk = stringToChunk(escapeTextForBrowser(('' + styleValue).trim())); + return true; } - } + } - if (isFirst) { - isFirst = false; // If it's first, we don't need any separators prefixed. + return false; +} // Construct a resource from link props. - target.push(styleAttributeStart, nameChunk, styleAssign, valueChunk); - } else { - target.push(styleSeparator, nameChunk, styleAssign, valueChunk); - } +function resourcesFromLink(props) { + if (!currentResources) { + throw new Error('"currentResources" was expected to exist. This is a bug in React.'); } - if (!isFirst) { - target.push(attributeEnd); + var resources = currentResources; + var rel = props.rel, + href = props.href; + + if (!href || typeof href !== 'string' || !rel || typeof rel !== 'string') { + return false; } -} -var attributeSeparator = stringToPrecomputedChunk(' '); -var attributeAssign = stringToPrecomputedChunk('="'); -var attributeEnd = stringToPrecomputedChunk('"'); -var attributeEmptyString = stringToPrecomputedChunk('=""'); + var key = ''; -function pushAttribute(target, name, value) // not null or undefined -{ - switch (name) { - case 'style': + switch (rel) { + case 'stylesheet': { - pushStyleAttribute(target, value); - return; - } + var onLoad = props.onLoad, + onError = props.onError, + precedence = props.precedence, + disabled = props.disabled; + + if (typeof precedence !== 'string' || onLoad || onError || disabled != null) { + // This stylesheet is either not opted into Resource semantics or has conflicting properties which + // disqualify it for such. We can still create a preload resource to help it load faster on the + // client + { + validateLinkPropsForStyleResource(props); + } - case 'defaultValue': - case 'defaultChecked': // These shouldn't be set as attributes on generic HTML elements. + var preloadResource = resources.preloadsMap.get(href); - case 'innerHTML': // Must use dangerouslySetInnerHTML instead. + if (!preloadResource) { + preloadResource = createPreloadResource(resources, href, 'style', preloadAsStylePropsFromProps(href, props)); - case 'suppressContentEditableWarning': - case 'suppressHydrationWarning': - // Ignored. These are built-in to React on the client. - return; - } + { + preloadResource._dev_implicit_construction = true; + } - if ( // shouldIgnoreAttribute - // We have already filtered out null/undefined and reserved words. - name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) { - return; - } + resources.usedStylePreloads.add(preloadResource); + } - var propertyInfo = getPropertyInfo(name); + return false; + } else { + // We are able to convert this link element to a resource exclusively. We construct the relevant Resource + // and return true indicating that this link was fully consumed. + var _resource4 = resources.stylesMap.get(href); - if (propertyInfo !== null) { - // shouldRemoveAttribute - switch (typeof value) { - case 'function': - case 'symbol': - // eslint-disable-line - return; + if (_resource4) { + { + var resourceProps = stylePropsFromRawProps(href, precedence, props); + adoptPreloadPropsForStyleProps(resourceProps, _resource4.hint.props); + validateStyleResourceDifference(_resource4.props, resourceProps); + } + } else { + var _resourceProps = stylePropsFromRawProps(href, precedence, props); - case 'boolean': - { - if (!propertyInfo.acceptsBooleans) { - return; + _resource4 = createStyleResource( // $FlowFixMe[incompatible-call] found when upgrading Flow + currentResources, href, precedence, _resourceProps); + resources.usedStylePreloads.add(_resource4.hint); } - } - } - var attributeName = propertyInfo.attributeName; - var attributeNameChunk = stringToChunk(attributeName); // TODO: If it's known we can cache the chunk. + if (resources.boundaryResources) { + resources.boundaryResources.add(_resource4); + } else { + _resource4.set.add(_resource4); + } - switch (propertyInfo.type) { - case BOOLEAN: - if (value) { - target.push(attributeSeparator, attributeNameChunk, attributeEmptyString); + return true; } + } - return; + case 'preload': + { + var as = props.as; - case OVERLOADED_BOOLEAN: - if (value === true) { - target.push(attributeSeparator, attributeNameChunk, attributeEmptyString); - } else if (value === false) ; else { - target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); - } + switch (as) { + case 'script': + case 'style': + case 'font': + { + { + validateLinkPropsForPreloadResource(props); + } - return; + var _resource5 = resources.preloadsMap.get(href); - case NUMERIC: - if (!isNaN(value)) { - target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); - } + if (_resource5) { + { + var originallyImplicit = _resource5._dev_implicit_construction === true; + var latestProps = preloadPropsFromRawProps(href, as, props); + validatePreloadResourceDifference(_resource5.props, originallyImplicit, latestProps, false); + } + } else { + _resource5 = createPreloadResource(resources, href, as, preloadPropsFromRawProps(href, as, props)); + + switch (as) { + case 'script': + { + resources.explicitScriptPreloads.add(_resource5); + break; + } - break; + case 'style': + { + resources.explicitStylePreloads.add(_resource5); + break; + } - case POSITIVE_NUMERIC: - if (!isNaN(value) && value >= 1) { - target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); + case 'font': + { + resources.fontPreloads.add(_resource5); + break; + } + } + } + + return true; + } } break; + } + } - default: - if (propertyInfo.sanitizeURL) { - { - checkAttributeStringCoercion(value, attributeName); - } + if (props.onLoad || props.onError) { + // When a link has these props we can't treat it is a Resource but if we rendered it on the + // server it would look like a Resource in the rendered html (the onLoad/onError aren't emitted) + // Instead we expect the client to insert them rather than hydrate them which also guarantees + // that the onLoad and onError won't fire before the event handlers are attached + return true; + } - value = '' + value; - sanitizeURL(value); - } + var sizes = typeof props.sizes === 'string' ? props.sizes : ''; + var media = typeof props.media === 'string' ? props.media : ''; + key = 'rel:' + rel + '::href:' + href + '::sizes:' + sizes + '::media:' + media; + var resource = resources.headsMap.get(key); - target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); - } - } else if (isAttributeNameSafe(name)) { - // shouldRemoveAttribute - switch (typeof value) { - case 'function': - case 'symbol': - // eslint-disable-line - return; + if (!resource) { + resource = { + type: 'link', + props: assign({}, props), + flushed: false + }; + resources.headsMap.set(key, resource); - case 'boolean': + switch (rel) { + case 'preconnect': + case 'dns-prefetch': { - var prefix = name.toLowerCase().slice(0, 5); + resources.preconnects.add(resource); + break; + } - if (prefix !== 'data-' && prefix !== 'aria-') { - return; - } + default: + { + resources.headResources.add(resource); } } - - target.push(attributeSeparator, stringToChunk(name), attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); } -} - -var endOfStartTag = stringToPrecomputedChunk('>'); -var endOfStartTagSelfClosing = stringToPrecomputedChunk('/>'); - -function pushInnerHTML(target, innerHTML, children) { - if (innerHTML != null) { - if (children != null) { - throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.'); - } - if (typeof innerHTML !== 'object' || !('__html' in innerHTML)) { - throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' + 'for more information.'); - } + return true; +} // Construct a resource from link props. - var html = innerHTML.__html; +function resourcesFromScript(props) { + if (!currentResources) { + throw new Error('"currentResources" was expected to exist. This is a bug in React.'); + } - if (html !== null && html !== undefined) { - { - checkHtmlStringCoercion(html); - } + var resources = currentResources; + var src = props.src, + async = props.async, + onLoad = props.onLoad, + onError = props.onError; - target.push(stringToChunk('' + html)); - } + if (!src || typeof src !== 'string') { + return false; } -} // TODO: Move these to ResponseState so that we warn for every request. -// It would help debugging in stateful servers (e.g. service worker). + if (async) { + if (onLoad || onError) { -var didWarnDefaultInputValue = false; -var didWarnDefaultChecked = false; -var didWarnDefaultSelectValue = false; -var didWarnDefaultTextareaValue = false; -var didWarnInvalidOptionChildren = false; -var didWarnInvalidOptionInnerHTML = false; -var didWarnSelectedSetOnOption = false; + var preloadResource = resources.preloadsMap.get(src); -function checkSelectProp(props, propName) { - { - var value = props[propName]; + if (!preloadResource) { + preloadResource = createPreloadResource(resources, src, 'script', preloadAsScriptPropsFromProps(src, props)); - if (value != null) { - var array = isArray(value); + { + preloadResource._dev_implicit_construction = true; + } - if (props.multiple && !array) { - error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.', propName); - } else if (!props.multiple && array) { - error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.', propName); + resources.usedScriptPreloads.add(preloadResource); + } + } else { + var resource = resources.scriptsMap.get(src); + + if (resource) { + { + var latestProps = scriptPropsFromRawProps(src, props); + adoptPreloadPropsForScriptProps(latestProps, resource.hint.props); + validateScriptResourceDifference(resource.props, latestProps); + } + } else { + var resourceProps = scriptPropsFromRawProps(src, props); + resource = createScriptResource(resources, src, resourceProps); + resources.scripts.add(resource); } } + + return true; } + + return false; } +function hoistResources(resources, source) { + var currentBoundaryResources = resources.boundaryResources; -function pushStartSelect(target, props) { - { - checkControlledValueProps('select', props); - checkSelectProp(props, 'value'); - checkSelectProp(props, 'defaultValue'); + if (currentBoundaryResources) { + source.forEach(function (resource) { + return currentBoundaryResources.add(resource); + }); + source.clear(); + } +} +function hoistResourcesToRoot(resources, boundaryResources) { + boundaryResources.forEach(function (resource) { + return resource.set.add(resource); + }); + boundaryResources.clear(); +} - if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultSelectValue) { - error('Select 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 select ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components'); +// The build script is at scripts/rollup/generate-inline-fizz-runtime.js. +// Run `yarn generate-inline-fizz-runtime` to generate. +var clientRenderBoundary = '$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};'; +var completeBoundary = '$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};'; +var completeBoundaryWithStyles = '$RM=new Map;\n$RR=function(p,q,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};'; +var completeSegment = '$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};'; - didWarnDefaultSelectValue = true; - } +var ReactDOMSharedInternals = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; + +var ReactDOMCurrentDispatcher = ReactDOMSharedInternals.Dispatcher; +var ReactDOMServerDispatcher = ReactDOMServerFloatDispatcher ; +function prepareToRender(resources) { + prepareToRenderResources(resources); + var previousHostDispatcher = ReactDOMCurrentDispatcher.current; + ReactDOMCurrentDispatcher.current = ReactDOMServerDispatcher; + return previousHostDispatcher; +} +function cleanupAfterRender(previousDispatcher) { + finishRenderingResources(); + ReactDOMCurrentDispatcher.current = previousDispatcher; +} // Used to distinguish these contexts from ones used in other renderers. +var ScriptStreamingFormat = 0; + +var dataElementQuotedEnd = stringToPrecomputedChunk('"></template>'); +var startInlineScript = stringToPrecomputedChunk('<script>'); +var endInlineScript = stringToPrecomputedChunk('</script>'); +var startScriptSrc = stringToPrecomputedChunk('<script src="'); +var startModuleSrc = stringToPrecomputedChunk('<script type="module" src="'); +var scriptIntegirty = stringToPrecomputedChunk('" integrity="'); +var endAsyncScript = stringToPrecomputedChunk('" async=""></script>'); +/** + * This escaping function is designed to work with bootstrapScriptContent only. + * because we know we are escaping the entire script. We can avoid for instance + * escaping html comment string sequences that are valid javascript as well because + * if there are no sebsequent <script sequences the html parser will never enter + * script data double escaped state (see: https://www.w3.org/TR/html53/syntax.html#script-data-double-escaped-state) + * + * While untrusted script content should be made safe before using this api it will + * ensure that the script cannot be early terminated or never terminated state + */ + +function escapeBootstrapScriptContent(scriptText) { + { + checkHtmlStringCoercion(scriptText); } - target.push(startChunkForTag('select')); - var children = null; - var innerHTML = null; + return ('' + scriptText).replace(scriptRegex, scriptReplacer); +} - for (var propKey in props) { - if (hasOwnProperty.call(props, propKey)) { - var propValue = props[propKey]; +var scriptRegex = /(<\/|<)(s)(cript)/gi; - if (propValue == null) { - continue; - } +var scriptReplacer = function (match, prefix, s, suffix) { + return "" + prefix + (s === 's' ? "\\u0073" : "\\u0053") + suffix; +}; // Allows us to keep track of what we've already written so we can refer back to it. +// if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag +// is set, the server will send instructions via data attributes (instead of inline scripts) - switch (propKey) { - case 'children': - children = propValue; - break; - case 'dangerouslySetInnerHTML': - // TODO: This doesn't really make sense for select since it can't use the controlled - // value in the innerHTML. - innerHTML = propValue; - break; +function createResponseState(identifierPrefix, nonce, bootstrapScriptContent, bootstrapScripts, bootstrapModules, externalRuntimeConfig) { + var idPrefix = identifierPrefix === undefined ? '' : identifierPrefix; + var inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk('<script nonce="' + escapeTextForBrowser(nonce) + '">'); + var bootstrapChunks = []; + var externalRuntimeDesc = null; + var streamingFormat = ScriptStreamingFormat; - case 'defaultValue': - case 'value': - // These are set on the Context instead and applied to the nested options. - break; + if (bootstrapScriptContent !== undefined) { + bootstrapChunks.push(inlineScriptWithNonce, stringToChunk(escapeBootstrapScriptContent(bootstrapScriptContent)), endInlineScript); + } - default: - pushAttribute(target, propKey, propValue); - break; + if (bootstrapScripts !== undefined) { + for (var i = 0; i < bootstrapScripts.length; i++) { + var scriptConfig = bootstrapScripts[i]; + var src = typeof scriptConfig === 'string' ? scriptConfig : scriptConfig.src; + var integrity = typeof scriptConfig === 'string' ? undefined : scriptConfig.integrity; + bootstrapChunks.push(startScriptSrc, stringToChunk(escapeTextForBrowser(src))); + + if (integrity) { + bootstrapChunks.push(scriptIntegirty, stringToChunk(escapeTextForBrowser(integrity))); } + + bootstrapChunks.push(endAsyncScript); } } - target.push(endOfStartTag); - pushInnerHTML(target, innerHTML, children); - return children; -} - -function flattenOptionChildren(children) { - var content = ''; // Flatten children and warn if they aren't strings or numbers; - // invalid types are ignored. + if (bootstrapModules !== undefined) { + for (var _i = 0; _i < bootstrapModules.length; _i++) { + var _scriptConfig = bootstrapModules[_i]; - React.Children.forEach(children, function (child) { - if (child == null) { - return; - } + var _src = typeof _scriptConfig === 'string' ? _scriptConfig : _scriptConfig.src; - content += child; + var _integrity = typeof _scriptConfig === 'string' ? undefined : _scriptConfig.integrity; - { - if (!didWarnInvalidOptionChildren && typeof child !== 'string' && typeof child !== 'number') { - didWarnInvalidOptionChildren = true; + bootstrapChunks.push(startModuleSrc, stringToChunk(escapeTextForBrowser(_src))); - error('Cannot infer the option value of complex children. ' + 'Pass a `value` prop or use a plain string as children to <option>.'); + if (_integrity) { + bootstrapChunks.push(scriptIntegirty, stringToChunk(escapeTextForBrowser(_integrity))); } + + bootstrapChunks.push(endAsyncScript); } - }); - return content; -} + } -var selectedMarkerAttribute = stringToPrecomputedChunk(' selected=""'); + return { + bootstrapChunks: bootstrapChunks, + placeholderPrefix: stringToPrecomputedChunk(idPrefix + 'P:'), + segmentPrefix: stringToPrecomputedChunk(idPrefix + 'S:'), + boundaryPrefix: idPrefix + 'B:', + idPrefix: idPrefix, + nextSuspenseID: 0, + streamingFormat: streamingFormat, + startInlineScript: inlineScriptWithNonce, + sentCompleteSegmentFunction: false, + sentCompleteBoundaryFunction: false, + sentClientRenderFunction: false, + sentStyleInsertionFunction: false, + externalRuntimeConfig: externalRuntimeDesc + }; +} // Constants for the insertion mode we're currently writing in. We don't encode all HTML5 insertion +// modes. We only include the variants as they matter for the sake of our purposes. +// We don't actually provide the namespace therefore we use constants instead of the string. -function pushStartOption(target, props, formatContext) { - var selectedValue = formatContext.selectedValue; - target.push(startChunkForTag('option')); - var children = null; - var value = null; - var selected = null; - var innerHTML = null; +var ROOT_HTML_MODE = 0; // Used for the root most element tag. - for (var propKey in props) { - if (hasOwnProperty.call(props, propKey)) { - var propValue = props[propKey]; +var HTML_MODE = 1; +var SVG_MODE = 2; +var MATHML_MODE = 3; +var HTML_TABLE_MODE = 4; +var HTML_TABLE_BODY_MODE = 5; +var HTML_TABLE_ROW_MODE = 6; +var HTML_COLGROUP_MODE = 7; // We have a greater than HTML_TABLE_MODE check elsewhere. If you add more cases here, make sure it +// still makes sense +// Lets us keep track of contextual state and pick it back up after suspending. - if (propValue == null) { - continue; - } +function createFormatContext(insertionMode, selectedValue, noscriptTagInScope) { + return { + insertionMode: insertionMode, + selectedValue: selectedValue, + noscriptTagInScope: noscriptTagInScope + }; +} - switch (propKey) { - case 'children': - children = propValue; - break; +function createRootFormatContext(namespaceURI) { + var insertionMode = namespaceURI === 'http://www.w3.org/2000/svg' ? SVG_MODE : namespaceURI === 'http://www.w3.org/1998/Math/MathML' ? MATHML_MODE : ROOT_HTML_MODE; + return createFormatContext(insertionMode, null, false); +} +function getChildFormatContext(parentContext, type, props) { + switch (type) { + case 'noscript': + return createFormatContext(HTML_MODE, null, true); - case 'selected': - // ignore - selected = propValue; + case 'select': + return createFormatContext(HTML_MODE, props.value != null ? props.value : props.defaultValue, parentContext.noscriptTagInScope); - { - // TODO: Remove support for `selected` in <option>. - if (!didWarnSelectedSetOnOption) { - error('Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.'); + case 'svg': + return createFormatContext(SVG_MODE, null, parentContext.noscriptTagInScope); - didWarnSelectedSetOnOption = true; - } - } + case 'math': + return createFormatContext(MATHML_MODE, null, parentContext.noscriptTagInScope); - break; + case 'foreignObject': + return createFormatContext(HTML_MODE, null, parentContext.noscriptTagInScope); + // Table parents are special in that their children can only be created at all if they're + // wrapped in a table parent. So we need to encode that we're entering this mode. - case 'dangerouslySetInnerHTML': - innerHTML = propValue; - break; - // eslint-disable-next-line-no-fallthrough + case 'table': + return createFormatContext(HTML_TABLE_MODE, null, parentContext.noscriptTagInScope); - case 'value': - value = propValue; - // We intentionally fallthrough to also set the attribute on the node. - // eslint-disable-next-line-no-fallthrough + case 'thead': + case 'tbody': + case 'tfoot': + return createFormatContext(HTML_TABLE_BODY_MODE, null, parentContext.noscriptTagInScope); - default: - pushAttribute(target, propKey, propValue); - break; - } - } - } + case 'colgroup': + return createFormatContext(HTML_COLGROUP_MODE, null, parentContext.noscriptTagInScope); - if (selectedValue != null) { - var stringValue; + case 'tr': + return createFormatContext(HTML_TABLE_ROW_MODE, null, parentContext.noscriptTagInScope); + } - if (value !== null) { - { - checkAttributeStringCoercion(value, 'value'); - } + if (parentContext.insertionMode >= HTML_TABLE_MODE) { + // Whatever tag this was, it wasn't a table parent or other special parent, so we must have + // entered plain HTML again. + return createFormatContext(HTML_MODE, null, parentContext.noscriptTagInScope); + } - stringValue = '' + value; - } else { - { - if (innerHTML !== null) { - if (!didWarnInvalidOptionInnerHTML) { - didWarnInvalidOptionInnerHTML = true; + if (parentContext.insertionMode === ROOT_HTML_MODE) { + // We've emitted the root and is now in plain HTML mode. + return createFormatContext(HTML_MODE, null, parentContext.noscriptTagInScope); + } - error('Pass a `value` prop if you set dangerouslyInnerHTML so React knows ' + 'which value should be selected.'); - } - } - } + return parentContext; +} +var UNINITIALIZED_SUSPENSE_BOUNDARY_ID = null; +function assignSuspenseBoundaryID(responseState) { + var generatedID = responseState.nextSuspenseID++; + return stringToPrecomputedChunk(responseState.boundaryPrefix + generatedID.toString(16)); +} +function makeId(responseState, treeId, localId) { + var idPrefix = responseState.idPrefix; + var id = ':' + idPrefix + 'R' + treeId; // Unless this is the first id at this level, append a number at the end + // that represents the position of this useId hook among all the useId + // hooks for this fiber. - stringValue = flattenOptionChildren(children); - } + if (localId > 0) { + id += 'H' + localId.toString(32); + } - if (isArray(selectedValue)) { - // multiple - for (var i = 0; i < selectedValue.length; i++) { - { - checkAttributeStringCoercion(selectedValue[i], 'value'); - } + return id + ':'; +} - var v = '' + selectedValue[i]; +function encodeHTMLTextNode(text) { + return escapeTextForBrowser(text); +} - if (v === stringValue) { - target.push(selectedMarkerAttribute); - break; - } - } - } else { - { - checkAttributeStringCoercion(selectedValue, 'select.value'); - } +var textSeparator = stringToPrecomputedChunk('<!-- -->'); +function pushTextInstance(target, text, responseState, textEmbedded) { + if (text === '') { + // Empty text doesn't have a DOM node representation and the hydration is aware of this. + return textEmbedded; + } - if ('' + selectedValue === stringValue) { - target.push(selectedMarkerAttribute); - } - } - } else if (selected) { - target.push(selectedMarkerAttribute); + if (textEmbedded) { + target.push(textSeparator); } - target.push(endOfStartTag); - pushInnerHTML(target, innerHTML, children); - return children; + target.push(stringToChunk(encodeHTMLTextNode(text))); + return true; +} // Called when Fizz is done with a Segment. Currently the only purpose is to conditionally +// emit a text separator when we don't know for sure it is safe to omit + +function pushSegmentFinale(target, responseState, lastPushedText, textEmbedded) { + if (lastPushedText && textEmbedded) { + target.push(textSeparator); + } } +var styleNameCache = new Map(); -function pushInput(target, props) { - { - checkControlledValueProps('input', props); +function processStyleName(styleName) { + var chunk = styleNameCache.get(styleName); - if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnDefaultChecked) { - 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', 'A component', props.type); + if (chunk !== undefined) { + return chunk; + } - didWarnDefaultChecked = true; - } + var result = stringToPrecomputedChunk(escapeTextForBrowser(hyphenateStyleName(styleName))); + styleNameCache.set(styleName, result); + return result; +} - if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultInputValue) { - 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', 'A component', props.type); +var styleAttributeStart = stringToPrecomputedChunk(' style="'); +var styleAssign = stringToPrecomputedChunk(':'); +var styleSeparator = stringToPrecomputedChunk(';'); - didWarnDefaultInputValue = true; - } +function pushStyle(target, responseState, style) { + if (typeof style !== 'object') { + throw new Error('The `style` prop expects a mapping from style properties to values, ' + "not a string. For example, style={{marginRight: spacing + 'em'}} when " + 'using JSX.'); } - target.push(startChunkForTag('input')); - var value = null; - var defaultValue = null; - var checked = null; - var defaultChecked = null; - - for (var propKey in props) { - if (hasOwnProperty.call(props, propKey)) { - var propValue = props[propKey]; + var isFirst = true; - if (propValue == null) { - continue; - } + for (var styleName in style) { + if (!hasOwnProperty.call(style, styleName)) { + continue; + } // If you provide unsafe user data here they can inject arbitrary CSS + // which may be problematic (I couldn't repro this): + // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet + // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/ + // This is not an XSS hole but instead a potential CSS injection issue + // which has lead to a greater discussion about how we're going to + // trust URLs moving forward. See #2115901 - switch (propKey) { - case 'children': - case 'dangerouslySetInnerHTML': - throw new Error('input' + " is a self-closing tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.'); - // eslint-disable-next-line-no-fallthrough - case 'defaultChecked': - defaultChecked = propValue; - break; + var styleValue = style[styleName]; - case 'defaultValue': - defaultValue = propValue; - break; + if (styleValue == null || typeof styleValue === 'boolean' || styleValue === '') { + // TODO: We used to set empty string as a style with an empty value. Does that ever make sense? + continue; + } - case 'checked': - checked = propValue; - break; + var nameChunk = void 0; + var valueChunk = void 0; + var isCustomProperty = styleName.indexOf('--') === 0; - case 'value': - value = propValue; - break; + if (isCustomProperty) { + nameChunk = stringToChunk(escapeTextForBrowser(styleName)); - default: - pushAttribute(target, propKey, propValue); - break; + { + checkCSSPropertyStringCoercion(styleValue, styleName); } - } - } - if (checked !== null) { - pushAttribute(target, 'checked', checked); - } else if (defaultChecked !== null) { - pushAttribute(target, 'checked', defaultChecked); - } + valueChunk = stringToChunk(escapeTextForBrowser(('' + styleValue).trim())); + } else { + { + warnValidStyle$1(styleName, styleValue); + } - if (value !== null) { - pushAttribute(target, 'value', value); - } else if (defaultValue !== null) { - pushAttribute(target, 'value', defaultValue); - } + nameChunk = processStyleName(styleName); - target.push(endOfStartTagSelfClosing); - return null; -} + if (typeof styleValue === 'number') { + if (styleValue !== 0 && !hasOwnProperty.call(isUnitlessNumber, styleName)) { + valueChunk = stringToChunk(styleValue + 'px'); // Presumes implicit 'px' suffix for unitless numbers + } else { + valueChunk = stringToChunk('' + styleValue); + } + } else { + { + checkCSSPropertyStringCoercion(styleValue, styleName); + } -function pushStartTextArea(target, props) { - { - checkControlledValueProps('textarea', props); + valueChunk = stringToChunk(escapeTextForBrowser(('' + styleValue).trim())); + } + } - if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultTextareaValue) { - error('Textarea 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 textarea ' + 'and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components'); + if (isFirst) { + isFirst = false; // If it's first, we don't need any separators prefixed. - didWarnDefaultTextareaValue = true; + target.push(styleAttributeStart, nameChunk, styleAssign, valueChunk); + } else { + target.push(styleSeparator, nameChunk, styleAssign, valueChunk); } } - target.push(startChunkForTag('textarea')); - var value = null; - var defaultValue = null; - var children = null; + if (!isFirst) { + target.push(attributeEnd); + } +} - for (var propKey in props) { - if (hasOwnProperty.call(props, propKey)) { - var propValue = props[propKey]; +var attributeSeparator = stringToPrecomputedChunk(' '); +var attributeAssign = stringToPrecomputedChunk('="'); +var attributeEnd = stringToPrecomputedChunk('"'); +var attributeEmptyString = stringToPrecomputedChunk('=""'); - if (propValue == null) { - continue; +function pushAttribute(target, responseState, name, value) // not null or undefined +{ + switch (name) { + case 'style': + { + pushStyle(target, responseState, value); + return; } - switch (propKey) { - case 'children': - children = propValue; - break; - - case 'value': - value = propValue; - break; - - case 'defaultValue': - defaultValue = propValue; - break; + case 'defaultValue': + case 'defaultChecked': // These shouldn't be set as attributes on generic HTML elements. - case 'dangerouslySetInnerHTML': - throw new Error('`dangerouslySetInnerHTML` does not make sense on <textarea>.'); - // eslint-disable-next-line-no-fallthrough + case 'innerHTML': // Must use dangerouslySetInnerHTML instead. - default: - pushAttribute(target, propKey, propValue); - break; - } - } + case 'suppressContentEditableWarning': + case 'suppressHydrationWarning': + // Ignored. These are built-in to React on the client. + return; } - if (value === null && defaultValue !== null) { - value = defaultValue; + if ( // shouldIgnoreAttribute + // We have already filtered out null/undefined and reserved words. + name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) { + return; } - target.push(endOfStartTag); // TODO (yungsters): Remove support for children content in <textarea>. + var propertyInfo = getPropertyInfo(name); - if (children != null) { - { - error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.'); + if (propertyInfo !== null) { + // shouldRemoveAttribute + switch (typeof value) { + case 'function': + case 'symbol': + // eslint-disable-line + return; + + case 'boolean': + { + if (!propertyInfo.acceptsBooleans) { + return; + } + } } - if (value != null) { - throw new Error('If you supply `defaultValue` on a <textarea>, do not pass children.'); - } - - if (isArray(children)) { - if (children.length > 1) { - throw new Error('<textarea> can only have at most one child.'); - } // TODO: remove the coercion and the DEV check below because it will - // always be overwritten by the coercion several lines below it. #22309 - - - { - checkHtmlStringCoercion(children[0]); - } - - value = '' + children[0]; - } - - { - checkHtmlStringCoercion(children); - } - - value = '' + children; - } - - if (typeof value === 'string' && value[0] === '\n') { - // text/html ignores the first character in these tags if it's a newline - // Prefer to break application/xml over text/html (for now) by adding - // a newline specifically to get eaten by the parser. (Alternately for - // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first - // \r is normalized out by HTMLTextAreaElement#value.) - // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre> - // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions> - // See: <http://www.w3.org/TR/html5/syntax.html#newlines> - // See: Parsing of "textarea" "listing" and "pre" elements - // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody> - target.push(leadingNewline); - } // ToString and push directly instead of recurse over children. - // We don't really support complex children in the value anyway. - // This also currently avoids a trailing comment node which breaks textarea. - - - if (value !== null) { - { - checkAttributeStringCoercion(value, 'value'); - } - - target.push(stringToChunk(encodeHTMLTextNode('' + value))); - } - - return null; -} - -function pushMeta(target, props, responseState, textEmbedded, insertionMode, noscriptTagInScope) { - { - if (insertionMode === SVG_MODE || noscriptTagInScope) { - return pushSelfClosing(target, props, 'meta'); - } else { - if (textEmbedded) { - // This link follows text but we aren't writing a tag. while not as efficient as possible we need - // to be safe and assume text will follow by inserting a textSeparator - target.push(textSeparator); - } + var attributeName = propertyInfo.attributeName; + var attributeNameChunk = stringToChunk(attributeName); // TODO: If it's known we can cache the chunk. - if (typeof props.charSet === 'string') { - return pushSelfClosing(responseState.charsetChunks, props, 'meta'); - } else { - return pushSelfClosing(responseState.hoistableChunks, props, 'meta'); - } - } - } -} + switch (propertyInfo.type) { + case BOOLEAN: + if (value) { + target.push(attributeSeparator, attributeNameChunk, attributeEmptyString); + } -function pushLink(target, props, responseState, resources, textEmbedded, insertionMode, noscriptTagInScope) { - { - var rel = props.rel; - var href = props.href; - var precedence = props.precedence; + return; - if (insertionMode === SVG_MODE || noscriptTagInScope || typeof rel !== 'string' || typeof href !== 'string' || href === '') { - { - if (rel === 'stylesheet' && typeof props.precedence === 'string') { - if (typeof href !== 'string' || !href) { - error('React encountered a `<link rel="stylesheet" .../>` with a `precedence` prop and expected the `href` prop to be a non-empty string but ecountered %s instead. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop ensure there is a non-empty string `href` prop as well, otherwise remove the `precedence` prop.', getValueDescriptorExpectingObjectForWarning(href)); - } + case OVERLOADED_BOOLEAN: + if (value === true) { + target.push(attributeSeparator, attributeNameChunk, attributeEmptyString); + } else if (value === false) ; else { + target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); } - } - pushLinkImpl(target, props); - return null; - } + return; - if (props.rel === 'stylesheet') { - // This <link> may hoistable as a Stylesheet Resource, otherwise it will emit in place - var key = getResourceKey('style', href); + case NUMERIC: + if (!isNaN(value)) { + target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); + } - if (typeof precedence !== 'string' || props.disabled != null || props.onLoad || props.onError) { - // This stylesheet is either not opted into Resource semantics or has conflicting properties which - // disqualify it for such. We can still create a preload resource to help it load faster on the - // client - { - if (typeof precedence === 'string') { - if (props.disabled != null) { - error('React encountered a `<link rel="stylesheet" .../>` with a `precedence` prop and a `disabled` prop. The presence of the `disabled` prop indicates an intent to manage the stylesheet active state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the `disabled` prop, otherwise remove the `precedence` prop.'); - } else if (props.onLoad || props.onError) { - var propDescription = props.onLoad && props.onError ? '`onLoad` and `onError` props' : props.onLoad ? '`onLoad` prop' : '`onError` prop'; + break; - error('React encountered a `<link rel="stylesheet" .../>` with a `precedence` prop and %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.', propDescription, propDescription); - } - } + case POSITIVE_NUMERIC: + if (!isNaN(value) && value >= 1) { + target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); } - var resource = resources.preloadsMap.get(key); - - if (!resource) { - resource = { - type: 'preload', - chunks: [], - state: NoState, - props: preloadAsStylePropsFromProps(href, props) - }; - resources.preloadsMap.set(key, resource); + break; + default: + if (propertyInfo.sanitizeURL) { { - markAsImplicitResourceDEV(resource, props, resource.props); + checkAttributeStringCoercion(value, attributeName); } + + value = '' + value; + sanitizeURL(value); } - pushLinkImpl(resource.chunks, resource.props); - resources.usedStylesheets.add(resource); - return pushLinkImpl(target, props); - } else { - // This stylesheet refers to a Resource and we create a new one if necessary - var _resource = resources.stylesMap.get(key); + target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); + } + } else if (isAttributeNameSafe(name)) { + // shouldRemoveAttribute + switch (typeof value) { + case 'function': + case 'symbol': + // eslint-disable-line + return; + case 'boolean': { - var devResource = getAsResourceDEV(_resource); - - if (devResource) { - switch (devResource.__provenance) { - case 'rendered': - { - var differenceDescription = describeDifferencesForStylesheets( // Diff the props from the JSX element, not the derived resource props - props, devResource.__originalProps); - - if (differenceDescription) { - error('React encountered a <link rel="stylesheet" href="%s" .../> with a `precedence` prop that has props that conflict' + ' with another hoistable stylesheet with the same `href`. When using `precedence` with <link rel="stylsheet" .../>' + ' the props from the first encountered instance will be used and props from later instances will be ignored.' + ' Update the props on either <link rel="stylesheet" .../> instance so they agree.%s', href, differenceDescription); - } - - break; - } - - case 'preinit': - { - var _differenceDescription = describeDifferencesForStylesheetOverPreinit( // Diff the props from the JSX element, not the derived resource props - props, devResource.__propsEquivalent); - - if (_differenceDescription) { - error('React encountered a <link rel="stylesheet" precedence="%s" href="%s" .../> with props that conflict' + ' with the options provided to `ReactDOM.preinit("%s", { as: "style", ... })`. React will use the first props or preinitialization' + ' options encountered when rendering a hoistable stylesheet with a particular `href` and will ignore any newer props or' + ' options. The first instance of this stylesheet resource was created using the `ReactDOM.preinit()` function.' + ' Please note, `ReactDOM.preinit()` is modeled off of module import assertions capabilities and does not support' + ' arbitrary props. If you need to have props not included with the preinit options you will need to rely on rendering' + ' <link> tags only.%s', precedence, href, href, _differenceDescription); - } + var prefix = name.toLowerCase().slice(0, 5); - break; - } - } + if (prefix !== 'data-' && prefix !== 'aria-') { + return; } } + } - if (!_resource) { - var resourceProps = stylesheetPropsFromRawProps(props); - var preloadResource = resources.preloadsMap.get(key); - - if (preloadResource) { - // If we already had a preload we don't want that resource to flush directly. - // We let the newly created resource govern flushing. - preloadResource.state |= Blocked; - adoptPreloadPropsForStylesheetProps(resourceProps, preloadResource.props); - } + target.push(attributeSeparator, stringToChunk(name), attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); + } +} - _resource = { - type: 'stylesheet', - chunks: [], - state: resources.boundaryResources ? Blocked : NoState, - props: resourceProps - }; - resources.stylesMap.set(key, _resource); +var endOfStartTag = stringToPrecomputedChunk('>'); +var endOfStartTagSelfClosing = stringToPrecomputedChunk('/>'); - { - markAsRenderedResourceDEV(_resource, props); - } +function pushInnerHTML(target, innerHTML, children) { + if (innerHTML != null) { + if (children != null) { + throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.'); + } - var precedenceSet = resources.precedences.get(precedence); + if (typeof innerHTML !== 'object' || !('__html' in innerHTML)) { + throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' + 'for more information.'); + } - if (!precedenceSet) { - precedenceSet = new Set(); - resources.precedences.set(precedence, precedenceSet); - } + var html = innerHTML.__html; - precedenceSet.add(_resource); - } + if (html !== null && html !== undefined) { + { + checkHtmlStringCoercion(html); + } - if (resources.boundaryResources) { - resources.boundaryResources.add(_resource); - } + target.push(stringToChunk('' + html)); + } + } +} // TODO: Move these to ResponseState so that we warn for every request. +// It would help debugging in stateful servers (e.g. service worker). - if (textEmbedded) { - // This link follows text but we aren't writing a tag. while not as efficient as possible we need - // to be safe and assume text will follow by inserting a textSeparator - target.push(textSeparator); - } - return null; - } - } else if (props.onLoad || props.onError) { - // When using load handlers we cannot hoist and need to emit links in place - return pushLinkImpl(target, props); - } else { - // We can hoist this link so we may need to emit a text separator. - // @TODO refactor text separators so we don't have to defensively add - // them when we don't end up emitting a tag as a result of pushStartInstance - if (textEmbedded) { - // This link follows text but we aren't writing a tag. while not as efficient as possible we need - // to be safe and assume text will follow by inserting a textSeparator - target.push(textSeparator); - } +var didWarnDefaultInputValue = false; +var didWarnDefaultChecked = false; +var didWarnDefaultSelectValue = false; +var didWarnDefaultTextareaValue = false; +var didWarnInvalidOptionChildren = false; +var didWarnInvalidOptionInnerHTML = false; +var didWarnSelectedSetOnOption = false; - switch (props.rel) { - case 'preconnect': - case 'dns-prefetch': - return pushLinkImpl(responseState.preconnectChunks, props); +function checkSelectProp(props, propName) { + { + var value = props[propName]; - case 'preload': - return pushLinkImpl(responseState.preloadChunks, props); + if (value != null) { + var array = isArray(value); - default: - return pushLinkImpl(responseState.hoistableChunks, props); + if (props.multiple && !array) { + error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.', propName); + } else if (!props.multiple && array) { + error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.', propName); } } } } -function pushLinkImpl(target, props) { - target.push(startChunkForTag('link')); +function pushStartSelect(target, props, responseState) { + { + checkControlledValueProps('select', props); + checkSelectProp(props, 'value'); + checkSelectProp(props, 'defaultValue'); + + if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultSelectValue) { + error('Select 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 select ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components'); + + didWarnDefaultSelectValue = true; + } + } + + target.push(startChunkForTag('select')); + var children = null; + var innerHTML = null; for (var propKey in props) { if (hasOwnProperty.call(props, propKey)) { @@ -3251,86 +3500,62 @@ function pushLinkImpl(target, props) { switch (propKey) { case 'children': + children = propValue; + break; + case 'dangerouslySetInnerHTML': - throw new Error('link' + " is a self-closing tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.'); - // eslint-disable-next-line-no-fallthrough + // TODO: This doesn't really make sense for select since it can't use the controlled + // value in the innerHTML. + innerHTML = propValue; + break; + + case 'defaultValue': + case 'value': + // These are set on the Context instead and applied to the nested options. + break; default: - pushAttribute(target, propKey, propValue); + pushAttribute(target, responseState, propKey, propValue); break; } } } - target.push(endOfStartTagSelfClosing); - return null; + target.push(endOfStartTag); + pushInnerHTML(target, innerHTML, children); + return children; } -function pushStyle(target, props, resources, textEmbedded, insertionMode, noscriptTagInScope) { - { - if (hasOwnProperty.call(props, 'children')) { - var children = props.children; - var child = Array.isArray(children) ? children.length < 2 ? children[0] : null : children; - - if (typeof child === 'function' || typeof child === 'symbol' || Array.isArray(child)) { - var childType = typeof child === 'function' ? 'a Function' : typeof child === 'symbol' ? 'a Sybmol' : 'an Array'; - - error('React expect children of <style> tags to be a string, number, or object with a `toString` method but found %s instead. ' + 'In browsers style Elements can only have `Text` Nodes as children.', childType); - } - } - } - - { - var precedence = props.precedence; - var href = props.href; +function flattenOptionChildren(children) { + var content = ''; // Flatten children and warn if they aren't strings or numbers; + // invalid types are ignored. - if (insertionMode === SVG_MODE || noscriptTagInScope || typeof precedence !== 'string' || typeof href !== 'string' || href === '') { - // This style tag is not able to be turned into a Style Resource - return pushStyleImpl(target, props); + React.Children.forEach(children, function (child) { + if (child == null) { + return; } - var key = getResourceKey('style', href); - var resource = resources.stylesMap.get(key); - - if (!resource) { - resource = { - type: 'style', - chunks: [], - state: resources.boundaryResources ? Blocked : NoState, - props: styleTagPropsFromRawProps(props) - }; - resources.stylesMap.set(key, resource); - - { - markAsRenderedResourceDEV(resource, props); - } - - pushStyleImpl(resource.chunks, resource.props); - var precedenceSet = resources.precedences.get(precedence); - - if (!precedenceSet) { - precedenceSet = new Set(); - resources.precedences.set(precedence, precedenceSet); - } + content += child; - precedenceSet.add(resource); + { + if (!didWarnInvalidOptionChildren && typeof child !== 'string' && typeof child !== 'number') { + didWarnInvalidOptionChildren = true; - if (resources.boundaryResources) { - resources.boundaryResources.add(resource); + error('Cannot infer the option value of complex children. ' + 'Pass a `value` prop or use a plain string as children to <option>.'); } } - - if (textEmbedded) { - // This link follows text but we aren't writing a tag. while not as efficient as possible we need - // to be safe and assume text will follow by inserting a textSeparator - target.push(textSeparator); - } - } + }); + return content; } -function pushStyleImpl(target, props) { - target.push(startChunkForTag('style')); +var selectedMarkerAttribute = stringToPrecomputedChunk(' selected=""'); + +function pushStartOption(target, props, responseState, formatContext) { + var selectedValue = formatContext.selectedValue; + target.push(startChunkForTag('option')); var children = null; + var value = null; + var selected = null; var innerHTML = null; for (var propKey in props) { @@ -3346,60 +3571,115 @@ function pushStyleImpl(target, props) { children = propValue; break; - case 'dangerouslySetInnerHTML': + case 'selected': + // ignore + selected = propValue; + + { + // TODO: Remove support for `selected` in <option>. + if (!didWarnSelectedSetOnOption) { + error('Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.'); + + didWarnSelectedSetOnOption = true; + } + } + + break; + + case 'dangerouslySetInnerHTML': innerHTML = propValue; break; + // eslint-disable-next-line-no-fallthrough + + case 'value': + value = propValue; + // We intentionally fallthrough to also set the attribute on the node. + // eslint-disable-next-line-no-fallthrough default: - pushAttribute(target, propKey, propValue); + pushAttribute(target, responseState, propKey, propValue); break; } } } - target.push(endOfStartTag); - var child = Array.isArray(children) ? children.length < 2 ? children[0] : null : children; + if (selectedValue != null) { + var stringValue; - if (typeof child !== 'function' && typeof child !== 'symbol' && child !== null && child !== undefined) { - // eslint-disable-next-line react-internal/safe-string-coercion - target.push(stringToChunk(escapeTextForBrowser('' + child))); - } + if (value !== null) { + { + checkAttributeStringCoercion(value, 'value'); + } - pushInnerHTML(target, innerHTML, children); - target.push(endTag1, stringToChunk('style'), endTag2); - return null; -} + stringValue = '' + value; + } else { + { + if (innerHTML !== null) { + if (!didWarnInvalidOptionInnerHTML) { + didWarnInvalidOptionInnerHTML = true; -function pushSelfClosing(target, props, tag) { - target.push(startChunkForTag(tag)); + error('Pass a `value` prop if you set dangerouslyInnerHTML so React knows ' + 'which value should be selected.'); + } + } + } - for (var propKey in props) { - if (hasOwnProperty.call(props, propKey)) { - var propValue = props[propKey]; + stringValue = flattenOptionChildren(children); + } - if (propValue == null) { - continue; - } + if (isArray(selectedValue)) { + // multiple + for (var i = 0; i < selectedValue.length; i++) { + { + checkAttributeStringCoercion(selectedValue[i], 'value'); + } - switch (propKey) { - case 'children': - case 'dangerouslySetInnerHTML': - throw new Error(tag + " is a self-closing tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.'); - // eslint-disable-next-line-no-fallthrough + var v = '' + selectedValue[i]; - default: - pushAttribute(target, propKey, propValue); + if (v === stringValue) { + target.push(selectedMarkerAttribute); break; + } + } + } else { + { + checkAttributeStringCoercion(selectedValue, 'select.value'); + } + + if ('' + selectedValue === stringValue) { + target.push(selectedMarkerAttribute); } } + } else if (selected) { + target.push(selectedMarkerAttribute); } - target.push(endOfStartTagSelfClosing); - return null; + target.push(endOfStartTag); + pushInnerHTML(target, innerHTML, children); + return children; } -function pushStartMenuItem(target, props) { - target.push(startChunkForTag('menuitem')); +function pushInput(target, props, responseState) { + { + checkControlledValueProps('input', props); + + if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnDefaultChecked) { + 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', 'A component', props.type); + + didWarnDefaultChecked = true; + } + + if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultInputValue) { + 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', 'A component', props.type); + + didWarnDefaultInputValue = true; + } + } + + target.push(startChunkForTag('input')); + var value = null; + var defaultValue = null; + var checked = null; + var defaultChecked = null; for (var propKey in props) { if (hasOwnProperty.call(props, propKey)) { @@ -3412,56 +3692,63 @@ function pushStartMenuItem(target, props) { switch (propKey) { case 'children': case 'dangerouslySetInnerHTML': - throw new Error('menuitems cannot have `children` nor `dangerouslySetInnerHTML`.'); + throw new Error('input' + " is a self-closing tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.'); // eslint-disable-next-line-no-fallthrough + case 'defaultChecked': + defaultChecked = propValue; + break; + + case 'defaultValue': + defaultValue = propValue; + break; + + case 'checked': + checked = propValue; + break; + + case 'value': + value = propValue; + break; + default: - pushAttribute(target, propKey, propValue); + pushAttribute(target, responseState, propKey, propValue); break; } } } - target.push(endOfStartTag); + if (checked !== null) { + pushAttribute(target, responseState, 'checked', checked); + } else if (defaultChecked !== null) { + pushAttribute(target, responseState, 'checked', defaultChecked); + } + + if (value !== null) { + pushAttribute(target, responseState, 'value', value); + } else if (defaultValue !== null) { + pushAttribute(target, responseState, 'value', defaultValue); + } + + target.push(endOfStartTagSelfClosing); return null; } -function pushTitle(target, props, responseState, insertionMode, noscriptTagInScope) { +function pushStartTextArea(target, props, responseState) { { - if (hasOwnProperty.call(props, 'children')) { - var children = props.children; - var child = Array.isArray(children) ? children.length < 2 ? children[0] : null : children; - - if (Array.isArray(children) && children.length > 1) { - error('React expects the `children` prop of <title> tags to be a string, number, or object with a novel `toString` method but found an Array with length %s instead.' + ' Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert `children` of <title> tags to a single string value' + ' which is why Arrays of length greater than 1 are not supported. When using JSX it can be commong to combine text nodes and value nodes.' + ' For example: <title>hello {nameOfUser}. While not immediately apparent, `children` in this case is an Array with length 2. If your `children` prop' + ' is using this form try rewriting it using a template string: {`hello ${nameOfUser}`}.', children.length); - } else if (typeof child === 'function' || typeof child === 'symbol') { - var childType = typeof child === 'function' ? 'a Function' : 'a Sybmol'; - - error('React expect children of tags to be a string, number, or object with a novel `toString` method but found %s instead.' + ' Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title>' + ' tags to a single string value.', childType); - } else if (child && child.toString === {}.toString) { - if (child.$$typeof != null) { - error('React expects the `children` prop of <title> tags to be a string, number, or object with a novel `toString` method but found an object that appears to be' + ' a React element which never implements a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to' + ' be able to convert children of <title> tags to a single string value which is why rendering React elements is not supported. If the `children` of <title> is' + ' a React Component try moving the <title> tag into that component. If the `children` of <title> is some HTML markup change it to be Text only to be valid HTML.'); - } else { - error('React expects the `children` prop of <title> tags to be a string, number, or object with a novel `toString` method but found an object that does not implement' + ' a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags' + ' to a single string value. Using the default `toString` method available on every object is almost certainly an error. Consider whether the `children` of this <title>' + ' is an object in error and change it to a string or number value if so. Otherwise implement a `toString` method that React can use to produce a valid <title>.'); - } - } - } - } + checkControlledValueProps('textarea', props); - { - if (insertionMode !== SVG_MODE && !noscriptTagInScope) { - pushTitleImpl(responseState.hoistableChunks, props); - return null; - } else { - return pushTitleImpl(target, props); + if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultTextareaValue) { + error('Textarea 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 textarea ' + 'and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components'); + + didWarnDefaultTextareaValue = true; } } -} -function pushTitleImpl(target, props) { - target.push(startChunkForTag('title')); + target.push(startChunkForTag('textarea')); + var value = null; + var defaultValue = null; var children = null; - var innerHTML = null; for (var propKey in props) { if (hasOwnProperty.call(props, propKey)) { @@ -3476,230 +3763,140 @@ function pushTitleImpl(target, props) { children = propValue; break; - case 'dangerouslySetInnerHTML': - innerHTML = propValue; + case 'value': + value = propValue; break; + case 'defaultValue': + defaultValue = propValue; + break; + + case 'dangerouslySetInnerHTML': + throw new Error('`dangerouslySetInnerHTML` does not make sense on <textarea>.'); + // eslint-disable-next-line-no-fallthrough + default: - pushAttribute(target, propKey, propValue); + pushAttribute(target, responseState, propKey, propValue); break; } } } - target.push(endOfStartTag); - var child = Array.isArray(children) ? children.length < 2 ? children[0] : null : children; - - if (typeof child !== 'function' && typeof child !== 'symbol' && child !== null && child !== undefined) { - // eslint-disable-next-line react-internal/safe-string-coercion - target.push(stringToChunk(escapeTextForBrowser('' + child))); + if (value === null && defaultValue !== null) { + value = defaultValue; } - pushInnerHTML(target, innerHTML, children); - target.push(endTag1, stringToChunk('title'), endTag2); - return null; -} + target.push(endOfStartTag); // TODO (yungsters): Remove support for children content in <textarea>. -function pushStartHead(target, props, responseState, insertionMode) { - { - if (insertionMode < HTML_MODE && responseState.headChunks === null) { - // This <head> is the Document.head and should be part of the preamble - responseState.headChunks = []; - return pushStartGenericElement(responseState.headChunks, props, 'head'); - } else { - // This <head> is deep and is likely just an error. we emit it inline though. - // Validation should warn that this tag is the the wrong spot. - return pushStartGenericElement(target, props, 'head'); + if (children != null) { + { + error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.'); } - } -} -function pushStartHtml(target, props, responseState, insertionMode) { - { - if (insertionMode === ROOT_HTML_MODE && responseState.htmlChunks === null) { - // This <html> is the Document.documentElement and should be part of the preamble - responseState.htmlChunks = [DOCTYPE]; - return pushStartGenericElement(responseState.htmlChunks, props, 'html'); - } else { - // This <html> is deep and is likely just an error. we emit it inline though. - // Validation should warn that this tag is the the wrong spot. - return pushStartGenericElement(target, props, 'html'); + if (value != null) { + throw new Error('If you supply `defaultValue` on a <textarea>, do not pass children.'); } - } -} - -function pushScript(target, props, resources, textEmbedded, insertionMode, noscriptTagInScope) { - { - if (insertionMode === SVG_MODE || noscriptTagInScope || typeof props.src !== 'string' || !props.src) { - // This script will not be a resource nor can it be preloaded, we bailout early - // and emit it in place. - return pushScriptImpl(target, props); - } - - var src = props.src; - var key = getResourceKey('script', src); - - if (props.async !== true || props.onLoad || props.onError) { - // We can't resourcify scripts with load listeners. To avoid ambiguity with - // other Resourcified async scripts on the server we omit them from the server - // stream and expect them to be inserted during hydration on the client. - // We can still preload them however so the client can start fetching the script - // as soon as possible - var resource = resources.preloadsMap.get(key); - - if (!resource) { - resource = { - type: 'preload', - chunks: [], - state: NoState, - props: preloadAsScriptPropsFromProps(props.src, props) - }; - resources.preloadsMap.set(key, resource); - { - markAsImplicitResourceDEV(resource, props, resource.props); - } - - resources.usedScripts.add(resource); - pushLinkImpl(resource.chunks, resource.props); - } + if (isArray(children)) { + if (children.length > 1) { + throw new Error('<textarea> can only have at most one child.'); + } // TODO: remove the coercion and the DEV check below because it will + // always be overwritten by the coercion several lines below it. #22309 - if (props.async !== true) { - // This is not an async script, we can preloaded it but it still needs to - // be emitted in place since it needs to hydrate on the client - pushScriptImpl(target, props); - return null; - } - } else { - // We can make this <script> into a ScriptResource - var _resource2 = resources.scriptsMap.get(key); { - var devResource = getAsResourceDEV(_resource2); + checkHtmlStringCoercion(children[0]); + } - if (devResource) { - switch (devResource.__provenance) { - case 'rendered': - { - var differenceDescription = describeDifferencesForScripts( // Diff the props from the JSX element, not the derived resource props - props, devResource.__originalProps); + value = '' + children[0]; + } - if (differenceDescription) { - error('React encountered a <script async={true} src="%s" .../> that has props that conflict' + ' with another hoistable script with the same `src`. When rendering hoistable scripts (async scripts without any loading handlers)' + ' the props from the first encountered instance will be used and props from later instances will be ignored.' + ' Update the props on both <script async={true} .../> instance so they agree.%s', src, differenceDescription); - } + { + checkHtmlStringCoercion(children); + } - break; - } + value = '' + children; + } - case 'preinit': - { - var _differenceDescription2 = describeDifferencesForScriptOverPreinit( // Diff the props from the JSX element, not the derived resource props - props, devResource.__propsEquivalent); + if (typeof value === 'string' && value[0] === '\n') { + // text/html ignores the first character in these tags if it's a newline + // Prefer to break application/xml over text/html (for now) by adding + // a newline specifically to get eaten by the parser. (Alternately for + // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first + // \r is normalized out by HTMLTextAreaElement#value.) + // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre> + // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions> + // See: <http://www.w3.org/TR/html5/syntax.html#newlines> + // See: Parsing of "textarea" "listing" and "pre" elements + // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody> + target.push(leadingNewline); + } // ToString and push directly instead of recurse over children. + // We don't really support complex children in the value anyway. + // This also currently avoids a trailing comment node which breaks textarea. - if (_differenceDescription2) { - error('React encountered a <script async={true} src="%s" .../> with props that conflict' + ' with the options provided to `ReactDOM.preinit("%s", { as: "script", ... })`. React will use the first props or preinitialization' + ' options encountered when rendering a hoistable script with a particular `src` and will ignore any newer props or' + ' options. The first instance of this script resource was created using the `ReactDOM.preinit()` function.' + ' Please note, `ReactDOM.preinit()` is modeled off of module import assertions capabilities and does not support' + ' arbitrary props. If you need to have props not included with the preinit options you will need to rely on rendering' + ' <script> tags only.%s', src, src, _differenceDescription2); - } - break; - } - } - } - } + if (value !== null) { + { + checkAttributeStringCoercion(value, 'value'); + } - if (!_resource2) { - _resource2 = { - type: 'script', - chunks: [], - state: NoState, - props: null - }; - resources.scriptsMap.set(key, _resource2); + target.push(stringToChunk(encodeHTMLTextNode('' + value))); + } - { - markAsRenderedResourceDEV(_resource2, props); - } // Add to the script flushing queue + return null; +} +function pushBase(target, props, responseState, textEmbedded, noscriptTagInScope) { + if ( !noscriptTagInScope && resourcesFromElement('base', props)) { + if (textEmbedded) { + // This link follows text but we aren't writing a tag. while not as efficient as possible we need + // to be safe and assume text will follow by inserting a textSeparator + target.push(textSeparator); + } // We have converted this link exclusively to a resource and no longer + // need to emit it - resources.scripts.add(_resource2); - var scriptProps = props; - var preloadResource = resources.preloadsMap.get(key); - if (preloadResource) { - // If we already had a preload we don't want that resource to flush directly. - // We let the newly created resource govern flushing. - preloadResource.state |= Blocked; - scriptProps = assign({}, props); - adoptPreloadPropsForScriptProps(scriptProps, preloadResource.props); - } // encode the tag as Chunks + return null; + } + return pushSelfClosing(target, props, 'base', responseState); +} - pushScriptImpl(_resource2.chunks, scriptProps); - } - } - +function pushMeta(target, props, responseState, textEmbedded, noscriptTagInScope) { + if ( !noscriptTagInScope && resourcesFromElement('meta', props)) { if (textEmbedded) { - // This script follows text but we aren't writing a tag. while not as efficient as possible we need + // This link follows text but we aren't writing a tag. while not as efficient as possible we need // to be safe and assume text will follow by inserting a textSeparator target.push(textSeparator); - } - - return null; - } -} - -function pushScriptImpl(target, props) { - target.push(startChunkForTag('script')); - var children = null; - var innerHTML = null; - - for (var propKey in props) { - if (hasOwnProperty.call(props, propKey)) { - var propValue = props[propKey]; - - if (propValue == null) { - continue; - } + } // We have converted this link exclusively to a resource and no longer + // need to emit it - switch (propKey) { - case 'children': - children = propValue; - break; - - case 'dangerouslySetInnerHTML': - innerHTML = propValue; - break; - default: - pushAttribute(target, propKey, propValue); - break; - } - } + return null; } - target.push(endOfStartTag); - - { - if (children != null && typeof children !== 'string') { - var descriptiveStatement = typeof children === 'number' ? 'a number for children' : Array.isArray(children) ? 'an array for children' : 'something unexpected for children'; + return pushSelfClosing(target, props, 'meta', responseState); +} - error('A script element was rendered with %s. If script element has children it must be a single string.' + ' Consider using dangerouslySetInnerHTML or passing a plain string as children.', descriptiveStatement); - } - } +function pushLink(target, props, responseState, textEmbedded, noscriptTagInScope) { + if ( !noscriptTagInScope && resourcesFromLink(props)) { + if (textEmbedded) { + // This link follows text but we aren't writing a tag. while not as efficient as possible we need + // to be safe and assume text will follow by inserting a textSeparator + target.push(textSeparator); + } // We have converted this link exclusively to a resource and no longer + // need to emit it - pushInnerHTML(target, innerHTML, children); - if (typeof children === 'string') { - target.push(stringToChunk(encodeHTMLTextNode(children))); + return null; } - target.push(endTag1, stringToChunk('script'), endTag2); - return null; + return pushLinkImpl(target, props, responseState); } -function pushStartGenericElement(target, props, tag) { - target.push(startChunkForTag(tag)); - var children = null; - var innerHTML = null; +function pushLinkImpl(target, props, responseState) { + var isStylesheet = props.rel === 'stylesheet'; + target.push(startChunkForTag('link')); for (var propKey in props) { if (hasOwnProperty.call(props, propKey)) { @@ -3711,37 +3908,32 @@ function pushStartGenericElement(target, props, tag) { switch (propKey) { case 'children': - children = propValue; - break; - case 'dangerouslySetInnerHTML': - innerHTML = propValue; - break; + throw new Error('link' + " is a self-closing tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.'); + + case 'precedence': + { + if ( isStylesheet) { + // precedence is a reversed property for stylesheets to opt-into resource semantcs + continue; + } // intentionally fall through + + } + // eslint-disable-next-line-no-fallthrough default: - pushAttribute(target, propKey, propValue); + pushAttribute(target, responseState, propKey, propValue); break; } } } - target.push(endOfStartTag); - pushInnerHTML(target, innerHTML, children); - - if (typeof children === 'string') { - // Special case children as a string to avoid the unnecessary comment. - // TODO: Remove this special case after the general optimization is in place. - target.push(stringToChunk(encodeHTMLTextNode(children))); - return null; - } - - return children; + target.push(endOfStartTagSelfClosing); + return null; } -function pushStartCustomElement(target, props, tag) { +function pushSelfClosing(target, props, tag, responseState) { target.push(startChunkForTag(tag)); - var children = null; - var innerHTML = null; for (var propKey in props) { if (hasOwnProperty.call(props, propKey)) { @@ -3753,43 +3945,23 @@ function pushStartCustomElement(target, props, tag) { switch (propKey) { case 'children': - children = propValue; - break; - case 'dangerouslySetInnerHTML': - innerHTML = propValue; - break; - - case 'style': - pushStyleAttribute(target, propValue); - break; - - case 'suppressContentEditableWarning': - case 'suppressHydrationWarning': - // Ignored. These are built-in to React on the client. - break; + throw new Error(tag + " is a self-closing tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.'); + // eslint-disable-next-line-no-fallthrough default: - if (isAttributeNameSafe(propKey) && typeof propValue !== 'function' && typeof propValue !== 'symbol') { - target.push(attributeSeparator, stringToChunk(propKey), attributeAssign, stringToChunk(escapeTextForBrowser(propValue)), attributeEnd); - } - + pushAttribute(target, responseState, propKey, propValue); break; } } } - target.push(endOfStartTag); - pushInnerHTML(target, innerHTML, children); - return children; + target.push(endOfStartTagSelfClosing); + return null; } -var leadingNewline = stringToPrecomputedChunk('\n'); - -function pushStartPreformattedElement(target, props, tag) { - target.push(startChunkForTag(tag)); - var children = null; - var innerHTML = null; +function pushStartMenuItem(target, props, responseState) { + target.push(startChunkForTag('menuitem')); for (var propKey in props) { if (hasOwnProperty.call(props, propKey)) { @@ -3801,1741 +3973,1361 @@ function pushStartPreformattedElement(target, props, tag) { switch (propKey) { case 'children': - children = propValue; - break; - case 'dangerouslySetInnerHTML': - innerHTML = propValue; - break; + throw new Error('menuitems cannot have `children` nor `dangerouslySetInnerHTML`.'); + // eslint-disable-next-line-no-fallthrough default: - pushAttribute(target, propKey, propValue); + pushAttribute(target, responseState, propKey, propValue); break; } } } - target.push(endOfStartTag); // text/html ignores the first character in these tags if it's a newline - // Prefer to break application/xml over text/html (for now) by adding - // a newline specifically to get eaten by the parser. (Alternately for - // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first - // \r is normalized out by HTMLTextAreaElement#value.) - // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre> - // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions> - // See: <http://www.w3.org/TR/html5/syntax.html#newlines> - // See: Parsing of "textarea" "listing" and "pre" elements - // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody> - // TODO: This doesn't deal with the case where the child is an array - // or component that returns a string. - - if (innerHTML != null) { - if (children != null) { - throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.'); - } - - if (typeof innerHTML !== 'object' || !('__html' in innerHTML)) { - throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' + 'for more information.'); - } - - var html = innerHTML.__html; - - if (html !== null && html !== undefined) { - if (typeof html === 'string' && html.length > 0 && html[0] === '\n') { - target.push(leadingNewline, stringToChunk(html)); - } else { - { - checkHtmlStringCoercion(html); - } - - target.push(stringToChunk('' + html)); - } - } - } - - if (typeof children === 'string' && children[0] === '\n') { - target.push(leadingNewline); - } - - return children; -} // We accept any tag to be rendered but since this gets injected into arbitrary -// HTML, we want to make sure that it's a safe tag. -// http://www.w3.org/TR/REC-xml/#NT-Name - - -var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset - -var validatedTagCache = new Map(); - -function startChunkForTag(tag) { - var tagStartChunk = validatedTagCache.get(tag); - - if (tagStartChunk === undefined) { - if (!VALID_TAG_REGEX.test(tag)) { - throw new Error("Invalid tag: " + tag); - } - - tagStartChunk = stringToPrecomputedChunk('<' + tag); - validatedTagCache.set(tag, tagStartChunk); - } - - return tagStartChunk; + target.push(endOfStartTag); + return null; } -var DOCTYPE = stringToPrecomputedChunk('<!DOCTYPE html>'); -function pushStartInstance(target, type, props, resources, responseState, formatContext, textEmbedded) { +function pushTitle(target, props, responseState, insertionMode, noscriptTagInScope) { { - validateProperties(type, props); - validateProperties$1(type, props); - validateProperties$2(type, props, null); - - if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) { - error('A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.'); - } + var children = props.children; + var childForValidation = Array.isArray(children) && children.length < 2 ? children[0] || null : children; - if (formatContext.insertionMode !== SVG_MODE && formatContext.insertionMode !== MATHML_MODE) { - if (type.indexOf('-') === -1 && typeof props.is !== 'string' && type.toLowerCase() !== type) { - error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type); - } + if (Array.isArray(children) && children.length > 1) { + error('A title element received an array with more than 1 element as children. ' + 'In browsers title Elements can only have Text Nodes as children. If ' + 'the children being rendered output more than a single text node in aggregate the browser ' + 'will display markup and comments as text in the title and hydration will likely fail and ' + 'fall back to client rendering'); + } else if (childForValidation != null && childForValidation.$$typeof != null) { + error('A title element received a React element for children. ' + 'In the browser title Elements can only have Text Nodes as children. If ' + 'the children being rendered output more than a single text node in aggregate the browser ' + 'will display markup and comments as text in the title and hydration will likely fail and ' + 'fall back to client rendering'); + } else if (childForValidation != null && typeof childForValidation !== 'string' && typeof childForValidation !== 'number') { + error('A title element received a value that was not a string or number for children. ' + 'In the browser title Elements can only have Text Nodes as children. If ' + 'the children being rendered output more than a single text node in aggregate the browser ' + 'will display markup and comments as text in the title and hydration will likely fail and ' + 'fall back to client rendering'); } } - switch (type) { - // Special tags - case 'select': - return pushStartSelect(target, props); - - case 'option': - return pushStartOption(target, props, formatContext); - - case 'textarea': - return pushStartTextArea(target, props); - - case 'input': - return pushInput(target, props); - - case 'menuitem': - return pushStartMenuItem(target, props); - - case 'title': - return pushTitle(target, props, responseState, formatContext.insertionMode, formatContext.noscriptTagInScope) ; - - case 'link': - return pushLink(target, props, responseState, resources, textEmbedded, formatContext.insertionMode, formatContext.noscriptTagInScope); - - case 'script': - return pushScript(target, props, resources, textEmbedded, formatContext.insertionMode, formatContext.noscriptTagInScope) ; - - case 'style': - return pushStyle(target, props, resources, textEmbedded, formatContext.insertionMode, formatContext.noscriptTagInScope); - - case 'meta': - return pushMeta(target, props, responseState, textEmbedded, formatContext.insertionMode, formatContext.noscriptTagInScope); - // Newline eating tags - - case 'listing': - case 'pre': - { - return pushStartPreformattedElement(target, props, type); - } - // Omitted close tags - - case 'base': - case 'area': - case 'br': - case 'col': - case 'embed': - case 'hr': - case 'img': - case 'keygen': - case 'param': - case 'source': - case 'track': - case 'wbr': - { - return pushSelfClosing(target, props, type); - } - // These are reserved SVG and MathML elements, that are never custom elements. - // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts - - case 'annotation-xml': - case 'color-profile': - case 'font-face': - case 'font-face-src': - case 'font-face-uri': - case 'font-face-format': - case 'font-face-name': - case 'missing-glyph': - { - return pushStartGenericElement(target, props, type); - } - // Preamble start tags - - case 'head': - return pushStartHead(target, props, responseState, formatContext.insertionMode); - - case 'html': - { - return pushStartHtml(target, props, responseState, formatContext.insertionMode); - } - - default: - { - if (type.indexOf('-') === -1 && typeof props.is !== 'string') { - // Generic element - return pushStartGenericElement(target, props, type); - } else { - // Custom element - return pushStartCustomElement(target, props, type); - } - } - } -} -var endTag1 = stringToPrecomputedChunk('</'); -var endTag2 = stringToPrecomputedChunk('>'); -function pushEndInstance(target, type, props, responseState, formatContext) { - switch (type) { - // When float is on we expect title and script tags to always be pushed in - // a unit and never return children. when we end up pushing the end tag we - // want to ensure there is no extra closing tag pushed - case 'title': - case 'style': - case 'script': - // Omitted close tags - // TODO: Instead of repeating this switch we could try to pass a flag from above. - // That would require returning a tuple. Which might be ok if it gets inlined. - // eslint-disable-next-line-no-fallthrough - - case 'area': - case 'base': - case 'br': - case 'col': - case 'embed': - case 'hr': - case 'img': - case 'input': - case 'keygen': - case 'link': - case 'meta': - case 'param': - case 'source': - case 'track': - case 'wbr': - { - // No close tag needed. - return; - } - // Postamble end tags - // When float is enabled we omit the end tags for body and html when - // they represent the Document.body and Document.documentElement Nodes. - // This is so we can withhold them until the postamble when we know - // we won't emit any more tags - - case 'body': - { - if ( formatContext.insertionMode <= HTML_HTML_MODE) { - responseState.hasBody = true; - return; - } - - break; - } - - case 'html': - if ( formatContext.insertionMode === ROOT_HTML_MODE) { - return; - } - - break; - } - - target.push(endTag1, stringToChunk(type), endTag2); -} -function writeCompletedRoot(destination, responseState) { - var bootstrapChunks = responseState.bootstrapChunks; - var i = 0; - - for (; i < bootstrapChunks.length - 1; i++) { - writeChunk(destination, bootstrapChunks[i]); - } - - if (i < bootstrapChunks.length) { - return writeChunkAndReturn(destination, bootstrapChunks[i]); - } - - return true; -} // Structural Nodes -// A placeholder is a node inside a hidden partial tree that can be filled in later, but before -// display. It's never visible to users. We use the template tag because it can be used in every -// type of parent. <script> tags also work in every other tag except <colgroup>. - -var placeholder1 = stringToPrecomputedChunk('<template id="'); -var placeholder2 = stringToPrecomputedChunk('"></template>'); -function writePlaceholder(destination, responseState, id) { - writeChunk(destination, placeholder1); - writeChunk(destination, responseState.placeholderPrefix); - var formattedID = stringToChunk(id.toString(16)); - writeChunk(destination, formattedID); - return writeChunkAndReturn(destination, placeholder2); -} // Suspense boundaries are encoded as comments. - -var startCompletedSuspenseBoundary = stringToPrecomputedChunk('<!--$-->'); -var startPendingSuspenseBoundary1 = stringToPrecomputedChunk('<!--$?--><template id="'); -var startPendingSuspenseBoundary2 = stringToPrecomputedChunk('"></template>'); -var startClientRenderedSuspenseBoundary = stringToPrecomputedChunk('<!--$!-->'); -var endSuspenseBoundary = stringToPrecomputedChunk('<!--/$-->'); -var clientRenderedSuspenseBoundaryError1 = stringToPrecomputedChunk('<template'); -var clientRenderedSuspenseBoundaryErrorAttrInterstitial = stringToPrecomputedChunk('"'); -var clientRenderedSuspenseBoundaryError1A = stringToPrecomputedChunk(' data-dgst="'); -var clientRenderedSuspenseBoundaryError1B = stringToPrecomputedChunk(' data-msg="'); -var clientRenderedSuspenseBoundaryError1C = stringToPrecomputedChunk(' data-stck="'); -var clientRenderedSuspenseBoundaryError2 = stringToPrecomputedChunk('></template>'); -function writeStartCompletedSuspenseBoundary(destination, responseState) { - return writeChunkAndReturn(destination, startCompletedSuspenseBoundary); -} -function writeStartPendingSuspenseBoundary(destination, responseState, id) { - writeChunk(destination, startPendingSuspenseBoundary1); - - if (id === null) { - throw new Error('An ID must have been assigned before we can complete the boundary.'); + if ( // title is valid in SVG so we avoid resour + insertionMode !== SVG_MODE && !noscriptTagInScope && resourcesFromElement('title', props)) { + // We have converted this link exclusively to a resource and no longer + // need to emit it + return null; } - writeChunk(destination, id); - return writeChunkAndReturn(destination, startPendingSuspenseBoundary2); + return pushTitleImpl(target, props, responseState); } -function writeStartClientRenderedSuspenseBoundary(destination, responseState, errorDigest, errorMesssage, errorComponentStack) { - var result; - result = writeChunkAndReturn(destination, startClientRenderedSuspenseBoundary); - writeChunk(destination, clientRenderedSuspenseBoundaryError1); - - if (errorDigest) { - writeChunk(destination, clientRenderedSuspenseBoundaryError1A); - writeChunk(destination, stringToChunk(escapeTextForBrowser(errorDigest))); - writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial); - } - { - if (errorMesssage) { - writeChunk(destination, clientRenderedSuspenseBoundaryError1B); - writeChunk(destination, stringToChunk(escapeTextForBrowser(errorMesssage))); - writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial); - } +function pushTitleImpl(target, props, responseState) { + target.push(startChunkForTag('title')); + var children = null; - if (errorComponentStack) { - writeChunk(destination, clientRenderedSuspenseBoundaryError1C); - writeChunk(destination, stringToChunk(escapeTextForBrowser(errorComponentStack))); - writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial); - } - } + for (var propKey in props) { + if (hasOwnProperty.call(props, propKey)) { + var propValue = props[propKey]; - result = writeChunkAndReturn(destination, clientRenderedSuspenseBoundaryError2); - return result; -} -function writeEndCompletedSuspenseBoundary(destination, responseState) { - return writeChunkAndReturn(destination, endSuspenseBoundary); -} -function writeEndPendingSuspenseBoundary(destination, responseState) { - return writeChunkAndReturn(destination, endSuspenseBoundary); -} -function writeEndClientRenderedSuspenseBoundary(destination, responseState) { - return writeChunkAndReturn(destination, endSuspenseBoundary); -} -var startSegmentHTML = stringToPrecomputedChunk('<div hidden id="'); -var startSegmentHTML2 = stringToPrecomputedChunk('">'); -var endSegmentHTML = stringToPrecomputedChunk('</div>'); -var startSegmentSVG = stringToPrecomputedChunk('<svg aria-hidden="true" style="display:none" id="'); -var startSegmentSVG2 = stringToPrecomputedChunk('">'); -var endSegmentSVG = stringToPrecomputedChunk('</svg>'); -var startSegmentMathML = stringToPrecomputedChunk('<math aria-hidden="true" style="display:none" id="'); -var startSegmentMathML2 = stringToPrecomputedChunk('">'); -var endSegmentMathML = stringToPrecomputedChunk('</math>'); -var startSegmentTable = stringToPrecomputedChunk('<table hidden id="'); -var startSegmentTable2 = stringToPrecomputedChunk('">'); -var endSegmentTable = stringToPrecomputedChunk('</table>'); -var startSegmentTableBody = stringToPrecomputedChunk('<table hidden><tbody id="'); -var startSegmentTableBody2 = stringToPrecomputedChunk('">'); -var endSegmentTableBody = stringToPrecomputedChunk('</tbody></table>'); -var startSegmentTableRow = stringToPrecomputedChunk('<table hidden><tr id="'); -var startSegmentTableRow2 = stringToPrecomputedChunk('">'); -var endSegmentTableRow = stringToPrecomputedChunk('</tr></table>'); -var startSegmentColGroup = stringToPrecomputedChunk('<table hidden><colgroup id="'); -var startSegmentColGroup2 = stringToPrecomputedChunk('">'); -var endSegmentColGroup = stringToPrecomputedChunk('</colgroup></table>'); -function writeStartSegment(destination, responseState, formatContext, id) { - switch (formatContext.insertionMode) { - case ROOT_HTML_MODE: - case HTML_HTML_MODE: - case HTML_MODE: - { - writeChunk(destination, startSegmentHTML); - writeChunk(destination, responseState.segmentPrefix); - writeChunk(destination, stringToChunk(id.toString(16))); - return writeChunkAndReturn(destination, startSegmentHTML2); + if (propValue == null) { + continue; } - case SVG_MODE: - { - writeChunk(destination, startSegmentSVG); - writeChunk(destination, responseState.segmentPrefix); - writeChunk(destination, stringToChunk(id.toString(16))); - return writeChunkAndReturn(destination, startSegmentSVG2); - } + switch (propKey) { + case 'children': + children = propValue; + break; - case MATHML_MODE: - { - writeChunk(destination, startSegmentMathML); - writeChunk(destination, responseState.segmentPrefix); - writeChunk(destination, stringToChunk(id.toString(16))); - return writeChunkAndReturn(destination, startSegmentMathML2); - } + case 'dangerouslySetInnerHTML': + throw new Error('`dangerouslySetInnerHTML` does not make sense on <title>.'); + // eslint-disable-next-line-no-fallthrough - case HTML_TABLE_MODE: - { - writeChunk(destination, startSegmentTable); - writeChunk(destination, responseState.segmentPrefix); - writeChunk(destination, stringToChunk(id.toString(16))); - return writeChunkAndReturn(destination, startSegmentTable2); + default: + pushAttribute(target, responseState, propKey, propValue); + break; } - // TODO: For the rest of these, there will be extra wrapper nodes that never - // get deleted from the document. We need to delete the table too as part - // of the injected scripts. They are invisible though so it's not too terrible - // and it's kind of an edge case to suspend in a table. Totally supported though. + } + } - case HTML_TABLE_BODY_MODE: - { - writeChunk(destination, startSegmentTableBody); - writeChunk(destination, responseState.segmentPrefix); - writeChunk(destination, stringToChunk(id.toString(16))); - return writeChunkAndReturn(destination, startSegmentTableBody2); - } + target.push(endOfStartTag); + var child = Array.isArray(children) ? children.length < 2 ? children[0] : null : children; - case HTML_TABLE_ROW_MODE: - { - writeChunk(destination, startSegmentTableRow); - writeChunk(destination, responseState.segmentPrefix); - writeChunk(destination, stringToChunk(id.toString(16))); - return writeChunkAndReturn(destination, startSegmentTableRow2); - } + if (typeof child !== 'function' && typeof child !== 'symbol' && child !== null && child !== undefined) { + // eslint-disable-next-line react-internal/safe-string-coercion + target.push(stringToChunk(escapeTextForBrowser('' + child))); + } - case HTML_COLGROUP_MODE: - { - writeChunk(destination, startSegmentColGroup); - writeChunk(destination, responseState.segmentPrefix); - writeChunk(destination, stringToChunk(id.toString(16))); - return writeChunkAndReturn(destination, startSegmentColGroup2); - } + target.push(endTag1, stringToChunk('title'), endTag2); + return null; +} - default: - { - throw new Error('Unknown insertion mode. This is a bug in React.'); - } +function pushStartHead(target, preamble, props, tag, responseState) { + return pushStartGenericElement( preamble , props, tag, responseState); +} + +function pushStartHtml(target, preamble, props, tag, responseState, formatContext) { + target = preamble ; + + if (formatContext.insertionMode === ROOT_HTML_MODE) { + // If we're rendering the html tag and we're at the root (i.e. not in foreignObject) + // then we also emit the DOCTYPE as part of the root content as a convenience for + // rendering the whole document. + target.push(DOCTYPE); } + + return pushStartGenericElement(target, props, tag, responseState); } -function writeEndSegment(destination, formatContext) { - switch (formatContext.insertionMode) { - case ROOT_HTML_MODE: - case HTML_HTML_MODE: - case HTML_MODE: - { - return writeChunkAndReturn(destination, endSegmentHTML); - } - case SVG_MODE: - { - return writeChunkAndReturn(destination, endSegmentSVG); - } +function pushScript(target, props, responseState, textEmbedded, noscriptTagInScope) { + if ( !noscriptTagInScope && resourcesFromScript(props)) { + if (textEmbedded) { + // This link follows text but we aren't writing a tag. while not as efficient as possible we need + // to be safe and assume text will follow by inserting a textSeparator + target.push(textSeparator); + } // We have converted this link exclusively to a resource and no longer + // need to emit it - case MATHML_MODE: - { - return writeChunkAndReturn(destination, endSegmentMathML); - } - case HTML_TABLE_MODE: - { - return writeChunkAndReturn(destination, endSegmentTable); - } + return null; + } - case HTML_TABLE_BODY_MODE: - { - return writeChunkAndReturn(destination, endSegmentTableBody); - } + return pushScriptImpl(target, props, responseState); +} - case HTML_TABLE_ROW_MODE: - { - return writeChunkAndReturn(destination, endSegmentTableRow); - } +function pushScriptImpl(target, props, responseState) { + target.push(startChunkForTag('script')); + var children = null; + var innerHTML = null; - case HTML_COLGROUP_MODE: - { - return writeChunkAndReturn(destination, endSegmentColGroup); + for (var propKey in props) { + if (hasOwnProperty.call(props, propKey)) { + var propValue = props[propKey]; + + if (propValue == null) { + continue; } - default: - { - throw new Error('Unknown insertion mode. This is a bug in React.'); + switch (propKey) { + case 'children': + children = propValue; + break; + + case 'dangerouslySetInnerHTML': + innerHTML = propValue; + break; + + default: + pushAttribute(target, responseState, propKey, propValue); + break; } + } } -} -var completeSegmentScript1Full = stringToPrecomputedChunk(completeSegment + ';$RS("'); -var completeSegmentScript1Partial = stringToPrecomputedChunk('$RS("'); -var completeSegmentScript2 = stringToPrecomputedChunk('","'); -var completeSegmentScriptEnd = stringToPrecomputedChunk('")</script>'); -var completeSegmentData1 = stringToPrecomputedChunk('<template data-rsi="" data-sid="'); -var completeSegmentData2 = stringToPrecomputedChunk('" data-pid="'); -function writeCompletedSegmentInstruction(destination, responseState, contentSegmentID) { + + target.push(endOfStartTag); { - writeChunk(destination, responseState.startInlineScript); + if (children != null && typeof children !== 'string') { + var descriptiveStatement = typeof children === 'number' ? 'a number for children' : Array.isArray(children) ? 'an array for children' : 'something unexpected for children'; - if ((responseState.instructions & SentCompleteSegmentFunction) === NothingSent) { - // The first time we write this, we'll need to include the full implementation. - responseState.instructions |= SentCompleteSegmentFunction; - writeChunk(destination, completeSegmentScript1Full); - } else { - // Future calls can just reuse the same function. - writeChunk(destination, completeSegmentScript1Partial); + error('A script element was rendered with %s. If script element has children it must be a single string.' + ' Consider using dangerouslySetInnerHTML or passing a plain string as children.', descriptiveStatement); } - } // Write function arguments, which are string literals + } + pushInnerHTML(target, innerHTML, children); - writeChunk(destination, responseState.segmentPrefix); - var formattedID = stringToChunk(contentSegmentID.toString(16)); - writeChunk(destination, formattedID); + if (typeof children === 'string') { + target.push(stringToChunk(encodeHTMLTextNode(children))); + } - { - writeChunk(destination, completeSegmentScript2); + target.push(endTag1, stringToChunk('script'), endTag2); + return null; +} + +function pushStartGenericElement(target, props, tag, responseState) { + target.push(startChunkForTag(tag)); + var children = null; + var innerHTML = null; + + for (var propKey in props) { + if (hasOwnProperty.call(props, propKey)) { + var propValue = props[propKey]; + + if (propValue == null) { + continue; + } + + switch (propKey) { + case 'children': + children = propValue; + break; + + case 'dangerouslySetInnerHTML': + innerHTML = propValue; + break; + + default: + pushAttribute(target, responseState, propKey, propValue); + break; + } + } } - writeChunk(destination, responseState.placeholderPrefix); - writeChunk(destination, formattedID); + target.push(endOfStartTag); + pushInnerHTML(target, innerHTML, children); - { - return writeChunkAndReturn(destination, completeSegmentScriptEnd); + if (typeof children === 'string') { + // Special case children as a string to avoid the unnecessary comment. + // TODO: Remove this special case after the general optimization is in place. + target.push(stringToChunk(encodeHTMLTextNode(children))); + return null; } + + return children; } -var completeBoundaryScript1Full = stringToPrecomputedChunk(completeBoundary + '$RC("'); -var completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC("'); -var completeBoundaryWithStylesScript1FullBoth = stringToPrecomputedChunk(completeBoundary + completeBoundaryWithStyles + '$RR("'); -var completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk(completeBoundaryWithStyles + '$RR("'); -var completeBoundaryWithStylesScript1Partial = stringToPrecomputedChunk('$RR("'); -var completeBoundaryScript2 = stringToPrecomputedChunk('","'); -var completeBoundaryScript3a = stringToPrecomputedChunk('",'); -var completeBoundaryScript3b = stringToPrecomputedChunk('"'); -var completeBoundaryScriptEnd = stringToPrecomputedChunk(')</script>'); -var completeBoundaryData1 = stringToPrecomputedChunk('<template data-rci="" data-bid="'); -var completeBoundaryWithStylesData1 = stringToPrecomputedChunk('<template data-rri="" data-bid="'); -var completeBoundaryData2 = stringToPrecomputedChunk('" data-sid="'); -var completeBoundaryData3a = stringToPrecomputedChunk('" data-sty="'); -function writeCompletedBoundaryInstruction(destination, responseState, boundaryID, contentSegmentID, boundaryResources) { - var hasStyleDependencies; - { - hasStyleDependencies = hasStyleResourceDependencies(boundaryResources); - } +function pushStartCustomElement(target, props, tag, responseState) { + target.push(startChunkForTag(tag)); + var children = null; + var innerHTML = null; - { - writeChunk(destination, responseState.startInlineScript); + for (var propKey in props) { + if (hasOwnProperty.call(props, propKey)) { + var propValue = props[propKey]; - if ( hasStyleDependencies) { - if ((responseState.instructions & SentCompleteBoundaryFunction) === NothingSent) { - responseState.instructions |= SentStyleInsertionFunction | SentCompleteBoundaryFunction; - writeChunk(destination, clonePrecomputedChunk(completeBoundaryWithStylesScript1FullBoth)); - } else if ((responseState.instructions & SentStyleInsertionFunction) === NothingSent) { - responseState.instructions |= SentStyleInsertionFunction; - writeChunk(destination, completeBoundaryWithStylesScript1FullPartial); - } else { - writeChunk(destination, completeBoundaryWithStylesScript1Partial); + if (propValue == null) { + continue; } - } else { - if ((responseState.instructions & SentCompleteBoundaryFunction) === NothingSent) { - responseState.instructions |= SentCompleteBoundaryFunction; - writeChunk(destination, completeBoundaryScript1Full); - } else { - writeChunk(destination, completeBoundaryScript1Partial); + + switch (propKey) { + case 'children': + children = propValue; + break; + + case 'dangerouslySetInnerHTML': + innerHTML = propValue; + break; + + case 'style': + pushStyle(target, responseState, propValue); + break; + + case 'suppressContentEditableWarning': + case 'suppressHydrationWarning': + // Ignored. These are built-in to React on the client. + break; + + default: + if (isAttributeNameSafe(propKey) && typeof propValue !== 'function' && typeof propValue !== 'symbol') { + target.push(attributeSeparator, stringToChunk(propKey), attributeAssign, stringToChunk(escapeTextForBrowser(propValue)), attributeEnd); + } + + break; } } } - if (boundaryID === null) { - throw new Error('An ID must have been assigned before we can complete the boundary.'); - } // Write function arguments, which are string and array literals + target.push(endOfStartTag); + pushInnerHTML(target, innerHTML, children); + return children; +} +var leadingNewline = stringToPrecomputedChunk('\n'); - var formattedContentID = stringToChunk(contentSegmentID.toString(16)); - writeChunk(destination, boundaryID); +function pushStartPreformattedElement(target, props, tag, responseState) { + target.push(startChunkForTag(tag)); + var children = null; + var innerHTML = null; - { - writeChunk(destination, completeBoundaryScript2); - } + for (var propKey in props) { + if (hasOwnProperty.call(props, propKey)) { + var propValue = props[propKey]; - writeChunk(destination, responseState.segmentPrefix); - writeChunk(destination, formattedContentID); + if (propValue == null) { + continue; + } - if ( hasStyleDependencies) { - // Script and data writers must format this differently: - // - script writer emits an array literal, whose string elements are - // escaped for javascript e.g. ["A", "B"] - // - data writer emits a string literal, which is escaped as html - // e.g. ["A", "B"] - { - writeChunk(destination, completeBoundaryScript3a); // boundaryResources encodes an array literal + switch (propKey) { + case 'children': + children = propValue; + break; - writeStyleResourceDependenciesInJS(destination, boundaryResources); - } - } else { - { - writeChunk(destination, completeBoundaryScript3b); - } - } + case 'dangerouslySetInnerHTML': + innerHTML = propValue; + break; - { - return writeChunkAndReturn(destination, completeBoundaryScriptEnd); + default: + pushAttribute(target, responseState, propKey, propValue); + break; + } + } } -} -var clientRenderScript1Full = stringToPrecomputedChunk(clientRenderBoundary + ';$RX("'); -var clientRenderScript1Partial = stringToPrecomputedChunk('$RX("'); -var clientRenderScript1A = stringToPrecomputedChunk('"'); -var clientRenderErrorScriptArgInterstitial = stringToPrecomputedChunk(','); -var clientRenderScriptEnd = stringToPrecomputedChunk(')</script>'); -var clientRenderData1 = stringToPrecomputedChunk('<template data-rxi="" data-bid="'); -var clientRenderData2 = stringToPrecomputedChunk('" data-dgst="'); -var clientRenderData3 = stringToPrecomputedChunk('" data-msg="'); -var clientRenderData4 = stringToPrecomputedChunk('" data-stck="'); -function writeClientRenderBoundaryInstruction(destination, responseState, boundaryID, errorDigest, errorMessage, errorComponentStack) { - { - writeChunk(destination, responseState.startInlineScript); + target.push(endOfStartTag); // text/html ignores the first character in these tags if it's a newline + // Prefer to break application/xml over text/html (for now) by adding + // a newline specifically to get eaten by the parser. (Alternately for + // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first + // \r is normalized out by HTMLTextAreaElement#value.) + // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre> + // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions> + // See: <http://www.w3.org/TR/html5/syntax.html#newlines> + // See: Parsing of "textarea" "listing" and "pre" elements + // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody> + // TODO: This doesn't deal with the case where the child is an array + // or component that returns a string. - if ((responseState.instructions & SentClientRenderFunction) === NothingSent) { - // The first time we write this, we'll need to include the full implementation. - responseState.instructions |= SentClientRenderFunction; - writeChunk(destination, clientRenderScript1Full); - } else { - // Future calls can just reuse the same function. - writeChunk(destination, clientRenderScript1Partial); + if (innerHTML != null) { + if (children != null) { + throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.'); } - } - if (boundaryID === null) { - throw new Error('An ID must have been assigned before we can complete the boundary.'); - } + if (typeof innerHTML !== 'object' || !('__html' in innerHTML)) { + throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' + 'for more information.'); + } - writeChunk(destination, boundaryID); + var html = innerHTML.__html; - { - // " needs to be inserted for scripts, since ArgInterstitual does not contain - // leading or trailing quotes - writeChunk(destination, clientRenderScript1A); - } + if (html !== null && html !== undefined) { + if (typeof html === 'string' && html.length > 0 && html[0] === '\n') { + target.push(leadingNewline, stringToChunk(html)); + } else { + { + checkHtmlStringCoercion(html); + } - if (errorDigest || errorMessage || errorComponentStack) { - { - // ,"JSONString" - writeChunk(destination, clientRenderErrorScriptArgInterstitial); - writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorDigest || ''))); + target.push(stringToChunk('' + html)); + } } } - if (errorMessage || errorComponentStack) { - { - // ,"JSONString" - writeChunk(destination, clientRenderErrorScriptArgInterstitial); - writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorMessage || ''))); - } + if (typeof children === 'string' && children[0] === '\n') { + target.push(leadingNewline); } - if (errorComponentStack) { - // ,"JSONString" - { - writeChunk(destination, clientRenderErrorScriptArgInterstitial); - writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorComponentStack))); - } - } + return children; +} // We accept any tag to be rendered but since this gets injected into arbitrary +// HTML, we want to make sure that it's a safe tag. +// http://www.w3.org/TR/REC-xml/#NT-Name - { - // ></script> - return writeChunkAndReturn(destination, clientRenderScriptEnd); - } -} -var regexForJSStringsInInstructionScripts = /[<\u2028\u2029]/g; -function escapeJSStringsForInstructionScripts(input) { - var escaped = JSON.stringify(input); - return escaped.replace(regexForJSStringsInInstructionScripts, function (match) { - switch (match) { - // santizing breaking out of strings and script tags - case '<': - return "\\u003c"; +var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset - case "\u2028": - return "\\u2028"; +var validatedTagCache = new Map(); - case "\u2029": - return "\\u2029"; +function startChunkForTag(tag) { + var tagStartChunk = validatedTagCache.get(tag); - default: - { - // eslint-disable-next-line react-internal/prod-error-codes - throw new Error('escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React'); - } + if (tagStartChunk === undefined) { + if (!VALID_TAG_REGEX.test(tag)) { + throw new Error("Invalid tag: " + tag); } - }); -} - -var regexForJSStringsInScripts = /[&><\u2028\u2029]/g; - -function escapeJSObjectForInstructionScripts(input) { - var escaped = JSON.stringify(input); - return escaped.replace(regexForJSStringsInScripts, function (match) { - switch (match) { - // santizing breaking out of strings and script tags - case '&': - return "\\u0026"; - case '>': - return "\\u003e"; + tagStartChunk = stringToPrecomputedChunk('<' + tag); + validatedTagCache.set(tag, tagStartChunk); + } - case '<': - return "\\u003c"; + return tagStartChunk; +} - case "\u2028": - return "\\u2028"; +var DOCTYPE = stringToPrecomputedChunk('<!DOCTYPE html>'); +function pushStartInstance(target, preamble, type, props, responseState, formatContext, textEmbedded) { + { + validateProperties(type, props); + validateProperties$1(type, props); + validateProperties$2(type, props, null); - case "\u2029": - return "\\u2029"; + if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) { + error('A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.'); + } - default: - { - // eslint-disable-next-line react-internal/prod-error-codes - throw new Error('escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React'); - } + if (formatContext.insertionMode !== SVG_MODE && formatContext.insertionMode !== MATHML_MODE) { + if (type.indexOf('-') === -1 && typeof props.is !== 'string' && type.toLowerCase() !== type) { + error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type); + } } - }); -} + } -var styleTagTemplateOpen = stringToPrecomputedChunk('<template data-precedence="">'); -var styleTagTemplateClose = stringToPrecomputedChunk('</template>'); // Tracks whether we wrote any late style tags. We use this to determine -// whether we need to emit a closing template tag after flushing late style tags + switch (type) { + // Special tags + case 'select': + return pushStartSelect(target, props, responseState); -var didWrite = false; + case 'option': + return pushStartOption(target, props, responseState, formatContext); -function flushStyleTagsLateForBoundary(resource) { - if (resource.type === 'style' && (resource.state & Flushed) === NoState) { - if (didWrite === false) { - // we are going to write so we need to emit the open tag - didWrite = true; - writeChunk(this, styleTagTemplateOpen); - } // This <style> tag can be flushed now + case 'textarea': + return pushStartTextArea(target, props, responseState); + case 'input': + return pushInput(target, props, responseState); - var chunks = resource.chunks; + case 'menuitem': + return pushStartMenuItem(target, props, responseState); - for (var i = 0; i < chunks.length; i++) { - writeChunk(this, chunks[i]); - } + case 'title': + return pushTitle(target, props, responseState, formatContext.insertionMode, formatContext.noscriptTagInScope) ; - resource.state |= FlushedLate; - } -} + case 'link': + return pushLink(target, props, responseState, textEmbedded, formatContext.noscriptTagInScope); -function writeResourcesForBoundary(destination, boundaryResources) { - didWrite = false; - boundaryResources.forEach(flushStyleTagsLateForBoundary, destination); + case 'script': + return pushScript(target, props, responseState, textEmbedded, formatContext.noscriptTagInScope) ; - if (didWrite) { - return writeChunkAndReturn(destination, styleTagTemplateClose); - } else { - return true; - } -} -var precedencePlaceholderStart = stringToPrecomputedChunk('<style data-precedence="'); -var precedencePlaceholderEnd = stringToPrecomputedChunk('"></style>'); + case 'meta': + return pushMeta(target, props, responseState, textEmbedded, formatContext.noscriptTagInScope); -function flushResourceInPreamble(resource) { - if ((resource.state & (Flushed | Blocked)) === NoState) { - var chunks = resource.chunks; + case 'base': + return pushBase(target, props, responseState, textEmbedded, formatContext.noscriptTagInScope); + // Newline eating tags - for (var i = 0; i < chunks.length; i++) { - writeChunk(this, chunks[i]); - } + case 'listing': + case 'pre': + { + return pushStartPreformattedElement(target, props, type, responseState); + } + // Omitted close tags + + case 'area': + case 'br': + case 'col': + case 'embed': + case 'hr': + case 'img': + case 'keygen': + case 'param': + case 'source': + case 'track': + case 'wbr': + { + return pushSelfClosing(target, props, type, responseState); + } + // These are reserved SVG and MathML elements, that are never custom elements. + // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts - resource.state |= FlushedInPreamble; - } -} + case 'annotation-xml': + case 'color-profile': + case 'font-face': + case 'font-face-src': + case 'font-face-uri': + case 'font-face-format': + case 'font-face-name': + case 'missing-glyph': + { + return pushStartGenericElement(target, props, type, responseState); + } + // Preamble start tags -function flushResourceLate(resource) { - if ((resource.state & Flushed) === NoState) { - var chunks = resource.chunks; + case 'head': + return pushStartHead(target, preamble, props, type, responseState); - for (var i = 0; i < chunks.length; i++) { - writeChunk(this, chunks[i]); - } + case 'html': + { + return pushStartHtml(target, preamble, props, type, responseState, formatContext); + } - resource.state |= FlushedLate; + default: + { + if (type.indexOf('-') === -1 && typeof props.is !== 'string') { + // Generic element + return pushStartGenericElement(target, props, type, responseState); + } else { + // Custom element + return pushStartCustomElement(target, props, type, responseState); + } + } } } +var endTag1 = stringToPrecomputedChunk('</'); +var endTag2 = stringToPrecomputedChunk('>'); +function pushEndInstance(target, postamble, type, props) { + switch (type) { + // When float is on we expect title and script tags to always be pushed in + // a unit and never return children. when we end up pushing the end tag we + // want to ensure there is no extra closing tag pushed + case 'title': + case 'script': + // Omitted close tags + // TODO: Instead of repeating this switch we could try to pass a flag from above. + // That would require returning a tuple. Which might be ok if it gets inlined. + // eslint-disable-next-line-no-fallthrough -var didFlush = false; - -function flushUnblockedStyle(resource, key, set) { - var chunks = resource.chunks; - - if (resource.state & Flushed) { - // In theory this should never happen because we clear from the - // Set on flush but to ensure correct semantics we don't emit - // anything if we are in this state. - set.delete(resource); - } else if (resource.state & Blocked) ; else { - didFlush = true; // We can emit this style or stylesheet as is. - - if (resource.type === 'stylesheet') { - // We still need to encode stylesheet chunks - // because unlike most Hoistables and Resources we do not eagerly encode - // them during render. This is because if we flush late we have to send a - // different encoding and we don't want to encode multiple times - pushLinkImpl(chunks, resource.props); - } + case 'area': + case 'base': + case 'br': + case 'col': + case 'embed': + case 'hr': + case 'img': + case 'input': + case 'keygen': + case 'link': + case 'meta': + case 'param': + case 'source': + case 'track': + case 'wbr': + { + // No close tag needed. + return; + } + // Postamble end tags - for (var i = 0; i < chunks.length; i++) { - writeChunk(this, chunks[i]); - } + case 'body': + { + { + postamble.unshift(endTag1, stringToChunk(type), endTag2); + return; + } + } - resource.state |= FlushedInPreamble; - set.delete(resource); + case 'html': + { + postamble.push(endTag1, stringToChunk(type), endTag2); + return; + } } -} -function flushUnblockedStyles(set, precedence) { - didFlush = false; - set.forEach(flushUnblockedStyle, this); - - if (!didFlush) { - // if we did not flush anything for this precedence slot we emit - // an empty <style data-precedence="..." /> tag to ensure the - // precedence remains in the correct order - writeChunk(this, precedencePlaceholderStart); - writeChunk(this, stringToChunk(escapeTextForBrowser(precedence))); - writeChunk(this, precedencePlaceholderEnd); - } + target.push(endTag1, stringToChunk(type), endTag2); } +function writeCompletedRoot(destination, responseState) { + var bootstrapChunks = responseState.bootstrapChunks; + var i = 0; -function preloadBlockedStyle(resource) { - // The only Resources that should remain are Blocked resources - { - if ((resource.state & Blocked) === NoState) { - error('React encountered a Stylesheet Resource that was not Blocked when it was expected to be. This is a bug in React.'); - } else if (resource.state & PreloadFlushed) { - error('React encountered a Stylesheet Resource that already flushed a Preload when it was not expected to. This is a bug in React.'); - } + for (; i < bootstrapChunks.length - 1; i++) { + writeChunk(destination, bootstrapChunks[i]); } - if (resource.type === 'style') { - // <style> tags do not need to be preloaded - return; + if (i < bootstrapChunks.length) { + return writeChunkAndReturn(destination, bootstrapChunks[i]); } - var chunks = resource.chunks; - var preloadProps = preloadAsStylePropsFromProps(resource.props.href, resource.props); - pushLinkImpl(chunks, preloadProps); - - for (var i = 0; i < chunks.length; i++) { - writeChunk(this, chunks[i]); - } + return true; +} // Structural Nodes +// A placeholder is a node inside a hidden partial tree that can be filled in later, but before +// display. It's never visible to users. We use the template tag because it can be used in every +// type of parent. <script> tags also work in every other tag except <colgroup>. - resource.state |= PreloadFlushed; - chunks.length = 0; -} +var placeholder1 = stringToPrecomputedChunk('<template id="'); +var placeholder2 = stringToPrecomputedChunk('"></template>'); +function writePlaceholder(destination, responseState, id) { + writeChunk(destination, placeholder1); + writeChunk(destination, responseState.placeholderPrefix); + var formattedID = stringToChunk(id.toString(16)); + writeChunk(destination, formattedID); + return writeChunkAndReturn(destination, placeholder2); +} // Suspense boundaries are encoded as comments. -function preloadBlockedStyles(set, precedence) { - set.forEach(preloadBlockedStyle, this); - set.clear(); +var startCompletedSuspenseBoundary = stringToPrecomputedChunk('<!--$-->'); +var startPendingSuspenseBoundary1 = stringToPrecomputedChunk('<!--$?--><template id="'); +var startPendingSuspenseBoundary2 = stringToPrecomputedChunk('"></template>'); +var startClientRenderedSuspenseBoundary = stringToPrecomputedChunk('<!--$!-->'); +var endSuspenseBoundary = stringToPrecomputedChunk('<!--/$-->'); +var clientRenderedSuspenseBoundaryError1 = stringToPrecomputedChunk('<template'); +var clientRenderedSuspenseBoundaryErrorAttrInterstitial = stringToPrecomputedChunk('"'); +var clientRenderedSuspenseBoundaryError1A = stringToPrecomputedChunk(' data-dgst="'); +var clientRenderedSuspenseBoundaryError1B = stringToPrecomputedChunk(' data-msg="'); +var clientRenderedSuspenseBoundaryError1C = stringToPrecomputedChunk(' data-stck="'); +var clientRenderedSuspenseBoundaryError2 = stringToPrecomputedChunk('></template>'); +function writeStartCompletedSuspenseBoundary(destination, responseState) { + return writeChunkAndReturn(destination, startCompletedSuspenseBoundary); } +function writeStartPendingSuspenseBoundary(destination, responseState, id) { + writeChunk(destination, startPendingSuspenseBoundary1); -function preloadLateStyle(resource) { - { - if (resource.state & PreloadFlushed) { - error('React encountered a Stylesheet Resource that already flushed a Preload when it was not expected to. This is a bug in React.'); - } - } - - if (resource.type === 'style') { - // <style> tags do not need to be preloaded - return; - } - - var chunks = resource.chunks; - var preloadProps = preloadAsStylePropsFromProps(resource.props.href, resource.props); - pushLinkImpl(chunks, preloadProps); - - for (var i = 0; i < chunks.length; i++) { - writeChunk(this, chunks[i]); + if (id === null) { + throw new Error('An ID must have been assigned before we can complete the boundary.'); } - resource.state |= PreloadFlushed; - chunks.length = 0; + writeChunk(destination, id); + return writeChunkAndReturn(destination, startPendingSuspenseBoundary2); } +function writeStartClientRenderedSuspenseBoundary(destination, responseState, errorDigest, errorMesssage, errorComponentStack) { + var result; + result = writeChunkAndReturn(destination, startClientRenderedSuspenseBoundary); + writeChunk(destination, clientRenderedSuspenseBoundaryError1); -function preloadLateStyles(set, precedence) { - set.forEach(preloadLateStyle, this); - set.clear(); -} // We don't bother reporting backpressure at the moment because we expect to -// flush the entire preamble in a single pass. This probably should be modified -// in the future to be backpressure sensitive but that requires a larger refactor -// of the flushing code in Fizz. - - -function writePreamble(destination, resources, responseState, willFlushAllSegments) { - - var htmlChunks = responseState.htmlChunks; - var headChunks = responseState.headChunks; - var i = 0; // Emit open tags before Hoistables and Resources + if (errorDigest) { + writeChunk(destination, clientRenderedSuspenseBoundaryError1A); + writeChunk(destination, stringToChunk(escapeTextForBrowser(errorDigest))); + writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial); + } - if (htmlChunks) { - // We have an <html> to emit as part of the preamble - for (i = 0; i < htmlChunks.length; i++) { - writeChunk(destination, htmlChunks[i]); + { + if (errorMesssage) { + writeChunk(destination, clientRenderedSuspenseBoundaryError1B); + writeChunk(destination, stringToChunk(escapeTextForBrowser(errorMesssage))); + writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial); } - if (headChunks) { - for (i = 0; i < headChunks.length; i++) { - writeChunk(destination, headChunks[i]); - } - } else { - // We did not render a head but we emitted an <html> so we emit one now - writeChunk(destination, startChunkForTag('head')); - writeChunk(destination, endOfStartTag); - } - } else if (headChunks) { - // We do not have an <html> but we do have a <head> - for (i = 0; i < headChunks.length; i++) { - writeChunk(destination, headChunks[i]); + if (errorComponentStack) { + writeChunk(destination, clientRenderedSuspenseBoundaryError1C); + writeChunk(destination, stringToChunk(escapeTextForBrowser(errorComponentStack))); + writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial); } - } // Emit high priority Hoistables - - - var charsetChunks = responseState.charsetChunks; - - for (i = 0; i < charsetChunks.length; i++) { - writeChunk(destination, charsetChunks[i]); } - charsetChunks.length = 0; - var preconnectChunks = responseState.preconnectChunks; - - for (i = 0; i < preconnectChunks.length; i++) { - writeChunk(destination, preconnectChunks[i]); - } - - preconnectChunks.length = 0; - resources.fontPreloads.forEach(flushResourceInPreamble, destination); - resources.fontPreloads.clear(); // Flush unblocked stylesheets by precedence - - resources.precedences.forEach(flushUnblockedStyles, destination); // Flush preloads for Blocked stylesheets - - resources.precedences.forEach(preloadBlockedStyles, destination); - resources.usedStylesheets.forEach(function (resource) { - var key = getResourceKey(resource.props.as, resource.props.href); - - if (resources.stylesMap.has(key)) ; else { - var chunks = resource.chunks; - - for (i = 0; i < chunks.length; i++) { - writeChunk(destination, chunks[i]); + result = writeChunkAndReturn(destination, clientRenderedSuspenseBoundaryError2); + return result; +} +function writeEndCompletedSuspenseBoundary(destination, responseState) { + return writeChunkAndReturn(destination, endSuspenseBoundary); +} +function writeEndPendingSuspenseBoundary(destination, responseState) { + return writeChunkAndReturn(destination, endSuspenseBoundary); +} +function writeEndClientRenderedSuspenseBoundary(destination, responseState) { + return writeChunkAndReturn(destination, endSuspenseBoundary); +} +var startSegmentHTML = stringToPrecomputedChunk('<div hidden id="'); +var startSegmentHTML2 = stringToPrecomputedChunk('">'); +var endSegmentHTML = stringToPrecomputedChunk('</div>'); +var startSegmentSVG = stringToPrecomputedChunk('<svg aria-hidden="true" style="display:none" id="'); +var startSegmentSVG2 = stringToPrecomputedChunk('">'); +var endSegmentSVG = stringToPrecomputedChunk('</svg>'); +var startSegmentMathML = stringToPrecomputedChunk('<math aria-hidden="true" style="display:none" id="'); +var startSegmentMathML2 = stringToPrecomputedChunk('">'); +var endSegmentMathML = stringToPrecomputedChunk('</math>'); +var startSegmentTable = stringToPrecomputedChunk('<table hidden id="'); +var startSegmentTable2 = stringToPrecomputedChunk('">'); +var endSegmentTable = stringToPrecomputedChunk('</table>'); +var startSegmentTableBody = stringToPrecomputedChunk('<table hidden><tbody id="'); +var startSegmentTableBody2 = stringToPrecomputedChunk('">'); +var endSegmentTableBody = stringToPrecomputedChunk('</tbody></table>'); +var startSegmentTableRow = stringToPrecomputedChunk('<table hidden><tr id="'); +var startSegmentTableRow2 = stringToPrecomputedChunk('">'); +var endSegmentTableRow = stringToPrecomputedChunk('</tr></table>'); +var startSegmentColGroup = stringToPrecomputedChunk('<table hidden><colgroup id="'); +var startSegmentColGroup2 = stringToPrecomputedChunk('">'); +var endSegmentColGroup = stringToPrecomputedChunk('</colgroup></table>'); +function writeStartSegment(destination, responseState, formatContext, id) { + switch (formatContext.insertionMode) { + case ROOT_HTML_MODE: + case HTML_MODE: + { + writeChunk(destination, startSegmentHTML); + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, stringToChunk(id.toString(16))); + return writeChunkAndReturn(destination, startSegmentHTML2); } - } - }); - resources.usedStylesheets.clear(); - resources.scripts.forEach(flushResourceInPreamble, destination); - resources.scripts.clear(); - resources.usedScripts.forEach(flushResourceInPreamble, destination); - resources.usedScripts.clear(); - resources.explicitStylesheetPreloads.forEach(flushResourceInPreamble, destination); - resources.explicitStylesheetPreloads.clear(); - resources.explicitScriptPreloads.forEach(flushResourceInPreamble, destination); - resources.explicitScriptPreloads.clear(); - resources.explicitOtherPreloads.forEach(flushResourceInPreamble, destination); - resources.explicitOtherPreloads.clear(); // Write embedding preloadChunks - - var preloadChunks = responseState.preloadChunks; - for (i = 0; i < preloadChunks.length; i++) { - writeChunk(destination, preloadChunks[i]); - } - - preloadChunks.length = 0; // Write embedding hoistableChunks - - var hoistableChunks = responseState.hoistableChunks; + case SVG_MODE: + { + writeChunk(destination, startSegmentSVG); + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, stringToChunk(id.toString(16))); + return writeChunkAndReturn(destination, startSegmentSVG2); + } - for (i = 0; i < hoistableChunks.length; i++) { - writeChunk(destination, hoistableChunks[i]); - } + case MATHML_MODE: + { + writeChunk(destination, startSegmentMathML); + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, stringToChunk(id.toString(16))); + return writeChunkAndReturn(destination, startSegmentMathML2); + } - hoistableChunks.length = 0; // Flush closing head if necessary + case HTML_TABLE_MODE: + { + writeChunk(destination, startSegmentTable); + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, stringToChunk(id.toString(16))); + return writeChunkAndReturn(destination, startSegmentTable2); + } + // TODO: For the rest of these, there will be extra wrapper nodes that never + // get deleted from the document. We need to delete the table too as part + // of the injected scripts. They are invisible though so it's not too terrible + // and it's kind of an edge case to suspend in a table. Totally supported though. - if (htmlChunks && headChunks === null) { - // We have an <html> rendered but no <head> rendered. We however inserted - // a <head> up above so we need to emit the </head> now. This is safe because - // if the main content contained the </head> it would also have provided a - // <head>. This means that all the content inside <html> is either <body> or - // invalid HTML - writeChunk(destination, endTag1); - writeChunk(destination, stringToChunk('head')); - writeChunk(destination, endTag2); - } -} // We don't bother reporting backpressure at the moment because we expect to -// flush the entire preamble in a single pass. This probably should be modified -// in the future to be backpressure sensitive but that requires a larger refactor -// of the flushing code in Fizz. + case HTML_TABLE_BODY_MODE: + { + writeChunk(destination, startSegmentTableBody); + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, stringToChunk(id.toString(16))); + return writeChunkAndReturn(destination, startSegmentTableBody2); + } -function writeHoistables(destination, resources, responseState) { - var i = 0; // Emit high priority Hoistables - // We omit charsetChunks because we have already sent the shell and if it wasn't - // already sent it is too late now. + case HTML_TABLE_ROW_MODE: + { + writeChunk(destination, startSegmentTableRow); + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, stringToChunk(id.toString(16))); + return writeChunkAndReturn(destination, startSegmentTableRow2); + } - var preconnectChunks = responseState.preconnectChunks; + case HTML_COLGROUP_MODE: + { + writeChunk(destination, startSegmentColGroup); + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, stringToChunk(id.toString(16))); + return writeChunkAndReturn(destination, startSegmentColGroup2); + } - for (i = 0; i < preconnectChunks.length; i++) { - writeChunk(destination, preconnectChunks[i]); + default: + { + throw new Error('Unknown insertion mode. This is a bug in React.'); + } } - - preconnectChunks.length = 0; - resources.fontPreloads.forEach(flushResourceLate, destination); - resources.fontPreloads.clear(); // Preload any stylesheets. these will emit in a render instruction that follows this - // but we want to kick off preloading as soon as possible - - resources.precedences.forEach(preloadLateStyles, destination); - resources.usedStylesheets.forEach(function (resource) { - var key = getResourceKey(resource.props.as, resource.props.href); - - if (resources.stylesMap.has(key)) ; else { - var chunks = resource.chunks; - - for (i = 0; i < chunks.length; i++) { - writeChunk(destination, chunks[i]); +} +function writeEndSegment(destination, formatContext) { + switch (formatContext.insertionMode) { + case ROOT_HTML_MODE: + case HTML_MODE: + { + return writeChunkAndReturn(destination, endSegmentHTML); } - } - }); - resources.usedStylesheets.clear(); - resources.scripts.forEach(flushResourceLate, destination); - resources.scripts.clear(); - resources.usedScripts.forEach(flushResourceLate, destination); - resources.usedScripts.clear(); - resources.explicitStylesheetPreloads.forEach(flushResourceLate, destination); - resources.explicitStylesheetPreloads.clear(); - resources.explicitScriptPreloads.forEach(flushResourceLate, destination); - resources.explicitScriptPreloads.clear(); - resources.explicitOtherPreloads.forEach(flushResourceLate, destination); - resources.explicitOtherPreloads.clear(); // Write embedding preloadChunks - var preloadChunks = responseState.preloadChunks; + case SVG_MODE: + { + return writeChunkAndReturn(destination, endSegmentSVG); + } - for (i = 0; i < preloadChunks.length; i++) { - writeChunk(destination, preloadChunks[i]); - } + case MATHML_MODE: + { + return writeChunkAndReturn(destination, endSegmentMathML); + } - preloadChunks.length = 0; // Write embedding hoistableChunks + case HTML_TABLE_MODE: + { + return writeChunkAndReturn(destination, endSegmentTable); + } - var hoistableChunks = responseState.hoistableChunks; + case HTML_TABLE_BODY_MODE: + { + return writeChunkAndReturn(destination, endSegmentTableBody); + } - for (i = 0; i < hoistableChunks.length; i++) { - writeChunk(destination, hoistableChunks[i]); - } + case HTML_TABLE_ROW_MODE: + { + return writeChunkAndReturn(destination, endSegmentTableRow); + } - hoistableChunks.length = 0; -} -function writePostamble(destination, responseState) { - if (responseState.hasBody) { - writeChunk(destination, endTag1); - writeChunk(destination, stringToChunk('body')); - writeChunk(destination, endTag2); - } + case HTML_COLGROUP_MODE: + { + return writeChunkAndReturn(destination, endSegmentColGroup); + } - if (responseState.htmlChunks) { - writeChunk(destination, endTag1); - writeChunk(destination, stringToChunk('html')); - writeChunk(destination, endTag2); + default: + { + throw new Error('Unknown insertion mode. This is a bug in React.'); + } } } +var completeSegmentScript1Full = stringToPrecomputedChunk(completeSegment + ';$RS("'); +var completeSegmentScript1Partial = stringToPrecomputedChunk('$RS("'); +var completeSegmentScript2 = stringToPrecomputedChunk('","'); +var completeSegmentScriptEnd = stringToPrecomputedChunk('")</script>'); +var completeSegmentData1 = stringToPrecomputedChunk('<template data-rsi="" data-sid="'); +var completeSegmentData2 = stringToPrecomputedChunk('" data-pid="'); +function writeCompletedSegmentInstruction(destination, responseState, contentSegmentID) { -function hasStyleResourceDependencies(boundaryResources) { - var iter = boundaryResources.values(); // At the moment boundaries only accumulate style resources - // so we assume the type is correct and don't check it - - while (true) { - var _iter$next = iter.next(), - resource = _iter$next.value; - - if (!resource) break; // If every style Resource flushed in the shell we do not need to send - // any dependencies + { + writeChunk(destination, responseState.startInlineScript); - if ((resource.state & FlushedInPreamble) === NoState) { - return true; + if (!responseState.sentCompleteSegmentFunction) { + // The first time we write this, we'll need to include the full implementation. + responseState.sentCompleteSegmentFunction = true; + writeChunk(destination, completeSegmentScript1Full); + } else { + // Future calls can just reuse the same function. + writeChunk(destination, completeSegmentScript1Partial); } - } - - return false; -} - -var arrayFirstOpenBracket = stringToPrecomputedChunk('['); -var arraySubsequentOpenBracket = stringToPrecomputedChunk(',['); -var arrayInterstitial = stringToPrecomputedChunk(','); -var arrayCloseBracket = stringToPrecomputedChunk(']'); // This function writes a 2D array of strings to be embedded in javascript. -// E.g. -// [["JS_escaped_string1", "JS_escaped_string2"]] + } // Write function arguments, which are string literals -function writeStyleResourceDependenciesInJS(destination, boundaryResources) { - writeChunk(destination, arrayFirstOpenBracket); - var nextArrayOpenBrackChunk = arrayFirstOpenBracket; - boundaryResources.forEach(function (resource) { - if (resource.state & FlushedInPreamble) ; else if (resource.state & Flushed) { - // We only need to emit the href because this resource flushed in an earlier - // boundary already which encoded the attributes necessary to construct - // the resource instance on the client. - writeChunk(destination, nextArrayOpenBrackChunk); - writeStyleResourceDependencyHrefOnlyInJS(destination, resource.type === 'style' ? resource.props['data-href'] : resource.props.href); - writeChunk(destination, arrayCloseBracket); - nextArrayOpenBrackChunk = arraySubsequentOpenBracket; - } else if (resource.type === 'stylesheet') { - // We need to emit the whole resource for insertion on the client - writeChunk(destination, nextArrayOpenBrackChunk); - writeStyleResourceDependencyInJS(destination, resource.props.href, resource.props['data-precedence'], resource.props); - writeChunk(destination, arrayCloseBracket); - nextArrayOpenBrackChunk = arraySubsequentOpenBracket; - resource.state |= FlushedLate; - } - }); - writeChunk(destination, arrayCloseBracket); -} -/* Helper functions */ + writeChunk(destination, responseState.segmentPrefix); + var formattedID = stringToChunk(contentSegmentID.toString(16)); + writeChunk(destination, formattedID); -function writeStyleResourceDependencyHrefOnlyInJS(destination, href) { - // We should actually enforce this earlier when the resource is created but for - // now we make sure we are actually dealing with a string here. { - checkAttributeStringCoercion(href, 'href'); + writeChunk(destination, completeSegmentScript2); } - var coercedHref = '' + href; - writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedHref))); -} + writeChunk(destination, responseState.placeholderPrefix); + writeChunk(destination, formattedID); -function writeStyleResourceDependencyInJS(destination, href, precedence, props) { { - checkAttributeStringCoercion(href, 'href'); + return writeChunkAndReturn(destination, completeSegmentScriptEnd); } - - var coercedHref = '' + href; - sanitizeURL(coercedHref); - writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedHref))); +} +var completeBoundaryScript1Full = stringToPrecomputedChunk(completeBoundary + ';$RC("'); +var completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC("'); +var completeBoundaryWithStylesScript1FullBoth = stringToPrecomputedChunk(completeBoundary + ';' + completeBoundaryWithStyles + ';$RR("'); +var completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk(completeBoundaryWithStyles + ';$RR("'); +var completeBoundaryWithStylesScript1Partial = stringToPrecomputedChunk('$RR("'); +var completeBoundaryScript2 = stringToPrecomputedChunk('","'); +var completeBoundaryScript3a = stringToPrecomputedChunk('",'); +var completeBoundaryScript3b = stringToPrecomputedChunk('"'); +var completeBoundaryScriptEnd = stringToPrecomputedChunk(')</script>'); +var completeBoundaryData1 = stringToPrecomputedChunk('<template data-rci="" data-bid="'); +var completeBoundaryWithStylesData1 = stringToPrecomputedChunk('<template data-rri="" data-bid="'); +var completeBoundaryData2 = stringToPrecomputedChunk('" data-sid="'); +var completeBoundaryData3a = stringToPrecomputedChunk('" data-sty="'); +function writeCompletedBoundaryInstruction(destination, responseState, boundaryID, contentSegmentID, boundaryResources) { + var hasStyleDependencies; { - checkAttributeStringCoercion(precedence, 'precedence'); + hasStyleDependencies = hasStyleResourceDependencies(boundaryResources); } - var coercedPrecedence = '' + precedence; - writeChunk(destination, arrayInterstitial); - writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedPrecedence))); - - for (var propKey in props) { - if (hasOwnProperty.call(props, propKey)) { - var propValue = props[propKey]; + { + writeChunk(destination, responseState.startInlineScript); - if (propValue == null) { - continue; + if ( hasStyleDependencies) { + if (!responseState.sentCompleteBoundaryFunction) { + responseState.sentCompleteBoundaryFunction = true; + responseState.sentStyleInsertionFunction = true; + writeChunk(destination, clonePrecomputedChunk(completeBoundaryWithStylesScript1FullBoth)); + } else if (!responseState.sentStyleInsertionFunction) { + responseState.sentStyleInsertionFunction = true; + writeChunk(destination, completeBoundaryWithStylesScript1FullPartial); + } else { + writeChunk(destination, completeBoundaryWithStylesScript1Partial); } - - switch (propKey) { - case 'href': - case 'rel': - case 'precedence': - case 'data-precedence': - { - break; - } - - case 'children': - case 'dangerouslySetInnerHTML': - throw new Error('link' + " is a self-closing tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.'); - // eslint-disable-next-line-no-fallthrough - - default: - writeStyleResourceAttributeInJS(destination, propKey, propValue); - break; + } else { + if (!responseState.sentCompleteBoundaryFunction) { + responseState.sentCompleteBoundaryFunction = true; + writeChunk(destination, completeBoundaryScript1Full); + } else { + writeChunk(destination, completeBoundaryScript1Partial); } } } - return null; -} - -function writeStyleResourceAttributeInJS(destination, name, value) // not null or undefined -{ - var attributeName = name.toLowerCase(); - var attributeValue; - - switch (typeof value) { - case 'function': - case 'symbol': - return; - } - - switch (name) { - // Reserved names - case 'innerHTML': - case 'dangerouslySetInnerHTML': - case 'suppressContentEditableWarning': - case 'suppressHydrationWarning': - case 'style': - // Ignored - return; - // Attribute renames + if (boundaryID === null) { + throw new Error('An ID must have been assigned before we can complete the boundary.'); + } // Write function arguments, which are string and array literals - case 'className': - attributeName = 'class'; - break; - // Booleans - case 'hidden': - if (value === false) { - return; - } + var formattedContentID = stringToChunk(contentSegmentID.toString(16)); + writeChunk(destination, boundaryID); - attributeValue = ''; - break; - // Santized URLs + { + writeChunk(destination, completeBoundaryScript2); + } - case 'src': - case 'href': - { - { - checkAttributeStringCoercion(value, attributeName); - } + writeChunk(destination, responseState.segmentPrefix); + writeChunk(destination, formattedContentID); - attributeValue = '' + value; - sanitizeURL(attributeValue); - break; - } + if ( hasStyleDependencies) { + // Script and data writers must format this differently: + // - script writer emits an array literal, whose string elements are + // escaped for javascript e.g. ["A", "B"] + // - data writer emits a string literal, which is escaped as html + // e.g. ["A", "B"] + { + writeChunk(destination, completeBoundaryScript3a); // boundaryResources encodes an array literal - default: - { - if (!isAttributeNameSafe(name)) { - return; - } - } + writeStyleResourceDependenciesInJS(destination, boundaryResources); + } + } else { + { + writeChunk(destination, completeBoundaryScript3b); + } } - if ( // shouldIgnoreAttribute - // We have already filtered out null/undefined and reserved words. - name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) { - return; + { + return writeChunkAndReturn(destination, completeBoundaryScriptEnd); } +} +var clientRenderScript1Full = stringToPrecomputedChunk(clientRenderBoundary + ';$RX("'); +var clientRenderScript1Partial = stringToPrecomputedChunk('$RX("'); +var clientRenderScript1A = stringToPrecomputedChunk('"'); +var clientRenderErrorScriptArgInterstitial = stringToPrecomputedChunk(','); +var clientRenderScriptEnd = stringToPrecomputedChunk(')</script>'); +var clientRenderData1 = stringToPrecomputedChunk('<template data-rxi="" data-bid="'); +var clientRenderData2 = stringToPrecomputedChunk('" data-dgst="'); +var clientRenderData3 = stringToPrecomputedChunk('" data-msg="'); +var clientRenderData4 = stringToPrecomputedChunk('" data-stck="'); +function writeClientRenderBoundaryInstruction(destination, responseState, boundaryID, errorDigest, errorMessage, errorComponentStack) { { - checkAttributeStringCoercion(value, attributeName); - } + writeChunk(destination, responseState.startInlineScript); - attributeValue = '' + value; - writeChunk(destination, arrayInterstitial); - writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(attributeName))); - writeChunk(destination, arrayInterstitial); - writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(attributeValue))); -} // This function writes a 2D array of strings to be embedded in an attribute -/** - * Resources - */ + if (!responseState.sentClientRenderFunction) { + // The first time we write this, we'll need to include the full implementation. + responseState.sentClientRenderFunction = true; + writeChunk(destination, clientRenderScript1Full); + } else { + // Future calls can just reuse the same function. + writeChunk(destination, clientRenderScript1Partial); + } + } + if (boundaryID === null) { + throw new Error('An ID must have been assigned before we can complete the boundary.'); + } -var NoState -/* */ -= 0; // These tags indicate whether the Resource was flushed and in which phase - -var FlushedInPreamble -/* */ -= 1; -var FlushedLate -/* */ -= 2; -var Flushed -/* */ -= 3; // This tag indicates whether this Resource is blocked from flushing. -// This currently is only used with stylesheets that are blocked by a Boundary - -var Blocked -/* */ -= 4; // This tag indicates whether this Resource has been preloaded. -// This generally only makes sense for Resources other than PreloadResource - -var PreloadFlushed -/* */ -= 8; // Dev extensions. -// Stylesheets and Scripts rendered with jsx -// Preloads, Stylesheets, and Scripts from ReactDOM.preload or ReactDOM.preinit -// Preloads created for normal components we rendered but know we can preload early such as -// sync Scripts and stylesheets without precedence or with onLoad/onError handlers -// @TODO add bootstrap script to implicit preloads + writeChunk(destination, boundaryID); -function createResources() { - return { - // persistent - preloadsMap: new Map(), - stylesMap: new Map(), - scriptsMap: new Map(), - // cleared on flush - fontPreloads: new Set(), - // usedImagePreloads: new Set(), - precedences: new Map(), - usedStylesheets: new Set(), - scripts: new Set(), - usedScripts: new Set(), - explicitStylesheetPreloads: new Set(), - // explicitImagePreloads: new Set(), - explicitScriptPreloads: new Set(), - explicitOtherPreloads: new Set(), - // like a module global for currently rendering boundary - boundaryResources: null - }; -} -function createBoundaryResources() { - return new Set(); -} -function setCurrentlyRenderingBoundaryResourcesTarget(resources, boundaryResources) { - resources.boundaryResources = boundaryResources; -} + { + // " needs to be inserted for scripts, since ArgInterstitual does not contain + // leading or trailing quotes + writeChunk(destination, clientRenderScript1A); + } -function getResourceKey(as, href) { - return "[" + as + "]" + href; -} + if (errorDigest || errorMessage || errorComponentStack) { + { + // ,"JSONString" + writeChunk(destination, clientRenderErrorScriptArgInterstitial); + writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorDigest || ''))); + } + } -function preload(href, options) { - if (!currentResources) { - // While we expect that preload calls are primarily going to be observed - // during render because effects and events don't run on the server it is - // still possible that these get called in module scope. This is valid on - // the client since there is still a document to interact with but on the - // server we need a request to associate the call to. Because of this we - // simply return and do not warn. - return; + if (errorMessage || errorComponentStack) { + { + // ,"JSONString" + writeChunk(destination, clientRenderErrorScriptArgInterstitial); + writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorMessage || ''))); + } } - var resources = currentResources; + if (errorComponentStack) { + // ,"JSONString" + { + writeChunk(destination, clientRenderErrorScriptArgInterstitial); + writeChunk(destination, stringToChunk(escapeJSStringsForInstructionScripts(errorComponentStack))); + } + } { - if (typeof href !== 'string' || !href) { - error('ReactDOM.preload(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.', getValueDescriptorExpectingObjectForWarning(href)); - } else if (options == null || typeof options !== 'object') { - error('ReactDOM.preload(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preloaded but encountered %s instead.', getValueDescriptorExpectingEnumForWarning(options)); - } else if (typeof options.as !== 'string') { - error('ReactDOM.preload(): Expected the `as` property in the `options` argument (second) to contain a string value describing the type of resource to be preloaded but encountered %s instead. Values that are valid in for the `as` attribute of a `<link rel="preload" as="..." />` tag are valid here.', getValueDescriptorExpectingEnumForWarning(options.as)); - } + // ></script> + return writeChunkAndReturn(destination, clientRenderScriptEnd); } +} +var regexForJSStringsInInstructionScripts = /[<\u2028\u2029]/g; - if (typeof href === 'string' && href && typeof options === 'object' && options !== null && typeof options.as === 'string') { - var as = options.as; - var key = getResourceKey(as, href); - var resource = resources.preloadsMap.get(key); +function escapeJSStringsForInstructionScripts(input) { + var escaped = JSON.stringify(input); + return escaped.replace(regexForJSStringsInInstructionScripts, function (match) { + switch (match) { + // santizing breaking out of strings and script tags + case '<': + return "\\u003c"; - { - var devResource = getAsResourceDEV(resource); + case "\u2028": + return "\\u2028"; - if (devResource) { - switch (devResource.__provenance) { - case 'preload': - { - var differenceDescription = describeDifferencesForPreloads(options, devResource.__originalOptions); + case "\u2029": + return "\\u2029"; - if (differenceDescription) { - error('ReactDOM.preload(): The options provided conflict with another call to `ReactDOM.preload("%s", { as: "%s", ...})`.' + ' React will always use the options it first encounters when preloading a resource for a given `href` and `as` type, and any later options will be ignored if different.' + ' Try updating all calls to `ReactDOM.preload()` with the same `href` and `as` type to use the same options, or eliminate one of the calls.%s', href, as, differenceDescription); - } + default: + { + // eslint-disable-next-line react-internal/prod-error-codes + throw new Error('escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React'); + } + } + }); +} - break; - } +var regexForJSStringsInScripts = /[&><\u2028\u2029]/g; - case 'implicit': - { - var _differenceDescription3 = describeDifferencesForPreloadOverImplicitPreload(options, devResource.__impliedProps); +function escapeJSObjectForInstructionScripts(input) { + var escaped = JSON.stringify(input); + return escaped.replace(regexForJSStringsInScripts, function (match) { + switch (match) { + // santizing breaking out of strings and script tags + case '&': + return "\\u0026"; - if (_differenceDescription3) { - var elementDescription = as === 'style' ? '<link rel="stylesheet" ... />' : as === 'script' ? '<script ... />' : null; + case '>': + return "\\u003e"; - if (elementDescription) { - error('ReactDOM.preload(): For `href` "%s", The options provided conflict with props on a matching %s element. When the preload' + ' options disagree with the underlying resource it usually means the browser will not be able to use the preload when the resource' + ' is fetched, negating any benefit the preload would provide. React will preload the resource using props derived from the resource instead' + ' and ignore the options provided to the `ReactDOM.preload()` call. In general, preloading is useful when you expect to' + ' render a resource soon but have not yet done so. In this case since the underlying resource was already rendered the preload call' + ' may be extraneous. Try removing the call, otherwise try adjusting both the props on the %s and the options' + ' passed to `ReactDOM.preload()` to agree.%s', href, elementDescription, elementDescription, _differenceDescription3); - } - } + case '<': + return "\\u003c"; - break; - } + case "\u2028": + return "\\u2028"; + + case "\u2029": + return "\\u2029"; + + default: + { + // eslint-disable-next-line react-internal/prod-error-codes + throw new Error('escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React'); } - } } + }); +} - if (!resource) { - resource = { - type: 'preload', - chunks: [], - state: NoState, - props: preloadPropsFromPreloadOptions(href, as, options) - }; - resources.preloadsMap.set(key, resource); +var precedencePlaceholderStart = stringToPrecomputedChunk('<style data-precedence="'); +var precedencePlaceholderEnd = stringToPrecomputedChunk('"></style>'); +function writeInitialResources(destination, resources, responseState, willFlushAllSegments) { - { - markAsImperativeResourceDEV(resource, 'preload', href, options, resource.props); - } - pushLinkImpl(resource.chunks, resource.props); + function flushLinkResource(resource) { + if (!resource.flushed) { + pushLinkImpl(target, resource.props, responseState); + resource.flushed = true; } + } - switch (as) { - case 'font': - { - resources.fontPreloads.add(resource); - break; - } + var target = []; + var charset = resources.charset, + bases = resources.bases, + preconnects = resources.preconnects, + fontPreloads = resources.fontPreloads, + precedences = resources.precedences, + usedStylePreloads = resources.usedStylePreloads, + scripts = resources.scripts, + usedScriptPreloads = resources.usedScriptPreloads, + explicitStylePreloads = resources.explicitStylePreloads, + explicitScriptPreloads = resources.explicitScriptPreloads, + headResources = resources.headResources; - case 'style': + if (charset) { + pushSelfClosing(target, charset.props, 'meta', responseState); + charset.flushed = true; + resources.charset = null; + } + + bases.forEach(function (r) { + pushSelfClosing(target, r.props, 'base', responseState); + r.flushed = true; + }); + bases.clear(); + preconnects.forEach(function (r) { + // font preload Resources should not already be flushed so we elide this check + pushLinkImpl(target, r.props, responseState); + r.flushed = true; + }); + preconnects.clear(); + fontPreloads.forEach(function (r) { + // font preload Resources should not already be flushed so we elide this check + pushLinkImpl(target, r.props, responseState); + r.flushed = true; + }); + fontPreloads.clear(); // Flush stylesheets first by earliest precedence + + precedences.forEach(function (p, precedence) { + if (p.size) { + p.forEach(function (r) { + // resources should not already be flushed so we elide this check + pushLinkImpl(target, r.props, responseState); + r.flushed = true; + r.inShell = true; + r.hint.flushed = true; + }); + p.clear(); + } else { + target.push(precedencePlaceholderStart, stringToChunk(escapeTextForBrowser(precedence)), precedencePlaceholderEnd); + } + }); + usedStylePreloads.forEach(flushLinkResource); + usedStylePreloads.clear(); + scripts.forEach(function (r) { + // should never be flushed already + pushScriptImpl(target, r.props, responseState); + r.flushed = true; + r.hint.flushed = true; + }); + scripts.clear(); + usedScriptPreloads.forEach(flushLinkResource); + usedScriptPreloads.clear(); + explicitStylePreloads.forEach(flushLinkResource); + explicitStylePreloads.clear(); + explicitScriptPreloads.forEach(flushLinkResource); + explicitScriptPreloads.clear(); + headResources.forEach(function (r) { + switch (r.type) { + case 'title': { - resources.explicitStylesheetPreloads.add(resource); + pushTitleImpl(target, r.props, responseState); break; } - case 'script': + case 'meta': { - resources.explicitScriptPreloads.add(resource); + pushSelfClosing(target, r.props, 'meta', responseState); break; } - default: + case 'link': { - resources.explicitOtherPreloads.add(resource); + pushLinkImpl(target, r.props, responseState); + break; } } - } -} -function preinit(href, options) { - if (!currentResources) { - // While we expect that preinit calls are primarily going to be observed - // during render because effects and events don't run on the server it is - // still possible that these get called in module scope. This is valid on - // the client since there is still a document to interact with but on the - // server we need a request to associate the call to. Because of this we - // simply return and do not warn. - return; - } - preinitImpl(currentResources, href, options); -} // On the server, preinit may be called outside of render when sending an -// external SSR runtime as part of the initial resources payload. Since this -// is an internal React call, we do not need to use the resources stack. + r.flushed = true; + }); + headResources.clear(); + var i; + var r = true; -function preinitImpl(resources, href, options) { - { - if (typeof href !== 'string' || !href) { - error('ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.', getValueDescriptorExpectingObjectForWarning(href)); - } else if (options == null || typeof options !== 'object') { - error('ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.', getValueDescriptorExpectingEnumForWarning(options)); - } else if (options.as !== 'style' && options.as !== 'script') { - error('ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".', getValueDescriptorExpectingEnumForWarning(options.as)); - } + for (i = 0; i < target.length - 1; i++) { + writeChunk(destination, target[i]); } - if (typeof href === 'string' && href && typeof options === 'object' && options !== null) { - var as = options.as; + if (i < target.length) { + r = writeChunkAndReturn(destination, target[i]); + } - switch (as) { - case 'style': + return r; +} +function writeImmediateResources(destination, resources, responseState) { + // $FlowFixMe[missing-local-annot] + function flushLinkResource(resource) { + if (!resource.flushed) { + pushLinkImpl(target, resource.props, responseState); + resource.flushed = true; + } + } + + var target = []; + var charset = resources.charset, + preconnects = resources.preconnects, + fontPreloads = resources.fontPreloads, + usedStylePreloads = resources.usedStylePreloads, + scripts = resources.scripts, + usedScriptPreloads = resources.usedScriptPreloads, + explicitStylePreloads = resources.explicitStylePreloads, + explicitScriptPreloads = resources.explicitScriptPreloads, + headResources = resources.headResources; + + if (charset) { + pushSelfClosing(target, charset.props, 'meta', responseState); + charset.flushed = true; + resources.charset = null; + } + + preconnects.forEach(function (r) { + // font preload Resources should not already be flushed so we elide this check + pushLinkImpl(target, r.props, responseState); + r.flushed = true; + }); + preconnects.clear(); + fontPreloads.forEach(function (r) { + // font preload Resources should not already be flushed so we elide this check + pushLinkImpl(target, r.props, responseState); + r.flushed = true; + }); + fontPreloads.clear(); + usedStylePreloads.forEach(flushLinkResource); + usedStylePreloads.clear(); + scripts.forEach(function (r) { + // should never be flushed already + pushStartGenericElement(target, r.props, 'script', responseState); + pushEndInstance(target, target, 'script', r.props); + r.flushed = true; + r.hint.flushed = true; + }); + scripts.clear(); + usedScriptPreloads.forEach(flushLinkResource); + usedScriptPreloads.clear(); + explicitStylePreloads.forEach(flushLinkResource); + explicitStylePreloads.clear(); + explicitScriptPreloads.forEach(flushLinkResource); + explicitScriptPreloads.clear(); + headResources.forEach(function (r) { + switch (r.type) { + case 'title': { - var key = getResourceKey(as, href); - var resource = resources.stylesMap.get(key); - var precedence = options.precedence || 'default'; - - { - var devResource = getAsResourceDEV(resource); - - if (devResource) { - var resourceProps = stylesheetPropsFromPreinitOptions(href, precedence, options); - - var propsEquivalent = assign({}, resourceProps, _defineProperty({ - precedence: options.precedence - }, 'data-precedence', null)); - - switch (devResource.__provenance) { - case 'rendered': - { - var differenceDescription = describeDifferencesForPreinitOverStylesheet( // Diff the props from the JSX element, not the derived resource props - propsEquivalent, devResource.__originalProps); - - if (differenceDescription) { - error('ReactDOM.preinit(): For `href` "%s", the options provided conflict with props found on a <link rel="stylesheet" precedence="%s" href="%s" .../> that was already rendered.' + ' React will always use the props or options it first encounters for a hoistable stylesheet for a given `href` and any later props or options will be ignored if different.' + ' Generally, ReactDOM.preinit() is useful when you are not yet rendering a stylesheet but you anticipate it will be used soon.' + ' In this case the stylesheet was already rendered so preinitializing it does not provide any additional benefit.' + ' To resolve, try making the props and options agree between the <link rel="stylesheet" .../> and the `ReactDOM.preinit()` call or' + ' remove the `ReactDOM.preinit()` call.%s', href, devResource.__originalProps.precedence, href, differenceDescription); - } - - break; - } - - case 'preinit': - { - var _differenceDescription4 = describeDifferencesForPreinits( // Diff the props from the JSX element, not the derived resource props - propsEquivalent, devResource.__propsEquivalent); - - if (_differenceDescription4) { - error('ReactDOM.preinit(): For `href` "%s", the options provided conflict with another call to `ReactDOM.preinit("%s", { as: "style", ... })`.' + ' React will always use the options it first encounters when preinitializing a hoistable stylesheet for a given `href` and any later options will be ignored if different.' + ' Try updating all calls to `ReactDOM.preinit()` for a given `href` to use the same options, or only call `ReactDOM.preinit()` once per `href`.%s', href, href, _differenceDescription4); - } - - break; - } - } - } - } - - if (!resource) { - resource = { - type: 'stylesheet', - chunks: [], - state: NoState, - props: stylesheetPropsFromPreinitOptions(href, precedence, options) - }; - resources.stylesMap.set(key, resource); - - { - markAsImperativeResourceDEV(resource, 'preinit', href, options, assign({}, resource.props, _defineProperty({ - precedence: precedence - }, 'data-precedence', undefined))); - } - - var precedenceSet = resources.precedences.get(precedence); - - if (!precedenceSet) { - precedenceSet = new Set(); - resources.precedences.set(precedence, precedenceSet); - } - - precedenceSet.add(resource); - } - - return; + pushTitleImpl(target, r.props, responseState); + break; } - case 'script': + case 'meta': { - var src = href; - - var _key = getResourceKey(as, src); - - var _resource3 = resources.scriptsMap.get(_key); - - { - var _devResource = getAsResourceDEV(_resource3); + pushSelfClosing(target, r.props, 'meta', responseState); + break; + } - if (_devResource) { - var _propsEquivalent = scriptPropsFromPreinitOptions(src, options); + case 'link': + { + pushLinkImpl(target, r.props, responseState); + break; + } + } - switch (_devResource.__provenance) { - case 'rendered': - { - var _differenceDescription5 = describeDifferencesForPreinitOverScript( // Diff the props from the JSX element, not the derived resource props - _propsEquivalent, _devResource.__originalProps); + r.flushed = true; + }); + headResources.clear(); + var i; + var r = true; - if (_differenceDescription5) { - error('ReactDOM.preinit(): For `href` "%s", the options provided conflict with props found on a <script async={true} src="%s" .../> that was already rendered.' + ' React will always use the props or options it first encounters for a hoistable script for a given `href` and any later props or options will be ignored if different.' + ' Generally, ReactDOM.preinit() is useful when you are not yet rendering a script but you anticipate it will be used soon and want to go beyond preloading it and have it' + ' execute early. In this case the script was already rendered so preinitializing it does not provide any additional benefit.' + ' To resolve, try making the props and options agree between the <script .../> and the `ReactDOM.preinit()` call or remove the `ReactDOM.preinit()` call.%s', href, href, _differenceDescription5); - } + for (i = 0; i < target.length - 1; i++) { + writeChunk(destination, target[i]); + } - break; - } + if (i < target.length) { + r = writeChunkAndReturn(destination, target[i]); + } - case 'preinit': - { - var _differenceDescription6 = describeDifferencesForPreinits( // Diff the props from the JSX element, not the derived resource props - _propsEquivalent, _devResource.__propsEquivalent); + return r; +} - if (_differenceDescription6) { - error('ReactDOM.preinit(): For `href` "%s", the options provided conflict with another call to `ReactDOM.preinit("%s", { as: "script", ... })`.' + ' React will always use the options it first encounters when preinitializing a hoistable script for a given `href` and any later options will be ignored if different.' + ' Try updating all calls to `ReactDOM.preinit()` for a given `href` to use the same options, or only call `ReactDOM.preinit()` once per `href`.%s', href, href, _differenceDescription6); - } +function hasStyleResourceDependencies(boundaryResources) { + var iter = boundaryResources.values(); // At the moment boundaries only accumulate style resources + // so we assume the type is correct and don't check it - break; - } - } - } - } + while (true) { + var _iter$next = iter.next(), + resource = _iter$next.value; - if (!_resource3) { - _resource3 = { - type: 'script', - chunks: [], - state: NoState, - props: null - }; - resources.scriptsMap.set(_key, _resource3); + if (!resource) break; // If every style Resource flushed in the shell we do not need to send + // any dependencies - var _resourceProps = scriptPropsFromPreinitOptions(src, options); + if (!resource.inShell) { + return true; + } + } - { - markAsImperativeResourceDEV(_resource3, 'preinit', href, options, _resourceProps); - } + return false; +} - resources.scripts.add(_resource3); - pushScriptImpl(_resource3.chunks, _resourceProps); - } +var arrayFirstOpenBracket = stringToPrecomputedChunk('['); +var arraySubsequentOpenBracket = stringToPrecomputedChunk(',['); +var arrayInterstitial = stringToPrecomputedChunk(','); +var arrayCloseBracket = stringToPrecomputedChunk(']'); // This function writes a 2D array of strings to be embedded in javascript. +// E.g. +// [["JS_escaped_string1", "JS_escaped_string2"]] - return; - } +function writeStyleResourceDependenciesInJS(destination, boundaryResources) { + writeChunk(destination, arrayFirstOpenBracket); + var nextArrayOpenBrackChunk = arrayFirstOpenBracket; + boundaryResources.forEach(function (resource) { + if (resource.inShell) ; else if (resource.flushed) { + writeChunk(destination, nextArrayOpenBrackChunk); + writeStyleResourceDependencyHrefOnlyInJS(destination, resource.href); + writeChunk(destination, arrayCloseBracket); + nextArrayOpenBrackChunk = arraySubsequentOpenBracket; + } else { + writeChunk(destination, nextArrayOpenBrackChunk); + writeStyleResourceDependencyInJS(destination, resource.href, resource.precedence, resource.props); + writeChunk(destination, arrayCloseBracket); + nextArrayOpenBrackChunk = arraySubsequentOpenBracket; + resource.flushed = true; + resource.hint.flushed = true; } - } + }); + writeChunk(destination, arrayCloseBracket); } +/* Helper functions */ -function preloadPropsFromPreloadOptions(href, as, options) { - return { - rel: 'preload', - as: as, - href: href, - crossOrigin: as === 'font' ? '' : options.crossOrigin, - integrity: options.integrity - }; -} -function preloadAsStylePropsFromProps(href, props) { - return { - rel: 'preload', - as: 'style', - href: href, - crossOrigin: props.crossOrigin, - integrity: props.integrity, - media: props.media, - hrefLang: props.hrefLang, - referrerPolicy: props.referrerPolicy - }; -} +function writeStyleResourceDependencyHrefOnlyInJS(destination, href) { + // We should actually enforce this earlier when the resource is created but for + // now we make sure we are actually dealing with a string here. + { + checkAttributeStringCoercion(href, 'href'); + } -function preloadAsScriptPropsFromProps(href, props) { - return { - rel: 'preload', - as: 'script', - href: href, - crossOrigin: props.crossOrigin, - integrity: props.integrity, - referrerPolicy: props.referrerPolicy - }; + var coercedHref = '' + href; + writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedHref))); } -function stylesheetPropsFromPreinitOptions(href, precedence, options) { - return { - rel: 'stylesheet', - href: href, - 'data-precedence': precedence, - crossOrigin: options.crossOrigin, - integrity: options.integrity - }; -} +function writeStyleResourceDependencyInJS(destination, href, precedence, props) { + { + checkAttributeStringCoercion(href, 'href'); + } -function stylesheetPropsFromRawProps(rawProps) { - return assign({}, rawProps, { - 'data-precedence': rawProps.precedence, - precedence: null - }); -} + var coercedHref = '' + href; + sanitizeURL(coercedHref); + writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedHref))); -function adoptPreloadPropsForStylesheetProps(resourceProps, preloadProps) { - if (resourceProps.crossOrigin == null) resourceProps.crossOrigin = preloadProps.crossOrigin; - if (resourceProps.integrity == null) resourceProps.integrity = preloadProps.integrity; -} + { + checkAttributeStringCoercion(precedence, 'precedence'); + } -function styleTagPropsFromRawProps(rawProps) { - return assign({}, rawProps, { - 'data-precedence': rawProps.precedence, - precedence: null, - 'data-href': rawProps.href, - href: null - }); -} + var coercedPrecedence = '' + precedence; + writeChunk(destination, arrayInterstitial); + writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(coercedPrecedence))); -function scriptPropsFromPreinitOptions(src, options) { - return { - src: src, - async: true, - crossOrigin: options.crossOrigin, - integrity: options.integrity - }; -} + for (var propKey in props) { + if (hasOwnProperty.call(props, propKey)) { + var propValue = props[propKey]; -function adoptPreloadPropsForScriptProps(resourceProps, preloadProps) { - if (resourceProps.crossOrigin == null) resourceProps.crossOrigin = preloadProps.crossOrigin; - if (resourceProps.integrity == null) resourceProps.integrity = preloadProps.integrity; -} + if (propValue == null) { + continue; + } -function hoistStylesheetResource(resource) { - this.add(resource); -} + switch (propKey) { + case 'href': + case 'rel': + case 'precedence': + case 'data-precedence': + { + break; + } -function hoistResources(resources, source) { - var currentBoundaryResources = resources.boundaryResources; + case 'children': + case 'dangerouslySetInnerHTML': + throw new Error('link' + " is a self-closing tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.'); + // eslint-disable-next-line-no-fallthrough - if (currentBoundaryResources) { - source.forEach(hoistStylesheetResource, currentBoundaryResources); - source.clear(); + default: + writeStyleResourceAttributeInJS(destination, propKey, propValue); + break; + } + } } -} - -function unblockStylesheet(resource) { - resource.state &= ~Blocked; -} -function hoistResourcesToRoot(resources, boundaryResources) { - boundaryResources.forEach(unblockStylesheet); - boundaryResources.clear(); + return null; } -function markAsRenderedResourceDEV(resource, originalProps) { - { - var devResource = resource; - - if (typeof devResource.__provenance === 'string') { - error('Resource already marked for DEV type. This is a bug in React.'); - } +function writeStyleResourceAttributeInJS(destination, name, value) // not null or undefined +{ + var attributeName = name.toLowerCase(); + var attributeValue; - devResource.__provenance = 'rendered'; - devResource.__originalProps = originalProps; + switch (typeof value) { + case 'function': + case 'symbol': + return; } -} -function markAsImperativeResourceDEV(resource, provenance, originalHref, originalOptions, propsEquivalent) { - { - var devResource = resource; + switch (name) { + // Reserved names + case 'innerHTML': + case 'dangerouslySetInnerHTML': + case 'suppressContentEditableWarning': + case 'suppressHydrationWarning': + case 'style': + // Ignored + return; + // Attribute renames - if (typeof devResource.__provenance === 'string') { - error('Resource already marked for DEV type. This is a bug in React.'); - } + case 'className': + attributeName = 'class'; + break; + // Booleans - devResource.__provenance = provenance; - devResource.__originalHref = originalHref; - devResource.__originalOptions = originalOptions; - devResource.__propsEquivalent = propsEquivalent; - } -} + case 'hidden': + if (value === false) { + return; + } -function markAsImplicitResourceDEV(resource, underlyingProps, impliedProps) { - { - var devResource = resource; + attributeValue = ''; + break; + // Santized URLs - if (typeof devResource.__provenance === 'string') { - error('Resource already marked for DEV type. This is a bug in React.'); - } + case 'src': + case 'href': + { + { + checkAttributeStringCoercion(value, attributeName); + } - devResource.__provenance = 'implicit'; - devResource.__underlyingProps = underlyingProps; - devResource.__impliedProps = impliedProps; - } -} + attributeValue = '' + value; + sanitizeURL(attributeValue); + break; + } -function getAsResourceDEV(resource) { - { - if (resource) { - if (typeof resource.__provenance === 'string') { - return resource; + default: + { + if (!isAttributeNameSafe(name)) { + return; + } } + } - error('Resource was not marked for DEV type. This is a bug in React.'); - } + if ( // shouldIgnoreAttribute + // We have already filtered out null/undefined and reserved words. + name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) { + return; + } - return null; + { + checkAttributeStringCoercion(value, attributeName); } -} + + attributeValue = '' + value; + writeChunk(destination, arrayInterstitial); + writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(attributeName))); + writeChunk(destination, arrayInterstitial); + writeChunk(destination, stringToChunk(escapeJSObjectForInstructionScripts(attributeValue))); +} // This function writes a 2D array of strings to be embedded in an attribute // ATTENTION // When adding new symbols to this file, @@ -7714,6 +7506,8 @@ function createRequest(children, responseState, rootFormatContext, progressiveCh clientRenderedBoundaries: [], completedBoundaries: [], partialBoundaries: [], + preamble: [], + postamble: [], onError: onError === undefined ? defaultErrorHandler : onError, onAllReady: onAllReady === undefined ? noop$2 : onAllReady, onShellReady: onShellReady === undefined ? noop$2 : onShellReady, @@ -8017,7 +7811,7 @@ function hoistCompletedBoundaryResources(request, completedBoundary) { function renderHostElement(request, task, type, props) { pushBuiltInComponentStackInDEV(task, type); var segment = task.blockedSegment; - var children = pushStartInstance(segment.chunks, type, props, request.resources, request.responseState, segment.formatContext, segment.lastPushedText); + var children = pushStartInstance(segment.chunks, request.preamble, type, props, request.responseState, segment.formatContext, segment.lastPushedText); segment.lastPushedText = false; var prevContext = segment.formatContext; segment.formatContext = getChildFormatContext(prevContext, type, props); // We use the non-destructive form because if something suspends, we still @@ -8027,7 +7821,7 @@ function renderHostElement(request, task, type, props) { // the correct context. Therefore this is not in a finally. segment.formatContext = prevContext; - pushEndInstance(segment.chunks, type, props, request.responseState, prevContext); + pushEndInstance(segment.chunks, request.postamble, type); segment.lastPushedText = false; popComponentStackInDEV(task); } @@ -9182,6 +8976,14 @@ function flushSegment(request, destination, segment) { } } +function flushInitialResources(destination, resources, responseState, willFlushAllSegments) { + writeInitialResources(destination, resources, responseState); +} + +function flushImmediateResources(destination, request) { + writeImmediateResources(destination, request.resources, request.responseState); +} + function flushClientRenderedBoundary(request, destination, boundary) { return writeClientRenderBoundaryInstruction(destination, request.responseState, boundary.id, boundary.errorDigest, boundary.errorMessage, boundary.errorComponentStack); } @@ -9206,11 +9008,6 @@ function flushCompletedBoundary(request, destination, boundary) { } completedSegments.length = 0; - - { - writeResourcesForBoundary(destination, boundary.resources); - } - return writeCompletedBoundaryInstruction(destination, request.responseState, boundary.id, boundary.rootSegmentID, boundary.resources); } @@ -9235,14 +9032,7 @@ function flushPartialBoundary(request, destination, boundary) { } completedSegments.splice(0, i); - - { - // The way this is structured we only write resources for partial boundaries - // if there is no backpressure. Later before we complete the boundary we - // will write resources regardless of backpressure before we emit the - // completion instruction - return writeResourcesForBoundary(destination, boundary.resources); - } + return true; } function flushPartiallyCompletedSegment(request, destination, boundary, segment) { @@ -9283,7 +9073,14 @@ function flushCompletedQueues(request, destination) { if (completedRootSegment !== null) { if (request.pendingRootTasks === 0) { if (enableFloat) { - writePreamble(destination, request.resources, request.responseState, request.allPendingTasks === 0); + var preamble = request.preamble; + + for (i = 0; i < preamble.length; i++) { + // we expect the preamble to be tiny and will ignore backpressure + writeChunk(destination, preamble[i]); + } + + flushInitialResources(destination, request.resources, request.responseState, request.allPendingTasks === 0); } flushSegment(request, destination, completedRootSegment); @@ -9294,7 +9091,7 @@ function flushCompletedQueues(request, destination) { return; } } else if (enableFloat) { - writeHoistables(destination, request.resources, request.responseState); + flushImmediateResources(destination, request); } // We emit client rendering instructions for already emitted boundaries first. // This is so that we can signal to the client to start client rendering them as // soon as possible. @@ -9374,7 +9171,11 @@ function flushCompletedQueues(request, destination) { // either they have pending task or they're complete. ) { { - writePostamble(destination, request.responseState); + var postamble = request.postamble; + + for (var _i = 0; _i < postamble.length; _i++) { + writeChunk(destination, postamble[_i]); + } } completeWriting(destination); diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.production.min.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.production.min.js index 6a608f27bc8d2..d1ae9c2311576 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.production.min.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.production.min.js @@ -7,131 +7,131 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -'use strict';var aa=require("util"),ba=require("async_hooks"),ca=require("react"),da=require("react-dom");function ea(a){"function"===typeof a.flush&&a.flush()}new ba.AsyncLocalStorage;var k=null,l=0,fa=!0; -function q(a,b){if("string"===typeof b){if(0!==b.length)if(2048<3*b.length)0<l&&(r(a,k.subarray(0,l)),k=new Uint8Array(2048),l=0),r(a,ha.encode(b));else{var c=k;0<l&&(c=k.subarray(l));c=ha.encodeInto(b,c);var d=c.read;l+=c.written;d<b.length&&(r(a,k),k=new Uint8Array(2048),l=ha.encodeInto(b.slice(d),k).written);2048===l&&(r(a,k),k=new Uint8Array(2048),l=0)}}else 0!==b.byteLength&&(2048<b.byteLength?(0<l&&(r(a,k.subarray(0,l)),k=new Uint8Array(2048),l=0),r(a,b)):(c=k.length-l,c<b.byteLength&&(0=== -c?r(a,k):(k.set(b.subarray(0,c),l),l+=c,r(a,k),b=b.subarray(c)),k=new Uint8Array(2048),l=0),k.set(b,l),l+=b.byteLength,2048===l&&(r(a,k),k=new Uint8Array(2048),l=0)))}function r(a,b){a=a.write(b);fa=fa&&a}function t(a,b){q(a,b);return fa}function ia(a){k&&0<l&&a.write(k.subarray(0,l));k=null;l=0;fa=!0}var ha=new aa.TextEncoder;function u(a){return ha.encode(a)} -var w=Object.assign,x=Object.prototype.hasOwnProperty,ja=/^[: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][: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\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ka={},la={}; -function ma(a){if(x.call(la,a))return!0;if(x.call(ka,a))return!1;if(ja.test(a))return la[a]=!0;ka[a]=!0;return!1}function y(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var z={}; -"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){z[a]=new y(a,0,!1,a,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];z[b]=new y(b,1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){z[a]=new y(a,2,!1,a.toLowerCase(),null,!1,!1)}); -["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){z[a]=new y(a,2,!1,a,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){z[a]=new y(a,3,!1,a.toLowerCase(),null,!1,!1)}); -["checked","multiple","muted","selected"].forEach(function(a){z[a]=new y(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){z[a]=new y(a,4,!1,a,null,!1,!1)});["cols","rows","size","span"].forEach(function(a){z[a]=new y(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){z[a]=new y(a,5,!1,a.toLowerCase(),null,!1,!1)});var oa=/[\-:]([a-z])/g;function pa(a){return a[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 transform-origin 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".split(" ").forEach(function(a){var b=a.replace(oa, -pa);z[b]=new y(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(oa,pa);z[b]=new y(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(oa,pa);z[b]=new y(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){z[a]=new y(a,1,!1,a.toLowerCase(),null,!1,!1)}); -z.xlinkHref=new y("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){z[a]=new y(a,1,!1,a.toLowerCase(),null,!0,!0)}); -var qa={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,tabSize:!0,widows:!0,zIndex:!0, -zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ra=["Webkit","ms","Moz","O"];Object.keys(qa).forEach(function(a){ra.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);qa[b]=qa[a]})});var sa=/["'&<>]/; -function B(a){if("boolean"===typeof a||"number"===typeof a)return""+a;a=""+a;var b=sa.exec(a);if(b){var c="",d,e=0;for(d=b.index;d<a.length;d++){switch(a.charCodeAt(d)){case 34:b=""";break;case 38:b="&";break;case 39:b="'";break;case 60:b="<";break;case 62:b=">";break;default:continue}e!==d&&(c+=a.substring(e,d));e=d+1;c+=b}a=e!==d?c+a.substring(e,d):c}return a} -var ta=/([A-Z])/g,ua=/^ms-/,va=Array.isArray,wa=da.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Dispatcher,za={preload:xa,preinit:ya},C=null,Aa=[];u('"></template>');var Ba=u("<script>"),Ca=u("\x3c/script>"),Da=u('<script src="'),Ea=u('<script type="module" src="'),Fa=u('" integrity="'),Ga=u('" async="">\x3c/script>'),Ha=/(<\/|<)(s)(cript)/gi;function Ia(a,b,c,d){return""+b+("s"===c?"\\u0073":"\\u0053")+d}function D(a,b,c){return{insertionMode:a,selectedValue:b,noscriptTagInScope:c}} -function Ja(a,b,c){switch(b){case "noscript":return D(2,null,!0);case "select":return D(2,null!=c.value?c.value:c.defaultValue,a.noscriptTagInScope);case "svg":return D(3,null,a.noscriptTagInScope);case "math":return D(4,null,a.noscriptTagInScope);case "foreignObject":return D(2,null,a.noscriptTagInScope);case "table":return D(5,null,a.noscriptTagInScope);case "thead":case "tbody":case "tfoot":return D(6,null,a.noscriptTagInScope);case "colgroup":return D(8,null,a.noscriptTagInScope);case "tr":return D(7, -null,a.noscriptTagInScope)}return 5<=a.insertionMode?D(2,null,a.noscriptTagInScope):0===a.insertionMode?"html"===b?D(1,null,!1):D(2,null,!1):1===a.insertionMode?D(2,null,!1):a}var E=u("\x3c!-- --\x3e");function Ka(a,b,c,d){if(""===b)return d;d&&a.push(E);a.push(B(b));return!0}var La=new Map,Ma=u(' style="'),Na=u(":"),Oa=u(";"); -function Pa(a,b){if("object"!==typeof b)throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");var c=!0,d;for(d in b)if(x.call(b,d)){var e=b[d];if(null!=e&&"boolean"!==typeof e&&""!==e){if(0===d.indexOf("--")){var f=B(d);e=B((""+e).trim())}else{f=d;var g=La.get(f);void 0!==g?f=g:(g=u(B(f.replace(ta,"-$1").toLowerCase().replace(ua,"-ms-"))),La.set(f,g),f=g);e="number"===typeof e?0===e||x.call(qa, -d)?""+e:e+"px":B((""+e).trim())}c?(c=!1,a.push(Ma,f,Na,e)):a.push(Oa,f,Na,e)}}c||a.push(F)}var G=u(" "),Qa=u('="'),F=u('"'),Ra=u('=""'); -function J(a,b,c){switch(b){case "style":Pa(a,c);return;case "defaultValue":case "defaultChecked":case "innerHTML":case "suppressContentEditableWarning":case "suppressHydrationWarning":return}if(!(2<b.length)||"o"!==b[0]&&"O"!==b[0]||"n"!==b[1]&&"N"!==b[1]){var d=z.hasOwnProperty(b)?z[b]:null;if(null!==d){switch(typeof c){case "function":case "symbol":return;case "boolean":if(!d.acceptsBooleans)return}b=d.attributeName;switch(d.type){case 3:c&&a.push(G,b,Ra);break;case 4:!0===c?a.push(G,b,Ra):!1!== -c&&a.push(G,b,Qa,B(c),F);break;case 5:isNaN(c)||a.push(G,b,Qa,B(c),F);break;case 6:!isNaN(c)&&1<=c&&a.push(G,b,Qa,B(c),F);break;default:d.sanitizeURL&&(c=""+c),a.push(G,b,Qa,B(c),F)}}else if(ma(b)){switch(typeof c){case "function":case "symbol":return;case "boolean":if(d=b.toLowerCase().slice(0,5),"data-"!==d&&"aria-"!==d)return}a.push(G,b,Qa,B(c),F)}}}var L=u(">"),Sa=u("/>"); -function M(a,b,c){if(null!=b){if(null!=c)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if("object"!==typeof b||!("__html"in b))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.");b=b.__html;null!==b&&void 0!==b&&a.push(""+b)}}function Ta(a){var b="";ca.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}var Ua=u(' selected=""'); -function Va(a,b,c,d,e,f,g){var m=b.rel,h=b.href,n=b.precedence;if(3===f||g||"string"!==typeof m||"string"!==typeof h||""===h)return N(a,b),null;if("stylesheet"===b.rel){c="[style]"+h;if("string"!==typeof n||null!=b.disabled||b.onLoad||b.onError)return e=d.preloadsMap.get(c),e||(e={type:"preload",chunks:[],state:0,props:Wa(h,b)},d.preloadsMap.set(c,e)),N(e.chunks,e.props),d.usedStylesheets.add(e),N(a,b);h=d.stylesMap.get(c);if(!h){b=w({},b,{"data-precedence":b.precedence,precedence:null});if(h=d.preloadsMap.get(c))h.state|= -4,h=h.props,null==b.crossOrigin&&(b.crossOrigin=h.crossOrigin),null==b.integrity&&(b.integrity=h.integrity);h={type:"stylesheet",chunks:[],state:d.boundaryResources?4:0,props:b};d.stylesMap.set(c,h);b=d.precedences.get(n);b||(b=new Set,d.precedences.set(n,b));b.add(h)}d.boundaryResources&&d.boundaryResources.add(h);e&&a.push(E);return null}if(b.onLoad||b.onError)return N(a,b);e&&a.push(E);switch(b.rel){case "preconnect":case "dns-prefetch":return N(c.preconnectChunks,b);case "preload":return N(c.preloadChunks, -b);default:return N(c.hoistableChunks,b)}}function N(a,b){a.push(O("link"));for(var c in b)if(x.call(b,c)){var d=b[c];if(null!=d)switch(c){case "children":case "dangerouslySetInnerHTML":throw Error("link is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:J(a,c,d)}}a.push(Sa);return null} -function Xa(a,b){a.push(O("style"));var c=null,d=null,e;for(e in b)if(x.call(b,e)){var f=b[e];if(null!=f)switch(e){case "children":c=f;break;case "dangerouslySetInnerHTML":d=f;break;default:J(a,e,f)}}a.push(L);b=Array.isArray(c)?2>c.length?c[0]:null:c;"function"!==typeof b&&"symbol"!==typeof b&&null!==b&&void 0!==b&&a.push(B(""+b));M(a,d,c);a.push(P,"style",Q);return null} -function Ya(a,b,c){a.push(O(c));for(var d in b)if(x.call(b,d)){var e=b[d];if(null!=e)switch(d){case "children":case "dangerouslySetInnerHTML":throw Error(c+" is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:J(a,d,e)}}a.push(Sa);return null} -function Za(a,b){a.push(O("title"));var c=null,d=null,e;for(e in b)if(x.call(b,e)){var f=b[e];if(null!=f)switch(e){case "children":c=f;break;case "dangerouslySetInnerHTML":d=f;break;default:J(a,e,f)}}a.push(L);b=Array.isArray(c)?2>c.length?c[0]:null:c;"function"!==typeof b&&"symbol"!==typeof b&&null!==b&&void 0!==b&&a.push(B(""+b));M(a,d,c);a.push(P,"title",Q);return null} -function $a(a,b){a.push(O("script"));var c=null,d=null,e;for(e in b)if(x.call(b,e)){var f=b[e];if(null!=f)switch(e){case "children":c=f;break;case "dangerouslySetInnerHTML":d=f;break;default:J(a,e,f)}}a.push(L);M(a,d,c);"string"===typeof c&&a.push(B(c));a.push(P,"script",Q);return null} -function ab(a,b,c){a.push(O(c));var d=c=null,e;for(e in b)if(x.call(b,e)){var f=b[e];if(null!=f)switch(e){case "children":c=f;break;case "dangerouslySetInnerHTML":d=f;break;default:J(a,e,f)}}a.push(L);M(a,d,c);return"string"===typeof c?(a.push(B(c)),null):c}var bb=u("\n"),cb=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,db=new Map;function O(a){var b=db.get(a);if(void 0===b){if(!cb.test(a))throw Error("Invalid tag: "+a);b=u("<"+a);db.set(a,b)}return b}var eb=u("<!DOCTYPE html>"); -function fb(a,b,c,d,e,f,g){switch(b){case "select":a.push(O("select"));d=g=null;for(var m in c)if(x.call(c,m)){var h=c[m];if(null!=h)switch(m){case "children":g=h;break;case "dangerouslySetInnerHTML":d=h;break;case "defaultValue":case "value":break;default:J(a,m,h)}}a.push(L);M(a,d,g);return g;case "option":g=f.selectedValue;a.push(O("option"));var n=d=null,p=m=null;for(h in c)if(x.call(c,h)){var v=c[h];if(null!=v)switch(h){case "children":d=v;break;case "selected":m=v;break;case "dangerouslySetInnerHTML":p= -v;break;case "value":n=v;default:J(a,h,v)}}if(null!=g)if(c=null!==n?""+n:Ta(d),va(g))for(h=0;h<g.length;h++){if(""+g[h]===c){a.push(Ua);break}}else""+g===c&&a.push(Ua);else m&&a.push(Ua);a.push(L);M(a,p,d);return d;case "textarea":a.push(O("textarea"));h=d=g=null;for(n in c)if(x.call(c,n)&&(p=c[n],null!=p))switch(n){case "children":h=p;break;case "value":g=p;break;case "defaultValue":d=p;break;case "dangerouslySetInnerHTML":throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>."); -default:J(a,n,p)}null===g&&null!==d&&(g=d);a.push(L);if(null!=h){if(null!=g)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(va(h)&&1<h.length)throw Error("<textarea> can only have at most one child.");g=""+h}"string"===typeof g&&"\n"===g[0]&&a.push(bb);null!==g&&a.push(B(""+g));return null;case "input":a.push(O("input"));n=h=d=g=null;for(p in c)if(x.call(c,p)&&(m=c[p],null!=m))switch(p){case "children":case "dangerouslySetInnerHTML":throw Error("input is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."); -case "defaultChecked":n=m;break;case "defaultValue":d=m;break;case "checked":h=m;break;case "value":g=m;break;default:J(a,p,m)}null!==h?J(a,"checked",h):null!==n&&J(a,"checked",n);null!==g?J(a,"value",g):null!==d&&J(a,"value",d);a.push(Sa);return null;case "menuitem":a.push(O("menuitem"));for(var H in c)if(x.call(c,H)&&(g=c[H],null!=g))switch(H){case "children":case "dangerouslySetInnerHTML":throw Error("menuitems cannot have `children` nor `dangerouslySetInnerHTML`.");default:J(a,H,g)}a.push(L); -return null;case "title":return 3===f.insertionMode||f.noscriptTagInScope?a=Za(a,c):(Za(e.hoistableChunks,c),a=null),a;case "link":return Va(a,c,e,d,g,f.insertionMode,f.noscriptTagInScope);case "script":a:if(3===f.insertionMode||f.noscriptTagInScope||"string"!==typeof c.src||!c.src)a=$a(a,c);else{n="[script]"+c.src;if(!0!==c.async||c.onLoad||c.onError){if(h=d.preloadsMap.get(n),h||(h={type:"preload",chunks:[],state:0,props:{rel:"preload",as:"script",href:c.src,crossOrigin:c.crossOrigin,integrity:c.integrity, -referrerPolicy:c.referrerPolicy}},d.preloadsMap.set(n,h),d.usedScripts.add(h),N(h.chunks,h.props)),!0!==c.async){$a(a,c);a=null;break a}}else if(h=d.scriptsMap.get(n),!h){h={type:"script",chunks:[],state:0,props:null};d.scriptsMap.set(n,h);d.scripts.add(h);p=c;if(d=d.preloadsMap.get(n))d.state|=4,c=p=w({},c),d=d.props,null==c.crossOrigin&&(c.crossOrigin=d.crossOrigin),null==c.integrity&&(c.integrity=d.integrity);$a(h.chunks,p)}g&&a.push(E);a=null}return a;case "style":return h=c.precedence,p=c.href, -3===f.insertionMode||f.noscriptTagInScope||"string"!==typeof h||"string"!==typeof p||""===p?a=Xa(a,c):(n="[style]"+p,p=d.stylesMap.get(n),p||(p={type:"style",chunks:[],state:d.boundaryResources?4:0,props:w({},c,{"data-precedence":c.precedence,precedence:null,"data-href":c.href,href:null})},d.stylesMap.set(n,p),Xa(p.chunks,p.props),c=d.precedences.get(h),c||(c=new Set,d.precedences.set(h,c)),c.add(p),d.boundaryResources&&d.boundaryResources.add(p)),g&&a.push(E),a=void 0),a;case "meta":return 3===f.insertionMode|| -f.noscriptTagInScope?a=Ya(a,c,"meta"):(g&&a.push(E),a="string"===typeof c.charSet?Ya(e.charsetChunks,c,"meta"):Ya(e.hoistableChunks,c,"meta")),a;case "listing":case "pre":a.push(O(b));d=g=null;for(v in c)if(x.call(c,v)&&(h=c[v],null!=h))switch(v){case "children":g=h;break;case "dangerouslySetInnerHTML":d=h;break;default:J(a,v,h)}a.push(L);if(null!=d){if(null!=g)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if("object"!==typeof d||!("__html"in d))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information."); -c=d.__html;null!==c&&void 0!==c&&("string"===typeof c&&0<c.length&&"\n"===c[0]?a.push(bb,c):a.push(""+c))}"string"===typeof g&&"\n"===g[0]&&a.push(bb);return g;case "base":case "area":case "br":case "col":case "embed":case "hr":case "img":case "keygen":case "param":case "source":case "track":case "wbr":return Ya(a,c,b);case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return ab(a, -c,b);case "head":return 2>f.insertionMode&&null===e.headChunks?(e.headChunks=[],a=ab(e.headChunks,c,"head")):a=ab(a,c,"head"),a;case "html":return 0===f.insertionMode&&null===e.htmlChunks?(e.htmlChunks=[eb],a=ab(e.htmlChunks,c,"html")):a=ab(a,c,"html"),a;default:if(-1===b.indexOf("-")&&"string"!==typeof c.is)return ab(a,c,b);a.push(O(b));d=g=null;for(var A in c)if(x.call(c,A)&&(h=c[A],null!=h))switch(A){case "children":g=h;break;case "dangerouslySetInnerHTML":d=h;break;case "style":Pa(a,h);break; -case "suppressContentEditableWarning":case "suppressHydrationWarning":break;default:ma(A)&&"function"!==typeof h&&"symbol"!==typeof h&&a.push(G,A,Qa,B(h),F)}a.push(L);M(a,d,g);return g}}var P=u("</"),Q=u(">"),gb=u('<template id="'),hb=u('"></template>'),ib=u("\x3c!--$--\x3e"),jb=u('\x3c!--$?--\x3e<template id="'),kb=u('"></template>'),lb=u("\x3c!--$!--\x3e"),mb=u("\x3c!--/$--\x3e"),nb=u("<template"),ob=u('"'),pb=u(' data-dgst="');u(' data-msg="');u(' data-stck="');var qb=u("></template>"); -function rb(a,b,c){q(a,jb);if(null===c)throw Error("An ID must have been assigned before we can complete the boundary.");q(a,c);return t(a,kb)} -var sb=u('<div hidden id="'),tb=u('">'),ub=u("</div>"),vb=u('<svg aria-hidden="true" style="display:none" id="'),wb=u('">'),xb=u("</svg>"),yb=u('<math aria-hidden="true" style="display:none" id="'),zb=u('">'),Ab=u("</math>"),Bb=u('<table hidden id="'),Cb=u('">'),Db=u("</table>"),Eb=u('<table hidden><tbody id="'),Fb=u('">'),Gb=u("</tbody></table>"),Hb=u('<table hidden><tr id="'),Ib=u('">'),Jb=u("</tr></table>"),Kb=u('<table hidden><colgroup id="'),Lb=u('">'),Mb=u("</colgroup></table>"); -function Nb(a,b,c,d){switch(c.insertionMode){case 0:case 1:case 2:return q(a,sb),q(a,b.segmentPrefix),q(a,d.toString(16)),t(a,tb);case 3:return q(a,vb),q(a,b.segmentPrefix),q(a,d.toString(16)),t(a,wb);case 4:return q(a,yb),q(a,b.segmentPrefix),q(a,d.toString(16)),t(a,zb);case 5:return q(a,Bb),q(a,b.segmentPrefix),q(a,d.toString(16)),t(a,Cb);case 6:return q(a,Eb),q(a,b.segmentPrefix),q(a,d.toString(16)),t(a,Fb);case 7:return q(a,Hb),q(a,b.segmentPrefix),q(a,d.toString(16)),t(a,Ib);case 8:return q(a, -Kb),q(a,b.segmentPrefix),q(a,d.toString(16)),t(a,Lb);default:throw Error("Unknown insertion mode. This is a bug in React.");}}function Ob(a,b){switch(b.insertionMode){case 0:case 1:case 2:return t(a,ub);case 3:return t(a,xb);case 4:return t(a,Ab);case 5:return t(a,Db);case 6:return t(a,Gb);case 7:return t(a,Jb);case 8:return t(a,Mb);default:throw Error("Unknown insertion mode. This is a bug in React.");}} -var Pb=u('$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};;$RS("'),Qb=u('$RS("'),Rb=u('","'),Sb=u('")\x3c/script>');u('<template data-rsi="" data-sid="');u('" data-pid="'); -var Tb=u('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RC("'),Ub=u('$RC("'), -Vb=u('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RM=new Map;\n$RR=function(p,q,w){function r(l){this.s=l}for(var t=$RC,m=$RM,u=new Map,n=new Map,g=document,h,e,f=g.querySelectorAll("template[data-precedence]"),c=0;e=f[c++];){for(var b=e.content.firstChild;b;b=b.nextSibling)u.set(b.getAttribute("data-href"),b);e.parentNode.removeChild(e)}f=g.querySelectorAll("link[data-precedence],style[data-precedence]");for(c=0;e=f[c++];)m.set(e.getAttribute("STYLE"===e.nodeName?"data-href":"href"),e),n.set(e.dataset.precedence,h=e);e=0;f=[];for(var d,\nv,a;d=w[e++];){var k=0;b=d[k++];if(!(a=m.get(b))){if(a=u.get(b))c=a.getAttribute("data-precedence");else{a=g.createElement("link");a.href=b;a.rel="stylesheet";for(a.dataset.precedence=c=d[k++];v=d[k++];)a.setAttribute(v,d[k++]);d=a._p=new Promise(function(l,x){a.onload=l;a.onerror=x});d.then(r.bind(d,"l"),r.bind(d,"e"))}m.set(b,a);b=n.get(c)||h;b===h&&(h=a);n.set(c,a);b?b.parentNode.insertBefore(a,b.nextSibling):(c=g.head,c.insertBefore(a,c.firstChild))}d=a._p;c=a.getAttribute("media");!d||"l"===\nd.s||c&&!matchMedia(c).matches||f.push(d)}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};$RR("'), -Wb=u('$RM=new Map;\n$RR=function(p,q,w){function r(l){this.s=l}for(var t=$RC,m=$RM,u=new Map,n=new Map,g=document,h,e,f=g.querySelectorAll("template[data-precedence]"),c=0;e=f[c++];){for(var b=e.content.firstChild;b;b=b.nextSibling)u.set(b.getAttribute("data-href"),b);e.parentNode.removeChild(e)}f=g.querySelectorAll("link[data-precedence],style[data-precedence]");for(c=0;e=f[c++];)m.set(e.getAttribute("STYLE"===e.nodeName?"data-href":"href"),e),n.set(e.dataset.precedence,h=e);e=0;f=[];for(var d,\nv,a;d=w[e++];){var k=0;b=d[k++];if(!(a=m.get(b))){if(a=u.get(b))c=a.getAttribute("data-precedence");else{a=g.createElement("link");a.href=b;a.rel="stylesheet";for(a.dataset.precedence=c=d[k++];v=d[k++];)a.setAttribute(v,d[k++]);d=a._p=new Promise(function(l,x){a.onload=l;a.onerror=x});d.then(r.bind(d,"l"),r.bind(d,"e"))}m.set(b,a);b=n.get(c)||h;b===h&&(h=a);n.set(c,a);b?b.parentNode.insertBefore(a,b.nextSibling):(c=g.head,c.insertBefore(a,c.firstChild))}d=a._p;c=a.getAttribute("media");!d||"l"===\nd.s||c&&!matchMedia(c).matches||f.push(d)}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};$RR("'), -Xb=u('$RR("'),Yb=u('","'),Zb=u('",'),$b=u('"'),ac=u(")\x3c/script>");u('<template data-rci="" data-bid="');u('<template data-rri="" data-bid="');u('" data-sid="');u('" data-sty="');var bc=u('$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};;$RX("'),cc=u('$RX("'),dc=u('"'),ec=u(","),fc=u(")\x3c/script>");u('<template data-rxi="" data-bid="');u('" data-dgst="');u('" data-msg="'); -u('" data-stck="');var gc=/[<\u2028\u2029]/g;function hc(a){return JSON.stringify(a).replace(gc,function(a){switch(a){case "<":return"\\u003c";case "\u2028":return"\\u2028";case "\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React");}})}var ic=/[&><\u2028\u2029]/g; -function jc(a){return JSON.stringify(a).replace(ic,function(a){switch(a){case "&":return"\\u0026";case ">":return"\\u003e";case "<":return"\\u003c";case "\u2028":return"\\u2028";case "\u2029":return"\\u2029";default:throw Error("escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React");}})}var kc=u('<template data-precedence="">'),lc=u("</template>"),mc=!1; -function nc(a){if("style"===a.type&&0===(a.state&3)){!1===mc&&(mc=!0,q(this,kc));for(var b=a.chunks,c=0;c<b.length;c++)q(this,b[c]);a.state|=2}}function oc(a,b){mc=!1;b.forEach(nc,a);return mc?t(a,lc):!0}var pc=u('<style data-precedence="'),qc=u('"></style>');function rc(a){if(0===(a.state&7)){for(var b=a.chunks,c=0;c<b.length;c++)q(this,b[c]);a.state|=1}}function sc(a){if(0===(a.state&3)){for(var b=a.chunks,c=0;c<b.length;c++)q(this,b[c]);a.state|=2}}var tc=!1; -function uc(a,b,c){b=a.chunks;if(a.state&3)c.delete(a);else if(!(a.state&4)){tc=!0;"stylesheet"===a.type&&N(b,a.props);for(var d=0;d<b.length;d++)q(this,b[d]);a.state|=1;c.delete(a)}}function vc(a,b){tc=!1;a.forEach(uc,this);tc||(q(this,pc),q(this,B(b)),q(this,qc))}function wc(a){if("style"!==a.type){var b=a.chunks,c=Wa(a.props.href,a.props);N(b,c);for(c=0;c<b.length;c++)q(this,b[c]);a.state|=8;b.length=0}}function xc(a){a.forEach(wc,this);a.clear()} -function yc(a){if("style"!==a.type){var b=a.chunks,c=Wa(a.props.href,a.props);N(b,c);for(c=0;c<b.length;c++)q(this,b[c]);a.state|=8;b.length=0}}function zc(a){a.forEach(yc,this);a.clear()} -function Ac(a,b,c){var d=c.htmlChunks,e=c.headChunks,f=0;if(d){for(f=0;f<d.length;f++)q(a,d[f]);if(e)for(f=0;f<e.length;f++)q(a,e[f]);else q(a,O("head")),q(a,L)}else if(e)for(f=0;f<e.length;f++)q(a,e[f]);var g=c.charsetChunks;for(f=0;f<g.length;f++)q(a,g[f]);g.length=0;g=c.preconnectChunks;for(f=0;f<g.length;f++)q(a,g[f]);g.length=0;b.fontPreloads.forEach(rc,a);b.fontPreloads.clear();b.precedences.forEach(vc,a);b.precedences.forEach(xc,a);b.usedStylesheets.forEach(function(c){if(!b.stylesMap.has("["+ -c.props.as+"]"+c.props.href))for(c=c.chunks,f=0;f<c.length;f++)q(a,c[f])});b.usedStylesheets.clear();b.scripts.forEach(rc,a);b.scripts.clear();b.usedScripts.forEach(rc,a);b.usedScripts.clear();b.explicitStylesheetPreloads.forEach(rc,a);b.explicitStylesheetPreloads.clear();b.explicitScriptPreloads.forEach(rc,a);b.explicitScriptPreloads.clear();b.explicitOtherPreloads.forEach(rc,a);b.explicitOtherPreloads.clear();g=c.preloadChunks;for(f=0;f<g.length;f++)q(a,g[f]);g.length=0;c=c.hoistableChunks;for(f= -0;f<c.length;f++)q(a,c[f]);c.length=0;d&&null===e&&(q(a,P),q(a,"head"),q(a,Q))} -function Bc(a,b,c){var d=0,e=c.preconnectChunks;for(d=0;d<e.length;d++)q(a,e[d]);e.length=0;b.fontPreloads.forEach(sc,a);b.fontPreloads.clear();b.precedences.forEach(zc,a);b.usedStylesheets.forEach(function(c){if(!b.stylesMap.has("["+c.props.as+"]"+c.props.href))for(c=c.chunks,d=0;d<c.length;d++)q(a,c[d])});b.usedStylesheets.clear();b.scripts.forEach(sc,a);b.scripts.clear();b.usedScripts.forEach(sc,a);b.usedScripts.clear();b.explicitStylesheetPreloads.forEach(sc,a);b.explicitStylesheetPreloads.clear(); -b.explicitScriptPreloads.forEach(sc,a);b.explicitScriptPreloads.clear();b.explicitOtherPreloads.forEach(sc,a);b.explicitOtherPreloads.clear();e=c.preloadChunks;for(d=0;d<e.length;d++)q(a,e[d]);e.length=0;c=c.hoistableChunks;for(d=0;d<c.length;d++)q(a,c[d]);c.length=0}var Cc=u("["),Dc=u(",["),Ec=u(","),Fc=u("]"); -function Gc(a,b){q(a,Cc);var c=Cc;b.forEach(function(b){if(!(b.state&1))if(b.state&3)q(a,c),q(a,jc(""+("style"===b.type?b.props["data-href"]:b.props.href))),q(a,Fc),c=Dc;else if("stylesheet"===b.type){q(a,c);var d=b.props["data-precedence"],f=b.props;q(a,jc(""+b.props.href));d=""+d;q(a,Ec);q(a,jc(d));for(var g in f)if(x.call(f,g)){var m=f[g];if(null!=m)switch(g){case "href":case "rel":case "precedence":case "data-precedence":break;case "children":case "dangerouslySetInnerHTML":throw Error("link is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."); -default:a:{d=a;var h=g,n=h.toLowerCase();switch(typeof m){case "function":case "symbol":break a}switch(h){case "innerHTML":case "dangerouslySetInnerHTML":case "suppressContentEditableWarning":case "suppressHydrationWarning":case "style":break a;case "className":n="class";break;case "hidden":if(!1===m)break a;break;case "src":case "href":break;default:if(!ma(h))break a}if(!(2<h.length)||"o"!==h[0]&&"O"!==h[0]||"n"!==h[1]&&"N"!==h[1])m=""+m,q(d,Ec),q(d,jc(n)),q(d,Ec),q(d,jc(m))}}}q(a,Fc);c=Dc;b.state|= -2}});q(a,Fc)} -function xa(a,b){if(C){var c=C;if("string"===typeof a&&a&&"object"===typeof b&&null!==b&&"string"===typeof b.as){var d=b.as,e="["+d+"]"+a,f=c.preloadsMap.get(e);f||(f={type:"preload",chunks:[],state:0,props:{rel:"preload",as:d,href:a,crossOrigin:"font"===d?"":b.crossOrigin,integrity:b.integrity}},c.preloadsMap.set(e,f),N(f.chunks,f.props));switch(d){case "font":c.fontPreloads.add(f);break;case "style":c.explicitStylesheetPreloads.add(f);break;case "script":c.explicitScriptPreloads.add(f);break;default:c.explicitOtherPreloads.add(f)}}}} -function ya(a,b){if(C)a:{var c=C;if("string"===typeof a&&a&&"object"===typeof b&&null!==b){var d=b.as;switch(d){case "style":var e="["+d+"]"+a;d=c.stylesMap.get(e);var f=b.precedence||"default";d||(d={type:"stylesheet",chunks:[],state:0,props:{rel:"stylesheet",href:a,"data-precedence":f,crossOrigin:b.crossOrigin,integrity:b.integrity}},c.stylesMap.set(e,d),a=c.precedences.get(f),a||(a=new Set,c.precedences.set(f,a)),a.add(d));break a;case "script":f="["+d+"]"+a,d=c.scriptsMap.get(f),d||(d={type:"script", -chunks:[],state:0,props:null},c.scriptsMap.set(f,d),a={src:a,async:!0,crossOrigin:b.crossOrigin,integrity:b.integrity},c.scripts.add(d),$a(d.chunks,a))}}}}function Wa(a,b){return{rel:"preload",as:"style",href:a,crossOrigin:b.crossOrigin,integrity:b.integrity,media:b.media,hrefLang:b.hrefLang,referrerPolicy:b.referrerPolicy}}function Hc(a){this.add(a)}function Ic(a){a.state&=-5} -var Jc=Symbol.for("react.element"),Kc=Symbol.for("react.portal"),Lc=Symbol.for("react.fragment"),Mc=Symbol.for("react.strict_mode"),Nc=Symbol.for("react.profiler"),Oc=Symbol.for("react.provider"),Pc=Symbol.for("react.context"),Qc=Symbol.for("react.server_context"),Rc=Symbol.for("react.forward_ref"),Sc=Symbol.for("react.suspense"),Tc=Symbol.for("react.suspense_list"),Uc=Symbol.for("react.memo"),Vc=Symbol.for("react.lazy"),Wc=Symbol.for("react.scope"),Xc=Symbol.for("react.debug_trace_mode"),Yc=Symbol.for("react.offscreen"), -Zc=Symbol.for("react.legacy_hidden"),$c=Symbol.for("react.cache"),ad=Symbol.for("react.default_value"),bd=Symbol.iterator; -function cd(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case Lc:return"Fragment";case Kc:return"Portal";case Nc:return"Profiler";case Mc:return"StrictMode";case Sc:return"Suspense";case Tc:return"SuspenseList";case $c:return"Cache"}if("object"===typeof a)switch(a.$$typeof){case Pc:return(a.displayName||"Context")+".Consumer";case Oc:return(a._context.displayName||"Context")+".Provider";case Rc:var b=a.render;a=a.displayName; -a||(a=b.displayName||b.name||"",a=""!==a?"ForwardRef("+a+")":"ForwardRef");return a;case Uc:return b=a.displayName||null,null!==b?b:cd(a.type)||"Memo";case Vc:b=a._payload;a=a._init;try{return cd(a(b))}catch(c){break}case Qc:return(a.displayName||a._globalName)+".Provider"}return null}var dd=ca.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ed={};function fd(a,b){a=a.contextTypes;if(!a)return ed;var c={},d;for(d in a)c[d]=b[d];return c}var R=null; -function gd(a,b){if(a!==b){a.context._currentValue=a.parentValue;a=a.parent;var c=b.parent;if(null===a){if(null!==c)throw Error("The stacks must reach the root at the same time. This is a bug in React.");}else{if(null===c)throw Error("The stacks must reach the root at the same time. This is a bug in React.");gd(a,c)}b.context._currentValue=b.value}}function hd(a){a.context._currentValue=a.parentValue;a=a.parent;null!==a&&hd(a)} -function id(a){var b=a.parent;null!==b&&id(b);a.context._currentValue=a.value}function jd(a,b){a.context._currentValue=a.parentValue;a=a.parent;if(null===a)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===b.depth?gd(a,b):jd(a,b)} -function kd(a,b){var c=b.parent;if(null===c)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===c.depth?gd(a,c):kd(a,c);b.context._currentValue=b.value}function ld(a){var b=R;b!==a&&(null===b?id(a):null===a?hd(b):b.depth===a.depth?gd(b,a):b.depth>a.depth?jd(b,a):kd(b,a),R=a)} -var md={isMounted:function(){return!1},enqueueSetState:function(a,b){a=a._reactInternals;null!==a.queue&&a.queue.push(b)},enqueueReplaceState:function(a,b){a=a._reactInternals;a.replace=!0;a.queue=[b]},enqueueForceUpdate:function(){}}; -function nd(a,b,c,d){var e=void 0!==a.state?a.state:null;a.updater=md;a.props=c;a.state=e;var f={queue:[],replace:!1};a._reactInternals=f;var g=b.contextType;a.context="object"===typeof g&&null!==g?g._currentValue:d;g=b.getDerivedStateFromProps;"function"===typeof g&&(g=g(c,e),e=null===g||void 0===g?e:w({},e,g),a.state=e);if("function"!==typeof b.getDerivedStateFromProps&&"function"!==typeof a.getSnapshotBeforeUpdate&&("function"===typeof a.UNSAFE_componentWillMount||"function"===typeof a.componentWillMount))if(b= -a.state,"function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),b!==a.state&&md.enqueueReplaceState(a,a.state,null),null!==f.queue&&0<f.queue.length)if(b=f.queue,g=f.replace,f.queue=null,f.replace=!1,g&&1===b.length)a.state=b[0];else{f=g?b[0]:a.state;e=!0;for(g=g?1:0;g<b.length;g++){var m=b[g];m="function"===typeof m?m.call(a,f,c,d):m;null!=m&&(e?(e=!1,f=w({},f,m)):w(f,m))}a.state=f}else f.queue=null} -var od={id:1,overflow:""};function pd(a,b,c){var d=a.id;a=a.overflow;var e=32-qd(d)-1;d&=~(1<<e);c+=1;var f=32-qd(b)+e;if(30<f){var g=e-e%5;f=(d&(1<<g)-1).toString(32);d>>=g;e-=g;return{id:1<<32-qd(b)+e|c<<e|d,overflow:f+a}}return{id:1<<f|c<<e|d,overflow:a}}var qd=Math.clz32?Math.clz32:rd,sd=Math.log,td=Math.LN2;function rd(a){a>>>=0;return 0===a?32:31-(sd(a)/td|0)|0}var ud=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`"); -function vd(){}function wd(a,b,c){c=a[c];void 0===c?a.push(b):c!==b&&(b.then(vd,vd),b=c);switch(b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;default:if("string"!==typeof b.status)switch(a=b,a.status="pending",a.then(function(a){if("pending"===b.status){var c=b;c.status="fulfilled";c.value=a}},function(a){if("pending"===b.status){var c=b;c.status="rejected";c.reason=a}}),b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;}xd=b;throw ud;}}var xd=null; -function yd(){if(null===xd)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var a=xd;xd=null;return a}function zd(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var Ad="function"===typeof Object.is?Object.is:zd,S=null,Bd=null,Cd=null,T=null,Dd=!1,Ed=!1,Fd=0,Gd=0,U=null,V=null,Hd=0; -function W(){if(null===S)throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.");return S} -function Id(){if(0<Hd)throw Error("Rendered more hooks than during the previous render");return{memoizedState:null,queue:null,next:null}}function Jd(){null===T?null===Cd?(Dd=!1,Cd=T=Id()):(Dd=!0,T=Cd):null===T.next?(Dd=!1,T=T.next=Id()):(Dd=!0,T=T.next);return T}function Kd(a,b,c,d){for(;Ed;)Ed=!1,Gd=Fd=0,Hd+=1,T=null,c=a(b,d);Ld();return c}function Md(){var a=U;U=null;return a}function Ld(){Bd=S=null;Ed=!1;Cd=null;Hd=0;T=V=null}function Nd(a,b){return"function"===typeof b?b(a):b} -function Od(a,b,c){S=W();T=Jd();if(Dd){var d=T.queue;b=d.dispatch;if(null!==V&&(c=V.get(d),void 0!==c)){V.delete(d);d=T.memoizedState;do d=a(d,c.action),c=c.next;while(null!==c);T.memoizedState=d;return[d,b]}return[T.memoizedState,b]}a=a===Nd?"function"===typeof b?b():b:void 0!==c?c(b):b;T.memoizedState=a;a=T.queue={last:null,dispatch:null};a=a.dispatch=Pd.bind(null,S,a);return[T.memoizedState,a]} -function Qd(a,b){S=W();T=Jd();b=void 0===b?null:b;if(null!==T){var c=T.memoizedState;if(null!==c&&null!==b){var d=c[1];a:if(null===d)d=!1;else{for(var e=0;e<d.length&&e<b.length;e++)if(!Ad(b[e],d[e])){d=!1;break a}d=!0}if(d)return c[0]}}a=a();T.memoizedState=[a,b];return a} -function Pd(a,b,c){if(25<=Hd)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(a===S)if(Ed=!0,a={action:c,next:null},null===V&&(V=new Map),c=V.get(b),void 0===c)V.set(b,a);else{for(b=c;null!==b.next;)b=b.next;b.next=a}}function Rd(){throw Error("startTransition cannot be called during server rendering.");}function Sd(){throw Error("Cache cannot be refreshed during server rendering.");}function Td(){} -var Vd={readContext:function(a){return a._currentValue},useContext:function(a){W();return a._currentValue},useMemo:Qd,useReducer:Od,useRef:function(a){S=W();T=Jd();var b=T.memoizedState;return null===b?(a={current:a},T.memoizedState=a):b},useState:function(a){return Od(Nd,a)},useInsertionEffect:Td,useLayoutEffect:function(){},useCallback:function(a,b){return Qd(function(){return a},b)},useImperativeHandle:Td,useEffect:Td,useDebugValue:Td,useDeferredValue:function(a){W();return a},useTransition:function(){W(); -return[!1,Rd]},useId:function(){var a=Bd.treeContext;var b=a.overflow;a=a.id;a=(a&~(1<<32-qd(a)-1)).toString(32)+b;var c=Ud;if(null===c)throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component.");b=Fd++;a=":"+c.idPrefix+"R"+a;0<b&&(a+="H"+b.toString(32));return a+":"},useMutableSource:function(a,b){W();return b(a._source)},useSyncExternalStore:function(a,b,c){if(void 0===c)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering."); -return c()},useCacheRefresh:function(){return Sd},use:function(a){if(null!==a&&"object"===typeof a){if("function"===typeof a.then){var b=Gd;Gd+=1;null===U&&(U=[]);return wd(U,a,b)}if(a.$$typeof===Pc||a.$$typeof===Qc)return a._currentValue}throw Error("An unsupported type was passed to use(): "+String(a));}},Ud=null,Wd={getCacheSignal:function(){throw Error("Not implemented.");},getCacheForType:function(){throw Error("Not implemented.");}},Xd=dd.ReactCurrentDispatcher,Yd=dd.ReactCurrentCache; -function Zd(a){console.error(a);return null}function $d(){}function ae(a,b){var c=a.pingedTasks;c.push(b);1===c.length&&setImmediate(function(){return be(a)})}function ce(a,b,c,d,e,f,g,m,h){a.allPendingTasks++;null===d?a.pendingRootTasks++:d.pendingTasks++;var n={node:c,ping:function(){return ae(a,n)},blockedBoundary:d,blockedSegment:e,abortSet:f,legacyContext:g,context:m,treeContext:h,thenableState:b};f.add(n);return n} -function de(a,b,c,d,e,f){return{status:0,id:-1,index:b,parentFlushed:!1,chunks:[],children:[],formatContext:d,boundary:c,lastPushedText:e,textEmbedded:f}}function ee(a,b){a=a.onError(b);if(null!=a&&"string"!==typeof a)throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof a+'" instead');return a} -function fe(a,b){var c=a.onShellError;c(b);c=a.onFatalError;c(b);null!==a.destination?(a.status=2,a.destination.destroy(b)):(a.status=1,a.fatalError=b)}function ge(a,b){if(null!==a.completedRootSegment||0<a.pendingRootTasks)a=b.resources,a.forEach(Ic),a.clear()} -function he(a,b,c,d){var e=c.render(),f=d.childContextTypes;if(null!==f&&void 0!==f){var g=b.legacyContext;if("function"!==typeof c.getChildContext)d=g;else{c=c.getChildContext();for(var m in c)if(!(m in f))throw Error((cd(d)||"Unknown")+'.getChildContext(): key "'+m+'" is not defined in childContextTypes.');d=w({},g,c)}b.legacyContext=d;X(a,b,null,e);b.legacyContext=g}else X(a,b,null,e)} -function ie(a,b){if(a&&a.defaultProps){b=w({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c]);return b}return b} -function je(a,b,c,d,e,f){if("function"===typeof d)if(d.prototype&&d.prototype.isReactComponent)c=fd(d,b.legacyContext),f=d.contextType,f=new d(e,"object"===typeof f&&null!==f?f._currentValue:c),nd(f,d,e,c),he(a,b,f,d);else{f=fd(d,b.legacyContext);S={};Bd=b;Gd=Fd=0;U=c;c=d(e,f);c=Kd(d,e,c,f);var g=0!==Fd;if("object"===typeof c&&null!==c&&"function"===typeof c.render&&void 0===c.$$typeof)nd(c,d,e,f),he(a,b,c,d);else if(g){e=b.treeContext;b.treeContext=pd(e,1,0);try{X(a,b,null,c)}finally{b.treeContext= -e}}else X(a,b,null,c)}else if("string"===typeof d){c=b.blockedSegment;g=fb(c.chunks,d,e,a.resources,a.responseState,c.formatContext,c.lastPushedText);c.lastPushedText=!1;f=c.formatContext;c.formatContext=Ja(f,d,e);ke(a,b,g);c.formatContext=f;a:{b=c.chunks;switch(d){case "title":case "style":case "script":case "area":case "base":case "br":case "col":case "embed":case "hr":case "img":case "input":case "keygen":case "link":case "meta":case "param":case "source":case "track":case "wbr":break a;case "body":if(1>= -f.insertionMode){a.responseState.hasBody=!0;break a}break;case "html":if(0===f.insertionMode)break a}b.push(P,d,Q)}c.lastPushedText=!1}else{switch(d){case Zc:case Xc:case Mc:case Nc:case Lc:X(a,b,null,e.children);return;case Yc:"hidden"!==e.mode&&X(a,b,null,e.children);return;case Tc:X(a,b,null,e.children);return;case Wc:throw Error("ReactDOMServer does not yet support scope components.");case Sc:a:{d=b.blockedBoundary;c=b.blockedSegment;f=e.fallback;e=e.children;g=new Set;var m={id:null,rootSegmentID:-1, -parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:g,errorDigest:null,resources:new Set},h=de(a,c.chunks.length,m,c.formatContext,!1,!1);c.children.push(h);c.lastPushedText=!1;var n=de(a,0,null,c.formatContext,!1,!1);n.parentFlushed=!0;b.blockedBoundary=m;b.blockedSegment=n;a.resources.boundaryResources=m.resources;try{if(ke(a,b,e),n.lastPushedText&&n.textEmbedded&&n.chunks.push(E),n.status=1,0===m.pendingTasks&&ge(a,m),le(m,n),0===m.pendingTasks)break a}catch(p){n.status= -4,m.forceClientRender=!0,m.errorDigest=ee(a,p)}finally{a.resources.boundaryResources=d?d.resources:null,b.blockedBoundary=d,b.blockedSegment=c}b=ce(a,null,f,d,h,g,b.legacyContext,b.context,b.treeContext);a.pingedTasks.push(b)}return}if("object"===typeof d&&null!==d)switch(d.$$typeof){case Rc:d=d.render;S={};Bd=b;Gd=Fd=0;U=c;c=d(e,f);e=Kd(d,e,c,f);if(0!==Fd){d=b.treeContext;b.treeContext=pd(d,1,0);try{X(a,b,null,e)}finally{b.treeContext=d}}else X(a,b,null,e);return;case Uc:d=d.type;e=ie(d,e);je(a, -b,c,d,e,f);return;case Oc:c=e.children;d=d._context;e=e.value;f=d._currentValue;d._currentValue=e;g=R;R=e={parent:g,depth:null===g?0:g.depth+1,context:d,parentValue:f,value:e};b.context=e;X(a,b,null,c);a=R;if(null===a)throw Error("Tried to pop a Context at the root of the app. This is a bug in React.");e=a.parentValue;a.context._currentValue=e===ad?a.context._defaultValue:e;a=R=a.parent;b.context=a;return;case Pc:e=e.children;e=e(d._currentValue);X(a,b,null,e);return;case Vc:f=d._init;d=f(d._payload); -e=ie(d,e);je(a,b,c,d,e,void 0);return}throw Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+((null==d?d:typeof d)+"."));}} -function X(a,b,c,d){b.node=d;if("object"===typeof d&&null!==d){switch(d.$$typeof){case Jc:je(a,b,c,d.type,d.props,d.ref);return;case Kc:throw Error("Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.");case Vc:c=d._init;d=c(d._payload);X(a,b,null,d);return}if(va(d)){me(a,b,d);return}null===d||"object"!==typeof d?c=null:(c=bd&&d[bd]||d["@@iterator"],c="function"===typeof c?c:null);if(c&&(c=c.call(d))){d=c.next();if(!d.done){var e= -[];do e.push(d.value),d=c.next();while(!d.done);me(a,b,e)}return}a=Object.prototype.toString.call(d);throw Error("Objects are not valid as a React child (found: "+("[object Object]"===a?"object with keys {"+Object.keys(d).join(", ")+"}":a)+"). If you meant to render a collection of children, use an array instead.");}"string"===typeof d?(c=b.blockedSegment,c.lastPushedText=Ka(b.blockedSegment.chunks,d,a.responseState,c.lastPushedText)):"number"===typeof d&&(c=b.blockedSegment,c.lastPushedText=Ka(b.blockedSegment.chunks, -""+d,a.responseState,c.lastPushedText))}function me(a,b,c){for(var d=c.length,e=0;e<d;e++){var f=b.treeContext;b.treeContext=pd(f,d,e);try{ke(a,b,c[e])}finally{b.treeContext=f}}} -function ke(a,b,c){var d=b.blockedSegment.formatContext,e=b.legacyContext,f=b.context;try{return X(a,b,null,c)}catch(n){if(Ld(),c=n===ud?yd():n,"object"===typeof c&&null!==c&&"function"===typeof c.then){var g=Md(),m=b.blockedSegment,h=de(a,m.chunks.length,null,m.formatContext,m.lastPushedText,!0);m.children.push(h);m.lastPushedText=!1;a=ce(a,g,b.node,b.blockedBoundary,h,b.abortSet,b.legacyContext,b.context,b.treeContext).ping;c.then(a,a);b.blockedSegment.formatContext=d;b.legacyContext=e;b.context= -f;ld(f)}else throw b.blockedSegment.formatContext=d,b.legacyContext=e,b.context=f,ld(f),c;}}function ne(a){var b=a.blockedBoundary;a=a.blockedSegment;a.status=3;oe(this,b,a)} -function pe(a,b,c){var d=a.blockedBoundary;a.blockedSegment.status=3;null===d?(b.allPendingTasks--,1!==b.status&&2!==b.status&&(ee(b,c),fe(b,c))):(d.pendingTasks--,d.forceClientRender||(d.forceClientRender=!0,d.errorDigest=b.onError(c),d.parentFlushed&&b.clientRenderedBoundaries.push(d)),d.fallbackAbortableTasks.forEach(function(a){return pe(a,b,c)}),d.fallbackAbortableTasks.clear(),b.allPendingTasks--,0===b.allPendingTasks&&(a=b.onAllReady,a()))} -function le(a,b){if(0===b.chunks.length&&1===b.children.length&&null===b.children[0].boundary){var c=b.children[0];c.id=b.id;c.parentFlushed=!0;1===c.status&&le(a,c)}else a.completedSegments.push(b)} -function oe(a,b,c){if(null===b){if(c.parentFlushed){if(null!==a.completedRootSegment)throw Error("There can only be one root segment. This is a bug in React.");a.completedRootSegment=c}a.pendingRootTasks--;0===a.pendingRootTasks&&(a.onShellError=$d,b=a.onShellReady,b())}else b.pendingTasks--,b.forceClientRender||(0===b.pendingTasks?(c.parentFlushed&&1===c.status&&le(b,c),ge(a,b),b.parentFlushed&&a.completedBoundaries.push(b),b.fallbackAbortableTasks.forEach(ne,a),b.fallbackAbortableTasks.clear()): -c.parentFlushed&&1===c.status&&(le(b,c),1===b.completedSegments.length&&b.parentFlushed&&a.partialBoundaries.push(b)));a.allPendingTasks--;0===a.allPendingTasks&&(a=a.onAllReady,a())} -function be(a){if(2!==a.status){var b=R,c=Xd.current;Xd.current=Vd;var d=Yd.current;Yd.current=Wd;var e=a.resources;Aa.push(C);C=e;e=wa.current;wa.current=za;var f=Ud;Ud=a.responseState;try{var g=a.pingedTasks,m;for(m=0;m<g.length;m++){var h=g[m];var n=a,p=h.blockedBoundary;n.resources.boundaryResources=p?p.resources:null;var v=h.blockedSegment;if(0===v.status){ld(h.context);try{var H=h.thenableState;h.thenableState=null;X(n,h,H,h.node);v.lastPushedText&&v.textEmbedded&&v.chunks.push(E);h.abortSet.delete(h); -v.status=1;oe(n,h.blockedBoundary,v)}catch(na){Ld();var A=na===ud?yd():na;if("object"===typeof A&&null!==A&&"function"===typeof A.then){var Y=h.ping;A.then(Y,Y);h.thenableState=Md()}else{h.abortSet.delete(h);v.status=4;var I=n,K=h.blockedBoundary,Z=A,ze=ee(I,Z);null===K?fe(I,Z):(K.pendingTasks--,K.forceClientRender||(K.forceClientRender=!0,K.errorDigest=ze,K.parentFlushed&&I.clientRenderedBoundaries.push(K)));I.allPendingTasks--;if(0===I.allPendingTasks){var Ae=I.onAllReady;Ae()}}}finally{n.resources.boundaryResources= -null}}}g.splice(0,m);null!==a.destination&&qe(a,a.destination)}catch(na){ee(a,na),fe(a,na)}finally{Ud=f,Xd.current=c,Yd.current=d,C=Aa.pop(),wa.current=e,c===Vd&&ld(b)}}} -function re(a,b,c){c.parentFlushed=!0;switch(c.status){case 0:var d=c.id=a.nextSegmentId++;c.lastPushedText=!1;c.textEmbedded=!1;a=a.responseState;q(b,gb);q(b,a.placeholderPrefix);a=d.toString(16);q(b,a);return t(b,hb);case 1:c.status=2;var e=!0;d=c.chunks;var f=0;c=c.children;for(var g=0;g<c.length;g++){for(e=c[g];f<e.index;f++)q(b,d[f]);e=se(a,b,e)}for(;f<d.length-1;f++)q(b,d[f]);f<d.length&&(e=t(b,d[f]));return e;default:throw Error("Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React."); +'use strict';var ba=require("util"),ca=require("async_hooks"),da=require("react"),ea=require("react-dom");function fa(a){"function"===typeof a.flush&&a.flush()}new ca.AsyncLocalStorage;var k=null,l=0,r=!0; +function t(a,b){if("string"===typeof b){if(0!==b.length)if(2048<3*b.length)0<l&&(u(a,k.subarray(0,l)),k=new Uint8Array(2048),l=0),u(a,ha.encode(b));else{var c=k;0<l&&(c=k.subarray(l));c=ha.encodeInto(b,c);var d=c.read;l+=c.written;d<b.length&&(u(a,k),k=new Uint8Array(2048),l=ha.encodeInto(b.slice(d),k).written);2048===l&&(u(a,k),k=new Uint8Array(2048),l=0)}}else 0!==b.byteLength&&(2048<b.byteLength?(0<l&&(u(a,k.subarray(0,l)),k=new Uint8Array(2048),l=0),u(a,b)):(c=k.length-l,c<b.byteLength&&(0=== +c?u(a,k):(k.set(b.subarray(0,c),l),l+=c,u(a,k),b=b.subarray(c)),k=new Uint8Array(2048),l=0),k.set(b,l),l+=b.byteLength,2048===l&&(u(a,k),k=new Uint8Array(2048),l=0)))}function u(a,b){a=a.write(b);r=r&&a}function w(a,b){t(a,b);return r}function ia(a){k&&0<l&&a.write(k.subarray(0,l));k=null;l=0;r=!0}var ha=new ba.TextEncoder;function x(a){return ha.encode(a)} +var z=Object.prototype.hasOwnProperty,ka=/^[: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][: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\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,la={},ma={}; +function na(a){if(z.call(ma,a))return!0;if(z.call(la,a))return!1;if(ka.test(a))return ma[a]=!0;la[a]=!0;return!1}function A(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var B={}; +"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){B[a]=new A(a,0,!1,a,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];B[b]=new A(b,1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){B[a]=new A(a,2,!1,a.toLowerCase(),null,!1,!1)}); +["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){B[a]=new A(a,2,!1,a,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){B[a]=new A(a,3,!1,a.toLowerCase(),null,!1,!1)}); +["checked","multiple","muted","selected"].forEach(function(a){B[a]=new A(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){B[a]=new A(a,4,!1,a,null,!1,!1)});["cols","rows","size","span"].forEach(function(a){B[a]=new A(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){B[a]=new A(a,5,!1,a.toLowerCase(),null,!1,!1)});var pa=/[\-:]([a-z])/g;function qa(a){return a[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 transform-origin 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".split(" ").forEach(function(a){var b=a.replace(pa, +qa);B[b]=new A(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(pa,qa);B[b]=new A(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(pa,qa);B[b]=new A(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){B[a]=new A(a,1,!1,a.toLowerCase(),null,!1,!1)}); +B.xlinkHref=new A("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){B[a]=new A(a,1,!1,a.toLowerCase(),null,!0,!0)}); +var ra={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0, +zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},sa=["Webkit","ms","Moz","O"];Object.keys(ra).forEach(function(a){sa.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);ra[b]=ra[a]})});var ta=/["'&<>]/; +function C(a){if("boolean"===typeof a||"number"===typeof a)return""+a;a=""+a;var b=ta.exec(a);if(b){var c="",d,e=0;for(d=b.index;d<a.length;d++){switch(a.charCodeAt(d)){case 34:b=""";break;case 38:b="&";break;case 39:b="'";break;case 60:b="<";break;case 62:b=">";break;default:continue}e!==d&&(c+=a.substring(e,d));e=d+1;c+=b}a=e!==d?c+a.substring(e,d):c}return a}var ua=/([A-Z])/g,va=/^ms-/,wa=Array.isArray,D=Object.assign,E=null,xa=[],Aa={preload:ya,preinit:za}; +function ya(a,b){if(E){var c=E;if("string"===typeof a&&a&&"object"===typeof b&&null!==b){var d=b.as,e=c.preloadsMap.get(a);e||(e=G(c,a,d,{href:a,rel:"preload",as:d,crossOrigin:"font"===d?"":b.crossOrigin,integrity:b.integrity}));switch(d){case "font":c.fontPreloads.add(e);break;case "style":c.explicitStylePreloads.add(e);break;case "script":c.explicitScriptPreloads.add(e)}}}} +function za(a,b){if(E)a:{var c=E;if("string"===typeof a&&a&&"object"===typeof b&&null!==b)switch(b.as){case "style":var d=c.stylesMap.get(a);d||(d=b.precedence||"default",d=Ba(c,a,d,{rel:"stylesheet",href:a,"data-precedence":d,crossOrigin:b.crossOrigin}));d.set.add(d);c.explicitStylePreloads.add(d.hint);break a;case "script":d=c.scriptsMap.get(a),d||(d=Ca(c,a,{src:a,async:!0,crossOrigin:b.crossOrigin,integrity:b.integrity}),c.scripts.add(d))}}} +function Da(a,b){return{rel:"preload",as:"style",href:a,crossOrigin:b.crossOrigin,integrity:b.integrity,media:b.media,hrefLang:b.hrefLang,referrerPolicy:b.referrerPolicy}}function Ea(a,b){return{rel:"preload",as:"script",href:a,crossOrigin:b.crossOrigin,integrity:b.integrity,referrerPolicy:b.referrerPolicy}}function G(a,b,c,d){c={type:"preload",as:c,href:b,flushed:!1,props:d};a.preloadsMap.set(b,c);return c} +function Ba(a,b,c,d){var e=a.stylesMap,f=a.preloadsMap,g=a.precedences,h=g.get(c);h||(h=new Set,g.set(c,h));(f=f.get(b))?(a=f.props,null==d.crossOrigin&&(d.crossOrigin=a.crossOrigin),null==d.referrerPolicy&&(d.referrerPolicy=a.referrerPolicy),null==d.title&&(d.title=a.title)):(f=Da(b,d),f=G(a,b,"style",f),a.explicitStylePreloads.add(f));c={type:"style",href:b,precedence:c,flushed:!1,inShell:!1,props:d,hint:f,set:h};e.set(b,c);return c} +function Ca(a,b,c){var d=a.scriptsMap,e=a.preloadsMap.get(b);e?(a=e.props,null==c.crossOrigin&&(c.crossOrigin=a.crossOrigin),null==c.referrerPolicy&&(c.referrerPolicy=a.referrerPolicy),null==c.integrity&&(c.integrity=a.integrity)):(e=Ea(b,c),e=G(a,b,"script",e),a.explicitScriptPreloads.add(e));c={type:"script",src:b,flushed:!1,props:c,hint:e};d.set(b,c);return c} +function Fa(a,b){if(!E)throw Error('"currentResources" was expected to exist. This is a bug in React.');var c=E;switch(a){case "title":var d=b.children;d=Array.isArray(d)?1===d.length?d[0]:null:d;if("function"!==typeof d&&"symbol"!==typeof d&&null!==d&&void 0!==d){d=""+d;var e="title::"+d;a=c.headsMap.get(e);a||(b=D({},b),b.children=d,a={type:"title",props:b,flushed:!1},c.headsMap.set(e,a),c.headResources.add(a))}return!0;case "meta":if("string"===typeof b.charSet)d="charSet";else if("string"===typeof b.content)if(a= +"::"+b.content,"string"===typeof b.httpEquiv)d="httpEquiv::"+b.httpEquiv+a;else if("string"===typeof b.name)d="name::"+b.name+a;else if("string"===typeof b.itemProp)d="itemProp::"+b.itemProp+a;else if("string"===typeof b.property){var f=b.property;d="property::"+f+a;e=f;a=f.split(":").slice(0,-1).join(":");(a=c.structuredMetaKeys.get(a))&&(d=a.key+"::child::"+d)}d&&!c.headsMap.has(d)&&(b={type:"meta",key:d,props:D({},b),flushed:!1},c.headsMap.set(d,b),"charSet"===d?c.charset=b:(e&&c.structuredMetaKeys.set(e, +b),c.headResources.add(b)));return!0;case "base":return d=b.target,e=b.href,d="base"+("string"===typeof e?'[href="'+e+'"]':":not([href])")+("string"===typeof d?'[target="'+d+'"]':":not([target])"),c.headsMap.has(d)||(b={type:"base",props:D({},b),flushed:!1},c.headsMap.set(d,b),c.bases.add(b)),!0}return!1} +function Ga(a){if(!E)throw Error('"currentResources" was expected to exist. This is a bug in React.');var b=E,c=a.rel,d=a.href;if(!d||"string"!==typeof d||!c||"string"!==typeof c)return!1;switch(c){case "stylesheet":var e=a.onLoad,f=a.onError;c=a.precedence;var g=a.disabled;if("string"!==typeof c||e||f||null!=g)return c=b.preloadsMap.get(d),c||(c=G(b,d,"style",Da(d,a)),b.usedStylePreloads.add(c)),!1;e=b.stylesMap.get(d);e||(a=D({},a),a.href=d,a.rel="stylesheet",a["data-precedence"]=c,delete a.precedence, +e=Ba(E,d,c,a),b.usedStylePreloads.add(e.hint));b.boundaryResources?b.boundaryResources.add(e):e.set.add(e);return!0;case "preload":switch(e=a.as,e){case "script":case "style":case "font":c=b.preloadsMap.get(d);if(!c)switch(a=D({},a),a.href=d,a.rel="preload",a.as=e,"font"===e&&(a.crossOrigin=""),c=G(b,d,e,a),e){case "script":b.explicitScriptPreloads.add(c);break;case "style":b.explicitStylePreloads.add(c);break;case "font":b.fontPreloads.add(c)}return!0}}if(a.onLoad||a.onError)return!0;d="rel:"+c+ +"::href:"+d+"::sizes:"+("string"===typeof a.sizes?a.sizes:"")+"::media:"+("string"===typeof a.media?a.media:"");e=b.headsMap.get(d);if(!e)switch(e={type:"link",props:D({},a),flushed:!1},b.headsMap.set(d,e),c){case "preconnect":case "dns-prefetch":b.preconnects.add(e);break;default:b.headResources.add(e)}return!0}function Ha(a,b){var c=a.boundaryResources;c&&(b.forEach(function(a){return c.add(a)}),b.clear())}function Ia(a,b){b.forEach(function(a){return a.set.add(a)});b.clear()}var Ja=ea.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Dispatcher; +x('"></template>');var Ka=x("<script>"),La=x("\x3c/script>"),Ma=x('<script src="'),Na=x('<script type="module" src="'),Oa=x('" integrity="'),Pa=x('" async="">\x3c/script>'),Qa=/(<\/|<)(s)(cript)/gi;function Ra(a,b,c,d){return""+b+("s"===c?"\\u0073":"\\u0053")+d}function H(a,b,c){return{insertionMode:a,selectedValue:b,noscriptTagInScope:c}} +function Sa(a,b,c){switch(b){case "noscript":return H(1,null,!0);case "select":return H(1,null!=c.value?c.value:c.defaultValue,a.noscriptTagInScope);case "svg":return H(2,null,a.noscriptTagInScope);case "math":return H(3,null,a.noscriptTagInScope);case "foreignObject":return H(1,null,a.noscriptTagInScope);case "table":return H(4,null,a.noscriptTagInScope);case "thead":case "tbody":case "tfoot":return H(5,null,a.noscriptTagInScope);case "colgroup":return H(7,null,a.noscriptTagInScope);case "tr":return H(6, +null,a.noscriptTagInScope)}return 4<=a.insertionMode||0===a.insertionMode?H(1,null,a.noscriptTagInScope):a}var J=x("\x3c!-- --\x3e");function Ta(a,b,c,d){if(""===b)return d;d&&a.push(J);a.push(C(b));return!0}var Ua=new Map,Va=x(' style="'),Wa=x(":"),Xa=x(";"); +function Ya(a,b,c){if("object"!==typeof c)throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");b=!0;for(var d in c)if(z.call(c,d)){var e=c[d];if(null!=e&&"boolean"!==typeof e&&""!==e){if(0===d.indexOf("--")){var f=C(d);e=C((""+e).trim())}else{f=d;var g=Ua.get(f);void 0!==g?f=g:(g=x(C(f.replace(ua,"-$1").toLowerCase().replace(va,"-ms-"))),Ua.set(f,g),f=g);e="number"===typeof e?0===e||z.call(ra, +d)?""+e:e+"px":C((""+e).trim())}b?(b=!1,a.push(Va,f,Wa,e)):a.push(Xa,f,Wa,e)}}b||a.push(K)}var M=x(" "),N=x('="'),K=x('"'),Za=x('=""'); +function O(a,b,c,d){switch(c){case "style":Ya(a,b,d);return;case "defaultValue":case "defaultChecked":case "innerHTML":case "suppressContentEditableWarning":case "suppressHydrationWarning":return}if(!(2<c.length)||"o"!==c[0]&&"O"!==c[0]||"n"!==c[1]&&"N"!==c[1])if(b=B.hasOwnProperty(c)?B[c]:null,null!==b){switch(typeof d){case "function":case "symbol":return;case "boolean":if(!b.acceptsBooleans)return}c=b.attributeName;switch(b.type){case 3:d&&a.push(M,c,Za);break;case 4:!0===d?a.push(M,c,Za):!1!== +d&&a.push(M,c,N,C(d),K);break;case 5:isNaN(d)||a.push(M,c,N,C(d),K);break;case 6:!isNaN(d)&&1<=d&&a.push(M,c,N,C(d),K);break;default:b.sanitizeURL&&(d=""+d),a.push(M,c,N,C(d),K)}}else if(na(c)){switch(typeof d){case "function":case "symbol":return;case "boolean":if(b=c.toLowerCase().slice(0,5),"data-"!==b&&"aria-"!==b)return}a.push(M,c,N,C(d),K)}}var P=x(">"),$a=x("/>"); +function ab(a,b,c){if(null!=b){if(null!=c)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if("object"!==typeof b||!("__html"in b))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.");b=b.__html;null!==b&&void 0!==b&&a.push(""+b)}}function bb(a){var b="";da.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}var cb=x(' selected=""'); +function Q(a,b,c){var d="stylesheet"===b.rel;a.push(R("link"));for(var e in b)if(z.call(b,e)){var f=b[e];if(null!=f)switch(e){case "children":case "dangerouslySetInnerHTML":throw Error("link is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");case "precedence":if(d)continue;default:O(a,c,e,f)}}a.push($a);return null} +function S(a,b,c,d){a.push(R(c));for(var e in b)if(z.call(b,e)){var f=b[e];if(null!=f)switch(e){case "children":case "dangerouslySetInnerHTML":throw Error(c+" is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:O(a,d,e,f)}}a.push($a);return null} +function db(a,b,c){a.push(R("title"));var d=null,e;for(e in b)if(z.call(b,e)){var f=b[e];if(null!=f)switch(e){case "children":d=f;break;case "dangerouslySetInnerHTML":throw Error("`dangerouslySetInnerHTML` does not make sense on <title>.");default:O(a,c,e,f)}}a.push(P);b=Array.isArray(d)?2>d.length?d[0]:null:d;"function"!==typeof b&&"symbol"!==typeof b&&null!==b&&void 0!==b&&a.push(C(""+b));a.push(eb,"title",fb);return null} +function gb(a,b,c){a.push(R("script"));var d=null,e=null,f;for(f in b)if(z.call(b,f)){var g=b[f];if(null!=g)switch(f){case "children":d=g;break;case "dangerouslySetInnerHTML":e=g;break;default:O(a,c,f,g)}}a.push(P);ab(a,e,d);"string"===typeof d&&a.push(C(d));a.push(eb,"script",fb);return null} +function hb(a,b,c,d){a.push(R(c));var e=c=null,f;for(f in b)if(z.call(b,f)){var g=b[f];if(null!=g)switch(f){case "children":c=g;break;case "dangerouslySetInnerHTML":e=g;break;default:O(a,d,f,g)}}a.push(P);ab(a,e,c);return"string"===typeof c?(a.push(C(c)),null):c}var ib=x("\n"),jb=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,kb=new Map;function R(a){var b=kb.get(a);if(void 0===b){if(!jb.test(a))throw Error("Invalid tag: "+a);b=x("<"+a);kb.set(a,b)}return b}var lb=x("<!DOCTYPE html>"); +function mb(a,b,c,d,e,f,g){switch(c){case "select":a.push(R("select"));var h=g=null,m;for(m in d)if(z.call(d,m)){var n=d[m];if(null!=n)switch(m){case "children":g=n;break;case "dangerouslySetInnerHTML":h=n;break;case "defaultValue":case "value":break;default:O(a,e,m,n)}}a.push(P);ab(a,h,g);return g;case "option":g=f.selectedValue;a.push(R("option"));var q=m=n=null,p=null;for(h in d)if(z.call(d,h)){var v=d[h];if(null!=v)switch(h){case "children":n=v;break;case "selected":q=v;break;case "dangerouslySetInnerHTML":p= +v;break;case "value":m=v;default:O(a,e,h,v)}}if(null!=g)if(d=null!==m?""+m:bb(n),wa(g))for(e=0;e<g.length;e++){if(""+g[e]===d){a.push(cb);break}}else""+g===d&&a.push(cb);else q&&a.push(cb);a.push(P);ab(a,p,n);return n;case "textarea":a.push(R("textarea"));n=h=g=null;for(p in d)if(z.call(d,p)&&(m=d[p],null!=m))switch(p){case "children":n=m;break;case "value":g=m;break;case "defaultValue":h=m;break;case "dangerouslySetInnerHTML":throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>."); +default:O(a,e,p,m)}null===g&&null!==h&&(g=h);a.push(P);if(null!=n){if(null!=g)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(wa(n)&&1<n.length)throw Error("<textarea> can only have at most one child.");g=""+n}"string"===typeof g&&"\n"===g[0]&&a.push(ib);null!==g&&a.push(C(""+g));return null;case "input":a.push(R("input"));m=p=h=g=null;for(n in d)if(z.call(d,n)&&(q=d[n],null!=q))switch(n){case "children":case "dangerouslySetInnerHTML":throw Error("input is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."); +case "defaultChecked":m=q;break;case "defaultValue":h=q;break;case "checked":p=q;break;case "value":g=q;break;default:O(a,e,n,q)}null!==p?O(a,e,"checked",p):null!==m&&O(a,e,"checked",m);null!==g?O(a,e,"value",g):null!==h&&O(a,e,"value",h);a.push($a);return null;case "menuitem":a.push(R("menuitem"));for(var y in d)if(z.call(d,y)&&(g=d[y],null!=g))switch(y){case "children":case "dangerouslySetInnerHTML":throw Error("menuitems cannot have `children` nor `dangerouslySetInnerHTML`.");default:O(a,e,y,g)}a.push(P); +return null;case "title":return a=2!==f.insertionMode&&!f.noscriptTagInScope&&Fa("title",d)?null:db(a,d,e),a;case "link":return!f.noscriptTagInScope&&Ga(d)?(g&&a.push(J),a=null):a=Q(a,d,e),a;case "script":if(h=!f.noscriptTagInScope){if(!E)throw Error('"currentResources" was expected to exist. This is a bug in React.');h=E;n=d.src;p=d.onLoad;m=d.onError;n&&"string"===typeof n?d.async?(p||m?(p=h.preloadsMap.get(n),p||(p=G(h,n,"script",Ea(n,d)),h.usedScriptPreloads.add(p))):(p=h.scriptsMap.get(n),p|| +(p=D({},d),p.src=n,p=Ca(h,n,p),h.scripts.add(p))),h=!0):h=!1:h=!1}h?(g&&a.push(J),a=null):a=gb(a,d,e);return a;case "meta":return!f.noscriptTagInScope&&Fa("meta",d)?(g&&a.push(J),a=null):a=S(a,d,"meta",e),a;case "base":return!f.noscriptTagInScope&&Fa("base",d)?(g&&a.push(J),a=null):a=S(a,d,"base",e),a;case "listing":case "pre":a.push(R(c));h=g=null;for(q in d)if(z.call(d,q)&&(n=d[q],null!=n))switch(q){case "children":g=n;break;case "dangerouslySetInnerHTML":h=n;break;default:O(a,e,q,n)}a.push(P); +if(null!=h){if(null!=g)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if("object"!==typeof h||!("__html"in h))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.");d=h.__html;null!==d&&void 0!==d&&("string"===typeof d&&0<d.length&&"\n"===d[0]?a.push(ib,d):a.push(""+d))}"string"===typeof g&&"\n"===g[0]&&a.push(ib);return g;case "area":case "br":case "col":case "embed":case "hr":case "img":case "keygen":case "param":case "source":case "track":case "wbr":return S(a, +d,c,e);case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return hb(a,d,c,e);case "head":return hb(b,d,c,e);case "html":return 0===f.insertionMode&&b.push(lb),hb(b,d,c,e);default:if(-1===c.indexOf("-")&&"string"!==typeof d.is)return hb(a,d,c,e);a.push(R(c));h=g=null;for(v in d)if(z.call(d,v)&&(n=d[v],null!=n))switch(v){case "children":g=n;break;case "dangerouslySetInnerHTML":h=n;break; +case "style":Ya(a,e,n);break;case "suppressContentEditableWarning":case "suppressHydrationWarning":break;default:na(v)&&"function"!==typeof n&&"symbol"!==typeof n&&a.push(M,v,N,C(n),K)}a.push(P);ab(a,h,g);return g}}var eb=x("</"),fb=x(">"); +function nb(a,b,c){switch(c){case "title":case "script":case "area":case "base":case "br":case "col":case "embed":case "hr":case "img":case "input":case "keygen":case "link":case "meta":case "param":case "source":case "track":case "wbr":return;case "body":b.unshift(eb,c,fb);return;case "html":b.push(eb,c,fb);return}a.push(eb,c,fb)} +var ob=x('<template id="'),pb=x('"></template>'),qb=x("\x3c!--$--\x3e"),rb=x('\x3c!--$?--\x3e<template id="'),sb=x('"></template>'),tb=x("\x3c!--$!--\x3e"),ub=x("\x3c!--/$--\x3e"),vb=x("<template"),wb=x('"'),xb=x(' data-dgst="');x(' data-msg="');x(' data-stck="');var yb=x("></template>");function zb(a,b,c){t(a,rb);if(null===c)throw Error("An ID must have been assigned before we can complete the boundary.");t(a,c);return w(a,sb)} +var Ab=x('<div hidden id="'),Bb=x('">'),Cb=x("</div>"),Db=x('<svg aria-hidden="true" style="display:none" id="'),Eb=x('">'),Fb=x("</svg>"),Gb=x('<math aria-hidden="true" style="display:none" id="'),Hb=x('">'),Ib=x("</math>"),Jb=x('<table hidden id="'),Kb=x('">'),Lb=x("</table>"),Mb=x('<table hidden><tbody id="'),Nb=x('">'),Ob=x("</tbody></table>"),Pb=x('<table hidden><tr id="'),Qb=x('">'),Rb=x("</tr></table>"),Sb=x('<table hidden><colgroup id="'),Tb=x('">'),Ub=x("</colgroup></table>"); +function Vb(a,b,c,d){switch(c.insertionMode){case 0:case 1:return t(a,Ab),t(a,b.segmentPrefix),t(a,d.toString(16)),w(a,Bb);case 2:return t(a,Db),t(a,b.segmentPrefix),t(a,d.toString(16)),w(a,Eb);case 3:return t(a,Gb),t(a,b.segmentPrefix),t(a,d.toString(16)),w(a,Hb);case 4:return t(a,Jb),t(a,b.segmentPrefix),t(a,d.toString(16)),w(a,Kb);case 5:return t(a,Mb),t(a,b.segmentPrefix),t(a,d.toString(16)),w(a,Nb);case 6:return t(a,Pb),t(a,b.segmentPrefix),t(a,d.toString(16)),w(a,Qb);case 7:return t(a,Sb),t(a, +b.segmentPrefix),t(a,d.toString(16)),w(a,Tb);default:throw Error("Unknown insertion mode. This is a bug in React.");}}function Wb(a,b){switch(b.insertionMode){case 0:case 1:return w(a,Cb);case 2:return w(a,Fb);case 3:return w(a,Ib);case 4:return w(a,Lb);case 5:return w(a,Ob);case 6:return w(a,Rb);case 7:return w(a,Ub);default:throw Error("Unknown insertion mode. This is a bug in React.");}} +var Xb=x('$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};;$RS("'),Yb=x('$RS("'),Zb=x('","'),$b=x('")\x3c/script>');x('<template data-rsi="" data-sid="');x('" data-pid="'); +var ac=x('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};;$RC("'),bc=x('$RC("'), +cc=x('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};;$RM=new Map;\n$RR=function(p,q,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};;$RR("'), +dc=x('$RM=new Map;\n$RR=function(p,q,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};;$RR("'), +ec=x('$RR("'),fc=x('","'),gc=x('",'),hc=x('"'),ic=x(")\x3c/script>");x('<template data-rci="" data-bid="');x('<template data-rri="" data-bid="');x('" data-sid="');x('" data-sty="');var jc=x('$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};;$RX("'),kc=x('$RX("'),lc=x('"'),mc=x(","),nc=x(")\x3c/script>");x('<template data-rxi="" data-bid="');x('" data-dgst="');x('" data-msg="'); +x('" data-stck="');var oc=/[<\u2028\u2029]/g;function pc(a){return JSON.stringify(a).replace(oc,function(a){switch(a){case "<":return"\\u003c";case "\u2028":return"\\u2028";case "\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React");}})}var qc=/[&><\u2028\u2029]/g; +function rc(a){return JSON.stringify(a).replace(qc,function(a){switch(a){case "&":return"\\u0026";case ">":return"\\u003e";case "<":return"\\u003c";case "\u2028":return"\\u2028";case "\u2029":return"\\u2029";default:throw Error("escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React");}})}var sc=x('<style data-precedence="'),tc=x('"></style>'); +function uc(a,b,c){function d(a){a.flushed||(Q(e,a.props,c),a.flushed=!0)}var e=[],f=b.charset,g=b.bases,h=b.preconnects,m=b.fontPreloads,n=b.precedences,q=b.usedStylePreloads,p=b.scripts,v=b.usedScriptPreloads,y=b.explicitStylePreloads,L=b.explicitScriptPreloads,F=b.headResources;f&&(S(e,f.props,"meta",c),f.flushed=!0,b.charset=null);g.forEach(function(a){S(e,a.props,"base",c);a.flushed=!0});g.clear();h.forEach(function(a){Q(e,a.props,c);a.flushed=!0});h.clear();m.forEach(function(a){Q(e,a.props, +c);a.flushed=!0});m.clear();n.forEach(function(a,b){a.size?(a.forEach(function(a){Q(e,a.props,c);a.flushed=!0;a.inShell=!0;a.hint.flushed=!0}),a.clear()):e.push(sc,C(b),tc)});q.forEach(d);q.clear();p.forEach(function(a){gb(e,a.props,c);a.flushed=!0;a.hint.flushed=!0});p.clear();v.forEach(d);v.clear();y.forEach(d);y.clear();L.forEach(d);L.clear();F.forEach(function(a){switch(a.type){case "title":db(e,a.props,c);break;case "meta":S(e,a.props,"meta",c);break;case "link":Q(e,a.props,c)}a.flushed=!0}); +F.clear();f=!0;for(b=0;b<e.length-1;b++)t(a,e[b]);b<e.length&&(f=w(a,e[b]));return f} +function vc(a,b,c){function d(a){a.flushed||(Q(e,a.props,c),a.flushed=!0)}var e=[],f=b.charset,g=b.preconnects,h=b.fontPreloads,m=b.usedStylePreloads,n=b.scripts,q=b.usedScriptPreloads,p=b.explicitStylePreloads,v=b.explicitScriptPreloads,y=b.headResources;f&&(S(e,f.props,"meta",c),f.flushed=!0,b.charset=null);g.forEach(function(a){Q(e,a.props,c);a.flushed=!0});g.clear();h.forEach(function(a){Q(e,a.props,c);a.flushed=!0});h.clear();m.forEach(d);m.clear();n.forEach(function(a){hb(e,a.props,"script", +c);nb(e,e,"script",a.props);a.flushed=!0;a.hint.flushed=!0});n.clear();q.forEach(d);q.clear();p.forEach(d);p.clear();v.forEach(d);v.clear();y.forEach(function(a){switch(a.type){case "title":db(e,a.props,c);break;case "meta":S(e,a.props,"meta",c);break;case "link":Q(e,a.props,c)}a.flushed=!0});y.clear();f=!0;for(b=0;b<e.length-1;b++)t(a,e[b]);b<e.length&&(f=w(a,e[b]));return f}var wc=x("["),xc=x(",["),yc=x(","),zc=x("]"); +function Ac(a,b){t(a,wc);var c=wc;b.forEach(function(b){if(!b.inShell)if(b.flushed)t(a,c),t(a,rc(""+b.href)),t(a,zc),c=xc;else{t(a,c);var d=b.precedence,f=b.props;t(a,rc(""+b.href));d=""+d;t(a,yc);t(a,rc(d));for(var g in f)if(z.call(f,g)){var h=f[g];if(null!=h)switch(g){case "href":case "rel":case "precedence":case "data-precedence":break;case "children":case "dangerouslySetInnerHTML":throw Error("link is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:a:{d= +a;var m=g,n=m.toLowerCase();switch(typeof h){case "function":case "symbol":break a}switch(m){case "innerHTML":case "dangerouslySetInnerHTML":case "suppressContentEditableWarning":case "suppressHydrationWarning":case "style":break a;case "className":n="class";break;case "hidden":if(!1===h)break a;break;case "src":case "href":break;default:if(!na(m))break a}if(!(2<m.length)||"o"!==m[0]&&"O"!==m[0]||"n"!==m[1]&&"N"!==m[1])h=""+h,t(d,yc),t(d,rc(n)),t(d,yc),t(d,rc(h))}}}t(a,zc);c=xc;b.flushed=!0;b.hint.flushed= +!0}});t(a,zc)} +var Bc=Symbol.for("react.element"),Cc=Symbol.for("react.portal"),Dc=Symbol.for("react.fragment"),Ec=Symbol.for("react.strict_mode"),Fc=Symbol.for("react.profiler"),Gc=Symbol.for("react.provider"),Hc=Symbol.for("react.context"),Ic=Symbol.for("react.server_context"),Jc=Symbol.for("react.forward_ref"),Kc=Symbol.for("react.suspense"),Lc=Symbol.for("react.suspense_list"),Mc=Symbol.for("react.memo"),Nc=Symbol.for("react.lazy"),Oc=Symbol.for("react.scope"),Pc=Symbol.for("react.debug_trace_mode"),Qc=Symbol.for("react.offscreen"), +Rc=Symbol.for("react.legacy_hidden"),Sc=Symbol.for("react.cache"),Tc=Symbol.for("react.default_value"),Uc=Symbol.iterator; +function Vc(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case Dc:return"Fragment";case Cc:return"Portal";case Fc:return"Profiler";case Ec:return"StrictMode";case Kc:return"Suspense";case Lc:return"SuspenseList";case Sc:return"Cache"}if("object"===typeof a)switch(a.$$typeof){case Hc:return(a.displayName||"Context")+".Consumer";case Gc:return(a._context.displayName||"Context")+".Provider";case Jc:var b=a.render;a=a.displayName; +a||(a=b.displayName||b.name||"",a=""!==a?"ForwardRef("+a+")":"ForwardRef");return a;case Mc:return b=a.displayName||null,null!==b?b:Vc(a.type)||"Memo";case Nc:b=a._payload;a=a._init;try{return Vc(a(b))}catch(c){break}case Ic:return(a.displayName||a._globalName)+".Provider"}return null}var Wc=da.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Xc={};function Yc(a,b){a=a.contextTypes;if(!a)return Xc;var c={},d;for(d in a)c[d]=b[d];return c}var T=null; +function Zc(a,b){if(a!==b){a.context._currentValue=a.parentValue;a=a.parent;var c=b.parent;if(null===a){if(null!==c)throw Error("The stacks must reach the root at the same time. This is a bug in React.");}else{if(null===c)throw Error("The stacks must reach the root at the same time. This is a bug in React.");Zc(a,c)}b.context._currentValue=b.value}}function $c(a){a.context._currentValue=a.parentValue;a=a.parent;null!==a&&$c(a)} +function ad(a){var b=a.parent;null!==b&&ad(b);a.context._currentValue=a.value}function bd(a,b){a.context._currentValue=a.parentValue;a=a.parent;if(null===a)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===b.depth?Zc(a,b):bd(a,b)} +function cd(a,b){var c=b.parent;if(null===c)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===c.depth?Zc(a,c):cd(a,c);b.context._currentValue=b.value}function dd(a){var b=T;b!==a&&(null===b?ad(a):null===a?$c(b):b.depth===a.depth?Zc(b,a):b.depth>a.depth?bd(b,a):cd(b,a),T=a)} +var ed={isMounted:function(){return!1},enqueueSetState:function(a,b){a=a._reactInternals;null!==a.queue&&a.queue.push(b)},enqueueReplaceState:function(a,b){a=a._reactInternals;a.replace=!0;a.queue=[b]},enqueueForceUpdate:function(){}}; +function fd(a,b,c,d){var e=void 0!==a.state?a.state:null;a.updater=ed;a.props=c;a.state=e;var f={queue:[],replace:!1};a._reactInternals=f;var g=b.contextType;a.context="object"===typeof g&&null!==g?g._currentValue:d;g=b.getDerivedStateFromProps;"function"===typeof g&&(g=g(c,e),e=null===g||void 0===g?e:D({},e,g),a.state=e);if("function"!==typeof b.getDerivedStateFromProps&&"function"!==typeof a.getSnapshotBeforeUpdate&&("function"===typeof a.UNSAFE_componentWillMount||"function"===typeof a.componentWillMount))if(b= +a.state,"function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),b!==a.state&&ed.enqueueReplaceState(a,a.state,null),null!==f.queue&&0<f.queue.length)if(b=f.queue,g=f.replace,f.queue=null,f.replace=!1,g&&1===b.length)a.state=b[0];else{f=g?b[0]:a.state;e=!0;for(g=g?1:0;g<b.length;g++){var h=b[g];h="function"===typeof h?h.call(a,f,c,d):h;null!=h&&(e?(e=!1,f=D({},f,h)):D(f,h))}a.state=f}else f.queue=null} +var gd={id:1,overflow:""};function hd(a,b,c){var d=a.id;a=a.overflow;var e=32-id(d)-1;d&=~(1<<e);c+=1;var f=32-id(b)+e;if(30<f){var g=e-e%5;f=(d&(1<<g)-1).toString(32);d>>=g;e-=g;return{id:1<<32-id(b)+e|c<<e|d,overflow:f+a}}return{id:1<<f|c<<e|d,overflow:a}}var id=Math.clz32?Math.clz32:jd,kd=Math.log,ld=Math.LN2;function jd(a){a>>>=0;return 0===a?32:31-(kd(a)/ld|0)|0}var md=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`"); +function nd(){}function od(a,b,c){c=a[c];void 0===c?a.push(b):c!==b&&(b.then(nd,nd),b=c);switch(b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;default:if("string"!==typeof b.status)switch(a=b,a.status="pending",a.then(function(a){if("pending"===b.status){var c=b;c.status="fulfilled";c.value=a}},function(a){if("pending"===b.status){var c=b;c.status="rejected";c.reason=a}}),b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;}pd=b;throw md;}}var pd=null; +function qd(){if(null===pd)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var a=pd;pd=null;return a}function rd(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var sd="function"===typeof Object.is?Object.is:rd,U=null,td=null,ud=null,V=null,vd=!1,wd=!1,xd=0,yd=0,W=null,X=null,zd=0; +function Y(){if(null===U)throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.");return U} +function Ad(){if(0<zd)throw Error("Rendered more hooks than during the previous render");return{memoizedState:null,queue:null,next:null}}function Bd(){null===V?null===ud?(vd=!1,ud=V=Ad()):(vd=!0,V=ud):null===V.next?(vd=!1,V=V.next=Ad()):(vd=!0,V=V.next);return V}function Cd(a,b,c,d){for(;wd;)wd=!1,yd=xd=0,zd+=1,V=null,c=a(b,d);Dd();return c}function Ed(){var a=W;W=null;return a}function Dd(){td=U=null;wd=!1;ud=null;zd=0;V=X=null}function Fd(a,b){return"function"===typeof b?b(a):b} +function Gd(a,b,c){U=Y();V=Bd();if(vd){var d=V.queue;b=d.dispatch;if(null!==X&&(c=X.get(d),void 0!==c)){X.delete(d);d=V.memoizedState;do d=a(d,c.action),c=c.next;while(null!==c);V.memoizedState=d;return[d,b]}return[V.memoizedState,b]}a=a===Fd?"function"===typeof b?b():b:void 0!==c?c(b):b;V.memoizedState=a;a=V.queue={last:null,dispatch:null};a=a.dispatch=Hd.bind(null,U,a);return[V.memoizedState,a]} +function Id(a,b){U=Y();V=Bd();b=void 0===b?null:b;if(null!==V){var c=V.memoizedState;if(null!==c&&null!==b){var d=c[1];a:if(null===d)d=!1;else{for(var e=0;e<d.length&&e<b.length;e++)if(!sd(b[e],d[e])){d=!1;break a}d=!0}if(d)return c[0]}}a=a();V.memoizedState=[a,b];return a} +function Hd(a,b,c){if(25<=zd)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(a===U)if(wd=!0,a={action:c,next:null},null===X&&(X=new Map),c=X.get(b),void 0===c)X.set(b,a);else{for(b=c;null!==b.next;)b=b.next;b.next=a}}function Jd(){throw Error("startTransition cannot be called during server rendering.");}function Kd(){throw Error("Cache cannot be refreshed during server rendering.");}function Ld(){} +var Nd={readContext:function(a){return a._currentValue},useContext:function(a){Y();return a._currentValue},useMemo:Id,useReducer:Gd,useRef:function(a){U=Y();V=Bd();var b=V.memoizedState;return null===b?(a={current:a},V.memoizedState=a):b},useState:function(a){return Gd(Fd,a)},useInsertionEffect:Ld,useLayoutEffect:function(){},useCallback:function(a,b){return Id(function(){return a},b)},useImperativeHandle:Ld,useEffect:Ld,useDebugValue:Ld,useDeferredValue:function(a){Y();return a},useTransition:function(){Y(); +return[!1,Jd]},useId:function(){var a=td.treeContext;var b=a.overflow;a=a.id;a=(a&~(1<<32-id(a)-1)).toString(32)+b;var c=Md;if(null===c)throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component.");b=xd++;a=":"+c.idPrefix+"R"+a;0<b&&(a+="H"+b.toString(32));return a+":"},useMutableSource:function(a,b){Y();return b(a._source)},useSyncExternalStore:function(a,b,c){if(void 0===c)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering."); +return c()},useCacheRefresh:function(){return Kd},use:function(a){if(null!==a&&"object"===typeof a){if("function"===typeof a.then){var b=yd;yd+=1;null===W&&(W=[]);return od(W,a,b)}if(a.$$typeof===Hc||a.$$typeof===Ic)return a._currentValue}throw Error("An unsupported type was passed to use(): "+String(a));}},Md=null,Od={getCacheSignal:function(){throw Error("Not implemented.");},getCacheForType:function(){throw Error("Not implemented.");}},Pd=Wc.ReactCurrentDispatcher,Qd=Wc.ReactCurrentCache; +function Rd(a){console.error(a);return null}function Sd(){}function Td(a,b){var c=a.pingedTasks;c.push(b);1===c.length&&setImmediate(function(){return Ud(a)})}function Vd(a,b,c,d,e,f,g,h,m){a.allPendingTasks++;null===d?a.pendingRootTasks++:d.pendingTasks++;var n={node:c,ping:function(){return Td(a,n)},blockedBoundary:d,blockedSegment:e,abortSet:f,legacyContext:g,context:h,treeContext:m,thenableState:b};f.add(n);return n} +function Wd(a,b,c,d,e,f){return{status:0,id:-1,index:b,parentFlushed:!1,chunks:[],children:[],formatContext:d,boundary:c,lastPushedText:e,textEmbedded:f}}function Xd(a,b){a=a.onError(b);if(null!=a&&"string"!==typeof a)throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof a+'" instead');return a} +function Yd(a,b){var c=a.onShellError;c(b);c=a.onFatalError;c(b);null!==a.destination?(a.status=2,a.destination.destroy(b)):(a.status=1,a.fatalError=b)} +function Zd(a,b,c,d){var e=c.render(),f=d.childContextTypes;if(null!==f&&void 0!==f){var g=b.legacyContext;if("function"!==typeof c.getChildContext)d=g;else{c=c.getChildContext();for(var h in c)if(!(h in f))throw Error((Vc(d)||"Unknown")+'.getChildContext(): key "'+h+'" is not defined in childContextTypes.');d=D({},g,c)}b.legacyContext=d;Z(a,b,null,e);b.legacyContext=g}else Z(a,b,null,e)} +function $d(a,b){if(a&&a.defaultProps){b=D({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c]);return b}return b} +function ae(a,b,c,d,e,f){if("function"===typeof d)if(d.prototype&&d.prototype.isReactComponent)c=Yc(d,b.legacyContext),f=d.contextType,f=new d(e,"object"===typeof f&&null!==f?f._currentValue:c),fd(f,d,e,c),Zd(a,b,f,d);else{f=Yc(d,b.legacyContext);U={};td=b;yd=xd=0;W=c;c=d(e,f);c=Cd(d,e,c,f);var g=0!==xd;if("object"===typeof c&&null!==c&&"function"===typeof c.render&&void 0===c.$$typeof)fd(c,d,e,f),Zd(a,b,c,d);else if(g){e=b.treeContext;b.treeContext=hd(e,1,0);try{Z(a,b,null,c)}finally{b.treeContext= +e}}else Z(a,b,null,c)}else if("string"===typeof d)c=b.blockedSegment,f=mb(c.chunks,a.preamble,d,e,a.responseState,c.formatContext,c.lastPushedText),c.lastPushedText=!1,g=c.formatContext,c.formatContext=Sa(g,d,e),be(a,b,f),c.formatContext=g,nb(c.chunks,a.postamble,d),c.lastPushedText=!1;else{switch(d){case Rc:case Pc:case Ec:case Fc:case Dc:Z(a,b,null,e.children);return;case Qc:"hidden"!==e.mode&&Z(a,b,null,e.children);return;case Lc:Z(a,b,null,e.children);return;case Oc:throw Error("ReactDOMServer does not yet support scope components."); +case Kc:a:{d=b.blockedBoundary;c=b.blockedSegment;f=e.fallback;e=e.children;g=new Set;var h={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:g,errorDigest:null,resources:new Set},m=Wd(a,c.chunks.length,h,c.formatContext,!1,!1);c.children.push(m);c.lastPushedText=!1;var n=Wd(a,0,null,c.formatContext,!1,!1);n.parentFlushed=!0;b.blockedBoundary=h;b.blockedSegment=n;a.resources.boundaryResources=h.resources;try{if(be(a, +b,e),n.lastPushedText&&n.textEmbedded&&n.chunks.push(J),n.status=1,0===h.pendingTasks&&(null!==a.completedRootSegment||0<a.pendingRootTasks)&&Ia(a.resources,h.resources),ce(h,n),0===h.pendingTasks)break a}catch(q){n.status=4,h.forceClientRender=!0,h.errorDigest=Xd(a,q)}finally{a.resources.boundaryResources=d?d.resources:null,b.blockedBoundary=d,b.blockedSegment=c}b=Vd(a,null,f,d,m,g,b.legacyContext,b.context,b.treeContext);a.pingedTasks.push(b)}return}if("object"===typeof d&&null!==d)switch(d.$$typeof){case Jc:d= +d.render;U={};td=b;yd=xd=0;W=c;c=d(e,f);e=Cd(d,e,c,f);if(0!==xd){d=b.treeContext;b.treeContext=hd(d,1,0);try{Z(a,b,null,e)}finally{b.treeContext=d}}else Z(a,b,null,e);return;case Mc:d=d.type;e=$d(d,e);ae(a,b,c,d,e,f);return;case Gc:c=e.children;d=d._context;e=e.value;f=d._currentValue;d._currentValue=e;g=T;T=e={parent:g,depth:null===g?0:g.depth+1,context:d,parentValue:f,value:e};b.context=e;Z(a,b,null,c);a=T;if(null===a)throw Error("Tried to pop a Context at the root of the app. This is a bug in React."); +e=a.parentValue;a.context._currentValue=e===Tc?a.context._defaultValue:e;a=T=a.parent;b.context=a;return;case Hc:e=e.children;e=e(d._currentValue);Z(a,b,null,e);return;case Nc:f=d._init;d=f(d._payload);e=$d(d,e);ae(a,b,c,d,e,void 0);return}throw Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+((null==d?d:typeof d)+"."));}} +function Z(a,b,c,d){b.node=d;if("object"===typeof d&&null!==d){switch(d.$$typeof){case Bc:ae(a,b,c,d.type,d.props,d.ref);return;case Cc:throw Error("Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.");case Nc:c=d._init;d=c(d._payload);Z(a,b,null,d);return}if(wa(d)){de(a,b,d);return}null===d||"object"!==typeof d?c=null:(c=Uc&&d[Uc]||d["@@iterator"],c="function"===typeof c?c:null);if(c&&(c=c.call(d))){d=c.next();if(!d.done){var e= +[];do e.push(d.value),d=c.next();while(!d.done);de(a,b,e)}return}a=Object.prototype.toString.call(d);throw Error("Objects are not valid as a React child (found: "+("[object Object]"===a?"object with keys {"+Object.keys(d).join(", ")+"}":a)+"). If you meant to render a collection of children, use an array instead.");}"string"===typeof d?(c=b.blockedSegment,c.lastPushedText=Ta(b.blockedSegment.chunks,d,a.responseState,c.lastPushedText)):"number"===typeof d&&(c=b.blockedSegment,c.lastPushedText=Ta(b.blockedSegment.chunks, +""+d,a.responseState,c.lastPushedText))}function de(a,b,c){for(var d=c.length,e=0;e<d;e++){var f=b.treeContext;b.treeContext=hd(f,d,e);try{be(a,b,c[e])}finally{b.treeContext=f}}} +function be(a,b,c){var d=b.blockedSegment.formatContext,e=b.legacyContext,f=b.context;try{return Z(a,b,null,c)}catch(n){if(Dd(),c=n===md?qd():n,"object"===typeof c&&null!==c&&"function"===typeof c.then){var g=Ed(),h=b.blockedSegment,m=Wd(a,h.chunks.length,null,h.formatContext,h.lastPushedText,!0);h.children.push(m);h.lastPushedText=!1;a=Vd(a,g,b.node,b.blockedBoundary,m,b.abortSet,b.legacyContext,b.context,b.treeContext).ping;c.then(a,a);b.blockedSegment.formatContext=d;b.legacyContext=e;b.context= +f;dd(f)}else throw b.blockedSegment.formatContext=d,b.legacyContext=e,b.context=f,dd(f),c;}}function ee(a){var b=a.blockedBoundary;a=a.blockedSegment;a.status=3;fe(this,b,a)} +function ge(a,b,c){var d=a.blockedBoundary;a.blockedSegment.status=3;null===d?(b.allPendingTasks--,1!==b.status&&2!==b.status&&(Xd(b,c),Yd(b,c))):(d.pendingTasks--,d.forceClientRender||(d.forceClientRender=!0,d.errorDigest=b.onError(c),d.parentFlushed&&b.clientRenderedBoundaries.push(d)),d.fallbackAbortableTasks.forEach(function(a){return ge(a,b,c)}),d.fallbackAbortableTasks.clear(),b.allPendingTasks--,0===b.allPendingTasks&&(a=b.onAllReady,a()))} +function ce(a,b){if(0===b.chunks.length&&1===b.children.length&&null===b.children[0].boundary){var c=b.children[0];c.id=b.id;c.parentFlushed=!0;1===c.status&&ce(a,c)}else a.completedSegments.push(b)} +function fe(a,b,c){if(null===b){if(c.parentFlushed){if(null!==a.completedRootSegment)throw Error("There can only be one root segment. This is a bug in React.");a.completedRootSegment=c}a.pendingRootTasks--;0===a.pendingRootTasks&&(a.onShellError=Sd,b=a.onShellReady,b())}else b.pendingTasks--,b.forceClientRender||(0===b.pendingTasks?(c.parentFlushed&&1===c.status&&ce(b,c),(null!==a.completedRootSegment||0<a.pendingRootTasks)&&Ia(a.resources,b.resources),b.parentFlushed&&a.completedBoundaries.push(b), +b.fallbackAbortableTasks.forEach(ee,a),b.fallbackAbortableTasks.clear()):c.parentFlushed&&1===c.status&&(ce(b,c),1===b.completedSegments.length&&b.parentFlushed&&a.partialBoundaries.push(b)));a.allPendingTasks--;0===a.allPendingTasks&&(a=a.onAllReady,a())} +function Ud(a){if(2!==a.status){var b=T,c=Pd.current;Pd.current=Nd;var d=Qd.current;Qd.current=Od;var e=a.resources;xa.push(E);E=e;e=Ja.current;Ja.current=Aa;var f=Md;Md=a.responseState;try{var g=a.pingedTasks,h;for(h=0;h<g.length;h++){var m=g[h];var n=a,q=m.blockedBoundary;n.resources.boundaryResources=q?q.resources:null;var p=m.blockedSegment;if(0===p.status){dd(m.context);try{var v=m.thenableState;m.thenableState=null;Z(n,m,v,m.node);p.lastPushedText&&p.textEmbedded&&p.chunks.push(J);m.abortSet.delete(m); +p.status=1;fe(n,m.blockedBoundary,p)}catch(oa){Dd();var y=oa===md?qd():oa;if("object"===typeof y&&null!==y&&"function"===typeof y.then){var L=m.ping;y.then(L,L);m.thenableState=Ed()}else{m.abortSet.delete(m);p.status=4;var F=n,I=m.blockedBoundary,ja=y,aa=Xd(F,ja);null===I?Yd(F,ja):(I.pendingTasks--,I.forceClientRender||(I.forceClientRender=!0,I.errorDigest=aa,I.parentFlushed&&F.clientRenderedBoundaries.push(I)));F.allPendingTasks--;if(0===F.allPendingTasks){var qe=F.onAllReady;qe()}}}finally{n.resources.boundaryResources= +null}}}g.splice(0,h);null!==a.destination&&he(a,a.destination)}catch(oa){Xd(a,oa),Yd(a,oa)}finally{Md=f,Pd.current=c,Qd.current=d,E=xa.pop(),Ja.current=e,c===Nd&&dd(b)}}} +function ie(a,b,c){c.parentFlushed=!0;switch(c.status){case 0:var d=c.id=a.nextSegmentId++;c.lastPushedText=!1;c.textEmbedded=!1;a=a.responseState;t(b,ob);t(b,a.placeholderPrefix);a=d.toString(16);t(b,a);return w(b,pb);case 1:c.status=2;var e=!0;d=c.chunks;var f=0;c=c.children;for(var g=0;g<c.length;g++){for(e=c[g];f<e.index;f++)t(b,d[f]);e=je(a,b,e)}for(;f<d.length-1;f++)t(b,d[f]);f<d.length&&(e=w(b,d[f]));return e;default:throw Error("Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React."); }} -function se(a,b,c){var d=c.boundary;if(null===d)return re(a,b,c);d.parentFlushed=!0;if(d.forceClientRender)d=d.errorDigest,t(b,lb),q(b,nb),d&&(q(b,pb),q(b,B(d)),q(b,ob)),t(b,qb),re(a,b,c);else if(0<d.pendingTasks){d.rootSegmentID=a.nextSegmentId++;0<d.completedSegments.length&&a.partialBoundaries.push(d);var e=a.responseState;var f=e.nextSuspenseID++;e=u(e.boundaryPrefix+f.toString(16));d=d.id=e;rb(b,a.responseState,d);re(a,b,c)}else if(d.byteSize>a.progressiveChunkSize)d.rootSegmentID=a.nextSegmentId++,a.completedBoundaries.push(d), -rb(b,a.responseState,d.id),re(a,b,c);else{c=d.resources;if(e=a.resources.boundaryResources)c.forEach(Hc,e),c.clear();t(b,ib);c=d.completedSegments;if(1!==c.length)throw Error("A previously unvisited boundary must have exactly one root segment. This is a bug in React.");se(a,b,c[0])}return t(b,mb)}function te(a,b,c){Nb(b,a.responseState,c.formatContext,c.id);se(a,b,c);return Ob(b,c.formatContext)} -function ue(a,b,c){a.resources.boundaryResources=c.resources;for(var d=c.completedSegments,e=0;e<d.length;e++)ve(a,b,c,d[e]);d.length=0;oc(b,c.resources);a=a.responseState;d=c.id;e=c.rootSegmentID;c=c.resources;var f;b:{for(f=c.values();;){var g=f.next().value;if(!g)break;if(0===(g.state&1)){f=!0;break b}}f=!1}q(b,a.startInlineScript);f?0===(a.instructions&2)?(a.instructions|=10,q(b,2048<Vb.length?Vb.slice():Vb)):0===(a.instructions&8)?(a.instructions|=8,q(b,Wb)):q(b,Xb):0===(a.instructions&2)?(a.instructions|= -2,q(b,Tb)):q(b,Ub);if(null===d)throw Error("An ID must have been assigned before we can complete the boundary.");e=e.toString(16);q(b,d);q(b,Yb);q(b,a.segmentPrefix);q(b,e);f?(q(b,Zb),Gc(b,c)):q(b,$b);b=t(b,ac);return b} -function ve(a,b,c,d){if(2===d.status)return!0;var e=d.id;if(-1===e){if(-1===(d.id=c.rootSegmentID))throw Error("A root segment ID must have been assigned by now. This is a bug in React.");return te(a,b,d)}te(a,b,d);a=a.responseState;q(b,a.startInlineScript);0===(a.instructions&1)?(a.instructions|=1,q(b,Pb)):q(b,Qb);q(b,a.segmentPrefix);e=e.toString(16);q(b,e);q(b,Rb);q(b,a.placeholderPrefix);q(b,e);b=t(b,Sb);return b} -function qe(a,b){k=new Uint8Array(2048);l=0;fa=!0;try{var c,d=a.completedRootSegment;if(null!==d)if(0===a.pendingRootTasks){Ac(b,a.resources,a.responseState,0===a.allPendingTasks);se(a,b,d);a.completedRootSegment=null;var e=a.responseState.bootstrapChunks;for(d=0;d<e.length-1;d++)q(b,e[d]);d<e.length&&t(b,e[d])}else return;else Bc(b,a.resources,a.responseState);var f=a.clientRenderedBoundaries;for(c=0;c<f.length;c++){var g=f[c];e=b;var m=a.responseState,h=g.id,n=g.errorDigest,p=g.errorMessage,v=g.errorComponentStack; -q(e,m.startInlineScript);0===(m.instructions&4)?(m.instructions|=4,q(e,bc)):q(e,cc);if(null===h)throw Error("An ID must have been assigned before we can complete the boundary.");q(e,h);q(e,dc);if(n||p||v)q(e,ec),q(e,hc(n||""));if(p||v)q(e,ec),q(e,hc(p||""));v&&(q(e,ec),q(e,hc(v)));if(!t(e,fc)){a.destination=null;c++;f.splice(0,c);return}}f.splice(0,c);var H=a.completedBoundaries;for(c=0;c<H.length;c++)if(!ue(a,b,H[c])){a.destination=null;c++;H.splice(0,c);return}H.splice(0,c);ia(b);k=new Uint8Array(2048); -l=0;fa=!0;var A=a.partialBoundaries;for(c=0;c<A.length;c++){var Y=A[c];a:{f=a;g=b;f.resources.boundaryResources=Y.resources;var I=Y.completedSegments;for(m=0;m<I.length;m++)if(!ve(f,g,Y,I[m])){m++;I.splice(0,m);var K=!1;break a}I.splice(0,m);K=oc(g,Y.resources)}if(!K){a.destination=null;c++;A.splice(0,c);return}}A.splice(0,c);var Z=a.completedBoundaries;for(c=0;c<Z.length;c++)if(!ue(a,b,Z[c])){a.destination=null;c++;Z.splice(0,c);return}Z.splice(0,c)}finally{0===a.allPendingTasks&&0===a.pingedTasks.length&& -0===a.clientRenderedBoundaries.length&&0===a.completedBoundaries.length?(a=a.responseState,a.hasBody&&(q(b,P),q(b,"body"),q(b,Q)),a.htmlChunks&&(q(b,P),q(b,"html"),q(b,Q)),ia(b),ea(b),b.end()):(ia(b),ea(b))}}function we(a){setImmediate(function(){return be(a)})}function xe(a,b){if(1===a.status)a.status=2,b.destroy(a.fatalError);else if(2!==a.status&&null===a.destination){a.destination=b;try{qe(a,b)}catch(c){ee(a,c),fe(a,c)}}} -function ye(a,b){try{var c=a.abortableTasks;if(0<c.size){var d=void 0===b?Error("The render was aborted by the server without a reason."):b;c.forEach(function(b){return pe(b,a,d)});c.clear()}null!==a.destination&&qe(a,a.destination)}catch(e){ee(a,e),fe(a,e)}}function Be(a,b){return function(){return xe(b,a)}}function Ce(a,b){return function(){return ye(a,Error(b))}} -function De(a,b){var c=b?b.identifierPrefix:void 0,d=b?b.nonce:void 0,e=b?b.bootstrapScriptContent:void 0,f=b?b.bootstrapScripts:void 0;var g=b?b.bootstrapModules:void 0;c=void 0===c?"":c;d=void 0===d?Ba:u('<script nonce="'+B(d)+'">');var m=[];void 0!==e&&m.push(d,(""+e).replace(Ha,Ia),Ca);if(void 0!==f)for(e=0;e<f.length;e++){var h=f[e],n="string"===typeof h?void 0:h.integrity;m.push(Da,B("string"===typeof h?h:h.src));n&&m.push(Fa,B(n));m.push(Ga)}if(void 0!==g)for(f=0;f<g.length;f++)e=g[f],h="string"=== -typeof e?void 0:e.integrity,m.push(Ea,B("string"===typeof e?e:e.src)),h&&m.push(Fa,B(h)),m.push(Ga);g={bootstrapChunks:m,placeholderPrefix:u(c+"P:"),segmentPrefix:u(c+"S:"),boundaryPrefix:c+"B:",idPrefix:c,nextSuspenseID:0,streamingFormat:0,startInlineScript:d,instructions:0,externalRuntimeConfig:null,htmlChunks:null,headChunks:null,hasBody:!1,charsetChunks:[],preconnectChunks:[],preloadChunks:[],hoistableChunks:[]};c=b?b.namespaceURI:void 0;c=D("http://www.w3.org/2000/svg"===c?3:"http://www.w3.org/1998/Math/MathML"=== -c?4:0,null,!1);m=b?b.progressiveChunkSize:void 0;f=b?b.onError:void 0;e=b?b.onAllReady:void 0;h=b?b.onShellReady:void 0;n=b?b.onShellError:void 0;b=[];d=new Set;var p={preloadsMap:new Map,stylesMap:new Map,scriptsMap:new Map,fontPreloads:new Set,precedences:new Map,usedStylesheets:new Set,scripts:new Set,usedScripts:new Set,explicitStylesheetPreloads:new Set,explicitScriptPreloads:new Set,explicitOtherPreloads:new Set,boundaryResources:null};g={destination:null,responseState:g,progressiveChunkSize:void 0=== -m?12800:m,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,resources:p,completedRootSegment:null,abortableTasks:d,pingedTasks:b,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:void 0===f?Zd:f,onAllReady:void 0===e?$d:e,onShellReady:void 0===h?$d:h,onShellError:void 0===n?$d:n,onFatalError:$d};c=de(g,0,null,c,!1,!1);c.parentFlushed=!0;a=ce(g,null,a,null,c,d,ed,null,od);b.push(a);return g} -exports.renderToPipeableStream=function(a,b){var c=De(a,b),d=!1;we(c);return{pipe:function(a){if(d)throw Error("React currently only supports piping to one writable stream.");d=!0;xe(c,a);a.on("drain",Be(a,c));a.on("error",Ce(c,"The destination stream errored while writing data."));a.on("close",Ce(c,"The destination stream closed early."));return a},abort:function(a){ye(c,a)}}};exports.version="18.3.0-next-4fcc9184a-20230217"; +function je(a,b,c){var d=c.boundary;if(null===d)return ie(a,b,c);d.parentFlushed=!0;if(d.forceClientRender)d=d.errorDigest,w(b,tb),t(b,vb),d&&(t(b,xb),t(b,C(d)),t(b,wb)),w(b,yb),ie(a,b,c);else if(0<d.pendingTasks){d.rootSegmentID=a.nextSegmentId++;0<d.completedSegments.length&&a.partialBoundaries.push(d);var e=a.responseState;var f=e.nextSuspenseID++;e=x(e.boundaryPrefix+f.toString(16));d=d.id=e;zb(b,a.responseState,d);ie(a,b,c)}else if(d.byteSize>a.progressiveChunkSize)d.rootSegmentID=a.nextSegmentId++,a.completedBoundaries.push(d), +zb(b,a.responseState,d.id),ie(a,b,c);else{Ha(a.resources,d.resources);w(b,qb);c=d.completedSegments;if(1!==c.length)throw Error("A previously unvisited boundary must have exactly one root segment. This is a bug in React.");je(a,b,c[0])}return w(b,ub)}function ke(a,b,c){Vb(b,a.responseState,c.formatContext,c.id);je(a,b,c);return Wb(b,c.formatContext)} +function le(a,b,c){a.resources.boundaryResources=c.resources;for(var d=c.completedSegments,e=0;e<d.length;e++)me(a,b,c,d[e]);d.length=0;a=a.responseState;d=c.id;e=c.rootSegmentID;c=c.resources;var f;b:{for(f=c.values();;){var g=f.next().value;if(!g)break;if(!g.inShell){f=!0;break b}}f=!1}t(b,a.startInlineScript);f?a.sentCompleteBoundaryFunction?a.sentStyleInsertionFunction?t(b,ec):(a.sentStyleInsertionFunction=!0,t(b,dc)):(a.sentCompleteBoundaryFunction=!0,a.sentStyleInsertionFunction=!0,t(b,2048< +cc.length?cc.slice():cc)):a.sentCompleteBoundaryFunction?t(b,bc):(a.sentCompleteBoundaryFunction=!0,t(b,ac));if(null===d)throw Error("An ID must have been assigned before we can complete the boundary.");e=e.toString(16);t(b,d);t(b,fc);t(b,a.segmentPrefix);t(b,e);f?(t(b,gc),Ac(b,c)):t(b,hc);b=w(b,ic);return b} +function me(a,b,c,d){if(2===d.status)return!0;var e=d.id;if(-1===e){if(-1===(d.id=c.rootSegmentID))throw Error("A root segment ID must have been assigned by now. This is a bug in React.");return ke(a,b,d)}ke(a,b,d);a=a.responseState;t(b,a.startInlineScript);a.sentCompleteSegmentFunction?t(b,Yb):(a.sentCompleteSegmentFunction=!0,t(b,Xb));t(b,a.segmentPrefix);e=e.toString(16);t(b,e);t(b,Zb);t(b,a.placeholderPrefix);t(b,e);b=w(b,$b);return b} +function he(a,b){k=new Uint8Array(2048);l=0;r=!0;try{var c,d=a.completedRootSegment;if(null!==d)if(0===a.pendingRootTasks){var e=a.preamble;for(c=0;c<e.length;c++)t(b,e[c]);uc(b,a.resources,a.responseState);je(a,b,d);a.completedRootSegment=null;var f=a.responseState.bootstrapChunks;for(d=0;d<f.length-1;d++)t(b,f[d]);d<f.length&&w(b,f[d])}else return;else vc(b,a.resources,a.responseState);var g=a.clientRenderedBoundaries;for(c=0;c<g.length;c++){var h=g[c];f=b;var m=a.responseState,n=h.id,q=h.errorDigest, +p=h.errorMessage,v=h.errorComponentStack;t(f,m.startInlineScript);m.sentClientRenderFunction?t(f,kc):(m.sentClientRenderFunction=!0,t(f,jc));if(null===n)throw Error("An ID must have been assigned before we can complete the boundary.");t(f,n);t(f,lc);if(q||p||v)t(f,mc),t(f,pc(q||""));if(p||v)t(f,mc),t(f,pc(p||""));v&&(t(f,mc),t(f,pc(v)));if(!w(f,nc)){a.destination=null;c++;g.splice(0,c);return}}g.splice(0,c);var y=a.completedBoundaries;for(c=0;c<y.length;c++)if(!le(a,b,y[c])){a.destination=null;c++; +y.splice(0,c);return}y.splice(0,c);ia(b);k=new Uint8Array(2048);l=0;r=!0;var L=a.partialBoundaries;for(c=0;c<L.length;c++){var F=L[c];a:{g=a;h=b;g.resources.boundaryResources=F.resources;var I=F.completedSegments;for(m=0;m<I.length;m++)if(!me(g,h,F,I[m])){m++;I.splice(0,m);var ja=!1;break a}I.splice(0,m);ja=!0}if(!ja){a.destination=null;c++;L.splice(0,c);return}}L.splice(0,c);var aa=a.completedBoundaries;for(c=0;c<aa.length;c++)if(!le(a,b,aa[c])){a.destination=null;c++;aa.splice(0,c);return}aa.splice(0, +c)}finally{if(0===a.allPendingTasks&&0===a.pingedTasks.length&&0===a.clientRenderedBoundaries.length&&0===a.completedBoundaries.length){a=a.postamble;for(c=0;c<a.length;c++)t(b,a[c]);ia(b);fa(b);b.end()}else ia(b),fa(b)}}function ne(a){setImmediate(function(){return Ud(a)})}function oe(a,b){if(1===a.status)a.status=2,b.destroy(a.fatalError);else if(2!==a.status&&null===a.destination){a.destination=b;try{he(a,b)}catch(c){Xd(a,c),Yd(a,c)}}} +function pe(a,b){try{var c=a.abortableTasks;if(0<c.size){var d=void 0===b?Error("The render was aborted by the server without a reason."):b;c.forEach(function(b){return ge(b,a,d)});c.clear()}null!==a.destination&&he(a,a.destination)}catch(e){Xd(a,e),Yd(a,e)}}function re(a,b){return function(){return oe(b,a)}}function se(a,b){return function(){return pe(a,Error(b))}} +function te(a,b){var c=b?b.identifierPrefix:void 0,d=b?b.nonce:void 0,e=b?b.bootstrapScriptContent:void 0,f=b?b.bootstrapScripts:void 0;var g=b?b.bootstrapModules:void 0;c=void 0===c?"":c;d=void 0===d?Ka:x('<script nonce="'+C(d)+'">');var h=[];void 0!==e&&h.push(d,(""+e).replace(Qa,Ra),La);if(void 0!==f)for(e=0;e<f.length;e++){var m=f[e],n="string"===typeof m?void 0:m.integrity;h.push(Ma,C("string"===typeof m?m:m.src));n&&h.push(Oa,C(n));h.push(Pa)}if(void 0!==g)for(f=0;f<g.length;f++)e=g[f],m="string"=== +typeof e?void 0:e.integrity,h.push(Na,C("string"===typeof e?e:e.src)),m&&h.push(Oa,C(m)),h.push(Pa);g={bootstrapChunks:h,placeholderPrefix:x(c+"P:"),segmentPrefix:x(c+"S:"),boundaryPrefix:c+"B:",idPrefix:c,nextSuspenseID:0,streamingFormat:0,startInlineScript:d,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1,sentStyleInsertionFunction:!1,externalRuntimeConfig:null};c=b?b.namespaceURI:void 0;c=H("http://www.w3.org/2000/svg"===c?2:"http://www.w3.org/1998/Math/MathML"=== +c?3:0,null,!1);h=b?b.progressiveChunkSize:void 0;f=b?b.onError:void 0;e=b?b.onAllReady:void 0;m=b?b.onShellReady:void 0;n=b?b.onShellError:void 0;b=[];d=new Set;var q={preloadsMap:new Map,stylesMap:new Map,scriptsMap:new Map,headsMap:new Map,charset:null,bases:new Set,preconnects:new Set,fontPreloads:new Set,precedences:new Map,usedStylePreloads:new Set,scripts:new Set,usedScriptPreloads:new Set,explicitStylePreloads:new Set,explicitScriptPreloads:new Set,headResources:new Set,structuredMetaKeys:new Map, +boundaryResources:null};g={destination:null,responseState:g,progressiveChunkSize:void 0===h?12800:h,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,resources:q,completedRootSegment:null,abortableTasks:d,pingedTasks:b,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],preamble:[],postamble:[],onError:void 0===f?Rd:f,onAllReady:void 0===e?Sd:e,onShellReady:void 0===m?Sd:m,onShellError:void 0===n?Sd:n,onFatalError:Sd};c=Wd(g,0,null,c,!1,!1);c.parentFlushed= +!0;a=Vd(g,null,a,null,c,d,Xc,null,gd);b.push(a);return g}exports.renderToPipeableStream=function(a,b){var c=te(a,b),d=!1;ne(c);return{pipe:function(a){if(d)throw Error("React currently only supports piping to one writable stream.");d=!0;oe(c,a);a.on("drain",re(a,c));a.on("error",se(c,"The destination stream errored while writing data."));a.on("close",se(c,"The destination stream closed early."));return a},abort:function(a){pe(c,a)}}};exports.version="18.3.0-next-6ddcbd4f9-20230209"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom.development.js index 8d8d956d30643..6441a37a50903 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom.development.js @@ -123,7 +123,7 @@ var OffscreenComponent = 22; var LegacyHiddenComponent = 23; var CacheComponent = 24; var TracingMarkerComponent = 25; -var HostHoistable = 26; +var HostResource = 26; var HostSingleton = 27; // ----------------------------------------------------------------------------- @@ -317,7 +317,7 @@ function getInstanceFromNode(node) { if (inst) { var tag = inst.tag; - if (tag === HostComponent || tag === HostText || tag === SuspenseComponent || ( tag === HostHoistable ) || ( tag === HostSingleton ) || tag === HostRoot) { + if (tag === HostComponent || tag === HostText || tag === SuspenseComponent || ( tag === HostResource ) || ( tag === HostSingleton ) || tag === HostRoot) { return inst; } else { return null; @@ -334,7 +334,7 @@ function getInstanceFromNode(node) { function getNodeFromInstance(inst) { var tag = inst.tag; - if (tag === HostComponent || ( tag === HostHoistable ) || ( tag === HostSingleton ) || tag === HostText) { + if (tag === HostComponent || ( tag === HostResource ) || ( tag === HostSingleton ) || tag === HostText) { // In Fiber this, is just the state node right now. We assume it will be // a host component or host text. return inst.stateNode; @@ -364,8 +364,10 @@ function getResourcesFromRoot(root) { if (!resources) { resources = root[internalRootNodeResourcesKey] = { - hoistableStyles: new Map(), - hoistableScripts: new Map() + styles: new Map(), + scripts: new Map(), + head: new Map(), + lastStructuredMeta: new Map() }; } @@ -1495,7 +1497,7 @@ function describeFiber(fiber) { var source = fiber._debugSource ; switch (fiber.tag) { - case HostHoistable: + case HostResource: case HostSingleton: case HostComponent: return describeBuiltInComponentFrame(fiber.type); @@ -1688,7 +1690,7 @@ function getComponentNameFromFiber(fiber) { case Fragment: return 'Fragment'; - case HostHoistable: + case HostResource: case HostSingleton: case HostComponent: // Host component type is the display name (e.g. "div", "View") @@ -2839,7 +2841,6 @@ var isUnitlessNumber = { opacity: true, order: true, orphans: true, - scale: true, tabSize: true, widows: true, zIndex: true, @@ -4993,7 +4994,7 @@ function findCurrentHostFiberImpl(node) { // Next we'll drill down this component to find the first HostComponent/Text. var tag = node.tag; - if (tag === HostComponent || ( tag === HostHoistable ) || ( tag === HostSingleton ) || tag === HostText) { + if (tag === HostComponent || ( tag === HostResource ) || ( tag === HostSingleton ) || tag === HostText) { return node; } @@ -5021,7 +5022,7 @@ function findCurrentHostFiberWithNoPortalsImpl(node) { // Next we'll drill down this component to find the first HostComponent/Text. var tag = node.tag; - if (tag === HostComponent || ( tag === HostHoistable ) || ( tag === HostSingleton ) || tag === HostText) { + if (tag === HostComponent || ( tag === HostResource ) || ( tag === HostSingleton ) || tag === HostText) { return node; } @@ -9635,7 +9636,7 @@ function dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativ var parentTag = parentNode.tag; - if (parentTag === HostComponent || parentTag === HostText || ( parentTag === HostHoistable ) || ( parentTag === HostSingleton )) { + if (parentTag === HostComponent || parentTag === HostText || ( parentTag === HostResource ) || ( parentTag === HostSingleton )) { node = ancestorInst = parentNode; continue mainLoop; } @@ -9674,7 +9675,7 @@ function accumulateSinglePhaseListeners(targetFiber, reactName, nativeEventType, stateNode = _instance2.stateNode, tag = _instance2.tag; // Handle listeners that are on HostComponents (i.e. <div>) - if ((tag === HostComponent || ( tag === HostHoistable ) || ( tag === HostSingleton )) && stateNode !== null) { + if ((tag === HostComponent || ( tag === HostResource ) || ( tag === HostSingleton )) && stateNode !== null) { lastHostComponent = stateNode; // createEventHandle listeners @@ -9716,7 +9717,7 @@ function accumulateTwoPhaseListeners(targetFiber, reactName) { stateNode = _instance3.stateNode, tag = _instance3.tag; // Handle listeners that are on HostComponents (i.e. <div>) - if ((tag === HostComponent || ( tag === HostHoistable ) || ( tag === HostSingleton )) && stateNode !== null) { + if ((tag === HostComponent || ( tag === HostResource ) || ( tag === HostSingleton )) && stateNode !== null) { var currentTarget = stateNode; var captureListener = getListener(instance, captureName); @@ -9824,7 +9825,7 @@ function accumulateEnterLeaveListenersForEvent(dispatchQueue, event, target, com break; } - if ((tag === HostComponent || ( tag === HostHoistable ) || ( tag === HostSingleton )) && stateNode !== null) { + if ((tag === HostComponent || ( tag === HostResource ) || ( tag === HostSingleton )) && stateNode !== null) { var currentTarget = stateNode; if (inCapturePhase) { @@ -11232,6 +11233,268 @@ var updatedAncestorInfoDev = function () {}; }; } +function warnOnMissingHrefAndRel(pendingProps, currentProps) { + { + if (currentProps != null) { + var originalResourceName = typeof currentProps.href === 'string' ? "Resource with href \"" + currentProps.href + "\"" : 'Resource'; + var originalRelStatement = getValueDescriptorExpectingEnumForWarning(currentProps.rel); + var pendingRel = getValueDescriptorExpectingEnumForWarning(pendingProps.rel); + var pendingHref = getValueDescriptorExpectingEnumForWarning(pendingProps.href); + + if (typeof pendingProps.rel !== 'string') { + error('A <link> previously rendered as a %s with rel "%s" but was updated with an invalid rel: %s. When a link' + ' does not have a valid rel prop it is not represented in the DOM. If this is intentional, instead' + ' do not render the <link> anymore.', originalResourceName, originalRelStatement, pendingRel); + } else if (typeof pendingProps.href !== 'string') { + error('A <link> previously rendered as a %s but was updated with an invalid href prop: %s. When a link' + ' does not have a valid href prop it is not represented in the DOM. If this is intentional, instead' + ' do not render the <link> anymore.', originalResourceName, pendingHref); + } + } else { + var _pendingRel = getValueDescriptorExpectingEnumForWarning(pendingProps.rel); + + var _pendingHref = getValueDescriptorExpectingEnumForWarning(pendingProps.href); + + if (typeof pendingProps.rel !== 'string') { + error('A <link> is rendering with an invalid rel: %s. When a link' + ' does not have a valid rel prop it is not represented in the DOM. If this is intentional, instead' + ' do not render the <link> anymore.', _pendingRel); + } else if (typeof pendingProps.href !== 'string') { + error('A <link> is rendering with an invalid href: %s. When a link' + ' does not have a valid href prop it is not represented in the DOM. If this is intentional, instead' + ' do not render the <link> anymore.', _pendingHref); + } + } + } +} +function validatePreloadResourceDifference(originalProps, originalImplicit, latestProps, latestImplicit) { + { + var href = originalProps.href; + var originalWarningName = getResourceNameForWarning('preload', originalProps, originalImplicit); + var latestWarningName = getResourceNameForWarning('preload', latestProps, latestImplicit); + + if (latestProps.as !== originalProps.as) { + error('A %s is using the same href "%s" as a %s. This is always an error and React will only keep the first preload' + ' for any given href, discarding subsequent instances. To fix, find where you are using this href in link' + ' tags or in calls to ReactDOM.preload() or ReactDOM.preinit() and either make the Resource types agree or' + ' update the hrefs to be distinct for different Resource types.', latestWarningName, href, originalWarningName); + } else { + var missingProps = null; + var extraProps = null; + var differentProps = null; + + if (originalProps.media != null && latestProps.media == null) { + missingProps = missingProps || {}; + missingProps.media = originalProps.media; + } + + for (var propName in latestProps) { + var propValue = latestProps[propName]; + var originalValue = originalProps[propName]; + + if (propValue != null && propValue !== originalValue) { + if (originalValue == null) { + extraProps = extraProps || {}; + extraProps[propName] = propValue; + } else { + differentProps = differentProps || {}; + differentProps[propName] = { + original: originalValue, + latest: propValue + }; + } + } + } + + if (missingProps || extraProps || differentProps) { + warnDifferentProps(href, 'href', originalWarningName, latestWarningName, extraProps, missingProps, differentProps); + } + } + } +} +function validateStyleResourceDifference(originalProps, latestProps) { + { + var href = originalProps.href; // eslint-disable-next-line no-labels + + var originalWarningName = getResourceNameForWarning('style', originalProps, false); + var latestWarningName = getResourceNameForWarning('style', latestProps, false); + var missingProps = null; + var extraProps = null; + var differentProps = null; + + if (originalProps.media != null && latestProps.media == null) { + missingProps = missingProps || {}; + missingProps.media = originalProps.media; + } + + for (var propName in latestProps) { + var propValue = latestProps[propName]; + var originalValue = originalProps[propName]; + + if (propValue != null && propValue !== originalValue) { + propName = propName === 'data-precedence' ? 'precedence' : propName; + + if (originalValue == null) { + extraProps = extraProps || {}; + extraProps[propName] = propValue; + } else { + differentProps = differentProps || {}; + differentProps[propName] = { + original: originalValue, + latest: propValue + }; + } + } + } + + if (missingProps || extraProps || differentProps) { + warnDifferentProps(href, 'href', originalWarningName, latestWarningName, extraProps, missingProps, differentProps); + } + } +} +function validateScriptResourceDifference(originalProps, latestProps) { + { + var src = originalProps.src; // eslint-disable-next-line no-labels + + var originalWarningName = getResourceNameForWarning('script', originalProps, false); + var latestWarningName = getResourceNameForWarning('script', latestProps, false); + var extraProps = null; + var differentProps = null; + + for (var propName in latestProps) { + var propValue = latestProps[propName]; + var originalValue = originalProps[propName]; + + if (propValue != null && propValue !== originalValue) { + if (originalValue == null) { + extraProps = extraProps || {}; + extraProps[propName] = propValue; + } else { + differentProps = differentProps || {}; + differentProps[propName] = { + original: originalValue, + latest: propValue + }; + } + } + } + + if (extraProps || differentProps) { + warnDifferentProps(src, 'src', originalWarningName, latestWarningName, extraProps, null, differentProps); + } + } +} + +function warnDifferentProps(url, urlPropKey, originalName, latestName, extraProps, missingProps, differentProps) { + { + var juxtaposedNameStatement = latestName === originalName ? 'an earlier instance of this Resource' : "a " + originalName + " with the same " + urlPropKey; + var comparisonStatement = ''; + + if (missingProps !== null && typeof missingProps === 'object') { + for (var propName in missingProps) { + comparisonStatement += "\n " + propName + ": missing or null in latest props, \"" + missingProps[propName] + "\" in original props"; + } + } + + if (extraProps !== null && typeof extraProps === 'object') { + for (var _propName in extraProps) { + comparisonStatement += "\n " + _propName + ": \"" + extraProps[_propName] + "\" in latest props, missing or null in original props"; + } + } + + if (differentProps !== null && typeof differentProps === 'object') { + for (var _propName2 in differentProps) { + comparisonStatement += "\n " + _propName2 + ": \"" + differentProps[_propName2].latest + "\" in latest props, \"" + differentProps[_propName2].original + "\" in original props"; + } + } + + error('A %s with %s "%s" has props that disagree with those found on %s. Resources always use the props' + ' that were provided the first time they are encountered so any differences will be ignored. Please' + ' update Resources that share an %s to have props that agree. The differences are described below.%s', latestName, urlPropKey, url, juxtaposedNameStatement, urlPropKey, comparisonStatement); + } +} + +function getResourceNameForWarning(type, props, implicit) { + { + switch (type) { + case 'style': + { + return 'style Resource'; + } + + case 'script': + { + return 'script Resource'; + } + + case 'preload': + { + if (implicit) { + return "preload for a " + props.as + " Resource"; + } + + return "preload Resource (as \"" + props.as + "\")"; + } + } + } + + return 'Resource'; +} + +function validateURLKeyedUpdatedProps(pendingProps, currentProps, resourceType, urlPropKey) { + { + // This function should never be called if we don't have /srcs so we don't bother considering + // Whether they are null or undefined + if (pendingProps[urlPropKey] === currentProps[urlPropKey]) { + // If we have the same href/src we need all other props to be the same + var missingProps; + var extraProps; + var differentProps; + var allProps = Array.from(new Set(Object.keys(currentProps).concat(Object.keys(pendingProps)))); + + for (var i = 0; i < allProps.length; i++) { + var propName = allProps[i]; + var pendingValue = pendingProps[propName]; + var currentValue = currentProps[propName]; + + if (pendingValue !== currentValue && !(pendingValue == null && currentValue == null)) { + if (pendingValue == null) { + missingProps = missingProps || {}; + missingProps[propName] = currentValue; + } else if (currentValue == null) { + extraProps = extraProps || {}; + extraProps[propName] = pendingValue; + } else { + differentProps = differentProps || {}; + differentProps[propName] = { + original: currentValue, + latest: pendingValue + }; + } + } + } + + if (missingProps || extraProps || differentProps) { + var latestWarningName = getResourceNameForWarning(resourceType, currentProps, false); + var comparisonStatement = ''; + + if (missingProps !== null && typeof missingProps === 'object') { + for (var _propName3 in missingProps) { + // $FlowFixMe[incompatible-type] + comparisonStatement += "\n " + _propName3 + ": missing or null in latest props, \"" + missingProps[_propName3] + "\" in original props"; + } + } + + if (extraProps !== null && typeof extraProps === 'object') { + for (var _propName4 in extraProps) { + // $FlowFixMe[incompatible-type] + comparisonStatement += "\n " + _propName4 + ": \"" + extraProps[_propName4] + "\" in latest props, missing or null in original props"; + } + } + + if (differentProps !== null && typeof differentProps === 'object') { + for (var _propName5 in differentProps) { + // $FlowFixMe[incompatible-type] + comparisonStatement += "\n " + _propName5 + ": \"" + differentProps[_propName5].latest + "\" in latest props, \"" + differentProps[_propName5].original + "\" in original props"; + } + } + + error('A %s with %s "%s" received new props with different values from the props used' + ' when this Resource was first rendered. React will only use the props provided when' + ' this resource was first rendered until a new %s is provided. Unlike conventional' + ' DOM elements, Resources instances do not have a one to one correspondence with Elements' + ' in the DOM and as such, every instance of a Resource for a single Resource identifier' + ' (%s) must have props that agree with each other. The differences are described below.%s', latestWarningName, urlPropKey, currentProps[urlPropKey], urlPropKey, urlPropKey, comparisonStatement); + + return true; + } + } + } + + return false; +} function validateLinkPropsForStyleResource(props) { { // This should only be called when we know we are opting into Resource semantics (i.e. precedence is not null) @@ -11239,16 +11502,17 @@ function validateLinkPropsForStyleResource(props) { onLoad = props.onLoad, onError = props.onError, disabled = props.disabled; + var allProps = ['onLoad', 'onError', 'disabled']; var includedProps = []; - if (onLoad) includedProps.push('`onLoad`'); - if (onError) includedProps.push('`onError`'); - if (disabled != null) includedProps.push('`disabled`'); + if (onLoad) includedProps.push('onLoad'); + if (onError) includedProps.push('onError'); + if (disabled != null) includedProps.push('disabled'); + var allPropsUnionPhrase = propNamesListJoin(allProps, 'or'); var includedPropsPhrase = propNamesListJoin(includedProps, 'and'); includedPropsPhrase += includedProps.length === 1 ? ' prop' : ' props'; - var withArticlePhrase = includedProps.length === 1 ? 'an ' + includedPropsPhrase : 'the ' + includedPropsPhrase; if (includedProps.length) { - error('React encountered a <link rel="stylesheet" href="%s" ... /> with a `precedence` prop that' + ' also included %s. The presence of loading and error handlers indicates an intent to manage' + ' the stylesheet loading state from your from your Component code and React will not hoist or' + ' deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet' + ' using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.', href, withArticlePhrase, includedPropsPhrase); + error('A link (rel="stylesheet") element with href "%s" has the precedence prop but also included the %s.' + ' When using %s React will opt out of Resource behavior. If you meant for this' + ' element to be treated as a Resource remove the %s. Otherwise remove the precedence prop.', href, includedPropsPhrase, allPropsUnionPhrase, includedPropsPhrase); return true; } @@ -11273,6 +11537,22 @@ function propNamesListJoin(list, combinator) { } } +function validateLinkPropsForPreloadResource(linkProps) { + { + var href = linkProps.href, + as = linkProps.as; + + if (as === 'font') { + var name = getResourceNameForWarning('preload', linkProps, false); + + if (!hasOwnProperty.call(linkProps, 'crossOrigin')) { + error('A %s with href "%s" did not specify the crossOrigin prop. Font preloads must always use' + ' anonymouse CORS mode. To fix add an empty string, "anonymous", or any other string' + ' value except "use-credentials" for the crossOrigin prop of all font preloads.', name, href); + } else if (linkProps.crossOrigin === 'use-credentials') { + error('A %s with href "%s" specified a crossOrigin value of "use-credentials". Font preloads must always use' + ' anonymouse CORS mode. To fix use an empty string, "anonymous", or any other string' + ' value except "use-credentials" for the crossOrigin prop of all font preloads.', name, href); + } + } + } +} function validatePreloadArguments(href, options) { { if (!href || typeof href !== 'string') { @@ -11345,11 +11625,13 @@ function validatePreinitArguments(href, options) { } } } + function getValueDescriptorExpectingObjectForWarning(thing) { - return thing === null ? '`null`' : thing === undefined ? '`undefined`' : thing === '' ? 'an empty string' : "something with type \"" + typeof thing + "\""; + return thing === null ? 'null' : thing === undefined ? 'undefined' : thing === '' ? 'an empty string' : "something with type \"" + typeof thing + "\""; } + function getValueDescriptorExpectingEnumForWarning(thing) { - return thing === null ? '`null`' : thing === undefined ? '`undefined`' : thing === '' ? 'an empty string' : typeof thing === 'string' ? JSON.stringify(thing) : "something with type \"" + typeof thing + "\""; + return thing === null ? 'null' : thing === undefined ? 'undefined' : thing === '' ? 'an empty string' : typeof thing === 'string' ? JSON.stringify(thing) : "something with type \"" + typeof thing + "\""; } var valueStack = []; @@ -11483,6 +11765,10 @@ function popHostContext(fiber) { var Dispatcher = Internals.Dispatcher; // In the future this may need to change, especially when modules / scripts are supported +// Brief on purpose due to insertion by script when streaming late boundaries +// s = Status +// l = loaded +// e = errored // It is valid to preload even when we aren't actively rendering. For cases where Float functions are // called when there is no rendering we track the last used document. It is not safe to insert // arbitrary resources into the lastCurrentDocument b/c it may not actually be the document @@ -11493,7 +11779,7 @@ var Dispatcher = Internals.Dispatcher; var lastCurrentDocument = null; var previousDispatcher = null; function prepareToRenderResources(rootContainer) { - var rootNode = getHoistableRoot(rootContainer); + var rootNode = getRootNode(rootContainer); lastCurrentDocument = getDocumentFromRoot(rootNode); previousDispatcher = Dispatcher.current; Dispatcher.current = ReactDOMClientDispatcher; @@ -11510,9 +11796,9 @@ var ReactDOMClientDispatcher = { preinit: preinit }; // global maps of Resources -var preloadPropsMap = new Map(); // getRootNode is missing from IE and old jsdom versions +var preloadResources = new Map(); // getRootNode is missing from IE and old jsdom versions -function getHoistableRoot(container) { +function getRootNode(container) { // $FlowFixMe[method-unbinding] return typeof container.getRootNode === 'function' ? /* $FlowFixMe[incompatible-return] Flow types this as returning a `Node`, @@ -11522,7 +11808,26 @@ function getHoistableRoot(container) { function getCurrentResourceRoot() { var currentContainer = getCurrentRootHostContainer(); - return currentContainer ? getHoistableRoot(currentContainer) : null; + return currentContainer ? getRootNode(currentContainer) : null; +} // This resource type constraint can be loosened. It really is everything except PreloadResource +// because that is the only one that does not have an optional instance type. Expand as needed. + + +function resetInstance(resource) { + resource.instance = undefined; +} + +function clearRootResources(rootContainer) { + var rootNode = getRootNode(rootContainer); + var resources = getResourcesFromRoot(rootNode); // We can't actually delete the resource cache because this function is called + // during commit after we have rendered. Instead we detatch any instances from + // the Resource object if they are going to be cleared + // Styles stay put + // Scripts get reset + + resources.scripts.forEach(resetInstance); // Head Resources get reset + + resources.head.forEach(resetInstance); // lastStructuredMeta stays put } // Preloads are somewhat special. Even if we don't have the Document // used by the root that is rendering a component trying to insert a preload // we can still seed the file cache by doing the preload on any document we have @@ -11530,7 +11835,6 @@ function getCurrentResourceRoot() { // lastCurrentDocument if that exists. As a fallback we will use the window.document // if available. - function getDocumentForPreloads() { var root = getCurrentResourceRoot(); @@ -11561,30 +11865,17 @@ function preload(href, options) { if (typeof href === 'string' && href && typeof options === 'object' && options !== null && ownerDocument) { var as = options.as; - var limitedEscapedHref = escapeSelectorAttributeValueInsideDoubleQuotes(href); - var preloadKey = "link[rel=\"preload\"][as=\"" + as + "\"][href=\"" + limitedEscapedHref + "\"]"; - var key = preloadKey; + var resource = preloadResources.get(href); - switch (as) { - case 'style': - key = getStyleKey(href); - break; - - case 'script': - key = getScriptKey(href); - break; - } - - if (!preloadPropsMap.has(key)) { - var preloadProps = preloadPropsFromPreloadOptions(href, as, options); - preloadPropsMap.set(key, preloadProps); - - if (null === ownerDocument.querySelector(preloadKey)) { - var preloadInstance = createElement('link', preloadProps, ownerDocument, HTML_NAMESPACE); - setInitialProperties(preloadInstance, 'link', preloadProps); - markNodeAsResource(preloadInstance); - ownerDocument.head.appendChild(preloadInstance); + if (resource) { + { + var originallyImplicit = resource._dev_implicit_construction === true; + var latestProps = preloadPropsFromPreloadOptions(href, as, options); + validatePreloadResourceDifference(resource.props, originallyImplicit, latestProps, false); } + } else { + var resourceProps = preloadPropsFromPreloadOptions(href, as, options); + createPreloadResource(ownerDocument, href, resourceProps); } } } @@ -11612,39 +11903,18 @@ function preinit(href, options) { var as = options.as; if (!resourceRoot) { - if (as === 'style' || as === 'script') { - // We are going to emit a preload as a best effort fallback since this preinit - // was called outside of a render. Given the passive nature of this fallback - // we do not warn in dev when props disagree if there happens to already be a - // matching preload with this href - var preloadDocument = getDocumentForPreloads(); - - if (preloadDocument) { - var limitedEscapedHref = escapeSelectorAttributeValueInsideDoubleQuotes(href); - var preloadKey = "link[rel=\"preload\"][as=\"" + as + "\"][href=\"" + limitedEscapedHref + "\"]"; - var key = preloadKey; - - switch (as) { - case 'style': - key = getStyleKey(href); - break; + // We are going to emit a preload as a best effort fallback since this preinit + // was called outside of a render. Given the passive nature of this fallback + // we do not warn in dev when props disagree if there happens to already be a + // matching preload with this href + var preloadDocument = getDocumentForPreloads(); - case 'script': - key = getScriptKey(href); - break; - } + if (preloadDocument) { + var preloadResource = preloadResources.get(href); - if (!preloadPropsMap.has(key)) { - var preloadProps = preloadPropsFromPreinitOptions(href, as, options); - preloadPropsMap.set(key, preloadProps); - - if (null === preloadDocument.querySelector(preloadKey)) { - var preloadInstance = createElement('link', preloadProps, preloadDocument, HTML_NAMESPACE); - setInitialProperties(preloadInstance, 'link', preloadProps); - markNodeAsResource(preloadInstance); - preloadDocument.head.appendChild(preloadInstance); - } - } + if (!preloadResource) { + var preloadProps = preloadPropsFromPreinitOptions(href, as, options); + createPreloadResource(preloadDocument, href, preloadProps); } } @@ -11654,91 +11924,44 @@ function preinit(href, options) { switch (as) { case 'style': { - var styles = getResourcesFromRoot(resourceRoot).hoistableStyles; - - var _key = getStyleKey(href); - - var precedence = options.precedence || 'default'; // Check if this resource already exists - - var resource = styles.get(_key); + var styleResources = getResourcesFromRoot(resourceRoot).styles; + var precedence = options.precedence || 'default'; + var resource = styleResources.get(href); if (resource) { - // We can early return. The resource exists and there is nothing - // more to do - return; - } // Attempt to hydrate instance from DOM - - - var instance = resourceRoot.querySelector(getStylesheetSelectorFromKey(_key)); - - if (!instance) { - // Construct a new instance and insert it - var stylesheetProps = stylesheetPropsFromPreinitOptions(href, precedence, options); - - var _preloadProps = preloadPropsMap.get(_key); - - if (_preloadProps) { - adoptPreloadPropsForStylesheet(stylesheetProps, _preloadProps); + { + var latestProps = stylePropsFromPreinitOptions(href, precedence, options); + validateStyleResourceDifference(resource.props, latestProps); } + } else { + var resourceProps = stylePropsFromPreinitOptions(href, precedence, options); + resource = createStyleResource(styleResources, resourceRoot, href, precedence, resourceProps); + } - instance = createElement('link', stylesheetProps, resourceRoot, HTML_NAMESPACE); - markNodeAsResource(instance); - setInitialProperties(instance, 'link', stylesheetProps); - insertStylesheet(instance, precedence, resourceRoot); - } // Construct a Resource and cache it - - - resource = { - type: 'stylesheet', - instance: instance, - count: 1 - }; - styles.set(_key, resource); + acquireResource(resource); return; } case 'script': { var src = href; - var scripts = getResourcesFromRoot(resourceRoot).hoistableScripts; + var scriptResources = getResourcesFromRoot(resourceRoot).scripts; - var _key2 = getScriptKey(src); // Check if this resource already exists - - - var _resource = scripts.get(_key2); + var _resource = scriptResources.get(src); if (_resource) { - // We can early return. The resource exists and there is nothing - // more to do - return; - } // Attempt to hydrate instance from DOM - - - var _instance = resourceRoot.querySelector(getScriptSelectorFromKey(_key2)); - - if (!_instance) { - // Construct a new instance and insert it - var scriptProps = scriptPropsFromPreinitOptions(src, options); // Adopt certain preload props - - var _preloadProps2 = preloadPropsMap.get(_key2); + { + var _latestProps = scriptPropsFromPreinitOptions(src, options); - if (_preloadProps2) { - adoptPreloadPropsForScript(scriptProps, _preloadProps2); + validateScriptResourceDifference(_resource.props, _latestProps); } + } else { + var _resourceProps = scriptPropsFromPreinitOptions(src, options); - _instance = createElement('script', scriptProps, resourceRoot, HTML_NAMESPACE); - markNodeAsResource(_instance); - setInitialProperties(_instance, 'link', scriptProps); - getDocumentFromRoot(resourceRoot).head.appendChild(_instance); - } // Construct a Resource and cache it - + _resource = createScriptResource(scriptResources, resourceRoot, src, _resourceProps); + } - _resource = { - type: 'script', - instance: _instance, - count: 1 - }; - scripts.set(_key2, _resource); + acquireResource(_resource); return; } } @@ -11755,7 +11978,7 @@ function preloadPropsFromPreinitOptions(href, as, options) { }; } -function stylesheetPropsFromPreinitOptions(href, precedence, options) { +function stylePropsFromPreinitOptions(href, precedence, options) { return { rel: 'stylesheet', href: href, @@ -11774,10 +11997,14 @@ function scriptPropsFromPreinitOptions(src, options) { } // -------------------------------------- // Resources from render // -------------------------------------- -// This function is called in begin work and we should always have a currentDocument set -function getResource(type, currentProps, pendingProps) { +function getTitleKey(child) { + return 'title:' + child; +} // This function is called in begin work and we should always have a currentDocument set + + +function getResource(type, pendingProps, currentProps) { var resourceRoot = getCurrentResourceRoot(); if (!resourceRoot) { @@ -11785,158 +12012,523 @@ function getResource(type, currentProps, pendingProps) { } switch (type) { - case 'meta': - case 'title': + case 'base': { - return null; + var headRoot = getDocumentFromRoot(resourceRoot); + var headResources = getResourcesFromRoot(headRoot).head; + var target = pendingProps.target, + href = pendingProps.href; + var matcher = 'base'; + matcher += typeof href === 'string' ? "[href=\"" + escapeSelectorAttributeValueInsideDoubleQuotes(href) + "\"]" : ':not([href])'; + matcher += typeof target === 'string' ? "[target=\"" + escapeSelectorAttributeValueInsideDoubleQuotes(target) + "\"]" : ':not([target])'; + var resource = headResources.get(matcher); + + if (!resource) { + resource = { + type: 'base', + matcher: matcher, + props: assign({}, pendingProps), + count: 0, + instance: null, + root: headRoot + }; + headResources.set(matcher, resource); + } + + return resource; } - case 'style': + case 'meta': { - if (typeof pendingProps.precedence === 'string' && typeof pendingProps.href === 'string') { - var key = getStyleKey(pendingProps.href); - var styles = getResourcesFromRoot(resourceRoot).hoistableStyles; - var resource = styles.get(key); - - if (!resource) { - resource = { - type: 'style', + var _matcher, propertyString, parentResource; + + var charSet = pendingProps.charSet, + content = pendingProps.content, + httpEquiv = pendingProps.httpEquiv, + name = pendingProps.name, + itemProp = pendingProps.itemProp, + property = pendingProps.property; + + var _headRoot = getDocumentFromRoot(resourceRoot); + + var _getResourcesFromRoot = getResourcesFromRoot(_headRoot), + _headResources = _getResourcesFromRoot.head, + lastStructuredMeta = _getResourcesFromRoot.lastStructuredMeta; + + if (typeof charSet === 'string') { + _matcher = 'meta[charset]'; + } else if (typeof content === 'string') { + if (typeof httpEquiv === 'string') { + _matcher = "meta[http-equiv=\"" + escapeSelectorAttributeValueInsideDoubleQuotes(httpEquiv) + "\"][content=\"" + escapeSelectorAttributeValueInsideDoubleQuotes(content) + "\"]"; + } else if (typeof property === 'string') { + propertyString = property; + _matcher = "meta[property=\"" + escapeSelectorAttributeValueInsideDoubleQuotes(property) + "\"][content=\"" + escapeSelectorAttributeValueInsideDoubleQuotes(content) + "\"]"; + var parentPropertyPath = property.split(':').slice(0, -1).join(':'); + parentResource = lastStructuredMeta.get(parentPropertyPath); + + if (parentResource) { + // When using parentResource the matcher is not functional for locating + // the instance in the DOM but it still serves as a unique key. + _matcher = parentResource.matcher + _matcher; + } + } else if (typeof name === 'string') { + _matcher = "meta[name=\"" + escapeSelectorAttributeValueInsideDoubleQuotes(name) + "\"][content=\"" + escapeSelectorAttributeValueInsideDoubleQuotes(content) + "\"]"; + } else if (typeof itemProp === 'string') { + _matcher = "meta[itemprop=\"" + escapeSelectorAttributeValueInsideDoubleQuotes(itemProp) + "\"][content=\"" + escapeSelectorAttributeValueInsideDoubleQuotes(content) + "\"]"; + } + } + + if (_matcher) { + var _resource2 = _headResources.get(_matcher); + + if (!_resource2) { + _resource2 = { + type: 'meta', + matcher: _matcher, + property: propertyString, + parentResource: parentResource, + props: assign({}, pendingProps), + count: 0, instance: null, - count: 0 + root: _headRoot }; - styles.set(key, resource); + + _headResources.set(_matcher, _resource2); + } + + if (typeof _resource2.property === 'string') { + // We cast because flow doesn't know that this resource must be a Meta resource + lastStructuredMeta.set(_resource2.property, _resource2); } - return resource; + return _resource2; } - return { - type: 'void', - instance: null, - count: 0 - }; + return null; } - case 'link': + case 'title': { - if (pendingProps.rel === 'stylesheet' && typeof pendingProps.href === 'string' && typeof pendingProps.precedence === 'string') { - var qualifiedProps = pendingProps; + var children = pendingProps.children; + var child; + + if (Array.isArray(children)) { + child = children.length === 1 ? children[0] : null; + } else { + child = children; + } - var _key3 = getStyleKey(qualifiedProps.href); + if (typeof child !== 'function' && typeof child !== 'symbol' && child !== null && child !== undefined) { + // eslint-disable-next-line react-internal/safe-string-coercion + var childString = '' + child; - var _styles = getResourcesFromRoot(resourceRoot).hoistableStyles; + var _headRoot2 = getDocumentFromRoot(resourceRoot); - var _resource2 = _styles.get(_key3); + var _headResources2 = getResourcesFromRoot(_headRoot2).head; + var key = getTitleKey(childString); - if (!_resource2) { - // We asserted this above but Flow can't figure out that the type satisfies - var ownerDocument = getDocumentFromRoot(resourceRoot); - _resource2 = { - type: 'stylesheet', + var _resource3 = _headResources2.get(key); + + if (!_resource3) { + var titleProps = titlePropsFromRawProps(childString, pendingProps); + _resource3 = { + type: 'title', + props: titleProps, + count: 0, instance: null, - count: 0 + root: _headRoot2 }; - _styles.set(_key3, _resource2); - - if (!preloadPropsMap.has(_key3)) { - preloadStylesheet(ownerDocument, _key3, preloadPropsFromStylesheet(qualifiedProps)); - } + _headResources2.set(key, _resource3); } - return _resource2; + return _resource3; } return null; } + case 'link': + { + var rel = pendingProps.rel; + + switch (rel) { + case 'stylesheet': + { + var styleResources = getResourcesFromRoot(resourceRoot).styles; + var didWarn; + + { + if (currentProps) { + didWarn = validateURLKeyedUpdatedProps(pendingProps, currentProps, 'style', 'href'); + } + + if (!didWarn) { + didWarn = validateLinkPropsForStyleResource(pendingProps); + } + } + + var precedence = pendingProps.precedence, + _href = pendingProps.href; + + if (typeof _href === 'string' && typeof precedence === 'string') { + // We've asserted all the specific types for StyleQualifyingProps + var styleRawProps = pendingProps; // We construct or get an existing resource for the style itself and return it + + var _resource4 = styleResources.get(_href); + + if (_resource4) { + { + if (!didWarn) { + var latestProps = stylePropsFromRawProps(styleRawProps); + + if (_resource4._dev_preload_props) { + adoptPreloadPropsForStyle(latestProps, _resource4._dev_preload_props); + } + + validateStyleResourceDifference(_resource4.props, latestProps); + } + } + } else { + var resourceProps = stylePropsFromRawProps(styleRawProps); + _resource4 = createStyleResource(styleResources, resourceRoot, _href, precedence, resourceProps); + immediatelyPreloadStyleResource(_resource4); + } + + return _resource4; + } + + return null; + } + + case 'preload': + { + { + validateLinkPropsForPreloadResource(pendingProps); + } + + var _href2 = pendingProps.href; + + if (typeof _href2 === 'string') { + // We've asserted all the specific types for PreloadQualifyingProps + var preloadRawProps = pendingProps; + + var _resource5 = preloadResources.get(_href2); + + if (_resource5) { + { + var originallyImplicit = _resource5._dev_implicit_construction === true; + + var _latestProps2 = preloadPropsFromRawProps(preloadRawProps); + + validatePreloadResourceDifference(_resource5.props, originallyImplicit, _latestProps2, false); + } + } else { + var _resourceProps2 = preloadPropsFromRawProps(preloadRawProps); + + _resource5 = createPreloadResource(getDocumentFromRoot(resourceRoot), _href2, _resourceProps2); + } + + return _resource5; + } + + return null; + } + + default: + { + var _href3 = pendingProps.href, + sizes = pendingProps.sizes, + media = pendingProps.media; + + if (typeof rel === 'string' && typeof _href3 === 'string') { + var sizeKey = '::sizes:' + (typeof sizes === 'string' ? sizes : ''); + var mediaKey = '::media:' + (typeof media === 'string' ? media : ''); + + var _key = 'rel:' + rel + '::href:' + _href3 + sizeKey + mediaKey; + + var _headRoot3 = getDocumentFromRoot(resourceRoot); + + var _headResources3 = getResourcesFromRoot(_headRoot3).head; + + var _resource6 = _headResources3.get(_key); + + if (!_resource6) { + _resource6 = { + type: 'link', + props: assign({}, pendingProps), + count: 0, + instance: null, + root: _headRoot3 + }; + + _headResources3.set(_key, _resource6); + } + + return _resource6; + } + + { + warnOnMissingHrefAndRel(pendingProps, currentProps); + } + + return null; + } + } + } + case 'script': { - if (typeof pendingProps.src === 'string' && pendingProps.async === true) { - var scriptProps = pendingProps; + var scriptResources = getResourcesFromRoot(resourceRoot).scripts; + + var _didWarn; + + { + if (currentProps) { + _didWarn = validateURLKeyedUpdatedProps(pendingProps, currentProps, 'script', 'src'); + } + } - var _key4 = getScriptKey(scriptProps.src); + var src = pendingProps.src, + async = pendingProps.async; - var scripts = getResourcesFromRoot(resourceRoot).hoistableScripts; + if (async && typeof src === 'string') { + var scriptRawProps = pendingProps; - var _resource3 = scripts.get(_key4); + var _resource7 = scriptResources.get(src); - if (!_resource3) { - _resource3 = { - type: 'script', - instance: null, - count: 0 - }; - scripts.set(_key4, _resource3); + if (_resource7) { + { + if (!_didWarn) { + var _latestProps3 = scriptPropsFromRawProps(scriptRawProps); + + if (_resource7._dev_preload_props) { + adoptPreloadPropsForScript(_latestProps3, _resource7._dev_preload_props); + } + + validateScriptResourceDifference(_resource7.props, _latestProps3); + } + } + } else { + var _resourceProps3 = scriptPropsFromRawProps(scriptRawProps); + + _resource7 = createScriptResource(scriptResources, resourceRoot, src, _resourceProps3); } - return _resource3; + return _resource7; } - return { - type: 'void', - instance: null, - count: 0 - }; + return null; } default: { - throw new Error("getResource encountered a type it did not expect: \"" + type + "\". this is a bug in React."); + throw new Error("getResource encountered a resource type it did not expect: \"" + type + "\". this is a bug in React."); } } } -function styleTagPropsFromRawProps(rawProps) { - return assign({}, rawProps, { - 'data-href': rawProps.href, - 'data-precedence': rawProps.precedence, - href: null, - precedence: null - }); +function preloadPropsFromRawProps(rawBorrowedProps) { + // $FlowFixMe[prop-missing] - recommended fix is to use object spread operator + return assign({}, rawBorrowedProps); } -function getStyleKey(href) { - var limitedEscapedHref = escapeSelectorAttributeValueInsideDoubleQuotes(href); - return "href=\"" + limitedEscapedHref + "\""; +function titlePropsFromRawProps(child, rawProps) { + var props = assign({}, rawProps); + + props.children = child; + return props; } -function getStyleTagSelectorFromKey(key) { - return "style[data-" + key + "]"; +function stylePropsFromRawProps(rawProps) { + // $FlowFixMe[prop-missing] - recommended fix is to use object spread operator + var props = assign({}, rawProps); + + props['data-precedence'] = rawProps.precedence; + props.precedence = null; + return props; +} + +function scriptPropsFromRawProps(rawProps) { + // $FlowFixMe[prop-missing] - recommended fix is to use object spread operator + var props = assign({}, rawProps); + + return props; +} // -------------------------------------- +// Resource Reconciliation +// -------------------------------------- + + +function acquireResource(resource) { + switch (resource.type) { + case 'base': + case 'title': + case 'link': + case 'meta': + { + return acquireHeadResource(resource); + } + + case 'style': + { + return acquireStyleResource(resource); + } + + case 'script': + { + return acquireScriptResource(resource); + } + + case 'preload': + { + return resource.instance; + } + + default: + { + throw new Error("acquireResource encountered a resource type it did not expect: \"" + resource.type + "\". this is a bug in React."); + } + } } +function releaseResource(resource) { + switch (resource.type) { + case 'link': + case 'title': + case 'meta': + { + return releaseHeadResource(resource); + } -function getStylesheetSelectorFromKey(key) { - return "link[rel=\"stylesheet\"][" + key + "]"; + case 'style': + { + resource.count--; + return; + } + } } -function getPreloadStylesheetSelectorFromKey(key) { - return "link[rel=\"preload\"][as=\"style\"][" + key + "]"; +function releaseHeadResource(resource) { + if (--resource.count === 0) { + // the instance will have existed since we acquired it + var instance = resource.instance; + var parent = instance.parentNode; + + if (parent) { + parent.removeChild(instance); + } + + resource.instance = null; + } } -function stylesheetPropsFromRawProps(rawProps) { - return assign({}, rawProps, { - 'data-precedence': rawProps.precedence, - precedence: null - }); +function createResourceInstance(type, props, ownerDocument) { + var element = createElement(type, props, ownerDocument, HTML_NAMESPACE); + setInitialProperties(element, type, props); + markNodeAsResource(element); + return element; } -function preloadStylesheet(ownerDocument, key, preloadProps) { - preloadPropsMap.set(key, preloadProps); +function createStyleResource(styleResources, root, href, precedence, props) { + { + if (styleResources.has(href)) { + error('createStyleResource was called when a style Resource matching the same href already exists. This is a bug in React.'); + } + } + + var limitedEscapedHref = escapeSelectorAttributeValueInsideDoubleQuotes(href); + var existingEl = root.querySelector("link[rel=\"stylesheet\"][href=\"" + limitedEscapedHref + "\"]"); + var resource = { + type: 'style', + count: 0, + href: href, + precedence: precedence, + props: props, + hint: null, + preloaded: false, + loaded: false, + error: false, + root: root, + instance: null + }; + styleResources.set(href, resource); + + if (existingEl) { + // If we have an existing element in the DOM we don't need to preload this resource nor can we + // adopt props from any preload that might exist already for this resource. We do need to try + // to reify the Resource loading state the best we can. + var loadingState = existingEl._p; + + if (loadingState) { + switch (loadingState.s) { + case 'l': + { + resource.loaded = true; + break; + } + + case 'e': + { + resource.error = true; + break; + } + + default: + { + attachLoadListeners(existingEl, resource); + } + } + } else { + // This is unfortunately just an assumption. The rationale here is that stylesheets without + // a loading state must have been flushed in the shell and would have blocked until loading + // or error. we can't know afterwards which happened for all types of stylesheets (cross origin) + // for instance) and the techniques for determining if a sheet has loaded that we do have still + // fail if the sheet loaded zero rules. At the moment we are going to just opt to assume the + // sheet is loaded if it was flushed in the shell + resource.loaded = true; + } + } else { + var hint = preloadResources.get(href); + + if (hint) { + // $FlowFixMe[incompatible-type]: found when upgrading Flow + resource.hint = hint; // If a preload for this style Resource already exists there are certain props we want to adopt + // on the style Resource, primarily focussed on making sure the style network pathways utilize + // the preload pathways. For instance if you have diffreent crossOrigin attributes for a preload + // and a stylesheet the stylesheet will make a new request even if the preload had already loaded - if (!ownerDocument.querySelector(getStylesheetSelectorFromKey(key))) { - // There is no matching stylesheet instance in the Document. - // We will insert a preload now to kick off loading because - // we expect this stylesheet to commit - if (null === ownerDocument.querySelector(getPreloadStylesheetSelectorFromKey(key))) { - var preloadInstance = createElement('link', preloadProps, ownerDocument, HTML_NAMESPACE); - setInitialProperties(preloadInstance, 'link', preloadProps); - markNodeAsResource(preloadInstance); - ownerDocument.head.appendChild(preloadInstance); + var preloadProps = hint.props; + adoptPreloadPropsForStyle(resource.props, hint.props); + + { + resource._dev_preload_props = preloadProps; + } } } + + return resource; +} + +function adoptPreloadPropsForStyle(styleProps, preloadProps) { + if (styleProps.crossOrigin == null) styleProps.crossOrigin = preloadProps.crossOrigin; + if (styleProps.referrerPolicy == null) styleProps.referrerPolicy = preloadProps.referrerPolicy; + if (styleProps.title == null) styleProps.title = preloadProps.title; +} + +function immediatelyPreloadStyleResource(resource) { + // This function must be called synchronously after creating a styleResource otherwise it may + // violate assumptions around the existence of a preload. The reason it is extracted out is we + // don't always want to preload a style, in particular when we are going to synchronously insert + // that style. We confirm the style resource has no preload already and then construct it. If + // we wait and call this later it is possible a preload will already exist for this href + if (resource.loaded === false && resource.hint === null) { + var href = resource.href, + props = resource.props; + var preloadProps = preloadPropsFromStyleProps(props); + resource.hint = createPreloadResource(getDocumentFromRoot(resource.root), href, preloadProps); + } } -function preloadPropsFromStylesheet(props) { +function preloadPropsFromStyleProps(props) { return { rel: 'preload', as: 'style', @@ -11949,141 +12541,315 @@ function preloadPropsFromStylesheet(props) { }; } -function getScriptKey(src) { +function createScriptResource(scriptResources, root, src, props) { + { + if (scriptResources.has(src)) { + error('createScriptResource was called when a script Resource matching the same src already exists. This is a bug in React.'); + } + } + var limitedEscapedSrc = escapeSelectorAttributeValueInsideDoubleQuotes(src); - return "[src=\"" + limitedEscapedSrc + "\"]"; + var existingEl = root.querySelector("script[async][src=\"" + limitedEscapedSrc + "\"]"); + var resource = { + type: 'script', + src: src, + props: props, + root: root, + instance: existingEl || null + }; + scriptResources.set(src, resource); + + if (!existingEl) { + var hint = preloadResources.get(src); + + if (hint) { + // If a preload for this style Resource already exists there are certain props we want to adopt + // on the style Resource, primarily focussed on making sure the style network pathways utilize + // the preload pathways. For instance if you have diffreent crossOrigin attributes for a preload + // and a stylesheet the stylesheet will make a new request even if the preload had already loaded + var preloadProps = hint.props; + adoptPreloadPropsForScript(props, hint.props); + + { + resource._dev_preload_props = preloadProps; + } + } + } else { + markNodeAsResource(existingEl); + } + + return resource; } -function getScriptSelectorFromKey(key) { - return 'script[async]' + key; -} // -------------------------------------- -// Hoistable Resource Reconciliation -// -------------------------------------- +function adoptPreloadPropsForScript(scriptProps, preloadProps) { + if (scriptProps.crossOrigin == null) scriptProps.crossOrigin = preloadProps.crossOrigin; + if (scriptProps.referrerPolicy == null) scriptProps.referrerPolicy = preloadProps.referrerPolicy; + if (scriptProps.integrity == null) scriptProps.referrerPolicy = preloadProps.integrity; +} + +function createPreloadResource(ownerDocument, href, props) { + var limitedEscapedHref = escapeSelectorAttributeValueInsideDoubleQuotes(href); + var element = ownerDocument.querySelector("link[rel=\"preload\"][href=\"" + limitedEscapedHref + "\"]"); + if (!element) { + element = createResourceInstance('link', props, ownerDocument); + insertResourceInstanceBefore(ownerDocument, element, null); + } else { + markNodeAsResource(element); + } -function acquireResource(hoistableRoot, resource, props) { + return { + type: 'preload', + href: href, + ownerDocument: ownerDocument, + props: props, + instance: element + }; +} + +function acquireHeadResource(resource) { resource.count++; + var instance = resource.instance; - if (resource.instance === null) { - switch (resource.type) { - case 'style': + if (!instance) { + var props = resource.props, + root = resource.root, + type = resource.type; + + switch (type) { + case 'title': { - var qualifiedProps = props; - var key = getStyleKey(qualifiedProps.href); // Attempt to hydrate instance from DOM + var titles = root.querySelectorAll('title'); + + for (var i = 0; i < titles.length; i++) { + if (titles[i].textContent === props.children) { + instance = resource.instance = titles[i]; + markNodeAsResource(instance); + return instance; + } + } - var instance = hoistableRoot.querySelector(getStyleTagSelectorFromKey(key)); + instance = resource.instance = createResourceInstance(type, props, root); + var firstTitle = titles[0]; + insertResourceInstanceBefore(root, instance, firstTitle && firstTitle.namespaceURI !== SVG_NAMESPACE ? firstTitle : null); + break; + } - if (instance) { + case 'meta': + { + var insertBefore = null; + var metaResource = resource; + var matcher = metaResource.matcher, + property = metaResource.property, + parentResource = metaResource.parentResource; + + if (parentResource && typeof property === 'string') { + // This resoruce is a structured meta type with a parent. + // Instead of using the matcher we just traverse forward + // siblings of the parent instance until we find a match + // or exhaust. + var parent = parentResource.instance; + + if (parent) { + var node = null; + var nextNode = insertBefore = parent.nextSibling; + + while (node = nextNode) { + nextNode = node.nextSibling; + + if (node.nodeName === 'META') { + var meta = node; + var propertyAttr = meta.getAttribute('property'); + + if (typeof propertyAttr !== 'string') { + continue; + } else if (propertyAttr === property && meta.getAttribute('content') === props.content) { + resource.instance = meta; + markNodeAsResource(meta); + return meta; + } else if (property.startsWith(propertyAttr + ':')) { + // This meta starts a new instance of a parent structure for this meta type + // We need to halt our search here because even if we find a later match it + // is for a different parent element + break; + } + } + } + } + } else if (instance = root.querySelector(matcher)) { resource.instance = instance; + markNodeAsResource(instance); return instance; } - var styleProps = styleTagPropsFromRawProps(props); - instance = createElement('style', styleProps, hoistableRoot, HTML_NAMESPACE); - markNodeAsResource(instance); - setInitialProperties(instance, 'style', styleProps); - insertStylesheet(instance, qualifiedProps.precedence, hoistableRoot); - resource.instance = instance; - return instance; + instance = resource.instance = createResourceInstance(type, props, root); + insertResourceInstanceBefore(root, instance, insertBefore); + break; } - case 'stylesheet': + case 'link': { - // This typing is enforce by `getResource`. If we change the logic - // there for what qualifies as a stylesheet resource we need to ensure - // this cast still makes sense; - var _qualifiedProps = props; - - var _key5 = getStyleKey(_qualifiedProps.href); // Attempt to hydrate instance from DOM + var linkProps = props; + var limitedEscapedRel = escapeSelectorAttributeValueInsideDoubleQuotes(linkProps.rel); + var limitedEscapedHref = escapeSelectorAttributeValueInsideDoubleQuotes(linkProps.href); + var selector = "link[rel=\"" + limitedEscapedRel + "\"][href=\"" + limitedEscapedHref + "\"]"; + + if (typeof linkProps.sizes === 'string') { + var limitedEscapedSizes = escapeSelectorAttributeValueInsideDoubleQuotes(linkProps.sizes); + selector += "[sizes=\"" + limitedEscapedSizes + "\"]"; + } + if (typeof linkProps.media === 'string') { + var limitedEscapedMedia = escapeSelectorAttributeValueInsideDoubleQuotes(linkProps.media); + selector += "[media=\"" + limitedEscapedMedia + "\"]"; + } - var _instance2 = hoistableRoot.querySelector(getStylesheetSelectorFromKey(_key5)); + var existingEl = root.querySelector(selector); - if (_instance2) { - resource.instance = _instance2; - return _instance2; + if (existingEl) { + instance = resource.instance = existingEl; + markNodeAsResource(instance); + return instance; } - var stylesheetProps = stylesheetPropsFromRawProps(props); - var preloadProps = preloadPropsMap.get(_key5); + instance = resource.instance = createResourceInstance(type, props, root); + insertResourceInstanceBefore(root, instance, null); + return instance; + } - if (preloadProps) { - adoptPreloadPropsForStylesheet(stylesheetProps, preloadProps); - } // Construct and insert a new instance + case 'base': + { + var baseResource = resource; + var _matcher2 = baseResource.matcher; + var base = root.querySelector(_matcher2); + if (base) { + instance = resource.instance = base; + markNodeAsResource(instance); + } else { + instance = resource.instance = createResourceInstance(type, props, root); + insertResourceInstanceBefore(root, instance, root.querySelector('base')); + } - _instance2 = createElement('link', stylesheetProps, hoistableRoot, HTML_NAMESPACE); - markNodeAsResource(_instance2); - var linkInstance = _instance2; - linkInstance._p = new Promise(function (resolve, reject) { - linkInstance.onload = resolve; - linkInstance.onerror = reject; - }).then(function () { - return linkInstance._p.s = 'l'; - }, function () { - return linkInstance._p.s = 'e'; - }); - setInitialProperties(_instance2, 'link', stylesheetProps); - insertStylesheet(_instance2, _qualifiedProps.precedence, hoistableRoot); - resource.instance = _instance2; - return _instance2; + return instance; } - case 'script': + default: { - // This typing is enforce by `getResource`. If we change the logic - // there for what qualifies as a stylesheet resource we need to ensure - // this cast still makes sense; - var borrowedScriptProps = props; + throw new Error("acquireHeadResource encountered a resource type it did not expect: \"" + type + "\". This is a bug in React."); + } + } + } - var _key6 = getScriptKey(borrowedScriptProps.src); // Attempt to hydrate instance from DOM + return instance; +} +function acquireStyleResource(resource) { + var instance = resource.instance; + + if (!instance) { + var props = resource.props, + root = resource.root, + precedence = resource.precedence; + var limitedEscapedHref = escapeSelectorAttributeValueInsideDoubleQuotes(props.href); + var existingEl = root.querySelector("link[rel=\"stylesheet\"][data-precedence][href=\"" + limitedEscapedHref + "\"]"); + + if (existingEl) { + instance = resource.instance = existingEl; + markNodeAsResource(instance); + resource.preloaded = true; + var loadingState = existingEl._p; + + if (loadingState) { + // if an existingEl is found there should always be a loadingState because if + // the resource was flushed in the head it should have already been found when + // the resource was first created. Still defensively we gate this + switch (loadingState.s) { + case 'l': + { + resource.loaded = true; + resource.error = false; + break; + } - var _instance3 = hoistableRoot.querySelector(getScriptSelectorFromKey(_key6)); + case 'e': + { + resource.error = true; + break; + } - if (_instance3) { - resource.instance = _instance3; - return _instance3; - } + default: + { + attachLoadListeners(existingEl, resource); + } + } + } else { + resource.loaded = true; + } + } else { + instance = resource.instance = createResourceInstance('link', resource.props, getDocumentFromRoot(root)); + attachLoadListeners(instance, resource); + insertStyleInstance(instance, precedence, root); + } + } - var scriptProps = borrowedScriptProps; + resource.count++; + return instance; +} - var _preloadProps3 = preloadPropsMap.get(_key6); +function acquireScriptResource(resource) { + var instance = resource.instance; - if (_preloadProps3) { - scriptProps = assign({}, borrowedScriptProps); - adoptPreloadPropsForScript(scriptProps, _preloadProps3); - } // Construct and insert a new instance + if (!instance) { + var props = resource.props, + root = resource.root; + var limitedEscapedSrc = escapeSelectorAttributeValueInsideDoubleQuotes(props.src); + var existingEl = root.querySelector("script[async][src=\"" + limitedEscapedSrc + "\"]"); + if (existingEl) { + instance = resource.instance = existingEl; + markNodeAsResource(instance); + } else { + instance = resource.instance = createResourceInstance('script', resource.props, getDocumentFromRoot(root)); + insertResourceInstanceBefore(getDocumentFromRoot(root), instance, null); + } + } - _instance3 = createElement('script', scriptProps, hoistableRoot, HTML_NAMESPACE); - markNodeAsResource(_instance3); - setInitialProperties(_instance3, 'link', scriptProps); - getDocumentFromRoot(hoistableRoot).head.appendChild(_instance3); - resource.instance = _instance3; - return _instance3; - } + return instance; +} - case 'void': - { - return null; - } +function attachLoadListeners(instance, resource) { + var listeners = {}; + listeners.load = onResourceLoad.bind(null, instance, resource, listeners, loadAndErrorEventListenerOptions); + listeners.error = onResourceError.bind(null, instance, resource, listeners, loadAndErrorEventListenerOptions); + instance.addEventListener('load', listeners.load, loadAndErrorEventListenerOptions); + instance.addEventListener('error', listeners.error, loadAndErrorEventListenerOptions); +} - default: - { - throw new Error("acquireResource encountered a resource type it did not expect: \"" + resource.type + "\". this is a bug in React."); - } - } - } +var loadAndErrorEventListenerOptions = { + passive: true +}; + +function onResourceLoad(instance, resource, listeners, listenerOptions) { + resource.loaded = true; + resource.error = false; - return resource.instance; + for (var event in listeners) { + instance.removeEventListener(event, listeners[event], listenerOptions); + } } -function releaseResource(resource) { - resource.count--; + +function onResourceError(instance, resource, listeners, listenerOptions) { + resource.loaded = false; + resource.error = true; + + for (var event in listeners) { + instance.removeEventListener(event, listeners[event], listenerOptions); + } } -function insertStylesheet(instance, precedence, root) { - var nodes = root.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'); +function insertStyleInstance(instance, precedence, root) { + var nodes = root.querySelectorAll('link[rel="stylesheet"][data-precedence]'); var last = nodes.length ? nodes[nodes.length - 1] : null; var prior = last; @@ -12105,199 +12871,36 @@ function insertStylesheet(instance, precedence, root) { prior.parentNode.insertBefore(instance, prior.nextSibling); } else { var parent = root.nodeType === DOCUMENT_NODE ? root.head : root; - parent.insertBefore(instance, parent.firstChild); - } -} -function adoptPreloadPropsForStylesheet(stylesheetProps, preloadProps) { - if (stylesheetProps.crossOrigin == null) stylesheetProps.crossOrigin = preloadProps.crossOrigin; - if (stylesheetProps.referrerPolicy == null) stylesheetProps.referrerPolicy = preloadProps.referrerPolicy; - if (stylesheetProps.title == null) stylesheetProps.title = preloadProps.title; + if (parent) { + parent.insertBefore(instance, parent.firstChild); + } else { + throw new Error('While attempting to insert a Resource, React expected the Document to contain' + ' a head element but it was not found.'); + } + } } -function adoptPreloadPropsForScript(scriptProps, preloadProps) { - if (scriptProps.crossOrigin == null) scriptProps.crossOrigin = preloadProps.crossOrigin; - if (scriptProps.referrerPolicy == null) scriptProps.referrerPolicy = preloadProps.referrerPolicy; - if (scriptProps.integrity == null) scriptProps.referrerPolicy = preloadProps.integrity; -} // -------------------------------------- -// Hoistable Element Reconciliation -// -------------------------------------- - - -function hydrateHoistable(hoistableRoot, type, props, internalInstanceHandle) { - var ownerDocument = getDocumentFromRoot(hoistableRoot); - var nodes = ownerDocument.getElementsByTagName(type); - var children = props.children; - var child, childString; - - if (Array.isArray(children)) { - child = children.length === 1 ? children[0] : null; - } else { - child = children; +function insertResourceInstanceBefore(ownerDocument, instance, before) { + { + if (instance.tagName === 'LINK' && instance.rel === 'stylesheet') { + error('insertResourceInstanceBefore was called with a stylesheet. Stylesheets must be' + ' inserted with insertStyleInstance instead. This is a bug in React.'); + } } - if (typeof child !== 'function' && typeof child !== 'symbol' && child !== null && child !== undefined) { - { - checkPropStringCoercion(child, 'children'); - } + var parent = before && before.parentNode || ownerDocument.head; - childString = '' + child; + if (parent) { + parent.insertBefore(instance, before); } else { - childString = ''; + throw new Error('While attempting to insert a Resource, React expected the Document to contain' + ' a head element but it was not found.'); } - - nodeLoop: for (var i = 0; i < nodes.length; i++) { - var node = nodes[i]; - - if (isMarkedResource(node) || node.namespaceURI === SVG_NAMESPACE || node.textContent !== childString) { - continue; - } - - var checkedAttributes = 0; - - for (var propName in props) { - var propValue = props[propName]; - - if (!props.hasOwnProperty(propName)) { - continue; - } - - switch (propName) { - // Reserved props will never have an attribute partner - case 'children': - case 'defaultValue': - case 'dangerouslySetInnerHTML': - case 'defaultChecked': - case 'innerHTML': - case 'suppressContentEditableWarning': - case 'suppressHydrationWarning': - case 'style': - // we advance to the next prop - continue; - // Name remapped props used by hoistable tag types - - case 'className': - { - { - checkAttributeStringCoercion(propValue, propName); - } - - if (node.getAttribute('class') !== '' + propValue) continue nodeLoop; - break; - } - - case 'httpEquiv': - { - { - checkAttributeStringCoercion(propValue, propName); - } - - if (node.getAttribute('http-equiv') !== '' + propValue) continue nodeLoop; - break; - } - // Booleanish props used by hoistable tag types - - case 'contentEditable': - case 'draggable': - case 'spellCheck': - { - { - checkAttributeStringCoercion(propValue, propName); - } - - if (node.getAttribute(propName) !== '' + propValue) continue nodeLoop; - break; - } - // Boolean props used by hoistable tag types - - case 'async': - case 'defer': - case 'disabled': - case 'hidden': - case 'noModule': - case 'scoped': - case 'itemScope': - if (propValue !== node.hasAttribute(propName)) continue nodeLoop; - break; - // The following properties are left out because they do not apply to - // the current set of hoistable types. They may have special handling - // requirements if they end up applying to a hoistable type in the future - // case 'acceptCharset': - // case 'value': - // case 'allowFullScreen': - // case 'autoFocus': - // case 'autoPlay': - // case 'controls': - // case 'default': - // case 'disablePictureInPicture': - // case 'disableRemotePlayback': - // case 'formNoValidate': - // case 'loop': - // case 'noValidate': - // case 'open': - // case 'playsInline': - // case 'readOnly': - // case 'required': - // case 'reversed': - // case 'seamless': - // case 'multiple': - // case 'selected': - // case 'capture': - // case 'download': - // case 'cols': - // case 'rows': - // case 'size': - // case 'span': - // case 'rowSpan': - // case 'start': - - default: - if (isAttributeNameSafe(propName)) { - var attributeName = propName; - if (propValue == null && node.hasAttribute(attributeName)) continue nodeLoop; - - { - checkAttributeStringCoercion(propValue, attributeName); - } - - if (node.getAttribute(attributeName) !== '' + propValue) continue nodeLoop; - } - - } - - checkedAttributes++; - } - - if (node.attributes.length !== checkedAttributes) { - // We didn't match ever attribute so we abandon this node - continue nodeLoop; - } // We found a matching instance. We can return early after marking it - - - markNodeAsResource(node); - return node; - } // There is no matching instance to hydrate, we create it now - - - var instance = createElement(type, props, ownerDocument, HTML_NAMESPACE); - setInitialProperties(instance, type, props); - precacheFiberNode(internalInstanceHandle, instance); - markNodeAsResource(instance); - ownerDocument.head.insertBefore(instance, type === 'title' ? ownerDocument.querySelector('head > title') : null); - return instance; -} -function mountHoistable(hoistableRoot, type, instance) { - var ownerDocument = getDocumentFromRoot(hoistableRoot); - ownerDocument.head.insertBefore(instance, type === 'title' ? ownerDocument.querySelector('head > title') : null); -} -function unmountHoistable(instance) { - instance.parentNode.removeChild(instance); } // When passing user input into querySelector(All) the embedded string must not alter // the semantics of the query. This escape function is safe to use when we know the // provided value is going to be wrapped in double quotes as part of an attribute selector // Do not use it anywhere else // we escape double quotes and backslashes + var escapeSelectorAttributeValueInsideDoubleQuotesRegex = /[\n\"\\]/g; function escapeSelectorAttributeValueInsideDoubleQuotes(value) { @@ -12376,14 +12979,6 @@ function resetAfterCommit(containerInfo) { eventsEnabled = null; selectionInformation = null; } -function createHoistableInstance(type, props, rootContainerInstance, internalInstanceHandle) { - var domElement = createElement(type, props, rootContainerInstance, HTML_NAMESPACE); - precacheFiberNode(internalInstanceHandle, domElement); - updateFiberProps(domElement, props); - setInitialProperties(domElement, type, props); - markNodeAsResource(domElement); - return domElement; -} function createInstance(type, props, rootContainerInstance, hostContext, internalInstanceHandle) { var parentNamespace; @@ -12646,10 +13241,18 @@ function clearContainer(container) { var nodeType = container.nodeType; if (nodeType === DOCUMENT_NODE) { + clearRootResources(container); clearContainerSparingly(container); } else if (nodeType === ELEMENT_NODE) { switch (container.nodeName) { case 'HEAD': + { + // If we are clearing document.head as a container we are essentially clearing everything + // that was hoisted to the head and should forget the instances that will no longer be in the DOM + clearRootResources(container); // fall through to clear child contents + } + // eslint-disable-next-line-no-fallthrough + case 'HTML': case 'BODY': clearContainerSparingly(container); @@ -12811,6 +13414,7 @@ function getNextHydratable(node) { // developer on how to fix. case 'TITLE': case 'META': + case 'BASE': case 'HTML': case 'HEAD': case 'BODY': @@ -13067,7 +13671,7 @@ function errorHydratingContainer(parentContainer) { error('An error occurred during hydration. The server HTML was replaced with client content in <%s>.', parentContainer.nodeName.toLowerCase()); } } // ------------------- -function isHostHoistableType(type, props, hostContext) { +function isHostResourceType(type, props, hostContext) { var outsideHostContainerContext; var namespace; @@ -13079,41 +13683,28 @@ function isHostHoistableType(type, props, hostContext) { } switch (type) { + case 'base': case 'meta': - case 'title': { - return namespace !== SVG_NAMESPACE; + return true; } - case 'style': + case 'title': { - if (typeof props.precedence !== 'string' || typeof props.href !== 'string' || props.href === '' || namespace === SVG_NAMESPACE) { - { - if (outsideHostContainerContext) { - error('Cannot render a <style> outside the main document without knowing its precedence and a unique href key.' + ' React can hoist and deduplicate <style> tags if you provide a `precedence` prop along with an `href` prop that' + ' does not conflic with the `href` values used in any other hoisted <style> or <link rel="stylesheet" ...> tags. ' + ' Note that hoisting <style> tags is considered an advanced feature that most will not use directly.' + ' Consider moving the <style> tag to the <head> or consider adding a `precedence="default"` and `href="some unique resource identifier"`, or move the <style>' + ' to the <style> tag.'); - } - } - - return false; - } - - return true; + return namespace !== SVG_NAMESPACE; } case 'link': { - if (typeof props.rel !== 'string' || typeof props.href !== 'string' || props.href === '' || props.onLoad || props.onError || namespace === SVG_NAMESPACE) { - { - if (props.rel === 'stylesheet' && typeof props.precedence === 'string') { - validateLinkPropsForStyleResource(props); - } + var onLoad = props.onLoad, + onError = props.onError; + if (onLoad || onError) { + { if (outsideHostContainerContext) { - if (typeof props.rel !== 'string' || typeof props.href !== 'string' || props.href === '') { - error('Cannot render a <link> outside the main document without a `rel` and `href` prop.' + ' Try adding a `rel` and/or `href` prop to this <link> or moving the link into the <head> tag'); - } else if (props.onError || props.onLoad) { - error('Cannot render a <link> with onLoad or onError listeners outside the main document.' + ' Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or' + ' somewhere in the <body>.'); - } + error('Cannot render a <link> with onLoad or onError listeners outside the main document.' + ' Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or' + ' somewhere in the <body>.'); + } else if (namespace === SVG_NAMESPACE) { + error('Cannot render a <link> with onLoad or onError listeners as a descendent of <svg>.' + ' Try removing onLoad={...} and onError={...} or moving it above the <svg> ancestor.'); } } @@ -13123,50 +13714,65 @@ function isHostHoistableType(type, props, hostContext) { switch (props.rel) { case 'stylesheet': { - var precedence = props.precedence, + var href = props.href, + precedence = props.precedence, disabled = props.disabled; { + validateLinkPropsForStyleResource(props); + if (typeof precedence !== 'string') { if (outsideHostContainerContext) { error('Cannot render a <link rel="stylesheet" /> outside the main document without knowing its precedence.' + ' Consider adding precedence="default" or moving it into the root <head> tag.'); + } else if (namespace === SVG_NAMESPACE) { + error('Cannot render a <link rel="stylesheet" /> as a descendent of an <svg> element without knowing its precedence.' + ' Consider adding precedence="default" or moving it above the <svg> ancestor.'); } } } - return typeof precedence === 'string' && disabled == null; + return typeof href === 'string' && typeof precedence === 'string' && disabled == null; } default: { - return true; + var rel = props.rel, + _href = props.href; + return typeof _href === 'string' && typeof rel === 'string'; } } } case 'script': { - if (props.async !== true || props.onLoad || props.onError || typeof props.src !== 'string' || !props.src || namespace === SVG_NAMESPACE) { - { + // We don't validate because it is valid to use async with onLoad/onError unlike combining + // precedence with these for style resources + var src = props.src, + async = props.async, + _onLoad = props.onLoad, + _onError = props.onError; + + { + if (async !== true) { if (outsideHostContainerContext) { - if (props.async !== true) { - error('Cannot render a sync or defer <script> outside the main document without knowing its order.' + ' Try adding async="" or moving it into the root <head> tag.'); - } else if (props.onLoad || props.onError) { - error('Cannot render a <script> with onLoad or onError listeners outside the main document.' + ' Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or' + ' somewhere in the <body>.'); - } else { - error('Cannot render a <script> outside the main document without `async={true}` and a non-empty `src` prop.' + ' Ensure there is a valid `src` and either make the script async or move it into the root <head> tag or' + ' somewhere in the <body>.'); - } + error('Cannot render a sync or defer <script> outside the main document without knowing its order.' + ' Try adding async="" or moving it into the root <head> tag.'); + } else if (namespace === SVG_NAMESPACE) { + error('Cannot render a sync or defer <script> as a descendent of an <svg> element.' + ' Try adding async="" or moving it above the ancestor <svg> element.'); + } + } else if (_onLoad || _onError) { + if (outsideHostContainerContext) { + error('Cannot render a <script> with onLoad or onError listeners outside the main document.' + ' Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or' + ' somewhere in the <body>.'); + } else if (namespace === SVG_NAMESPACE) { + error('Cannot render a <script> with onLoad or onError listeners as a descendent of an <svg> element.' + ' Try removing onLoad={...} and onError={...} or moving it above the ancestor <svg> element.'); } } - - return false; } - return true; + return async && typeof src === 'string' && !_onLoad && !_onError; } case 'noscript': case 'template': + case 'style': { { if (outsideHostContainerContext) { @@ -22036,24 +22642,17 @@ function updateHostComponent(current, workInProgress, renderLanes) { return workInProgress.child; } -function updateHostHoistable(current, workInProgress, renderLanes) { +function updateHostResource(current, workInProgress, renderLanes) { + pushHostContext(workInProgress); markRef(current, workInProgress); var currentProps = current === null ? null : current.memoizedProps; - var resource = workInProgress.memoizedState = getResource(workInProgress.type, currentProps, workInProgress.pendingProps); - - if (current === null) { - if (!getIsHydrating() && resource === null) { - // This is not a Resource Hoistable and we aren't hydrating so we construct the instance. - workInProgress.stateNode = createHoistableInstance(workInProgress.type, workInProgress.pendingProps, getRootHostContainer(), workInProgress); - } - } // Resources never have reconciler managed children. It is possible for + workInProgress.memoizedState = getResource(workInProgress.type, workInProgress.pendingProps, currentProps); // Resources never have reconciler managed children. It is possible for // the host implementation of getResource to consider children in the // resource construction but they will otherwise be discarded. In practice // this precludes all but the simplest children and Host specific warnings // should be implemented to warn when children are passsed when otherwise not // expected - return null; } @@ -23551,6 +24150,7 @@ function attemptEarlyBailoutIfNoScheduledUpdate(current, workInProgress, renderL resetHydrationState(); break; + case HostResource: case HostSingleton: case HostComponent: pushHostContext(workInProgress); @@ -23831,9 +24431,9 @@ function beginWork(current, workInProgress, renderLanes) { case HostRoot: return updateHostRoot(current, workInProgress, renderLanes); - case HostHoistable: + case HostResource: { - return updateHostHoistable(current, workInProgress); + return updateHostResource(current, workInProgress); } // eslint-disable-next-line no-fallthrough @@ -24904,25 +25504,20 @@ function completeWork(current, workInProgress, renderLanes) { return null; } - case HostHoistable: + case HostResource: { { + popHostContext(workInProgress); var currentRef = current ? current.ref : null; if (currentRef !== workInProgress.ref) { markRef$1(workInProgress); } - if ( // We are mounting and must Update this Hoistable in this commit - current === null || // We are transitioning to, from, or between Hoistable Resources - // and require an update - current.memoizedState !== workInProgress.memoizedState) { + if (current === null || current.memoizedState !== workInProgress.memoizedState) { + // The workInProgress resource is different than the current one or the current + // one does not exist markUpdate(workInProgress); - } else if (workInProgress.memoizedState === null) { - // We may have props to update on the Hoistable instance. We use the - // updateHostComponent path becuase it produces the update queue - // we need for Hoistables - updateHostComponent$1(current, workInProgress, workInProgress.type, workInProgress.pendingProps); } bubbleProperties(workInProgress); @@ -25578,7 +26173,7 @@ function unwindWork(current, workInProgress, renderLanes) { return null; } - case HostHoistable: + case HostResource: case HostSingleton: case HostComponent: { @@ -25703,7 +26298,7 @@ function unwindInterruptedWork(current, interruptedWork, renderLanes) { break; } - case HostHoistable: + case HostResource: case HostSingleton: case HostComponent: { @@ -26006,7 +26601,7 @@ function commitBeforeMutationEffectsOnFiber(finishedWork) { } case HostComponent: - case HostHoistable: + case HostResource: case HostSingleton: case HostText: case HostPortal: @@ -26476,7 +27071,7 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork, committe break; } - case HostHoistable: + case HostResource: { { recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); @@ -26598,7 +27193,7 @@ function hideOrUnhideAllChildren(finishedWork, isHidden) { var node = finishedWork; while (true) { - if (node.tag === HostComponent || ( node.tag === HostHoistable ) || ( node.tag === HostSingleton )) { + if (node.tag === HostComponent || ( node.tag === HostResource ) || ( node.tag === HostSingleton )) { if (hostSubtreeRoot === null) { hostSubtreeRoot = node; @@ -26668,7 +27263,7 @@ function commitAttachRef(finishedWork) { var instanceToUse; switch (finishedWork.tag) { - case HostHoistable: + case HostResource: case HostSingleton: case HostComponent: instanceToUse = getPublicInstance(instance); @@ -26791,7 +27386,7 @@ function getHostParentFiber(fiber) { } function isHostParent(fiber) { - return fiber.tag === HostComponent || fiber.tag === HostRoot || ( fiber.tag === HostHoistable ) || ( fiber.tag === HostSingleton ) || fiber.tag === HostPortal; + return fiber.tag === HostComponent || fiber.tag === HostRoot || ( fiber.tag === HostResource ) || ( fiber.tag === HostSingleton ) || fiber.tag === HostPortal; } function getHostSibling(fiber) { @@ -27043,7 +27638,7 @@ function commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, dele // that don't modify the stack. switch (deletedFiber.tag) { - case HostHoistable: + case HostResource: { { if (!offscreenSubtreeWasHidden) { @@ -27054,8 +27649,6 @@ function commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, dele if (deletedFiber.memoizedState) { releaseResource(deletedFiber.memoizedState); - } else if (deletedFiber.stateNode) { - unmountHoistable(deletedFiber.stateNode); } return; @@ -27451,8 +28044,6 @@ function recursivelyTraverseMutationEffects(root, parentFiber, lanes) { setCurrentFiber(prevDebugFiber); } -var currentHoistableRoot = null; - function commitMutationEffectsOnFiber(finishedWork, root, lanes) { var current = finishedWork.alternate; var flags = finishedWork.flags; // The effect flag should be checked *after* we refine the type of fiber, @@ -27524,12 +28115,9 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { return; } - case HostHoistable: + case HostResource: { { - // We cast because we always set the root at the React root and so it cannot be - // null while we are processing mutation effects - var hoistableRoot = currentHoistableRoot; recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); @@ -27540,50 +28128,17 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { } if (flags & Update) { - var currentResource = current !== null ? current.memoizedState : null; var newResource = finishedWork.memoizedState; - if (current === null) { - // We are mounting a new HostHoistable Fiber. We fork the mount - // behavior based on whether this instance is a Hoistable Instance - // or a Hoistable Resource - if (newResource === null) { - if (finishedWork.stateNode === null) { - finishedWork.stateNode = hydrateHoistable(hoistableRoot, finishedWork.type, finishedWork.memoizedProps, finishedWork); - } else { - mountHoistable(hoistableRoot, finishedWork.type, finishedWork.stateNode); - } - } else { - finishedWork.stateNode = acquireResource(hoistableRoot, newResource, finishedWork.memoizedProps); - } - } else if (currentResource !== newResource) { - // We are moving to or from Hoistable Resource, or between different Hoistable Resources - if (currentResource === null) { - if (current.stateNode !== null) { - unmountHoistable(current.stateNode); - } - } else { - releaseResource(currentResource); - } - - if (newResource === null) { - mountHoistable(hoistableRoot, finishedWork.type, finishedWork.stateNode); - } else { - acquireResource(hoistableRoot, newResource, finishedWork.memoizedProps); - } - } else if (newResource === null && finishedWork.stateNode !== null) { - // We may have an update on a Hoistable element - var updatePayload = finishedWork.updateQueue; - finishedWork.updateQueue = null; + if (current !== null) { + var currentResource = current.memoizedState; - if (updatePayload !== null) { - try { - commitUpdate(finishedWork.stateNode, updatePayload, finishedWork.type, current.memoizedProps, finishedWork.memoizedProps, finishedWork); - } catch (error) { - captureCommitPhaseError(finishedWork, finishedWork.return, error); - } + if (currentResource !== newResource) { + releaseResource(currentResource); } } + + finishedWork.stateNode = newResource ? acquireResource(newResource) : null; } return; @@ -27649,12 +28204,12 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { var oldProps = current !== null ? current.memoizedProps : newProps; var type = finishedWork.type; // TODO: Type the updateQueue to be specific to host components. - var _updatePayload = finishedWork.updateQueue; + var updatePayload = finishedWork.updateQueue; finishedWork.updateQueue = null; - if (_updatePayload !== null) { + if (updatePayload !== null) { try { - commitUpdate(_instance2, _updatePayload, type, oldProps, newProps, finishedWork); + commitUpdate(_instance2, updatePayload, type, oldProps, newProps, finishedWork); } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } @@ -27697,13 +28252,8 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { case HostRoot: { - { - var previousHoistableRoot = currentHoistableRoot; - currentHoistableRoot = getHoistableRoot(root.containerInfo); - recursivelyTraverseMutationEffects(root, finishedWork); - currentHoistableRoot = previousHoistableRoot; - commitReconciliationEffects(finishedWork); - } + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); if (flags & Update) { { @@ -27726,13 +28276,8 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { case HostPortal: { - { - var _previousHoistableRoot = currentHoistableRoot; - currentHoistableRoot = getHoistableRoot(finishedWork.stateNode.containerInfo); - recursivelyTraverseMutationEffects(root, finishedWork); - commitReconciliationEffects(finishedWork); - currentHoistableRoot = _previousHoistableRoot; - } + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); return; } @@ -27982,7 +28527,7 @@ function disappearLayoutEffects(finishedWork) { break; } - case HostHoistable: + case HostResource: case HostSingleton: case HostComponent: { @@ -28079,7 +28624,7 @@ includeWorkInProgressEffects) { // ... // } - case HostHoistable: + case HostResource: case HostSingleton: case HostComponent: { @@ -32281,7 +32826,7 @@ function findChildHostInstancesForFiberShallowly(fiber, hostInstances) { var foundHostInstances = false; while (true) { - if (node.tag === HostComponent || ( node.tag === HostHoistable ) || ( node.tag === HostSingleton )) { + if (node.tag === HostComponent || ( node.tag === HostResource ) || ( node.tag === HostSingleton )) { // We got a match. foundHostInstances = true; hostInstances.add(node.stateNode); // There may still be more, so keep searching. @@ -32638,7 +33183,7 @@ key, pendingProps, owner, mode, lanes) { } else if (typeof type === 'string') { { var hostContext = getHostContext(); - fiberTag = isHostHoistableType(type, pendingProps, hostContext) ? HostHoistable : isHostSingletonType(type) ? HostSingleton : HostComponent; + fiberTag = isHostResourceType(type, pendingProps, hostContext) ? HostResource : isHostSingletonType(type) ? HostSingleton : HostComponent; } } else { getTag: switch (type) { @@ -33021,7 +33566,7 @@ identifierPrefix, onRecoverableError, transitionCallbacks) { return root; } -var ReactVersion = '18.3.0-next-4fcc9184a-20230217'; +var ReactVersion = '18.3.0-next-6ddcbd4f9-20230209'; function createPortal(children, containerInfo, // TODO: figure out the API for cross-renderer implementation. implementation) { @@ -33817,6 +34362,9 @@ function isValidContainerLegacy(node) { function warnIfReactDOMContainerInDEV(container) { { + if (container.nodeType === ELEMENT_NODE && container.tagName && container.tagName.toUpperCase() === 'BODY') { + error('createRoot(): Creating roots directly with document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try using a container element created ' + 'for your app.'); + } if (isContainerMarkedAsRoot(container)) { if (container._reactRootContainer) { diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom.production.min.js b/packages/next/src/compiled/react-dom/cjs/react-dom.production.min.js index dac46351fe360..019c2282abfd5 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom.production.min.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom.production.min.js @@ -10,10 +10,10 @@ /* Modernizr 3.0.0pre (Custom Build) | MIT */ -'use strict';var aa=require("react"),ba=require("next/dist/compiled/scheduler"),ca={usingClientEntryPoint:!1,Events:null,Dispatcher:{current:null}};function m(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."} -var da=Math.random().toString(36).slice(2),ea="__reactFiber$"+da,fa="__reactProps$"+da,ha="__reactContainer$"+da,ia="__reactEvents$"+da,ka="__reactListeners$"+da,la="__reactHandles$"+da,ma="__reactResources$"+da,na="__reactMarker$"+da;function oa(a){delete a[ea];delete a[fa];delete a[ia];delete a[ka];delete a[la]} -function pa(a){var b=a[ea];if(b)return b;for(var c=a.parentNode;c;){if(b=c[ha]||c[ea]){c=b.alternate;if(null!==b.child||null!==c&&null!==c.child)for(a=qa(a);null!==a;){if(c=a[ea])return c;a=qa(a)}return b}a=c;c=a.parentNode}return null}function ra(a){if(a=a[ea]||a[ha]){var b=a.tag;if(5===b||6===b||13===b||26===b||27===b||3===b)return a}return null}function sa(a){var b=a.tag;if(5===b||26===b||27===b||6===b)return a.stateNode;throw Error(m(33));}function ta(a){return a[fa]||null} -function ua(a){var b=a[ma];b||(b=a[ma]={hoistableStyles:new Map,hoistableScripts:new Map});return b}var va=new Set,wa={};function xa(a,b){ya(a,b);ya(a+"Capture",b)}function ya(a,b){wa[a]=b;for(a=0;a<b.length;a++)va.add(b[a])} +'use strict';var aa=require("react"),ba=require("next/dist/compiled/scheduler"),ca={usingClientEntryPoint:!1,Events:null,Dispatcher:{current:null}};function p(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."} +var da=Math.random().toString(36).slice(2),ea="__reactFiber$"+da,fa="__reactProps$"+da,ha="__reactContainer$"+da,ia="__reactEvents$"+da,ja="__reactListeners$"+da,la="__reactHandles$"+da,ma="__reactResources$"+da,na="__reactMarker$"+da;function oa(a){delete a[ea];delete a[fa];delete a[ia];delete a[ja];delete a[la]} +function pa(a){var b=a[ea];if(b)return b;for(var c=a.parentNode;c;){if(b=c[ha]||c[ea]){c=b.alternate;if(null!==b.child||null!==c&&null!==c.child)for(a=qa(a);null!==a;){if(c=a[ea])return c;a=qa(a)}return b}a=c;c=a.parentNode}return null}function ra(a){if(a=a[ea]||a[ha]){var b=a.tag;if(5===b||6===b||13===b||26===b||27===b||3===b)return a}return null}function sa(a){var b=a.tag;if(5===b||26===b||27===b||6===b)return a.stateNode;throw Error(p(33));}function ta(a){return a[fa]||null} +function ua(a){var b=a[ma];b||(b=a[ma]={styles:new Map,scripts:new Map,head:new Map,lastStructuredMeta:new Map});return b}var va=new Set,wa={};function xa(a,b){ya(a,b);ya(a+"Capture",b)}function ya(a,b){wa[a]=b;for(a=0;a<b.length;a++)va.add(b[a])} var za=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),Aa=Object.prototype.hasOwnProperty,Ba=/^[: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][: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\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Ca= {},Da={};function Ea(a){if(Aa.call(Da,a))return!0;if(Aa.call(Ca,a))return!1;if(Ba.test(a))return Da[a]=!0;Ca[a]=!0;return!1}function Ga(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}} function Ha(a,b,c,d){if(null===b||"undefined"===typeof b||Ga(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function Ia(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var y={}; @@ -36,28 +36,28 @@ function mb(a){var b=a.type;switch(a.tag){case 24:return"Cache";case 9:return(b. case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof b)return b.displayName||b.name||null;if("string"===typeof b)return b}return null}function nb(a){switch(typeof a){case "boolean":case "number":case "string":case "undefined":return a;case "object":return a;default:return""}} function ob(a){var b=a.type;return(a=a.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===b||"radio"===b)} function pb(a){var b=ob(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=""+a[b];if(!a.hasOwnProperty(b)&&"undefined"!==typeof c&&"function"===typeof c.get&&"function"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=""+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=""+a},stopTracking:function(){a._valueTracker= -null;delete a[b]}}}}function qb(a){a._valueTracker||(a._valueTracker=pb(a))}function rb(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d="";a&&(d=ob(a)?a.checked?"true":"false":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function sb(a){a=a||("undefined"!==typeof document?document:void 0);if("undefined"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}} +null;delete a[b]}}}}function qb(a){a._valueTracker||(a._valueTracker=pb(a))}function rb(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d="";a&&(d=ob(a)?a.checked?"true":"false":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function tb(a){a=a||("undefined"!==typeof document?document:void 0);if("undefined"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}} function ub(a,b){var c=b.checked;return z({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function vb(a,b){var c=null==b.defaultValue?"":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=nb(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value}}function wb(a,b){b=b.checked;null!=b&&La(a,"checked",b,!1)} function xb(a,b){wb(a,b);var c=nb(b.value),d=b.type;if(null!=c)if("number"===d){if(0===c&&""===a.value||a.value!=c)a.value=""+c}else a.value!==""+c&&(a.value=""+c);else if("submit"===d||"reset"===d){a.removeAttribute("value");return}b.hasOwnProperty("value")?yb(a,b.type,c):b.hasOwnProperty("defaultValue")&&yb(a,b.type,nb(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)} function zb(a,b,c){if(b.hasOwnProperty("value")||b.hasOwnProperty("defaultValue")){var d=b.type;if(!("submit"!==d&&"reset"!==d||void 0!==b.value&&null!==b.value))return;b=""+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;""!==c&&(a.name="");a.defaultChecked=!!a._wrapperState.initialChecked;""!==c&&(a.name=c)} -function yb(a,b,c){if("number"!==b||sb(a.ownerDocument)!==a)null==c?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+c&&(a.defaultValue=""+c)}var Ab=Array.isArray; +function yb(a,b,c){if("number"!==b||tb(a.ownerDocument)!==a)null==c?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+c&&(a.defaultValue=""+c)}var Ab=Array.isArray; function Bb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e<c.length;e++)b["$"+c[e]]=!0;for(c=0;c<a.length;c++)e=b.hasOwnProperty("$"+a[c].value),a[c].selected!==e&&(a[c].selected=e),e&&d&&(a[c].defaultSelected=!0)}else{c=""+nb(c);b=null;for(e=0;e<a.length;e++){if(a[e].value===c){a[e].selected=!0;d&&(a[e].defaultSelected=!0);return}null!==b||a[e].disabled||(b=a[e])}null!==b&&(b.selected=!0)}} -function Cb(a,b){if(null!=b.dangerouslySetInnerHTML)throw Error(m(91));return z({},b,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function Db(a,b){var c=b.value;if(null==c){c=b.children;b=b.defaultValue;if(null!=c){if(null!=b)throw Error(m(92));if(Ab(c)){if(1<c.length)throw Error(m(93));c=c[0]}b=c}null==b&&(b="");c=b}a._wrapperState={initialValue:nb(c)}} +function Cb(a,b){if(null!=b.dangerouslySetInnerHTML)throw Error(p(91));return z({},b,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function Db(a,b){var c=b.value;if(null==c){c=b.children;b=b.defaultValue;if(null!=c){if(null!=b)throw Error(p(92));if(Ab(c)){if(1<c.length)throw Error(p(93));c=c[0]}b=c}null==b&&(b="");c=b}a._wrapperState={initialValue:nb(c)}} function Eb(a,b){var c=nb(b.value),d=nb(b.defaultValue);null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=""+d)}function Fb(a){var b=a.textContent;b===a._wrapperState.initialValue&&""!==b&&null!==b&&(a.value=b)}function Gb(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}} function Hb(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?Gb(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a} var Ib,Jb=function(a){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if("http://www.w3.org/2000/svg"!==a.namespaceURI||"innerHTML"in a)a.innerHTML=b;else{Ib=Ib||document.createElement("div");Ib.innerHTML="<svg>"+b.valueOf().toString()+"</svg>";for(b=Ib.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}}); -function Kb(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b} -var Lb={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,tabSize:!0,widows:!0,zIndex:!0, -zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Nb=["Webkit","ms","Moz","O"];Object.keys(Lb).forEach(function(a){Nb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);Lb[b]=Lb[a]})});function Ob(a,b,c){return null==b||"boolean"===typeof b||""===b?"":c||"number"!==typeof b||0===b||Lb.hasOwnProperty(a)&&Lb[a]?(""+b).trim():b+"px"} +function Lb(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b} +var Mb={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0, +zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Nb=["Webkit","ms","Moz","O"];Object.keys(Mb).forEach(function(a){Nb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);Mb[b]=Mb[a]})});function Ob(a,b,c){return null==b||"boolean"===typeof b||""===b?"":c||"number"!==typeof b||0===b||Mb.hasOwnProperty(a)&&Mb[a]?(""+b).trim():b+"px"} function Pb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--"),e=Ob(c,b[c],d);"float"===c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e}}var Qb=z({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}); -function Rb(a,b){if(b){if(Qb[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(m(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(m(60));if("object"!==typeof b.dangerouslySetInnerHTML||!("__html"in b.dangerouslySetInnerHTML))throw Error(m(61));}if(null!=b.style&&"object"!==typeof b.style)throw Error(m(62));}} +function Rb(a,b){if(b){if(Qb[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(p(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(p(60));if("object"!==typeof b.dangerouslySetInnerHTML||!("__html"in b.dangerouslySetInnerHTML))throw Error(p(61));}if(null!=b.style&&"object"!==typeof b.style)throw Error(p(62));}} function Sb(a,b){if(-1===a.indexOf("-"))return"string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return!1;default:return!0}}var Tb=null;function Ub(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var Vb=null,Wb=null,Xb=null; -function Yb(a){if(a=ra(a)){if("function"!==typeof Vb)throw Error(m(280));var b=a.stateNode;b&&(b=ta(b),Vb(a.stateNode,a.type,b))}}function Zb(a){Wb?Xb?Xb.push(a):Xb=[a]:Wb=a}function $b(){if(Wb){var a=Wb,b=Xb;Xb=Wb=null;Yb(a);if(b)for(a=0;a<b.length;a++)Yb(b[a])}}function ac(a,b){return a(b)}function bc(){}var cc=!1;function dc(a,b,c){if(cc)return a(b,c);cc=!0;try{return ac(a,b,c)}finally{if(cc=!1,null!==Wb||null!==Xb)bc(),$b()}} +function Yb(a){if(a=ra(a)){if("function"!==typeof Vb)throw Error(p(280));var b=a.stateNode;b&&(b=ta(b),Vb(a.stateNode,a.type,b))}}function Zb(a){Wb?Xb?Xb.push(a):Xb=[a]:Wb=a}function $b(){if(Wb){var a=Wb,b=Xb;Xb=Wb=null;Yb(a);if(b)for(a=0;a<b.length;a++)Yb(b[a])}}function ac(a,b){return a(b)}function bc(){}var cc=!1;function dc(a,b,c){if(cc)return a(b,c);cc=!0;try{return ac(a,b,c)}finally{if(cc=!1,null!==Wb||null!==Xb)bc(),$b()}} function ec(a,b){var c=a.stateNode;if(null===c)return null;var d=ta(c);if(null===d)return null;c=d[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":case "onMouseEnter":(d=!d.disabled)||(a=a.type,d=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!d;break a;default:a=!1}if(a)return null;if(c&&"function"!== -typeof c)throw Error(m(231,b,typeof c));return c}var fc=!1;if(za)try{var gc={};Object.defineProperty(gc,"passive",{get:function(){fc=!0}});window.addEventListener("test",gc,gc);window.removeEventListener("test",gc,gc)}catch(a){fc=!1}function hc(a,b,c){var d=Array.prototype.slice.call(arguments,3);try{b.apply(c,d)}catch(e){this.onError(e)}}var ic=!1,jc=null,kc=!1,lc=null,mc={onError:function(a){ic=!0;jc=a}};function nc(a,b,c,d,e,f,g,h,k){ic=!1;jc=null;hc.apply(mc,arguments)} -function oc(a,b,c,d,e,f,g,h,k){nc.apply(this,arguments);if(ic){if(ic){var l=jc;ic=!1;jc=null}else throw Error(m(198));kc||(kc=!0,lc=l)}}function pc(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.flags&4098)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function qc(a){if(13===a.tag){var b=a.memoizedState;null===b&&(a=a.alternate,null!==a&&(b=a.memoizedState));if(null!==b)return b.dehydrated}return null}function rc(a){if(pc(a)!==a)throw Error(m(188));} -function sc(a){var b=a.alternate;if(!b){b=pc(a);if(null===b)throw Error(m(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var f=e.alternate;if(null===f){d=e.return;if(null!==d){c=d;continue}break}if(e.child===f.child){for(f=e.child;f;){if(f===c)return rc(e),a;if(f===d)return rc(e),b;f=f.sibling}throw Error(m(188));}if(c.return!==d.return)c=e,d=f;else{for(var g=!1,h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=f.child;h;){if(h=== -c){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}if(!g)throw Error(m(189));}}if(c.alternate!==d)throw Error(m(190));}if(3!==c.tag)throw Error(m(188));return c.stateNode.current===c?a:b}function tc(a){a=sc(a);return null!==a?uc(a):null}function uc(a){var b=a.tag;if(5===b||26===b||27===b||6===b)return a;for(a=a.child;null!==a;){b=uc(a);if(null!==b)return b;a=a.sibling}return null} +typeof c)throw Error(p(231,b,typeof c));return c}var fc=!1;if(za)try{var gc={};Object.defineProperty(gc,"passive",{get:function(){fc=!0}});window.addEventListener("test",gc,gc);window.removeEventListener("test",gc,gc)}catch(a){fc=!1}function hc(a,b,c){var d=Array.prototype.slice.call(arguments,3);try{b.apply(c,d)}catch(e){this.onError(e)}}var ic=!1,jc=null,kc=!1,lc=null,mc={onError:function(a){ic=!0;jc=a}};function nc(a,b,c,d,e,f,g,h,k){ic=!1;jc=null;hc.apply(mc,arguments)} +function oc(a,b,c,d,e,f,g,h,k){nc.apply(this,arguments);if(ic){if(ic){var l=jc;ic=!1;jc=null}else throw Error(p(198));kc||(kc=!0,lc=l)}}function pc(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.flags&4098)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function qc(a){if(13===a.tag){var b=a.memoizedState;null===b&&(a=a.alternate,null!==a&&(b=a.memoizedState));if(null!==b)return b.dehydrated}return null}function rc(a){if(pc(a)!==a)throw Error(p(188));} +function sc(a){var b=a.alternate;if(!b){b=pc(a);if(null===b)throw Error(p(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var f=e.alternate;if(null===f){d=e.return;if(null!==d){c=d;continue}break}if(e.child===f.child){for(f=e.child;f;){if(f===c)return rc(e),a;if(f===d)return rc(e),b;f=f.sibling}throw Error(p(188));}if(c.return!==d.return)c=e,d=f;else{for(var g=!1,h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=f.child;h;){if(h=== +c){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}if(!g)throw Error(p(189));}}if(c.alternate!==d)throw Error(p(190));}if(3!==c.tag)throw Error(p(188));return c.stateNode.current===c?a:b}function tc(a){a=sc(a);return null!==a?uc(a):null}function uc(a){var b=a.tag;if(5===b||26===b||27===b||6===b)return a;for(a=a.child;null!==a;){b=uc(a);if(null!==b)return b;a=a.sibling}return null} var vc=ba.unstable_scheduleCallback,wc=ba.unstable_cancelCallback,xc=ba.unstable_shouldYield,yc=ba.unstable_requestPaint,A=ba.unstable_now,zc=ba.unstable_getCurrentPriorityLevel,Ac=ba.unstable_ImmediatePriority,Bc=ba.unstable_UserBlockingPriority,Cc=ba.unstable_NormalPriority,Dc=ba.unstable_LowPriority,Ec=ba.unstable_IdlePriority,Fc=null,Gc=null;function Hc(a){if(Gc&&"function"===typeof Gc.onCommitFiberRoot)try{Gc.onCommitFiberRoot(Fc,a,void 0,128===(a.current.flags&128))}catch(b){}} var Jc=Math.clz32?Math.clz32:Ic,Kc=Math.log,Lc=Math.LN2;function Ic(a){a>>>=0;return 0===a?32:31-(Kc(a)/Lc|0)|0}var Mc=128,Nc=8388608; function Oc(a){switch(a&-a){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: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:return a&8388480;case 8388608:case 16777216:case 33554432:case 67108864:return a&125829120;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912; @@ -96,11 +96,11 @@ function Oe(a,b){if("change"===a)return b}var Pe=!1;if(za){var Qe;if(za){var Re= function Ve(a,b,c){"focusin"===a?(Te(),Je=b,Ke=c,Je.attachEvent("onpropertychange",Ue)):"focusout"===a&&Te()}function We(a){if("selectionchange"===a||"keyup"===a||"keydown"===a)return Ne(Ke)}function Xe(a,b){if("click"===a)return Ne(b)}function Ye(a,b){if("input"===a||"change"===a)return Ne(b)}function Ze(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var $e="function"===typeof Object.is?Object.is:Ze; function af(a,b){if($e(a,b))return!0;if("object"!==typeof a||null===a||"object"!==typeof b||null===b)return!1;var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;for(d=0;d<c.length;d++){var e=c[d];if(!Aa.call(b,e)||!$e(a[e],b[e]))return!1}return!0}function bf(a){for(;a&&a.firstChild;)a=a.firstChild;return a} function cf(a,b){var c=bf(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=bf(c)}}function df(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?df(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1} -function ef(){for(var a=window,b=sb();b instanceof a.HTMLIFrameElement;){try{var c="string"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=sb(a.document)}return b}function ff(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable)} +function ef(){for(var a=window,b=tb();b instanceof a.HTMLIFrameElement;){try{var c="string"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=tb(a.document)}return b}function ff(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable)} function gf(a){var b=ef(),c=a.focusedElem,d=a.selectionRange;if(b!==c&&c&&c.ownerDocument&&df(c.ownerDocument.documentElement,c)){if(null!==d&&ff(c))if(b=d.start,a=d.end,void 0===a&&(a=b),"selectionStart"in c)c.selectionStart=b,c.selectionEnd=Math.min(a,c.value.length);else if(a=(b=c.ownerDocument||document)&&b.defaultView||window,a.getSelection){a=a.getSelection();var e=c.textContent.length,f=Math.min(d.start,e);d=void 0===d.end?f:Math.min(d.end,e);!a.extend&&f>d&&(e=d,d=f,f=e);e=cf(c,f);var g=cf(c, d);e&&g&&(1!==a.rangeCount||a.anchorNode!==e.node||a.anchorOffset!==e.offset||a.focusNode!==g.node||a.focusOffset!==g.offset)&&(b=b.createRange(),b.setStart(e.node,e.offset),a.removeAllRanges(),f>d?(a.addRange(b),a.extend(g.node,g.offset)):(b.setEnd(g.node,g.offset),a.addRange(b)))}b=[];for(a=c;a=a.parentNode;)1===a.nodeType&&b.push({element:a,left:a.scrollLeft,top:a.scrollTop});"function"===typeof c.focus&&c.focus();for(c=0;c<b.length;c++)a=b[c],a.element.scrollLeft=a.left,a.element.scrollTop=a.top}} var hf=za&&"documentMode"in document&&11>=document.documentMode,jf=null,kf=null,lf=null,mf=!1; -function nf(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;mf||null==jf||jf!==sb(d)||(d=jf,"selectionStart"in d&&ff(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),lf&&af(lf,d)||(lf=d,d=Ie(kf,"onSelect"),0<d.length&&(b=new Nd("onSelect","select",null,b,c),a.push({event:b,listeners:d}),b.target=jf)))} +function nf(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;mf||null==jf||jf!==tb(d)||(d=jf,"selectionStart"in d&&ff(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),lf&&af(lf,d)||(lf=d,d=Ie(kf,"onSelect"),0<d.length&&(b=new Nd("onSelect","select",null,b,c),a.push({event:b,listeners:d}),b.target=jf)))} function of(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;return c}var pf={animationend:of("Animation","AnimationEnd"),animationiteration:of("Animation","AnimationIteration"),animationstart:of("Animation","AnimationStart"),transitionend:of("Transition","TransitionEnd")},qf={},rf={}; za&&(rf=document.createElement("div").style,"AnimationEvent"in window||(delete pf.animationend.animation,delete pf.animationiteration.animation,delete pf.animationstart.animation),"TransitionEvent"in window||delete pf.transitionend.transition);function sf(a){if(qf[a])return qf[a];if(!pf[a])return a;var b=pf[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in rf)return qf[a]=b[c];return a}var tf=sf("animationend"),uf=sf("animationiteration"),vf=sf("animationstart"),wf=sf("transitionend"),xf=new Map,yf="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" "); function zf(a,b){xf.set(a,b);xa(b,[a])}for(var Af=0;Af<yf.length;Af++){var Bf=yf[Af],Cf=Bf.toLowerCase(),Df=Bf[0].toUpperCase()+Bf.slice(1);zf(Cf,"on"+Df)}zf(tf,"onAnimationEnd");zf(uf,"onAnimationIteration");zf(vf,"onAnimationStart");zf("dblclick","onDoubleClick");zf("focusin","onFocus");zf("focusout","onBlur");zf(wf,"onTransitionEnd");ya("onMouseEnter",["mouseout","mouseover"]);ya("onMouseLeave",["mouseout","mouseover"]);ya("onPointerEnter",["pointerout","pointerover"]); @@ -111,268 +111,272 @@ function Me(a,b){b=0!==(b&4);for(var c=0;c<a.length;c++){var d=a[c],e=d.event;d= function C(a,b){var c=b[ia];void 0===c&&(c=b[ia]=new Set);var d=a+"__bubble";c.has(d)||(Hf(b,a,2,!1),c.add(d))}function If(a,b,c){var d=0;b&&(d|=4);Hf(c,a,d,b)}var Jf="_reactListening"+Math.random().toString(36).slice(2);function Kf(a){if(!a[Jf]){a[Jf]=!0;va.forEach(function(b){"selectionchange"!==b&&(Ff.has(b)||If(b,!1,a),If(b,!0,a))});var b=9===a.nodeType?a:a.ownerDocument;null===b||b[Jf]||(b[Jf]=!0,If("selectionchange",!1,b))}} function Hf(a,b,c,d){switch(Dd(b)){case 2:var e=yd;break;case 8:e=Ad;break;default:e=zd}c=e.bind(null,b,c,a);e=void 0;!fc||"touchstart"!==b&&"touchmove"!==b&&"wheel"!==b||(e=!0);d?void 0!==e?a.addEventListener(b,c,{capture:!0,passive:e}):a.addEventListener(b,c,!0):void 0!==e?a.addEventListener(b,c,{passive:e}):a.addEventListener(b,c,!1)} function Bd(a,b,c,d,e){var f=d;if(0===(b&1)&&0===(b&2)&&null!==d)a:for(;;){if(null===d)return;var g=d.tag;if(3===g||4===g){var h=d.stateNode.containerInfo;if(h===e||8===h.nodeType&&h.parentNode===e)break;if(4===g)for(g=d.return;null!==g;){var k=g.tag;if(3===k||4===k)if(k=g.stateNode.containerInfo,k===e||8===k.nodeType&&k.parentNode===e)return;g=g.return}for(;null!==h;){g=pa(h);if(null===g)return;k=g.tag;if(5===k||6===k||26===k||27===k){d=f=g;continue a}h=h.parentNode}}d=d.return}dc(function(){var d= -f,e=Ub(c),g=[];a:{var h=xf.get(a);if(void 0!==h){var k=Nd,n=a;switch(a){case "keypress":if(0===Id(c))break a;case "keydown":case "keyup":k=ke;break;case "focusin":n="focus";k=Zd;break;case "focusout":n="blur";k=Zd;break;case "beforeblur":case "afterblur":k=Zd;break;case "click":if(2===c.button)break a;case "auxclick":case "dblclick":case "mousedown":case "mousemove":case "mouseup":case "mouseout":case "mouseover":case "contextmenu":k=Vd;break;case "drag":case "dragend":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "dragstart":case "drop":k= -Xd;break;case "touchcancel":case "touchend":case "touchmove":case "touchstart":k=oe;break;case tf:case uf:case vf:k=ae;break;case wf:k=qe;break;case "scroll":k=Pd;break;case "wheel":k=se;break;case "copy":case "cut":case "paste":k=ce;break;case "gotpointercapture":case "lostpointercapture":case "pointercancel":case "pointerdown":case "pointermove":case "pointerout":case "pointerover":case "pointerup":k=me}var r=0!==(b&4),L=!r&&"scroll"===a,v=r?null!==h?h+"Capture":null:h;r=[];for(var x=d,t;null!== -x;){var M=x;t=M.stateNode;M=M.tag;5!==M&&26!==M&&27!==M||null===t||null===v||(M=ec(x,v),null!=M&&r.push(Lf(x,M,t)));if(L)break;x=x.return}0<r.length&&(h=new k(h,n,null,c,e),g.push({event:h,listeners:r}))}}if(0===(b&7)){a:{h="mouseover"===a||"pointerover"===a;k="mouseout"===a||"pointerout"===a;if(h&&c!==Tb&&(n=c.relatedTarget||c.fromElement)&&(pa(n)||n[ha]))break a;if(k||h){h=e.window===e?e:(h=e.ownerDocument)?h.defaultView||h.parentWindow:window;if(k){if(n=c.relatedTarget||c.toElement,k=d,n=n?pa(n): -null,null!==n&&(L=pc(n),r=n.tag,n!==L||5!==r&&27!==r&&6!==r))n=null}else k=null,n=d;if(k!==n){r=Vd;M="onMouseLeave";v="onMouseEnter";x="mouse";if("pointerout"===a||"pointerover"===a)r=me,M="onPointerLeave",v="onPointerEnter",x="pointer";L=null==k?h:sa(k);t=null==n?h:sa(n);h=new r(M,x+"leave",k,c,e);h.target=L;h.relatedTarget=t;M=null;pa(e)===d&&(r=new r(v,x+"enter",n,c,e),r.target=t,r.relatedTarget=L,M=r);L=M;if(k&&n)b:{r=k;v=n;x=0;for(t=r;t;t=Mf(t))x++;t=0;for(M=v;M;M=Mf(M))t++;for(;0<x-t;)r=Mf(r), -x--;for(;0<t-x;)v=Mf(v),t--;for(;x--;){if(r===v||null!==v&&r===v.alternate)break b;r=Mf(r);v=Mf(v)}r=null}else r=null;null!==k&&Nf(g,h,k,r,!1);null!==n&&null!==L&&Nf(g,L,n,r,!0)}}}a:{h=d?sa(d):window;k=h.nodeName&&h.nodeName.toLowerCase();if("select"===k||"input"===k&&"file"===h.type)var Mb=Oe;else if(Ge(h))if(Pe)Mb=Ye;else{Mb=We;var Fa=Ve}else(k=h.nodeName)&&"input"===k.toLowerCase()&&("checkbox"===h.type||"radio"===h.type)&&(Mb=Xe);if(Mb&&(Mb=Mb(a,d))){He(g,Mb,c,e);break a}Fa&&Fa(a,h,d);"focusout"=== -a&&(Fa=h._wrapperState)&&Fa.controlled&&"number"===h.type&&yb(h,"number",h.value)}Fa=d?sa(d):window;switch(a){case "focusin":if(Ge(Fa)||"true"===Fa.contentEditable)jf=Fa,kf=d,lf=null;break;case "focusout":lf=kf=jf=null;break;case "mousedown":mf=!0;break;case "contextmenu":case "mouseup":case "dragend":mf=!1;nf(g,c,e);break;case "selectionchange":if(hf)break;case "keydown":case "keyup":nf(g,c,e)}var tb;if(ue)b:{switch(a){case "compositionstart":var ja="onCompositionStart";break b;case "compositionend":ja= -"onCompositionEnd";break b;case "compositionupdate":ja="onCompositionUpdate";break b}ja=void 0}else Ce?Ae(a,c)&&(ja="onCompositionEnd"):"keydown"===a&&229===c.keyCode&&(ja="onCompositionStart");ja&&(xe&&"ko"!==c.locale&&(Ce||"onCompositionStart"!==ja?"onCompositionEnd"===ja&&Ce&&(tb=Hd()):(Ed=e,Fd="value"in Ed?Ed.value:Ed.textContent,Ce=!0)),Fa=Ie(d,ja),0<Fa.length&&(ja=new ee(ja,a,null,c,e),g.push({event:ja,listeners:Fa}),tb?ja.data=tb:(tb=Be(c),null!==tb&&(ja.data=tb))));if(tb=we?De(a,c):Ee(a,c))d= -Ie(d,"onBeforeInput"),0<d.length&&(e=new ee("onBeforeInput","beforeinput",null,c,e),g.push({event:e,listeners:d}),e.data=tb)}Me(g,b)})}function Lf(a,b,c){return{instance:a,listener:b,currentTarget:c}}function Ie(a,b){for(var c=b+"Capture",d=[];null!==a;){var e=a,f=e.stateNode;e=e.tag;5!==e&&26!==e&&27!==e||null===f||(e=ec(a,c),null!=e&&d.unshift(Lf(a,e,f)),e=ec(a,b),null!=e&&d.push(Lf(a,e,f)));a=a.return}return d} +f,e=Ub(c),g=[];a:{var h=xf.get(a);if(void 0!==h){var k=Nd,m=a;switch(a){case "keypress":if(0===Id(c))break a;case "keydown":case "keyup":k=ke;break;case "focusin":m="focus";k=Zd;break;case "focusout":m="blur";k=Zd;break;case "beforeblur":case "afterblur":k=Zd;break;case "click":if(2===c.button)break a;case "auxclick":case "dblclick":case "mousedown":case "mousemove":case "mouseup":case "mouseout":case "mouseover":case "contextmenu":k=Vd;break;case "drag":case "dragend":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "dragstart":case "drop":k= +Xd;break;case "touchcancel":case "touchend":case "touchmove":case "touchstart":k=oe;break;case tf:case uf:case vf:k=ae;break;case wf:k=qe;break;case "scroll":k=Pd;break;case "wheel":k=se;break;case "copy":case "cut":case "paste":k=ce;break;case "gotpointercapture":case "lostpointercapture":case "pointercancel":case "pointerdown":case "pointermove":case "pointerout":case "pointerover":case "pointerup":k=me}var r=0!==(b&4),L=!r&&"scroll"===a,x=r?null!==h?h+"Capture":null:h;r=[];for(var t=d,u;null!== +t;){var M=t;u=M.stateNode;M=M.tag;5!==M&&26!==M&&27!==M||null===u||null===x||(M=ec(t,x),null!=M&&r.push(Lf(t,M,u)));if(L)break;t=t.return}0<r.length&&(h=new k(h,m,null,c,e),g.push({event:h,listeners:r}))}}if(0===(b&7)){a:{h="mouseover"===a||"pointerover"===a;k="mouseout"===a||"pointerout"===a;if(h&&c!==Tb&&(m=c.relatedTarget||c.fromElement)&&(pa(m)||m[ha]))break a;if(k||h){h=e.window===e?e:(h=e.ownerDocument)?h.defaultView||h.parentWindow:window;if(k){if(m=c.relatedTarget||c.toElement,k=d,m=m?pa(m): +null,null!==m&&(L=pc(m),r=m.tag,m!==L||5!==r&&27!==r&&6!==r))m=null}else k=null,m=d;if(k!==m){r=Vd;M="onMouseLeave";x="onMouseEnter";t="mouse";if("pointerout"===a||"pointerover"===a)r=me,M="onPointerLeave",x="onPointerEnter",t="pointer";L=null==k?h:sa(k);u=null==m?h:sa(m);h=new r(M,t+"leave",k,c,e);h.target=L;h.relatedTarget=u;M=null;pa(e)===d&&(r=new r(x,t+"enter",m,c,e),r.target=u,r.relatedTarget=L,M=r);L=M;if(k&&m)b:{r=k;x=m;t=0;for(u=r;u;u=Mf(u))t++;u=0;for(M=x;M;M=Mf(M))u++;for(;0<t-u;)r=Mf(r), +t--;for(;0<u-t;)x=Mf(x),u--;for(;t--;){if(r===x||null!==x&&r===x.alternate)break b;r=Mf(r);x=Mf(x)}r=null}else r=null;null!==k&&Nf(g,h,k,r,!1);null!==m&&null!==L&&Nf(g,L,m,r,!0)}}}a:{h=d?sa(d):window;k=h.nodeName&&h.nodeName.toLowerCase();if("select"===k||"input"===k&&"file"===h.type)var Kb=Oe;else if(Ge(h))if(Pe)Kb=Ye;else{Kb=We;var Fa=Ve}else(k=h.nodeName)&&"input"===k.toLowerCase()&&("checkbox"===h.type||"radio"===h.type)&&(Kb=Xe);if(Kb&&(Kb=Kb(a,d))){He(g,Kb,c,e);break a}Fa&&Fa(a,h,d);"focusout"=== +a&&(Fa=h._wrapperState)&&Fa.controlled&&"number"===h.type&&yb(h,"number",h.value)}Fa=d?sa(d):window;switch(a){case "focusin":if(Ge(Fa)||"true"===Fa.contentEditable)jf=Fa,kf=d,lf=null;break;case "focusout":lf=kf=jf=null;break;case "mousedown":mf=!0;break;case "contextmenu":case "mouseup":case "dragend":mf=!1;nf(g,c,e);break;case "selectionchange":if(hf)break;case "keydown":case "keyup":nf(g,c,e)}var sb;if(ue)b:{switch(a){case "compositionstart":var ka="onCompositionStart";break b;case "compositionend":ka= +"onCompositionEnd";break b;case "compositionupdate":ka="onCompositionUpdate";break b}ka=void 0}else Ce?Ae(a,c)&&(ka="onCompositionEnd"):"keydown"===a&&229===c.keyCode&&(ka="onCompositionStart");ka&&(xe&&"ko"!==c.locale&&(Ce||"onCompositionStart"!==ka?"onCompositionEnd"===ka&&Ce&&(sb=Hd()):(Ed=e,Fd="value"in Ed?Ed.value:Ed.textContent,Ce=!0)),Fa=Ie(d,ka),0<Fa.length&&(ka=new ee(ka,a,null,c,e),g.push({event:ka,listeners:Fa}),sb?ka.data=sb:(sb=Be(c),null!==sb&&(ka.data=sb))));if(sb=we?De(a,c):Ee(a,c))d= +Ie(d,"onBeforeInput"),0<d.length&&(e=new ee("onBeforeInput","beforeinput",null,c,e),g.push({event:e,listeners:d}),e.data=sb)}Me(g,b)})}function Lf(a,b,c){return{instance:a,listener:b,currentTarget:c}}function Ie(a,b){for(var c=b+"Capture",d=[];null!==a;){var e=a,f=e.stateNode;e=e.tag;5!==e&&26!==e&&27!==e||null===f||(e=ec(a,c),null!=e&&d.unshift(Lf(a,e,f)),e=ec(a,b),null!=e&&d.push(Lf(a,e,f)));a=a.return}return d} function Mf(a){if(null===a)return null;do a=a.return;while(a&&5!==a.tag&&27!==a.tag);return a?a:null}function Nf(a,b,c,d,e){for(var f=b._reactName,g=[];null!==c&&c!==d;){var h=c,k=h.alternate,l=h.stateNode;h=h.tag;if(null!==k&&k===d)break;5!==h&&26!==h&&27!==h||null===l||(k=l,e?(l=ec(c,f),null!=l&&g.unshift(Lf(c,l,k))):e||(l=ec(c,f),null!=l&&g.push(Lf(c,l,k))));c=c.return}0!==g.length&&a.push({event:b,listeners:g})}var Of=/\r\n?/g,Pf=/\u0000|\uFFFD/g; -function Qf(a){return("string"===typeof a?a:""+a).replace(Of,"\n").replace(Pf,"")}function Rf(a,b,c){b=Qf(b);if(Qf(a)!==b&&c)throw Error(m(425));}function Sf(){} +function Qf(a){return("string"===typeof a?a:""+a).replace(Of,"\n").replace(Pf,"")}function Rf(a,b,c){b=Qf(b);if(Qf(a)!==b&&c)throw Error(p(425));}function Sf(){} function Tf(a,b,c,d){c=9===c.nodeType?c:c.ownerDocument;"http://www.w3.org/1999/xhtml"===d&&(d=Gb(a));"http://www.w3.org/1999/xhtml"===d?"script"===a?(b=c.createElement("div"),b.innerHTML="<script>\x3c/script>",d=b.removeChild(b.firstChild)):"string"===typeof b.is?d=c.createElement(a,{is:b.is}):(d=c.createElement(a),"select"===a&&(a=d,b.multiple?a.multiple=!0:b.size&&(a.size=b.size))):d=c.createElementNS(d,a);return d} function Uf(a,b,c){var d=Sb(b,c);switch(b){case "dialog":C("cancel",a);C("close",a);var e=c;break;case "iframe":case "object":case "embed":C("load",a);e=c;break;case "video":case "audio":for(e=0;e<Ef.length;e++)C(Ef[e],a);e=c;break;case "source":C("error",a);e=c;break;case "img":case "image":case "link":C("error",a);C("load",a);e=c;break;case "details":C("toggle",a);e=c;break;case "input":vb(a,c);e=ub(a,c);C("invalid",a);break;case "option":e=c;break;case "select":a._wrapperState={wasMultiple:!!c.multiple}; -e=z({},c,{value:void 0});C("invalid",a);break;case "textarea":Db(a,c);e=Cb(a,c);C("invalid",a);break;default:e=c}Rb(b,e);var f=e,g;for(g in f)if(f.hasOwnProperty(g)){var h=f[g];"style"===g?Pb(a,h):"dangerouslySetInnerHTML"===g?(h=h?h.__html:void 0,null!=h&&Jb(a,h)):"children"===g?"string"===typeof h?"body"===b||"textarea"===b&&""===h||Kb(a,h):"number"===typeof h&&"body"!==b&&Kb(a,""+h):"suppressContentEditableWarning"!==g&&"suppressHydrationWarning"!==g&&"autoFocus"!==g&&(wa.hasOwnProperty(g)?null!= -h&&"onScroll"===g&&C("scroll",a):null!=h&&La(a,g,h,d))}switch(b){case "input":qb(a);zb(a,c,!1);break;case "textarea":qb(a);Fb(a);break;case "option":null!=c.value&&a.setAttribute("value",""+nb(c.value));break;case "select":a.multiple=!!c.multiple;b=c.value;null!=b?Bb(a,!!c.multiple,b,!1):null!=c.defaultValue&&Bb(a,!!c.multiple,c.defaultValue,!0);break;default:"function"===typeof e.onClick&&(a.onclick=Sf)}} -function Vf(a,b,c,d,e){"input"===c&&"radio"===e.type&&null!=e.name&&wb(a,e);Sb(c,d);d=Sb(c,e);for(var f=0;f<b.length;f+=2){var g=b[f],h=b[f+1];"style"===g?Pb(a,h):"dangerouslySetInnerHTML"===g?Jb(a,h):"children"===g?Kb(a,h):La(a,g,h,d)}switch(c){case "input":xb(a,e);break;case "textarea":Eb(a,e);break;case "select":b=a._wrapperState.wasMultiple,a._wrapperState.wasMultiple=!!e.multiple,c=e.value,null!=c?Bb(a,!!e.multiple,c,!1):b!==!!e.multiple&&(null!=e.defaultValue?Bb(a,!!e.multiple,e.defaultValue, -!0):Bb(a,!!e.multiple,e.multiple?[]:"",!1))}}var Wf=[],Xf=-1;function Yf(a){return{current:a}}function D(a){0>Xf||(a.current=Wf[Xf],Wf[Xf]=null,Xf--)}function E(a,b){Xf++;Wf[Xf]=a.current;a.current=b}var Zf=Yf(null),$f=Yf(null),ag=Yf(null);function bg(a,b){E(ag,b);E($f,a);E(Zf,null);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:Hb(null,"");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=Hb(b,a)}D(Zf);E(Zf,b)} -function cg(){D(Zf);D($f);D(ag)}function dg(a){var b=Zf.current;var c=Hb(b,a.type);b!==c&&(E($f,a),E(Zf,c))}function eg(a){$f.current===a&&(D(Zf),D($f))}var fg=ca.Dispatcher,gg=null,hg=null,kg={preload:ig,preinit:jg},lg=new Map;function mg(a){return"function"===typeof a.getRootNode?a.getRootNode():a.ownerDocument}function ng(){var a=ag.current;return a?mg(a):null}function og(){var a=ng();if(a)return a.ownerDocument||a;try{return gg||window.document}catch(b){return null}} -function ig(a,b){var c=og();if("string"===typeof a&&a&&"object"===typeof b&&null!==b&&c){var d=b.as,e=pg(a),f=e='link[rel="preload"][as="'+d+'"][href="'+e+'"]';switch(d){case "style":f=qg(a);break;case "script":f=rg(a)}lg.has(f)||(a={href:a,rel:"preload",as:d,crossOrigin:"font"===d?"":b.crossOrigin,integrity:b.integrity},lg.set(f,a),null===c.querySelector(e)&&(b=Tf("link",a,c,"http://www.w3.org/1999/xhtml"),Uf(b,"link",a),b[na]=!0,c.head.appendChild(b)))}} -function jg(a,b){if("string"===typeof a&&a&&"object"===typeof b&&null!==b){var c=ng(),d=b.as;if(c)switch(d){case "style":d=ua(c).hoistableStyles;var e=qg(a),f=b.precedence||"default",g=d.get(e);if(g)break;g=c.querySelector(sg(e));g||(a={rel:"stylesheet",href:a,"data-precedence":f,crossOrigin:b.crossOrigin},(b=lg.get(e))&&tg(a,b),g=Tf("link",a,c,"http://www.w3.org/1999/xhtml"),g[na]=!0,Uf(g,"link",a),ug(g,f,c));g={type:"stylesheet",instance:g,count:1};d.set(e,g);break;case "script":d=ua(c).hoistableScripts, -e=rg(a),f=d.get(e),f||(f=c.querySelector("script[async]"+e),f||(a={src:a,async:!0,crossOrigin:b.crossOrigin,integrity:b.integrity},(b=lg.get(e))&&vg(a,b),f=Tf("script",a,c,"http://www.w3.org/1999/xhtml"),f[na]=!0,Uf(f,"link",a),(c.ownerDocument||c).head.appendChild(f)),f={type:"script",instance:f,count:1},d.set(e,f))}else if("style"===d||"script"===d)if(c=og()){e=pg(a);f=e='link[rel="preload"][as="'+d+'"][href="'+e+'"]';switch(d){case "style":f=qg(a);break;case "script":f=rg(a)}lg.has(f)||(a={href:a, -rel:"preload",as:d,crossOrigin:"font"===d?"":b.crossOrigin,integrity:b.integrity},lg.set(f,a),null===c.querySelector(e)&&(b=Tf("link",a,c,"http://www.w3.org/1999/xhtml"),Uf(b,"link",a),b[na]=!0,c.head.appendChild(b)))}}} -function wg(a,b,c){b=ng();if(!b)throw Error(m(446));switch(a){case "meta":case "title":return null;case "style":return"string"===typeof c.precedence&&"string"===typeof c.href?(c=qg(c.href),b=ua(b).hoistableStyles,a=b.get(c),a||(a={type:"style",instance:null,count:0},b.set(c,a)),a):{type:"void",instance:null,count:0};case "link":if("stylesheet"===c.rel&&"string"===typeof c.href&&"string"===typeof c.precedence){var d=qg(c.href),e=ua(b).hoistableStyles;a=e.get(d);a||(b=b.ownerDocument||b,a={type:"stylesheet", -instance:null,count:0},e.set(d,a),lg.has(d)||(c={rel:"preload",as:"style",href:c.href,crossOrigin:c.crossOrigin,integrity:c.integrity,media:c.media,hrefLang:c.hrefLang,referrerPolicy:c.referrerPolicy},lg.set(d,c),b.querySelector(sg(d))||null!==b.querySelector('link[rel="preload"][as="style"]['+d+"]")||(d=Tf("link",c,b,"http://www.w3.org/1999/xhtml"),Uf(d,"link",c),d[na]=!0,b.head.appendChild(d))));return a}return null;case "script":return"string"===typeof c.src&&!0===c.async?(c=rg(c.src),b=ua(b).hoistableScripts, -a=b.get(c),a||(a={type:"script",instance:null,count:0},b.set(c,a)),a):{type:"void",instance:null,count:0};default:throw Error(m(444,a));}}function qg(a){return'href="'+pg(a)+'"'}function sg(a){return'link[rel="stylesheet"]['+a+"]"}function rg(a){return'[src="'+pg(a)+'"]'} -function xg(a,b,c){b.count++;if(null===b.instance)switch(b.type){case "style":var d=qg(c.href);if(d=a.querySelector("style[data-"+d+"]"))return b.instance=d;var e=z({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});d=Tf("style",e,a,"http://www.w3.org/1999/xhtml");d[na]=!0;Uf(d,"style",e);ug(d,c.precedence,a);return b.instance=d;case "stylesheet":e=qg(c.href);var f=a.querySelector(sg(e));if(f)return b.instance=f;d=z({},c,{"data-precedence":c.precedence,precedence:null}); -(e=lg.get(e))&&tg(d,e);f=Tf("link",d,a,"http://www.w3.org/1999/xhtml");f[na]=!0;var g=f;g._p=(new Promise(function(a,b){g.onload=a;g.onerror=b})).then(function(){return g._p.s="l"},function(){return g._p.s="e"});Uf(f,"link",d);ug(f,c.precedence,a);return b.instance=f;case "script":e=rg(c.src);if(f=a.querySelector("script[async]"+e))return b.instance=f;d=c;if(e=lg.get(e))d=z({},c),vg(d,e);f=Tf("script",d,a,"http://www.w3.org/1999/xhtml");f[na]=!0;Uf(f,"link",d);(a.ownerDocument||a).head.appendChild(f); -return b.instance=f;case "void":return null;default:throw Error(m(443,b.type));}return b.instance}function ug(a,b,c){for(var d=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),e=d.length?d[d.length-1]:null,f=e,g=0;g<d.length;g++){var h=d[g];if(h.dataset.precedence===b)f=h;else if(f!==e)break}f?f.parentNode.insertBefore(a,f.nextSibling):(b=9===c.nodeType?c.head:c,b.insertBefore(a,b.firstChild))} -function tg(a,b){null==a.crossOrigin&&(a.crossOrigin=b.crossOrigin);null==a.referrerPolicy&&(a.referrerPolicy=b.referrerPolicy);null==a.title&&(a.title=b.title)}function vg(a,b){null==a.crossOrigin&&(a.crossOrigin=b.crossOrigin);null==a.referrerPolicy&&(a.referrerPolicy=b.referrerPolicy);null==a.integrity&&(a.referrerPolicy=b.integrity)}function yg(a,b,c){a=a.ownerDocument||a;a.head.insertBefore(c,"title"===b?a.querySelector("head > title"):null)}var zg=/[\n"\\]/g; -function pg(a){return a.replace(zg,function(a){return"\\"+a.charCodeAt(0).toString(16)})}var Ag=null,Bg=null;function Cg(a,b){return"textarea"===a||"noscript"===a||"string"===typeof b.children||"number"===typeof b.children||"object"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&null!=b.dangerouslySetInnerHTML.__html} -var Dg="function"===typeof setTimeout?setTimeout:void 0,Eg="function"===typeof clearTimeout?clearTimeout:void 0,Fg="function"===typeof Promise?Promise:void 0,Hg="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof Fg?function(a){return Fg.resolve(null).then(a).catch(Gg)}:Dg;function Gg(a){setTimeout(function(){throw a;})} -function Ig(a,b){var c=b,d=0;do{var e=c.nextSibling;a.removeChild(c);if(e&&8===e.nodeType)if(c=e.data,"/$"===c){if(0===d){a.removeChild(e);vd(b);return}d--}else"$"!==c&&"$?"!==c&&"$!"!==c||d++;c=e}while(c);vd(b)}function Jg(a){var b=a.nodeType;if(9===b)Kg(a);else if(1===b)switch(a.nodeName){case "HEAD":case "HTML":case "BODY":Kg(a);break;default:a.textContent=""}} -function Kg(a){var b=a.firstChild;b&&10===b.nodeType&&(b=b.nextSibling);for(;b;){var c=b;b=b.nextSibling;switch(c.nodeName){case "HTML":case "HEAD":case "BODY":Kg(c);oa(c);continue;case "STYLE":continue;case "LINK":if("stylesheet"===c.rel.toLowerCase())continue}a.removeChild(c)}} -function Lg(a){for(;null!=a;a=a.nextSibling){var b=a.nodeType;if(1===b){b=a;switch(b.tagName){case "TITLE":case "META":case "HTML":case "HEAD":case "BODY":continue;case "LINK":if("stylesheet"===b.rel&&!b.hasAttribute("data-precedence"))break;continue;case "STYLE":if(b.hasAttribute("data-precedence"))continue;break;case "SCRIPT":if(b.hasAttribute("async"))continue}break}else if(3===b)break;if(8===b){b=a.data;if("$"===b||"$!"===b||"$?"===b)break;if("/$"===b)return null}}return a} +e=z({},c,{value:void 0});C("invalid",a);break;case "textarea":Db(a,c);e=Cb(a,c);C("invalid",a);break;default:e=c}Rb(b,e);var f=e,g;for(g in f)if(f.hasOwnProperty(g)){var h=f[g];"style"===g?Pb(a,h):"dangerouslySetInnerHTML"===g?(h=h?h.__html:void 0,null!=h&&Jb(a,h)):"children"===g?"string"===typeof h?"body"===b||"textarea"===b&&""===h||Lb(a,h):"number"===typeof h&&"body"!==b&&Lb(a,""+h):"suppressContentEditableWarning"!==g&&"suppressHydrationWarning"!==g&&"autoFocus"!==g&&(wa.hasOwnProperty(g)?null!= +h&&"onScroll"===g&&C("scroll",a):null!=h&&La(a,g,h,d))}switch(b){case "input":qb(a);zb(a,c,!1);break;case "textarea":qb(a);Fb(a);break;case "option":null!=c.value&&a.setAttribute("value",""+nb(c.value));break;case "select":a.multiple=!!c.multiple;b=c.value;null!=b?Bb(a,!!c.multiple,b,!1):null!=c.defaultValue&&Bb(a,!!c.multiple,c.defaultValue,!0);break;default:"function"===typeof e.onClick&&(a.onclick=Sf)}}var Vf=[],Wf=-1;function Xf(a){return{current:a}} +function D(a){0>Wf||(a.current=Vf[Wf],Vf[Wf]=null,Wf--)}function E(a,b){Wf++;Vf[Wf]=a.current;a.current=b}var Yf=Xf(null),Zf=Xf(null),$f=Xf(null);function ag(a,b){E($f,b);E(Zf,a);E(Yf,null);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:Hb(null,"");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=Hb(b,a)}D(Yf);E(Yf,b)}function bg(){D(Yf);D(Zf);D($f)}function cg(a){var b=Yf.current;var c=Hb(b,a.type);b!==c&&(E(Zf,a),E(Yf,c))} +function dg(a){Zf.current===a&&(D(Yf),D(Zf))}var eg=ca.Dispatcher,fg=null,gg=null,jg={preload:hg,preinit:ig},kg=new Map;function lg(a){return"function"===typeof a.getRootNode?a.getRootNode():a.ownerDocument}function mg(){var a=$f.current;return a?lg(a):null}function ng(a){a.instance=void 0}function og(a){a=lg(a);a=ua(a);a.scripts.forEach(ng);a.head.forEach(ng)}function pg(){var a=mg();if(a)return a.ownerDocument||a;try{return fg||window.document}catch(b){return null}} +function qg(a){return a.ownerDocument||a}function hg(a,b){var c=pg();if("string"===typeof a&&a&&"object"===typeof b&&null!==b&&c){var d=b.as;kg.get(a)||rg(c,a,{href:a,rel:"preload",as:d,crossOrigin:"font"===d?"":b.crossOrigin,integrity:b.integrity})}} +function ig(a,b){if("string"===typeof a&&a&&"object"===typeof b&&null!==b){var c=mg(),d=b.as;if(c)switch(d){case "style":d=ua(c).styles;var e=b.precedence||"default",f=d.get(a);f||(f=sg(d,c,a,e,{rel:"stylesheet",href:a,"data-precedence":e,crossOrigin:b.crossOrigin}));tg(f);break;case "script":d=ua(c).scripts,(e=d.get(a))||(e=ug(d,c,a,{src:a,async:!0,crossOrigin:b.crossOrigin,integrity:b.integrity})),tg(e)}else(c=pg())&&(kg.get(a)||rg(c,a,{href:a,rel:"preload",as:d,crossOrigin:"font"===d?"":b.crossOrigin, +integrity:b.integrity}))}} +function vg(a,b){var c=mg();if(!c)throw Error(p(446));switch(a){case "base":c=qg(c);var d=ua(c).head,e=b.target,f=b.href;f="base"+("string"===typeof f?'[href="'+F(f)+'"]':":not([href])");f+="string"===typeof e?'[target="'+F(e)+'"]':":not([target])";e=d.get(f);e||(e={type:"base",matcher:f,props:z({},b),count:0,instance:null,root:c},d.set(f,e));return e;case "meta":var g=b.charSet,h=b.content,k=b.httpEquiv,l=b.name,n=b.itemProp,q=b.property;c=qg(c);var v=ua(c);a=v.head;v=v.lastStructuredMeta;"string"=== +typeof g?d="meta[charset]":"string"===typeof h&&("string"===typeof k?d='meta[http-equiv="'+F(k)+'"][content="'+F(h)+'"]':"string"===typeof q?(e=q,d='meta[property="'+F(q)+'"][content="'+F(h)+'"]',f=q.split(":").slice(0,-1).join(":"),(f=v.get(f))&&(d=f.matcher+d)):"string"===typeof l?d='meta[name="'+F(l)+'"][content="'+F(h)+'"]':"string"===typeof n&&(d='meta[itemprop="'+F(n)+'"][content="'+F(h)+'"]'));return d?(g=a.get(d),g||(g={type:"meta",matcher:d,property:e,parentResource:f,props:z({},b),count:0, +instance:null,root:c},a.set(d,g)),"string"===typeof g.property&&v.set(g.property,g),g):null;case "title":return d=b.children,d=Array.isArray(d)?1===d.length?d[0]:null:d,"function"!==typeof d&&"symbol"!==typeof d&&null!==d&&void 0!==d?(d=""+d,c=qg(c),e=ua(c).head,f="title:"+d,a=e.get(f),a||(b=z({},b),b.children=d,a={type:"title",props:b,count:0,instance:null,root:c},e.set(f,a)),a):null;case "link":switch(d=b.rel,d){case "stylesheet":return e=ua(c).styles,f=b.precedence,a=b.href,"string"===typeof a&& +"string"===typeof f?(d=e.get(a),d||(d=z({},b),d["data-precedence"]=b.precedence,d.precedence=null,b=d=sg(e,c,a,f,d),!1===b.loaded&&null===b.hint&&(c=b.href,e=b.props,e={rel:"preload",as:"style",href:e.href,crossOrigin:e.crossOrigin,integrity:e.integrity,media:e.media,hrefLang:e.hrefLang,referrerPolicy:e.referrerPolicy},b.hint=rg(qg(b.root),c,e))),d):null;case "preload":return d=b.href,"string"===typeof d?(e=kg.get(d),e||(b=z({},b),e=rg(qg(c),d,b)),e):null;default:return e=b.href,f=b.sizes,a=b.media, +"string"===typeof d&&"string"===typeof e?(d="rel:"+d+"::href:"+e+("::sizes:"+("string"===typeof f?f:""))+("::media:"+("string"===typeof a?a:"")),c=qg(c),e=ua(c).head,f=e.get(d),f||(f={type:"link",props:z({},b),count:0,instance:null,root:c},e.set(d,f)),f):null}case "script":return d=ua(c).scripts,e=b.src,b.async&&"string"===typeof e?(f=d.get(e),f||(b=z({},b),f=ug(d,c,e,b)),f):null;default:throw Error(p(444,a));}} +function tg(a){switch(a.type){case "base":case "title":case "link":case "meta":a:{a.count++;var b=a.instance;if(!b){var c=a.props,d=a.root,e=a.type;switch(e){case "title":var f=d.querySelectorAll("title");for(b=0;b<f.length;b++)if(f[b].textContent===c.children){b=a.instance=f[b];b[na]=!0;a=b;break a}b=a.instance=wg(e,c,d);a=f[0];xg(d,b,a&&"http://www.w3.org/2000/svg"!==a.namespaceURI?a:null);break;case "meta":f=null;var g=a.matcher;b=a.property;var h=a.parentResource;if(h&&"string"===typeof b){if(g= +h.instance)for(g=f=g.nextSibling;h=g;)if(g=h.nextSibling,"META"===h.nodeName){var k=h.getAttribute("property");if("string"===typeof k){if(k===b&&h.getAttribute("content")===c.content){a.instance=h;h[na]=!0;a=h;break a}if(b.startsWith(k+":"))break}}}else if(b=d.querySelector(g)){a.instance=b;b[na]=!0;break}b=a.instance=wg(e,c,d);xg(d,b,f);break;case "link":f=F(c.rel);b=F(c.href);f='link[rel="'+f+'"][href="'+b+'"]';"string"===typeof c.sizes&&(b=F(c.sizes),f+='[sizes="'+b+'"]');"string"===typeof c.media&& +(b=F(c.media),f+='[media="'+b+'"]');if(f=d.querySelector(f)){b=a.instance=f;b[na]=!0;break}b=a.instance=wg(e,c,d);xg(d,b,null);break;case "base":(f=d.querySelector(a.matcher))?(b=a.instance=f,b[na]=!0):(b=a.instance=wg(e,c,d),xg(d,b,d.querySelector("base")));break;default:throw Error(p(457,e));}}a=b}return a;case "style":d=a.instance;if(!d)if(c=a.root,e=a.precedence,d=F(a.props.href),f=c.querySelector('link[rel="stylesheet"][data-precedence][href="'+d+'"]'))if(d=a.instance=f,d[na]=!0,a.preloaded= +!0,c=f._p)switch(c.s){case "l":a.loaded=!0;a.error=!1;break;case "e":a.error=!0;break;default:yg(f,a)}else a.loaded=!0;else{d=a.instance=wg("link",a.props,qg(c));yg(d,a);f=d;b=c.querySelectorAll('link[rel="stylesheet"][data-precedence]');h=g=b.length?b[b.length-1]:null;for(k=0;k<b.length;k++){var l=b[k];if(l.dataset.precedence===e)h=l;else if(h!==g)break}if(h)h.parentNode.insertBefore(f,h.nextSibling);else if(c=9===c.nodeType?c.head:c)c.insertBefore(f,c.firstChild);else throw Error(p(447));}a.count++; +return d;case "script":return c=a.instance,c||(d=a.root,c=F(a.props.src),(c=d.querySelector('script[async][src="'+c+'"]'))?(c=a.instance=c,c[na]=!0):(c=a.instance=wg("script",a.props,qg(d)),xg(qg(d),c,null))),c;case "preload":return a.instance;default:throw Error(p(443,a.type));}}function zg(a){switch(a.type){case "link":case "title":case "meta":if(0===--a.count){var b=a.instance,c=b.parentNode;c&&c.removeChild(b);a.instance=null}break;case "style":a.count--}} +function wg(a,b,c){c=Tf(a,b,c,"http://www.w3.org/1999/xhtml");Uf(c,a,b);c[na]=!0;return c} +function sg(a,b,c,d,e){var f=F(c);f=b.querySelector('link[rel="stylesheet"][href="'+f+'"]');b={type:"style",count:0,href:c,precedence:d,props:e,hint:null,preloaded:!1,loaded:!1,error:!1,root:b,instance:null};a.set(c,b);if(f)if(a=f._p)switch(a.s){case "l":b.loaded=!0;break;case "e":b.error=!0;break;default:yg(f,b)}else b.loaded=!0;else if(c=kg.get(c))b.hint=c,a=b.props,c=c.props,null==a.crossOrigin&&(a.crossOrigin=c.crossOrigin),null==a.referrerPolicy&&(a.referrerPolicy=c.referrerPolicy),null==a.title&& +(a.title=c.title);return b}function ug(a,b,c,d){var e=F(c);e=b.querySelector('script[async][src="'+e+'"]');b={type:"script",src:c,props:d,root:b,instance:e||null};a.set(c,b);if(e)e[na]=!0;else if(a=kg.get(c))a=a.props,null==d.crossOrigin&&(d.crossOrigin=a.crossOrigin),null==d.referrerPolicy&&(d.referrerPolicy=a.referrerPolicy),null==d.integrity&&(d.referrerPolicy=a.integrity);return b} +function rg(a,b,c){var d=F(b);(d=a.querySelector('link[rel="preload"][href="'+d+'"]'))?d[na]=!0:(d=wg("link",c,a),xg(a,d,null));return{type:"preload",href:b,ownerDocument:a,props:c,instance:d}}function yg(a,b){var c={};c.load=Ag.bind(null,a,b,c,Bg);c.error=Cg.bind(null,a,b,c,Bg);a.addEventListener("load",c.load,Bg);a.addEventListener("error",c.error,Bg)}var Bg={passive:!0};function Ag(a,b,c,d){b.loaded=!0;b.error=!1;for(var e in c)a.removeEventListener(e,c[e],d)} +function Cg(a,b,c,d){b.loaded=!1;b.error=!0;for(var e in c)a.removeEventListener(e,c[e],d)}function xg(a,b,c){if(a=c&&c.parentNode||a.head)a.insertBefore(b,c);else throw Error(p(447));}var Dg=/[\n"\\]/g;function F(a){return a.replace(Dg,function(a){return"\\"+a.charCodeAt(0).toString(16)})}var Eg=null,Fg=null; +function Gg(a,b){return"textarea"===a||"noscript"===a||"string"===typeof b.children||"number"===typeof b.children||"object"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&null!=b.dangerouslySetInnerHTML.__html} +var Hg="function"===typeof setTimeout?setTimeout:void 0,Ig="function"===typeof clearTimeout?clearTimeout:void 0,Jg="function"===typeof Promise?Promise:void 0,Lg="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof Jg?function(a){return Jg.resolve(null).then(a).catch(Kg)}:Hg;function Kg(a){setTimeout(function(){throw a;})} +function Mg(a,b){var c=b,d=0;do{var e=c.nextSibling;a.removeChild(c);if(e&&8===e.nodeType)if(c=e.data,"/$"===c){if(0===d){a.removeChild(e);vd(b);return}d--}else"$"!==c&&"$?"!==c&&"$!"!==c||d++;c=e}while(c);vd(b)}function Ng(a){var b=a.nodeType;if(9===b)og(a),Og(a);else if(1===b)switch(a.nodeName){case "HEAD":og(a);case "HTML":case "BODY":Og(a);break;default:a.textContent=""}} +function Og(a){var b=a.firstChild;b&&10===b.nodeType&&(b=b.nextSibling);for(;b;){var c=b;b=b.nextSibling;switch(c.nodeName){case "HTML":case "HEAD":case "BODY":Og(c);oa(c);continue;case "STYLE":continue;case "LINK":if("stylesheet"===c.rel.toLowerCase())continue}a.removeChild(c)}} +function Pg(a){for(;null!=a;a=a.nextSibling){var b=a.nodeType;if(1===b){b=a;switch(b.tagName){case "TITLE":case "META":case "BASE":case "HTML":case "HEAD":case "BODY":continue;case "LINK":if("stylesheet"===b.rel&&!b.hasAttribute("data-precedence"))break;continue;case "STYLE":if(b.hasAttribute("data-precedence"))continue;break;case "SCRIPT":if(b.hasAttribute("async"))continue}break}else if(3===b)break;if(8===b){b=a.data;if("$"===b||"$!"===b||"$?"===b)break;if("/$"===b)return null}}return a} function qa(a){a=a.previousSibling;for(var b=0;a;){if(8===a.nodeType){var c=a.data;if("$"===c||"$!"===c||"$?"===c){if(0===b)return a;b--}else"/$"===c&&b++}a=a.previousSibling}return null} -function Mg(a,b,c){switch(a){case "meta":case "title":return"http://www.w3.org/2000/svg"!==c;case "style":if("string"!==typeof b.precedence||"string"!==typeof b.href||""===b.href||"http://www.w3.org/2000/svg"===c)break;return!0;case "link":if("string"!==typeof b.rel||"string"!==typeof b.href||""===b.href||b.onLoad||b.onError||"http://www.w3.org/2000/svg"===c)break;switch(b.rel){case "stylesheet":return a=b.disabled,"string"===typeof b.precedence&&null==a;default:return!0}case "script":if(!0===b.async&& -!b.onLoad&&!b.onError&&"string"===typeof b.src&&b.src&&"http://www.w3.org/2000/svg"!==c)return!0}return!1}function Ng(a,b,c){b=9===c.nodeType?c:c.ownerDocument;switch(a){case "html":a=b.documentElement;if(!a)throw Error(m(452));return a;case "head":a=b.head;if(!a)throw Error(m(453));return a;case "body":a=b.body;if(!a)throw Error(m(454));return a;default:throw Error(m(451));}}var Og={},F=Yf(Og),Pg=Yf(!1),Qg=Og; -function Rg(a,b){var c=a.type.contextTypes;if(!c)return Og;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function Sg(a){a=a.childContextTypes;return null!==a&&void 0!==a}function Tg(){D(Pg);D(F)}function Ug(a,b,c){if(F.current!==Og)throw Error(m(168));E(F,b);E(Pg,c)} -function Vg(a,b,c){var d=a.stateNode;b=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in b))throw Error(m(108,mb(a)||"Unknown",e));return z({},c,d)}function Wg(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Og;Qg=F.current;E(F,a);E(Pg,Pg.current);return!0} -function Xg(a,b,c){var d=a.stateNode;if(!d)throw Error(m(169));c?(a=Vg(a,b,Qg),d.__reactInternalMemoizedMergedChildContext=a,D(Pg),D(F),E(F,a)):D(Pg);E(Pg,c)}var Yg=null,Zg=!1,$g=!1;function ah(a){null===Yg?Yg=[a]:Yg.push(a)}function bh(a){Zg=!0;ah(a)}function ch(){if(!$g&&null!==Yg){$g=!0;var a=0,b=B;try{var c=Yg;for(B=2;a<c.length;a++){var d=c[a];do d=d(!0);while(null!==d)}Yg=null;Zg=!1}catch(e){throw null!==Yg&&(Yg=Yg.slice(a+1)),vc(Ac,ch),e;}finally{B=b,$g=!1}}return null} -var dh=[],eh=0,fh=null,gh=0,hh=[],ih=0,jh=null,kh=1,lh="";function mh(a,b){dh[eh++]=gh;dh[eh++]=fh;fh=a;gh=b}function nh(a,b,c){hh[ih++]=kh;hh[ih++]=lh;hh[ih++]=jh;jh=a;var d=kh;a=lh;var e=32-Jc(d)-1;d&=~(1<<e);c+=1;var f=32-Jc(b)+e;if(30<f){var g=e-e%5;f=(d&(1<<g)-1).toString(32);d>>=g;e-=g;kh=1<<32-Jc(b)+e|c<<e|d;lh=f+a}else kh=1<<f|c<<e|d,lh=a}function oh(a){null!==a.return&&(mh(a,1),nh(a,1,0))} -function ph(a){for(;a===fh;)fh=dh[--eh],dh[eh]=null,gh=dh[--eh],dh[eh]=null;for(;a===jh;)jh=hh[--ih],hh[ih]=null,lh=hh[--ih],hh[ih]=null,kh=hh[--ih],hh[ih]=null}var qh=null,rh=null,G=!1,sh=null;function th(a,b){var c=uh(5,null,null,0);c.elementType="DELETED";c.stateNode=b;c.return=a;b=a.deletions;null===b?(a.deletions=[c],a.flags|=16):b.push(c)} -function vh(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,qh=a,rh=Lg(b.firstChild),!0):!1;case 6:return b=""===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,qh=a,rh=null,!0):!1;case 13:return b=8!==b.nodeType?null:b,null!==b?(c=null!==jh?{id:kh,overflow:lh}:null,a.memoizedState={dehydrated:b,treeContext:c,retryLane:1073741824},c=uh(18,null,null,0),c.stateNode=b,c.return=a,a.child=c,qh=a,rh= -null,!0):!1;default:return!1}}function wh(a){return 0!==(a.mode&1)&&0===(a.flags&128)} -function xh(a){if(G){var b=a.type;var c=a.pendingProps;if("link"===b)c="stylesheet"===c.rel&&"string"!==typeof c.precedence?!0:!1;else if("script"===b){b=c.onLoad;var d=c.onError;c=!(c.async&&(b||d))}else c=!0;if(c)if(c=rh){if(b=c,!vh(a,c)){if(wh(a))throw Error(m(418));c=Lg(b.nextSibling);d=qh;c&&vh(a,c)?th(d,b):(a.flags=a.flags&-4097|2,G=!1,qh=a)}}else{if(wh(a))throw Error(m(418));a.flags=a.flags&-4097|2;G=!1;qh=a}else a.flags=a.flags&-4097|2,G=!1,qh=a}} -function yh(a){var b=a.stateNode,c=a.type,d=a.memoizedProps;b[ea]=a;b[fa]=d;var e=0!==(a.mode&1);switch(c){case "dialog":C("cancel",b);C("close",b);break;case "iframe":case "object":case "embed":C("load",b);break;case "video":case "audio":for(var f=0;f<Ef.length;f++)C(Ef[f],b);break;case "source":C("error",b);break;case "img":case "image":case "link":C("error",b);C("load",b);break;case "details":C("toggle",b);break;case "input":vb(b,d);C("invalid",b);break;case "select":b._wrapperState={wasMultiple:!!d.multiple}; +function Qg(a,b,c){switch(a){case "base":case "meta":return!0;case "title":return"http://www.w3.org/2000/svg"!==c;case "link":a=b.onError;if(b.onLoad||a)break;switch(b.rel){case "stylesheet":return a=b.precedence,c=b.disabled,"string"===typeof b.href&&"string"===typeof a&&null==c;default:return a=b.rel,"string"===typeof b.href&&"string"===typeof a}case "script":a=b.src;c=b.onLoad;var d=b.onError;return b.async&&"string"===typeof a&&!c&&!d}return!1} +function Rg(a,b,c){b=9===c.nodeType?c:c.ownerDocument;switch(a){case "html":a=b.documentElement;if(!a)throw Error(p(452));return a;case "head":a=b.head;if(!a)throw Error(p(453));return a;case "body":a=b.body;if(!a)throw Error(p(454));return a;default:throw Error(p(451));}}var Sg={},G=Xf(Sg),Tg=Xf(!1),Ug=Sg; +function Vg(a,b){var c=a.type.contextTypes;if(!c)return Sg;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function Wg(a){a=a.childContextTypes;return null!==a&&void 0!==a}function Xg(){D(Tg);D(G)}function Yg(a,b,c){if(G.current!==Sg)throw Error(p(168));E(G,b);E(Tg,c)} +function Zg(a,b,c){var d=a.stateNode;b=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in b))throw Error(p(108,mb(a)||"Unknown",e));return z({},c,d)}function $g(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Sg;Ug=G.current;E(G,a);E(Tg,Tg.current);return!0} +function ah(a,b,c){var d=a.stateNode;if(!d)throw Error(p(169));c?(a=Zg(a,b,Ug),d.__reactInternalMemoizedMergedChildContext=a,D(Tg),D(G),E(G,a)):D(Tg);E(Tg,c)}var bh=null,ch=!1,dh=!1;function eh(a){null===bh?bh=[a]:bh.push(a)}function fh(a){ch=!0;eh(a)}function gh(){if(!dh&&null!==bh){dh=!0;var a=0,b=B;try{var c=bh;for(B=2;a<c.length;a++){var d=c[a];do d=d(!0);while(null!==d)}bh=null;ch=!1}catch(e){throw null!==bh&&(bh=bh.slice(a+1)),vc(Ac,gh),e;}finally{B=b,dh=!1}}return null} +var hh=[],ih=0,jh=null,kh=0,lh=[],mh=0,nh=null,oh=1,ph="";function qh(a,b){hh[ih++]=kh;hh[ih++]=jh;jh=a;kh=b}function rh(a,b,c){lh[mh++]=oh;lh[mh++]=ph;lh[mh++]=nh;nh=a;var d=oh;a=ph;var e=32-Jc(d)-1;d&=~(1<<e);c+=1;var f=32-Jc(b)+e;if(30<f){var g=e-e%5;f=(d&(1<<g)-1).toString(32);d>>=g;e-=g;oh=1<<32-Jc(b)+e|c<<e|d;ph=f+a}else oh=1<<f|c<<e|d,ph=a}function sh(a){null!==a.return&&(qh(a,1),rh(a,1,0))} +function th(a){for(;a===jh;)jh=hh[--ih],hh[ih]=null,kh=hh[--ih],hh[ih]=null;for(;a===nh;)nh=lh[--mh],lh[mh]=null,ph=lh[--mh],lh[mh]=null,oh=lh[--mh],lh[mh]=null}var uh=null,vh=null,H=!1,wh=null;function xh(a,b){var c=yh(5,null,null,0);c.elementType="DELETED";c.stateNode=b;c.return=a;b=a.deletions;null===b?(a.deletions=[c],a.flags|=16):b.push(c)} +function zh(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,uh=a,vh=Pg(b.firstChild),!0):!1;case 6:return b=""===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,uh=a,vh=null,!0):!1;case 13:return b=8!==b.nodeType?null:b,null!==b?(c=null!==nh?{id:oh,overflow:ph}:null,a.memoizedState={dehydrated:b,treeContext:c,retryLane:1073741824},c=yh(18,null,null,0),c.stateNode=b,c.return=a,a.child=c,uh=a,vh= +null,!0):!1;default:return!1}}function Ah(a){return 0!==(a.mode&1)&&0===(a.flags&128)} +function Bh(a){if(H){var b=a.type;var c=a.pendingProps;if("link"===b)c="stylesheet"===c.rel&&"string"!==typeof c.precedence?!0:!1;else if("script"===b){b=c.onLoad;var d=c.onError;c=!(c.async&&(b||d))}else c=!0;if(c)if(c=vh){if(b=c,!zh(a,c)){if(Ah(a))throw Error(p(418));c=Pg(b.nextSibling);d=uh;c&&zh(a,c)?xh(d,b):(a.flags=a.flags&-4097|2,H=!1,uh=a)}}else{if(Ah(a))throw Error(p(418));a.flags=a.flags&-4097|2;H=!1;uh=a}else a.flags=a.flags&-4097|2,H=!1,uh=a}} +function Ch(a){var b=a.stateNode,c=a.type,d=a.memoizedProps;b[ea]=a;b[fa]=d;var e=0!==(a.mode&1);switch(c){case "dialog":C("cancel",b);C("close",b);break;case "iframe":case "object":case "embed":C("load",b);break;case "video":case "audio":for(var f=0;f<Ef.length;f++)C(Ef[f],b);break;case "source":C("error",b);break;case "img":case "image":case "link":C("error",b);C("load",b);break;case "details":C("toggle",b);break;case "input":vb(b,d);C("invalid",b);break;case "select":b._wrapperState={wasMultiple:!!d.multiple}; C("invalid",b);break;case "textarea":Db(b,d),C("invalid",b)}Rb(c,d);f=null;for(var g in d)if(d.hasOwnProperty(g)){var h=d[g];"children"===g?"string"===typeof h?b.textContent!==h&&(!0!==d.suppressHydrationWarning&&Rf(b.textContent,h,e),f=["children",h]):"number"===typeof h&&b.textContent!==""+h&&(!0!==d.suppressHydrationWarning&&Rf(b.textContent,h,e),f=["children",""+h]):wa.hasOwnProperty(g)&&null!=h&&"onScroll"===g&&C("scroll",b)}switch(c){case "input":qb(b);zb(b,d,!0);break;case "textarea":qb(b); -Fb(b);break;case "select":case "option":break;default:"function"===typeof d.onClick&&(b.onclick=Sf)}b=f;a.updateQueue=b;return null!==b?!0:!1}function zh(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag&&27!==a.tag;)a=a.return;qh=a} -function Ah(a){if(a!==qh)return!1;if(!G)return zh(a),G=!0,!1;var b=!1;3===a.tag||27===a.tag||5===a.tag&&Cg(a.type,a.memoizedProps)||(b=!0);if(b&&(b=rh)){if(wh(a))throw Bh(),Error(m(418));for(;b;)th(a,b),b=Lg(b.nextSibling)}zh(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(m(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if("/$"===c){if(0===b){rh=Lg(a.nextSibling);break a}b--}else"$"!==c&&"$!"!==c&&"$?"!==c||b++}a=a.nextSibling}rh=null}}else rh= -qh?Lg(a.stateNode.nextSibling):null;return!0}function Bh(){for(var a=rh;a;)a=Lg(a.nextSibling)}function Ch(){rh=qh=null;G=!1}function Dh(a){null===sh?sh=[a]:sh.push(a)}var Eh=[],Fh=0,Gh=0;function Hh(){for(var a=Fh,b=Gh=Fh=0;b<a;){var c=Eh[b];Eh[b++]=null;var d=Eh[b];Eh[b++]=null;var e=Eh[b];Eh[b++]=null;var f=Eh[b];Eh[b++]=null;if(null!==d&&null!==e){var g=d.pending;null===g?e.next=e:(e.next=g.next,g.next=e);d.pending=e}0!==f&&Ih(c,e,f)}} -function Jh(a,b,c,d){Eh[Fh++]=a;Eh[Fh++]=b;Eh[Fh++]=c;Eh[Fh++]=d;Gh|=d;a.lanes|=d;a=a.alternate;null!==a&&(a.lanes|=d)}function Kh(a,b){Jh(a,null,null,b);return Lh(a)} -function Ih(a,b,c){a.lanes|=c;var d=a.alternate;null!==d&&(d.lanes|=c);for(var e=!1,f=a.return;null!==f;)f.childLanes|=c,d=f.alternate,null!==d&&(d.childLanes|=c),22===f.tag&&(a=f.stateNode,null===a||a._visibility&1||(e=!0)),a=f,f=f.return;e&&null!==b&&3===a.tag&&(f=a.stateNode,e=31-Jc(c),f=f.hiddenUpdates,a=f[e],null===a?f[e]=[b]:a.push(b),b.lane=c|1073741824)}function Lh(a){if(50<Mh)throw Mh=0,Nh=null,Error(m(185));for(var b=a.return;null!==b;)a=b,b=a.return;return 3===a.tag?a.stateNode:null} -var Oh=!1;function Ph(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Qh(a,b){a=a.updateQueue;b.updateQueue===a&&(b.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function Rh(a,b){return{eventTime:a,lane:b,tag:0,payload:null,callback:null,next:null}} -function Sh(a,b,c){var d=a.updateQueue;if(null===d)return null;d=d.shared;if(0!==(H&2)){var e=d.pending;null===e?b.next=b:(b.next=e.next,e.next=b);d.pending=b;b=Lh(a);Ih(a,null,c);return b}Jh(a,d,b,c);return Lh(a)}function Th(a,b,c){b=b.updateQueue;if(null!==b&&(b=b.shared,0!==(c&8388480))){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Xc(a,c)}} -function Uh(a,b){var c=a.updateQueue,d=a.alternate;if(null!==d&&(d=d.updateQueue,c===d)){var e=null,f=null;c=c.firstBaseUpdate;if(null!==c){do{var g={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:null,next:null};null===f?e=f=g:f=f.next=g;c=c.next}while(null!==c);null===f?e=f=b:f=f.next=b}else e=f=b;c={baseState:d.baseState,firstBaseUpdate:e,lastBaseUpdate:f,shared:d.shared,callbacks:d.callbacks};a.updateQueue=c;return}a=c.lastBaseUpdate;null===a?c.firstBaseUpdate=b:a.next= +Fb(b);break;case "select":case "option":break;default:"function"===typeof d.onClick&&(b.onclick=Sf)}b=f;a.updateQueue=b;return null!==b?!0:!1}function Dh(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag&&27!==a.tag;)a=a.return;uh=a} +function Eh(a){if(a!==uh)return!1;if(!H)return Dh(a),H=!0,!1;var b=!1;3===a.tag||27===a.tag||5===a.tag&&Gg(a.type,a.memoizedProps)||(b=!0);if(b&&(b=vh)){if(Ah(a))throw Fh(),Error(p(418));for(;b;)xh(a,b),b=Pg(b.nextSibling)}Dh(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(p(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if("/$"===c){if(0===b){vh=Pg(a.nextSibling);break a}b--}else"$"!==c&&"$!"!==c&&"$?"!==c||b++}a=a.nextSibling}vh=null}}else vh= +uh?Pg(a.stateNode.nextSibling):null;return!0}function Fh(){for(var a=vh;a;)a=Pg(a.nextSibling)}function Gh(){vh=uh=null;H=!1}function Hh(a){null===wh?wh=[a]:wh.push(a)}var Ih=[],Jh=0,Kh=0;function Lh(){for(var a=Jh,b=Kh=Jh=0;b<a;){var c=Ih[b];Ih[b++]=null;var d=Ih[b];Ih[b++]=null;var e=Ih[b];Ih[b++]=null;var f=Ih[b];Ih[b++]=null;if(null!==d&&null!==e){var g=d.pending;null===g?e.next=e:(e.next=g.next,g.next=e);d.pending=e}0!==f&&Mh(c,e,f)}} +function Nh(a,b,c,d){Ih[Jh++]=a;Ih[Jh++]=b;Ih[Jh++]=c;Ih[Jh++]=d;Kh|=d;a.lanes|=d;a=a.alternate;null!==a&&(a.lanes|=d)}function Oh(a,b){Nh(a,null,null,b);return Ph(a)} +function Mh(a,b,c){a.lanes|=c;var d=a.alternate;null!==d&&(d.lanes|=c);for(var e=!1,f=a.return;null!==f;)f.childLanes|=c,d=f.alternate,null!==d&&(d.childLanes|=c),22===f.tag&&(a=f.stateNode,null===a||a._visibility&1||(e=!0)),a=f,f=f.return;e&&null!==b&&3===a.tag&&(f=a.stateNode,e=31-Jc(c),f=f.hiddenUpdates,a=f[e],null===a?f[e]=[b]:a.push(b),b.lane=c|1073741824)}function Ph(a){if(50<Qh)throw Qh=0,Rh=null,Error(p(185));for(var b=a.return;null!==b;)a=b,b=a.return;return 3===a.tag?a.stateNode:null} +var Sh=!1;function Th(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Uh(a,b){a=a.updateQueue;b.updateQueue===a&&(b.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function Vh(a,b){return{eventTime:a,lane:b,tag:0,payload:null,callback:null,next:null}} +function Wh(a,b,c){var d=a.updateQueue;if(null===d)return null;d=d.shared;if(0!==(I&2)){var e=d.pending;null===e?b.next=b:(b.next=e.next,e.next=b);d.pending=b;b=Ph(a);Mh(a,null,c);return b}Nh(a,d,b,c);return Ph(a)}function Xh(a,b,c){b=b.updateQueue;if(null!==b&&(b=b.shared,0!==(c&8388480))){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Xc(a,c)}} +function Yh(a,b){var c=a.updateQueue,d=a.alternate;if(null!==d&&(d=d.updateQueue,c===d)){var e=null,f=null;c=c.firstBaseUpdate;if(null!==c){do{var g={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:null,next:null};null===f?e=f=g:f=f.next=g;c=c.next}while(null!==c);null===f?e=f=b:f=f.next=b}else e=f=b;c={baseState:d.baseState,firstBaseUpdate:e,lastBaseUpdate:f,shared:d.shared,callbacks:d.callbacks};a.updateQueue=c;return}a=c.lastBaseUpdate;null===a?c.firstBaseUpdate=b:a.next= b;c.lastBaseUpdate=b} -function Vh(a,b,c,d){var e=a.updateQueue;Oh=!1;var f=e.firstBaseUpdate,g=e.lastBaseUpdate,h=e.shared.pending;if(null!==h){e.shared.pending=null;var k=h,l=k.next;k.next=null;null===g?f=l:g.next=l;g=k;var p=a.alternate;null!==p&&(p=p.updateQueue,h=p.lastBaseUpdate,h!==g&&(null===h?p.firstBaseUpdate=l:h.next=l,p.lastBaseUpdate=k))}if(null!==f){var q=e.baseState;g=0;p=l=k=null;h=f;do{var w=h.eventTime,u=h.lane&-1073741825,n=u!==h.lane;if(n?(I&u)===u:(d&u)===u){null!==p&&(p=p.next={eventTime:w,lane:0, -tag:h.tag,payload:h.payload,callback:null,next:null});a:{var r=a,L=h;u=b;w=c;switch(L.tag){case 1:r=L.payload;if("function"===typeof r){q=r.call(w,q,u);break a}q=r;break a;case 3:r.flags=r.flags&-65537|128;case 0:r=L.payload;u="function"===typeof r?r.call(w,q,u):r;if(null===u||void 0===u)break a;q=z({},q,u);break a;case 2:Oh=!0}}u=h.callback;null!==u&&(a.flags|=64,n&&(a.flags|=8192),n=e.callbacks,null===n?e.callbacks=[u]:n.push(u))}else n={eventTime:w,lane:u,tag:h.tag,payload:h.payload,callback:h.callback, -next:null},null===p?(l=p=n,k=q):p=p.next=n,g|=u;h=h.next;if(null===h)if(h=e.shared.pending,null===h)break;else n=h,h=n.next,n.next=null,e.lastBaseUpdate=n,e.shared.pending=null}while(1);null===p&&(k=q);e.baseState=k;e.firstBaseUpdate=l;e.lastBaseUpdate=p;null===f&&(e.shared.lanes=0);Wh|=g;a.lanes=g;a.memoizedState=q}}function Xh(a,b){if("function"!==typeof a)throw Error(m(191,a));a.call(b)}function Yh(a,b){var c=a.callbacks;if(null!==c)for(a.callbacks=null,a=0;a<c.length;a++)Xh(c[a],b)} -function Zh(a,b,c){a=c.ref;if(null!==a&&"function"!==typeof a&&"object"!==typeof a){if(c._owner){c=c._owner;if(c){if(1!==c.tag)throw Error(m(309));var d=c.stateNode}if(!d)throw Error(m(147,a));var e=d,f=""+a;if(null!==b&&null!==b.ref&&"function"===typeof b.ref&&b.ref._stringRef===f)return b.ref;b=function(a){var b=e.refs;null===a?delete b[f]:b[f]=a};b._stringRef=f;return b}if("string"!==typeof a)throw Error(m(284));if(!c._owner)throw Error(m(290,a));}return a} -function $h(a,b){a=Object.prototype.toString.call(b);throw Error(m(31,"[object Object]"===a?"object with keys {"+Object.keys(b).join(", ")+"}":a));}function ai(a){var b=a._init;return b(a._payload)} -function bi(a){function b(b,c){if(a){var d=b.deletions;null===d?(b.deletions=[c],b.flags|=16):d.push(c)}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b){a=ci(a,b);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return b.flags|=1048576,c;d=b.alternate;if(null!==d)return d=d.index,d<c?(b.flags|=16777218,c):d;b.flags|=16777218;return c} -function g(b){a&&null===b.alternate&&(b.flags|=16777218);return b}function h(a,b,c,d){if(null===b||6!==b.tag)return b=di(c,a.mode,d),b.return=a,b;b=e(b,c);b.return=a;return b}function k(a,b,c,d){var f=c.type;if(f===Pa)return p(a,b,c.props.children,d,c.key);if(null!==b&&(b.elementType===f||"object"===typeof f&&null!==f&&f.$$typeof===Za&&ai(f)===b.type))return d=e(b,c.props),d.ref=Zh(a,b,c),d.return=a,d;d=ei(c.type,c.key,c.props,null,a.mode,d);d.ref=Zh(a,b,c);d.return=a;return d}function l(a,b,c,d){if(null=== -b||4!==b.tag||b.stateNode.containerInfo!==c.containerInfo||b.stateNode.implementation!==c.implementation)return b=fi(c,a.mode,d),b.return=a,b;b=e(b,c.children||[]);b.return=a;return b}function p(a,b,c,d,f){if(null===b||7!==b.tag)return b=gi(c,a.mode,d,f),b.return=a,b;b=e(b,c);b.return=a;return b}function q(a,b,c){if("string"===typeof b&&""!==b||"number"===typeof b)return b=di(""+b,a.mode,c),b.return=a,b;if("object"===typeof b&&null!==b){switch(b.$$typeof){case Na:return c=ei(b.type,b.key,b.props, -null,a.mode,c),c.ref=Zh(a,null,b),c.return=a,c;case Oa:return b=fi(b,a.mode,c),b.return=a,b;case Za:var d=b._init;return q(a,d(b._payload),c)}if(Ab(b)||fb(b))return b=gi(b,a.mode,c,null),b.return=a,b;$h(a,b)}return null}function w(a,b,c,d){var e=null!==b?b.key:null;if("string"===typeof c&&""!==c||"number"===typeof c)return null!==e?null:h(a,b,""+c,d);if("object"===typeof c&&null!==c){switch(c.$$typeof){case Na:return c.key===e?k(a,b,c,d):null;case Oa:return c.key===e?l(a,b,c,d):null;case Za:return e= -c._init,w(a,b,e(c._payload),d)}if(Ab(c)||fb(c))return null!==e?null:p(a,b,c,d,null);$h(a,c)}return null}function u(a,b,c,d,e){if("string"===typeof d&&""!==d||"number"===typeof d)return a=a.get(c)||null,h(b,a,""+d,e);if("object"===typeof d&&null!==d){switch(d.$$typeof){case Na:return a=a.get(null===d.key?c:d.key)||null,k(b,a,d,e);case Oa:return a=a.get(null===d.key?c:d.key)||null,l(b,a,d,e);case Za:var f=d._init;return u(a,b,c,f(d._payload),e)}if(Ab(d)||fb(d))return a=a.get(c)||null,p(b,a,d,e,null); -$h(b,d)}return null}function n(e,g,h,k){for(var l=null,x=null,v=g,t=g=0,p=null;null!==v&&t<h.length;t++){v.index>t?(p=v,v=null):p=v.sibling;var n=w(e,v,h[t],k);if(null===n){null===v&&(v=p);break}a&&v&&null===n.alternate&&b(e,v);g=f(n,g,t);null===x?l=n:x.sibling=n;x=n;v=p}if(t===h.length)return c(e,v),G&&mh(e,t),l;if(null===v){for(;t<h.length;t++)v=q(e,h[t],k),null!==v&&(g=f(v,g,t),null===x?l=v:x.sibling=v,x=v);G&&mh(e,t);return l}for(v=d(e,v);t<h.length;t++)p=u(v,e,t,h[t],k),null!==p&&(a&&null!== -p.alternate&&v.delete(null===p.key?t:p.key),g=f(p,g,t),null===x?l=p:x.sibling=p,x=p);a&&v.forEach(function(a){return b(e,a)});G&&mh(e,t);return l}function r(e,g,h,k){var l=fb(h);if("function"!==typeof l)throw Error(m(150));h=l.call(h);if(null==h)throw Error(m(151));for(var v=l=null,t=g,p=g=0,x=null,n=h.next();null!==t&&!n.done;p++,n=h.next()){t.index>p?(x=t,t=null):x=t.sibling;var r=w(e,t,n.value,k);if(null===r){null===t&&(t=x);break}a&&t&&null===r.alternate&&b(e,t);g=f(r,g,p);null===v?l=r:v.sibling= -r;v=r;t=x}if(n.done)return c(e,t),G&&mh(e,p),l;if(null===t){for(;!n.done;p++,n=h.next())n=q(e,n.value,k),null!==n&&(g=f(n,g,p),null===v?l=n:v.sibling=n,v=n);G&&mh(e,p);return l}for(t=d(e,t);!n.done;p++,n=h.next())n=u(t,e,p,n.value,k),null!==n&&(a&&null!==n.alternate&&t.delete(null===n.key?p:n.key),g=f(n,g,p),null===v?l=n:v.sibling=n,v=n);a&&t.forEach(function(a){return b(e,a)});G&&mh(e,p);return l}function L(a,d,f,h){"object"===typeof f&&null!==f&&f.type===Pa&&null===f.key&&(f=f.props.children);if("object"=== -typeof f&&null!==f){switch(f.$$typeof){case Na:a:{for(var k=f.key,l=d;null!==l;){if(l.key===k){k=f.type;if(k===Pa){if(7===l.tag){c(a,l.sibling);d=e(l,f.props.children);d.return=a;a=d;break a}}else if(l.elementType===k||"object"===typeof k&&null!==k&&k.$$typeof===Za&&ai(k)===l.type){c(a,l.sibling);d=e(l,f.props);d.ref=Zh(a,l,f);d.return=a;a=d;break a}c(a,l);break}else b(a,l);l=l.sibling}f.type===Pa?(d=gi(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=ei(f.type,f.key,f.props,null,a.mode,h),h.ref= -Zh(a,d,f),h.return=a,a=h)}return g(a);case Oa:a:{for(l=f.key;null!==d;){if(d.key===l)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=fi(f,a.mode,h);d.return=a;a=d}return g(a);case Za:return l=f._init,L(a,d,l(f._payload),h)}if(Ab(f))return n(a,d,f,h);if(fb(f))return r(a,d,f,h);$h(a,f)}return"string"===typeof f&&""!==f||"number"===typeof f? -(f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=di(f,a.mode,h),d.return=a,a=d),g(a)):c(a,d)}return L}var hi=bi(!0),ii=bi(!1),ji=Yf(null),ki=Yf(0);function li(a,b){a=mi;E(ki,a);E(ji,b);mi=a|b.baseLanes}function ni(){E(ki,mi);E(ji,ji.current)}function oi(){mi=ki.current;D(ji);D(ki)}var pi=Yf(null),qi=null;function ri(a){var b=a.alternate;E(pi,a);null===qi&&(null===b||null!==ji.current?qi=a:null!==b.memoizedState&&(qi=a))} -function si(a){if(22===a.tag){if(E(pi,a),null===qi){var b=a.alternate;null!==b&&null!==b.memoizedState&&(qi=a)}}else ti()}function ti(){E(pi,pi.current)}function ui(a){D(pi);qi===a&&(qi=null)}var vi=Yf(0); -function wi(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||"$?"===c.data||"$!"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&128))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}var xi=[]; -function yi(){for(var a=0;a<xi.length;a++)xi[a]._workInProgressVersionPrimary=null;xi.length=0}var zi=Error(m(460));function Ai(a){a=a.status;return"fulfilled"===a||"rejected"===a}function Bi(){} -function Ci(a,b,c){c=a[c];void 0===c?a.push(b):c!==b&&(b.then(Bi,Bi),b=c);switch(b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;default:"string"===typeof b.status?b.then(Bi,Bi):(a=b,a.status="pending",a.then(function(a){if("pending"===b.status){var c=b;c.status="fulfilled";c.value=a}},function(a){if("pending"===b.status){var c=b;c.status="rejected";c.reason=a}}));switch(b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;}Di=b;throw zi;}} -var Di=null,Ei=Ma.ReactCurrentDispatcher,Fi=Ma.ReactCurrentBatchConfig,Gi=0,J=null,K=null,N=null,Hi=!1,Ii=!1,Ji=!1,Ki=0,Li=0,Mi=null,Ni=0;function O(){throw Error(m(321));}function Oi(a,b){if(null===b)return!1;for(var c=0;c<b.length&&c<a.length;c++)if(!$e(a[c],b[c]))return!1;return!0}function Pi(a,b,c,d,e,f){Gi=f;J=b;b.memoizedState=null;b.updateQueue=null;b.lanes=0;Ei.current=null===a||null===a.memoizedState?Qi:Ri;Ji=!1;a=c(d,e);Ji=!1;Ii&&(a=Si(b,c,d,e));Ti();return a} -function Ti(){Ei.current=Ui;var a=null!==K&&null!==K.next;Gi=0;N=K=J=null;Hi=!1;Li=0;Mi=null;if(a)throw Error(m(300));}function Si(a,b,c,d){var e=0;do{Ii=!1;Li=0;if(25<=e)throw Error(m(301));e+=1;N=K=null;a.updateQueue=null;Ei.current=Vi;var f=b(c,d)}while(Ii);return f}function Wi(){var a=0!==Ki;Ki=0;return a}function Xi(a,b,c){b.updateQueue=a.updateQueue;b.flags&=-2053;a.lanes&=~c} -function Yi(){if(Hi){for(var a=J.memoizedState;null!==a;){var b=a.queue;null!==b&&(b.pending=null);a=a.next}Hi=!1}Gi=0;N=K=J=null;Ii=!1;Li=Ki=0;Mi=null}function Zi(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===N?J.memoizedState=N=a:N=N.next=a;return N} -function $i(){if(null===K){var a=J.alternate;a=null!==a?a.memoizedState:null}else a=K.next;var b=null===N?J.memoizedState:N.next;if(null!==b)N=b,K=a;else{if(null===a)if(null===J.alternate)a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};else throw Error(m(310));K=a;a={memoizedState:K.memoizedState,baseState:K.baseState,baseQueue:K.baseQueue,queue:K.queue,next:null};null===N?J.memoizedState=N=a:N=N.next=a}return N}var aj;aj=function(){return{lastEffect:null,events:null,stores:null}}; -function bj(a){if(null!==a&&"object"===typeof a){if("function"===typeof a.then){var b=Li;Li+=1;null===Mi&&(Mi=[]);return Ci(Mi,a,b)}if(a.$$typeof===Ta||a.$$typeof===Ua)return P(a)}throw Error(m(438,String(a)));}function cj(a,b){return"function"===typeof b?b(a):b} -function dj(a){var b=$i(),c=b.queue;if(null===c)throw Error(m(311));c.lastRenderedReducer=a;var d=K,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g}d.baseQueue=e=f;c.pending=null}if(null!==e){f=e.next;d=d.baseState;var h=g=null,k=null,l=f;do{var p=l.lane&-1073741825;if(p!==l.lane?(I&p)===p:(Gi&p)===p)null!==k&&(k=k.next={lane:0,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null}),p=l.action,Ji&&a(d,p),d=l.hasEagerState?l.eagerState: -a(d,p);else{var q={lane:p,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null};null===k?(h=k=q,g=d):k=k.next=q;J.lanes|=p;Wh|=p}l=l.next}while(null!==l&&l!==f);null===k?g=d:k.next=h;$e(d,b.memoizedState)||(ej=!0);b.memoizedState=d;b.baseState=g;b.baseQueue=k;c.lastRenderedState=d}null===e&&(c.lanes=0);return[b.memoizedState,c.dispatch]} -function fj(a){var b=$i(),c=b.queue;if(null===c)throw Error(m(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);$e(f,b.memoizedState)||(ej=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f}return[f,d]}function gj(){} -function hj(a,b){var c=J,d=$i(),e=b(),f=!$e((K||d).memoizedState,e);f&&(d.memoizedState=e,ej=!0);d=d.queue;ij(jj.bind(null,c,d,a),[a]);if(d.getSnapshot!==b||f||null!==N&&N.memoizedState.tag&1){c.flags|=2048;kj(9,lj.bind(null,c,d,e,b),void 0,null);if(null===Q)throw Error(m(349));0!==(Gi&60)||mj(c,b,e)}return e}function mj(a,b,c){a.flags|=16384;a={getSnapshot:b,value:c};b=J.updateQueue;null===b?(b=aj(),J.updateQueue=b,b.stores=[a]):(c=b.stores,null===c?b.stores=[a]:c.push(a))} -function lj(a,b,c,d){b.value=c;b.getSnapshot=d;nj(b)&&oj(a)}function jj(a,b,c){return c(function(){nj(b)&&oj(a)})}function nj(a){var b=a.getSnapshot;a=a.value;try{var c=b();return!$e(a,c)}catch(d){return!0}}function oj(a){var b=Kh(a,2);null!==b&&pj(b,a,2,-1)}function qj(a){var b=Zi();"function"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:cj,lastRenderedState:a};b.queue=a;a=a.dispatch=rj.bind(null,J,a);return[b.memoizedState,a]} -function kj(a,b,c,d){a={tag:a,create:b,destroy:c,deps:d,next:null};b=J.updateQueue;null===b?(b=aj(),J.updateQueue=b,b.lastEffect=a.next=a):(c=b.lastEffect,null===c?b.lastEffect=a.next=a:(d=c.next,c.next=a,a.next=d,b.lastEffect=a));return a}function sj(){return $i().memoizedState}function tj(a,b,c,d){var e=Zi();J.flags|=a;e.memoizedState=kj(1|b,c,void 0,void 0===d?null:d)} -function uj(a,b,c,d){var e=$i();d=void 0===d?null:d;var f=void 0;if(null!==K){var g=K.memoizedState;f=g.destroy;if(null!==d&&Oi(d,g.deps)){e.memoizedState=kj(b,c,f,d);return}}J.flags|=a;e.memoizedState=kj(1|b,c,f,d)}function vj(a,b){tj(8390656,8,a,b)}function ij(a,b){uj(2048,8,a,b)}function wj(a,b){return uj(4,2,a,b)}function xj(a,b){return uj(4,4,a,b)} -function yj(a,b){if("function"===typeof b)return a=a(),b(a),function(){b(null)};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null}}function zj(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;uj(4,4,yj.bind(null,b,a),c)}function Aj(){}function Bj(a,b){var c=$i();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Oi(b,d[1]))return d[0];c.memoizedState=[a,b];return a} -function Cj(a,b){var c=$i();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Oi(b,d[1]))return d[0];Ji&&a();a=a();c.memoizedState=[a,b];return a}function Dj(a,b,c){if(0===(Gi&42))return a.baseState&&(a.baseState=!1,ej=!0),a.memoizedState=c;$e(c,b)||(c=Tc(),J.lanes|=c,Wh|=c,a.baseState=!0);return b}function Ej(a,b){var c=B;B=0!==c&&8>c?c:8;a(!0);var d=Fi.transition;Fi.transition={};try{a(!1),b()}finally{B=c,Fi.transition=d}}function Fj(){return $i().memoizedState} -function Gj(){return $i().memoizedState}function Hj(a){for(var b=a.return;null!==b;){switch(b.tag){case 24:case 3:var c=Ij(b),d=Jj();a=Rh(d,c);var e=Sh(b,a,c);null!==e&&(pj(e,b,c,d),Th(e,b,c));b={cache:Kj()};a.payload=b;return}b=b.return}}function Lj(a,b,c){var d=Ij(a);c={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Mj(a))Nj(b,c);else if(Jh(a,b,c,d),c=Lh(a),null!==c){var e=Jj();pj(c,a,d,e);Oj(c,b,d)}} -function rj(a,b,c){var d=Ij(a),e={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Mj(a))Nj(b,e);else{var f=a.alternate;if(0===a.lanes&&(null===f||0===f.lanes)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,h=f(g,c);e.hasEagerState=!0;e.eagerState=h;if($e(h,g)){Jh(a,b,e,0);null===Q&&Hh();return}}catch(k){}finally{}Jh(a,b,e,d);c=Lh(a);null!==c&&(e=Jj(),pj(c,a,d,e),Oj(c,b,d))}}function Mj(a){var b=a.alternate;return a===J||null!==b&&b===J} -function Nj(a,b){Ii=Hi=!0;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}function Oj(a,b,c){if(0!==(c&8388480)){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Xc(a,c)}}var Ui={readContext:P,useCallback:O,useContext:O,useEffect:O,useImperativeHandle:O,useInsertionEffect:O,useLayoutEffect:O,useMemo:O,useReducer:O,useRef:O,useState:O,useDebugValue:O,useDeferredValue:O,useTransition:O,useMutableSource:O,useSyncExternalStore:O,useId:O};Ui.useCacheRefresh=O;Ui.use=O; -var Qi={readContext:P,useCallback:function(a,b){Zi().memoizedState=[a,void 0===b?null:b];return a},useContext:P,useEffect:vj,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;tj(4194308,4,yj.bind(null,b,a),c)},useLayoutEffect:function(a,b){return tj(4194308,4,a,b)},useInsertionEffect:function(a,b){tj(4,2,a,b)},useMemo:function(a,b){var c=Zi();b=void 0===b?null:b;Ji&&a();a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=Zi();b=void 0!==c?c(b):b;d.memoizedState= -d.baseState=b;a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};d.queue=a;a=a.dispatch=Lj.bind(null,J,a);return[d.memoizedState,a]},useRef:function(a){var b=Zi();a={current:a};return b.memoizedState=a},useState:qj,useDebugValue:Aj,useDeferredValue:function(a){return Zi().memoizedState=a},useTransition:function(){var a=qj(!1),b=a[0];a=Ej.bind(null,a[1]);Zi().memoizedState=a;return[b,a]},useMutableSource:function(){},useSyncExternalStore:function(a,b,c){var d=J,e=Zi(); -if(G){if(void 0===c)throw Error(m(407));c=c()}else{c=b();if(null===Q)throw Error(m(349));0!==(Gi&60)||mj(d,b,c)}e.memoizedState=c;var f={value:c,getSnapshot:b};e.queue=f;vj(jj.bind(null,d,f,a),[a]);d.flags|=2048;kj(9,lj.bind(null,d,f,c,b),void 0,null);return c},useId:function(){var a=Zi(),b=Q.identifierPrefix;if(G){var c=lh;var d=kh;c=(d&~(1<<32-Jc(d)-1)).toString(32)+c;b=":"+b+"R"+c;c=Ki++;0<c&&(b+="H"+c.toString(32));b+=":"}else c=Ni++,b=":"+b+"r"+c.toString(32)+":";return a.memoizedState=b},useCacheRefresh:function(){return Zi().memoizedState= -Hj.bind(null,J)}};Qi.use=bj;var Ri={readContext:P,useCallback:Bj,useContext:P,useEffect:ij,useImperativeHandle:zj,useInsertionEffect:wj,useLayoutEffect:xj,useMemo:Cj,useReducer:dj,useRef:sj,useState:function(){return dj(cj)},useDebugValue:Aj,useDeferredValue:function(a){var b=$i();return Dj(b,K.memoizedState,a)},useTransition:function(){var a=dj(cj)[0],b=$i().memoizedState;return[a,b]},useMutableSource:gj,useSyncExternalStore:hj,useId:Fj};Ri.useCacheRefresh=Gj;Ri.use=bj; -var Vi={readContext:P,useCallback:Bj,useContext:P,useEffect:ij,useImperativeHandle:zj,useInsertionEffect:wj,useLayoutEffect:xj,useMemo:Cj,useReducer:fj,useRef:sj,useState:function(){return fj(cj)},useDebugValue:Aj,useDeferredValue:function(a){var b=$i();return null===K?b.memoizedState=a:Dj(b,K.memoizedState,a)},useTransition:function(){var a=fj(cj)[0],b=$i().memoizedState;return[a,b]},useMutableSource:gj,useSyncExternalStore:hj,useId:Fj};Vi.useCacheRefresh=Gj;Vi.use=bj; -function Pj(a,b){if(a&&a.defaultProps){b=z({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c]);return b}return b}function Qj(a,b,c,d){b=a.memoizedState;c=c(d,b);c=null===c||void 0===c?b:z({},b,c);a.memoizedState=c;0===a.lanes&&(a.updateQueue.baseState=c)} -var Rj={isMounted:function(a){return(a=a._reactInternals)?pc(a)===a:!1},enqueueSetState:function(a,b,c){a=a._reactInternals;var d=Jj(),e=Ij(a),f=Rh(d,e);f.payload=b;void 0!==c&&null!==c&&(f.callback=c);b=Sh(a,f,e);null!==b&&(pj(b,a,e,d),Th(b,a,e))},enqueueReplaceState:function(a,b,c){a=a._reactInternals;var d=Jj(),e=Ij(a),f=Rh(d,e);f.tag=1;f.payload=b;void 0!==c&&null!==c&&(f.callback=c);b=Sh(a,f,e);null!==b&&(pj(b,a,e,d),Th(b,a,e))},enqueueForceUpdate:function(a,b){a=a._reactInternals;var c=Jj(), -d=Ij(a),e=Rh(c,d);e.tag=2;void 0!==b&&null!==b&&(e.callback=b);b=Sh(a,e,d);null!==b&&(pj(b,a,d,c),Th(b,a,d))}};function Sj(a,b,c,d,e,f,g){a=a.stateNode;return"function"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(d,f,g):b.prototype&&b.prototype.isPureReactComponent?!af(c,d)||!af(e,f):!0} -function Tj(a,b,c){var d=!1,e=Og;var f=b.contextType;"object"===typeof f&&null!==f?f=P(f):(e=Sg(b)?Qg:F.current,d=b.contextTypes,f=(d=null!==d&&void 0!==d)?Rg(a,e):Og);b=new b(c,f);a.memoizedState=null!==b.state&&void 0!==b.state?b.state:null;b.updater=Rj;a.stateNode=b;b._reactInternals=a;d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=e,a.__reactInternalMemoizedMaskedChildContext=f);return b} -function Uj(a,b,c,d){a=b.state;"function"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);"function"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&Rj.enqueueReplaceState(b,b.state,null)} -function Vj(a,b,c,d){var e=a.stateNode;e.props=c;e.state=a.memoizedState;e.refs={};Ph(a);var f=b.contextType;"object"===typeof f&&null!==f?e.context=P(f):(f=Sg(b)?Qg:F.current,e.context=Rg(a,f));e.state=a.memoizedState;f=b.getDerivedStateFromProps;"function"===typeof f&&(Qj(a,b,f,c),e.state=a.memoizedState);"function"===typeof b.getDerivedStateFromProps||"function"===typeof e.getSnapshotBeforeUpdate||"function"!==typeof e.UNSAFE_componentWillMount&&"function"!==typeof e.componentWillMount||(b=e.state, -"function"===typeof e.componentWillMount&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),b!==e.state&&Rj.enqueueReplaceState(e,e.state,null),Vh(a,c,e,d),e.state=a.memoizedState);"function"===typeof e.componentDidMount&&(a.flags|=4194308)}function Wj(a,b){try{var c="",d=b;do c+=kb(d),d=d.return;while(d);var e=c}catch(f){e="\nError generating stack: "+f.message+"\n"+f.stack}return{value:a,source:b,stack:e,digest:null}} -function Xj(a,b,c){return{value:a,source:null,stack:null!=c?c:null,digest:null!=b?b:null}}function Yj(a,b){try{console.error(b.value)}catch(c){setTimeout(function(){throw c;})}}function Zj(a,b,c){c=Rh(-1,c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){ak||(ak=!0,bk=d);Yj(a,b)};return c} -function ck(a,b,c){c=Rh(-1,c);c.tag=3;var d=a.type.getDerivedStateFromError;if("function"===typeof d){var e=b.value;c.payload=function(){return d(e)};c.callback=function(){Yj(a,b)}}var f=a.stateNode;null!==f&&"function"===typeof f.componentDidCatch&&(c.callback=function(){Yj(a,b);"function"!==typeof d&&(null===dk?dk=new Set([this]):dk.add(this));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:""})});return c} -function ek(a,b,c,d,e){if(0===(a.mode&1))return a===b?a.flags|=65536:(a.flags|=128,c.flags|=131072,c.flags&=-52805,1===c.tag&&(null===c.alternate?c.tag=17:(b=Rh(-1,2),b.tag=2,Sh(c,b,2))),c.lanes|=2),a;a.flags|=65536;a.lanes=e;return a}var fk=Ma.ReactCurrentOwner,gk=Error(m(461)),ej=!1;function R(a,b,c,d){b.child=null===a?ii(b,null,c,d):hi(b,a.child,c,d)} -function hk(a,b,c,d,e){c=c.render;var f=b.ref;ik(b,e);d=Pi(a,b,c,d,f,e);c=Wi();if(null!==a&&!ej)return Xi(a,b,e),jk(a,b,e);G&&c&&oh(b);b.flags|=1;R(a,b,d,e);return b.child} -function kk(a,b,c,d,e){if(null===a){var f=c.type;if("function"===typeof f&&!lk(f)&&void 0===f.defaultProps&&null===c.compare&&void 0===c.defaultProps)return b.tag=15,b.type=f,mk(a,b,f,d,e);a=ei(c.type,null,d,b,b.mode,e);a.ref=b.ref;a.return=b;return b.child=a}f=a.child;if(0===(a.lanes&e)){var g=f.memoizedProps;c=c.compare;c=null!==c?c:af;if(c(g,d)&&a.ref===b.ref)return jk(a,b,e)}b.flags|=1;a=ci(f,d);a.ref=b.ref;a.return=b;return b.child=a} -function mk(a,b,c,d,e){if(null!==a){var f=a.memoizedProps;if(af(f,d)&&a.ref===b.ref)if(ej=!1,b.pendingProps=d=f,0!==(a.lanes&e))0!==(a.flags&131072)&&(ej=!0);else return b.lanes=a.lanes,jk(a,b,e)}return nk(a,b,c,d,e)} -function ok(a,b,c){var d=b.pendingProps,e=d.children,f=0!==(b.stateNode._pendingVisibility&2),g=null!==a?a.memoizedState:null;pk(a,b);if("hidden"===d.mode||f){if(0!==(b.flags&128)){c=null!==g?g.baseLanes|c:c;if(null!==a){d=b.child=a.child;for(e=0;null!==d;)e=e|d.lanes|d.childLanes,d=d.sibling;b.childLanes=e&~c}else b.childLanes=0,b.child=null;return qk(a,b,c)}if(0===(b.mode&1))b.memoizedState={baseLanes:0,cachePool:null},null!==a&&rk(b,null),ni(),si(b);else if(0!==(c&1073741824))b.memoizedState={baseLanes:0, -cachePool:null},null!==a&&rk(b,null!==g?g.cachePool:null),null!==g?li(b,g):ni(),si(b);else return b.lanes=b.childLanes=1073741824,qk(a,b,null!==g?g.baseLanes|c:c)}else null!==g?(rk(b,g.cachePool),li(b,g),ti(),b.memoizedState=null):(null!==a&&rk(b,null),ni(),ti());R(a,b,e,c);return b.child}function qk(a,b,c){var d=sk();d=null===d?null:{parent:S._currentValue,pool:d};b.memoizedState={baseLanes:c,cachePool:d};null!==a&&rk(b,null);ni();si(b);return null} -function pk(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.flags|=512,b.flags|=2097152}function nk(a,b,c,d,e){var f=Sg(c)?Qg:F.current;f=Rg(b,f);ik(b,e);c=Pi(a,b,c,d,f,e);d=Wi();if(null!==a&&!ej)return Xi(a,b,e),jk(a,b,e);G&&d&&oh(b);b.flags|=1;R(a,b,c,e);return b.child}function tk(a,b,c,d,e){var f=Sg(d)?Qg:F.current;f=Rg(b,f);ik(b,e);c=Si(b,d,c,f);Ti();d=Wi();if(null!==a&&!ej)return Xi(a,b,e),jk(a,b,e);G&&d&&oh(b);b.flags|=1;R(a,b,c,e);return b.child} -function uk(a,b,c,d,e){if(Sg(c)){var f=!0;Wg(b)}else f=!1;ik(b,e);if(null===b.stateNode)vk(a,b),Tj(b,c,d),Vj(b,c,d,e),d=!0;else if(null===a){var g=b.stateNode,h=b.memoizedProps;g.props=h;var k=g.context,l=c.contextType;"object"===typeof l&&null!==l?l=P(l):(l=Sg(c)?Qg:F.current,l=Rg(b,l));var p=c.getDerivedStateFromProps,q="function"===typeof p||"function"===typeof g.getSnapshotBeforeUpdate;q||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps|| -(h!==d||k!==l)&&Uj(b,g,d,l);Oh=!1;var w=b.memoizedState;g.state=w;Vh(b,d,g,e);k=b.memoizedState;h!==d||w!==k||Pg.current||Oh?("function"===typeof p&&(Qj(b,c,p,d),k=b.memoizedState),(h=Oh||Sj(b,c,h,d,w,k,l))?(q||"function"!==typeof g.UNSAFE_componentWillMount&&"function"!==typeof g.componentWillMount||("function"===typeof g.componentWillMount&&g.componentWillMount(),"function"===typeof g.UNSAFE_componentWillMount&&g.UNSAFE_componentWillMount()),"function"===typeof g.componentDidMount&&(b.flags|=4194308)): -("function"===typeof g.componentDidMount&&(b.flags|=4194308),b.memoizedProps=d,b.memoizedState=k),g.props=d,g.state=k,g.context=l,d=h):("function"===typeof g.componentDidMount&&(b.flags|=4194308),d=!1)}else{g=b.stateNode;Qh(a,b);h=b.memoizedProps;l=b.type===b.elementType?h:Pj(b.type,h);g.props=l;q=b.pendingProps;w=g.context;k=c.contextType;"object"===typeof k&&null!==k?k=P(k):(k=Sg(c)?Qg:F.current,k=Rg(b,k));var u=c.getDerivedStateFromProps;(p="function"===typeof u||"function"===typeof g.getSnapshotBeforeUpdate)|| -"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps||(h!==q||w!==k)&&Uj(b,g,d,k);Oh=!1;w=b.memoizedState;g.state=w;Vh(b,d,g,e);var n=b.memoizedState;h!==q||w!==n||Pg.current||Oh?("function"===typeof u&&(Qj(b,c,u,d),n=b.memoizedState),(l=Oh||Sj(b,c,l,d,w,n,k)||!1)?(p||"function"!==typeof g.UNSAFE_componentWillUpdate&&"function"!==typeof g.componentWillUpdate||("function"===typeof g.componentWillUpdate&&g.componentWillUpdate(d,n,k),"function"===typeof g.UNSAFE_componentWillUpdate&& -g.UNSAFE_componentWillUpdate(d,n,k)),"function"===typeof g.componentDidUpdate&&(b.flags|=4),"function"===typeof g.getSnapshotBeforeUpdate&&(b.flags|=1024)):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&w===a.memoizedState||(b.flags|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&w===a.memoizedState||(b.flags|=1024),b.memoizedProps=d,b.memoizedState=n),g.props=d,g.state=n,g.context=k,d=l):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&w=== -a.memoizedState||(b.flags|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&w===a.memoizedState||(b.flags|=1024),d=!1)}return wk(a,b,c,d,f,e)} -function wk(a,b,c,d,e,f){pk(a,b);var g=0!==(b.flags&128);if(!d&&!g)return e&&Xg(b,c,!1),jk(a,b,f);d=b.stateNode;fk.current=b;var h=g&&"function"!==typeof c.getDerivedStateFromError?null:d.render();b.flags|=1;null!==a&&g?(b.child=hi(b,a.child,null,f),b.child=hi(b,null,h,f)):R(a,b,h,f);b.memoizedState=d.state;e&&Xg(b,c,!0);return b.child}function xk(a){var b=a.stateNode;b.pendingContext?Ug(a,b.pendingContext,b.pendingContext!==b.context):b.context&&Ug(a,b.context,!1);bg(a,b.containerInfo)} -function yk(a,b,c,d,e){Ch();Dh(e);b.flags|=256;R(a,b,c,d);return b.child}var zk={dehydrated:null,treeContext:null,retryLane:0};function Ak(a){return{baseLanes:a,cachePool:Bk()}} -function Ck(a,b,c){var d=b.pendingProps,e=!1,f=0!==(b.flags&128),g;(g=f)||(g=null!==a&&null===a.memoizedState?!1:0!==(vi.current&2));g&&(e=!0,b.flags&=-129);if(null===a){if(G){e?ri(b):ti();xh(b);a=b.memoizedState;if(null!==a&&(a=a.dehydrated,null!==a))return 0===(b.mode&1)?b.lanes=2:"$!"===a.data?b.lanes=16:b.lanes=1073741824,null;ui(b)}f=d.children;a=d.fallback;if(e)return ti(),d=b.mode,e=b.child,f={mode:"hidden",children:f},0===(d&1)&&null!==e?(e.childLanes=0,e.pendingProps=f):e=Dk(f,d,0,null), -a=gi(a,d,c,null),e.return=b,a.return=b,e.sibling=a,b.child=e,b.child.memoizedState=Ak(c),b.memoizedState=zk,a;ri(b);return Ek(b,f)}g=a.memoizedState;if(null!==g){var h=g.dehydrated;if(null!==h)return Fk(a,b,f,d,h,g,c)}if(e){ti();e=d.fallback;f=b.mode;g=a.child;h=g.sibling;var k={mode:"hidden",children:d.children};0===(f&1)&&b.child!==g?(d=b.child,d.childLanes=0,d.pendingProps=k,b.deletions=null):(d=ci(g,k),d.subtreeFlags=g.subtreeFlags&14680064);null!==h?e=ci(h,e):(e=gi(e,f,c,null),e.flags|=2);e.return= -b;d.return=b;d.sibling=e;b.child=d;d=e;e=b.child;f=a.child.memoizedState;null===f?f=Ak(c):(g=f.cachePool,null!==g?(h=S._currentValue,g=g.parent!==h?{parent:h,pool:h}:g):g=Bk(),f={baseLanes:f.baseLanes|c,cachePool:g});e.memoizedState=f;e.childLanes=a.childLanes&~c;b.memoizedState=zk;return d}ri(b);e=a.child;a=e.sibling;d=ci(e,{mode:"visible",children:d.children});0===(b.mode&1)&&(d.lanes=c);d.return=b;d.sibling=null;null!==a&&(c=b.deletions,null===c?(b.deletions=[a],b.flags|=16):c.push(a));b.child= -d;b.memoizedState=null;return d}function Ek(a,b){b=Dk({mode:"visible",children:b},a.mode,0,null);b.return=a;return a.child=b}function Gk(a,b,c,d){null!==d&&Dh(d);hi(b,a.child,null,c);a=Ek(b,b.pendingProps.children);a.flags|=2;b.memoizedState=null;return a} -function Fk(a,b,c,d,e,f,g){if(c){if(b.flags&256)return ri(b),b.flags&=-257,d=Xj(Error(m(422))),Gk(a,b,g,d);if(null!==b.memoizedState)return ti(),b.child=a.child,b.flags|=128,null;ti();f=d.fallback;e=b.mode;d=Dk({mode:"visible",children:d.children},e,0,null);f=gi(f,e,g,null);f.flags|=2;d.return=b;f.return=b;d.sibling=f;b.child=d;0!==(b.mode&1)&&hi(b,a.child,null,g);b.child.memoizedState=Ak(g);b.memoizedState=zk;return f}ri(b);if(0===(b.mode&1))return Gk(a,b,g,null);if("$!"===e.data){d=e.nextSibling&& -e.nextSibling.dataset;if(d)var h=d.dgst;d=h;f=Error(m(419));f.digest=d;d=Xj(f,d,void 0);return Gk(a,b,g,d)}h=0!==(g&a.childLanes);if(ej||h){d=Q;if(null!==d){switch(g&-g){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:e=64;break;case 536870912:e=268435456;break;default:e= -0}e=0!==(e&(d.suspendedLanes|g))?0:e;if(0!==e&&e!==f.retryLane)throw f.retryLane=e,Kh(a,e),pj(d,a,e,-1),gk;}Hk();return Gk(a,b,g,null)}if("$?"===e.data)return b.flags|=128,b.child=a.child,b=Ik.bind(null,a),e._reactRetry=b,null;a=f.treeContext;rh=Lg(e.nextSibling);qh=b;G=!0;sh=null;null!==a&&(hh[ih++]=kh,hh[ih++]=lh,hh[ih++]=jh,kh=a.id,lh=a.overflow,jh=b);b=Ek(b,d.children);b.flags|=4096;return b}function Jk(a,b,c){a.lanes|=b;var d=a.alternate;null!==d&&(d.lanes|=b);Kk(a.return,b,c)} -function Lk(a,b,c,d,e){var f=a.memoizedState;null===f?a.memoizedState={isBackwards:b,rendering:null,renderingStartTime:0,last:d,tail:c,tailMode:e}:(f.isBackwards=b,f.rendering=null,f.renderingStartTime=0,f.last=d,f.tail=c,f.tailMode=e)} -function Mk(a,b,c){var d=b.pendingProps,e=d.revealOrder,f=d.tail;R(a,b,d.children,c);d=vi.current;if(0!==(d&2))d=d&1|2,b.flags|=128;else{if(null!==a&&0!==(a.flags&128))a:for(a=b.child;null!==a;){if(13===a.tag)null!==a.memoizedState&&Jk(a,c,b);else if(19===a.tag)Jk(a,c,b);else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===b)break a;for(;null===a.sibling;){if(null===a.return||a.return===b)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}d&=1}E(vi,d);if(0===(b.mode&1))b.memoizedState= -null;else switch(e){case "forwards":c=b.child;for(e=null;null!==c;)a=c.alternate,null!==a&&null===wi(a)&&(e=c),c=c.sibling;c=e;null===c?(e=b.child,b.child=null):(e=c.sibling,c.sibling=null);Lk(b,!1,e,c,f);break;case "backwards":c=null;e=b.child;for(b.child=null;null!==e;){a=e.alternate;if(null!==a&&null===wi(a)){b.child=e;break}a=e.sibling;e.sibling=c;c=e;e=a}Lk(b,!0,c,null,f);break;case "together":Lk(b,!1,null,null,void 0);break;default:b.memoizedState=null}return b.child} -function vk(a,b){0===(b.mode&1)&&null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2)}function jk(a,b,c){null!==a&&(b.dependencies=a.dependencies);Wh|=b.lanes;if(0===(c&b.childLanes))return null;if(null!==a&&b.child!==a.child)throw Error(m(153));if(null!==b.child){a=b.child;c=ci(a,a.pendingProps);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=ci(a,a.pendingProps),c.return=b;c.sibling=null}return b.child} -function Nk(a,b,c){switch(b.tag){case 3:xk(b);Ok(b,S,a.memoizedState.cache);Ch();break;case 27:case 5:dg(b);break;case 1:Sg(b.type)&&Wg(b);break;case 4:bg(b,b.stateNode.containerInfo);break;case 10:Ok(b,b.type._context,b.memoizedProps.value);break;case 13:var d=b.memoizedState;if(null!==d){if(null!==d.dehydrated)return ri(b),b.flags|=128,null;if(0!==(c&b.child.childLanes))return Ck(a,b,c);ri(b);a=jk(a,b,c);return null!==a?a.sibling:null}ri(b);break;case 19:d=0!==(c&b.childLanes);if(0!==(a.flags&128)){if(d)return Mk(a, -b,c);b.flags|=128}var e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null,e.lastEffect=null);E(vi,vi.current);if(d)break;else return null;case 22:case 23:return b.lanes=0,ok(a,b,c);case 24:Ok(b,S,a.memoizedState.cache)}return jk(a,b,c)}var Pk=Yf(null),Qk=null,Rk=null,Sk=null;function Tk(){Sk=Rk=Qk=null}function Ok(a,b,c){E(Pk,b._currentValue);b._currentValue=c}function Uk(a){var b=Pk.current;a._currentValue=b===db?a._defaultValue:b;D(Pk)} -function Kk(a,b,c){for(;null!==a;){var d=a.alternate;(a.childLanes&b)!==b?(a.childLanes|=b,null!==d&&(d.childLanes|=b)):null!==d&&(d.childLanes&b)!==b&&(d.childLanes|=b);if(a===c)break;a=a.return}} -function Vk(a,b,c){var d=a.child;null!==d&&(d.return=a);for(;null!==d;){var e=d.dependencies;if(null!==e){var f=d.child;for(var g=e.firstContext;null!==g;){if(g.context===b){if(1===d.tag){g=Rh(-1,c&-c);g.tag=2;var h=d.updateQueue;if(null!==h){h=h.shared;var k=h.pending;null===k?g.next=g:(g.next=k.next,k.next=g);h.pending=g}}d.lanes|=c;g=d.alternate;null!==g&&(g.lanes|=c);Kk(d.return,c,a);e.lanes|=c;break}g=g.next}}else if(10===d.tag)f=d.type===a.type?null:d.child;else if(18===d.tag){f=d.return;if(null=== -f)throw Error(m(341));f.lanes|=c;e=f.alternate;null!==e&&(e.lanes|=c);Kk(f,c,a);f=d.sibling}else f=d.child;if(null!==f)f.return=d;else for(f=d;null!==f;){if(f===a){f=null;break}d=f.sibling;if(null!==d){d.return=f.return;f=d;break}f=f.return}d=f}}function ik(a,b){Qk=a;Sk=Rk=null;a=a.dependencies;null!==a&&null!==a.firstContext&&(0!==(a.lanes&b)&&(ej=!0),a.firstContext=null)} -function P(a){var b=a._currentValue;if(Sk!==a)if(a={context:a,memoizedValue:b,next:null},null===Rk){if(null===Qk)throw Error(m(308));Rk=a;Qk.dependencies={lanes:0,firstContext:a}}else Rk=Rk.next=a;return b} -var Wk="undefined"!==typeof AbortController?AbortController:function(){var a=[],b=this.signal={aborted:!1,addEventListener:function(b,d){a.push(d)}};this.abort=function(){b.aborted=!0;a.forEach(function(a){return a()})}},Xk=ba.unstable_scheduleCallback,Yk=ba.unstable_NormalPriority,S={$$typeof:Ta,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_defaultValue:null,_globalName:null};function Kj(){return{controller:new Wk,data:new Map,refCount:0}} -function Zk(a){a.refCount--;0===a.refCount&&Xk(Yk,function(){a.controller.abort()})}var $k=Ma.ReactCurrentBatchConfig,al=Yf(null);function sk(){var a=al.current;return null!==a?a:Q.pooledCache}function rk(a,b){null===b?E(al,al.current):E(al,b.pool)}function Bk(){var a=sk();return null===a?null:{parent:S._currentValue,pool:a}}function bl(a){a.flags|=2097664}var cl,dl,el,fl; -cl=function(a,b){for(var c=b.child;null!==c;){if(5===c.tag||6===c.tag)a.appendChild(c.stateNode);else if(4!==c.tag&&27!==c.tag&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return}c.sibling.return=c.return;c=c.sibling}};dl=function(){}; -el=function(a,b,c,d){var e=a.memoizedProps;if(e!==d){a=b.stateNode;var f=null;switch(c){case "input":e=ub(a,e);d=ub(a,d);f=[];break;case "select":e=z({},e,{value:void 0});d=z({},d,{value:void 0});f=[];break;case "textarea":e=Cb(a,e);d=Cb(a,d);f=[];break;default:"function"!==typeof e.onClick&&"function"===typeof d.onClick&&(a.onclick=Sf)}Rb(c,d);var g;c=null;for(l in e)if(!d.hasOwnProperty(l)&&e.hasOwnProperty(l)&&null!=e[l])if("style"===l){var h=e[l];for(g in h)h.hasOwnProperty(g)&&(c||(c={}),c[g]= +function Zh(a,b,c,d){var e=a.updateQueue;Sh=!1;var f=e.firstBaseUpdate,g=e.lastBaseUpdate,h=e.shared.pending;if(null!==h){e.shared.pending=null;var k=h,l=k.next;k.next=null;null===g?f=l:g.next=l;g=k;var n=a.alternate;null!==n&&(n=n.updateQueue,h=n.lastBaseUpdate,h!==g&&(null===h?n.firstBaseUpdate=l:h.next=l,n.lastBaseUpdate=k))}if(null!==f){var q=e.baseState;g=0;n=l=k=null;h=f;do{var v=h.eventTime,w=h.lane&-1073741825,m=w!==h.lane;if(m?(J&w)===w:(d&w)===w){null!==n&&(n=n.next={eventTime:v,lane:0, +tag:h.tag,payload:h.payload,callback:null,next:null});a:{var r=a,L=h;w=b;v=c;switch(L.tag){case 1:r=L.payload;if("function"===typeof r){q=r.call(v,q,w);break a}q=r;break a;case 3:r.flags=r.flags&-65537|128;case 0:r=L.payload;w="function"===typeof r?r.call(v,q,w):r;if(null===w||void 0===w)break a;q=z({},q,w);break a;case 2:Sh=!0}}w=h.callback;null!==w&&(a.flags|=64,m&&(a.flags|=8192),m=e.callbacks,null===m?e.callbacks=[w]:m.push(w))}else m={eventTime:v,lane:w,tag:h.tag,payload:h.payload,callback:h.callback, +next:null},null===n?(l=n=m,k=q):n=n.next=m,g|=w;h=h.next;if(null===h)if(h=e.shared.pending,null===h)break;else m=h,h=m.next,m.next=null,e.lastBaseUpdate=m,e.shared.pending=null}while(1);null===n&&(k=q);e.baseState=k;e.firstBaseUpdate=l;e.lastBaseUpdate=n;null===f&&(e.shared.lanes=0);$h|=g;a.lanes=g;a.memoizedState=q}}function ai(a,b){if("function"!==typeof a)throw Error(p(191,a));a.call(b)}function bi(a,b){var c=a.callbacks;if(null!==c)for(a.callbacks=null,a=0;a<c.length;a++)ai(c[a],b)} +function ci(a,b,c){a=c.ref;if(null!==a&&"function"!==typeof a&&"object"!==typeof a){if(c._owner){c=c._owner;if(c){if(1!==c.tag)throw Error(p(309));var d=c.stateNode}if(!d)throw Error(p(147,a));var e=d,f=""+a;if(null!==b&&null!==b.ref&&"function"===typeof b.ref&&b.ref._stringRef===f)return b.ref;b=function(a){var b=e.refs;null===a?delete b[f]:b[f]=a};b._stringRef=f;return b}if("string"!==typeof a)throw Error(p(284));if(!c._owner)throw Error(p(290,a));}return a} +function di(a,b){a=Object.prototype.toString.call(b);throw Error(p(31,"[object Object]"===a?"object with keys {"+Object.keys(b).join(", ")+"}":a));}function ei(a){var b=a._init;return b(a._payload)} +function fi(a){function b(b,c){if(a){var d=b.deletions;null===d?(b.deletions=[c],b.flags|=16):d.push(c)}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b){a=gi(a,b);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return b.flags|=1048576,c;d=b.alternate;if(null!==d)return d=d.index,d<c?(b.flags|=16777218,c):d;b.flags|=16777218;return c} +function g(b){a&&null===b.alternate&&(b.flags|=16777218);return b}function h(a,b,c,d){if(null===b||6!==b.tag)return b=hi(c,a.mode,d),b.return=a,b;b=e(b,c);b.return=a;return b}function k(a,b,c,d){var f=c.type;if(f===Pa)return n(a,b,c.props.children,d,c.key);if(null!==b&&(b.elementType===f||"object"===typeof f&&null!==f&&f.$$typeof===Za&&ei(f)===b.type))return d=e(b,c.props),d.ref=ci(a,b,c),d.return=a,d;d=ii(c.type,c.key,c.props,null,a.mode,d);d.ref=ci(a,b,c);d.return=a;return d}function l(a,b,c,d){if(null=== +b||4!==b.tag||b.stateNode.containerInfo!==c.containerInfo||b.stateNode.implementation!==c.implementation)return b=ji(c,a.mode,d),b.return=a,b;b=e(b,c.children||[]);b.return=a;return b}function n(a,b,c,d,f){if(null===b||7!==b.tag)return b=ki(c,a.mode,d,f),b.return=a,b;b=e(b,c);b.return=a;return b}function q(a,b,c){if("string"===typeof b&&""!==b||"number"===typeof b)return b=hi(""+b,a.mode,c),b.return=a,b;if("object"===typeof b&&null!==b){switch(b.$$typeof){case Na:return c=ii(b.type,b.key,b.props, +null,a.mode,c),c.ref=ci(a,null,b),c.return=a,c;case Oa:return b=ji(b,a.mode,c),b.return=a,b;case Za:var d=b._init;return q(a,d(b._payload),c)}if(Ab(b)||fb(b))return b=ki(b,a.mode,c,null),b.return=a,b;di(a,b)}return null}function v(a,b,c,d){var e=null!==b?b.key:null;if("string"===typeof c&&""!==c||"number"===typeof c)return null!==e?null:h(a,b,""+c,d);if("object"===typeof c&&null!==c){switch(c.$$typeof){case Na:return c.key===e?k(a,b,c,d):null;case Oa:return c.key===e?l(a,b,c,d):null;case Za:return e= +c._init,v(a,b,e(c._payload),d)}if(Ab(c)||fb(c))return null!==e?null:n(a,b,c,d,null);di(a,c)}return null}function w(a,b,c,d,e){if("string"===typeof d&&""!==d||"number"===typeof d)return a=a.get(c)||null,h(b,a,""+d,e);if("object"===typeof d&&null!==d){switch(d.$$typeof){case Na:return a=a.get(null===d.key?c:d.key)||null,k(b,a,d,e);case Oa:return a=a.get(null===d.key?c:d.key)||null,l(b,a,d,e);case Za:var f=d._init;return w(a,b,c,f(d._payload),e)}if(Ab(d)||fb(d))return a=a.get(c)||null,n(b,a,d,e,null); +di(b,d)}return null}function m(e,g,h,k){for(var l=null,n=null,m=g,t=g=0,x=null;null!==m&&t<h.length;t++){m.index>t?(x=m,m=null):x=m.sibling;var u=v(e,m,h[t],k);if(null===u){null===m&&(m=x);break}a&&m&&null===u.alternate&&b(e,m);g=f(u,g,t);null===n?l=u:n.sibling=u;n=u;m=x}if(t===h.length)return c(e,m),H&&qh(e,t),l;if(null===m){for(;t<h.length;t++)m=q(e,h[t],k),null!==m&&(g=f(m,g,t),null===n?l=m:n.sibling=m,n=m);H&&qh(e,t);return l}for(m=d(e,m);t<h.length;t++)x=w(m,e,t,h[t],k),null!==x&&(a&&null!== +x.alternate&&m.delete(null===x.key?t:x.key),g=f(x,g,t),null===n?l=x:n.sibling=x,n=x);a&&m.forEach(function(a){return b(e,a)});H&&qh(e,t);return l}function r(e,g,h,k){var l=fb(h);if("function"!==typeof l)throw Error(p(150));h=l.call(h);if(null==h)throw Error(p(151));for(var n=l=null,m=g,t=g=0,x=null,u=h.next();null!==m&&!u.done;t++,u=h.next()){m.index>t?(x=m,m=null):x=m.sibling;var r=v(e,m,u.value,k);if(null===r){null===m&&(m=x);break}a&&m&&null===r.alternate&&b(e,m);g=f(r,g,t);null===n?l=r:n.sibling= +r;n=r;m=x}if(u.done)return c(e,m),H&&qh(e,t),l;if(null===m){for(;!u.done;t++,u=h.next())u=q(e,u.value,k),null!==u&&(g=f(u,g,t),null===n?l=u:n.sibling=u,n=u);H&&qh(e,t);return l}for(m=d(e,m);!u.done;t++,u=h.next())u=w(m,e,t,u.value,k),null!==u&&(a&&null!==u.alternate&&m.delete(null===u.key?t:u.key),g=f(u,g,t),null===n?l=u:n.sibling=u,n=u);a&&m.forEach(function(a){return b(e,a)});H&&qh(e,t);return l}function L(a,d,f,h){"object"===typeof f&&null!==f&&f.type===Pa&&null===f.key&&(f=f.props.children);if("object"=== +typeof f&&null!==f){switch(f.$$typeof){case Na:a:{for(var k=f.key,l=d;null!==l;){if(l.key===k){k=f.type;if(k===Pa){if(7===l.tag){c(a,l.sibling);d=e(l,f.props.children);d.return=a;a=d;break a}}else if(l.elementType===k||"object"===typeof k&&null!==k&&k.$$typeof===Za&&ei(k)===l.type){c(a,l.sibling);d=e(l,f.props);d.ref=ci(a,l,f);d.return=a;a=d;break a}c(a,l);break}else b(a,l);l=l.sibling}f.type===Pa?(d=ki(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=ii(f.type,f.key,f.props,null,a.mode,h),h.ref= +ci(a,d,f),h.return=a,a=h)}return g(a);case Oa:a:{for(l=f.key;null!==d;){if(d.key===l)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=ji(f,a.mode,h);d.return=a;a=d}return g(a);case Za:return l=f._init,L(a,d,l(f._payload),h)}if(Ab(f))return m(a,d,f,h);if(fb(f))return r(a,d,f,h);di(a,f)}return"string"===typeof f&&""!==f||"number"===typeof f? +(f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=hi(f,a.mode,h),d.return=a,a=d),g(a)):c(a,d)}return L}var li=fi(!0),mi=fi(!1),ni=Xf(null),oi=Xf(0);function pi(a,b){a=qi;E(oi,a);E(ni,b);qi=a|b.baseLanes}function ri(){E(oi,qi);E(ni,ni.current)}function si(){qi=oi.current;D(ni);D(oi)}var ti=Xf(null),ui=null;function vi(a){var b=a.alternate;E(ti,a);null===ui&&(null===b||null!==ni.current?ui=a:null!==b.memoizedState&&(ui=a))} +function wi(a){if(22===a.tag){if(E(ti,a),null===ui){var b=a.alternate;null!==b&&null!==b.memoizedState&&(ui=a)}}else xi()}function xi(){E(ti,ti.current)}function yi(a){D(ti);ui===a&&(ui=null)}var zi=Xf(0); +function Ai(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||"$?"===c.data||"$!"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&128))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}var Bi=[]; +function Ci(){for(var a=0;a<Bi.length;a++)Bi[a]._workInProgressVersionPrimary=null;Bi.length=0}var Di=Error(p(460));function Ei(a){a=a.status;return"fulfilled"===a||"rejected"===a}function Fi(){} +function Gi(a,b,c){c=a[c];void 0===c?a.push(b):c!==b&&(b.then(Fi,Fi),b=c);switch(b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;default:"string"===typeof b.status?b.then(Fi,Fi):(a=b,a.status="pending",a.then(function(a){if("pending"===b.status){var c=b;c.status="fulfilled";c.value=a}},function(a){if("pending"===b.status){var c=b;c.status="rejected";c.reason=a}}));switch(b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;}Hi=b;throw Di;}} +var Hi=null,Ii=Ma.ReactCurrentDispatcher,Ji=Ma.ReactCurrentBatchConfig,Ki=0,K=null,N=null,O=null,Li=!1,Mi=!1,Ni=!1,Oi=0,Pi=0,Qi=null,Ri=0;function P(){throw Error(p(321));}function Si(a,b){if(null===b)return!1;for(var c=0;c<b.length&&c<a.length;c++)if(!$e(a[c],b[c]))return!1;return!0}function Ti(a,b,c,d,e,f){Ki=f;K=b;b.memoizedState=null;b.updateQueue=null;b.lanes=0;Ii.current=null===a||null===a.memoizedState?Ui:Vi;Ni=!1;a=c(d,e);Ni=!1;Mi&&(a=Wi(b,c,d,e));Xi();return a} +function Xi(){Ii.current=Yi;var a=null!==N&&null!==N.next;Ki=0;O=N=K=null;Li=!1;Pi=0;Qi=null;if(a)throw Error(p(300));}function Wi(a,b,c,d){var e=0;do{Mi=!1;Pi=0;if(25<=e)throw Error(p(301));e+=1;O=N=null;a.updateQueue=null;Ii.current=Zi;var f=b(c,d)}while(Mi);return f}function $i(){var a=0!==Oi;Oi=0;return a}function aj(a,b,c){b.updateQueue=a.updateQueue;b.flags&=-2053;a.lanes&=~c} +function bj(){if(Li){for(var a=K.memoizedState;null!==a;){var b=a.queue;null!==b&&(b.pending=null);a=a.next}Li=!1}Ki=0;O=N=K=null;Mi=!1;Pi=Oi=0;Qi=null}function cj(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===O?K.memoizedState=O=a:O=O.next=a;return O} +function dj(){if(null===N){var a=K.alternate;a=null!==a?a.memoizedState:null}else a=N.next;var b=null===O?K.memoizedState:O.next;if(null!==b)O=b,N=a;else{if(null===a)if(null===K.alternate)a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};else throw Error(p(310));N=a;a={memoizedState:N.memoizedState,baseState:N.baseState,baseQueue:N.baseQueue,queue:N.queue,next:null};null===O?K.memoizedState=O=a:O=O.next=a}return O}var ej;ej=function(){return{lastEffect:null,events:null,stores:null}}; +function fj(a){if(null!==a&&"object"===typeof a){if("function"===typeof a.then){var b=Pi;Pi+=1;null===Qi&&(Qi=[]);return Gi(Qi,a,b)}if(a.$$typeof===Ta||a.$$typeof===Ua)return gj(a)}throw Error(p(438,String(a)));}function hj(a,b){return"function"===typeof b?b(a):b} +function ij(a){var b=dj(),c=b.queue;if(null===c)throw Error(p(311));c.lastRenderedReducer=a;var d=N,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g}d.baseQueue=e=f;c.pending=null}if(null!==e){f=e.next;d=d.baseState;var h=g=null,k=null,l=f;do{var n=l.lane&-1073741825;if(n!==l.lane?(J&n)===n:(Ki&n)===n)null!==k&&(k=k.next={lane:0,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null}),n=l.action,Ni&&a(d,n),d=l.hasEagerState?l.eagerState: +a(d,n);else{var q={lane:n,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null};null===k?(h=k=q,g=d):k=k.next=q;K.lanes|=n;$h|=n}l=l.next}while(null!==l&&l!==f);null===k?g=d:k.next=h;$e(d,b.memoizedState)||(jj=!0);b.memoizedState=d;b.baseState=g;b.baseQueue=k;c.lastRenderedState=d}null===e&&(c.lanes=0);return[b.memoizedState,c.dispatch]} +function kj(a){var b=dj(),c=b.queue;if(null===c)throw Error(p(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);$e(f,b.memoizedState)||(jj=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f}return[f,d]}function lj(){} +function mj(a,b){var c=K,d=dj(),e=b(),f=!$e((N||d).memoizedState,e);f&&(d.memoizedState=e,jj=!0);d=d.queue;nj(oj.bind(null,c,d,a),[a]);if(d.getSnapshot!==b||f||null!==O&&O.memoizedState.tag&1){c.flags|=2048;pj(9,qj.bind(null,c,d,e,b),void 0,null);if(null===Q)throw Error(p(349));0!==(Ki&60)||rj(c,b,e)}return e}function rj(a,b,c){a.flags|=16384;a={getSnapshot:b,value:c};b=K.updateQueue;null===b?(b=ej(),K.updateQueue=b,b.stores=[a]):(c=b.stores,null===c?b.stores=[a]:c.push(a))} +function qj(a,b,c,d){b.value=c;b.getSnapshot=d;sj(b)&&tj(a)}function oj(a,b,c){return c(function(){sj(b)&&tj(a)})}function sj(a){var b=a.getSnapshot;a=a.value;try{var c=b();return!$e(a,c)}catch(d){return!0}}function tj(a){var b=Oh(a,2);null!==b&&uj(b,a,2,-1)}function vj(a){var b=cj();"function"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:hj,lastRenderedState:a};b.queue=a;a=a.dispatch=wj.bind(null,K,a);return[b.memoizedState,a]} +function pj(a,b,c,d){a={tag:a,create:b,destroy:c,deps:d,next:null};b=K.updateQueue;null===b?(b=ej(),K.updateQueue=b,b.lastEffect=a.next=a):(c=b.lastEffect,null===c?b.lastEffect=a.next=a:(d=c.next,c.next=a,a.next=d,b.lastEffect=a));return a}function xj(){return dj().memoizedState}function yj(a,b,c,d){var e=cj();K.flags|=a;e.memoizedState=pj(1|b,c,void 0,void 0===d?null:d)} +function zj(a,b,c,d){var e=dj();d=void 0===d?null:d;var f=void 0;if(null!==N){var g=N.memoizedState;f=g.destroy;if(null!==d&&Si(d,g.deps)){e.memoizedState=pj(b,c,f,d);return}}K.flags|=a;e.memoizedState=pj(1|b,c,f,d)}function Aj(a,b){yj(8390656,8,a,b)}function nj(a,b){zj(2048,8,a,b)}function Bj(a,b){return zj(4,2,a,b)}function Cj(a,b){return zj(4,4,a,b)} +function Dj(a,b){if("function"===typeof b)return a=a(),b(a),function(){b(null)};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null}}function Ej(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;zj(4,4,Dj.bind(null,b,a),c)}function Fj(){}function Gj(a,b){var c=dj();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Si(b,d[1]))return d[0];c.memoizedState=[a,b];return a} +function Hj(a,b){var c=dj();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Si(b,d[1]))return d[0];Ni&&a();a=a();c.memoizedState=[a,b];return a}function Ij(a,b,c){if(0===(Ki&42))return a.baseState&&(a.baseState=!1,jj=!0),a.memoizedState=c;$e(c,b)||(c=Tc(),K.lanes|=c,$h|=c,a.baseState=!0);return b}function Jj(a,b){var c=B;B=0!==c&&8>c?c:8;a(!0);var d=Ji.transition;Ji.transition={};try{a(!1),b()}finally{B=c,Ji.transition=d}}function Kj(){return dj().memoizedState} +function Lj(){return dj().memoizedState}function Mj(a){for(var b=a.return;null!==b;){switch(b.tag){case 24:case 3:var c=Nj(b),d=Oj();a=Vh(d,c);var e=Wh(b,a,c);null!==e&&(uj(e,b,c,d),Xh(e,b,c));b={cache:Pj()};a.payload=b;return}b=b.return}}function Qj(a,b,c){var d=Nj(a);c={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Rj(a))Sj(b,c);else if(Nh(a,b,c,d),c=Ph(a),null!==c){var e=Oj();uj(c,a,d,e);Tj(c,b,d)}} +function wj(a,b,c){var d=Nj(a),e={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Rj(a))Sj(b,e);else{var f=a.alternate;if(0===a.lanes&&(null===f||0===f.lanes)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,h=f(g,c);e.hasEagerState=!0;e.eagerState=h;if($e(h,g)){Nh(a,b,e,0);null===Q&&Lh();return}}catch(k){}finally{}Nh(a,b,e,d);c=Ph(a);null!==c&&(e=Oj(),uj(c,a,d,e),Tj(c,b,d))}}function Rj(a){var b=a.alternate;return a===K||null!==b&&b===K} +function Sj(a,b){Mi=Li=!0;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}function Tj(a,b,c){if(0!==(c&8388480)){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Xc(a,c)}}var Yi={readContext:gj,useCallback:P,useContext:P,useEffect:P,useImperativeHandle:P,useInsertionEffect:P,useLayoutEffect:P,useMemo:P,useReducer:P,useRef:P,useState:P,useDebugValue:P,useDeferredValue:P,useTransition:P,useMutableSource:P,useSyncExternalStore:P,useId:P};Yi.useCacheRefresh=P;Yi.use=P; +var Ui={readContext:gj,useCallback:function(a,b){cj().memoizedState=[a,void 0===b?null:b];return a},useContext:gj,useEffect:Aj,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;yj(4194308,4,Dj.bind(null,b,a),c)},useLayoutEffect:function(a,b){return yj(4194308,4,a,b)},useInsertionEffect:function(a,b){yj(4,2,a,b)},useMemo:function(a,b){var c=cj();b=void 0===b?null:b;Ni&&a();a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=cj();b=void 0!==c?c(b):b;d.memoizedState= +d.baseState=b;a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};d.queue=a;a=a.dispatch=Qj.bind(null,K,a);return[d.memoizedState,a]},useRef:function(a){var b=cj();a={current:a};return b.memoizedState=a},useState:vj,useDebugValue:Fj,useDeferredValue:function(a){return cj().memoizedState=a},useTransition:function(){var a=vj(!1),b=a[0];a=Jj.bind(null,a[1]);cj().memoizedState=a;return[b,a]},useMutableSource:function(){},useSyncExternalStore:function(a,b,c){var d=K,e=cj(); +if(H){if(void 0===c)throw Error(p(407));c=c()}else{c=b();if(null===Q)throw Error(p(349));0!==(Ki&60)||rj(d,b,c)}e.memoizedState=c;var f={value:c,getSnapshot:b};e.queue=f;Aj(oj.bind(null,d,f,a),[a]);d.flags|=2048;pj(9,qj.bind(null,d,f,c,b),void 0,null);return c},useId:function(){var a=cj(),b=Q.identifierPrefix;if(H){var c=ph;var d=oh;c=(d&~(1<<32-Jc(d)-1)).toString(32)+c;b=":"+b+"R"+c;c=Oi++;0<c&&(b+="H"+c.toString(32));b+=":"}else c=Ri++,b=":"+b+"r"+c.toString(32)+":";return a.memoizedState=b},useCacheRefresh:function(){return cj().memoizedState= +Mj.bind(null,K)}};Ui.use=fj;var Vi={readContext:gj,useCallback:Gj,useContext:gj,useEffect:nj,useImperativeHandle:Ej,useInsertionEffect:Bj,useLayoutEffect:Cj,useMemo:Hj,useReducer:ij,useRef:xj,useState:function(){return ij(hj)},useDebugValue:Fj,useDeferredValue:function(a){var b=dj();return Ij(b,N.memoizedState,a)},useTransition:function(){var a=ij(hj)[0],b=dj().memoizedState;return[a,b]},useMutableSource:lj,useSyncExternalStore:mj,useId:Kj};Vi.useCacheRefresh=Lj;Vi.use=fj; +var Zi={readContext:gj,useCallback:Gj,useContext:gj,useEffect:nj,useImperativeHandle:Ej,useInsertionEffect:Bj,useLayoutEffect:Cj,useMemo:Hj,useReducer:kj,useRef:xj,useState:function(){return kj(hj)},useDebugValue:Fj,useDeferredValue:function(a){var b=dj();return null===N?b.memoizedState=a:Ij(b,N.memoizedState,a)},useTransition:function(){var a=kj(hj)[0],b=dj().memoizedState;return[a,b]},useMutableSource:lj,useSyncExternalStore:mj,useId:Kj};Zi.useCacheRefresh=Lj;Zi.use=fj; +function Uj(a,b){if(a&&a.defaultProps){b=z({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c]);return b}return b}function Vj(a,b,c,d){b=a.memoizedState;c=c(d,b);c=null===c||void 0===c?b:z({},b,c);a.memoizedState=c;0===a.lanes&&(a.updateQueue.baseState=c)} +var Wj={isMounted:function(a){return(a=a._reactInternals)?pc(a)===a:!1},enqueueSetState:function(a,b,c){a=a._reactInternals;var d=Oj(),e=Nj(a),f=Vh(d,e);f.payload=b;void 0!==c&&null!==c&&(f.callback=c);b=Wh(a,f,e);null!==b&&(uj(b,a,e,d),Xh(b,a,e))},enqueueReplaceState:function(a,b,c){a=a._reactInternals;var d=Oj(),e=Nj(a),f=Vh(d,e);f.tag=1;f.payload=b;void 0!==c&&null!==c&&(f.callback=c);b=Wh(a,f,e);null!==b&&(uj(b,a,e,d),Xh(b,a,e))},enqueueForceUpdate:function(a,b){a=a._reactInternals;var c=Oj(), +d=Nj(a),e=Vh(c,d);e.tag=2;void 0!==b&&null!==b&&(e.callback=b);b=Wh(a,e,d);null!==b&&(uj(b,a,d,c),Xh(b,a,d))}};function Xj(a,b,c,d,e,f,g){a=a.stateNode;return"function"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(d,f,g):b.prototype&&b.prototype.isPureReactComponent?!af(c,d)||!af(e,f):!0} +function Yj(a,b,c){var d=!1,e=Sg;var f=b.contextType;"object"===typeof f&&null!==f?f=gj(f):(e=Wg(b)?Ug:G.current,d=b.contextTypes,f=(d=null!==d&&void 0!==d)?Vg(a,e):Sg);b=new b(c,f);a.memoizedState=null!==b.state&&void 0!==b.state?b.state:null;b.updater=Wj;a.stateNode=b;b._reactInternals=a;d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=e,a.__reactInternalMemoizedMaskedChildContext=f);return b} +function Zj(a,b,c,d){a=b.state;"function"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);"function"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&Wj.enqueueReplaceState(b,b.state,null)} +function ak(a,b,c,d){var e=a.stateNode;e.props=c;e.state=a.memoizedState;e.refs={};Th(a);var f=b.contextType;"object"===typeof f&&null!==f?e.context=gj(f):(f=Wg(b)?Ug:G.current,e.context=Vg(a,f));e.state=a.memoizedState;f=b.getDerivedStateFromProps;"function"===typeof f&&(Vj(a,b,f,c),e.state=a.memoizedState);"function"===typeof b.getDerivedStateFromProps||"function"===typeof e.getSnapshotBeforeUpdate||"function"!==typeof e.UNSAFE_componentWillMount&&"function"!==typeof e.componentWillMount||(b=e.state, +"function"===typeof e.componentWillMount&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),b!==e.state&&Wj.enqueueReplaceState(e,e.state,null),Zh(a,c,e,d),e.state=a.memoizedState);"function"===typeof e.componentDidMount&&(a.flags|=4194308)}function bk(a,b){try{var c="",d=b;do c+=kb(d),d=d.return;while(d);var e=c}catch(f){e="\nError generating stack: "+f.message+"\n"+f.stack}return{value:a,source:b,stack:e,digest:null}} +function ck(a,b,c){return{value:a,source:null,stack:null!=c?c:null,digest:null!=b?b:null}}function dk(a,b){try{console.error(b.value)}catch(c){setTimeout(function(){throw c;})}}function ek(a,b,c){c=Vh(-1,c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){fk||(fk=!0,gk=d);dk(a,b)};return c} +function hk(a,b,c){c=Vh(-1,c);c.tag=3;var d=a.type.getDerivedStateFromError;if("function"===typeof d){var e=b.value;c.payload=function(){return d(e)};c.callback=function(){dk(a,b)}}var f=a.stateNode;null!==f&&"function"===typeof f.componentDidCatch&&(c.callback=function(){dk(a,b);"function"!==typeof d&&(null===ik?ik=new Set([this]):ik.add(this));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:""})});return c} +function jk(a,b,c,d,e){if(0===(a.mode&1))return a===b?a.flags|=65536:(a.flags|=128,c.flags|=131072,c.flags&=-52805,1===c.tag&&(null===c.alternate?c.tag=17:(b=Vh(-1,2),b.tag=2,Wh(c,b,2))),c.lanes|=2),a;a.flags|=65536;a.lanes=e;return a}var kk=Ma.ReactCurrentOwner,lk=Error(p(461)),jj=!1;function R(a,b,c,d){b.child=null===a?mi(b,null,c,d):li(b,a.child,c,d)} +function mk(a,b,c,d,e){c=c.render;var f=b.ref;nk(b,e);d=Ti(a,b,c,d,f,e);c=$i();if(null!==a&&!jj)return aj(a,b,e),ok(a,b,e);H&&c&&sh(b);b.flags|=1;R(a,b,d,e);return b.child} +function pk(a,b,c,d,e){if(null===a){var f=c.type;if("function"===typeof f&&!qk(f)&&void 0===f.defaultProps&&null===c.compare&&void 0===c.defaultProps)return b.tag=15,b.type=f,rk(a,b,f,d,e);a=ii(c.type,null,d,b,b.mode,e);a.ref=b.ref;a.return=b;return b.child=a}f=a.child;if(0===(a.lanes&e)){var g=f.memoizedProps;c=c.compare;c=null!==c?c:af;if(c(g,d)&&a.ref===b.ref)return ok(a,b,e)}b.flags|=1;a=gi(f,d);a.ref=b.ref;a.return=b;return b.child=a} +function rk(a,b,c,d,e){if(null!==a){var f=a.memoizedProps;if(af(f,d)&&a.ref===b.ref)if(jj=!1,b.pendingProps=d=f,0!==(a.lanes&e))0!==(a.flags&131072)&&(jj=!0);else return b.lanes=a.lanes,ok(a,b,e)}return sk(a,b,c,d,e)} +function tk(a,b,c){var d=b.pendingProps,e=d.children,f=0!==(b.stateNode._pendingVisibility&2),g=null!==a?a.memoizedState:null;uk(a,b);if("hidden"===d.mode||f){if(0!==(b.flags&128)){c=null!==g?g.baseLanes|c:c;if(null!==a){d=b.child=a.child;for(e=0;null!==d;)e=e|d.lanes|d.childLanes,d=d.sibling;b.childLanes=e&~c}else b.childLanes=0,b.child=null;return vk(a,b,c)}if(0===(b.mode&1))b.memoizedState={baseLanes:0,cachePool:null},null!==a&&wk(b,null),ri(),wi(b);else if(0!==(c&1073741824))b.memoizedState={baseLanes:0, +cachePool:null},null!==a&&wk(b,null!==g?g.cachePool:null),null!==g?pi(b,g):ri(),wi(b);else return b.lanes=b.childLanes=1073741824,vk(a,b,null!==g?g.baseLanes|c:c)}else null!==g?(wk(b,g.cachePool),pi(b,g),xi(),b.memoizedState=null):(null!==a&&wk(b,null),ri(),xi());R(a,b,e,c);return b.child}function vk(a,b,c){var d=xk();d=null===d?null:{parent:S._currentValue,pool:d};b.memoizedState={baseLanes:c,cachePool:d};null!==a&&wk(b,null);ri();wi(b);return null} +function uk(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.flags|=512,b.flags|=2097152}function sk(a,b,c,d,e){var f=Wg(c)?Ug:G.current;f=Vg(b,f);nk(b,e);c=Ti(a,b,c,d,f,e);d=$i();if(null!==a&&!jj)return aj(a,b,e),ok(a,b,e);H&&d&&sh(b);b.flags|=1;R(a,b,c,e);return b.child}function yk(a,b,c,d,e){var f=Wg(d)?Ug:G.current;f=Vg(b,f);nk(b,e);c=Wi(b,d,c,f);Xi();d=$i();if(null!==a&&!jj)return aj(a,b,e),ok(a,b,e);H&&d&&sh(b);b.flags|=1;R(a,b,c,e);return b.child} +function zk(a,b,c,d,e){if(Wg(c)){var f=!0;$g(b)}else f=!1;nk(b,e);if(null===b.stateNode)Ak(a,b),Yj(b,c,d),ak(b,c,d,e),d=!0;else if(null===a){var g=b.stateNode,h=b.memoizedProps;g.props=h;var k=g.context,l=c.contextType;"object"===typeof l&&null!==l?l=gj(l):(l=Wg(c)?Ug:G.current,l=Vg(b,l));var n=c.getDerivedStateFromProps,q="function"===typeof n||"function"===typeof g.getSnapshotBeforeUpdate;q||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps|| +(h!==d||k!==l)&&Zj(b,g,d,l);Sh=!1;var v=b.memoizedState;g.state=v;Zh(b,d,g,e);k=b.memoizedState;h!==d||v!==k||Tg.current||Sh?("function"===typeof n&&(Vj(b,c,n,d),k=b.memoizedState),(h=Sh||Xj(b,c,h,d,v,k,l))?(q||"function"!==typeof g.UNSAFE_componentWillMount&&"function"!==typeof g.componentWillMount||("function"===typeof g.componentWillMount&&g.componentWillMount(),"function"===typeof g.UNSAFE_componentWillMount&&g.UNSAFE_componentWillMount()),"function"===typeof g.componentDidMount&&(b.flags|=4194308)): +("function"===typeof g.componentDidMount&&(b.flags|=4194308),b.memoizedProps=d,b.memoizedState=k),g.props=d,g.state=k,g.context=l,d=h):("function"===typeof g.componentDidMount&&(b.flags|=4194308),d=!1)}else{g=b.stateNode;Uh(a,b);h=b.memoizedProps;l=b.type===b.elementType?h:Uj(b.type,h);g.props=l;q=b.pendingProps;v=g.context;k=c.contextType;"object"===typeof k&&null!==k?k=gj(k):(k=Wg(c)?Ug:G.current,k=Vg(b,k));var w=c.getDerivedStateFromProps;(n="function"===typeof w||"function"===typeof g.getSnapshotBeforeUpdate)|| +"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps||(h!==q||v!==k)&&Zj(b,g,d,k);Sh=!1;v=b.memoizedState;g.state=v;Zh(b,d,g,e);var m=b.memoizedState;h!==q||v!==m||Tg.current||Sh?("function"===typeof w&&(Vj(b,c,w,d),m=b.memoizedState),(l=Sh||Xj(b,c,l,d,v,m,k)||!1)?(n||"function"!==typeof g.UNSAFE_componentWillUpdate&&"function"!==typeof g.componentWillUpdate||("function"===typeof g.componentWillUpdate&&g.componentWillUpdate(d,m,k),"function"===typeof g.UNSAFE_componentWillUpdate&& +g.UNSAFE_componentWillUpdate(d,m,k)),"function"===typeof g.componentDidUpdate&&(b.flags|=4),"function"===typeof g.getSnapshotBeforeUpdate&&(b.flags|=1024)):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&v===a.memoizedState||(b.flags|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&v===a.memoizedState||(b.flags|=1024),b.memoizedProps=d,b.memoizedState=m),g.props=d,g.state=m,g.context=k,d=l):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&v=== +a.memoizedState||(b.flags|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&v===a.memoizedState||(b.flags|=1024),d=!1)}return Bk(a,b,c,d,f,e)} +function Bk(a,b,c,d,e,f){uk(a,b);var g=0!==(b.flags&128);if(!d&&!g)return e&&ah(b,c,!1),ok(a,b,f);d=b.stateNode;kk.current=b;var h=g&&"function"!==typeof c.getDerivedStateFromError?null:d.render();b.flags|=1;null!==a&&g?(b.child=li(b,a.child,null,f),b.child=li(b,null,h,f)):R(a,b,h,f);b.memoizedState=d.state;e&&ah(b,c,!0);return b.child}function Ck(a){var b=a.stateNode;b.pendingContext?Yg(a,b.pendingContext,b.pendingContext!==b.context):b.context&&Yg(a,b.context,!1);ag(a,b.containerInfo)} +function Dk(a,b,c,d,e){Gh();Hh(e);b.flags|=256;R(a,b,c,d);return b.child}var Ek={dehydrated:null,treeContext:null,retryLane:0};function Fk(a){return{baseLanes:a,cachePool:Gk()}} +function Hk(a,b,c){var d=b.pendingProps,e=!1,f=0!==(b.flags&128),g;(g=f)||(g=null!==a&&null===a.memoizedState?!1:0!==(zi.current&2));g&&(e=!0,b.flags&=-129);if(null===a){if(H){e?vi(b):xi();Bh(b);a=b.memoizedState;if(null!==a&&(a=a.dehydrated,null!==a))return 0===(b.mode&1)?b.lanes=2:"$!"===a.data?b.lanes=16:b.lanes=1073741824,null;yi(b)}f=d.children;a=d.fallback;if(e)return xi(),d=b.mode,e=b.child,f={mode:"hidden",children:f},0===(d&1)&&null!==e?(e.childLanes=0,e.pendingProps=f):e=Ik(f,d,0,null), +a=ki(a,d,c,null),e.return=b,a.return=b,e.sibling=a,b.child=e,b.child.memoizedState=Fk(c),b.memoizedState=Ek,a;vi(b);return Jk(b,f)}g=a.memoizedState;if(null!==g){var h=g.dehydrated;if(null!==h)return Kk(a,b,f,d,h,g,c)}if(e){xi();e=d.fallback;f=b.mode;g=a.child;h=g.sibling;var k={mode:"hidden",children:d.children};0===(f&1)&&b.child!==g?(d=b.child,d.childLanes=0,d.pendingProps=k,b.deletions=null):(d=gi(g,k),d.subtreeFlags=g.subtreeFlags&14680064);null!==h?e=gi(h,e):(e=ki(e,f,c,null),e.flags|=2);e.return= +b;d.return=b;d.sibling=e;b.child=d;d=e;e=b.child;f=a.child.memoizedState;null===f?f=Fk(c):(g=f.cachePool,null!==g?(h=S._currentValue,g=g.parent!==h?{parent:h,pool:h}:g):g=Gk(),f={baseLanes:f.baseLanes|c,cachePool:g});e.memoizedState=f;e.childLanes=a.childLanes&~c;b.memoizedState=Ek;return d}vi(b);e=a.child;a=e.sibling;d=gi(e,{mode:"visible",children:d.children});0===(b.mode&1)&&(d.lanes=c);d.return=b;d.sibling=null;null!==a&&(c=b.deletions,null===c?(b.deletions=[a],b.flags|=16):c.push(a));b.child= +d;b.memoizedState=null;return d}function Jk(a,b){b=Ik({mode:"visible",children:b},a.mode,0,null);b.return=a;return a.child=b}function Lk(a,b,c,d){null!==d&&Hh(d);li(b,a.child,null,c);a=Jk(b,b.pendingProps.children);a.flags|=2;b.memoizedState=null;return a} +function Kk(a,b,c,d,e,f,g){if(c){if(b.flags&256)return vi(b),b.flags&=-257,d=ck(Error(p(422))),Lk(a,b,g,d);if(null!==b.memoizedState)return xi(),b.child=a.child,b.flags|=128,null;xi();f=d.fallback;e=b.mode;d=Ik({mode:"visible",children:d.children},e,0,null);f=ki(f,e,g,null);f.flags|=2;d.return=b;f.return=b;d.sibling=f;b.child=d;0!==(b.mode&1)&&li(b,a.child,null,g);b.child.memoizedState=Fk(g);b.memoizedState=Ek;return f}vi(b);if(0===(b.mode&1))return Lk(a,b,g,null);if("$!"===e.data){d=e.nextSibling&& +e.nextSibling.dataset;if(d)var h=d.dgst;d=h;f=Error(p(419));f.digest=d;d=ck(f,d,void 0);return Lk(a,b,g,d)}h=0!==(g&a.childLanes);if(jj||h){d=Q;if(null!==d){switch(g&-g){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:e=64;break;case 536870912:e=268435456;break;default:e= +0}e=0!==(e&(d.suspendedLanes|g))?0:e;if(0!==e&&e!==f.retryLane)throw f.retryLane=e,Oh(a,e),uj(d,a,e,-1),lk;}Mk();return Lk(a,b,g,null)}if("$?"===e.data)return b.flags|=128,b.child=a.child,b=Nk.bind(null,a),e._reactRetry=b,null;a=f.treeContext;vh=Pg(e.nextSibling);uh=b;H=!0;wh=null;null!==a&&(lh[mh++]=oh,lh[mh++]=ph,lh[mh++]=nh,oh=a.id,ph=a.overflow,nh=b);b=Jk(b,d.children);b.flags|=4096;return b}function Ok(a,b,c){a.lanes|=b;var d=a.alternate;null!==d&&(d.lanes|=b);Pk(a.return,b,c)} +function Qk(a,b,c,d,e){var f=a.memoizedState;null===f?a.memoizedState={isBackwards:b,rendering:null,renderingStartTime:0,last:d,tail:c,tailMode:e}:(f.isBackwards=b,f.rendering=null,f.renderingStartTime=0,f.last=d,f.tail=c,f.tailMode=e)} +function Rk(a,b,c){var d=b.pendingProps,e=d.revealOrder,f=d.tail;R(a,b,d.children,c);d=zi.current;if(0!==(d&2))d=d&1|2,b.flags|=128;else{if(null!==a&&0!==(a.flags&128))a:for(a=b.child;null!==a;){if(13===a.tag)null!==a.memoizedState&&Ok(a,c,b);else if(19===a.tag)Ok(a,c,b);else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===b)break a;for(;null===a.sibling;){if(null===a.return||a.return===b)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}d&=1}E(zi,d);if(0===(b.mode&1))b.memoizedState= +null;else switch(e){case "forwards":c=b.child;for(e=null;null!==c;)a=c.alternate,null!==a&&null===Ai(a)&&(e=c),c=c.sibling;c=e;null===c?(e=b.child,b.child=null):(e=c.sibling,c.sibling=null);Qk(b,!1,e,c,f);break;case "backwards":c=null;e=b.child;for(b.child=null;null!==e;){a=e.alternate;if(null!==a&&null===Ai(a)){b.child=e;break}a=e.sibling;e.sibling=c;c=e;e=a}Qk(b,!0,c,null,f);break;case "together":Qk(b,!1,null,null,void 0);break;default:b.memoizedState=null}return b.child} +function Ak(a,b){0===(b.mode&1)&&null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2)}function ok(a,b,c){null!==a&&(b.dependencies=a.dependencies);$h|=b.lanes;if(0===(c&b.childLanes))return null;if(null!==a&&b.child!==a.child)throw Error(p(153));if(null!==b.child){a=b.child;c=gi(a,a.pendingProps);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=gi(a,a.pendingProps),c.return=b;c.sibling=null}return b.child} +function Sk(a,b,c){switch(b.tag){case 3:Ck(b);Tk(b,S,a.memoizedState.cache);Gh();break;case 26:case 27:case 5:cg(b);break;case 1:Wg(b.type)&&$g(b);break;case 4:ag(b,b.stateNode.containerInfo);break;case 10:Tk(b,b.type._context,b.memoizedProps.value);break;case 13:var d=b.memoizedState;if(null!==d){if(null!==d.dehydrated)return vi(b),b.flags|=128,null;if(0!==(c&b.child.childLanes))return Hk(a,b,c);vi(b);a=ok(a,b,c);return null!==a?a.sibling:null}vi(b);break;case 19:d=0!==(c&b.childLanes);if(0!==(a.flags& +128)){if(d)return Rk(a,b,c);b.flags|=128}var e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null,e.lastEffect=null);E(zi,zi.current);if(d)break;else return null;case 22:case 23:return b.lanes=0,tk(a,b,c);case 24:Tk(b,S,a.memoizedState.cache)}return ok(a,b,c)}var Uk=Xf(null),Vk=null,Wk=null,Xk=null;function Yk(){Xk=Wk=Vk=null}function Tk(a,b,c){E(Uk,b._currentValue);b._currentValue=c}function Zk(a){var b=Uk.current;a._currentValue=b===db?a._defaultValue:b;D(Uk)} +function Pk(a,b,c){for(;null!==a;){var d=a.alternate;(a.childLanes&b)!==b?(a.childLanes|=b,null!==d&&(d.childLanes|=b)):null!==d&&(d.childLanes&b)!==b&&(d.childLanes|=b);if(a===c)break;a=a.return}} +function $k(a,b,c){var d=a.child;null!==d&&(d.return=a);for(;null!==d;){var e=d.dependencies;if(null!==e){var f=d.child;for(var g=e.firstContext;null!==g;){if(g.context===b){if(1===d.tag){g=Vh(-1,c&-c);g.tag=2;var h=d.updateQueue;if(null!==h){h=h.shared;var k=h.pending;null===k?g.next=g:(g.next=k.next,k.next=g);h.pending=g}}d.lanes|=c;g=d.alternate;null!==g&&(g.lanes|=c);Pk(d.return,c,a);e.lanes|=c;break}g=g.next}}else if(10===d.tag)f=d.type===a.type?null:d.child;else if(18===d.tag){f=d.return;if(null=== +f)throw Error(p(341));f.lanes|=c;e=f.alternate;null!==e&&(e.lanes|=c);Pk(f,c,a);f=d.sibling}else f=d.child;if(null!==f)f.return=d;else for(f=d;null!==f;){if(f===a){f=null;break}d=f.sibling;if(null!==d){d.return=f.return;f=d;break}f=f.return}d=f}}function nk(a,b){Vk=a;Xk=Wk=null;a=a.dependencies;null!==a&&null!==a.firstContext&&(0!==(a.lanes&b)&&(jj=!0),a.firstContext=null)} +function gj(a){var b=a._currentValue;if(Xk!==a)if(a={context:a,memoizedValue:b,next:null},null===Wk){if(null===Vk)throw Error(p(308));Wk=a;Vk.dependencies={lanes:0,firstContext:a}}else Wk=Wk.next=a;return b} +var al="undefined"!==typeof AbortController?AbortController:function(){var a=[],b=this.signal={aborted:!1,addEventListener:function(b,d){a.push(d)}};this.abort=function(){b.aborted=!0;a.forEach(function(a){return a()})}},bl=ba.unstable_scheduleCallback,cl=ba.unstable_NormalPriority,S={$$typeof:Ta,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_defaultValue:null,_globalName:null};function Pj(){return{controller:new al,data:new Map,refCount:0}} +function dl(a){a.refCount--;0===a.refCount&&bl(cl,function(){a.controller.abort()})}var el=Ma.ReactCurrentBatchConfig,fl=Xf(null);function xk(){var a=fl.current;return null!==a?a:Q.pooledCache}function wk(a,b){null===b?E(fl,fl.current):E(fl,b.pool)}function Gk(){var a=xk();return null===a?null:{parent:S._currentValue,pool:a}}function gl(a){a.flags|=2097664}var hl,il,jl,kl; +hl=function(a,b){for(var c=b.child;null!==c;){if(5===c.tag||6===c.tag)a.appendChild(c.stateNode);else if(4!==c.tag&&27!==c.tag&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return}c.sibling.return=c.return;c=c.sibling}};il=function(){}; +jl=function(a,b,c,d){var e=a.memoizedProps;if(e!==d){a=b.stateNode;var f=null;switch(c){case "input":e=ub(a,e);d=ub(a,d);f=[];break;case "select":e=z({},e,{value:void 0});d=z({},d,{value:void 0});f=[];break;case "textarea":e=Cb(a,e);d=Cb(a,d);f=[];break;default:"function"!==typeof e.onClick&&"function"===typeof d.onClick&&(a.onclick=Sf)}Rb(c,d);var g;c=null;for(l in e)if(!d.hasOwnProperty(l)&&e.hasOwnProperty(l)&&null!=e[l])if("style"===l){var h=e[l];for(g in h)h.hasOwnProperty(g)&&(c||(c={}),c[g]= "")}else"dangerouslySetInnerHTML"!==l&&"children"!==l&&"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(wa.hasOwnProperty(l)?f||(f=[]):(f=f||[]).push(l,null));for(l in d){var k=d[l];h=null!=e?e[l]:void 0;if(d.hasOwnProperty(l)&&k!==h&&(null!=k||null!=h))if("style"===l)if(h){for(g in h)!h.hasOwnProperty(g)||k&&k.hasOwnProperty(g)||(c||(c={}),c[g]="");for(g in k)k.hasOwnProperty(g)&&h[g]!==k[g]&&(c||(c={}),c[g]=k[g])}else c||(f||(f=[]),f.push(l,c)),c=k;else"dangerouslySetInnerHTML"=== -l?(k=k?k.__html:void 0,h=h?h.__html:void 0,null!=k&&h!==k&&(f=f||[]).push(l,k)):"children"===l?"string"!==typeof k&&"number"!==typeof k||(f=f||[]).push(l,""+k):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&(wa.hasOwnProperty(l)?(null!=k&&"onScroll"===l&&C("scroll",a),f||h===k||(f=[])):(f=f||[]).push(l,k))}c&&(f=f||[]).push("style",c);var l=f;if(b.updateQueue=l)b.flags|=4}};fl=function(a,b,c,d){c!==d&&(b.flags|=4)}; -function gl(a,b){if(!G)switch(a.tailMode){case "hidden":b=a.tail;for(var c=null;null!==b;)null!==b.alternate&&(c=b),b=b.sibling;null===c?a.tail=null:c.sibling=null;break;case "collapsed":c=a.tail;for(var d=null;null!==c;)null!==c.alternate&&(d=c),c=c.sibling;null===d?b||null===a.tail?a.tail=null:a.tail.sibling=null:d.sibling=null}} +l?(k=k?k.__html:void 0,h=h?h.__html:void 0,null!=k&&h!==k&&(f=f||[]).push(l,k)):"children"===l?"string"!==typeof k&&"number"!==typeof k||(f=f||[]).push(l,""+k):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&(wa.hasOwnProperty(l)?(null!=k&&"onScroll"===l&&C("scroll",a),f||h===k||(f=[])):(f=f||[]).push(l,k))}c&&(f=f||[]).push("style",c);var l=f;if(b.updateQueue=l)b.flags|=4}};kl=function(a,b,c,d){c!==d&&(b.flags|=4)}; +function ll(a,b){if(!H)switch(a.tailMode){case "hidden":b=a.tail;for(var c=null;null!==b;)null!==b.alternate&&(c=b),b=b.sibling;null===c?a.tail=null:c.sibling=null;break;case "collapsed":c=a.tail;for(var d=null;null!==c;)null!==c.alternate&&(d=c),c=c.sibling;null===d?b||null===a.tail?a.tail=null:a.tail.sibling=null:d.sibling=null}} function T(a){var b=null!==a.alternate&&a.alternate.child===a.child,c=0,d=0;if(b)for(var e=a.child;null!==e;)c|=e.lanes|e.childLanes,d|=e.subtreeFlags&14680064,d|=e.flags&14680064,e.return=a,e=e.sibling;else for(e=a.child;null!==e;)c|=e.lanes|e.childLanes,d|=e.subtreeFlags,d|=e.flags,e.return=a,e=e.sibling;a.subtreeFlags|=d;a.childLanes=c;return b} -function hl(a,b,c){var d=b.pendingProps;ph(b);switch(b.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return T(b),null;case 1:return Sg(b.type)&&Tg(),T(b),null;case 3:c=b.stateNode;d=null;null!==a&&(d=a.memoizedState.cache);b.memoizedState.cache!==d&&(b.flags|=2048);Uk(S);cg();D(Pg);D(F);yi();c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null);if(null===a||null===a.child)Ah(b)?b.flags|=4:null===a||a.memoizedState.isDehydrated&&0===(b.flags&256)||(b.flags|= -1024,null!==sh&&(il(sh),sh=null));dl(a,b);T(b);return null;case 26:return(a?a.ref:null)!==b.ref&&bl(b),null===a||a.memoizedState!==b.memoizedState?b.flags|=4:null===b.memoizedState&&el(a,b,b.type,b.pendingProps),T(b),null;case 27:eg(b);c=ag.current;var e=b.type;if(null!==a&&null!=b.stateNode)el(a,b,e,d),a.ref!==b.ref&&bl(b);else{if(!d){if(null===b.stateNode)throw Error(m(166));T(b);return null}a=Zf.current;Ah(b)?yh(b,a):(b.stateNode=Ng(e,d,c),b.flags|=4);null!==b.ref&&bl(b)}T(b);return null;case 5:eg(b); -c=b.type;if(null!==a&&null!=b.stateNode)el(a,b,c,d),a.ref!==b.ref&&bl(b);else{if(!d){if(null===b.stateNode)throw Error(m(166));T(b);return null}a=Zf.current;if(Ah(b))yh(b,a)&&(b.flags|=4);else{a=Tf(c,d,ag.current,a);a[ea]=b;a[fa]=d;cl(a,b,!1,!1);b.stateNode=a;a:switch(Uf(a,c,d),c){case "button":case "input":case "select":case "textarea":a=!!d.autoFocus;break a;case "img":a=!0;break a;default:a=!1}a&&(b.flags|=4)}null!==b.ref&&bl(b)}T(b);return null;case 6:if(a&&null!=b.stateNode)fl(a,b,a.memoizedProps, -d);else{if("string"!==typeof d&&null===b.stateNode)throw Error(m(166));a=ag.current;if(Ah(b)){a=b.stateNode;c=b.memoizedProps;a[ea]=b;if(d=a.nodeValue!==c)if(e=qh,null!==e)switch(e.tag){case 3:Rf(a.nodeValue,c,0!==(e.mode&1));break;case 27:case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Rf(a.nodeValue,c,0!==(e.mode&1))}d&&(b.flags|=4)}else a=(9===a.nodeType?a:a.ownerDocument).createTextNode(d),a[ea]=b,b.stateNode=a}T(b);return null;case 13:ui(b);d=b.memoizedState;if(null===a||null!==a.memoizedState&& -null!==a.memoizedState.dehydrated){if(G&&null!==rh&&0!==(b.mode&1)&&0===(b.flags&128))Bh(),Ch(),b.flags|=98560,e=!1;else if(e=Ah(b),null!==d&&null!==d.dehydrated){if(null===a){if(!e)throw Error(m(318));e=b.memoizedState;e=null!==e?e.dehydrated:null;if(!e)throw Error(m(317));e[ea]=b}else Ch(),0===(b.flags&128)&&(b.memoizedState=null),b.flags|=4;T(b);e=!1}else null!==sh&&(il(sh),sh=null),e=!0;if(!e)return b.flags&65536?b:null}if(0!==(b.flags&128))return b.lanes=c,b;c=null!==d;a=null!==a&&null!==a.memoizedState; -if(c){d=b.child;e=null;null!==d.alternate&&null!==d.alternate.memoizedState&&null!==d.alternate.memoizedState.cachePool&&(e=d.alternate.memoizedState.cachePool.pool);var f=null;null!==d.memoizedState&&null!==d.memoizedState.cachePool&&(f=d.memoizedState.cachePool.pool);f!==e&&(d.flags|=2048)}c!==a&&c&&(b.child.flags|=8192);null!==b.updateQueue&&(b.flags|=4);T(b);return null;case 4:return cg(),dl(a,b),null===a&&Kf(b.stateNode.containerInfo),T(b),null;case 10:return Uk(b.type._context),T(b),null;case 17:return Sg(b.type)&& -Tg(),T(b),null;case 19:D(vi);e=b.memoizedState;if(null===e)return T(b),null;d=0!==(b.flags&128);f=e.rendering;if(null===f)if(d)gl(e,!1);else{if(0!==U||null!==a&&0!==(a.flags&128))for(a=b.child;null!==a;){f=wi(a);if(null!==f){b.flags|=128;gl(e,!1);a=f.updateQueue;null!==a&&(b.updateQueue=a,b.flags|=4);b.subtreeFlags=0;a=c;for(c=b.child;null!==c;)jl(c,a),c=c.sibling;E(vi,vi.current&1|2);return b.child}a=a.sibling}null!==e.tail&&A()>kl&&(b.flags|=128,d=!0,gl(e,!1),b.lanes=8388608)}else{if(!d)if(a=wi(f), -null!==a){if(b.flags|=128,d=!0,a=a.updateQueue,null!==a&&(b.updateQueue=a,b.flags|=4),gl(e,!0),null===e.tail&&"hidden"===e.tailMode&&!f.alternate&&!G)return T(b),null}else 2*A()-e.renderingStartTime>kl&&1073741824!==c&&(b.flags|=128,d=!0,gl(e,!1),b.lanes=8388608);e.isBackwards?(f.sibling=b.child,b.child=f):(a=e.last,null!==a?a.sibling=f:b.child=f,e.last=f)}if(null!==e.tail)return b=e.tail,e.rendering=b,e.tail=b.sibling,e.renderingStartTime=A(),b.sibling=null,a=vi.current,E(vi,d?a&1|2:a&1),b;T(b); -return null;case 22:case 23:return ui(b),oi(),d=null!==b.memoizedState,null!==a?null!==a.memoizedState!==d&&(b.flags|=8192):d&&(b.flags|=8192),d&&0!==(b.mode&1)?0!==(c&1073741824)&&0===(b.flags&128)&&(T(b),b.subtreeFlags&6&&(b.flags|=8192)):T(b),null!==b.updateQueue&&(b.flags|=4),c=null,null!==a&&null!==a.memoizedState&&null!==a.memoizedState.cachePool&&(c=a.memoizedState.cachePool.pool),d=null,null!==b.memoizedState&&null!==b.memoizedState.cachePool&&(d=b.memoizedState.cachePool.pool),d!==c&&(b.flags|= -2048),null!==a&&D(al),null;case 24:return c=null,null!==a&&(c=a.memoizedState.cache),b.memoizedState.cache!==c&&(b.flags|=2048),Uk(S),T(b),null;case 25:return null}throw Error(m(156,b.tag));} -function ll(a,b){ph(b);switch(b.tag){case 1:return Sg(b.type)&&Tg(),a=b.flags,a&65536?(b.flags=a&-65537|128,b):null;case 3:return Uk(S),cg(),D(Pg),D(F),yi(),a=b.flags,0!==(a&65536)&&0===(a&128)?(b.flags=a&-65537|128,b):null;case 26:case 27:case 5:return eg(b),null;case 13:ui(b);a=b.memoizedState;if(null!==a&&null!==a.dehydrated){if(null===b.alternate)throw Error(m(340));Ch()}a=b.flags;return a&65536?(b.flags=a&-65537|128,b):null;case 19:return D(vi),null;case 4:return cg(),null;case 10:return Uk(b.type._context), -null;case 22:case 23:return ui(b),oi(),null!==a&&D(al),a=b.flags,a&65536?(b.flags=a&-65537|128,b):null;case 24:return Uk(S),null;case 25:return null;default:return null}} -function ml(a,b){ph(b);switch(b.tag){case 1:a=b.type.childContextTypes;null!==a&&void 0!==a&&Tg();break;case 3:Uk(S);cg();D(Pg);D(F);yi();break;case 26:case 27:case 5:eg(b);break;case 4:cg();break;case 13:ui(b);break;case 19:D(vi);break;case 10:Uk(b.type._context);break;case 22:case 23:ui(b);oi();null!==a&&D(al);break;case 24:Uk(S)}}var nl=!1,ol=!1,pl="function"===typeof WeakSet?WeakSet:Set,V=null; -function ql(a,b){try{var c=a.ref;if(null!==c){var d=a.stateNode;switch(a.tag){case 26:case 27:case 5:var e=d;break;default:e=d}"function"===typeof c?a.refCleanup=c(e):c.current=e}}catch(f){W(a,b,f)}}function rl(a,b){var c=a.ref,d=a.refCleanup;if(null!==c)if("function"===typeof d)try{d()}catch(e){W(a,b,e)}finally{a.refCleanup=null,a=a.alternate,null!=a&&(a.refCleanup=null)}else if("function"===typeof c)try{c(null)}catch(e){W(a,b,e)}else c.current=null} -function sl(a,b,c){try{c()}catch(d){W(a,b,d)}}var tl=!1; -function ul(a,b){Ag=xd;a=ef();if(ff(a)){if("selectionStart"in a)var c={start:a.selectionStart,end:a.selectionEnd};else a:{c=(c=a.ownerDocument)&&c.defaultView||window;var d=c.getSelection&&c.getSelection();if(d&&0!==d.rangeCount){c=d.anchorNode;var e=d.anchorOffset,f=d.focusNode;d=d.focusOffset;try{c.nodeType,f.nodeType}catch(M){c=null;break a}var g=0,h=-1,k=-1,l=0,p=0,q=a,w=null;b:for(;;){for(var u;;){q!==c||0!==e&&3!==q.nodeType||(h=g+e);q!==f||0!==d&&3!==q.nodeType||(k=g+d);3===q.nodeType&&(g+= -q.nodeValue.length);if(null===(u=q.firstChild))break;w=q;q=u}for(;;){if(q===a)break b;w===c&&++l===e&&(h=g);w===f&&++p===d&&(k=g);if(null!==(u=q.nextSibling))break;q=w;w=q.parentNode}q=u}c=-1===h||-1===k?null:{start:h,end:k}}else c=null}c=c||{start:0,end:0}}else c=null;Bg={focusedElem:a,selectionRange:c};xd=!1;for(V=b;null!==V;)if(b=V,a=b.child,0!==(b.subtreeFlags&1028)&&null!==a)a.return=b,V=a;else for(;null!==V;){b=V;try{var n=b.alternate,r=b.flags;switch(b.tag){case 0:break;case 11:case 15:break; -case 1:if(0!==(r&1024)&&null!==n){var L=n.memoizedProps,v=n.memoizedState,x=b.stateNode,t=x.getSnapshotBeforeUpdate(b.elementType===b.type?L:Pj(b.type,L),v);x.__reactInternalSnapshotBeforeUpdate=t}break;case 3:0!==(r&1024)&&Jg(b.stateNode.containerInfo);break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(0!==(r&1024))throw Error(m(163));}}catch(M){W(b,b.return,M)}a=b.sibling;if(null!==a){a.return=b.return;V=a;break}V=b.return}n=tl;tl=!1;return n} -function vl(a,b,c){var d=b.updateQueue;d=null!==d?d.lastEffect:null;if(null!==d){var e=d=d.next;do{if((e.tag&a)===a){var f=e.destroy;e.destroy=void 0;void 0!==f&&sl(b,c,f)}e=e.next}while(e!==d)}}function wl(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d()}c=c.next}while(c!==b)}}function xl(a,b){try{wl(b,a)}catch(c){W(a,a.return,c)}} -function yl(a){var b=a.updateQueue;if(null!==b){var c=a.stateNode;try{Yh(b,c)}catch(d){W(a,a.return,d)}}}function zl(a){var b=a.type,c=a.memoizedProps,d=a.stateNode;try{a:switch(b){case "button":case "input":case "select":case "textarea":c.autoFocus&&d.focus();break a;case "img":c.src&&(d.src=c.src)}}catch(e){W(a,a.return,e)}} -function Al(a,b,c){var d=c.flags;switch(c.tag){case 0:case 11:case 15:Bl(a,c);d&4&&xl(c,5);break;case 1:Bl(a,c);if(d&4)if(a=c.stateNode,null===b)try{a.componentDidMount()}catch(h){W(c,c.return,h)}else{var e=c.elementType===c.type?b.memoizedProps:Pj(c.type,b.memoizedProps);b=b.memoizedState;try{a.componentDidUpdate(e,b,a.__reactInternalSnapshotBeforeUpdate)}catch(h){W(c,c.return,h)}}d&64&&yl(c);d&512&&ql(c,c.return);break;case 3:Bl(a,c);if(d&64&&(d=c.updateQueue,null!==d)){a=null;if(null!==c.child)switch(c.child.tag){case 27:case 5:a= -c.child.stateNode;break;case 1:a=c.child.stateNode}try{Yh(d,a)}catch(h){W(c,c.return,h)}}break;case 26:Bl(a,c);d&512&&ql(c,c.return);break;case 27:case 5:Bl(a,c);null===b&&d&4&&zl(c);d&512&&ql(c,c.return);break;case 12:Bl(a,c);break;case 13:Bl(a,c);d&4&&Cl(a,c);break;case 22:if(0!==(c.mode&1)){if(e=null!==c.memoizedState||nl,!e){b=null!==b&&null!==b.memoizedState||ol;var f=nl,g=ol;nl=e;(ol=b)&&!g?Dl(a,c,0!==(c.subtreeFlags&8772)):Bl(a,c);nl=f;ol=g}}else Bl(a,c);d&512&&("manual"===c.memoizedProps.mode? -ql(c,c.return):rl(c,c.return));break;default:Bl(a,c)}}function El(a){var b=a.alternate;null!==b&&(a.alternate=null,El(b));a.child=null;a.deletions=null;a.sibling=null;5===a.tag&&(b=a.stateNode,null!==b&&oa(b));a.stateNode=null;a.return=null;a.dependencies=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.stateNode=null;a.updateQueue=null}function Fl(a){return 5===a.tag||3===a.tag||26===a.tag||27===a.tag||4===a.tag} -function Gl(a){a:for(;;){for(;null===a.sibling;){if(null===a.return||Fl(a.return))return null;a=a.return}a.sibling.return=a.return;for(a=a.sibling;5!==a.tag&&6!==a.tag&&27!==a.tag&&18!==a.tag;){if(a.flags&2)continue a;if(null===a.child||4===a.tag)continue a;else a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}} -function Hl(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=Sf));else if(4!==d&&27!==d&&(a=a.child,null!==a))for(Hl(a,b,c),a=a.sibling;null!==a;)Hl(a,b,c),a=a.sibling} -function Il(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&27!==d&&(a=a.child,null!==a))for(Il(a,b,c),a=a.sibling;null!==a;)Il(a,b,c),a=a.sibling}var X=null,Jl=!1;function Kl(a,b,c){for(c=c.child;null!==c;)Ll(a,b,c),c=c.sibling} -function Ll(a,b,c){if(Gc&&"function"===typeof Gc.onCommitFiberUnmount)try{Gc.onCommitFiberUnmount(Fc,c)}catch(h){}switch(c.tag){case 26:ol||rl(c,b);Kl(a,b,c);c.memoizedState?c.memoizedState.count--:c.stateNode&&(c=c.stateNode,c.parentNode.removeChild(c));break;case 27:ol||rl(c,b);var d=X,e=Jl;X=c.stateNode;Kl(a,b,c);c=c.stateNode;for(a=c.attributes;a.length;)c.removeAttributeNode(a[0]);oa(c);X=d;Jl=e;break;case 5:ol||rl(c,b);case 6:d=X;e=Jl;X=null;Kl(a,b,c);X=d;Jl=e;null!==X&&(Jl?(a=X,c=c.stateNode, -8===a.nodeType?a.parentNode.removeChild(c):a.removeChild(c)):X.removeChild(c.stateNode));break;case 18:null!==X&&(Jl?(a=X,c=c.stateNode,8===a.nodeType?Ig(a.parentNode,c):1===a.nodeType&&Ig(a,c),vd(a)):Ig(X,c.stateNode));break;case 4:d=X;e=Jl;X=c.stateNode.containerInfo;Jl=!0;Kl(a,b,c);X=d;Jl=e;break;case 0:case 11:case 14:case 15:if(!ol&&(d=c.updateQueue,null!==d&&(d=d.lastEffect,null!==d))){e=d=d.next;do{var f=e,g=f.destroy;f=f.tag;void 0!==g&&(0!==(f&2)?sl(c,b,g):0!==(f&4)&&sl(c,b,g));e=e.next}while(e!== -d)}Kl(a,b,c);break;case 1:if(!ol&&(rl(c,b),d=c.stateNode,"function"===typeof d.componentWillUnmount))try{d.props=c.memoizedProps,d.state=c.memoizedState,d.componentWillUnmount()}catch(h){W(c,b,h)}Kl(a,b,c);break;case 21:Kl(a,b,c);break;case 22:rl(c,b);c.mode&1?(ol=(d=ol)||null!==c.memoizedState,Kl(a,b,c),ol=d):Kl(a,b,c);break;default:Kl(a,b,c)}} -function Cl(a,b){if(null===b.memoizedState&&(a=b.alternate,null!==a&&(a=a.memoizedState,null!==a&&(a=a.dehydrated,null!==a))))try{vd(a)}catch(c){W(b,b.return,c)}}function Ml(a){switch(a.tag){case 13:case 19:var b=a.stateNode;null===b&&(b=a.stateNode=new pl);return b;case 22:return a=a.stateNode,b=a._retryCache,null===b&&(b=a._retryCache=new pl),b;default:throw Error(m(435,a.tag));}}function Nl(a,b){var c=Ml(a);b.forEach(function(b){var d=Ol.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})} -function Pl(a,b){var c=b.deletions;if(null!==c)for(var d=0;d<c.length;d++){var e=c[d];try{var f=a,g=b,h=g;a:for(;null!==h;){switch(h.tag){case 27:case 5:X=h.stateNode;Jl=!1;break a;case 3:X=h.stateNode.containerInfo;Jl=!0;break a;case 4:X=h.stateNode.containerInfo;Jl=!0;break a}h=h.return}if(null===X)throw Error(m(160));Ll(f,g,e);X=null;Jl=!1;var k=e.alternate;null!==k&&(k.return=null);e.return=null}catch(l){W(e,b,l)}}if(b.subtreeFlags&12854)for(b=b.child;null!==b;)Ql(b,a),b=b.sibling}var Rl=null; -function Ql(a,b){var c=a.alternate,d=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:Pl(b,a);Sl(a);if(d&4){try{vl(3,a,a.return),wl(3,a)}catch(u){W(a,a.return,u)}try{vl(5,a,a.return)}catch(u){W(a,a.return,u)}}break;case 1:Pl(b,a);Sl(a);d&512&&null!==c&&rl(c,c.return);d&64&&nl&&(a=a.updateQueue,null!==a&&(c=a.callbacks,null!==c&&(d=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=null===d?c:d.concat(c))));break;case 26:var e=Rl;Pl(b,a);Sl(a);d&512&&null!==c&&rl(c,c.return);if(d&4)if(b=null!== -c?c.memoizedState:null,d=a.memoizedState,null===c)if(null===d)if(null===a.stateNode){a:{c=a.type;d=a.memoizedProps;b=e.ownerDocument||e;e=b.getElementsByTagName(c);var f=d.children;f=Array.isArray(f)?1===f.length?f[0]:null:f;f="function"!==typeof f&&"symbol"!==typeof f&&null!==f&&void 0!==f?""+f:"";var g=0;b:for(;g<e.length;g++){var h=e[g];if(!h[na]&&"http://www.w3.org/2000/svg"!==h.namespaceURI&&h.textContent===f){var k=0;for(q in d){var l=d[q];if(d.hasOwnProperty(q)){switch(q){case "children":case "defaultValue":case "dangerouslySetInnerHTML":case "defaultChecked":case "innerHTML":case "suppressContentEditableWarning":case "suppressHydrationWarning":case "style":continue; -case "className":if(h.getAttribute("class")!==""+l)continue b;break;case "httpEquiv":if(h.getAttribute("http-equiv")!==""+l)continue b;break;case "contentEditable":case "draggable":case "spellCheck":if(h.getAttribute(q)!==""+l)continue b;break;case "async":case "defer":case "disabled":case "hidden":case "noModule":case "scoped":case "itemScope":if(l!==h.hasAttribute(q))continue b;break;default:if(Ea(q)){var p=q;if(null==l&&h.hasAttribute(p))continue b;if(h.getAttribute(p)!==""+l)continue b}}k++}}if(h.attributes.length!== -k)continue b;h[na]=!0;c=h;break a}}var q=Tf(c,d,b,"http://www.w3.org/1999/xhtml");Uf(q,c,d);q[ea]=a;q[na]=!0;b.head.insertBefore(q,"title"===c?b.querySelector("head > title"):null);c=q}a.stateNode=c}else yg(e,a.type,a.stateNode);else a.stateNode=xg(e,d,a.memoizedProps);else if(b!==d)null===b?null!==c.stateNode&&(c=c.stateNode,c.parentNode.removeChild(c)):b.count--,null===d?yg(e,a.type,a.stateNode):xg(e,d,a.memoizedProps);else if(null===d&&null!==a.stateNode&&(d=a.updateQueue,a.updateQueue=null,null!== -d))try{l=a.stateNode,p=a.memoizedProps,Vf(l,d,a.type,c.memoizedProps,p),l[fa]=p}catch(u){W(a,a.return,u)}break;case 27:if(d&4&&null===a.alternate){q=a.stateNode;e=a.memoizedProps;for(f=q.firstChild;f;)g=f.nextSibling,h=f.nodeName,f[na]||"HEAD"===h||"BODY"===h||"STYLE"===h||"LINK"===h&&"stylesheet"===f.rel.toLowerCase()||q.removeChild(f),f=g;f=a.type;for(g=q.attributes;g.length;)q.removeAttributeNode(g[0]);Uf(q,f,e);q[ea]=a;q[fa]=e}case 5:Pl(b,a);Sl(a);d&512&&null!==c&&rl(c,c.return);if(a.flags&32){q= -a.stateNode;try{Kb(q,"")}catch(u){W(a,a.return,u)}}if(d&4&&(d=a.stateNode,null!=d&&(q=a.memoizedProps,c=null!==c?c.memoizedProps:q,b=a.type,e=a.updateQueue,a.updateQueue=null,null!==e)))try{Vf(d,e,b,c,q),d[fa]=q}catch(u){W(a,a.return,u)}break;case 6:Pl(b,a);Sl(a);if(d&4){if(null===a.stateNode)throw Error(m(162));c=a.stateNode;d=a.memoizedProps;try{c.nodeValue=d}catch(u){W(a,a.return,u)}}break;case 3:q=Rl;Rl=mg(b.containerInfo);Pl(b,a);Rl=q;Sl(a);if(d&4&&null!==c&&c.memoizedState.isDehydrated)try{vd(b.containerInfo)}catch(u){W(a, -a.return,u)}break;case 4:c=Rl;Rl=mg(a.stateNode.containerInfo);Pl(b,a);Sl(a);Rl=c;break;case 13:Pl(b,a);Sl(a);c=a.child;c.flags&8192&&null!==c.memoizedState&&(null===c.alternate||null===c.alternate.memoizedState)&&(Tl=A());d&4&&(c=a.updateQueue,null!==c&&(a.updateQueue=null,Nl(a,c)));break;case 22:d&512&&null!==c&&rl(c,c.return);q=null!==a.memoizedState;l=null!==c&&null!==c.memoizedState;if(a.mode&1){p=nl;var w=ol;nl=p||q;ol=w||l;Pl(b,a);ol=w;nl=p}else Pl(b,a);Sl(a);b=a.stateNode;b._current=a;b._visibility&= --3;b._visibility|=b._pendingVisibility&2;if(d&8192&&(b._visibility=q?b._visibility&-2:b._visibility|1,q&&(b=nl||ol,null===c||l||b||0!==(a.mode&1)&&Ul(a)),null===a.memoizedProps||"manual"!==a.memoizedProps.mode))a:for(c=null,b=a;;){if(5===b.tag||26===b.tag||27===b.tag){if(null===c){c=b;try{e=b.stateNode,q?(f=e.style,"function"===typeof f.setProperty?f.setProperty("display","none","important"):f.display="none"):(g=b.stateNode,h=b.memoizedProps.style,k=void 0!==h&&null!==h&&h.hasOwnProperty("display")? -h.display:null,g.style.display=Ob("display",k))}catch(u){W(a,a.return,u)}}}else if(6===b.tag){if(null===c)try{b.stateNode.nodeValue=q?"":b.memoizedProps}catch(u){W(a,a.return,u)}}else if((22!==b.tag&&23!==b.tag||null===b.memoizedState||b===a)&&null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break a;for(;null===b.sibling;){if(null===b.return||b.return===a)break a;c===b&&(c=null);b=b.return}c===b&&(c=null);b.sibling.return=b.return;b=b.sibling}d&4&&(c=a.updateQueue,null!==c&&(d=c.wakeables, -null!==d&&(c.wakeables=null,Nl(a,d))));break;case 19:Pl(b,a);Sl(a);d&4&&(c=a.updateQueue,null!==c&&(a.updateQueue=null,Nl(a,c)));break;case 21:break;default:Pl(b,a),Sl(a)}} -function Sl(a){var b=a.flags;if(b&2){try{if(27!==a.tag){b:{for(var c=a.return;null!==c;){if(Fl(c)){var d=c;break b}c=c.return}throw Error(m(160));}switch(d.tag){case 27:var e=d.stateNode,f=Gl(a);Il(a,f,e);break;case 5:var g=d.stateNode;d.flags&32&&(Kb(g,""),d.flags&=-33);var h=Gl(a);Il(a,h,g);break;case 3:case 4:var k=d.stateNode.containerInfo,l=Gl(a);Hl(a,l,k);break;default:throw Error(m(161));}}}catch(p){W(a,a.return,p)}a.flags&=-3}b&4096&&(a.flags&=-4097)} -function Bl(a,b){if(b.subtreeFlags&8772)for(b=b.child;null!==b;)Al(a,b.alternate,b),b=b.sibling} -function Ul(a){for(a=a.child;null!==a;){var b=a;switch(b.tag){case 0:case 11:case 14:case 15:vl(4,b,b.return);Ul(b);break;case 1:rl(b,b.return);var c=b.stateNode;if("function"===typeof c.componentWillUnmount){var d=b,e=b.return;try{var f=d;c.props=f.memoizedProps;c.state=f.memoizedState;c.componentWillUnmount()}catch(g){W(d,e,g)}}Ul(b);break;case 26:case 27:case 5:rl(b,b.return);Ul(b);break;case 22:rl(b,b.return);null===b.memoizedState&&Ul(b);break;default:Ul(b)}a=a.sibling}} -function Dl(a,b,c){c=c&&0!==(b.subtreeFlags&8772);for(b=b.child;null!==b;){var d=b.alternate,e=a,f=b,g=f.flags;switch(f.tag){case 0:case 11:case 15:Dl(e,f,c);xl(f,4);break;case 1:Dl(e,f,c);e=f.stateNode;if("function"===typeof e.componentDidMount)try{e.componentDidMount()}catch(k){W(f,f.return,k)}d=f.updateQueue;if(null!==d){var h=d.shared.hiddenCallbacks;if(null!==h)for(d.shared.hiddenCallbacks=null,d=0;d<h.length;d++)Xh(h[d],e)}c&&g&64&&yl(f);ql(f,f.return);break;case 26:case 27:case 5:Dl(e,f,c); -c&&null===d&&g&4&&zl(f);ql(f,f.return);break;case 12:Dl(e,f,c);break;case 13:Dl(e,f,c);c&&g&4&&Cl(e,f);break;case 22:null===f.memoizedState&&Dl(e,f,c);ql(f,f.return);break;default:Dl(e,f,c)}b=b.sibling}}function Vl(a,b){try{wl(b,a)}catch(c){W(a,a.return,c)}} -function Wl(a,b){var c=null;null!==a&&null!==a.memoizedState&&null!==a.memoizedState.cachePool&&(c=a.memoizedState.cachePool.pool);a=null;null!==b.memoizedState&&null!==b.memoizedState.cachePool&&(a=b.memoizedState.cachePool.pool);a!==c&&(null!=a&&a.refCount++,null!=c&&Zk(c))}function Xl(a,b){a=null;null!==b.alternate&&(a=b.alternate.memoizedState.cache);b=b.memoizedState.cache;b!==a&&(b.refCount++,null!=a&&Zk(a))} -function Yl(a,b,c,d){if(b.subtreeFlags&10256)for(b=b.child;null!==b;)Zl(a,b,c,d),b=b.sibling} -function Zl(a,b,c,d){var e=b.flags;switch(b.tag){case 0:case 11:case 15:Yl(a,b,c,d);e&2048&&Vl(b,9);break;case 3:Yl(a,b,c,d);e&2048&&(a=null,null!==b.alternate&&(a=b.alternate.memoizedState.cache),b=b.memoizedState.cache,b!==a&&(b.refCount++,null!=a&&Zk(a)));break;case 23:break;case 22:var f=b.stateNode;null!==b.memoizedState?f._visibility&4?Yl(a,b,c,d):b.mode&1?$l(a,b):(f._visibility|=4,Yl(a,b,c,d)):f._visibility&4?Yl(a,b,c,d):(f._visibility|=4,am(a,b,c,d,0!==(b.subtreeFlags&10256)));e&2048&&Wl(b.alternate, -b);break;case 24:Yl(a,b,c,d);e&2048&&Xl(b.alternate,b);break;default:Yl(a,b,c,d)}} -function am(a,b,c,d,e){e=e&&0!==(b.subtreeFlags&10256);for(b=b.child;null!==b;){var f=a,g=b,h=c,k=d,l=g.flags;switch(g.tag){case 0:case 11:case 15:am(f,g,h,k,e);Vl(g,8);break;case 23:break;case 22:var p=g.stateNode;null!==g.memoizedState?p._visibility&4?am(f,g,h,k,e):g.mode&1?$l(f,g):(p._visibility|=4,am(f,g,h,k,e)):(p._visibility|=4,am(f,g,h,k,e));e&&l&2048&&Wl(g.alternate,g);break;case 24:am(f,g,h,k,e);e&&l&2048&&Xl(g.alternate,g);break;default:am(f,g,h,k,e)}b=b.sibling}} -function $l(a,b){if(b.subtreeFlags&10256)for(b=b.child;null!==b;){var c=a,d=b,e=d.flags;switch(d.tag){case 22:$l(c,d);e&2048&&Wl(d.alternate,d);break;case 24:$l(c,d);e&2048&&Xl(d.alternate,d);break;default:$l(c,d)}b=b.sibling}}function bm(a){var b=a.alternate;if(null!==b&&(a=b.child,null!==a)){b.child=null;do b=a.sibling,a.sibling=null,a=b;while(null!==a)}} -function cm(a){var b=a.deletions;if(0!==(a.flags&16)){if(null!==b)for(var c=0;c<b.length;c++){var d=b[c];V=d;dm(d,a)}bm(a)}if(a.subtreeFlags&10256)for(a=a.child;null!==a;)em(a),a=a.sibling}function em(a){switch(a.tag){case 0:case 11:case 15:cm(a);a.flags&2048&&vl(9,a,a.return);break;case 22:var b=a.stateNode;null!==a.memoizedState&&b._visibility&4&&(null===a.return||13!==a.return.tag)?(b._visibility&=-5,fm(a)):cm(a);break;default:cm(a)}} -function fm(a){var b=a.deletions;if(0!==(a.flags&16)){if(null!==b)for(var c=0;c<b.length;c++){var d=b[c];V=d;dm(d,a)}bm(a)}for(a=a.child;null!==a;){b=a;switch(b.tag){case 0:case 11:case 15:vl(8,b,b.return);fm(b);break;case 22:c=b.stateNode;c._visibility&4&&(c._visibility&=-5,fm(b));break;default:fm(b)}a=a.sibling}} -function dm(a,b){for(;null!==V;){var c=V;switch(c.tag){case 0:case 11:case 15:vl(8,c,b);break;case 23:case 22:if(null!==c.memoizedState&&null!==c.memoizedState.cachePool){var d=c.memoizedState.cachePool.pool;null!=d&&d.refCount++}break;case 24:Zk(c.memoizedState.cache)}d=c.child;if(null!==d)d.return=c,V=d;else a:for(c=a;null!==V;){d=V;var e=d.sibling,f=d.return;El(d);if(d===c){V=null;break a}if(null!==e){e.return=f;V=e;break a}V=f}}} -var gm={getCacheSignal:function(){return P(S).controller.signal},getCacheForType:function(a){var b=P(S),c=b.data.get(a);void 0===c&&(c=a(),b.data.set(a,c));return c}},hm=Math.ceil,im="function"===typeof WeakMap?WeakMap:Map,jm=Ma.ReactCurrentDispatcher,km=Ma.ReactCurrentCache,lm=Ma.ReactCurrentOwner,mm=Ma.ReactCurrentBatchConfig,H=0,Q=null,Y=null,I=0,Z=0,nm=null,om=!1,mi=0,U=0,pm=null,Wh=0,qm=0,rm=0,sm=null,tm=null,Tl=0,kl=Infinity,um=null,ak=!1,bk=null,dk=null,vm=!1,wm=null,xm=0,ym=0,zm=null,Mh=0, -Nh=null,Am=-1,Bm=0;function Jj(){return 0!==(H&6)?A():-1!==Am?Am:Am=A()}function Ij(a){if(0===(a.mode&1))return 2;if(0!==(H&2)&&0!==I)return I&-I;if(null!==$k.transition)return 0===Bm&&(Bm=Tc()),Bm;a=B;if(0!==a)return a;a=window.event;a=void 0===a?32:Dd(a.type);return a}function pj(a,b,c,d){2===Z&&a===Q&&(Cm(a,0),Dm(a,I));Vc(a,c,d);if(0===(H&2)||a!==Q)a===Q&&(0===(H&2)&&(qm|=c),4===U&&Dm(a,I)),Em(a,d),2===c&&0===H&&0===(b.mode&1)&&(kl=A()+500,Zg&&ch())} -function Em(a,b){var c=a.callbackNode;Rc(a,b);var d=Pc(a,a===Q?I:0);if(0===d)null!==c&&wc(c),a.callbackNode=null,a.callbackPriority=0;else if(b=d&-d,a.callbackPriority!==b){null!=c&&wc(c);if(0!==(b&3))0===a.tag?bh(Fm.bind(null,a)):ah(Fm.bind(null,a)),Hg(function(){0===(H&6)&&ch()}),c=null;else{switch(Yc(d)){case 2:c=Ac;break;case 8:c=Bc;break;case 32:c=Cc;break;case 536870912:c=Ec;break;default:c=Cc}c=Gm(c,Hm.bind(null,a))}a.callbackPriority=b;a.callbackNode=c}} -function Hm(a,b){Am=-1;Bm=0;if(0!==(H&6))throw Error(m(327));var c=a.callbackNode;if(Im()&&a.callbackNode!==c)return null;var d=Pc(a,a===Q?I:0);if(0===d)return null;b=0!==(d&60)||0!==(d&a.expiredLanes)||b?Jm(a,d):Km(a,d);if(0!==b){if(2===b){var e=d,f=Sc(a,e);0!==f&&(d=f,b=Lm(a,e,f))}if(1===b)throw c=pm,Cm(a,0),Dm(a,d),Em(a,A()),c;if(6===b)Dm(a,d);else{e=a.current.alternate;if(0===(d&60)&&!Mm(e)){b=Jm(a,d);if(2===b){f=d;var g=Sc(a,f);0!==g&&(d=g,b=Lm(a,f,g))}if(1===b)throw c=pm,Cm(a,0),Dm(a,d),Em(a, -A()),c;}a.finishedWork=e;a.finishedLanes=d;switch(b){case 0:case 1:throw Error(m(345));case 2:Nm(a,tm,um);break;case 3:Dm(a,d);if((d&125829120)===d&&(d=Tl+500-A(),10<d)){if(0!==Pc(a,0))break;a.timeoutHandle=Dg(Nm.bind(null,a,tm,um),d);break}Nm(a,tm,um);break;case 4:Dm(a,d);if((d&8388480)===d)break;b=a.eventTimes;for(e=-1;0<d;)g=31-Jc(d),f=1<<g,g=b[g],g>e&&(e=g),d&=~f;d=e;d=A()-d;d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*hm(d/1960))-d;if(10<d){a.timeoutHandle=Dg(Nm.bind(null, -a,tm,um),d);break}Nm(a,tm,um);break;case 5:Nm(a,tm,um);break;default:throw Error(m(329));}}}Em(a,A());return a.callbackNode===c?2===Z&&Q===a?(a.callbackPriority=0,a.callbackNode=null):Hm.bind(null,a):null}function Lm(a,b,c){var d=sm,e=a.current.memoizedState.isDehydrated;e&&(Cm(a,c).flags|=256);c=Jm(a,c);if(2!==c){if(om&&!e)return a.errorRecoveryDisabledLanes|=b,qm|=b,4;a=tm;tm=d;null!==a&&il(a)}return c}function il(a){null===tm?tm=a:tm.push.apply(tm,a)} -function Mm(a){for(var b=a;;){if(b.flags&16384){var c=b.updateQueue;if(null!==c&&(c=c.stores,null!==c))for(var d=0;d<c.length;d++){var e=c[d],f=e.getSnapshot;e=e.value;try{if(!$e(f(),e))return!1}catch(g){return!1}}}c=b.child;if(b.subtreeFlags&16384&&null!==c)c.return=b,b=c;else{if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return!0;b=b.return}b.sibling.return=b.return;b=b.sibling}}return!0} -function Dm(a,b){b&=~rm;b&=~qm;a.suspendedLanes|=b;a.pingedLanes&=~b;for(a=a.expirationTimes;0<b;){var c=31-Jc(b),d=1<<c;a[c]=-1;b&=~d}}function Fm(a){if(0!==(H&6))throw Error(m(327));Im();var b=Pc(a,0);if(0===(b&3))return Em(a,A()),null;var c=Jm(a,b);if(0!==a.tag&&2===c){var d=b,e=Sc(a,d);0!==e&&(b=e,c=Lm(a,d,e))}if(1===c)throw c=pm,Cm(a,0),Dm(a,b),Em(a,A()),c;if(6===c)return Dm(a,b),Em(a,A()),null;a.finishedWork=a.current.alternate;a.finishedLanes=b;Nm(a,tm,um);Em(a,A());return null} -function Om(a,b){var c=H;H|=1;try{return a(b)}finally{H=c,0===H&&(kl=A()+500,Zg&&ch())}}function Pm(a){null!==wm&&0===wm.tag&&0===(H&6)&&Im();var b=H;H|=1;var c=mm.transition,d=B;try{if(mm.transition=null,B=2,a)return a()}finally{B=d,mm.transition=c,H=b,0===(H&6)&&ch()}}function Qm(){if(null!==Y){if(0===Z)var a=Y.return;else Tk(),Yi(),a=Y;for(;null!==a;)ml(a.alternate,a),a=a.return;Y=null}} -function Cm(a,b){a.finishedWork=null;a.finishedLanes=0;var c=a.timeoutHandle;-1!==c&&(a.timeoutHandle=-1,Eg(c));Qm();Q=a;Y=a=ci(a.current,null);I=mi=b;Z=0;nm=null;om=!1;U=0;pm=null;rm=qm=Wh=0;tm=sm=null;Hh();return a}function Rm(a,b){Ei.current=Ui;lm.current=null;if(b===zi){if(null===Di)throw Error(m(459));a=Di;Di=null;b=a;Z=Sm()?2:3}else Z=b===gk?6:null!==b&&"object"===typeof b&&"function"===typeof b.then?4:1;nm=b;null===Y&&(U=1,pm=b)} -function Sm(){if(0!==(Wh&268435455)||0!==(qm&268435455))return!1;if((I&8388480)===I)return null===qi;var a=pi.current;return null!==a&&(I&125829120)===I?a===qi:!1}function Tm(a){a=mg(a);gg=a.ownerDocument||a;hg=fg.current;fg.current=kg;a=jm.current;jm.current=Ui;return null===a?Ui:a}function Um(){var a=km.current;km.current=gm;return a}function Hk(){U=4;null===Q||0===(Wh&268435455)&&0===(qm&268435455)||Dm(Q,I)} -function Jm(a,b){var c=H;H|=2;var d=Tm(a.containerInfo),e=Um();if(Q!==a||I!==b)um=null,Cm(a,b);a:do try{if(0!==Z&&null!==Y){b=Y;var f=nm;switch(Z){case 6:Qm();U=6;break a;default:Z=0,nm=null,Vm(b,f)}}Wm();break}catch(g){Rm(a,g)}while(1);Tk();H=c;fg.current=hg;hg=null;jm.current=d;km.current=e;if(null!==Y)throw Error(m(261));Q=null;I=0;Hh();return U}function Wm(){for(;null!==Y;)Xm(Y)} -function Km(a,b){var c=H;H|=2;var d=Tm(a.containerInfo),e=Um();if(Q!==a||I!==b)um=null,kl=A()+500,Cm(a,b);a:do try{if(0!==Z&&null!==Y){b=Y;var f=nm;switch(Z){case 1:Z=0;nm=null;Vm(b,f);break;case 2:if(Ai(f)){Z=0;nm=null;Ym(b);break}b=function(){Em(a,A())};f.then(b,b);break a;case 3:Z=5;break a;case 5:Ai(f)?(Z=0,nm=null,Ym(b)):(Z=0,nm=null,Vm(b,f));break;case 4:Z=0;nm=null;Vm(b,f);break;case 6:Qm();U=6;break a;default:throw Error(m(462));}}Zm();break}catch(g){Rm(a,g)}while(1);Tk();fg.current=hg;hg= -null;jm.current=d;km.current=e;H=c;if(null!==Y)return 0;Q=null;I=0;Hh();return U}function Zm(){for(;null!==Y&&!xc();)Xm(Y)}function Xm(a){var b=$m(a.alternate,a,mi);a.memoizedProps=a.pendingProps;null===b?an(a):Y=b;lm.current=null} -function Ym(a){var b=a.alternate;switch(a.tag){case 2:a.tag=0;case 0:case 11:var c=a.type,d=a.pendingProps;d=a.elementType===c?d:Pj(c,d);b=tk(b,a,d,c,I);break;case 15:b=tk(b,a,a.pendingProps,a.type,I);break;default:Tk(),Yi(),ml(b,a),a=Y=jl(a,mi),b=$m(b,a,mi)}a.memoizedProps=a.pendingProps;null===b?an(a):Y=b;lm.current=null} -function Vm(a,b){Tk();Yi();var c=a.return;if(null===c||null===Q)U=1,pm=b,Y=null;else{try{a:{var d=Q,e=b;b=I;a.flags|=32768;if(null!==e&&"object"===typeof e&&"function"===typeof e.then){var f=e,g=a.tag;if(0===(a.mode&1)&&(0===g||11===g||15===g)){var h=a.alternate;h?(a.updateQueue=h.updateQueue,a.memoizedState=h.memoizedState,a.lanes=h.lanes):(a.updateQueue=null,a.memoizedState=null)}var k=pi.current;if(null!==k){switch(k.tag){case 13:a.mode&1&&(null===qi?Hk():null===k.alternate&&0===U&&(U=3));k.flags&= --257;ek(k,c,a,d,b);var l=k.updateQueue;null===l?k.updateQueue=new Set([f]):l.add(f);break;case 22:if(k.mode&1){k.flags|=65536;var p=k.updateQueue;if(null===p){var q={transitions:null,markerInstances:null,wakeables:new Set([f])};k.updateQueue=q}else{var w=p.wakeables;null===w?p.wakeables=new Set([f]):w.add(f)}break}default:throw Error(m(435,k.tag));}k.mode&1&&bn(d,f,b);break a}else if(1===d.tag){bn(d,f,b);Hk();break a}else e=Error(m(426))}else if(G&&a.mode&1&&(f=pi.current,null!==f)){0===(f.flags& -65536)&&(f.flags|=256);ek(f,c,a,d,b);Dh(Wj(e,a));break a}d=e=Wj(e,a);4!==U&&(U=2);null===sm?sm=[d]:sm.push(d);d=c;do{switch(d.tag){case 3:var u=e;d.flags|=65536;b&=-b;d.lanes|=b;var n=Zj(d,u,b);Uh(d,n);break a;case 1:g=e;var r=d.type,L=d.stateNode;if(0===(d.flags&128)&&("function"===typeof r.getDerivedStateFromError||null!==L&&"function"===typeof L.componentDidCatch&&(null===dk||!dk.has(L)))){d.flags|=65536;n=b&-b;d.lanes|=n;u=ck(d,g,n);Uh(d,u);break a}}d=d.return}while(null!==d)}}catch(v){throw Y= -c,v;}an(a)}}function an(a){var b=a;do{var c=b.alternate;a=b.return;if(0===(b.flags&32768)){if(c=hl(c,b,mi),null!==c){Y=c;return}}else{c=ll(c,b);if(null!==c){c.flags&=16383;Y=c;return}if(null!==a)a.flags|=32768,a.subtreeFlags=0,a.deletions=null;else{U=6;Y=null;return}}b=b.sibling;if(null!==b){Y=b;return}Y=b=a}while(null!==b);0===U&&(U=5)}function Nm(a,b,c){var d=B,e=mm.transition;try{mm.transition=null,B=2,cn(a,b,c,d)}finally{mm.transition=e,B=d}return null} -function cn(a,b,c,d){do Im();while(null!==wm);if(0!==(H&6))throw Error(m(327));var e=a.finishedWork,f=a.finishedLanes;if(null===e)return null;a.finishedWork=null;a.finishedLanes=0;if(e===a.current)throw Error(m(177));a.callbackNode=null;a.callbackPriority=0;var g=e.lanes|e.childLanes;g|=Gh;Wc(a,g);a===Q&&(Y=Q=null,I=0);0===(e.subtreeFlags&10256)&&0===(e.flags&10256)||vm||(vm=!0,ym=g,zm=c,Gm(Cc,function(){Im();return null}));c=0!==(e.flags&15990);if(0!==(e.subtreeFlags&15990)||c){c=mm.transition;mm.transition= -null;var h=B;B=2;var k=H;H|=4;lm.current=null;ul(a,e);Ql(e,a);gf(Bg);xd=!!Ag;Bg=Ag=null;a.current=e;Al(a,e.alternate,e);yc();H=k;B=h;mm.transition=c}else a.current=e;vm?(vm=!1,wm=a,xm=f):dn(a,g);g=a.pendingLanes;0===g&&(dk=null);Hc(e.stateNode,d);Em(a,A());if(null!==b)for(d=a.onRecoverableError,e=0;e<b.length;e++)f=b[e],g={digest:f.digest,componentStack:f.stack},d(f.value,g);if(ak)throw ak=!1,a=bk,bk=null,a;0!==(xm&3)&&0!==a.tag&&Im();g=a.pendingLanes;0!==(g&3)?a===Nh?Mh++:(Mh=0,Nh=a):Mh=0;ch();return null} -function dn(a,b){0===(a.pooledCacheLanes&=b)&&(b=a.pooledCache,null!=b&&(a.pooledCache=null,Zk(b)))} -function Im(){if(null!==wm){var a=wm,b=ym;ym=0;var c=Yc(xm),d=32>c?32:c;c=mm.transition;var e=B;try{mm.transition=null;B=d;if(null===wm)var f=!1;else{d=zm;zm=null;var g=wm,h=xm;wm=null;xm=0;if(0!==(H&6))throw Error(m(331));var k=H;H|=4;em(g.current);Zl(g,g.current,h,d);H=k;ch();if(Gc&&"function"===typeof Gc.onPostCommitFiberRoot)try{Gc.onPostCommitFiberRoot(Fc,g)}catch(l){}f=!0}return f}finally{B=e,mm.transition=c,dn(a,b)}}return!1} -function en(a,b,c){b=Wj(c,b);b=Zj(a,b,2);a=Sh(a,b,2);b=Jj();null!==a&&(Vc(a,2,b),Em(a,b))}function W(a,b,c){if(3===a.tag)en(a,a,c);else for(;null!==b;){if(3===b.tag){en(b,a,c);break}else if(1===b.tag){var d=b.stateNode;if("function"===typeof b.type.getDerivedStateFromError||"function"===typeof d.componentDidCatch&&(null===dk||!dk.has(d))){a=Wj(c,a);a=ck(b,a,2);b=Sh(b,a,2);a=Jj();null!==b&&(Vc(b,2,a),Em(b,a));break}}b=b.return}} -function bn(a,b,c){var d=a.pingCache;if(null===d){d=a.pingCache=new im;var e=new Set;d.set(b,e)}else e=d.get(b),void 0===e&&(e=new Set,d.set(b,e));e.has(c)||(om=!0,e.add(c),a=fn.bind(null,a,b,c),b.then(a,a))}function fn(a,b,c){var d=a.pingCache;null!==d&&d.delete(b);b=Jj();a.pingedLanes|=a.suspendedLanes&c;Q===a&&(I&c)===c&&(4===U||3===U&&(I&125829120)===I&&500>A()-Tl?0===(H&2)&&Cm(a,0):rm|=c);Em(a,b)} -function gn(a,b){0===b&&(0===(a.mode&1)?b=2:(b=Nc,Nc<<=1,0===(Nc&125829120)&&(Nc=8388608)));var c=Jj();a=Kh(a,b);null!==a&&(Vc(a,b,c),Em(a,c))}function Ik(a){var b=a.memoizedState,c=0;null!==b&&(c=b.retryLane);gn(a,c)}function Ol(a,b){var c=0;switch(a.tag){case 13:var d=a.stateNode;var e=a.memoizedState;null!==e&&(c=e.retryLane);break;case 19:d=a.stateNode;break;case 22:d=a.stateNode._retryCache;break;default:throw Error(m(314));}null!==d&&d.delete(b);gn(a,c)}var $m; -$m=function(a,b,c){if(null!==a)if(a.memoizedProps!==b.pendingProps||Pg.current)ej=!0;else{if(0===(a.lanes&c)&&0===(b.flags&128))return ej=!1,Nk(a,b,c);ej=0!==(a.flags&131072)?!0:!1}else ej=!1,G&&0!==(b.flags&1048576)&&nh(b,gh,b.index);b.lanes=0;switch(b.tag){case 2:var d=b.type;vk(a,b);a=b.pendingProps;var e=Rg(b,F.current);ik(b,c);e=Pi(null,b,d,a,e,c);var f=Wi();b.flags|=1;"object"===typeof e&&null!==e&&"function"===typeof e.render&&void 0===e.$$typeof?(b.tag=1,b.memoizedState=null,b.updateQueue= -null,Sg(d)?(f=!0,Wg(b)):f=!1,b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,Ph(b),e.updater=Rj,b.stateNode=e,e._reactInternals=b,Vj(b,d,a,c),b=wk(null,b,d,!0,f,c)):(b.tag=0,G&&f&&oh(b),R(null,b,e,c),b=b.child);return b;case 16:d=b.elementType;a:{vk(a,b);a=b.pendingProps;e=d._init;d=e(d._payload);b.type=d;e=b.tag=hn(d);a=Pj(d,a);switch(e){case 0:b=nk(null,b,d,a,c);break a;case 1:b=uk(null,b,d,a,c);break a;case 11:b=hk(null,b,d,a,c);break a;case 14:b=kk(null,b,d,Pj(d.type,a),c);break a}throw Error(m(306, -d,""));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Pj(d,e),nk(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Pj(d,e),uk(a,b,d,e,c);case 3:a:{xk(b);if(null===a)throw Error(m(387));e=b.pendingProps;f=b.memoizedState;d=f.element;Qh(a,b);Vh(b,e,null,c);var g=b.memoizedState;e=g.cache;Ok(b,S,e);e!==f.cache&&Vk(b,S,c);e=g.element;if(f.isDehydrated)if(f={element:e,isDehydrated:!1,cache:g.cache},b.updateQueue.baseState=f,b.memoizedState=f,b.flags&256){d= -Wj(Error(m(423)),b);b=yk(a,b,e,c,d);break a}else if(e!==d){d=Wj(Error(m(424)),b);b=yk(a,b,e,c,d);break a}else for(rh=Lg(b.stateNode.containerInfo.firstChild),qh=b,G=!0,sh=null,c=ii(b,null,e,c),b.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{Ch();if(e===d){b=jk(a,b,c);break a}R(a,b,e,c)}b=b.child}return b;case 26:return pk(a,b),c=b.memoizedState=wg(b.type,null===a?null:a.memoizedProps,b.pendingProps),null!==a||G||null!==c||(c=b.type,a=b.pendingProps,d=Tf(c,a,ag.current,"http://www.w3.org/1999/xhtml"), -d[ea]=b,d[fa]=a,Uf(d,c,a),d[na]=!0,b.stateNode=d),null;case 27:return dg(b),null===a&&G&&(d=b.stateNode=Ng(b.type,b.pendingProps,ag.current),qh=b,rh=Lg(d.firstChild)),d=b.pendingProps.children,null!==a||G?R(a,b,d,c):b.child=hi(b,null,d,c),pk(a,b),b.child;case 5:return dg(b),null===a&&xh(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,Cg(d,e)?g=null:null!==f&&Cg(d,f)&&(b.flags|=32),pk(a,b),R(a,b,g,c),b.child;case 6:return null===a&&xh(b),null;case 13:return Ck(a,b,c);case 4:return bg(b, -b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=hi(b,null,d,c):R(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Pj(d,e),hk(a,b,d,e,c);case 7:return R(a,b,b.pendingProps,c),b.child;case 8:return R(a,b,b.pendingProps.children,c),b.child;case 12:return R(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;f=b.memoizedProps;g=e.value;Ok(b,d,g);if(null!==f)if($e(f.value,g)){if(f.children===e.children&&!Pg.current){b=jk(a,b, -c);break a}}else Vk(b,d,c);R(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,d=b.pendingProps.children,ik(b,c),e=P(e),d=d(e),b.flags|=1,R(a,b,d,c),b.child;case 14:return d=b.type,e=Pj(d,b.pendingProps),e=Pj(d.type,e),kk(a,b,d,e,c);case 15:return mk(a,b,b.type,b.pendingProps,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Pj(d,e),vk(a,b),b.tag=1,Sg(d)?(a=!0,Wg(b)):a=!1,ik(b,c),Tj(b,d,e),Vj(b,d,e,c),wk(null,b,d,!0,a,c);case 19:return Mk(a,b,c);case 22:return ok(a,b,c); -case 24:return ik(b,c),d=P(S),null===a?(e=sk(),null===e&&(e=Q,f=Kj(),e.pooledCache=f,f.refCount++,null!==f&&(e.pooledCacheLanes|=c),e=f),b.memoizedState={parent:d,cache:e},Ph(b),Ok(b,S,e)):(0!==(a.lanes&c)&&(Qh(a,b),Vh(b,null,null,c)),e=a.memoizedState,f=b.memoizedState,e.parent!==d?(e={parent:d,cache:d},b.memoizedState=e,0===b.lanes&&(b.memoizedState=b.updateQueue.baseState=e),Ok(b,S,d)):(d=f.cache,Ok(b,S,d),d!==e.cache&&Vk(b,S,c))),R(a,b,b.pendingProps.children,c),b.child}throw Error(m(156,b.tag)); -};function Gm(a,b){return vc(a,b)}function jn(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.refCleanup=this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.subtreeFlags=this.flags=0;this.deletions=null;this.childLanes=this.lanes=0;this.alternate=null}function uh(a,b,c,d){return new jn(a,b,c,d)} -function lk(a){a=a.prototype;return!(!a||!a.isReactComponent)}function hn(a){if("function"===typeof a)return lk(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Va)return 11;if(a===Ya)return 14}return 2} -function ci(a,b){var c=a.alternate;null===c?(c=uh(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null);c.flags=a.flags&14680064;c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext}; +function ml(a,b,c){var d=b.pendingProps;th(b);switch(b.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return T(b),null;case 1:return Wg(b.type)&&Xg(),T(b),null;case 3:c=b.stateNode;d=null;null!==a&&(d=a.memoizedState.cache);b.memoizedState.cache!==d&&(b.flags|=2048);Zk(S);bg();D(Tg);D(G);Ci();c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null);if(null===a||null===a.child)Eh(b)?b.flags|=4:null===a||a.memoizedState.isDehydrated&&0===(b.flags&256)||(b.flags|= +1024,null!==wh&&(nl(wh),wh=null));il(a,b);T(b);return null;case 26:dg(b);(a?a.ref:null)!==b.ref&&gl(b);if(null===a||a.memoizedState!==b.memoizedState)b.flags|=4;T(b);return null;case 27:dg(b);c=$f.current;var e=b.type;if(null!==a&&null!=b.stateNode)jl(a,b,e,d),a.ref!==b.ref&&gl(b);else{if(!d){if(null===b.stateNode)throw Error(p(166));T(b);return null}a=Yf.current;Eh(b)?Ch(b,a):(b.stateNode=Rg(e,d,c),b.flags|=4);null!==b.ref&&gl(b)}T(b);return null;case 5:dg(b);c=b.type;if(null!==a&&null!=b.stateNode)jl(a, +b,c,d),a.ref!==b.ref&&gl(b);else{if(!d){if(null===b.stateNode)throw Error(p(166));T(b);return null}a=Yf.current;if(Eh(b))Ch(b,a)&&(b.flags|=4);else{a=Tf(c,d,$f.current,a);a[ea]=b;a[fa]=d;hl(a,b,!1,!1);b.stateNode=a;a:switch(Uf(a,c,d),c){case "button":case "input":case "select":case "textarea":a=!!d.autoFocus;break a;case "img":a=!0;break a;default:a=!1}a&&(b.flags|=4)}null!==b.ref&&gl(b)}T(b);return null;case 6:if(a&&null!=b.stateNode)kl(a,b,a.memoizedProps,d);else{if("string"!==typeof d&&null=== +b.stateNode)throw Error(p(166));a=$f.current;if(Eh(b)){a=b.stateNode;c=b.memoizedProps;a[ea]=b;if(d=a.nodeValue!==c)if(e=uh,null!==e)switch(e.tag){case 3:Rf(a.nodeValue,c,0!==(e.mode&1));break;case 27:case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Rf(a.nodeValue,c,0!==(e.mode&1))}d&&(b.flags|=4)}else a=(9===a.nodeType?a:a.ownerDocument).createTextNode(d),a[ea]=b,b.stateNode=a}T(b);return null;case 13:yi(b);d=b.memoizedState;if(null===a||null!==a.memoizedState&&null!==a.memoizedState.dehydrated){if(H&& +null!==vh&&0!==(b.mode&1)&&0===(b.flags&128))Fh(),Gh(),b.flags|=98560,e=!1;else if(e=Eh(b),null!==d&&null!==d.dehydrated){if(null===a){if(!e)throw Error(p(318));e=b.memoizedState;e=null!==e?e.dehydrated:null;if(!e)throw Error(p(317));e[ea]=b}else Gh(),0===(b.flags&128)&&(b.memoizedState=null),b.flags|=4;T(b);e=!1}else null!==wh&&(nl(wh),wh=null),e=!0;if(!e)return b.flags&65536?b:null}if(0!==(b.flags&128))return b.lanes=c,b;c=null!==d;a=null!==a&&null!==a.memoizedState;if(c){d=b.child;e=null;null!== +d.alternate&&null!==d.alternate.memoizedState&&null!==d.alternate.memoizedState.cachePool&&(e=d.alternate.memoizedState.cachePool.pool);var f=null;null!==d.memoizedState&&null!==d.memoizedState.cachePool&&(f=d.memoizedState.cachePool.pool);f!==e&&(d.flags|=2048)}c!==a&&c&&(b.child.flags|=8192);null!==b.updateQueue&&(b.flags|=4);T(b);return null;case 4:return bg(),il(a,b),null===a&&Kf(b.stateNode.containerInfo),T(b),null;case 10:return Zk(b.type._context),T(b),null;case 17:return Wg(b.type)&&Xg(), +T(b),null;case 19:D(zi);e=b.memoizedState;if(null===e)return T(b),null;d=0!==(b.flags&128);f=e.rendering;if(null===f)if(d)ll(e,!1);else{if(0!==U||null!==a&&0!==(a.flags&128))for(a=b.child;null!==a;){f=Ai(a);if(null!==f){b.flags|=128;ll(e,!1);a=f.updateQueue;null!==a&&(b.updateQueue=a,b.flags|=4);b.subtreeFlags=0;a=c;for(c=b.child;null!==c;)ol(c,a),c=c.sibling;E(zi,zi.current&1|2);return b.child}a=a.sibling}null!==e.tail&&A()>pl&&(b.flags|=128,d=!0,ll(e,!1),b.lanes=8388608)}else{if(!d)if(a=Ai(f),null!== +a){if(b.flags|=128,d=!0,a=a.updateQueue,null!==a&&(b.updateQueue=a,b.flags|=4),ll(e,!0),null===e.tail&&"hidden"===e.tailMode&&!f.alternate&&!H)return T(b),null}else 2*A()-e.renderingStartTime>pl&&1073741824!==c&&(b.flags|=128,d=!0,ll(e,!1),b.lanes=8388608);e.isBackwards?(f.sibling=b.child,b.child=f):(a=e.last,null!==a?a.sibling=f:b.child=f,e.last=f)}if(null!==e.tail)return b=e.tail,e.rendering=b,e.tail=b.sibling,e.renderingStartTime=A(),b.sibling=null,a=zi.current,E(zi,d?a&1|2:a&1),b;T(b);return null; +case 22:case 23:return yi(b),si(),d=null!==b.memoizedState,null!==a?null!==a.memoizedState!==d&&(b.flags|=8192):d&&(b.flags|=8192),d&&0!==(b.mode&1)?0!==(c&1073741824)&&0===(b.flags&128)&&(T(b),b.subtreeFlags&6&&(b.flags|=8192)):T(b),null!==b.updateQueue&&(b.flags|=4),c=null,null!==a&&null!==a.memoizedState&&null!==a.memoizedState.cachePool&&(c=a.memoizedState.cachePool.pool),d=null,null!==b.memoizedState&&null!==b.memoizedState.cachePool&&(d=b.memoizedState.cachePool.pool),d!==c&&(b.flags|=2048), +null!==a&&D(fl),null;case 24:return c=null,null!==a&&(c=a.memoizedState.cache),b.memoizedState.cache!==c&&(b.flags|=2048),Zk(S),T(b),null;case 25:return null}throw Error(p(156,b.tag));} +function ql(a,b){th(b);switch(b.tag){case 1:return Wg(b.type)&&Xg(),a=b.flags,a&65536?(b.flags=a&-65537|128,b):null;case 3:return Zk(S),bg(),D(Tg),D(G),Ci(),a=b.flags,0!==(a&65536)&&0===(a&128)?(b.flags=a&-65537|128,b):null;case 26:case 27:case 5:return dg(b),null;case 13:yi(b);a=b.memoizedState;if(null!==a&&null!==a.dehydrated){if(null===b.alternate)throw Error(p(340));Gh()}a=b.flags;return a&65536?(b.flags=a&-65537|128,b):null;case 19:return D(zi),null;case 4:return bg(),null;case 10:return Zk(b.type._context), +null;case 22:case 23:return yi(b),si(),null!==a&&D(fl),a=b.flags,a&65536?(b.flags=a&-65537|128,b):null;case 24:return Zk(S),null;case 25:return null;default:return null}} +function rl(a,b){th(b);switch(b.tag){case 1:a=b.type.childContextTypes;null!==a&&void 0!==a&&Xg();break;case 3:Zk(S);bg();D(Tg);D(G);Ci();break;case 26:case 27:case 5:dg(b);break;case 4:bg();break;case 13:yi(b);break;case 19:D(zi);break;case 10:Zk(b.type._context);break;case 22:case 23:yi(b);si();null!==a&&D(fl);break;case 24:Zk(S)}}var sl=!1,tl=!1,ul="function"===typeof WeakSet?WeakSet:Set,V=null; +function vl(a,b){try{var c=a.ref;if(null!==c){var d=a.stateNode;switch(a.tag){case 26:case 27:case 5:var e=d;break;default:e=d}"function"===typeof c?a.refCleanup=c(e):c.current=e}}catch(f){W(a,b,f)}}function wl(a,b){var c=a.ref,d=a.refCleanup;if(null!==c)if("function"===typeof d)try{d()}catch(e){W(a,b,e)}finally{a.refCleanup=null,a=a.alternate,null!=a&&(a.refCleanup=null)}else if("function"===typeof c)try{c(null)}catch(e){W(a,b,e)}else c.current=null} +function xl(a,b,c){try{c()}catch(d){W(a,b,d)}}var yl=!1; +function zl(a,b){Eg=xd;a=ef();if(ff(a)){if("selectionStart"in a)var c={start:a.selectionStart,end:a.selectionEnd};else a:{c=(c=a.ownerDocument)&&c.defaultView||window;var d=c.getSelection&&c.getSelection();if(d&&0!==d.rangeCount){c=d.anchorNode;var e=d.anchorOffset,f=d.focusNode;d=d.focusOffset;try{c.nodeType,f.nodeType}catch(M){c=null;break a}var g=0,h=-1,k=-1,l=0,n=0,q=a,v=null;b:for(;;){for(var w;;){q!==c||0!==e&&3!==q.nodeType||(h=g+e);q!==f||0!==d&&3!==q.nodeType||(k=g+d);3===q.nodeType&&(g+= +q.nodeValue.length);if(null===(w=q.firstChild))break;v=q;q=w}for(;;){if(q===a)break b;v===c&&++l===e&&(h=g);v===f&&++n===d&&(k=g);if(null!==(w=q.nextSibling))break;q=v;v=q.parentNode}q=w}c=-1===h||-1===k?null:{start:h,end:k}}else c=null}c=c||{start:0,end:0}}else c=null;Fg={focusedElem:a,selectionRange:c};xd=!1;for(V=b;null!==V;)if(b=V,a=b.child,0!==(b.subtreeFlags&1028)&&null!==a)a.return=b,V=a;else for(;null!==V;){b=V;try{var m=b.alternate,r=b.flags;switch(b.tag){case 0:break;case 11:case 15:break; +case 1:if(0!==(r&1024)&&null!==m){var L=m.memoizedProps,x=m.memoizedState,t=b.stateNode,u=t.getSnapshotBeforeUpdate(b.elementType===b.type?L:Uj(b.type,L),x);t.__reactInternalSnapshotBeforeUpdate=u}break;case 3:0!==(r&1024)&&Ng(b.stateNode.containerInfo);break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(0!==(r&1024))throw Error(p(163));}}catch(M){W(b,b.return,M)}a=b.sibling;if(null!==a){a.return=b.return;V=a;break}V=b.return}m=yl;yl=!1;return m} +function Al(a,b,c){var d=b.updateQueue;d=null!==d?d.lastEffect:null;if(null!==d){var e=d=d.next;do{if((e.tag&a)===a){var f=e.destroy;e.destroy=void 0;void 0!==f&&xl(b,c,f)}e=e.next}while(e!==d)}}function Bl(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d()}c=c.next}while(c!==b)}}function Cl(a,b){try{Bl(b,a)}catch(c){W(a,a.return,c)}} +function Dl(a){var b=a.updateQueue;if(null!==b){var c=a.stateNode;try{bi(b,c)}catch(d){W(a,a.return,d)}}}function El(a){var b=a.type,c=a.memoizedProps,d=a.stateNode;try{a:switch(b){case "button":case "input":case "select":case "textarea":c.autoFocus&&d.focus();break a;case "img":c.src&&(d.src=c.src)}}catch(e){W(a,a.return,e)}} +function Fl(a,b,c){var d=c.flags;switch(c.tag){case 0:case 11:case 15:Gl(a,c);d&4&&Cl(c,5);break;case 1:Gl(a,c);if(d&4)if(a=c.stateNode,null===b)try{a.componentDidMount()}catch(h){W(c,c.return,h)}else{var e=c.elementType===c.type?b.memoizedProps:Uj(c.type,b.memoizedProps);b=b.memoizedState;try{a.componentDidUpdate(e,b,a.__reactInternalSnapshotBeforeUpdate)}catch(h){W(c,c.return,h)}}d&64&&Dl(c);d&512&&vl(c,c.return);break;case 3:Gl(a,c);if(d&64&&(d=c.updateQueue,null!==d)){a=null;if(null!==c.child)switch(c.child.tag){case 27:case 5:a= +c.child.stateNode;break;case 1:a=c.child.stateNode}try{bi(d,a)}catch(h){W(c,c.return,h)}}break;case 26:Gl(a,c);d&512&&vl(c,c.return);break;case 27:case 5:Gl(a,c);null===b&&d&4&&El(c);d&512&&vl(c,c.return);break;case 12:Gl(a,c);break;case 13:Gl(a,c);d&4&&Hl(a,c);break;case 22:if(0!==(c.mode&1)){if(e=null!==c.memoizedState||sl,!e){b=null!==b&&null!==b.memoizedState||tl;var f=sl,g=tl;sl=e;(tl=b)&&!g?Il(a,c,0!==(c.subtreeFlags&8772)):Gl(a,c);sl=f;tl=g}}else Gl(a,c);d&512&&("manual"===c.memoizedProps.mode? +vl(c,c.return):wl(c,c.return));break;default:Gl(a,c)}}function Jl(a){var b=a.alternate;null!==b&&(a.alternate=null,Jl(b));a.child=null;a.deletions=null;a.sibling=null;5===a.tag&&(b=a.stateNode,null!==b&&oa(b));a.stateNode=null;a.return=null;a.dependencies=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.stateNode=null;a.updateQueue=null}function Kl(a){return 5===a.tag||3===a.tag||26===a.tag||27===a.tag||4===a.tag} +function Ll(a){a:for(;;){for(;null===a.sibling;){if(null===a.return||Kl(a.return))return null;a=a.return}a.sibling.return=a.return;for(a=a.sibling;5!==a.tag&&6!==a.tag&&27!==a.tag&&18!==a.tag;){if(a.flags&2)continue a;if(null===a.child||4===a.tag)continue a;else a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}} +function Ml(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=Sf));else if(4!==d&&27!==d&&(a=a.child,null!==a))for(Ml(a,b,c),a=a.sibling;null!==a;)Ml(a,b,c),a=a.sibling} +function Nl(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&27!==d&&(a=a.child,null!==a))for(Nl(a,b,c),a=a.sibling;null!==a;)Nl(a,b,c),a=a.sibling}var X=null,Ol=!1;function Pl(a,b,c){for(c=c.child;null!==c;)Ql(a,b,c),c=c.sibling} +function Ql(a,b,c){if(Gc&&"function"===typeof Gc.onCommitFiberUnmount)try{Gc.onCommitFiberUnmount(Fc,c)}catch(h){}switch(c.tag){case 26:tl||wl(c,b);Pl(a,b,c);c.memoizedState&&zg(c.memoizedState);break;case 27:tl||wl(c,b);var d=X,e=Ol;X=c.stateNode;Pl(a,b,c);c=c.stateNode;for(a=c.attributes;a.length;)c.removeAttributeNode(a[0]);oa(c);X=d;Ol=e;break;case 5:tl||wl(c,b);case 6:d=X;e=Ol;X=null;Pl(a,b,c);X=d;Ol=e;null!==X&&(Ol?(a=X,c=c.stateNode,8===a.nodeType?a.parentNode.removeChild(c):a.removeChild(c)): +X.removeChild(c.stateNode));break;case 18:null!==X&&(Ol?(a=X,c=c.stateNode,8===a.nodeType?Mg(a.parentNode,c):1===a.nodeType&&Mg(a,c),vd(a)):Mg(X,c.stateNode));break;case 4:d=X;e=Ol;X=c.stateNode.containerInfo;Ol=!0;Pl(a,b,c);X=d;Ol=e;break;case 0:case 11:case 14:case 15:if(!tl&&(d=c.updateQueue,null!==d&&(d=d.lastEffect,null!==d))){e=d=d.next;do{var f=e,g=f.destroy;f=f.tag;void 0!==g&&(0!==(f&2)?xl(c,b,g):0!==(f&4)&&xl(c,b,g));e=e.next}while(e!==d)}Pl(a,b,c);break;case 1:if(!tl&&(wl(c,b),d=c.stateNode, +"function"===typeof d.componentWillUnmount))try{d.props=c.memoizedProps,d.state=c.memoizedState,d.componentWillUnmount()}catch(h){W(c,b,h)}Pl(a,b,c);break;case 21:Pl(a,b,c);break;case 22:wl(c,b);c.mode&1?(tl=(d=tl)||null!==c.memoizedState,Pl(a,b,c),tl=d):Pl(a,b,c);break;default:Pl(a,b,c)}}function Hl(a,b){if(null===b.memoizedState&&(a=b.alternate,null!==a&&(a=a.memoizedState,null!==a&&(a=a.dehydrated,null!==a))))try{vd(a)}catch(c){W(b,b.return,c)}} +function Rl(a){switch(a.tag){case 13:case 19:var b=a.stateNode;null===b&&(b=a.stateNode=new ul);return b;case 22:return a=a.stateNode,b=a._retryCache,null===b&&(b=a._retryCache=new ul),b;default:throw Error(p(435,a.tag));}}function Sl(a,b){var c=Rl(a);b.forEach(function(b){var d=Tl.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})} +function Ul(a,b){var c=b.deletions;if(null!==c)for(var d=0;d<c.length;d++){var e=c[d];try{var f=a,g=b,h=g;a:for(;null!==h;){switch(h.tag){case 27:case 5:X=h.stateNode;Ol=!1;break a;case 3:X=h.stateNode.containerInfo;Ol=!0;break a;case 4:X=h.stateNode.containerInfo;Ol=!0;break a}h=h.return}if(null===X)throw Error(p(160));Ql(f,g,e);X=null;Ol=!1;var k=e.alternate;null!==k&&(k.return=null);e.return=null}catch(l){W(e,b,l)}}if(b.subtreeFlags&12854)for(b=b.child;null!==b;)Vl(b,a),b=b.sibling} +function Vl(a,b){var c=a.alternate,d=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:Ul(b,a);Wl(a);if(d&4){try{Al(3,a,a.return),Bl(3,a)}catch(m){W(a,a.return,m)}try{Al(5,a,a.return)}catch(m){W(a,a.return,m)}}break;case 1:Ul(b,a);Wl(a);d&512&&null!==c&&wl(c,c.return);d&64&&sl&&(a=a.updateQueue,null!==a&&(c=a.callbacks,null!==c&&(d=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=null===d?c:d.concat(c))));break;case 26:Ul(b,a);Wl(a);d&512&&null!==c&&wl(c,c.return);d&4&&(d=a.memoizedState,null!== +c&&(c=c.memoizedState,c!==d&&zg(c)),a.stateNode=d?tg(d):null);break;case 27:if(d&4&&null===a.alternate){for(var e=a.stateNode,f=a.memoizedProps,g=e.firstChild;g;){var h=g.nextSibling,k=g.nodeName;g[na]||"HEAD"===k||"BODY"===k||"STYLE"===k||"LINK"===k&&"stylesheet"===g.rel.toLowerCase()||e.removeChild(g);g=h}g=a.type;for(h=e.attributes;h.length;)e.removeAttributeNode(h[0]);Uf(e,g,f);e[ea]=a;e[fa]=f}case 5:Ul(b,a);Wl(a);d&512&&null!==c&&wl(c,c.return);if(a.flags&32){b=a.stateNode;try{Lb(b,"")}catch(m){W(a, +a.return,m)}}if(d&4&&(d=a.stateNode,null!=d&&(b=a.memoizedProps,f=null!==c?c.memoizedProps:b,c=a.type,e=a.updateQueue,a.updateQueue=null,null!==e)))try{"input"===c&&"radio"===b.type&&null!=b.name&&wb(d,b);Sb(c,f);var l=Sb(c,b);for(f=0;f<e.length;f+=2){var n=e[f],q=e[f+1];"style"===n?Pb(d,q):"dangerouslySetInnerHTML"===n?Jb(d,q):"children"===n?Lb(d,q):La(d,n,q,l)}switch(c){case "input":xb(d,b);break;case "textarea":Eb(d,b);break;case "select":var v=d._wrapperState.wasMultiple;d._wrapperState.wasMultiple= +!!b.multiple;var w=b.value;null!=w?Bb(d,!!b.multiple,w,!1):v!==!!b.multiple&&(null!=b.defaultValue?Bb(d,!!b.multiple,b.defaultValue,!0):Bb(d,!!b.multiple,b.multiple?[]:"",!1))}d[fa]=b}catch(m){W(a,a.return,m)}break;case 6:Ul(b,a);Wl(a);if(d&4){if(null===a.stateNode)throw Error(p(162));c=a.stateNode;d=a.memoizedProps;try{c.nodeValue=d}catch(m){W(a,a.return,m)}}break;case 3:Ul(b,a);Wl(a);if(d&4&&null!==c&&c.memoizedState.isDehydrated)try{vd(b.containerInfo)}catch(m){W(a,a.return,m)}break;case 4:Ul(b, +a);Wl(a);break;case 13:Ul(b,a);Wl(a);c=a.child;c.flags&8192&&null!==c.memoizedState&&(null===c.alternate||null===c.alternate.memoizedState)&&(Xl=A());d&4&&(c=a.updateQueue,null!==c&&(a.updateQueue=null,Sl(a,c)));break;case 22:d&512&&null!==c&&wl(c,c.return);l=null!==a.memoizedState;n=null!==c&&null!==c.memoizedState;a.mode&1?(q=sl,v=tl,sl=q||l,tl=v||n,Ul(b,a),tl=v,sl=q):Ul(b,a);Wl(a);q=a.stateNode;q._current=a;q._visibility&=-3;q._visibility|=q._pendingVisibility&2;if(d&8192&&(q._visibility=l?q._visibility& +-2:q._visibility|1,l&&(q=sl||tl,null===c||n||q||0!==(a.mode&1)&&Yl(a)),null===a.memoizedProps||"manual"!==a.memoizedProps.mode))a:for(c=null,n=a;;){if(5===n.tag||26===n.tag||27===n.tag){if(null===c){c=n;try{e=n.stateNode,l?(f=e.style,"function"===typeof f.setProperty?f.setProperty("display","none","important"):f.display="none"):(g=n.stateNode,h=n.memoizedProps.style,k=void 0!==h&&null!==h&&h.hasOwnProperty("display")?h.display:null,g.style.display=Ob("display",k))}catch(m){W(a,a.return,m)}}}else if(6=== +n.tag){if(null===c)try{n.stateNode.nodeValue=l?"":n.memoizedProps}catch(m){W(a,a.return,m)}}else if((22!==n.tag&&23!==n.tag||null===n.memoizedState||n===a)&&null!==n.child){n.child.return=n;n=n.child;continue}if(n===a)break a;for(;null===n.sibling;){if(null===n.return||n.return===a)break a;c===n&&(c=null);n=n.return}c===n&&(c=null);n.sibling.return=n.return;n=n.sibling}d&4&&(c=a.updateQueue,null!==c&&(d=c.wakeables,null!==d&&(c.wakeables=null,Sl(a,d))));break;case 19:Ul(b,a);Wl(a);d&4&&(c=a.updateQueue, +null!==c&&(a.updateQueue=null,Sl(a,c)));break;case 21:break;default:Ul(b,a),Wl(a)}} +function Wl(a){var b=a.flags;if(b&2){try{if(27!==a.tag){b:{for(var c=a.return;null!==c;){if(Kl(c)){var d=c;break b}c=c.return}throw Error(p(160));}switch(d.tag){case 27:var e=d.stateNode,f=Ll(a);Nl(a,f,e);break;case 5:var g=d.stateNode;d.flags&32&&(Lb(g,""),d.flags&=-33);var h=Ll(a);Nl(a,h,g);break;case 3:case 4:var k=d.stateNode.containerInfo,l=Ll(a);Ml(a,l,k);break;default:throw Error(p(161));}}}catch(n){W(a,a.return,n)}a.flags&=-3}b&4096&&(a.flags&=-4097)} +function Gl(a,b){if(b.subtreeFlags&8772)for(b=b.child;null!==b;)Fl(a,b.alternate,b),b=b.sibling} +function Yl(a){for(a=a.child;null!==a;){var b=a;switch(b.tag){case 0:case 11:case 14:case 15:Al(4,b,b.return);Yl(b);break;case 1:wl(b,b.return);var c=b.stateNode;if("function"===typeof c.componentWillUnmount){var d=b,e=b.return;try{var f=d;c.props=f.memoizedProps;c.state=f.memoizedState;c.componentWillUnmount()}catch(g){W(d,e,g)}}Yl(b);break;case 26:case 27:case 5:wl(b,b.return);Yl(b);break;case 22:wl(b,b.return);null===b.memoizedState&&Yl(b);break;default:Yl(b)}a=a.sibling}} +function Il(a,b,c){c=c&&0!==(b.subtreeFlags&8772);for(b=b.child;null!==b;){var d=b.alternate,e=a,f=b,g=f.flags;switch(f.tag){case 0:case 11:case 15:Il(e,f,c);Cl(f,4);break;case 1:Il(e,f,c);e=f.stateNode;if("function"===typeof e.componentDidMount)try{e.componentDidMount()}catch(k){W(f,f.return,k)}d=f.updateQueue;if(null!==d){var h=d.shared.hiddenCallbacks;if(null!==h)for(d.shared.hiddenCallbacks=null,d=0;d<h.length;d++)ai(h[d],e)}c&&g&64&&Dl(f);vl(f,f.return);break;case 26:case 27:case 5:Il(e,f,c); +c&&null===d&&g&4&&El(f);vl(f,f.return);break;case 12:Il(e,f,c);break;case 13:Il(e,f,c);c&&g&4&&Hl(e,f);break;case 22:null===f.memoizedState&&Il(e,f,c);vl(f,f.return);break;default:Il(e,f,c)}b=b.sibling}}function Zl(a,b){try{Bl(b,a)}catch(c){W(a,a.return,c)}} +function $l(a,b){var c=null;null!==a&&null!==a.memoizedState&&null!==a.memoizedState.cachePool&&(c=a.memoizedState.cachePool.pool);a=null;null!==b.memoizedState&&null!==b.memoizedState.cachePool&&(a=b.memoizedState.cachePool.pool);a!==c&&(null!=a&&a.refCount++,null!=c&&dl(c))}function am(a,b){a=null;null!==b.alternate&&(a=b.alternate.memoizedState.cache);b=b.memoizedState.cache;b!==a&&(b.refCount++,null!=a&&dl(a))} +function bm(a,b,c,d){if(b.subtreeFlags&10256)for(b=b.child;null!==b;)cm(a,b,c,d),b=b.sibling} +function cm(a,b,c,d){var e=b.flags;switch(b.tag){case 0:case 11:case 15:bm(a,b,c,d);e&2048&&Zl(b,9);break;case 3:bm(a,b,c,d);e&2048&&(a=null,null!==b.alternate&&(a=b.alternate.memoizedState.cache),b=b.memoizedState.cache,b!==a&&(b.refCount++,null!=a&&dl(a)));break;case 23:break;case 22:var f=b.stateNode;null!==b.memoizedState?f._visibility&4?bm(a,b,c,d):b.mode&1?dm(a,b):(f._visibility|=4,bm(a,b,c,d)):f._visibility&4?bm(a,b,c,d):(f._visibility|=4,em(a,b,c,d,0!==(b.subtreeFlags&10256)));e&2048&&$l(b.alternate, +b);break;case 24:bm(a,b,c,d);e&2048&&am(b.alternate,b);break;default:bm(a,b,c,d)}} +function em(a,b,c,d,e){e=e&&0!==(b.subtreeFlags&10256);for(b=b.child;null!==b;){var f=a,g=b,h=c,k=d,l=g.flags;switch(g.tag){case 0:case 11:case 15:em(f,g,h,k,e);Zl(g,8);break;case 23:break;case 22:var n=g.stateNode;null!==g.memoizedState?n._visibility&4?em(f,g,h,k,e):g.mode&1?dm(f,g):(n._visibility|=4,em(f,g,h,k,e)):(n._visibility|=4,em(f,g,h,k,e));e&&l&2048&&$l(g.alternate,g);break;case 24:em(f,g,h,k,e);e&&l&2048&&am(g.alternate,g);break;default:em(f,g,h,k,e)}b=b.sibling}} +function dm(a,b){if(b.subtreeFlags&10256)for(b=b.child;null!==b;){var c=a,d=b,e=d.flags;switch(d.tag){case 22:dm(c,d);e&2048&&$l(d.alternate,d);break;case 24:dm(c,d);e&2048&&am(d.alternate,d);break;default:dm(c,d)}b=b.sibling}}function fm(a){var b=a.alternate;if(null!==b&&(a=b.child,null!==a)){b.child=null;do b=a.sibling,a.sibling=null,a=b;while(null!==a)}} +function gm(a){var b=a.deletions;if(0!==(a.flags&16)){if(null!==b)for(var c=0;c<b.length;c++){var d=b[c];V=d;hm(d,a)}fm(a)}if(a.subtreeFlags&10256)for(a=a.child;null!==a;)im(a),a=a.sibling}function im(a){switch(a.tag){case 0:case 11:case 15:gm(a);a.flags&2048&&Al(9,a,a.return);break;case 22:var b=a.stateNode;null!==a.memoizedState&&b._visibility&4&&(null===a.return||13!==a.return.tag)?(b._visibility&=-5,jm(a)):gm(a);break;default:gm(a)}} +function jm(a){var b=a.deletions;if(0!==(a.flags&16)){if(null!==b)for(var c=0;c<b.length;c++){var d=b[c];V=d;hm(d,a)}fm(a)}for(a=a.child;null!==a;){b=a;switch(b.tag){case 0:case 11:case 15:Al(8,b,b.return);jm(b);break;case 22:c=b.stateNode;c._visibility&4&&(c._visibility&=-5,jm(b));break;default:jm(b)}a=a.sibling}} +function hm(a,b){for(;null!==V;){var c=V;switch(c.tag){case 0:case 11:case 15:Al(8,c,b);break;case 23:case 22:if(null!==c.memoizedState&&null!==c.memoizedState.cachePool){var d=c.memoizedState.cachePool.pool;null!=d&&d.refCount++}break;case 24:dl(c.memoizedState.cache)}d=c.child;if(null!==d)d.return=c,V=d;else a:for(c=a;null!==V;){d=V;var e=d.sibling,f=d.return;Jl(d);if(d===c){V=null;break a}if(null!==e){e.return=f;V=e;break a}V=f}}} +var km={getCacheSignal:function(){return gj(S).controller.signal},getCacheForType:function(a){var b=gj(S),c=b.data.get(a);void 0===c&&(c=a(),b.data.set(a,c));return c}},lm=Math.ceil,mm="function"===typeof WeakMap?WeakMap:Map,nm=Ma.ReactCurrentDispatcher,om=Ma.ReactCurrentCache,pm=Ma.ReactCurrentOwner,qm=Ma.ReactCurrentBatchConfig,I=0,Q=null,Y=null,J=0,Z=0,rm=null,sm=!1,qi=0,U=0,tm=null,$h=0,um=0,vm=0,wm=null,xm=null,Xl=0,pl=Infinity,ym=null,fk=!1,gk=null,ik=null,zm=!1,Am=null,Bm=0,Cm=0,Dm=null,Qh= +0,Rh=null,Em=-1,Fm=0;function Oj(){return 0!==(I&6)?A():-1!==Em?Em:Em=A()}function Nj(a){if(0===(a.mode&1))return 2;if(0!==(I&2)&&0!==J)return J&-J;if(null!==el.transition)return 0===Fm&&(Fm=Tc()),Fm;a=B;if(0!==a)return a;a=window.event;a=void 0===a?32:Dd(a.type);return a}function uj(a,b,c,d){2===Z&&a===Q&&(Gm(a,0),Hm(a,J));Vc(a,c,d);if(0===(I&2)||a!==Q)a===Q&&(0===(I&2)&&(um|=c),4===U&&Hm(a,J)),Im(a,d),2===c&&0===I&&0===(b.mode&1)&&(pl=A()+500,ch&&gh())} +function Im(a,b){var c=a.callbackNode;Rc(a,b);var d=Pc(a,a===Q?J:0);if(0===d)null!==c&&wc(c),a.callbackNode=null,a.callbackPriority=0;else if(b=d&-d,a.callbackPriority!==b){null!=c&&wc(c);if(0!==(b&3))0===a.tag?fh(Jm.bind(null,a)):eh(Jm.bind(null,a)),Lg(function(){0===(I&6)&&gh()}),c=null;else{switch(Yc(d)){case 2:c=Ac;break;case 8:c=Bc;break;case 32:c=Cc;break;case 536870912:c=Ec;break;default:c=Cc}c=Km(c,Lm.bind(null,a))}a.callbackPriority=b;a.callbackNode=c}} +function Lm(a,b){Em=-1;Fm=0;if(0!==(I&6))throw Error(p(327));var c=a.callbackNode;if(Mm()&&a.callbackNode!==c)return null;var d=Pc(a,a===Q?J:0);if(0===d)return null;b=0!==(d&60)||0!==(d&a.expiredLanes)||b?Nm(a,d):Om(a,d);if(0!==b){if(2===b){var e=d,f=Sc(a,e);0!==f&&(d=f,b=Pm(a,e,f))}if(1===b)throw c=tm,Gm(a,0),Hm(a,d),Im(a,A()),c;if(6===b)Hm(a,d);else{e=a.current.alternate;if(0===(d&60)&&!Qm(e)){b=Nm(a,d);if(2===b){f=d;var g=Sc(a,f);0!==g&&(d=g,b=Pm(a,f,g))}if(1===b)throw c=tm,Gm(a,0),Hm(a,d),Im(a, +A()),c;}a.finishedWork=e;a.finishedLanes=d;switch(b){case 0:case 1:throw Error(p(345));case 2:Rm(a,xm,ym);break;case 3:Hm(a,d);if((d&125829120)===d&&(d=Xl+500-A(),10<d)){if(0!==Pc(a,0))break;a.timeoutHandle=Hg(Rm.bind(null,a,xm,ym),d);break}Rm(a,xm,ym);break;case 4:Hm(a,d);if((d&8388480)===d)break;b=a.eventTimes;for(e=-1;0<d;)g=31-Jc(d),f=1<<g,g=b[g],g>e&&(e=g),d&=~f;d=e;d=A()-d;d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*lm(d/1960))-d;if(10<d){a.timeoutHandle=Hg(Rm.bind(null, +a,xm,ym),d);break}Rm(a,xm,ym);break;case 5:Rm(a,xm,ym);break;default:throw Error(p(329));}}}Im(a,A());return a.callbackNode===c?2===Z&&Q===a?(a.callbackPriority=0,a.callbackNode=null):Lm.bind(null,a):null}function Pm(a,b,c){var d=wm,e=a.current.memoizedState.isDehydrated;e&&(Gm(a,c).flags|=256);c=Nm(a,c);if(2!==c){if(sm&&!e)return a.errorRecoveryDisabledLanes|=b,um|=b,4;a=xm;xm=d;null!==a&&nl(a)}return c}function nl(a){null===xm?xm=a:xm.push.apply(xm,a)} +function Qm(a){for(var b=a;;){if(b.flags&16384){var c=b.updateQueue;if(null!==c&&(c=c.stores,null!==c))for(var d=0;d<c.length;d++){var e=c[d],f=e.getSnapshot;e=e.value;try{if(!$e(f(),e))return!1}catch(g){return!1}}}c=b.child;if(b.subtreeFlags&16384&&null!==c)c.return=b,b=c;else{if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return!0;b=b.return}b.sibling.return=b.return;b=b.sibling}}return!0} +function Hm(a,b){b&=~vm;b&=~um;a.suspendedLanes|=b;a.pingedLanes&=~b;for(a=a.expirationTimes;0<b;){var c=31-Jc(b),d=1<<c;a[c]=-1;b&=~d}}function Jm(a){if(0!==(I&6))throw Error(p(327));Mm();var b=Pc(a,0);if(0===(b&3))return Im(a,A()),null;var c=Nm(a,b);if(0!==a.tag&&2===c){var d=b,e=Sc(a,d);0!==e&&(b=e,c=Pm(a,d,e))}if(1===c)throw c=tm,Gm(a,0),Hm(a,b),Im(a,A()),c;if(6===c)return Hm(a,b),Im(a,A()),null;a.finishedWork=a.current.alternate;a.finishedLanes=b;Rm(a,xm,ym);Im(a,A());return null} +function Sm(a,b){var c=I;I|=1;try{return a(b)}finally{I=c,0===I&&(pl=A()+500,ch&&gh())}}function Tm(a){null!==Am&&0===Am.tag&&0===(I&6)&&Mm();var b=I;I|=1;var c=qm.transition,d=B;try{if(qm.transition=null,B=2,a)return a()}finally{B=d,qm.transition=c,I=b,0===(I&6)&&gh()}}function Um(){if(null!==Y){if(0===Z)var a=Y.return;else Yk(),bj(),a=Y;for(;null!==a;)rl(a.alternate,a),a=a.return;Y=null}} +function Gm(a,b){a.finishedWork=null;a.finishedLanes=0;var c=a.timeoutHandle;-1!==c&&(a.timeoutHandle=-1,Ig(c));Um();Q=a;Y=a=gi(a.current,null);J=qi=b;Z=0;rm=null;sm=!1;U=0;tm=null;vm=um=$h=0;xm=wm=null;Lh();return a}function Vm(a,b){Ii.current=Yi;pm.current=null;if(b===Di){if(null===Hi)throw Error(p(459));a=Hi;Hi=null;b=a;Z=Wm()?2:3}else Z=b===lk?6:null!==b&&"object"===typeof b&&"function"===typeof b.then?4:1;rm=b;null===Y&&(U=1,tm=b)} +function Wm(){if(0!==($h&268435455)||0!==(um&268435455))return!1;if((J&8388480)===J)return null===ui;var a=ti.current;return null!==a&&(J&125829120)===J?a===ui:!1}function Xm(a){a=lg(a);fg=qg(a);gg=eg.current;eg.current=jg;a=nm.current;nm.current=Yi;return null===a?Yi:a}function Ym(){var a=om.current;om.current=km;return a}function Mk(){U=4;null===Q||0===($h&268435455)&&0===(um&268435455)||Hm(Q,J)} +function Nm(a,b){var c=I;I|=2;var d=Xm(a.containerInfo),e=Ym();if(Q!==a||J!==b)ym=null,Gm(a,b);a:do try{if(0!==Z&&null!==Y){b=Y;var f=rm;switch(Z){case 6:Um();U=6;break a;default:Z=0,rm=null,Zm(b,f)}}$m();break}catch(g){Vm(a,g)}while(1);Yk();I=c;eg.current=gg;gg=null;nm.current=d;om.current=e;if(null!==Y)throw Error(p(261));Q=null;J=0;Lh();return U}function $m(){for(;null!==Y;)an(Y)} +function Om(a,b){var c=I;I|=2;var d=Xm(a.containerInfo),e=Ym();if(Q!==a||J!==b)ym=null,pl=A()+500,Gm(a,b);a:do try{if(0!==Z&&null!==Y){b=Y;var f=rm;switch(Z){case 1:Z=0;rm=null;Zm(b,f);break;case 2:if(Ei(f)){Z=0;rm=null;bn(b);break}b=function(){Im(a,A())};f.then(b,b);break a;case 3:Z=5;break a;case 5:Ei(f)?(Z=0,rm=null,bn(b)):(Z=0,rm=null,Zm(b,f));break;case 4:Z=0;rm=null;Zm(b,f);break;case 6:Um();U=6;break a;default:throw Error(p(462));}}cn();break}catch(g){Vm(a,g)}while(1);Yk();eg.current=gg;gg= +null;nm.current=d;om.current=e;I=c;if(null!==Y)return 0;Q=null;J=0;Lh();return U}function cn(){for(;null!==Y&&!xc();)an(Y)}function an(a){var b=dn(a.alternate,a,qi);a.memoizedProps=a.pendingProps;null===b?en(a):Y=b;pm.current=null} +function bn(a){var b=a.alternate;switch(a.tag){case 2:a.tag=0;case 0:case 11:var c=a.type,d=a.pendingProps;d=a.elementType===c?d:Uj(c,d);b=yk(b,a,d,c,J);break;case 15:b=yk(b,a,a.pendingProps,a.type,J);break;default:Yk(),bj(),rl(b,a),a=Y=ol(a,qi),b=dn(b,a,qi)}a.memoizedProps=a.pendingProps;null===b?en(a):Y=b;pm.current=null} +function Zm(a,b){Yk();bj();var c=a.return;if(null===c||null===Q)U=1,tm=b,Y=null;else{try{a:{var d=Q,e=b;b=J;a.flags|=32768;if(null!==e&&"object"===typeof e&&"function"===typeof e.then){var f=e,g=a.tag;if(0===(a.mode&1)&&(0===g||11===g||15===g)){var h=a.alternate;h?(a.updateQueue=h.updateQueue,a.memoizedState=h.memoizedState,a.lanes=h.lanes):(a.updateQueue=null,a.memoizedState=null)}var k=ti.current;if(null!==k){switch(k.tag){case 13:a.mode&1&&(null===ui?Mk():null===k.alternate&&0===U&&(U=3));k.flags&= +-257;jk(k,c,a,d,b);var l=k.updateQueue;null===l?k.updateQueue=new Set([f]):l.add(f);break;case 22:if(k.mode&1){k.flags|=65536;var n=k.updateQueue;if(null===n){var q={transitions:null,markerInstances:null,wakeables:new Set([f])};k.updateQueue=q}else{var v=n.wakeables;null===v?n.wakeables=new Set([f]):v.add(f)}break}default:throw Error(p(435,k.tag));}k.mode&1&&fn(d,f,b);break a}else if(1===d.tag){fn(d,f,b);Mk();break a}else e=Error(p(426))}else if(H&&a.mode&1&&(f=ti.current,null!==f)){0===(f.flags& +65536)&&(f.flags|=256);jk(f,c,a,d,b);Hh(bk(e,a));break a}d=e=bk(e,a);4!==U&&(U=2);null===wm?wm=[d]:wm.push(d);d=c;do{switch(d.tag){case 3:var w=e;d.flags|=65536;b&=-b;d.lanes|=b;var m=ek(d,w,b);Yh(d,m);break a;case 1:g=e;var r=d.type,L=d.stateNode;if(0===(d.flags&128)&&("function"===typeof r.getDerivedStateFromError||null!==L&&"function"===typeof L.componentDidCatch&&(null===ik||!ik.has(L)))){d.flags|=65536;m=b&-b;d.lanes|=m;w=hk(d,g,m);Yh(d,w);break a}}d=d.return}while(null!==d)}}catch(x){throw Y= +c,x;}en(a)}}function en(a){var b=a;do{var c=b.alternate;a=b.return;if(0===(b.flags&32768)){if(c=ml(c,b,qi),null!==c){Y=c;return}}else{c=ql(c,b);if(null!==c){c.flags&=16383;Y=c;return}if(null!==a)a.flags|=32768,a.subtreeFlags=0,a.deletions=null;else{U=6;Y=null;return}}b=b.sibling;if(null!==b){Y=b;return}Y=b=a}while(null!==b);0===U&&(U=5)}function Rm(a,b,c){var d=B,e=qm.transition;try{qm.transition=null,B=2,gn(a,b,c,d)}finally{qm.transition=e,B=d}return null} +function gn(a,b,c,d){do Mm();while(null!==Am);if(0!==(I&6))throw Error(p(327));var e=a.finishedWork,f=a.finishedLanes;if(null===e)return null;a.finishedWork=null;a.finishedLanes=0;if(e===a.current)throw Error(p(177));a.callbackNode=null;a.callbackPriority=0;var g=e.lanes|e.childLanes;g|=Kh;Wc(a,g);a===Q&&(Y=Q=null,J=0);0===(e.subtreeFlags&10256)&&0===(e.flags&10256)||zm||(zm=!0,Cm=g,Dm=c,Km(Cc,function(){Mm();return null}));c=0!==(e.flags&15990);if(0!==(e.subtreeFlags&15990)||c){c=qm.transition;qm.transition= +null;var h=B;B=2;var k=I;I|=4;pm.current=null;zl(a,e);Vl(e,a);gf(Fg);xd=!!Eg;Fg=Eg=null;a.current=e;Fl(a,e.alternate,e);yc();I=k;B=h;qm.transition=c}else a.current=e;zm?(zm=!1,Am=a,Bm=f):hn(a,g);g=a.pendingLanes;0===g&&(ik=null);Hc(e.stateNode,d);Im(a,A());if(null!==b)for(d=a.onRecoverableError,e=0;e<b.length;e++)f=b[e],g={digest:f.digest,componentStack:f.stack},d(f.value,g);if(fk)throw fk=!1,a=gk,gk=null,a;0!==(Bm&3)&&0!==a.tag&&Mm();g=a.pendingLanes;0!==(g&3)?a===Rh?Qh++:(Qh=0,Rh=a):Qh=0;gh();return null} +function hn(a,b){0===(a.pooledCacheLanes&=b)&&(b=a.pooledCache,null!=b&&(a.pooledCache=null,dl(b)))} +function Mm(){if(null!==Am){var a=Am,b=Cm;Cm=0;var c=Yc(Bm),d=32>c?32:c;c=qm.transition;var e=B;try{qm.transition=null;B=d;if(null===Am)var f=!1;else{d=Dm;Dm=null;var g=Am,h=Bm;Am=null;Bm=0;if(0!==(I&6))throw Error(p(331));var k=I;I|=4;im(g.current);cm(g,g.current,h,d);I=k;gh();if(Gc&&"function"===typeof Gc.onPostCommitFiberRoot)try{Gc.onPostCommitFiberRoot(Fc,g)}catch(l){}f=!0}return f}finally{B=e,qm.transition=c,hn(a,b)}}return!1} +function jn(a,b,c){b=bk(c,b);b=ek(a,b,2);a=Wh(a,b,2);b=Oj();null!==a&&(Vc(a,2,b),Im(a,b))}function W(a,b,c){if(3===a.tag)jn(a,a,c);else for(;null!==b;){if(3===b.tag){jn(b,a,c);break}else if(1===b.tag){var d=b.stateNode;if("function"===typeof b.type.getDerivedStateFromError||"function"===typeof d.componentDidCatch&&(null===ik||!ik.has(d))){a=bk(c,a);a=hk(b,a,2);b=Wh(b,a,2);a=Oj();null!==b&&(Vc(b,2,a),Im(b,a));break}}b=b.return}} +function fn(a,b,c){var d=a.pingCache;if(null===d){d=a.pingCache=new mm;var e=new Set;d.set(b,e)}else e=d.get(b),void 0===e&&(e=new Set,d.set(b,e));e.has(c)||(sm=!0,e.add(c),a=kn.bind(null,a,b,c),b.then(a,a))}function kn(a,b,c){var d=a.pingCache;null!==d&&d.delete(b);b=Oj();a.pingedLanes|=a.suspendedLanes&c;Q===a&&(J&c)===c&&(4===U||3===U&&(J&125829120)===J&&500>A()-Xl?0===(I&2)&&Gm(a,0):vm|=c);Im(a,b)} +function ln(a,b){0===b&&(0===(a.mode&1)?b=2:(b=Nc,Nc<<=1,0===(Nc&125829120)&&(Nc=8388608)));var c=Oj();a=Oh(a,b);null!==a&&(Vc(a,b,c),Im(a,c))}function Nk(a){var b=a.memoizedState,c=0;null!==b&&(c=b.retryLane);ln(a,c)}function Tl(a,b){var c=0;switch(a.tag){case 13:var d=a.stateNode;var e=a.memoizedState;null!==e&&(c=e.retryLane);break;case 19:d=a.stateNode;break;case 22:d=a.stateNode._retryCache;break;default:throw Error(p(314));}null!==d&&d.delete(b);ln(a,c)}var dn; +dn=function(a,b,c){if(null!==a)if(a.memoizedProps!==b.pendingProps||Tg.current)jj=!0;else{if(0===(a.lanes&c)&&0===(b.flags&128))return jj=!1,Sk(a,b,c);jj=0!==(a.flags&131072)?!0:!1}else jj=!1,H&&0!==(b.flags&1048576)&&rh(b,kh,b.index);b.lanes=0;switch(b.tag){case 2:var d=b.type;Ak(a,b);a=b.pendingProps;var e=Vg(b,G.current);nk(b,c);e=Ti(null,b,d,a,e,c);var f=$i();b.flags|=1;"object"===typeof e&&null!==e&&"function"===typeof e.render&&void 0===e.$$typeof?(b.tag=1,b.memoizedState=null,b.updateQueue= +null,Wg(d)?(f=!0,$g(b)):f=!1,b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,Th(b),e.updater=Wj,b.stateNode=e,e._reactInternals=b,ak(b,d,a,c),b=Bk(null,b,d,!0,f,c)):(b.tag=0,H&&f&&sh(b),R(null,b,e,c),b=b.child);return b;case 16:d=b.elementType;a:{Ak(a,b);a=b.pendingProps;e=d._init;d=e(d._payload);b.type=d;e=b.tag=mn(d);a=Uj(d,a);switch(e){case 0:b=sk(null,b,d,a,c);break a;case 1:b=zk(null,b,d,a,c);break a;case 11:b=mk(null,b,d,a,c);break a;case 14:b=pk(null,b,d,Uj(d.type,a),c);break a}throw Error(p(306, +d,""));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Uj(d,e),sk(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Uj(d,e),zk(a,b,d,e,c);case 3:a:{Ck(b);if(null===a)throw Error(p(387));e=b.pendingProps;f=b.memoizedState;d=f.element;Uh(a,b);Zh(b,e,null,c);var g=b.memoizedState;e=g.cache;Tk(b,S,e);e!==f.cache&&$k(b,S,c);e=g.element;if(f.isDehydrated)if(f={element:e,isDehydrated:!1,cache:g.cache},b.updateQueue.baseState=f,b.memoizedState=f,b.flags&256){d= +bk(Error(p(423)),b);b=Dk(a,b,e,c,d);break a}else if(e!==d){d=bk(Error(p(424)),b);b=Dk(a,b,e,c,d);break a}else for(vh=Pg(b.stateNode.containerInfo.firstChild),uh=b,H=!0,wh=null,c=mi(b,null,e,c),b.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{Gh();if(e===d){b=ok(a,b,c);break a}R(a,b,e,c)}b=b.child}return b;case 26:return cg(b),uk(a,b),b.memoizedState=vg(b.type,b.pendingProps),null;case 27:return cg(b),null===a&&H&&(d=b.stateNode=Rg(b.type,b.pendingProps,$f.current),uh=b,vh=Pg(d.firstChild)),d= +b.pendingProps.children,null!==a||H?R(a,b,d,c):b.child=li(b,null,d,c),uk(a,b),b.child;case 5:return cg(b),null===a&&Bh(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,Gg(d,e)?g=null:null!==f&&Gg(d,f)&&(b.flags|=32),uk(a,b),R(a,b,g,c),b.child;case 6:return null===a&&Bh(b),null;case 13:return Hk(a,b,c);case 4:return ag(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=li(b,null,d,c):R(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType=== +d?e:Uj(d,e),mk(a,b,d,e,c);case 7:return R(a,b,b.pendingProps,c),b.child;case 8:return R(a,b,b.pendingProps.children,c),b.child;case 12:return R(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;f=b.memoizedProps;g=e.value;Tk(b,d,g);if(null!==f)if($e(f.value,g)){if(f.children===e.children&&!Tg.current){b=ok(a,b,c);break a}}else $k(b,d,c);R(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,d=b.pendingProps.children,nk(b,c),e=gj(e),d=d(e),b.flags|=1,R(a,b, +d,c),b.child;case 14:return d=b.type,e=Uj(d,b.pendingProps),e=Uj(d.type,e),pk(a,b,d,e,c);case 15:return rk(a,b,b.type,b.pendingProps,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Uj(d,e),Ak(a,b),b.tag=1,Wg(d)?(a=!0,$g(b)):a=!1,nk(b,c),Yj(b,d,e),ak(b,d,e,c),Bk(null,b,d,!0,a,c);case 19:return Rk(a,b,c);case 22:return tk(a,b,c);case 24:return nk(b,c),d=gj(S),null===a?(e=xk(),null===e&&(e=Q,f=Pj(),e.pooledCache=f,f.refCount++,null!==f&&(e.pooledCacheLanes|=c),e=f),b.memoizedState= +{parent:d,cache:e},Th(b),Tk(b,S,e)):(0!==(a.lanes&c)&&(Uh(a,b),Zh(b,null,null,c)),e=a.memoizedState,f=b.memoizedState,e.parent!==d?(e={parent:d,cache:d},b.memoizedState=e,0===b.lanes&&(b.memoizedState=b.updateQueue.baseState=e),Tk(b,S,d)):(d=f.cache,Tk(b,S,d),d!==e.cache&&$k(b,S,c))),R(a,b,b.pendingProps.children,c),b.child}throw Error(p(156,b.tag));};function Km(a,b){return vc(a,b)} +function nn(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.refCleanup=this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.subtreeFlags=this.flags=0;this.deletions=null;this.childLanes=this.lanes=0;this.alternate=null}function yh(a,b,c,d){return new nn(a,b,c,d)}function qk(a){a=a.prototype;return!(!a||!a.isReactComponent)} +function mn(a){if("function"===typeof a)return qk(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Va)return 11;if(a===Ya)return 14}return 2} +function gi(a,b){var c=a.alternate;null===c?(c=yh(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null);c.flags=a.flags&14680064;c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext}; c.sibling=a.sibling;c.index=a.index;c.ref=a.ref;c.refCleanup=a.refCleanup;return c} -function jl(a,b){a.flags&=14680066;var c=a.alternate;null===c?(a.childLanes=0,a.lanes=b,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=c.childLanes,a.lanes=c.lanes,a.child=c.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=c.memoizedProps,a.memoizedState=c.memoizedState,a.updateQueue=c.updateQueue,a.type=c.type,b=c.dependencies,a.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext}); +function ol(a,b){a.flags&=14680066;var c=a.alternate;null===c?(a.childLanes=0,a.lanes=b,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=c.childLanes,a.lanes=c.lanes,a.child=c.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=c.memoizedProps,a.memoizedState=c.memoizedState,a.updateQueue=c.updateQueue,a.type=c.type,b=c.dependencies,a.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext}); return a} -function ei(a,b,c,d,e,f){var g=2;d=a;if("function"===typeof a)lk(a)&&(g=1);else if("string"===typeof a)g=Mg(a,c,Zf.current)?26:"html"===a||"head"===a||"body"===a?27:5;else a:switch(a){case Pa:return gi(c.children,e,f,b);case Qa:g=8;e|=8;0!==(e&1)&&(e|=16);break;case Ra:return a=uh(12,c,b,e|2),a.elementType=Ra,a.lanes=f,a;case Wa:return a=uh(13,c,b,e),a.elementType=Wa,a.lanes=f,a;case Xa:return a=uh(19,c,b,e),a.elementType=Xa,a.lanes=f,a;case ab:return Dk(c,e,f,b);case bb:case $a:case cb:return a=uh(24, -c,b,e),a.elementType=cb,a.lanes=f,a;default:if("object"===typeof a&&null!==a)switch(a.$$typeof){case Sa:g=10;break a;case Ta:g=9;break a;case Va:g=11;break a;case Ya:g=14;break a;case Za:g=16;d=null;break a}throw Error(m(130,null==a?a:typeof a,""));}b=uh(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function gi(a,b,c,d){a=uh(7,a,d,b);a.lanes=c;return a} -function Dk(a,b,c,d){a=uh(22,a,d,b);a.elementType=ab;a.lanes=c;var e={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var a=e._current;if(null===a)throw Error(m(456));if(0===(e._pendingVisibility&2)){var b=Kh(a,2);null!==b&&(e._pendingVisibility|=2,pj(b,a,2,-1))}},attach:function(){var a=e._current;if(null===a)throw Error(m(456));if(0!==(e._pendingVisibility&2)){var b=Kh(a,2);null!==b&&(e._pendingVisibility&=-3,pj(b,a,2,-1))}}}; -a.stateNode=e;return a}function di(a,b,c){a=uh(6,a,null,b);a.lanes=c;return a}function fi(a,b,c){b=uh(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b} -function kn(a,b,c,d,e){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.callbackNode=this.pendingContext=this.context=null;this.callbackPriority=0;this.eventTimes=Uc(0);this.expirationTimes=Uc(-1);this.entangledLanes=this.errorRecoveryDisabledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=Uc(0);this.hiddenUpdates=Uc(null);this.identifierPrefix= -d;this.onRecoverableError=e;this.pooledCache=null;this.pooledCacheLanes=0;this.mutableSourceEagerHydrationData=null;this.incompleteTransitions=new Map}function ln(a,b,c,d,e,f,g,h,k){a=new kn(a,b,c,h,k);1===b?(b=1,!0===f&&(b|=24)):b=0;f=uh(3,null,null,b);a.current=f;f.stateNode=a;b=Kj();b.refCount++;a.pooledCache=b;b.refCount++;f.memoizedState={element:d,isDehydrated:c,cache:b};Ph(f);return a} -function mn(a,b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Oa,key:null==d?null:""+d,children:a,containerInfo:b,implementation:c}} -function nn(a){if(!a)return Og;a=a._reactInternals;a:{if(pc(a)!==a||1!==a.tag)throw Error(m(170));var b=a;do{switch(b.tag){case 3:b=b.stateNode.context;break a;case 1:if(Sg(b.type)){b=b.stateNode.__reactInternalMemoizedMergedChildContext;break a}}b=b.return}while(null!==b);throw Error(m(171));}if(1===a.tag){var c=a.type;if(Sg(c))return Vg(a,c,b)}return b} -function on(a,b,c,d,e,f,g,h,k){a=ln(c,d,!0,a,e,f,g,h,k);a.context=nn(null);c=a.current;d=Jj();e=Ij(c);f=Rh(d,e);f.callback=void 0!==b&&null!==b?b:null;Sh(c,f,e);a.current.lanes=e;Vc(a,e,d);Em(a,d);return a}function pn(a,b,c,d){var e=b.current,f=Jj(),g=Ij(e);c=nn(c);null===b.context?b.context=c:b.pendingContext=c;b=Rh(f,g);b.payload={element:a};d=void 0===d?null:d;null!==d&&(b.callback=d);a=Sh(e,b,g);null!==a&&(pj(a,e,g,f),Th(a,e,g));return g} -function qn(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 27:case 5:return a.child.stateNode;default:return a.child.stateNode}}function rn(a,b){a=a.memoizedState;if(null!==a&&null!==a.dehydrated){var c=a.retryLane;a.retryLane=0!==c&&c<b?c:b}}function sn(a,b){rn(a,b);(a=a.alternate)&&rn(a,b)}function tn(){return null}var un=ca.Dispatcher,vn="function"===typeof reportError?reportError:function(a){console.error(a)};function wn(a){this._internalRoot=a} -xn.prototype.render=wn.prototype.render=function(a){var b=this._internalRoot;if(null===b)throw Error(m(409));pn(a,b,null,null)};xn.prototype.unmount=wn.prototype.unmount=function(){var a=this._internalRoot;if(null!==a){this._internalRoot=null;var b=a.containerInfo;Pm(function(){pn(null,a,null,null)});b[ha]=null}};function xn(a){this._internalRoot=a} -xn.prototype.unstable_scheduleHydration=function(a){if(a){var b=bd();a={blockedOn:null,target:a,priority:b};for(var c=0;c<kd.length&&0!==b&&b<kd[c].priority;c++);kd.splice(c,0,a);0===c&&pd(a)}};function yn(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType)}function zn(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||" react-mount-point-unstable "!==a.nodeValue))}function An(){} -function Bn(a,b,c,d,e){if(e){if("function"===typeof d){var f=d;d=function(){var a=qn(g);f.call(a)}}var g=on(b,d,a,0,null,!1,!1,"",An);a._reactRootContainer=g;a[ha]=g.current;Kf(8===a.nodeType?a.parentNode:a);Pm();return g}Jg(a);if("function"===typeof d){var h=d;d=function(){var a=qn(k);h.call(a)}}var k=ln(a,0,!1,null,null,!1,!1,"",An);a._reactRootContainer=k;a[ha]=k.current;Kf(8===a.nodeType?a.parentNode:a);Pm(function(){pn(b,k,c,d)});return k} -function Cn(a,b,c,d,e){var f=c._reactRootContainer;if(f){var g=f;if("function"===typeof e){var h=e;e=function(){var a=qn(g);h.call(a)}}pn(b,g,a,e)}else g=Bn(c,b,a,e,d);return qn(g)}Zc=function(a){switch(a.tag){case 3:var b=a.stateNode;if(b.current.memoizedState.isDehydrated){var c=Oc(b.pendingLanes);0!==c&&(Xc(b,c|2),Em(b,A()),0===(H&6)&&(kl=A()+500,ch()))}break;case 13:Pm(function(){var b=Kh(a,2);if(null!==b){var c=Jj();pj(b,a,2,c)}}),sn(a,2)}}; -$c=function(a){if(13===a.tag){var b=Kh(a,134217728);if(null!==b){var c=Jj();pj(b,a,134217728,c)}sn(a,134217728)}};ad=function(a){if(13===a.tag){var b=Ij(a),c=Kh(a,b);if(null!==c){var d=Jj();pj(c,a,b,d)}sn(a,b)}};bd=function(){return B};cd=function(a,b){var c=B;try{return B=a,b()}finally{B=c}}; -Vb=function(a,b,c){switch(b){case "input":xb(a,c);b=c.name;if("radio"===c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll("input[name="+JSON.stringify(""+b)+'][type="radio"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=ta(d);if(!e)throw Error(m(90));rb(d);xb(d,e)}}}break;case "textarea":Eb(a,c);break;case "select":b=c.value,null!=b&&Bb(a,!!c.multiple,b,!1)}};ac=Om;bc=Pm;ca.Events=[ra,sa,ta,Zb,$b,Om]; -var Dn={findFiberByHostInstance:pa,bundleType:0,version:"18.3.0-next-4fcc9184a-20230217",rendererPackageName:"react-dom"}; -var En={bundleType:Dn.bundleType,version:Dn.version,rendererPackageName:Dn.rendererPackageName,rendererConfig:Dn.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ma.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){a=tc(a);return null===a?null:a.stateNode},findFiberByHostInstance:Dn.findFiberByHostInstance|| -tn,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.0-next-4fcc9184a-20230217"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var Fn=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fn.isDisabled&&Fn.supportsFiber)try{Fc=Fn.inject(En),Gc=Fn}catch(a){}}exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ca; -exports.createPortal=function(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!yn(b))throw Error(m(200));return mn(a,b,null,c)};exports.createRoot=function(a,b){if(!yn(a))throw Error(m(299));var c=!1,d="",e=vn;null!==b&&void 0!==b&&(!0===b.unstable_strictMode&&(c=!0),void 0!==b.identifierPrefix&&(d=b.identifierPrefix),void 0!==b.onRecoverableError&&(e=b.onRecoverableError));b=ln(a,1,!1,null,null,c,!1,d,e);a[ha]=b.current;un.current=kg;Kf(8===a.nodeType?a.parentNode:a);return new wn(b)}; -exports.findDOMNode=function(a){if(null==a)return null;if(1===a.nodeType)return a;var b=a._reactInternals;if(void 0===b){if("function"===typeof a.render)throw Error(m(188));a=Object.keys(a).join(",");throw Error(m(268,a));}a=tc(b);a=null===a?null:a.stateNode;return a};exports.flushSync=function(a){return Pm(a)};exports.hydrate=function(a,b,c){if(!zn(b))throw Error(m(200));return Cn(null,a,b,!0,c)}; -exports.hydrateRoot=function(a,b,c){if(!yn(a))throw Error(m(405));var d=null!=c&&c.hydratedSources||null,e=!1,f="",g=vn;null!==c&&void 0!==c&&(!0===c.unstable_strictMode&&(e=!0),void 0!==c.identifierPrefix&&(f=c.identifierPrefix),void 0!==c.onRecoverableError&&(g=c.onRecoverableError));b=on(b,null,a,1,null!=c?c:null,e,!1,f,g);a[ha]=b.current;un.current=kg;Kf(a);if(d)for(a=0;a<d.length;a++)c=d[a],e=c._getVersion,e=e(c._source),null==b.mutableSourceEagerHydrationData?b.mutableSourceEagerHydrationData= -[c,e]:b.mutableSourceEagerHydrationData.push(c,e);return new xn(b)};exports.preinit=function(){var a=ca.Dispatcher.current;a&&a.preinit.apply(this,arguments)};exports.preload=function(){var a=ca.Dispatcher.current;a&&a.preload.apply(this,arguments)};exports.render=function(a,b,c){if(!zn(b))throw Error(m(200));return Cn(null,a,b,!1,c)}; -exports.unmountComponentAtNode=function(a){if(!zn(a))throw Error(m(40));return a._reactRootContainer?(Pm(function(){Cn(null,null,a,!1,function(){a._reactRootContainer=null;a[ha]=null})}),!0):!1};exports.unstable_batchedUpdates=Om;exports.unstable_renderSubtreeIntoContainer=function(a,b,c,d){if(!zn(c))throw Error(m(200));if(null==a||void 0===a._reactInternals)throw Error(m(38));return Cn(a,b,c,!1,d)};exports.version="18.3.0-next-4fcc9184a-20230217"; +function ii(a,b,c,d,e,f){var g=2;d=a;if("function"===typeof a)qk(a)&&(g=1);else if("string"===typeof a)g=Qg(a,c,Yf.current)?26:"html"===a||"head"===a||"body"===a?27:5;else a:switch(a){case Pa:return ki(c.children,e,f,b);case Qa:g=8;e|=8;0!==(e&1)&&(e|=16);break;case Ra:return a=yh(12,c,b,e|2),a.elementType=Ra,a.lanes=f,a;case Wa:return a=yh(13,c,b,e),a.elementType=Wa,a.lanes=f,a;case Xa:return a=yh(19,c,b,e),a.elementType=Xa,a.lanes=f,a;case ab:return Ik(c,e,f,b);case bb:case $a:case cb:return a=yh(24, +c,b,e),a.elementType=cb,a.lanes=f,a;default:if("object"===typeof a&&null!==a)switch(a.$$typeof){case Sa:g=10;break a;case Ta:g=9;break a;case Va:g=11;break a;case Ya:g=14;break a;case Za:g=16;d=null;break a}throw Error(p(130,null==a?a:typeof a,""));}b=yh(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function ki(a,b,c,d){a=yh(7,a,d,b);a.lanes=c;return a} +function Ik(a,b,c,d){a=yh(22,a,d,b);a.elementType=ab;a.lanes=c;var e={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var a=e._current;if(null===a)throw Error(p(456));if(0===(e._pendingVisibility&2)){var b=Oh(a,2);null!==b&&(e._pendingVisibility|=2,uj(b,a,2,-1))}},attach:function(){var a=e._current;if(null===a)throw Error(p(456));if(0!==(e._pendingVisibility&2)){var b=Oh(a,2);null!==b&&(e._pendingVisibility&=-3,uj(b,a,2,-1))}}}; +a.stateNode=e;return a}function hi(a,b,c){a=yh(6,a,null,b);a.lanes=c;return a}function ji(a,b,c){b=yh(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b} +function on(a,b,c,d,e){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.callbackNode=this.pendingContext=this.context=null;this.callbackPriority=0;this.eventTimes=Uc(0);this.expirationTimes=Uc(-1);this.entangledLanes=this.errorRecoveryDisabledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=Uc(0);this.hiddenUpdates=Uc(null);this.identifierPrefix= +d;this.onRecoverableError=e;this.pooledCache=null;this.pooledCacheLanes=0;this.mutableSourceEagerHydrationData=null;this.incompleteTransitions=new Map}function pn(a,b,c,d,e,f,g,h,k){a=new on(a,b,c,h,k);1===b?(b=1,!0===f&&(b|=24)):b=0;f=yh(3,null,null,b);a.current=f;f.stateNode=a;b=Pj();b.refCount++;a.pooledCache=b;b.refCount++;f.memoizedState={element:d,isDehydrated:c,cache:b};Th(f);return a} +function qn(a,b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Oa,key:null==d?null:""+d,children:a,containerInfo:b,implementation:c}} +function rn(a){if(!a)return Sg;a=a._reactInternals;a:{if(pc(a)!==a||1!==a.tag)throw Error(p(170));var b=a;do{switch(b.tag){case 3:b=b.stateNode.context;break a;case 1:if(Wg(b.type)){b=b.stateNode.__reactInternalMemoizedMergedChildContext;break a}}b=b.return}while(null!==b);throw Error(p(171));}if(1===a.tag){var c=a.type;if(Wg(c))return Zg(a,c,b)}return b} +function sn(a,b,c,d,e,f,g,h,k){a=pn(c,d,!0,a,e,f,g,h,k);a.context=rn(null);c=a.current;d=Oj();e=Nj(c);f=Vh(d,e);f.callback=void 0!==b&&null!==b?b:null;Wh(c,f,e);a.current.lanes=e;Vc(a,e,d);Im(a,d);return a}function tn(a,b,c,d){var e=b.current,f=Oj(),g=Nj(e);c=rn(c);null===b.context?b.context=c:b.pendingContext=c;b=Vh(f,g);b.payload={element:a};d=void 0===d?null:d;null!==d&&(b.callback=d);a=Wh(e,b,g);null!==a&&(uj(a,e,g,f),Xh(a,e,g));return g} +function un(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 27:case 5:return a.child.stateNode;default:return a.child.stateNode}}function vn(a,b){a=a.memoizedState;if(null!==a&&null!==a.dehydrated){var c=a.retryLane;a.retryLane=0!==c&&c<b?c:b}}function wn(a,b){vn(a,b);(a=a.alternate)&&vn(a,b)}function xn(){return null}var yn=ca.Dispatcher,zn="function"===typeof reportError?reportError:function(a){console.error(a)};function An(a){this._internalRoot=a} +Bn.prototype.render=An.prototype.render=function(a){var b=this._internalRoot;if(null===b)throw Error(p(409));tn(a,b,null,null)};Bn.prototype.unmount=An.prototype.unmount=function(){var a=this._internalRoot;if(null!==a){this._internalRoot=null;var b=a.containerInfo;Tm(function(){tn(null,a,null,null)});b[ha]=null}};function Bn(a){this._internalRoot=a} +Bn.prototype.unstable_scheduleHydration=function(a){if(a){var b=bd();a={blockedOn:null,target:a,priority:b};for(var c=0;c<kd.length&&0!==b&&b<kd[c].priority;c++);kd.splice(c,0,a);0===c&&pd(a)}};function Cn(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType)}function Dn(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||" react-mount-point-unstable "!==a.nodeValue))}function En(){} +function Fn(a,b,c,d,e){if(e){if("function"===typeof d){var f=d;d=function(){var a=un(g);f.call(a)}}var g=sn(b,d,a,0,null,!1,!1,"",En);a._reactRootContainer=g;a[ha]=g.current;Kf(8===a.nodeType?a.parentNode:a);Tm();return g}Ng(a);if("function"===typeof d){var h=d;d=function(){var a=un(k);h.call(a)}}var k=pn(a,0,!1,null,null,!1,!1,"",En);a._reactRootContainer=k;a[ha]=k.current;Kf(8===a.nodeType?a.parentNode:a);Tm(function(){tn(b,k,c,d)});return k} +function Gn(a,b,c,d,e){var f=c._reactRootContainer;if(f){var g=f;if("function"===typeof e){var h=e;e=function(){var a=un(g);h.call(a)}}tn(b,g,a,e)}else g=Fn(c,b,a,e,d);return un(g)}Zc=function(a){switch(a.tag){case 3:var b=a.stateNode;if(b.current.memoizedState.isDehydrated){var c=Oc(b.pendingLanes);0!==c&&(Xc(b,c|2),Im(b,A()),0===(I&6)&&(pl=A()+500,gh()))}break;case 13:Tm(function(){var b=Oh(a,2);if(null!==b){var c=Oj();uj(b,a,2,c)}}),wn(a,2)}}; +$c=function(a){if(13===a.tag){var b=Oh(a,134217728);if(null!==b){var c=Oj();uj(b,a,134217728,c)}wn(a,134217728)}};ad=function(a){if(13===a.tag){var b=Nj(a),c=Oh(a,b);if(null!==c){var d=Oj();uj(c,a,b,d)}wn(a,b)}};bd=function(){return B};cd=function(a,b){var c=B;try{return B=a,b()}finally{B=c}}; +Vb=function(a,b,c){switch(b){case "input":xb(a,c);b=c.name;if("radio"===c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll("input[name="+JSON.stringify(""+b)+'][type="radio"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=ta(d);if(!e)throw Error(p(90));rb(d);xb(d,e)}}}break;case "textarea":Eb(a,c);break;case "select":b=c.value,null!=b&&Bb(a,!!c.multiple,b,!1)}};ac=Sm;bc=Tm;ca.Events=[ra,sa,ta,Zb,$b,Sm]; +var Hn={findFiberByHostInstance:pa,bundleType:0,version:"18.3.0-next-6ddcbd4f9-20230209",rendererPackageName:"react-dom"}; +var In={bundleType:Hn.bundleType,version:Hn.version,rendererPackageName:Hn.rendererPackageName,rendererConfig:Hn.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ma.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){a=tc(a);return null===a?null:a.stateNode},findFiberByHostInstance:Hn.findFiberByHostInstance|| +xn,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.0-next-6ddcbd4f9-20230209"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var Jn=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jn.isDisabled&&Jn.supportsFiber)try{Fc=Jn.inject(In),Gc=Jn}catch(a){}}exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ca; +exports.createPortal=function(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Cn(b))throw Error(p(200));return qn(a,b,null,c)};exports.createRoot=function(a,b){if(!Cn(a))throw Error(p(299));var c=!1,d="",e=zn;null!==b&&void 0!==b&&(!0===b.unstable_strictMode&&(c=!0),void 0!==b.identifierPrefix&&(d=b.identifierPrefix),void 0!==b.onRecoverableError&&(e=b.onRecoverableError));b=pn(a,1,!1,null,null,c,!1,d,e);a[ha]=b.current;yn.current=jg;Kf(8===a.nodeType?a.parentNode:a);return new An(b)}; +exports.findDOMNode=function(a){if(null==a)return null;if(1===a.nodeType)return a;var b=a._reactInternals;if(void 0===b){if("function"===typeof a.render)throw Error(p(188));a=Object.keys(a).join(",");throw Error(p(268,a));}a=tc(b);a=null===a?null:a.stateNode;return a};exports.flushSync=function(a){return Tm(a)};exports.hydrate=function(a,b,c){if(!Dn(b))throw Error(p(200));return Gn(null,a,b,!0,c)}; +exports.hydrateRoot=function(a,b,c){if(!Cn(a))throw Error(p(405));var d=null!=c&&c.hydratedSources||null,e=!1,f="",g=zn;null!==c&&void 0!==c&&(!0===c.unstable_strictMode&&(e=!0),void 0!==c.identifierPrefix&&(f=c.identifierPrefix),void 0!==c.onRecoverableError&&(g=c.onRecoverableError));b=sn(b,null,a,1,null!=c?c:null,e,!1,f,g);a[ha]=b.current;yn.current=jg;Kf(a);if(d)for(a=0;a<d.length;a++)c=d[a],e=c._getVersion,e=e(c._source),null==b.mutableSourceEagerHydrationData?b.mutableSourceEagerHydrationData= +[c,e]:b.mutableSourceEagerHydrationData.push(c,e);return new Bn(b)};exports.preinit=function(){var a=ca.Dispatcher.current;a&&a.preinit.apply(this,arguments)};exports.preload=function(){var a=ca.Dispatcher.current;a&&a.preload.apply(this,arguments)};exports.render=function(a,b,c){if(!Dn(b))throw Error(p(200));return Gn(null,a,b,!1,c)}; +exports.unmountComponentAtNode=function(a){if(!Dn(a))throw Error(p(40));return a._reactRootContainer?(Tm(function(){Gn(null,null,a,!1,function(){a._reactRootContainer=null;a[ha]=null})}),!0):!1};exports.unstable_batchedUpdates=Sm;exports.unstable_renderSubtreeIntoContainer=function(a,b,c,d){if(!Dn(c))throw Error(p(200));if(null==a||void 0===a._reactInternals)throw Error(p(38));return Gn(a,b,c,!1,d)};exports.version="18.3.0-next-6ddcbd4f9-20230209"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom.profiling.min.js b/packages/next/src/compiled/react-dom/cjs/react-dom.profiling.min.js index b06833187e6ea..858018355738c 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom.profiling.min.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom.profiling.min.js @@ -21,22 +21,22 @@ if ( /* Modernizr 3.0.0pre (Custom Build) | MIT */ -'use strict';var aa=require("react"),ba=require("next/dist/compiled/scheduler"),ca={usingClientEntryPoint:!1,Events:null,Dispatcher:{current:null}};function m(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."} -var da=Math.random().toString(36).slice(2),ea="__reactFiber$"+da,fa="__reactProps$"+da,ha="__reactContainer$"+da,ia="__reactEvents$"+da,ja="__reactListeners$"+da,ka="__reactHandles$"+da,ma="__reactResources$"+da,na="__reactMarker$"+da;function oa(a){delete a[ea];delete a[fa];delete a[ia];delete a[ja];delete a[ka]} -function pa(a){var b=a[ea];if(b)return b;for(var c=a.parentNode;c;){if(b=c[ha]||c[ea]){c=b.alternate;if(null!==b.child||null!==c&&null!==c.child)for(a=qa(a);null!==a;){if(c=a[ea])return c;a=qa(a)}return b}a=c;c=a.parentNode}return null}function ra(a){if(a=a[ea]||a[ha]){var b=a.tag;if(5===b||6===b||13===b||26===b||27===b||3===b)return a}return null}function sa(a){var b=a.tag;if(5===b||26===b||27===b||6===b)return a.stateNode;throw Error(m(33));}function ta(a){return a[fa]||null} -function ua(a){var b=a[ma];b||(b=a[ma]={hoistableStyles:new Map,hoistableScripts:new Map});return b}var va=new Set,wa={};function xa(a,b){ya(a,b);ya(a+"Capture",b)}function ya(a,b){wa[a]=b;for(a=0;a<b.length;a++)va.add(b[a])} +'use strict';var aa=require("react"),ba=require("next/dist/compiled/scheduler"),ca={usingClientEntryPoint:!1,Events:null,Dispatcher:{current:null}};function p(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."} +var da=Math.random().toString(36).slice(2),ea="__reactFiber$"+da,fa="__reactProps$"+da,ha="__reactContainer$"+da,ia="__reactEvents$"+da,ja="__reactListeners$"+da,ka="__reactHandles$"+da,la="__reactResources$"+da,na="__reactMarker$"+da;function oa(a){delete a[ea];delete a[fa];delete a[ia];delete a[ja];delete a[ka]} +function pa(a){var b=a[ea];if(b)return b;for(var c=a.parentNode;c;){if(b=c[ha]||c[ea]){c=b.alternate;if(null!==b.child||null!==c&&null!==c.child)for(a=qa(a);null!==a;){if(c=a[ea])return c;a=qa(a)}return b}a=c;c=a.parentNode}return null}function ra(a){if(a=a[ea]||a[ha]){var b=a.tag;if(5===b||6===b||13===b||26===b||27===b||3===b)return a}return null}function sa(a){var b=a.tag;if(5===b||26===b||27===b||6===b)return a.stateNode;throw Error(p(33));}function ta(a){return a[fa]||null} +function ua(a){var b=a[la];b||(b=a[la]={styles:new Map,scripts:new Map,head:new Map,lastStructuredMeta:new Map});return b}var va=new Set,wa={};function xa(a,b){ya(a,b);ya(a+"Capture",b)}function ya(a,b){wa[a]=b;for(a=0;a<b.length;a++)va.add(b[a])} var za=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),Aa=Object.prototype.hasOwnProperty,Ba=/^[: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][: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\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Ca= {},Da={};function Ea(a){if(Aa.call(Da,a))return!0;if(Aa.call(Ca,a))return!1;if(Ba.test(a))return Da[a]=!0;Ca[a]=!0;return!1}function Fa(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}} -function Ga(a,b,c,d){if(null===b||"undefined"===typeof b||Fa(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function Ha(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var r={}; -"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){r[a]=new Ha(a,0,!1,a,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];r[b]=new Ha(b,1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){r[a]=new Ha(a,2,!1,a.toLowerCase(),null,!1,!1)}); -["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){r[a]=new Ha(a,2,!1,a,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){r[a]=new Ha(a,3,!1,a.toLowerCase(),null,!1,!1)}); -["checked","multiple","muted","selected"].forEach(function(a){r[a]=new Ha(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){r[a]=new Ha(a,4,!1,a,null,!1,!1)});["cols","rows","size","span"].forEach(function(a){r[a]=new Ha(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){r[a]=new Ha(a,5,!1,a.toLowerCase(),null,!1,!1)});var Ja=/[\-:]([a-z])/g;function Ka(a){return a[1].toUpperCase()} +function Ga(a,b,c,d){if(null===b||"undefined"===typeof b||Fa(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function Ha(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var q={}; +"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){q[a]=new Ha(a,0,!1,a,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];q[b]=new Ha(b,1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){q[a]=new Ha(a,2,!1,a.toLowerCase(),null,!1,!1)}); +["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){q[a]=new Ha(a,2,!1,a,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){q[a]=new Ha(a,3,!1,a.toLowerCase(),null,!1,!1)}); +["checked","multiple","muted","selected"].forEach(function(a){q[a]=new Ha(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){q[a]=new Ha(a,4,!1,a,null,!1,!1)});["cols","rows","size","span"].forEach(function(a){q[a]=new Ha(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){q[a]=new Ha(a,5,!1,a.toLowerCase(),null,!1,!1)});var Ja=/[\-:]([a-z])/g;function Ka(a){return a[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 transform-origin 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".split(" ").forEach(function(a){var b=a.replace(Ja, -Ka);r[b]=new Ha(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(Ja,Ka);r[b]=new Ha(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(Ja,Ka);r[b]=new Ha(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){r[a]=new Ha(a,1,!1,a.toLowerCase(),null,!1,!1)}); -r.xlinkHref=new Ha("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){r[a]=new Ha(a,1,!1,a.toLowerCase(),null,!0,!0)}); -function La(a,b,c,d){var e=r.hasOwnProperty(b)?r[b]:null;if(null!==e?0!==e.type:d||!(2<b.length)||"o"!==b[0]&&"O"!==b[0]||"n"!==b[1]&&"N"!==b[1])Ga(b,c,e,d)&&(c=null),d||null===e?Ea(b)&&(null===c?a.removeAttribute(b):a.setAttribute(b,""+c)):e.mustUseProperty?a[e.propertyName]=null===c?3===e.type?!1:"":c:(b=e.attributeName,d=e.attributeNamespace,null===c?a.removeAttribute(b):(e=e.type,c=3===e||4===e&&!0===c?"":""+c,d?a.setAttributeNS(d,b,c):a.setAttribute(b,c)))} +Ka);q[b]=new Ha(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(Ja,Ka);q[b]=new Ha(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(Ja,Ka);q[b]=new Ha(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){q[a]=new Ha(a,1,!1,a.toLowerCase(),null,!1,!1)}); +q.xlinkHref=new Ha("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){q[a]=new Ha(a,1,!1,a.toLowerCase(),null,!0,!0)}); +function La(a,b,c,d){var e=q.hasOwnProperty(b)?q[b]:null;if(null!==e?0!==e.type:d||!(2<b.length)||"o"!==b[0]&&"O"!==b[0]||"n"!==b[1]&&"N"!==b[1])Ga(b,c,e,d)&&(c=null),d||null===e?Ea(b)&&(null===c?a.removeAttribute(b):a.setAttribute(b,""+c)):e.mustUseProperty?a[e.propertyName]=null===c?3===e.type?!1:"":c:(b=e.attributeName,d=e.attributeNamespace,null===c?a.removeAttribute(b):(e=e.type,c=3===e||4===e&&!0===c?"":""+c,d?a.setAttributeNS(d,b,c):a.setAttribute(b,c)))} var Ma=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Na=Symbol.for("react.element"),Oa=Symbol.for("react.portal"),Pa=Symbol.for("react.fragment"),Qa=Symbol.for("react.strict_mode"),Ra=Symbol.for("react.profiler"),Sa=Symbol.for("react.provider"),Ta=Symbol.for("react.context"),Ua=Symbol.for("react.server_context"),Va=Symbol.for("react.forward_ref"),Wa=Symbol.for("react.suspense"),Xa=Symbol.for("react.suspense_list"),Ya=Symbol.for("react.memo"),Za=Symbol.for("react.lazy"),$a=Symbol.for("react.scope"); -Symbol.for("react.debug_trace_mode");var ab=Symbol.for("react.offscreen"),bb=Symbol.for("react.legacy_hidden"),cb=Symbol.for("react.cache");Symbol.for("react.tracing_marker");var db=Symbol.for("react.default_value"),eb=Symbol.iterator;function fb(a){if(null===a||"object"!==typeof a)return null;a=eb&&a[eb]||a["@@iterator"];return"function"===typeof a?a:null}var y=Object.assign,gb; +Symbol.for("react.debug_trace_mode");var ab=Symbol.for("react.offscreen"),bb=Symbol.for("react.legacy_hidden"),cb=Symbol.for("react.cache");Symbol.for("react.tracing_marker");var db=Symbol.for("react.default_value"),eb=Symbol.iterator;function fb(a){if(null===a||"object"!==typeof a)return null;a=eb&&a[eb]||a["@@iterator"];return"function"===typeof a?a:null}var z=Object.assign,gb; function hb(a){if(void 0===gb)try{throw Error();}catch(c){var b=c.stack.trim().match(/\n( *(at )?)/);gb=b&&b[1]||""}return"\n"+gb+a}var ib=!1; function jb(a,b){if(!a||ib)return"";ib=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(b)if(b=function(){throw Error();},Object.defineProperty(b.prototype,"props",{set:function(){throw Error();}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(b,[])}catch(l){var d=l}Reflect.construct(a,[],b)}else{try{b.call()}catch(l){d=l}a.call(b.prototype)}else{try{throw Error();}catch(l){d=l}a()}}catch(l){if(l&&d&&"string"===typeof l.stack){for(var e=l.stack.split("\n"), f=d.stack.split("\n"),g=e.length-1,h=f.length-1;1<=g&&0<=h&&e[g]!==f[h];)h--;for(;1<=g&&0<=h;g--,h--)if(e[g]!==f[h]){if(1!==g||1!==h){do if(g--,h--,0>h||e[g]!==f[h]){var k="\n"+e[g].replace(" at new "," at ");a.displayName&&k.includes("<anonymous>")&&(k=k.replace("<anonymous>",a.displayName));return k}while(1<=g&&0<=h)}break}}}finally{ib=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:"")?hb(a):""} @@ -48,28 +48,28 @@ case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13 function ob(a){var b=a.type;return(a=a.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===b||"radio"===b)} function pb(a){var b=ob(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=""+a[b];if(!a.hasOwnProperty(b)&&"undefined"!==typeof c&&"function"===typeof c.get&&"function"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=""+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=""+a},stopTracking:function(){a._valueTracker= null;delete a[b]}}}}function qb(a){a._valueTracker||(a._valueTracker=pb(a))}function rb(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d="";a&&(d=ob(a)?a.checked?"true":"false":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function sb(a){a=a||("undefined"!==typeof document?document:void 0);if("undefined"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}} -function tb(a,b){var c=b.checked;return y({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function ub(a,b){var c=null==b.defaultValue?"":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=nb(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value}}function vb(a,b){b=b.checked;null!=b&&La(a,"checked",b,!1)} +function tb(a,b){var c=b.checked;return z({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function ub(a,b){var c=null==b.defaultValue?"":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=nb(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value}}function vb(a,b){b=b.checked;null!=b&&La(a,"checked",b,!1)} function wb(a,b){vb(a,b);var c=nb(b.value),d=b.type;if(null!=c)if("number"===d){if(0===c&&""===a.value||a.value!=c)a.value=""+c}else a.value!==""+c&&(a.value=""+c);else if("submit"===d||"reset"===d){a.removeAttribute("value");return}b.hasOwnProperty("value")?xb(a,b.type,c):b.hasOwnProperty("defaultValue")&&xb(a,b.type,nb(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)} -function yb(a,b,c){if(b.hasOwnProperty("value")||b.hasOwnProperty("defaultValue")){var d=b.type;if(!("submit"!==d&&"reset"!==d||void 0!==b.value&&null!==b.value))return;b=""+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;""!==c&&(a.name="");a.defaultChecked=!!a._wrapperState.initialChecked;""!==c&&(a.name=c)} +function zb(a,b,c){if(b.hasOwnProperty("value")||b.hasOwnProperty("defaultValue")){var d=b.type;if(!("submit"!==d&&"reset"!==d||void 0!==b.value&&null!==b.value))return;b=""+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;""!==c&&(a.name="");a.defaultChecked=!!a._wrapperState.initialChecked;""!==c&&(a.name=c)} function xb(a,b,c){if("number"!==b||sb(a.ownerDocument)!==a)null==c?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+c&&(a.defaultValue=""+c)}var Ab=Array.isArray; function Bb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e<c.length;e++)b["$"+c[e]]=!0;for(c=0;c<a.length;c++)e=b.hasOwnProperty("$"+a[c].value),a[c].selected!==e&&(a[c].selected=e),e&&d&&(a[c].defaultSelected=!0)}else{c=""+nb(c);b=null;for(e=0;e<a.length;e++){if(a[e].value===c){a[e].selected=!0;d&&(a[e].defaultSelected=!0);return}null!==b||a[e].disabled||(b=a[e])}null!==b&&(b.selected=!0)}} -function Cb(a,b){if(null!=b.dangerouslySetInnerHTML)throw Error(m(91));return y({},b,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function Db(a,b){var c=b.value;if(null==c){c=b.children;b=b.defaultValue;if(null!=c){if(null!=b)throw Error(m(92));if(Ab(c)){if(1<c.length)throw Error(m(93));c=c[0]}b=c}null==b&&(b="");c=b}a._wrapperState={initialValue:nb(c)}} +function Cb(a,b){if(null!=b.dangerouslySetInnerHTML)throw Error(p(91));return z({},b,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function Db(a,b){var c=b.value;if(null==c){c=b.children;b=b.defaultValue;if(null!=c){if(null!=b)throw Error(p(92));if(Ab(c)){if(1<c.length)throw Error(p(93));c=c[0]}b=c}null==b&&(b="");c=b}a._wrapperState={initialValue:nb(c)}} function Eb(a,b){var c=nb(b.value),d=nb(b.defaultValue);null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=""+d)}function Fb(a){var b=a.textContent;b===a._wrapperState.initialValue&&""!==b&&null!==b&&(a.value=b)}function Gb(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}} function Hb(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?Gb(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a} var Ib,Jb=function(a){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if("http://www.w3.org/2000/svg"!==a.namespaceURI||"innerHTML"in a)a.innerHTML=b;else{Ib=Ib||document.createElement("div");Ib.innerHTML="<svg>"+b.valueOf().toString()+"</svg>";for(b=Ib.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}}); function Kb(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b} -var Lb={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,tabSize:!0,widows:!0,zIndex:!0, +var Lb={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0, zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Mb=["Webkit","ms","Moz","O"];Object.keys(Lb).forEach(function(a){Mb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);Lb[b]=Lb[a]})});function Nb(a,b,c){return null==b||"boolean"===typeof b||""===b?"":c||"number"!==typeof b||0===b||Lb.hasOwnProperty(a)&&Lb[a]?(""+b).trim():b+"px"} -function Ob(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--"),e=Nb(c,b[c],d);"float"===c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e}}var Pb=y({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}); -function Qb(a,b){if(b){if(Pb[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(m(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(m(60));if("object"!==typeof b.dangerouslySetInnerHTML||!("__html"in b.dangerouslySetInnerHTML))throw Error(m(61));}if(null!=b.style&&"object"!==typeof b.style)throw Error(m(62));}} -function Rb(a,b){if(-1===a.indexOf("-"))return"string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return!1;default:return!0}}var Sb=null;function Tb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var Vb=null,Wb=null,Xb=null; -function Yb(a){if(a=ra(a)){if("function"!==typeof Vb)throw Error(m(280));var b=a.stateNode;b&&(b=ta(b),Vb(a.stateNode,a.type,b))}}function Zb(a){Wb?Xb?Xb.push(a):Xb=[a]:Wb=a}function $b(){if(Wb){var a=Wb,b=Xb;Xb=Wb=null;Yb(a);if(b)for(a=0;a<b.length;a++)Yb(b[a])}}function ac(a,b){return a(b)}function bc(){}var cc=!1;function dc(a,b,c){if(cc)return a(b,c);cc=!0;try{return ac(a,b,c)}finally{if(cc=!1,null!==Wb||null!==Xb)bc(),$b()}} +function Ob(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--"),e=Nb(c,b[c],d);"float"===c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e}}var Pb=z({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}); +function Qb(a,b){if(b){if(Pb[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(p(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(p(60));if("object"!==typeof b.dangerouslySetInnerHTML||!("__html"in b.dangerouslySetInnerHTML))throw Error(p(61));}if(null!=b.style&&"object"!==typeof b.style)throw Error(p(62));}} +function Rb(a,b){if(-1===a.indexOf("-"))return"string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return!1;default:return!0}}var Tb=null;function Ub(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var Vb=null,Wb=null,Xb=null; +function Yb(a){if(a=ra(a)){if("function"!==typeof Vb)throw Error(p(280));var b=a.stateNode;b&&(b=ta(b),Vb(a.stateNode,a.type,b))}}function Zb(a){Wb?Xb?Xb.push(a):Xb=[a]:Wb=a}function $b(){if(Wb){var a=Wb,b=Xb;Xb=Wb=null;Yb(a);if(b)for(a=0;a<b.length;a++)Yb(b[a])}}function ac(a,b){return a(b)}function bc(){}var cc=!1;function dc(a,b,c){if(cc)return a(b,c);cc=!0;try{return ac(a,b,c)}finally{if(cc=!1,null!==Wb||null!==Xb)bc(),$b()}} function ec(a,b){var c=a.stateNode;if(null===c)return null;var d=ta(c);if(null===d)return null;c=d[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":case "onMouseEnter":(d=!d.disabled)||(a=a.type,d=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!d;break a;default:a=!1}if(a)return null;if(c&&"function"!== -typeof c)throw Error(m(231,b,typeof c));return c}var fc=!1;if(za)try{var gc={};Object.defineProperty(gc,"passive",{get:function(){fc=!0}});window.addEventListener("test",gc,gc);window.removeEventListener("test",gc,gc)}catch(a){fc=!1}function hc(a,b,c){var d=Array.prototype.slice.call(arguments,3);try{b.apply(c,d)}catch(e){this.onError(e)}}var ic=!1,jc=null,kc=!1,lc=null,mc={onError:function(a){ic=!0;jc=a}};function nc(a,b,c,d,e,f,g,h,k){ic=!1;jc=null;hc.apply(mc,arguments)} -function oc(a,b,c,d,e,f,g,h,k){nc.apply(this,arguments);if(ic){if(ic){var l=jc;ic=!1;jc=null}else throw Error(m(198));kc||(kc=!0,lc=l)}}function pc(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.flags&4098)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function qc(a){if(13===a.tag){var b=a.memoizedState;null===b&&(a=a.alternate,null!==a&&(b=a.memoizedState));if(null!==b)return b.dehydrated}return null}function rc(a){if(pc(a)!==a)throw Error(m(188));} -function sc(a){var b=a.alternate;if(!b){b=pc(a);if(null===b)throw Error(m(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var f=e.alternate;if(null===f){d=e.return;if(null!==d){c=d;continue}break}if(e.child===f.child){for(f=e.child;f;){if(f===c)return rc(e),a;if(f===d)return rc(e),b;f=f.sibling}throw Error(m(188));}if(c.return!==d.return)c=e,d=f;else{for(var g=!1,h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=f.child;h;){if(h=== -c){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}if(!g)throw Error(m(189));}}if(c.alternate!==d)throw Error(m(190));}if(3!==c.tag)throw Error(m(188));return c.stateNode.current===c?a:b}function tc(a){a=sc(a);return null!==a?uc(a):null}function uc(a){var b=a.tag;if(5===b||26===b||27===b||6===b)return a;for(a=a.child;null!==a;){b=uc(a);if(null!==b)return b;a=a.sibling}return null} -var vc=ba.unstable_scheduleCallback,wc=ba.unstable_cancelCallback,xc=ba.unstable_shouldYield,yc=ba.unstable_requestPaint,A=ba.unstable_now,zc=ba.unstable_getCurrentPriorityLevel,Ac=ba.unstable_ImmediatePriority,Bc=ba.unstable_UserBlockingPriority,Cc=ba.unstable_NormalPriority,Dc=ba.unstable_LowPriority,Ec=ba.unstable_IdlePriority,Fc=null,Gc=null,C=null,Hc="undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__; +typeof c)throw Error(p(231,b,typeof c));return c}var fc=!1;if(za)try{var gc={};Object.defineProperty(gc,"passive",{get:function(){fc=!0}});window.addEventListener("test",gc,gc);window.removeEventListener("test",gc,gc)}catch(a){fc=!1}function hc(a,b,c){var d=Array.prototype.slice.call(arguments,3);try{b.apply(c,d)}catch(e){this.onError(e)}}var ic=!1,jc=null,kc=!1,lc=null,mc={onError:function(a){ic=!0;jc=a}};function nc(a,b,c,d,e,f,g,h,k){ic=!1;jc=null;hc.apply(mc,arguments)} +function oc(a,b,c,d,e,f,g,h,k){nc.apply(this,arguments);if(ic){if(ic){var l=jc;ic=!1;jc=null}else throw Error(p(198));kc||(kc=!0,lc=l)}}function pc(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.flags&4098)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function qc(a){if(13===a.tag){var b=a.memoizedState;null===b&&(a=a.alternate,null!==a&&(b=a.memoizedState));if(null!==b)return b.dehydrated}return null}function rc(a){if(pc(a)!==a)throw Error(p(188));} +function sc(a){var b=a.alternate;if(!b){b=pc(a);if(null===b)throw Error(p(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var f=e.alternate;if(null===f){d=e.return;if(null!==d){c=d;continue}break}if(e.child===f.child){for(f=e.child;f;){if(f===c)return rc(e),a;if(f===d)return rc(e),b;f=f.sibling}throw Error(p(188));}if(c.return!==d.return)c=e,d=f;else{for(var g=!1,h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=f.child;h;){if(h=== +c){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}if(!g)throw Error(p(189));}}if(c.alternate!==d)throw Error(p(190));}if(3!==c.tag)throw Error(p(188));return c.stateNode.current===c?a:b}function tc(a){a=sc(a);return null!==a?uc(a):null}function uc(a){var b=a.tag;if(5===b||26===b||27===b||6===b)return a;for(a=a.child;null!==a;){b=uc(a);if(null!==b)return b;a=a.sibling}return null} +var vc=ba.unstable_scheduleCallback,wc=ba.unstable_cancelCallback,xc=ba.unstable_shouldYield,yc=ba.unstable_requestPaint,B=ba.unstable_now,zc=ba.unstable_getCurrentPriorityLevel,Ac=ba.unstable_ImmediatePriority,Bc=ba.unstable_UserBlockingPriority,Cc=ba.unstable_NormalPriority,Dc=ba.unstable_LowPriority,Ec=ba.unstable_IdlePriority,Fc=null,Gc=null,C=null,Hc="undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__; function Ic(a,b){if(Gc&&"function"===typeof Gc.onCommitFiberRoot)try{var c=128===(a.current.flags&128);switch(b){case 2:var d=Ac;break;case 8:d=Bc;break;case 32:d=Cc;break;case 536870912:d=Ec;break;default:d=Cc}Gc.onCommitFiberRoot(Fc,a,d,c)}catch(e){}}function Jc(a){C=a}function Kc(){for(var a=new Map,b=1,c=0;31>c;c++){var d=Lc(b);a.set(b,d);b*=2}return a}function Mc(){null!==C&&"function"===typeof C.markCommitStopped&&C.markCommitStopped()} function Nc(a){null!==C&&"function"===typeof C.markComponentRenderStarted&&C.markComponentRenderStarted(a)}function Oc(){null!==C&&"function"===typeof C.markComponentRenderStopped&&C.markComponentRenderStopped()}function Pc(a){null!==C&&"function"===typeof C.markComponentLayoutEffectUnmountStarted&&C.markComponentLayoutEffectUnmountStarted(a)}function Qc(){null!==C&&"function"===typeof C.markComponentLayoutEffectUnmountStopped&&C.markComponentLayoutEffectUnmountStopped()} function Rc(a){null!==C&&"function"===typeof C.markRenderStarted&&C.markRenderStarted(a)}function Sc(){null!==C&&"function"===typeof C.markRenderStopped&&C.markRenderStopped()}function Tc(a,b){null!==C&&"function"===typeof C.markStateUpdateScheduled&&C.markStateUpdateScheduled(a,b)}var Vc=Math.clz32?Math.clz32:Uc,Wc=Math.log,Xc=Math.LN2;function Uc(a){a>>>=0;return 0===a?32:31-(Wc(a)/Xc|0)|0} @@ -86,28 +86,28 @@ function Ad(a,b){switch(a){case "focusin":case "focusout":td=null;break;case "dr function Bd(a,b,c,d,e,f){if(null===a||a.nativeEvent!==f)return a={blockedOn:b,domEventName:c,eventSystemFlags:d,nativeEvent:f,targetContainers:[e]},null!==b&&(b=ra(b),null!==b&&nd(b)),a;a.eventSystemFlags|=d;b=a.targetContainers;null!==e&&-1===b.indexOf(e)&&b.push(e);return a} function Cd(a,b,c,d,e){switch(b){case "focusin":return td=Bd(td,a,b,c,d,e),!0;case "dragenter":return ud=Bd(ud,a,b,c,d,e),!0;case "mouseover":return vd=Bd(vd,a,b,c,d,e),!0;case "pointerover":var f=e.pointerId;wd.set(f,Bd(wd.get(f)||null,a,b,c,d,e));return!0;case "gotpointercapture":return f=e.pointerId,xd.set(f,Bd(xd.get(f)||null,a,b,c,d,e)),!0}return!1} function Dd(a){var b=pa(a.target);if(null!==b){var c=pc(b);if(null!==c)if(b=c.tag,13===b){if(b=qc(c),null!==b){a.blockedOn=b;qd(a.priority,function(){od(c)});return}}else if(3===b&&c.stateNode.current.memoizedState.isDehydrated){a.blockedOn=3===c.tag?c.stateNode.containerInfo:null;return}}a.blockedOn=null} -function Ed(a){if(null!==a.blockedOn)return!1;for(var b=a.targetContainers;0<b.length;){var c=Fd(a.domEventName,a.eventSystemFlags,b[0],a.nativeEvent);if(null===c){c=a.nativeEvent;var d=new c.constructor(c.type,c);Sb=d;c.target.dispatchEvent(d);Sb=null}else return b=ra(c),null!==b&&nd(b),a.blockedOn=c,!1;b.shift()}return!0}function Gd(a,b,c){Ed(a)&&c.delete(b)}function Hd(){rd=!1;null!==td&&Ed(td)&&(td=null);null!==ud&&Ed(ud)&&(ud=null);null!==vd&&Ed(vd)&&(vd=null);wd.forEach(Gd);xd.forEach(Gd)} +function Ed(a){if(null!==a.blockedOn)return!1;for(var b=a.targetContainers;0<b.length;){var c=Fd(a.domEventName,a.eventSystemFlags,b[0],a.nativeEvent);if(null===c){c=a.nativeEvent;var d=new c.constructor(c.type,c);Tb=d;c.target.dispatchEvent(d);Tb=null}else return b=ra(c),null!==b&&nd(b),a.blockedOn=c,!1;b.shift()}return!0}function Gd(a,b,c){Ed(a)&&c.delete(b)}function Hd(){rd=!1;null!==td&&Ed(td)&&(td=null);null!==ud&&Ed(ud)&&(ud=null);null!==vd&&Ed(vd)&&(vd=null);wd.forEach(Gd);xd.forEach(Gd)} function Id(a,b){a.blockedOn===b&&(a.blockedOn=null,rd||(rd=!0,ba.unstable_scheduleCallback(ba.unstable_NormalPriority,Hd)))} function Jd(a){function b(b){return Id(b,a)}if(0<sd.length){Id(sd[0],a);for(var c=1;c<sd.length;c++){var d=sd[c];d.blockedOn===a&&(d.blockedOn=null)}}null!==td&&Id(td,a);null!==ud&&Id(ud,a);null!==vd&&Id(vd,a);wd.forEach(b);xd.forEach(b);for(c=0;c<yd.length;c++)d=yd[c],d.blockedOn===a&&(d.blockedOn=null);for(;0<yd.length&&(c=yd[0],null===c.blockedOn);)Dd(c),null===c.blockedOn&&yd.shift()}var Kd=Ma.ReactCurrentBatchConfig,Ld=!0; function Md(a,b,c,d){var e=D,f=Kd.transition;Kd.transition=null;try{D=2,Nd(a,b,c,d)}finally{D=e,Kd.transition=f}}function Od(a,b,c,d){var e=D,f=Kd.transition;Kd.transition=null;try{D=8,Nd(a,b,c,d)}finally{D=e,Kd.transition=f}} function Nd(a,b,c,d){if(Ld){var e=Fd(a,b,c,d);if(null===e)Pd(a,b,d,Qd,c),Ad(a,d);else if(Cd(e,a,b,c,d))d.stopPropagation();else if(Ad(a,d),b&4&&-1<zd.indexOf(a)){for(;null!==e;){var f=ra(e);null!==f&&md(f);f=Fd(a,b,c,d);null===f&&Pd(a,b,d,Qd,c);if(f===e)break;e=f}null!==e&&d.stopPropagation()}else Pd(a,b,d,null,c)}}var Qd=null; -function Fd(a,b,c,d){Qd=null;a=Tb(d);a=pa(a);if(null!==a)if(b=pc(a),null===b)a=null;else if(c=b.tag,13===c){a=qc(b);if(null!==a)return a;a=null}else if(3===c){if(b.stateNode.current.memoizedState.isDehydrated)return 3===b.tag?b.stateNode.containerInfo:null;a=null}else b!==a&&(a=null);Qd=a;return null} +function Fd(a,b,c,d){Qd=null;a=Ub(d);a=pa(a);if(null!==a)if(b=pc(a),null===b)a=null;else if(c=b.tag,13===c){a=qc(b);if(null!==a)return a;a=null}else if(3===c){if(b.stateNode.current.memoizedState.isDehydrated)return 3===b.tag?b.stateNode.containerInfo:null;a=null}else b!==a&&(a=null);Qd=a;return null} function Rd(a){switch(a){case "cancel":case "click":case "close":case "contextmenu":case "copy":case "cut":case "auxclick":case "dblclick":case "dragend":case "dragstart":case "drop":case "focusin":case "focusout":case "input":case "invalid":case "keydown":case "keypress":case "keyup":case "mousedown":case "mouseup":case "paste":case "pause":case "play":case "pointercancel":case "pointerdown":case "pointerup":case "ratechange":case "reset":case "resize":case "seeked":case "submit":case "touchcancel":case "touchend":case "touchstart":case "volumechange":case "change":case "selectionchange":case "textInput":case "compositionstart":case "compositionend":case "compositionupdate":case "beforeblur":case "afterblur":case "beforeinput":case "blur":case "fullscreenchange":case "focus":case "hashchange":case "popstate":case "select":case "selectstart":return 2;case "drag":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "mousemove":case "mouseout":case "mouseover":case "pointermove":case "pointerout":case "pointerover":case "scroll":case "toggle":case "touchmove":case "wheel":case "mouseenter":case "mouseleave":case "pointerenter":case "pointerleave":return 8; case "message":switch(zc()){case Ac:return 2;case Bc:return 8;case Cc:case Dc:return 32;case Ec:return 536870912;default:return 32}default:return 32}}var Sd=null,Td=null,Ud=null;function Vd(){if(Ud)return Ud;var a,b=Td,c=b.length,d,e="value"in Sd?Sd.value:Sd.textContent,f=e.length;for(a=0;a<c&&b[a]===e[a];a++);var g=c-a;for(d=1;d<=g&&b[c-d]===e[f-d];d++);return Ud=e.slice(a,1<d?1-d:void 0)} function Wd(a){var b=a.keyCode;"charCode"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===a&&(a=13);return 32<=a||13===a?a:0}function Xd(){return!0}function Yd(){return!1} -function Zd(a){function b(b,d,e,f,g){this._reactName=b;this._targetInst=e;this.type=d;this.nativeEvent=f;this.target=g;this.currentTarget=null;for(var c in a)a.hasOwnProperty(c)&&(b=a[c],this[c]=b?b(f):f[c]);this.isDefaultPrevented=(null!=f.defaultPrevented?f.defaultPrevented:!1===f.returnValue)?Xd:Yd;this.isPropagationStopped=Yd;return this}y(b.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&& +function Zd(a){function b(b,d,e,f,g){this._reactName=b;this._targetInst=e;this.type=d;this.nativeEvent=f;this.target=g;this.currentTarget=null;for(var c in a)a.hasOwnProperty(c)&&(b=a[c],this[c]=b?b(f):f[c]);this.isDefaultPrevented=(null!=f.defaultPrevented?f.defaultPrevented:!1===f.returnValue)?Xd:Yd;this.isPropagationStopped=Yd;return this}z(b.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&& (a.returnValue=!1),this.isDefaultPrevented=Xd)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=Xd)},persist:function(){},isPersistent:Xd});return b} -var $d={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ae=Zd($d),be=y({},$d,{view:0,detail:0}),ce=Zd(be),de,ee,fe,he=y({},be,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ge,button:0,buttons:0,relatedTarget:function(a){return void 0===a.relatedTarget?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){if("movementX"in -a)return a.movementX;a!==fe&&(fe&&"mousemove"===a.type?(de=a.screenX-fe.screenX,ee=a.screenY-fe.screenY):ee=de=0,fe=a);return de},movementY:function(a){return"movementY"in a?a.movementY:ee}}),ie=Zd(he),je=y({},he,{dataTransfer:0}),ke=Zd(je),le=y({},be,{relatedTarget:0}),me=Zd(le),ne=y({},$d,{animationName:0,elapsedTime:0,pseudoElement:0}),oe=Zd(ne),pe=y({},$d,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),qe=Zd(pe),re=y({},$d,{data:0}),se=Zd(re),te={Esc:"Escape", +var $d={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ae=Zd($d),be=z({},$d,{view:0,detail:0}),ce=Zd(be),de,ee,fe,he=z({},be,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ge,button:0,buttons:0,relatedTarget:function(a){return void 0===a.relatedTarget?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){if("movementX"in +a)return a.movementX;a!==fe&&(fe&&"mousemove"===a.type?(de=a.screenX-fe.screenX,ee=a.screenY-fe.screenY):ee=de=0,fe=a);return de},movementY:function(a){return"movementY"in a?a.movementY:ee}}),ie=Zd(he),je=z({},he,{dataTransfer:0}),ke=Zd(je),le=z({},be,{relatedTarget:0}),me=Zd(le),ne=z({},$d,{animationName:0,elapsedTime:0,pseudoElement:0}),oe=Zd(ne),pe=z({},$d,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),qe=Zd(pe),re=z({},$d,{data:0}),se=Zd(re),te={Esc:"Escape", Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ue={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7", 119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ve={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function we(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=ve[a])?!!b[a]:!1}function ge(){return we} -var xe=y({},be,{key:function(a){if(a.key){var b=te[a.key]||a.key;if("Unidentified"!==b)return b}return"keypress"===a.type?(a=Wd(a),13===a?"Enter":String.fromCharCode(a)):"keydown"===a.type||"keyup"===a.type?ue[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ge,charCode:function(a){return"keypress"===a.type?Wd(a):0},keyCode:function(a){return"keydown"===a.type||"keyup"===a.type?a.keyCode:0},which:function(a){return"keypress"=== -a.type?Wd(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}}),ye=Zd(xe),ze=y({},he,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ae=Zd(ze),Be=y({},be,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ge}),Ce=Zd(Be),De=y({},$d,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ee=Zd(De),Fe=y({},he,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0}, +var xe=z({},be,{key:function(a){if(a.key){var b=te[a.key]||a.key;if("Unidentified"!==b)return b}return"keypress"===a.type?(a=Wd(a),13===a?"Enter":String.fromCharCode(a)):"keydown"===a.type||"keyup"===a.type?ue[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ge,charCode:function(a){return"keypress"===a.type?Wd(a):0},keyCode:function(a){return"keydown"===a.type||"keyup"===a.type?a.keyCode:0},which:function(a){return"keypress"=== +a.type?Wd(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}}),ye=Zd(xe),ze=z({},he,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ae=Zd(ze),Be=z({},be,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ge}),Ce=Zd(Be),De=z({},$d,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ee=Zd(De),Fe=z({},he,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0}, deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),Ge=Zd(Fe),He=[9,13,27,32],Ie=za&&"CompositionEvent"in window,Je=null;za&&"documentMode"in document&&(Je=document.documentMode);var Ke=za&&"TextEvent"in window&&!Je,Le=za&&(!Ie||Je&&8<Je&&11>=Je),Me=String.fromCharCode(32),Ne=!1; function Oe(a,b){switch(a){case "keyup":return-1!==He.indexOf(b.keyCode);case "keydown":return 229!==b.keyCode;case "keypress":case "mousedown":case "focusout":return!0;default:return!1}}function Pe(a){a=a.detail;return"object"===typeof a&&"data"in a?a.data:null}var Qe=!1;function Re(a,b){switch(a){case "compositionend":return Pe(b);case "keypress":if(32!==b.which)return null;Ne=!0;return Me;case "textInput":return a=b.data,a===Me&&Ne?null:a;default:return null}} function Se(a,b){if(Qe)return"compositionend"===a||!Ie&&Oe(a,b)?(a=Vd(),Ud=Td=Sd=null,Qe=!1,a):null;switch(a){case "paste":return null;case "keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1<b.char.length)return b.char;if(b.which)return String.fromCharCode(b.which)}return null;case "compositionend":return Le&&"ko"!==b.locale?null:b.data;default:return null}} var Te={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ue(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return"input"===b?!!Te[a.type]:"textarea"===b?!0:!1}function Ve(a,b,c,d){Zb(d);b=We(b,"onChange");0<b.length&&(c=new ae("onChange","change",null,c,d),a.push({event:c,listeners:b}))}var Xe=null,Ye=null;function Ze(a){$e(a,0)}function af(a){var b=sa(a);if(rb(b))return a} -function bf(a,b){if("change"===a)return b}var cf=!1;if(za){var df;if(za){var ef="oninput"in document;if(!ef){var ff=document.createElement("div");ff.setAttribute("oninput","return;");ef="function"===typeof ff.oninput}df=ef}else df=!1;cf=df&&(!document.documentMode||9<document.documentMode)}function gf(){Xe&&(Xe.detachEvent("onpropertychange",hf),Ye=Xe=null)}function hf(a){if("value"===a.propertyName&&af(Ye)){var b=[];Ve(b,Ye,a,Tb(a));dc(Ze,b)}} +function bf(a,b){if("change"===a)return b}var cf=!1;if(za){var df;if(za){var ef="oninput"in document;if(!ef){var ff=document.createElement("div");ff.setAttribute("oninput","return;");ef="function"===typeof ff.oninput}df=ef}else df=!1;cf=df&&(!document.documentMode||9<document.documentMode)}function gf(){Xe&&(Xe.detachEvent("onpropertychange",hf),Ye=Xe=null)}function hf(a){if("value"===a.propertyName&&af(Ye)){var b=[];Ve(b,Ye,a,Ub(a));dc(Ze,b)}} function jf(a,b,c){"focusin"===a?(gf(),Xe=b,Ye=c,Xe.attachEvent("onpropertychange",hf)):"focusout"===a&&gf()}function kf(a){if("selectionchange"===a||"keyup"===a||"keydown"===a)return af(Ye)}function lf(a,b){if("click"===a)return af(b)}function mf(a,b){if("input"===a||"change"===a)return af(b)}function nf(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var of="function"===typeof Object.is?Object.is:nf; function pf(a,b){if(of(a,b))return!0;if("object"!==typeof a||null===a||"object"!==typeof b||null===b)return!1;var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;for(d=0;d<c.length;d++){var e=c[d];if(!Aa.call(b,e)||!of(a[e],b[e]))return!1}return!0}function qf(a){for(;a&&a.firstChild;)a=a.firstChild;return a} function rf(a,b){var c=qf(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=qf(c)}}function sf(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?sf(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1} @@ -126,287 +126,291 @@ function $e(a,b){b=0!==(b&4);for(var c=0;c<a.length;c++){var d=a[c],e=d.event;d= function E(a,b){var c=b[ia];void 0===c&&(c=b[ia]=new Set);var d=a+"__bubble";c.has(d)||(Vf(b,a,2,!1),c.add(d))}function Wf(a,b,c){var d=0;b&&(d|=4);Vf(c,a,d,b)}var Xf="_reactListening"+Math.random().toString(36).slice(2);function Yf(a){if(!a[Xf]){a[Xf]=!0;va.forEach(function(b){"selectionchange"!==b&&(Tf.has(b)||Wf(b,!1,a),Wf(b,!0,a))});var b=9===a.nodeType?a:a.ownerDocument;null===b||b[Xf]||(b[Xf]=!0,Wf("selectionchange",!1,b))}} function Vf(a,b,c,d){switch(Rd(b)){case 2:var e=Md;break;case 8:e=Od;break;default:e=Nd}c=e.bind(null,b,c,a);e=void 0;!fc||"touchstart"!==b&&"touchmove"!==b&&"wheel"!==b||(e=!0);d?void 0!==e?a.addEventListener(b,c,{capture:!0,passive:e}):a.addEventListener(b,c,!0):void 0!==e?a.addEventListener(b,c,{passive:e}):a.addEventListener(b,c,!1)} function Pd(a,b,c,d,e){var f=d;if(0===(b&1)&&0===(b&2)&&null!==d)a:for(;;){if(null===d)return;var g=d.tag;if(3===g||4===g){var h=d.stateNode.containerInfo;if(h===e||8===h.nodeType&&h.parentNode===e)break;if(4===g)for(g=d.return;null!==g;){var k=g.tag;if(3===k||4===k)if(k=g.stateNode.containerInfo,k===e||8===k.nodeType&&k.parentNode===e)return;g=g.return}for(;null!==h;){g=pa(h);if(null===g)return;k=g.tag;if(5===k||6===k||26===k||27===k){d=f=g;continue a}h=h.parentNode}}d=d.return}dc(function(){var d= -f,e=Tb(c),g=[];a:{var h=Lf.get(a);if(void 0!==h){var k=ae,p=a;switch(a){case "keypress":if(0===Wd(c))break a;case "keydown":case "keyup":k=ye;break;case "focusin":p="focus";k=me;break;case "focusout":p="blur";k=me;break;case "beforeblur":case "afterblur":k=me;break;case "click":if(2===c.button)break a;case "auxclick":case "dblclick":case "mousedown":case "mousemove":case "mouseup":case "mouseout":case "mouseover":case "contextmenu":k=ie;break;case "drag":case "dragend":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "dragstart":case "drop":k= -ke;break;case "touchcancel":case "touchend":case "touchmove":case "touchstart":k=Ce;break;case Hf:case If:case Jf:k=oe;break;case Kf:k=Ee;break;case "scroll":k=ce;break;case "wheel":k=Ge;break;case "copy":case "cut":case "paste":k=qe;break;case "gotpointercapture":case "lostpointercapture":case "pointercancel":case "pointerdown":case "pointermove":case "pointerout":case "pointerover":case "pointerup":k=Ae}var t=0!==(b&4),B=!t&&"scroll"===a,v=t?null!==h?h+"Capture":null:h;t=[];for(var z=d,w;null!== -z;){var N=z;w=N.stateNode;N=N.tag;5!==N&&26!==N&&27!==N||null===w||null===v||(N=ec(z,v),null!=N&&t.push(Zf(z,N,w)));if(B)break;z=z.return}0<t.length&&(h=new k(h,p,null,c,e),g.push({event:h,listeners:t}))}}if(0===(b&7)){a:{h="mouseover"===a||"pointerover"===a;k="mouseout"===a||"pointerout"===a;if(h&&c!==Sb&&(p=c.relatedTarget||c.fromElement)&&(pa(p)||p[ha]))break a;if(k||h){h=e.window===e?e:(h=e.ownerDocument)?h.defaultView||h.parentWindow:window;if(k){if(p=c.relatedTarget||c.toElement,k=d,p=p?pa(p): -null,null!==p&&(B=pc(p),t=p.tag,p!==B||5!==t&&27!==t&&6!==t))p=null}else k=null,p=d;if(k!==p){t=ie;N="onMouseLeave";v="onMouseEnter";z="mouse";if("pointerout"===a||"pointerover"===a)t=Ae,N="onPointerLeave",v="onPointerEnter",z="pointer";B=null==k?h:sa(k);w=null==p?h:sa(p);h=new t(N,z+"leave",k,c,e);h.target=B;h.relatedTarget=w;N=null;pa(e)===d&&(t=new t(v,z+"enter",p,c,e),t.target=w,t.relatedTarget=B,N=t);B=N;if(k&&p)b:{t=k;v=p;z=0;for(w=t;w;w=$f(w))z++;w=0;for(N=v;N;N=$f(N))w++;for(;0<z-w;)t=$f(t), -z--;for(;0<w-z;)v=$f(v),w--;for(;z--;){if(t===v||null!==v&&t===v.alternate)break b;t=$f(t);v=$f(v)}t=null}else t=null;null!==k&&ag(g,h,k,t,!1);null!==p&&null!==B&&ag(g,B,p,t,!0)}}}a:{h=d?sa(d):window;k=h.nodeName&&h.nodeName.toLowerCase();if("select"===k||"input"===k&&"file"===h.type)var Ub=bf;else if(Ue(h))if(cf)Ub=mf;else{Ub=kf;var Ia=jf}else(k=h.nodeName)&&"input"===k.toLowerCase()&&("checkbox"===h.type||"radio"===h.type)&&(Ub=lf);if(Ub&&(Ub=Ub(a,d))){Ve(g,Ub,c,e);break a}Ia&&Ia(a,h,d);"focusout"=== -a&&(Ia=h._wrapperState)&&Ia.controlled&&"number"===h.type&&xb(h,"number",h.value)}Ia=d?sa(d):window;switch(a){case "focusin":if(Ue(Ia)||"true"===Ia.contentEditable)xf=Ia,yf=d,zf=null;break;case "focusout":zf=yf=xf=null;break;case "mousedown":Af=!0;break;case "contextmenu":case "mouseup":case "dragend":Af=!1;Bf(g,c,e);break;case "selectionchange":if(wf)break;case "keydown":case "keyup":Bf(g,c,e)}var zb;if(Ie)b:{switch(a){case "compositionstart":var la="onCompositionStart";break b;case "compositionend":la= -"onCompositionEnd";break b;case "compositionupdate":la="onCompositionUpdate";break b}la=void 0}else Qe?Oe(a,c)&&(la="onCompositionEnd"):"keydown"===a&&229===c.keyCode&&(la="onCompositionStart");la&&(Le&&"ko"!==c.locale&&(Qe||"onCompositionStart"!==la?"onCompositionEnd"===la&&Qe&&(zb=Vd()):(Sd=e,Td="value"in Sd?Sd.value:Sd.textContent,Qe=!0)),Ia=We(d,la),0<Ia.length&&(la=new se(la,a,null,c,e),g.push({event:la,listeners:Ia}),zb?la.data=zb:(zb=Pe(c),null!==zb&&(la.data=zb))));if(zb=Ke?Re(a,c):Se(a,c))d= -We(d,"onBeforeInput"),0<d.length&&(e=new se("onBeforeInput","beforeinput",null,c,e),g.push({event:e,listeners:d}),e.data=zb)}$e(g,b)})}function Zf(a,b,c){return{instance:a,listener:b,currentTarget:c}}function We(a,b){for(var c=b+"Capture",d=[];null!==a;){var e=a,f=e.stateNode;e=e.tag;5!==e&&26!==e&&27!==e||null===f||(e=ec(a,c),null!=e&&d.unshift(Zf(a,e,f)),e=ec(a,b),null!=e&&d.push(Zf(a,e,f)));a=a.return}return d} +f,e=Ub(c),g=[];a:{var h=Lf.get(a);if(void 0!==h){var k=ae,m=a;switch(a){case "keypress":if(0===Wd(c))break a;case "keydown":case "keyup":k=ye;break;case "focusin":m="focus";k=me;break;case "focusout":m="blur";k=me;break;case "beforeblur":case "afterblur":k=me;break;case "click":if(2===c.button)break a;case "auxclick":case "dblclick":case "mousedown":case "mousemove":case "mouseup":case "mouseout":case "mouseover":case "contextmenu":k=ie;break;case "drag":case "dragend":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "dragstart":case "drop":k= +ke;break;case "touchcancel":case "touchend":case "touchmove":case "touchstart":k=Ce;break;case Hf:case If:case Jf:k=oe;break;case Kf:k=Ee;break;case "scroll":k=ce;break;case "wheel":k=Ge;break;case "copy":case "cut":case "paste":k=qe;break;case "gotpointercapture":case "lostpointercapture":case "pointercancel":case "pointerdown":case "pointermove":case "pointerout":case "pointerover":case "pointerup":k=Ae}var t=0!==(b&4),A=!t&&"scroll"===a,y=t?null!==h?h+"Capture":null:h;t=[];for(var u=d,v;null!== +u;){var N=u;v=N.stateNode;N=N.tag;5!==N&&26!==N&&27!==N||null===v||null===y||(N=ec(u,y),null!=N&&t.push(Zf(u,N,v)));if(A)break;u=u.return}0<t.length&&(h=new k(h,m,null,c,e),g.push({event:h,listeners:t}))}}if(0===(b&7)){a:{h="mouseover"===a||"pointerover"===a;k="mouseout"===a||"pointerout"===a;if(h&&c!==Tb&&(m=c.relatedTarget||c.fromElement)&&(pa(m)||m[ha]))break a;if(k||h){h=e.window===e?e:(h=e.ownerDocument)?h.defaultView||h.parentWindow:window;if(k){if(m=c.relatedTarget||c.toElement,k=d,m=m?pa(m): +null,null!==m&&(A=pc(m),t=m.tag,m!==A||5!==t&&27!==t&&6!==t))m=null}else k=null,m=d;if(k!==m){t=ie;N="onMouseLeave";y="onMouseEnter";u="mouse";if("pointerout"===a||"pointerover"===a)t=Ae,N="onPointerLeave",y="onPointerEnter",u="pointer";A=null==k?h:sa(k);v=null==m?h:sa(m);h=new t(N,u+"leave",k,c,e);h.target=A;h.relatedTarget=v;N=null;pa(e)===d&&(t=new t(y,u+"enter",m,c,e),t.target=v,t.relatedTarget=A,N=t);A=N;if(k&&m)b:{t=k;y=m;u=0;for(v=t;v;v=$f(v))u++;v=0;for(N=y;N;N=$f(N))v++;for(;0<u-v;)t=$f(t), +u--;for(;0<v-u;)y=$f(y),v--;for(;u--;){if(t===y||null!==y&&t===y.alternate)break b;t=$f(t);y=$f(y)}t=null}else t=null;null!==k&&ag(g,h,k,t,!1);null!==m&&null!==A&&ag(g,A,m,t,!0)}}}a:{h=d?sa(d):window;k=h.nodeName&&h.nodeName.toLowerCase();if("select"===k||"input"===k&&"file"===h.type)var Sb=bf;else if(Ue(h))if(cf)Sb=mf;else{Sb=kf;var Ia=jf}else(k=h.nodeName)&&"input"===k.toLowerCase()&&("checkbox"===h.type||"radio"===h.type)&&(Sb=lf);if(Sb&&(Sb=Sb(a,d))){Ve(g,Sb,c,e);break a}Ia&&Ia(a,h,d);"focusout"=== +a&&(Ia=h._wrapperState)&&Ia.controlled&&"number"===h.type&&xb(h,"number",h.value)}Ia=d?sa(d):window;switch(a){case "focusin":if(Ue(Ia)||"true"===Ia.contentEditable)xf=Ia,yf=d,zf=null;break;case "focusout":zf=yf=xf=null;break;case "mousedown":Af=!0;break;case "contextmenu":case "mouseup":case "dragend":Af=!1;Bf(g,c,e);break;case "selectionchange":if(wf)break;case "keydown":case "keyup":Bf(g,c,e)}var yb;if(Ie)b:{switch(a){case "compositionstart":var ma="onCompositionStart";break b;case "compositionend":ma= +"onCompositionEnd";break b;case "compositionupdate":ma="onCompositionUpdate";break b}ma=void 0}else Qe?Oe(a,c)&&(ma="onCompositionEnd"):"keydown"===a&&229===c.keyCode&&(ma="onCompositionStart");ma&&(Le&&"ko"!==c.locale&&(Qe||"onCompositionStart"!==ma?"onCompositionEnd"===ma&&Qe&&(yb=Vd()):(Sd=e,Td="value"in Sd?Sd.value:Sd.textContent,Qe=!0)),Ia=We(d,ma),0<Ia.length&&(ma=new se(ma,a,null,c,e),g.push({event:ma,listeners:Ia}),yb?ma.data=yb:(yb=Pe(c),null!==yb&&(ma.data=yb))));if(yb=Ke?Re(a,c):Se(a,c))d= +We(d,"onBeforeInput"),0<d.length&&(e=new se("onBeforeInput","beforeinput",null,c,e),g.push({event:e,listeners:d}),e.data=yb)}$e(g,b)})}function Zf(a,b,c){return{instance:a,listener:b,currentTarget:c}}function We(a,b){for(var c=b+"Capture",d=[];null!==a;){var e=a,f=e.stateNode;e=e.tag;5!==e&&26!==e&&27!==e||null===f||(e=ec(a,c),null!=e&&d.unshift(Zf(a,e,f)),e=ec(a,b),null!=e&&d.push(Zf(a,e,f)));a=a.return}return d} function $f(a){if(null===a)return null;do a=a.return;while(a&&5!==a.tag&&27!==a.tag);return a?a:null}function ag(a,b,c,d,e){for(var f=b._reactName,g=[];null!==c&&c!==d;){var h=c,k=h.alternate,l=h.stateNode;h=h.tag;if(null!==k&&k===d)break;5!==h&&26!==h&&27!==h||null===l||(k=l,e?(l=ec(c,f),null!=l&&g.unshift(Zf(c,l,k))):e||(l=ec(c,f),null!=l&&g.push(Zf(c,l,k))));c=c.return}0!==g.length&&a.push({event:b,listeners:g})}var bg=/\r\n?/g,cg=/\u0000|\uFFFD/g; -function dg(a){return("string"===typeof a?a:""+a).replace(bg,"\n").replace(cg,"")}function eg(a,b,c){b=dg(b);if(dg(a)!==b&&c)throw Error(m(425));}function fg(){} +function dg(a){return("string"===typeof a?a:""+a).replace(bg,"\n").replace(cg,"")}function eg(a,b,c){b=dg(b);if(dg(a)!==b&&c)throw Error(p(425));}function fg(){} function gg(a,b,c,d){c=9===c.nodeType?c:c.ownerDocument;"http://www.w3.org/1999/xhtml"===d&&(d=Gb(a));"http://www.w3.org/1999/xhtml"===d?"script"===a?(b=c.createElement("div"),b.innerHTML="<script>\x3c/script>",d=b.removeChild(b.firstChild)):"string"===typeof b.is?d=c.createElement(a,{is:b.is}):(d=c.createElement(a),"select"===a&&(a=d,b.multiple?a.multiple=!0:b.size&&(a.size=b.size))):d=c.createElementNS(d,a);return d} function hg(a,b,c){var d=Rb(b,c);switch(b){case "dialog":E("cancel",a);E("close",a);var e=c;break;case "iframe":case "object":case "embed":E("load",a);e=c;break;case "video":case "audio":for(e=0;e<Sf.length;e++)E(Sf[e],a);e=c;break;case "source":E("error",a);e=c;break;case "img":case "image":case "link":E("error",a);E("load",a);e=c;break;case "details":E("toggle",a);e=c;break;case "input":ub(a,c);e=tb(a,c);E("invalid",a);break;case "option":e=c;break;case "select":a._wrapperState={wasMultiple:!!c.multiple}; -e=y({},c,{value:void 0});E("invalid",a);break;case "textarea":Db(a,c);e=Cb(a,c);E("invalid",a);break;default:e=c}Qb(b,e);var f=e,g;for(g in f)if(f.hasOwnProperty(g)){var h=f[g];"style"===g?Ob(a,h):"dangerouslySetInnerHTML"===g?(h=h?h.__html:void 0,null!=h&&Jb(a,h)):"children"===g?"string"===typeof h?"body"===b||"textarea"===b&&""===h||Kb(a,h):"number"===typeof h&&"body"!==b&&Kb(a,""+h):"suppressContentEditableWarning"!==g&&"suppressHydrationWarning"!==g&&"autoFocus"!==g&&(wa.hasOwnProperty(g)?null!= -h&&"onScroll"===g&&E("scroll",a):null!=h&&La(a,g,h,d))}switch(b){case "input":qb(a);yb(a,c,!1);break;case "textarea":qb(a);Fb(a);break;case "option":null!=c.value&&a.setAttribute("value",""+nb(c.value));break;case "select":a.multiple=!!c.multiple;b=c.value;null!=b?Bb(a,!!c.multiple,b,!1):null!=c.defaultValue&&Bb(a,!!c.multiple,c.defaultValue,!0);break;default:"function"===typeof e.onClick&&(a.onclick=fg)}} -function ig(a,b,c,d,e){"input"===c&&"radio"===e.type&&null!=e.name&&vb(a,e);Rb(c,d);d=Rb(c,e);for(var f=0;f<b.length;f+=2){var g=b[f],h=b[f+1];"style"===g?Ob(a,h):"dangerouslySetInnerHTML"===g?Jb(a,h):"children"===g?Kb(a,h):La(a,g,h,d)}switch(c){case "input":wb(a,e);break;case "textarea":Eb(a,e);break;case "select":b=a._wrapperState.wasMultiple,a._wrapperState.wasMultiple=!!e.multiple,c=e.value,null!=c?Bb(a,!!e.multiple,c,!1):b!==!!e.multiple&&(null!=e.defaultValue?Bb(a,!!e.multiple,e.defaultValue, -!0):Bb(a,!!e.multiple,e.multiple?[]:"",!1))}}var jg=[],kg=-1;function lg(a){return{current:a}}function F(a){0>kg||(a.current=jg[kg],jg[kg]=null,kg--)}function G(a,b){kg++;jg[kg]=a.current;a.current=b}var mg=lg(null),ng=lg(null),og=lg(null);function pg(a,b){G(og,b);G(ng,a);G(mg,null);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:Hb(null,"");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=Hb(b,a)}F(mg);G(mg,b)} -function qg(){F(mg);F(ng);F(og)}function rg(a){var b=mg.current;var c=Hb(b,a.type);b!==c&&(G(ng,a),G(mg,c))}function sg(a){ng.current===a&&(F(mg),F(ng))}var tg=ca.Dispatcher,ug=null,vg=null,yg={preload:wg,preinit:xg},zg=new Map;function Ag(a){return"function"===typeof a.getRootNode?a.getRootNode():a.ownerDocument}function Bg(){var a=og.current;return a?Ag(a):null}function Cg(){var a=Bg();if(a)return a.ownerDocument||a;try{return ug||window.document}catch(b){return null}} -function wg(a,b){var c=Cg();if("string"===typeof a&&a&&"object"===typeof b&&null!==b&&c){var d=b.as,e=Dg(a),f=e='link[rel="preload"][as="'+d+'"][href="'+e+'"]';switch(d){case "style":f=Eg(a);break;case "script":f=Fg(a)}zg.has(f)||(a={href:a,rel:"preload",as:d,crossOrigin:"font"===d?"":b.crossOrigin,integrity:b.integrity},zg.set(f,a),null===c.querySelector(e)&&(b=gg("link",a,c,"http://www.w3.org/1999/xhtml"),hg(b,"link",a),b[na]=!0,c.head.appendChild(b)))}} -function xg(a,b){if("string"===typeof a&&a&&"object"===typeof b&&null!==b){var c=Bg(),d=b.as;if(c)switch(d){case "style":d=ua(c).hoistableStyles;var e=Eg(a),f=b.precedence||"default",g=d.get(e);if(g)break;g=c.querySelector(Gg(e));g||(a={rel:"stylesheet",href:a,"data-precedence":f,crossOrigin:b.crossOrigin},(b=zg.get(e))&&Hg(a,b),g=gg("link",a,c,"http://www.w3.org/1999/xhtml"),g[na]=!0,hg(g,"link",a),Ig(g,f,c));g={type:"stylesheet",instance:g,count:1};d.set(e,g);break;case "script":d=ua(c).hoistableScripts, -e=Fg(a),f=d.get(e),f||(f=c.querySelector("script[async]"+e),f||(a={src:a,async:!0,crossOrigin:b.crossOrigin,integrity:b.integrity},(b=zg.get(e))&&Jg(a,b),f=gg("script",a,c,"http://www.w3.org/1999/xhtml"),f[na]=!0,hg(f,"link",a),(c.ownerDocument||c).head.appendChild(f)),f={type:"script",instance:f,count:1},d.set(e,f))}else if("style"===d||"script"===d)if(c=Cg()){e=Dg(a);f=e='link[rel="preload"][as="'+d+'"][href="'+e+'"]';switch(d){case "style":f=Eg(a);break;case "script":f=Fg(a)}zg.has(f)||(a={href:a, -rel:"preload",as:d,crossOrigin:"font"===d?"":b.crossOrigin,integrity:b.integrity},zg.set(f,a),null===c.querySelector(e)&&(b=gg("link",a,c,"http://www.w3.org/1999/xhtml"),hg(b,"link",a),b[na]=!0,c.head.appendChild(b)))}}} -function Kg(a,b,c){b=Bg();if(!b)throw Error(m(446));switch(a){case "meta":case "title":return null;case "style":return"string"===typeof c.precedence&&"string"===typeof c.href?(c=Eg(c.href),b=ua(b).hoistableStyles,a=b.get(c),a||(a={type:"style",instance:null,count:0},b.set(c,a)),a):{type:"void",instance:null,count:0};case "link":if("stylesheet"===c.rel&&"string"===typeof c.href&&"string"===typeof c.precedence){var d=Eg(c.href),e=ua(b).hoistableStyles;a=e.get(d);a||(b=b.ownerDocument||b,a={type:"stylesheet", -instance:null,count:0},e.set(d,a),zg.has(d)||(c={rel:"preload",as:"style",href:c.href,crossOrigin:c.crossOrigin,integrity:c.integrity,media:c.media,hrefLang:c.hrefLang,referrerPolicy:c.referrerPolicy},zg.set(d,c),b.querySelector(Gg(d))||null!==b.querySelector('link[rel="preload"][as="style"]['+d+"]")||(d=gg("link",c,b,"http://www.w3.org/1999/xhtml"),hg(d,"link",c),d[na]=!0,b.head.appendChild(d))));return a}return null;case "script":return"string"===typeof c.src&&!0===c.async?(c=Fg(c.src),b=ua(b).hoistableScripts, -a=b.get(c),a||(a={type:"script",instance:null,count:0},b.set(c,a)),a):{type:"void",instance:null,count:0};default:throw Error(m(444,a));}}function Eg(a){return'href="'+Dg(a)+'"'}function Gg(a){return'link[rel="stylesheet"]['+a+"]"}function Fg(a){return'[src="'+Dg(a)+'"]'} -function Lg(a,b,c){b.count++;if(null===b.instance)switch(b.type){case "style":var d=Eg(c.href);if(d=a.querySelector("style[data-"+d+"]"))return b.instance=d;var e=y({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});d=gg("style",e,a,"http://www.w3.org/1999/xhtml");d[na]=!0;hg(d,"style",e);Ig(d,c.precedence,a);return b.instance=d;case "stylesheet":e=Eg(c.href);var f=a.querySelector(Gg(e));if(f)return b.instance=f;d=y({},c,{"data-precedence":c.precedence,precedence:null}); -(e=zg.get(e))&&Hg(d,e);f=gg("link",d,a,"http://www.w3.org/1999/xhtml");f[na]=!0;var g=f;g._p=(new Promise(function(a,b){g.onload=a;g.onerror=b})).then(function(){return g._p.s="l"},function(){return g._p.s="e"});hg(f,"link",d);Ig(f,c.precedence,a);return b.instance=f;case "script":e=Fg(c.src);if(f=a.querySelector("script[async]"+e))return b.instance=f;d=c;if(e=zg.get(e))d=y({},c),Jg(d,e);f=gg("script",d,a,"http://www.w3.org/1999/xhtml");f[na]=!0;hg(f,"link",d);(a.ownerDocument||a).head.appendChild(f); -return b.instance=f;case "void":return null;default:throw Error(m(443,b.type));}return b.instance}function Ig(a,b,c){for(var d=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),e=d.length?d[d.length-1]:null,f=e,g=0;g<d.length;g++){var h=d[g];if(h.dataset.precedence===b)f=h;else if(f!==e)break}f?f.parentNode.insertBefore(a,f.nextSibling):(b=9===c.nodeType?c.head:c,b.insertBefore(a,b.firstChild))} -function Hg(a,b){null==a.crossOrigin&&(a.crossOrigin=b.crossOrigin);null==a.referrerPolicy&&(a.referrerPolicy=b.referrerPolicy);null==a.title&&(a.title=b.title)}function Jg(a,b){null==a.crossOrigin&&(a.crossOrigin=b.crossOrigin);null==a.referrerPolicy&&(a.referrerPolicy=b.referrerPolicy);null==a.integrity&&(a.referrerPolicy=b.integrity)}function Mg(a,b,c){a=a.ownerDocument||a;a.head.insertBefore(c,"title"===b?a.querySelector("head > title"):null)}var Ng=/[\n"\\]/g; -function Dg(a){return a.replace(Ng,function(a){return"\\"+a.charCodeAt(0).toString(16)})}var Og=null,Pg=null;function Qg(a,b){return"textarea"===a||"noscript"===a||"string"===typeof b.children||"number"===typeof b.children||"object"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&null!=b.dangerouslySetInnerHTML.__html} -var Rg="function"===typeof setTimeout?setTimeout:void 0,Sg="function"===typeof clearTimeout?clearTimeout:void 0,Tg="function"===typeof Promise?Promise:void 0,Vg="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof Tg?function(a){return Tg.resolve(null).then(a).catch(Ug)}:Rg;function Ug(a){setTimeout(function(){throw a;})} -function Wg(a,b){var c=b,d=0;do{var e=c.nextSibling;a.removeChild(c);if(e&&8===e.nodeType)if(c=e.data,"/$"===c){if(0===d){a.removeChild(e);Jd(b);return}d--}else"$"!==c&&"$?"!==c&&"$!"!==c||d++;c=e}while(c);Jd(b)}function Xg(a){var b=a.nodeType;if(9===b)Yg(a);else if(1===b)switch(a.nodeName){case "HEAD":case "HTML":case "BODY":Yg(a);break;default:a.textContent=""}} -function Yg(a){var b=a.firstChild;b&&10===b.nodeType&&(b=b.nextSibling);for(;b;){var c=b;b=b.nextSibling;switch(c.nodeName){case "HTML":case "HEAD":case "BODY":Yg(c);oa(c);continue;case "STYLE":continue;case "LINK":if("stylesheet"===c.rel.toLowerCase())continue}a.removeChild(c)}} -function Zg(a){for(;null!=a;a=a.nextSibling){var b=a.nodeType;if(1===b){b=a;switch(b.tagName){case "TITLE":case "META":case "HTML":case "HEAD":case "BODY":continue;case "LINK":if("stylesheet"===b.rel&&!b.hasAttribute("data-precedence"))break;continue;case "STYLE":if(b.hasAttribute("data-precedence"))continue;break;case "SCRIPT":if(b.hasAttribute("async"))continue}break}else if(3===b)break;if(8===b){b=a.data;if("$"===b||"$!"===b||"$?"===b)break;if("/$"===b)return null}}return a} +e=z({},c,{value:void 0});E("invalid",a);break;case "textarea":Db(a,c);e=Cb(a,c);E("invalid",a);break;default:e=c}Qb(b,e);var f=e,g;for(g in f)if(f.hasOwnProperty(g)){var h=f[g];"style"===g?Ob(a,h):"dangerouslySetInnerHTML"===g?(h=h?h.__html:void 0,null!=h&&Jb(a,h)):"children"===g?"string"===typeof h?"body"===b||"textarea"===b&&""===h||Kb(a,h):"number"===typeof h&&"body"!==b&&Kb(a,""+h):"suppressContentEditableWarning"!==g&&"suppressHydrationWarning"!==g&&"autoFocus"!==g&&(wa.hasOwnProperty(g)?null!= +h&&"onScroll"===g&&E("scroll",a):null!=h&&La(a,g,h,d))}switch(b){case "input":qb(a);zb(a,c,!1);break;case "textarea":qb(a);Fb(a);break;case "option":null!=c.value&&a.setAttribute("value",""+nb(c.value));break;case "select":a.multiple=!!c.multiple;b=c.value;null!=b?Bb(a,!!c.multiple,b,!1):null!=c.defaultValue&&Bb(a,!!c.multiple,c.defaultValue,!0);break;default:"function"===typeof e.onClick&&(a.onclick=fg)}}var ig=[],jg=-1;function kg(a){return{current:a}} +function F(a){0>jg||(a.current=ig[jg],ig[jg]=null,jg--)}function G(a,b){jg++;ig[jg]=a.current;a.current=b}var lg=kg(null),mg=kg(null),ng=kg(null);function og(a,b){G(ng,b);G(mg,a);G(lg,null);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:Hb(null,"");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=Hb(b,a)}F(lg);G(lg,b)}function pg(){F(lg);F(mg);F(ng)}function qg(a){var b=lg.current;var c=Hb(b,a.type);b!==c&&(G(mg,a),G(lg,c))} +function rg(a){mg.current===a&&(F(lg),F(mg))}var sg=ca.Dispatcher,tg=null,ug=null,xg={preload:vg,preinit:wg},yg=new Map;function zg(a){return"function"===typeof a.getRootNode?a.getRootNode():a.ownerDocument}function Ag(){var a=ng.current;return a?zg(a):null}function Bg(a){a.instance=void 0}function Cg(a){a=zg(a);a=ua(a);a.scripts.forEach(Bg);a.head.forEach(Bg)}function Dg(){var a=Ag();if(a)return a.ownerDocument||a;try{return tg||window.document}catch(b){return null}} +function Eg(a){return a.ownerDocument||a}function vg(a,b){var c=Dg();if("string"===typeof a&&a&&"object"===typeof b&&null!==b&&c){var d=b.as;yg.get(a)||Fg(c,a,{href:a,rel:"preload",as:d,crossOrigin:"font"===d?"":b.crossOrigin,integrity:b.integrity})}} +function wg(a,b){if("string"===typeof a&&a&&"object"===typeof b&&null!==b){var c=Ag(),d=b.as;if(c)switch(d){case "style":d=ua(c).styles;var e=b.precedence||"default",f=d.get(a);f||(f=Gg(d,c,a,e,{rel:"stylesheet",href:a,"data-precedence":e,crossOrigin:b.crossOrigin}));Hg(f);break;case "script":d=ua(c).scripts,(e=d.get(a))||(e=Ig(d,c,a,{src:a,async:!0,crossOrigin:b.crossOrigin,integrity:b.integrity})),Hg(e)}else(c=Dg())&&(yg.get(a)||Fg(c,a,{href:a,rel:"preload",as:d,crossOrigin:"font"===d?"":b.crossOrigin, +integrity:b.integrity}))}} +function Jg(a,b){var c=Ag();if(!c)throw Error(p(446));switch(a){case "base":c=Eg(c);var d=ua(c).head,e=b.target,f=b.href;f="base"+("string"===typeof f?'[href="'+H(f)+'"]':":not([href])");f+="string"===typeof e?'[target="'+H(e)+'"]':":not([target])";e=d.get(f);e||(e={type:"base",matcher:f,props:z({},b),count:0,instance:null,root:c},d.set(f,e));return e;case "meta":var g=b.charSet,h=b.content,k=b.httpEquiv,l=b.name,n=b.itemProp,r=b.property;c=Eg(c);var w=ua(c);a=w.head;w=w.lastStructuredMeta;"string"=== +typeof g?d="meta[charset]":"string"===typeof h&&("string"===typeof k?d='meta[http-equiv="'+H(k)+'"][content="'+H(h)+'"]':"string"===typeof r?(e=r,d='meta[property="'+H(r)+'"][content="'+H(h)+'"]',f=r.split(":").slice(0,-1).join(":"),(f=w.get(f))&&(d=f.matcher+d)):"string"===typeof l?d='meta[name="'+H(l)+'"][content="'+H(h)+'"]':"string"===typeof n&&(d='meta[itemprop="'+H(n)+'"][content="'+H(h)+'"]'));return d?(g=a.get(d),g||(g={type:"meta",matcher:d,property:e,parentResource:f,props:z({},b),count:0, +instance:null,root:c},a.set(d,g)),"string"===typeof g.property&&w.set(g.property,g),g):null;case "title":return d=b.children,d=Array.isArray(d)?1===d.length?d[0]:null:d,"function"!==typeof d&&"symbol"!==typeof d&&null!==d&&void 0!==d?(d=""+d,c=Eg(c),e=ua(c).head,f="title:"+d,a=e.get(f),a||(b=z({},b),b.children=d,a={type:"title",props:b,count:0,instance:null,root:c},e.set(f,a)),a):null;case "link":switch(d=b.rel,d){case "stylesheet":return e=ua(c).styles,f=b.precedence,a=b.href,"string"===typeof a&& +"string"===typeof f?(d=e.get(a),d||(d=z({},b),d["data-precedence"]=b.precedence,d.precedence=null,b=d=Gg(e,c,a,f,d),!1===b.loaded&&null===b.hint&&(c=b.href,e=b.props,e={rel:"preload",as:"style",href:e.href,crossOrigin:e.crossOrigin,integrity:e.integrity,media:e.media,hrefLang:e.hrefLang,referrerPolicy:e.referrerPolicy},b.hint=Fg(Eg(b.root),c,e))),d):null;case "preload":return d=b.href,"string"===typeof d?(e=yg.get(d),e||(b=z({},b),e=Fg(Eg(c),d,b)),e):null;default:return e=b.href,f=b.sizes,a=b.media, +"string"===typeof d&&"string"===typeof e?(d="rel:"+d+"::href:"+e+("::sizes:"+("string"===typeof f?f:""))+("::media:"+("string"===typeof a?a:"")),c=Eg(c),e=ua(c).head,f=e.get(d),f||(f={type:"link",props:z({},b),count:0,instance:null,root:c},e.set(d,f)),f):null}case "script":return d=ua(c).scripts,e=b.src,b.async&&"string"===typeof e?(f=d.get(e),f||(b=z({},b),f=Ig(d,c,e,b)),f):null;default:throw Error(p(444,a));}} +function Hg(a){switch(a.type){case "base":case "title":case "link":case "meta":a:{a.count++;var b=a.instance;if(!b){var c=a.props,d=a.root,e=a.type;switch(e){case "title":var f=d.querySelectorAll("title");for(b=0;b<f.length;b++)if(f[b].textContent===c.children){b=a.instance=f[b];b[na]=!0;a=b;break a}b=a.instance=Kg(e,c,d);a=f[0];Lg(d,b,a&&"http://www.w3.org/2000/svg"!==a.namespaceURI?a:null);break;case "meta":f=null;var g=a.matcher;b=a.property;var h=a.parentResource;if(h&&"string"===typeof b){if(g= +h.instance)for(g=f=g.nextSibling;h=g;)if(g=h.nextSibling,"META"===h.nodeName){var k=h.getAttribute("property");if("string"===typeof k){if(k===b&&h.getAttribute("content")===c.content){a.instance=h;h[na]=!0;a=h;break a}if(b.startsWith(k+":"))break}}}else if(b=d.querySelector(g)){a.instance=b;b[na]=!0;break}b=a.instance=Kg(e,c,d);Lg(d,b,f);break;case "link":f=H(c.rel);b=H(c.href);f='link[rel="'+f+'"][href="'+b+'"]';"string"===typeof c.sizes&&(b=H(c.sizes),f+='[sizes="'+b+'"]');"string"===typeof c.media&& +(b=H(c.media),f+='[media="'+b+'"]');if(f=d.querySelector(f)){b=a.instance=f;b[na]=!0;break}b=a.instance=Kg(e,c,d);Lg(d,b,null);break;case "base":(f=d.querySelector(a.matcher))?(b=a.instance=f,b[na]=!0):(b=a.instance=Kg(e,c,d),Lg(d,b,d.querySelector("base")));break;default:throw Error(p(457,e));}}a=b}return a;case "style":d=a.instance;if(!d)if(c=a.root,e=a.precedence,d=H(a.props.href),f=c.querySelector('link[rel="stylesheet"][data-precedence][href="'+d+'"]'))if(d=a.instance=f,d[na]=!0,a.preloaded= +!0,c=f._p)switch(c.s){case "l":a.loaded=!0;a.error=!1;break;case "e":a.error=!0;break;default:Mg(f,a)}else a.loaded=!0;else{d=a.instance=Kg("link",a.props,Eg(c));Mg(d,a);f=d;b=c.querySelectorAll('link[rel="stylesheet"][data-precedence]');h=g=b.length?b[b.length-1]:null;for(k=0;k<b.length;k++){var l=b[k];if(l.dataset.precedence===e)h=l;else if(h!==g)break}if(h)h.parentNode.insertBefore(f,h.nextSibling);else if(c=9===c.nodeType?c.head:c)c.insertBefore(f,c.firstChild);else throw Error(p(447));}a.count++; +return d;case "script":return c=a.instance,c||(d=a.root,c=H(a.props.src),(c=d.querySelector('script[async][src="'+c+'"]'))?(c=a.instance=c,c[na]=!0):(c=a.instance=Kg("script",a.props,Eg(d)),Lg(Eg(d),c,null))),c;case "preload":return a.instance;default:throw Error(p(443,a.type));}}function Ng(a){switch(a.type){case "link":case "title":case "meta":if(0===--a.count){var b=a.instance,c=b.parentNode;c&&c.removeChild(b);a.instance=null}break;case "style":a.count--}} +function Kg(a,b,c){c=gg(a,b,c,"http://www.w3.org/1999/xhtml");hg(c,a,b);c[na]=!0;return c} +function Gg(a,b,c,d,e){var f=H(c);f=b.querySelector('link[rel="stylesheet"][href="'+f+'"]');b={type:"style",count:0,href:c,precedence:d,props:e,hint:null,preloaded:!1,loaded:!1,error:!1,root:b,instance:null};a.set(c,b);if(f)if(a=f._p)switch(a.s){case "l":b.loaded=!0;break;case "e":b.error=!0;break;default:Mg(f,b)}else b.loaded=!0;else if(c=yg.get(c))b.hint=c,a=b.props,c=c.props,null==a.crossOrigin&&(a.crossOrigin=c.crossOrigin),null==a.referrerPolicy&&(a.referrerPolicy=c.referrerPolicy),null==a.title&& +(a.title=c.title);return b}function Ig(a,b,c,d){var e=H(c);e=b.querySelector('script[async][src="'+e+'"]');b={type:"script",src:c,props:d,root:b,instance:e||null};a.set(c,b);if(e)e[na]=!0;else if(a=yg.get(c))a=a.props,null==d.crossOrigin&&(d.crossOrigin=a.crossOrigin),null==d.referrerPolicy&&(d.referrerPolicy=a.referrerPolicy),null==d.integrity&&(d.referrerPolicy=a.integrity);return b} +function Fg(a,b,c){var d=H(b);(d=a.querySelector('link[rel="preload"][href="'+d+'"]'))?d[na]=!0:(d=Kg("link",c,a),Lg(a,d,null));return{type:"preload",href:b,ownerDocument:a,props:c,instance:d}}function Mg(a,b){var c={};c.load=Og.bind(null,a,b,c,Pg);c.error=Qg.bind(null,a,b,c,Pg);a.addEventListener("load",c.load,Pg);a.addEventListener("error",c.error,Pg)}var Pg={passive:!0};function Og(a,b,c,d){b.loaded=!0;b.error=!1;for(var e in c)a.removeEventListener(e,c[e],d)} +function Qg(a,b,c,d){b.loaded=!1;b.error=!0;for(var e in c)a.removeEventListener(e,c[e],d)}function Lg(a,b,c){if(a=c&&c.parentNode||a.head)a.insertBefore(b,c);else throw Error(p(447));}var Rg=/[\n"\\]/g;function H(a){return a.replace(Rg,function(a){return"\\"+a.charCodeAt(0).toString(16)})}var Sg=null,Tg=null; +function Ug(a,b){return"textarea"===a||"noscript"===a||"string"===typeof b.children||"number"===typeof b.children||"object"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&null!=b.dangerouslySetInnerHTML.__html} +var Vg="function"===typeof setTimeout?setTimeout:void 0,Wg="function"===typeof clearTimeout?clearTimeout:void 0,Xg="function"===typeof Promise?Promise:void 0,Zg="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof Xg?function(a){return Xg.resolve(null).then(a).catch(Yg)}:Vg;function Yg(a){setTimeout(function(){throw a;})} +function $g(a,b){var c=b,d=0;do{var e=c.nextSibling;a.removeChild(c);if(e&&8===e.nodeType)if(c=e.data,"/$"===c){if(0===d){a.removeChild(e);Jd(b);return}d--}else"$"!==c&&"$?"!==c&&"$!"!==c||d++;c=e}while(c);Jd(b)}function ah(a){var b=a.nodeType;if(9===b)Cg(a),bh(a);else if(1===b)switch(a.nodeName){case "HEAD":Cg(a);case "HTML":case "BODY":bh(a);break;default:a.textContent=""}} +function bh(a){var b=a.firstChild;b&&10===b.nodeType&&(b=b.nextSibling);for(;b;){var c=b;b=b.nextSibling;switch(c.nodeName){case "HTML":case "HEAD":case "BODY":bh(c);oa(c);continue;case "STYLE":continue;case "LINK":if("stylesheet"===c.rel.toLowerCase())continue}a.removeChild(c)}} +function ch(a){for(;null!=a;a=a.nextSibling){var b=a.nodeType;if(1===b){b=a;switch(b.tagName){case "TITLE":case "META":case "BASE":case "HTML":case "HEAD":case "BODY":continue;case "LINK":if("stylesheet"===b.rel&&!b.hasAttribute("data-precedence"))break;continue;case "STYLE":if(b.hasAttribute("data-precedence"))continue;break;case "SCRIPT":if(b.hasAttribute("async"))continue}break}else if(3===b)break;if(8===b){b=a.data;if("$"===b||"$!"===b||"$?"===b)break;if("/$"===b)return null}}return a} function qa(a){a=a.previousSibling;for(var b=0;a;){if(8===a.nodeType){var c=a.data;if("$"===c||"$!"===c||"$?"===c){if(0===b)return a;b--}else"/$"===c&&b++}a=a.previousSibling}return null} -function $g(a,b,c){switch(a){case "meta":case "title":return"http://www.w3.org/2000/svg"!==c;case "style":if("string"!==typeof b.precedence||"string"!==typeof b.href||""===b.href||"http://www.w3.org/2000/svg"===c)break;return!0;case "link":if("string"!==typeof b.rel||"string"!==typeof b.href||""===b.href||b.onLoad||b.onError||"http://www.w3.org/2000/svg"===c)break;switch(b.rel){case "stylesheet":return a=b.disabled,"string"===typeof b.precedence&&null==a;default:return!0}case "script":if(!0===b.async&& -!b.onLoad&&!b.onError&&"string"===typeof b.src&&b.src&&"http://www.w3.org/2000/svg"!==c)return!0}return!1}function ah(a,b,c){b=9===c.nodeType?c:c.ownerDocument;switch(a){case "html":a=b.documentElement;if(!a)throw Error(m(452));return a;case "head":a=b.head;if(!a)throw Error(m(453));return a;case "body":a=b.body;if(!a)throw Error(m(454));return a;default:throw Error(m(451));}}var bh={},H=lg(bh),ch=lg(!1),dh=bh; -function eh(a,b){var c=a.type.contextTypes;if(!c)return bh;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function fh(a){a=a.childContextTypes;return null!==a&&void 0!==a}function gh(){F(ch);F(H)}function hh(a,b,c){if(H.current!==bh)throw Error(m(168));G(H,b);G(ch,c)} -function ih(a,b,c){var d=a.stateNode;b=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in b))throw Error(m(108,mb(a)||"Unknown",e));return y({},c,d)}function jh(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||bh;dh=H.current;G(H,a);G(ch,ch.current);return!0} -function kh(a,b,c){var d=a.stateNode;if(!d)throw Error(m(169));c?(a=ih(a,b,dh),d.__reactInternalMemoizedMergedChildContext=a,F(ch),F(H),G(H,a)):F(ch);G(ch,c)}var lh=null,mh=!1,nh=!1;function oh(a){null===lh?lh=[a]:lh.push(a)}function ph(a){mh=!0;oh(a)}function qh(){if(!nh&&null!==lh){nh=!0;var a=0,b=D;try{var c=lh;for(D=2;a<c.length;a++){var d=c[a];do d=d(!0);while(null!==d)}lh=null;mh=!1}catch(e){throw null!==lh&&(lh=lh.slice(a+1)),vc(Ac,qh),e;}finally{D=b,nh=!1}}return null} -var rh=[],sh=0,th=null,uh=0,vh=[],wh=0,xh=null,yh=1,zh="";function Ah(a,b){rh[sh++]=uh;rh[sh++]=th;th=a;uh=b}function Bh(a,b,c){vh[wh++]=yh;vh[wh++]=zh;vh[wh++]=xh;xh=a;var d=yh;a=zh;var e=32-Vc(d)-1;d&=~(1<<e);c+=1;var f=32-Vc(b)+e;if(30<f){var g=e-e%5;f=(d&(1<<g)-1).toString(32);d>>=g;e-=g;yh=1<<32-Vc(b)+e|c<<e|d;zh=f+a}else yh=1<<f|c<<e|d,zh=a}function Ch(a){null!==a.return&&(Ah(a,1),Bh(a,1,0))} -function Dh(a){for(;a===th;)th=rh[--sh],rh[sh]=null,uh=rh[--sh],rh[sh]=null;for(;a===xh;)xh=vh[--wh],vh[wh]=null,zh=vh[--wh],vh[wh]=null,yh=vh[--wh],vh[wh]=null}var Eh=null,Fh=null,I=!1,Gh=null;function Hh(a,b){var c=Ih(5,null,null,0);c.elementType="DELETED";c.stateNode=b;c.return=a;b=a.deletions;null===b?(a.deletions=[c],a.flags|=16):b.push(c)} -function Jh(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,Eh=a,Fh=Zg(b.firstChild),!0):!1;case 6:return b=""===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,Eh=a,Fh=null,!0):!1;case 13:return b=8!==b.nodeType?null:b,null!==b?(c=null!==xh?{id:yh,overflow:zh}:null,a.memoizedState={dehydrated:b,treeContext:c,retryLane:1073741824},c=Ih(18,null,null,0),c.stateNode=b,c.return=a,a.child=c,Eh=a,Fh= -null,!0):!1;default:return!1}}function Kh(a){return 0!==(a.mode&1)&&0===(a.flags&128)} -function Lh(a){if(I){var b=a.type;var c=a.pendingProps;if("link"===b)c="stylesheet"===c.rel&&"string"!==typeof c.precedence?!0:!1;else if("script"===b){b=c.onLoad;var d=c.onError;c=!(c.async&&(b||d))}else c=!0;if(c)if(c=Fh){if(b=c,!Jh(a,c)){if(Kh(a))throw Error(m(418));c=Zg(b.nextSibling);d=Eh;c&&Jh(a,c)?Hh(d,b):(a.flags=a.flags&-4097|2,I=!1,Eh=a)}}else{if(Kh(a))throw Error(m(418));a.flags=a.flags&-4097|2;I=!1;Eh=a}else a.flags=a.flags&-4097|2,I=!1,Eh=a}} -function Mh(a){var b=a.stateNode,c=a.type,d=a.memoizedProps;b[ea]=a;b[fa]=d;var e=0!==(a.mode&1);switch(c){case "dialog":E("cancel",b);E("close",b);break;case "iframe":case "object":case "embed":E("load",b);break;case "video":case "audio":for(var f=0;f<Sf.length;f++)E(Sf[f],b);break;case "source":E("error",b);break;case "img":case "image":case "link":E("error",b);E("load",b);break;case "details":E("toggle",b);break;case "input":ub(b,d);E("invalid",b);break;case "select":b._wrapperState={wasMultiple:!!d.multiple}; -E("invalid",b);break;case "textarea":Db(b,d),E("invalid",b)}Qb(c,d);f=null;for(var g in d)if(d.hasOwnProperty(g)){var h=d[g];"children"===g?"string"===typeof h?b.textContent!==h&&(!0!==d.suppressHydrationWarning&&eg(b.textContent,h,e),f=["children",h]):"number"===typeof h&&b.textContent!==""+h&&(!0!==d.suppressHydrationWarning&&eg(b.textContent,h,e),f=["children",""+h]):wa.hasOwnProperty(g)&&null!=h&&"onScroll"===g&&E("scroll",b)}switch(c){case "input":qb(b);yb(b,d,!0);break;case "textarea":qb(b); -Fb(b);break;case "select":case "option":break;default:"function"===typeof d.onClick&&(b.onclick=fg)}b=f;a.updateQueue=b;return null!==b?!0:!1}function Nh(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag&&27!==a.tag;)a=a.return;Eh=a} -function Oh(a){if(a!==Eh)return!1;if(!I)return Nh(a),I=!0,!1;var b=!1;3===a.tag||27===a.tag||5===a.tag&&Qg(a.type,a.memoizedProps)||(b=!0);if(b&&(b=Fh)){if(Kh(a))throw Ph(),Error(m(418));for(;b;)Hh(a,b),b=Zg(b.nextSibling)}Nh(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(m(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if("/$"===c){if(0===b){Fh=Zg(a.nextSibling);break a}b--}else"$"!==c&&"$!"!==c&&"$?"!==c||b++}a=a.nextSibling}Fh=null}}else Fh= -Eh?Zg(a.stateNode.nextSibling):null;return!0}function Ph(){for(var a=Fh;a;)a=Zg(a.nextSibling)}function Qh(){Fh=Eh=null;I=!1}function Rh(a){null===Gh?Gh=[a]:Gh.push(a)}var Sh=[],Th=0,Uh=0;function Vh(){for(var a=Th,b=Uh=Th=0;b<a;){var c=Sh[b];Sh[b++]=null;var d=Sh[b];Sh[b++]=null;var e=Sh[b];Sh[b++]=null;var f=Sh[b];Sh[b++]=null;if(null!==d&&null!==e){var g=d.pending;null===g?e.next=e:(e.next=g.next,g.next=e);d.pending=e}0!==f&&Wh(c,e,f)}} -function Xh(a,b,c,d){Sh[Th++]=a;Sh[Th++]=b;Sh[Th++]=c;Sh[Th++]=d;Uh|=d;a.lanes|=d;a=a.alternate;null!==a&&(a.lanes|=d)}function Yh(a,b){Xh(a,null,null,b);return Zh(a)} -function Wh(a,b,c){a.lanes|=c;var d=a.alternate;null!==d&&(d.lanes|=c);for(var e=!1,f=a.return;null!==f;)f.childLanes|=c,d=f.alternate,null!==d&&(d.childLanes|=c),22===f.tag&&(a=f.stateNode,null===a||a._visibility&1||(e=!0)),a=f,f=f.return;e&&null!==b&&3===a.tag&&(f=a.stateNode,e=31-Vc(c),f=f.hiddenUpdates,a=f[e],null===a?f[e]=[b]:a.push(b),b.lane=c|1073741824)}function Zh(a){if(50<$h)throw $h=0,ai=null,Error(m(185));for(var b=a.return;null!==b;)a=b,b=a.return;return 3===a.tag?a.stateNode:null} -var bi=!1;function ci(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function di(a,b){a=a.updateQueue;b.updateQueue===a&&(b.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function ei(a,b){return{eventTime:a,lane:b,tag:0,payload:null,callback:null,next:null}} -function fi(a,b,c){var d=a.updateQueue;if(null===d)return null;d=d.shared;if(0!==(J&2)){var e=d.pending;null===e?b.next=b:(b.next=e.next,e.next=b);d.pending=b;b=Zh(a);Wh(a,null,c);return b}Xh(a,d,b,c);return Zh(a)}function gi(a,b,c){b=b.updateQueue;if(null!==b&&(b=b.shared,0!==(c&8388480))){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;id(a,c)}} -function hi(a,b){var c=a.updateQueue,d=a.alternate;if(null!==d&&(d=d.updateQueue,c===d)){var e=null,f=null;c=c.firstBaseUpdate;if(null!==c){do{var g={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:null,next:null};null===f?e=f=g:f=f.next=g;c=c.next}while(null!==c);null===f?e=f=b:f=f.next=b}else e=f=b;c={baseState:d.baseState,firstBaseUpdate:e,lastBaseUpdate:f,shared:d.shared,callbacks:d.callbacks};a.updateQueue=c;return}a=c.lastBaseUpdate;null===a?c.firstBaseUpdate=b:a.next= +function dh(a,b,c){switch(a){case "base":case "meta":return!0;case "title":return"http://www.w3.org/2000/svg"!==c;case "link":a=b.onError;if(b.onLoad||a)break;switch(b.rel){case "stylesheet":return a=b.precedence,c=b.disabled,"string"===typeof b.href&&"string"===typeof a&&null==c;default:return a=b.rel,"string"===typeof b.href&&"string"===typeof a}case "script":a=b.src;c=b.onLoad;var d=b.onError;return b.async&&"string"===typeof a&&!c&&!d}return!1} +function eh(a,b,c){b=9===c.nodeType?c:c.ownerDocument;switch(a){case "html":a=b.documentElement;if(!a)throw Error(p(452));return a;case "head":a=b.head;if(!a)throw Error(p(453));return a;case "body":a=b.body;if(!a)throw Error(p(454));return a;default:throw Error(p(451));}}var fh={},gh=kg(fh),hh=kg(!1),ih=fh; +function jh(a,b){var c=a.type.contextTypes;if(!c)return fh;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function kh(a){a=a.childContextTypes;return null!==a&&void 0!==a}function lh(){F(hh);F(gh)} +function mh(a,b,c){if(gh.current!==fh)throw Error(p(168));G(gh,b);G(hh,c)}function nh(a,b,c){var d=a.stateNode;b=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in b))throw Error(p(108,mb(a)||"Unknown",e));return z({},c,d)}function oh(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||fh;ih=gh.current;G(gh,a);G(hh,hh.current);return!0} +function ph(a,b,c){var d=a.stateNode;if(!d)throw Error(p(169));c?(a=nh(a,b,ih),d.__reactInternalMemoizedMergedChildContext=a,F(hh),F(gh),G(gh,a)):F(hh);G(hh,c)}var qh=null,rh=!1,sh=!1;function th(a){null===qh?qh=[a]:qh.push(a)}function uh(a){rh=!0;th(a)}function vh(){if(!sh&&null!==qh){sh=!0;var a=0,b=D;try{var c=qh;for(D=2;a<c.length;a++){var d=c[a];do d=d(!0);while(null!==d)}qh=null;rh=!1}catch(e){throw null!==qh&&(qh=qh.slice(a+1)),vc(Ac,vh),e;}finally{D=b,sh=!1}}return null} +var wh=[],xh=0,yh=null,zh=0,Ah=[],Bh=0,Ch=null,Dh=1,Eh="";function Fh(a,b){wh[xh++]=zh;wh[xh++]=yh;yh=a;zh=b}function Gh(a,b,c){Ah[Bh++]=Dh;Ah[Bh++]=Eh;Ah[Bh++]=Ch;Ch=a;var d=Dh;a=Eh;var e=32-Vc(d)-1;d&=~(1<<e);c+=1;var f=32-Vc(b)+e;if(30<f){var g=e-e%5;f=(d&(1<<g)-1).toString(32);d>>=g;e-=g;Dh=1<<32-Vc(b)+e|c<<e|d;Eh=f+a}else Dh=1<<f|c<<e|d,Eh=a}function Hh(a){null!==a.return&&(Fh(a,1),Gh(a,1,0))} +function Ih(a){for(;a===yh;)yh=wh[--xh],wh[xh]=null,zh=wh[--xh],wh[xh]=null;for(;a===Ch;)Ch=Ah[--Bh],Ah[Bh]=null,Eh=Ah[--Bh],Ah[Bh]=null,Dh=Ah[--Bh],Ah[Bh]=null}var Jh=null,Kh=null,I=!1,Lh=null;function Mh(a,b){var c=Nh(5,null,null,0);c.elementType="DELETED";c.stateNode=b;c.return=a;b=a.deletions;null===b?(a.deletions=[c],a.flags|=16):b.push(c)} +function Oh(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,Jh=a,Kh=ch(b.firstChild),!0):!1;case 6:return b=""===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,Jh=a,Kh=null,!0):!1;case 13:return b=8!==b.nodeType?null:b,null!==b?(c=null!==Ch?{id:Dh,overflow:Eh}:null,a.memoizedState={dehydrated:b,treeContext:c,retryLane:1073741824},c=Nh(18,null,null,0),c.stateNode=b,c.return=a,a.child=c,Jh=a,Kh= +null,!0):!1;default:return!1}}function Ph(a){return 0!==(a.mode&1)&&0===(a.flags&128)} +function Qh(a){if(I){var b=a.type;var c=a.pendingProps;if("link"===b)c="stylesheet"===c.rel&&"string"!==typeof c.precedence?!0:!1;else if("script"===b){b=c.onLoad;var d=c.onError;c=!(c.async&&(b||d))}else c=!0;if(c)if(c=Kh){if(b=c,!Oh(a,c)){if(Ph(a))throw Error(p(418));c=ch(b.nextSibling);d=Jh;c&&Oh(a,c)?Mh(d,b):(a.flags=a.flags&-4097|2,I=!1,Jh=a)}}else{if(Ph(a))throw Error(p(418));a.flags=a.flags&-4097|2;I=!1;Jh=a}else a.flags=a.flags&-4097|2,I=!1,Jh=a}} +function Rh(a){var b=a.stateNode,c=a.type,d=a.memoizedProps;b[ea]=a;b[fa]=d;var e=0!==(a.mode&1);switch(c){case "dialog":E("cancel",b);E("close",b);break;case "iframe":case "object":case "embed":E("load",b);break;case "video":case "audio":for(var f=0;f<Sf.length;f++)E(Sf[f],b);break;case "source":E("error",b);break;case "img":case "image":case "link":E("error",b);E("load",b);break;case "details":E("toggle",b);break;case "input":ub(b,d);E("invalid",b);break;case "select":b._wrapperState={wasMultiple:!!d.multiple}; +E("invalid",b);break;case "textarea":Db(b,d),E("invalid",b)}Qb(c,d);f=null;for(var g in d)if(d.hasOwnProperty(g)){var h=d[g];"children"===g?"string"===typeof h?b.textContent!==h&&(!0!==d.suppressHydrationWarning&&eg(b.textContent,h,e),f=["children",h]):"number"===typeof h&&b.textContent!==""+h&&(!0!==d.suppressHydrationWarning&&eg(b.textContent,h,e),f=["children",""+h]):wa.hasOwnProperty(g)&&null!=h&&"onScroll"===g&&E("scroll",b)}switch(c){case "input":qb(b);zb(b,d,!0);break;case "textarea":qb(b); +Fb(b);break;case "select":case "option":break;default:"function"===typeof d.onClick&&(b.onclick=fg)}b=f;a.updateQueue=b;return null!==b?!0:!1}function Sh(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag&&27!==a.tag;)a=a.return;Jh=a} +function Th(a){if(a!==Jh)return!1;if(!I)return Sh(a),I=!0,!1;var b=!1;3===a.tag||27===a.tag||5===a.tag&&Ug(a.type,a.memoizedProps)||(b=!0);if(b&&(b=Kh)){if(Ph(a))throw Uh(),Error(p(418));for(;b;)Mh(a,b),b=ch(b.nextSibling)}Sh(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(p(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if("/$"===c){if(0===b){Kh=ch(a.nextSibling);break a}b--}else"$"!==c&&"$!"!==c&&"$?"!==c||b++}a=a.nextSibling}Kh=null}}else Kh= +Jh?ch(a.stateNode.nextSibling):null;return!0}function Uh(){for(var a=Kh;a;)a=ch(a.nextSibling)}function Vh(){Kh=Jh=null;I=!1}function Wh(a){null===Lh?Lh=[a]:Lh.push(a)}var Xh=[],Yh=0,Zh=0;function $h(){for(var a=Yh,b=Zh=Yh=0;b<a;){var c=Xh[b];Xh[b++]=null;var d=Xh[b];Xh[b++]=null;var e=Xh[b];Xh[b++]=null;var f=Xh[b];Xh[b++]=null;if(null!==d&&null!==e){var g=d.pending;null===g?e.next=e:(e.next=g.next,g.next=e);d.pending=e}0!==f&&ai(c,e,f)}} +function bi(a,b,c,d){Xh[Yh++]=a;Xh[Yh++]=b;Xh[Yh++]=c;Xh[Yh++]=d;Zh|=d;a.lanes|=d;a=a.alternate;null!==a&&(a.lanes|=d)}function ci(a,b){bi(a,null,null,b);return di(a)} +function ai(a,b,c){a.lanes|=c;var d=a.alternate;null!==d&&(d.lanes|=c);for(var e=!1,f=a.return;null!==f;)f.childLanes|=c,d=f.alternate,null!==d&&(d.childLanes|=c),22===f.tag&&(a=f.stateNode,null===a||a._visibility&1||(e=!0)),a=f,f=f.return;e&&null!==b&&3===a.tag&&(f=a.stateNode,e=31-Vc(c),f=f.hiddenUpdates,a=f[e],null===a?f[e]=[b]:a.push(b),b.lane=c|1073741824)}function di(a){if(50<ei)throw ei=0,fi=null,Error(p(185));for(var b=a.return;null!==b;)a=b,b=a.return;return 3===a.tag?a.stateNode:null} +var gi=!1;function hi(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ii(a,b){a=a.updateQueue;b.updateQueue===a&&(b.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function ji(a,b){return{eventTime:a,lane:b,tag:0,payload:null,callback:null,next:null}} +function ki(a,b,c){var d=a.updateQueue;if(null===d)return null;d=d.shared;if(0!==(J&2)){var e=d.pending;null===e?b.next=b:(b.next=e.next,e.next=b);d.pending=b;b=di(a);ai(a,null,c);return b}bi(a,d,b,c);return di(a)}function li(a,b,c){b=b.updateQueue;if(null!==b&&(b=b.shared,0!==(c&8388480))){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;id(a,c)}} +function mi(a,b){var c=a.updateQueue,d=a.alternate;if(null!==d&&(d=d.updateQueue,c===d)){var e=null,f=null;c=c.firstBaseUpdate;if(null!==c){do{var g={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:null,next:null};null===f?e=f=g:f=f.next=g;c=c.next}while(null!==c);null===f?e=f=b:f=f.next=b}else e=f=b;c={baseState:d.baseState,firstBaseUpdate:e,lastBaseUpdate:f,shared:d.shared,callbacks:d.callbacks};a.updateQueue=c;return}a=c.lastBaseUpdate;null===a?c.firstBaseUpdate=b:a.next= b;c.lastBaseUpdate=b} -function ii(a,b,c,d){var e=a.updateQueue;bi=!1;var f=e.firstBaseUpdate,g=e.lastBaseUpdate,h=e.shared.pending;if(null!==h){e.shared.pending=null;var k=h,l=k.next;k.next=null;null===g?f=l:g.next=l;g=k;var n=a.alternate;null!==n&&(n=n.updateQueue,h=n.lastBaseUpdate,h!==g&&(null===h?n.firstBaseUpdate=l:h.next=l,n.lastBaseUpdate=k))}if(null!==f){var q=e.baseState;g=0;n=l=k=null;h=f;do{var x=h.eventTime,u=h.lane&-1073741825,p=u!==h.lane;if(p?(K&u)===u:(d&u)===u){null!==n&&(n=n.next={eventTime:x,lane:0, -tag:h.tag,payload:h.payload,callback:null,next:null});a:{var t=a,B=h;u=b;x=c;switch(B.tag){case 1:t=B.payload;if("function"===typeof t){q=t.call(x,q,u);break a}q=t;break a;case 3:t.flags=t.flags&-65537|128;case 0:t=B.payload;u="function"===typeof t?t.call(x,q,u):t;if(null===u||void 0===u)break a;q=y({},q,u);break a;case 2:bi=!0}}u=h.callback;null!==u&&(a.flags|=64,p&&(a.flags|=8192),p=e.callbacks,null===p?e.callbacks=[u]:p.push(u))}else p={eventTime:x,lane:u,tag:h.tag,payload:h.payload,callback:h.callback, -next:null},null===n?(l=n=p,k=q):n=n.next=p,g|=u;h=h.next;if(null===h)if(h=e.shared.pending,null===h)break;else p=h,h=p.next,p.next=null,e.lastBaseUpdate=p,e.shared.pending=null}while(1);null===n&&(k=q);e.baseState=k;e.firstBaseUpdate=l;e.lastBaseUpdate=n;null===f&&(e.shared.lanes=0);ji|=g;a.lanes=g;a.memoizedState=q}}function ki(a,b){if("function"!==typeof a)throw Error(m(191,a));a.call(b)}function li(a,b){var c=a.callbacks;if(null!==c)for(a.callbacks=null,a=0;a<c.length;a++)ki(c[a],b)} -function mi(a,b,c){a=c.ref;if(null!==a&&"function"!==typeof a&&"object"!==typeof a){if(c._owner){c=c._owner;if(c){if(1!==c.tag)throw Error(m(309));var d=c.stateNode}if(!d)throw Error(m(147,a));var e=d,f=""+a;if(null!==b&&null!==b.ref&&"function"===typeof b.ref&&b.ref._stringRef===f)return b.ref;b=function(a){var b=e.refs;null===a?delete b[f]:b[f]=a};b._stringRef=f;return b}if("string"!==typeof a)throw Error(m(284));if(!c._owner)throw Error(m(290,a));}return a} -function ni(a,b){a=Object.prototype.toString.call(b);throw Error(m(31,"[object Object]"===a?"object with keys {"+Object.keys(b).join(", ")+"}":a));}function oi(a){var b=a._init;return b(a._payload)} -function pi(a){function b(b,c){if(a){var d=b.deletions;null===d?(b.deletions=[c],b.flags|=16):d.push(c)}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b){a=qi(a,b);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return b.flags|=1048576,c;d=b.alternate;if(null!==d)return d=d.index,d<c?(b.flags|=16777218,c):d;b.flags|=16777218;return c} -function g(b){a&&null===b.alternate&&(b.flags|=16777218);return b}function h(a,b,c,d){if(null===b||6!==b.tag)return b=ri(c,a.mode,d),b.return=a,b;b=e(b,c);b.return=a;return b}function k(a,b,c,d){var f=c.type;if(f===Pa)return n(a,b,c.props.children,d,c.key);if(null!==b&&(b.elementType===f||"object"===typeof f&&null!==f&&f.$$typeof===Za&&oi(f)===b.type))return d=e(b,c.props),d.ref=mi(a,b,c),d.return=a,d;d=si(c.type,c.key,c.props,null,a.mode,d);d.ref=mi(a,b,c);d.return=a;return d}function l(a,b,c,d){if(null=== -b||4!==b.tag||b.stateNode.containerInfo!==c.containerInfo||b.stateNode.implementation!==c.implementation)return b=ti(c,a.mode,d),b.return=a,b;b=e(b,c.children||[]);b.return=a;return b}function n(a,b,c,d,f){if(null===b||7!==b.tag)return b=ui(c,a.mode,d,f),b.return=a,b;b=e(b,c);b.return=a;return b}function q(a,b,c){if("string"===typeof b&&""!==b||"number"===typeof b)return b=ri(""+b,a.mode,c),b.return=a,b;if("object"===typeof b&&null!==b){switch(b.$$typeof){case Na:return c=si(b.type,b.key,b.props, -null,a.mode,c),c.ref=mi(a,null,b),c.return=a,c;case Oa:return b=ti(b,a.mode,c),b.return=a,b;case Za:var d=b._init;return q(a,d(b._payload),c)}if(Ab(b)||fb(b))return b=ui(b,a.mode,c,null),b.return=a,b;ni(a,b)}return null}function x(a,b,c,d){var e=null!==b?b.key:null;if("string"===typeof c&&""!==c||"number"===typeof c)return null!==e?null:h(a,b,""+c,d);if("object"===typeof c&&null!==c){switch(c.$$typeof){case Na:return c.key===e?k(a,b,c,d):null;case Oa:return c.key===e?l(a,b,c,d):null;case Za:return e= -c._init,x(a,b,e(c._payload),d)}if(Ab(c)||fb(c))return null!==e?null:n(a,b,c,d,null);ni(a,c)}return null}function u(a,b,c,d,e){if("string"===typeof d&&""!==d||"number"===typeof d)return a=a.get(c)||null,h(b,a,""+d,e);if("object"===typeof d&&null!==d){switch(d.$$typeof){case Na:return a=a.get(null===d.key?c:d.key)||null,k(b,a,d,e);case Oa:return a=a.get(null===d.key?c:d.key)||null,l(b,a,d,e);case Za:var f=d._init;return u(a,b,c,f(d._payload),e)}if(Ab(d)||fb(d))return a=a.get(c)||null,n(b,a,d,e,null); -ni(b,d)}return null}function p(e,g,h,k){for(var l=null,z=null,v=g,w=g=0,n=null;null!==v&&w<h.length;w++){v.index>w?(n=v,v=null):n=v.sibling;var p=x(e,v,h[w],k);if(null===p){null===v&&(v=n);break}a&&v&&null===p.alternate&&b(e,v);g=f(p,g,w);null===z?l=p:z.sibling=p;z=p;v=n}if(w===h.length)return c(e,v),I&&Ah(e,w),l;if(null===v){for(;w<h.length;w++)v=q(e,h[w],k),null!==v&&(g=f(v,g,w),null===z?l=v:z.sibling=v,z=v);I&&Ah(e,w);return l}for(v=d(e,v);w<h.length;w++)n=u(v,e,w,h[w],k),null!==n&&(a&&null!== -n.alternate&&v.delete(null===n.key?w:n.key),g=f(n,g,w),null===z?l=n:z.sibling=n,z=n);a&&v.forEach(function(a){return b(e,a)});I&&Ah(e,w);return l}function t(e,g,h,k){var l=fb(h);if("function"!==typeof l)throw Error(m(150));h=l.call(h);if(null==h)throw Error(m(151));for(var v=l=null,n=g,w=g=0,z=null,p=h.next();null!==n&&!p.done;w++,p=h.next()){n.index>w?(z=n,n=null):z=n.sibling;var t=x(e,n,p.value,k);if(null===t){null===n&&(n=z);break}a&&n&&null===t.alternate&&b(e,n);g=f(t,g,w);null===v?l=t:v.sibling= -t;v=t;n=z}if(p.done)return c(e,n),I&&Ah(e,w),l;if(null===n){for(;!p.done;w++,p=h.next())p=q(e,p.value,k),null!==p&&(g=f(p,g,w),null===v?l=p:v.sibling=p,v=p);I&&Ah(e,w);return l}for(n=d(e,n);!p.done;w++,p=h.next())p=u(n,e,w,p.value,k),null!==p&&(a&&null!==p.alternate&&n.delete(null===p.key?w:p.key),g=f(p,g,w),null===v?l=p:v.sibling=p,v=p);a&&n.forEach(function(a){return b(e,a)});I&&Ah(e,w);return l}function B(a,d,f,h){"object"===typeof f&&null!==f&&f.type===Pa&&null===f.key&&(f=f.props.children);if("object"=== -typeof f&&null!==f){switch(f.$$typeof){case Na:a:{for(var k=f.key,l=d;null!==l;){if(l.key===k){k=f.type;if(k===Pa){if(7===l.tag){c(a,l.sibling);d=e(l,f.props.children);d.return=a;a=d;break a}}else if(l.elementType===k||"object"===typeof k&&null!==k&&k.$$typeof===Za&&oi(k)===l.type){c(a,l.sibling);d=e(l,f.props);d.ref=mi(a,l,f);d.return=a;a=d;break a}c(a,l);break}else b(a,l);l=l.sibling}f.type===Pa?(d=ui(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=si(f.type,f.key,f.props,null,a.mode,h),h.ref= -mi(a,d,f),h.return=a,a=h)}return g(a);case Oa:a:{for(l=f.key;null!==d;){if(d.key===l)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=ti(f,a.mode,h);d.return=a;a=d}return g(a);case Za:return l=f._init,B(a,d,l(f._payload),h)}if(Ab(f))return p(a,d,f,h);if(fb(f))return t(a,d,f,h);ni(a,f)}return"string"===typeof f&&""!==f||"number"===typeof f? -(f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=ri(f,a.mode,h),d.return=a,a=d),g(a)):c(a,d)}return B}var vi=pi(!0),wi=pi(!1),xi=lg(null),yi=lg(0);function zi(a,b){a=Ai;G(yi,a);G(xi,b);Ai=a|b.baseLanes}function Bi(){G(yi,Ai);G(xi,xi.current)}function Ci(){Ai=yi.current;F(xi);F(yi)}var Di=lg(null),Ei=null;function Fi(a){var b=a.alternate;G(Di,a);null===Ei&&(null===b||null!==xi.current?Ei=a:null!==b.memoizedState&&(Ei=a))} -function Gi(a){if(22===a.tag){if(G(Di,a),null===Ei){var b=a.alternate;null!==b&&null!==b.memoizedState&&(Ei=a)}}else Hi()}function Hi(){G(Di,Di.current)}function Ii(a){F(Di);Ei===a&&(Ei=null)}var Ji=lg(0); -function Ki(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||"$?"===c.data||"$!"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&128))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}var Li=[]; -function Mi(){for(var a=0;a<Li.length;a++)Li[a]._workInProgressVersionPrimary=null;Li.length=0}var Ni=Error(m(460));function Oi(a){a=a.status;return"fulfilled"===a||"rejected"===a}function Pi(){} -function Qi(a,b,c){c=a[c];void 0===c?a.push(b):c!==b&&(b.then(Pi,Pi),b=c);switch(b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;default:"string"===typeof b.status?b.then(Pi,Pi):(a=b,a.status="pending",a.then(function(a){if("pending"===b.status){var c=b;c.status="fulfilled";c.value=a}},function(a){if("pending"===b.status){var c=b;c.status="rejected";c.reason=a}}));switch(b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;}Ri=b;throw Ni;}} -var Ri=null,Si=Ma.ReactCurrentDispatcher,Ti=Ma.ReactCurrentBatchConfig,Ui=0,L=null,M=null,O=null,Vi=!1,Wi=!1,Xi=!1,Yi=0,Zi=0,$i=null,aj=0;function P(){throw Error(m(321));}function bj(a,b){if(null===b)return!1;for(var c=0;c<b.length&&c<a.length;c++)if(!of(a[c],b[c]))return!1;return!0}function cj(a,b,c,d,e,f){Ui=f;L=b;b.memoizedState=null;b.updateQueue=null;b.lanes=0;Si.current=null===a||null===a.memoizedState?dj:ej;Xi=!1;a=c(d,e);Xi=!1;Wi&&(a=fj(b,c,d,e));gj();return a} -function gj(){Si.current=hj;var a=null!==M&&null!==M.next;Ui=0;O=M=L=null;Vi=!1;Zi=0;$i=null;if(a)throw Error(m(300));}function fj(a,b,c,d){var e=0;do{Wi=!1;Zi=0;if(25<=e)throw Error(m(301));e+=1;O=M=null;a.updateQueue=null;Si.current=ij;var f=b(c,d)}while(Wi);return f}function jj(){var a=0!==Yi;Yi=0;return a}function kj(a,b,c){b.updateQueue=a.updateQueue;b.flags&=-2053;a.lanes&=~c} -function lj(){if(Vi){for(var a=L.memoizedState;null!==a;){var b=a.queue;null!==b&&(b.pending=null);a=a.next}Vi=!1}Ui=0;O=M=L=null;Wi=!1;Zi=Yi=0;$i=null}function mj(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===O?L.memoizedState=O=a:O=O.next=a;return O} -function nj(){if(null===M){var a=L.alternate;a=null!==a?a.memoizedState:null}else a=M.next;var b=null===O?L.memoizedState:O.next;if(null!==b)O=b,M=a;else{if(null===a)if(null===L.alternate)a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};else throw Error(m(310));M=a;a={memoizedState:M.memoizedState,baseState:M.baseState,baseQueue:M.baseQueue,queue:M.queue,next:null};null===O?L.memoizedState=O=a:O=O.next=a}return O}var oj;oj=function(){return{lastEffect:null,events:null,stores:null}}; -function pj(a){if(null!==a&&"object"===typeof a){if("function"===typeof a.then){var b=Zi;Zi+=1;null===$i&&($i=[]);return Qi($i,a,b)}if(a.$$typeof===Ta||a.$$typeof===Ua)return qj(a)}throw Error(m(438,String(a)));}function rj(a,b){return"function"===typeof b?b(a):b} -function sj(a){var b=nj(),c=b.queue;if(null===c)throw Error(m(311));c.lastRenderedReducer=a;var d=M,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g}d.baseQueue=e=f;c.pending=null}if(null!==e){f=e.next;d=d.baseState;var h=g=null,k=null,l=f;do{var n=l.lane&-1073741825;if(n!==l.lane?(K&n)===n:(Ui&n)===n)null!==k&&(k=k.next={lane:0,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null}),n=l.action,Xi&&a(d,n),d=l.hasEagerState?l.eagerState: -a(d,n);else{var q={lane:n,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null};null===k?(h=k=q,g=d):k=k.next=q;L.lanes|=n;ji|=n}l=l.next}while(null!==l&&l!==f);null===k?g=d:k.next=h;of(d,b.memoizedState)||(tj=!0);b.memoizedState=d;b.baseState=g;b.baseQueue=k;c.lastRenderedState=d}null===e&&(c.lanes=0);return[b.memoizedState,c.dispatch]} -function uj(a){var b=nj(),c=b.queue;if(null===c)throw Error(m(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);of(f,b.memoizedState)||(tj=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f}return[f,d]}function vj(){} -function wj(a,b){var c=L,d=nj(),e=b(),f=!of((M||d).memoizedState,e);f&&(d.memoizedState=e,tj=!0);d=d.queue;xj(yj.bind(null,c,d,a),[a]);if(d.getSnapshot!==b||f||null!==O&&O.memoizedState.tag&1){c.flags|=2048;zj(9,Aj.bind(null,c,d,e,b),void 0,null);if(null===Q)throw Error(m(349));0!==(Ui&60)||Bj(c,b,e)}return e}function Bj(a,b,c){a.flags|=16384;a={getSnapshot:b,value:c};b=L.updateQueue;null===b?(b=oj(),L.updateQueue=b,b.stores=[a]):(c=b.stores,null===c?b.stores=[a]:c.push(a))} -function Aj(a,b,c,d){b.value=c;b.getSnapshot=d;Cj(b)&&Dj(a)}function yj(a,b,c){return c(function(){Cj(b)&&Dj(a)})}function Cj(a){var b=a.getSnapshot;a=a.value;try{var c=b();return!of(a,c)}catch(d){return!0}}function Dj(a){var b=Yh(a,2);null!==b&&Ej(b,a,2,-1)}function Fj(a){var b=mj();"function"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rj,lastRenderedState:a};b.queue=a;a=a.dispatch=Gj.bind(null,L,a);return[b.memoizedState,a]} -function zj(a,b,c,d){a={tag:a,create:b,destroy:c,deps:d,next:null};b=L.updateQueue;null===b?(b=oj(),L.updateQueue=b,b.lastEffect=a.next=a):(c=b.lastEffect,null===c?b.lastEffect=a.next=a:(d=c.next,c.next=a,a.next=d,b.lastEffect=a));return a}function Hj(){return nj().memoizedState}function Ij(a,b,c,d){var e=mj();L.flags|=a;e.memoizedState=zj(1|b,c,void 0,void 0===d?null:d)} -function Jj(a,b,c,d){var e=nj();d=void 0===d?null:d;var f=void 0;if(null!==M){var g=M.memoizedState;f=g.destroy;if(null!==d&&bj(d,g.deps)){e.memoizedState=zj(b,c,f,d);return}}L.flags|=a;e.memoizedState=zj(1|b,c,f,d)}function Kj(a,b){Ij(8390656,8,a,b)}function xj(a,b){Jj(2048,8,a,b)}function Lj(a,b){return Jj(4,2,a,b)}function Mj(a,b){return Jj(4,4,a,b)} -function Nj(a,b){if("function"===typeof b)return a=a(),b(a),function(){b(null)};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null}}function Oj(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;Jj(4,4,Nj.bind(null,b,a),c)}function Pj(){}function Qj(a,b){var c=nj();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&bj(b,d[1]))return d[0];c.memoizedState=[a,b];return a} -function Rj(a,b){var c=nj();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&bj(b,d[1]))return d[0];Xi&&a();a=a();c.memoizedState=[a,b];return a}function Sj(a,b,c){if(0===(Ui&42))return a.baseState&&(a.baseState=!1,tj=!0),a.memoizedState=c;of(c,b)||(c=ed(),L.lanes|=c,ji|=c,a.baseState=!0);return b}function Tj(a,b){var c=D;D=0!==c&&8>c?c:8;a(!0);var d=Ti.transition;Ti.transition={};try{a(!1),b()}finally{D=c,Ti.transition=d}}function Uj(){return nj().memoizedState} -function Vj(){return nj().memoizedState}function Wj(a){for(var b=a.return;null!==b;){switch(b.tag){case 24:case 3:var c=Xj(b),d=Yj();a=ei(d,c);var e=fi(b,a,c);null!==e&&(Ej(e,b,c,d),gi(e,b,c));b={cache:Zj()};a.payload=b;return}b=b.return}}function ak(a,b,c){var d=Xj(a);c={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(bk(a))ck(b,c);else if(Xh(a,b,c,d),c=Zh(a),null!==c){var e=Yj();Ej(c,a,d,e);dk(c,b,d)}Tc(a,d)} -function Gj(a,b,c){var d=Xj(a),e={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(bk(a))ck(b,e);else{var f=a.alternate;if(0===a.lanes&&(null===f||0===f.lanes)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,h=f(g,c);e.hasEagerState=!0;e.eagerState=h;if(of(h,g)){Xh(a,b,e,0);null===Q&&Vh();return}}catch(k){}finally{}Xh(a,b,e,d);c=Zh(a);null!==c&&(e=Yj(),Ej(c,a,d,e),dk(c,b,d))}Tc(a,d)}function bk(a){var b=a.alternate;return a===L||null!==b&&b===L} -function ck(a,b){Wi=Vi=!0;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}function dk(a,b,c){if(0!==(c&8388480)){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;id(a,c)}}var hj={readContext:qj,useCallback:P,useContext:P,useEffect:P,useImperativeHandle:P,useInsertionEffect:P,useLayoutEffect:P,useMemo:P,useReducer:P,useRef:P,useState:P,useDebugValue:P,useDeferredValue:P,useTransition:P,useMutableSource:P,useSyncExternalStore:P,useId:P};hj.useCacheRefresh=P;hj.use=P; -var dj={readContext:qj,useCallback:function(a,b){mj().memoizedState=[a,void 0===b?null:b];return a},useContext:qj,useEffect:Kj,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;Ij(4194308,4,Nj.bind(null,b,a),c)},useLayoutEffect:function(a,b){return Ij(4194308,4,a,b)},useInsertionEffect:function(a,b){Ij(4,2,a,b)},useMemo:function(a,b){var c=mj();b=void 0===b?null:b;Xi&&a();a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=mj();b=void 0!==c?c(b):b;d.memoizedState= -d.baseState=b;a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};d.queue=a;a=a.dispatch=ak.bind(null,L,a);return[d.memoizedState,a]},useRef:function(a){var b=mj();a={current:a};return b.memoizedState=a},useState:Fj,useDebugValue:Pj,useDeferredValue:function(a){return mj().memoizedState=a},useTransition:function(){var a=Fj(!1),b=a[0];a=Tj.bind(null,a[1]);mj().memoizedState=a;return[b,a]},useMutableSource:function(){},useSyncExternalStore:function(a,b,c){var d=L,e=mj(); -if(I){if(void 0===c)throw Error(m(407));c=c()}else{c=b();if(null===Q)throw Error(m(349));0!==(Ui&60)||Bj(d,b,c)}e.memoizedState=c;var f={value:c,getSnapshot:b};e.queue=f;Kj(yj.bind(null,d,f,a),[a]);d.flags|=2048;zj(9,Aj.bind(null,d,f,c,b),void 0,null);return c},useId:function(){var a=mj(),b=Q.identifierPrefix;if(I){var c=zh;var d=yh;c=(d&~(1<<32-Vc(d)-1)).toString(32)+c;b=":"+b+"R"+c;c=Yi++;0<c&&(b+="H"+c.toString(32));b+=":"}else c=aj++,b=":"+b+"r"+c.toString(32)+":";return a.memoizedState=b},useCacheRefresh:function(){return mj().memoizedState= -Wj.bind(null,L)}};dj.use=pj;var ej={readContext:qj,useCallback:Qj,useContext:qj,useEffect:xj,useImperativeHandle:Oj,useInsertionEffect:Lj,useLayoutEffect:Mj,useMemo:Rj,useReducer:sj,useRef:Hj,useState:function(){return sj(rj)},useDebugValue:Pj,useDeferredValue:function(a){var b=nj();return Sj(b,M.memoizedState,a)},useTransition:function(){var a=sj(rj)[0],b=nj().memoizedState;return[a,b]},useMutableSource:vj,useSyncExternalStore:wj,useId:Uj};ej.useCacheRefresh=Vj;ej.use=pj; -var ij={readContext:qj,useCallback:Qj,useContext:qj,useEffect:xj,useImperativeHandle:Oj,useInsertionEffect:Lj,useLayoutEffect:Mj,useMemo:Rj,useReducer:uj,useRef:Hj,useState:function(){return uj(rj)},useDebugValue:Pj,useDeferredValue:function(a){var b=nj();return null===M?b.memoizedState=a:Sj(b,M.memoizedState,a)},useTransition:function(){var a=uj(rj)[0],b=nj().memoizedState;return[a,b]},useMutableSource:vj,useSyncExternalStore:wj,useId:Uj};ij.useCacheRefresh=Vj;ij.use=pj; -var ek=ba.unstable_now,fk=0,gk=-1,hk=-1,ik=-1,jk=!1,kk=!1;function lk(a){hk=ek();0>a.actualStartTime&&(a.actualStartTime=ek())}function mk(a,b){if(0<=hk){var c=ek()-hk;a.actualDuration+=c;b&&(a.selfBaseDuration=c);hk=-1}}function nk(a){if(0<=gk){var b=ek()-gk;gk=-1;for(a=a.return;null!==a;){switch(a.tag){case 3:a.stateNode.effectDuration+=b;return;case 12:a.stateNode.effectDuration+=b;return}a=a.return}}} -function ok(a){if(0<=ik){var b=ek()-ik;ik=-1;for(a=a.return;null!==a;){switch(a.tag){case 3:a=a.stateNode;null!==a&&(a.passiveEffectDuration+=b);return;case 12:a=a.stateNode;null!==a&&(a.passiveEffectDuration+=b);return}a=a.return}}}function pk(){gk=ek()}function qk(a){for(var b=a.child;b;)a.actualDuration+=b.actualDuration,b=b.sibling}function rk(a,b){if(a&&a.defaultProps){b=y({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c]);return b}return b} -function sk(a,b,c,d){b=a.memoizedState;c=c(d,b);c=null===c||void 0===c?b:y({},b,c);a.memoizedState=c;0===a.lanes&&(a.updateQueue.baseState=c)} -var tk={isMounted:function(a){return(a=a._reactInternals)?pc(a)===a:!1},enqueueSetState:function(a,b,c){a=a._reactInternals;var d=Yj(),e=Xj(a),f=ei(d,e);f.payload=b;void 0!==c&&null!==c&&(f.callback=c);b=fi(a,f,e);null!==b&&(Ej(b,a,e,d),gi(b,a,e));Tc(a,e)},enqueueReplaceState:function(a,b,c){a=a._reactInternals;var d=Yj(),e=Xj(a),f=ei(d,e);f.tag=1;f.payload=b;void 0!==c&&null!==c&&(f.callback=c);b=fi(a,f,e);null!==b&&(Ej(b,a,e,d),gi(b,a,e));Tc(a,e)},enqueueForceUpdate:function(a,b){a=a._reactInternals; -var c=Yj(),d=Xj(a),e=ei(c,d);e.tag=2;void 0!==b&&null!==b&&(e.callback=b);b=fi(a,e,d);null!==b&&(Ej(b,a,d,c),gi(b,a,d));null!==C&&"function"===typeof C.markForceUpdateScheduled&&C.markForceUpdateScheduled(a,d)}};function uk(a,b,c,d,e,f,g){a=a.stateNode;return"function"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(d,f,g):b.prototype&&b.prototype.isPureReactComponent?!pf(c,d)||!pf(e,f):!0} -function vk(a,b,c){var d=!1,e=bh;var f=b.contextType;"object"===typeof f&&null!==f?f=qj(f):(e=fh(b)?dh:H.current,d=b.contextTypes,f=(d=null!==d&&void 0!==d)?eh(a,e):bh);b=new b(c,f);a.memoizedState=null!==b.state&&void 0!==b.state?b.state:null;b.updater=tk;a.stateNode=b;b._reactInternals=a;d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=e,a.__reactInternalMemoizedMaskedChildContext=f);return b} -function wk(a,b,c,d){a=b.state;"function"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);"function"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&tk.enqueueReplaceState(b,b.state,null)} -function xk(a,b,c,d){var e=a.stateNode;e.props=c;e.state=a.memoizedState;e.refs={};ci(a);var f=b.contextType;"object"===typeof f&&null!==f?e.context=qj(f):(f=fh(b)?dh:H.current,e.context=eh(a,f));e.state=a.memoizedState;f=b.getDerivedStateFromProps;"function"===typeof f&&(sk(a,b,f,c),e.state=a.memoizedState);"function"===typeof b.getDerivedStateFromProps||"function"===typeof e.getSnapshotBeforeUpdate||"function"!==typeof e.UNSAFE_componentWillMount&&"function"!==typeof e.componentWillMount||(b=e.state, -"function"===typeof e.componentWillMount&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),b!==e.state&&tk.enqueueReplaceState(e,e.state,null),ii(a,c,e,d),e.state=a.memoizedState);"function"===typeof e.componentDidMount&&(a.flags|=4194308)}function yk(a,b){try{var c="",d=b;do c+=kb(d),d=d.return;while(d);var e=c}catch(f){e="\nError generating stack: "+f.message+"\n"+f.stack}return{value:a,source:b,stack:e,digest:null}} -function zk(a,b,c){return{value:a,source:null,stack:null!=c?c:null,digest:null!=b?b:null}}function Ak(a,b){try{console.error(b.value)}catch(c){setTimeout(function(){throw c;})}}function Bk(a,b,c){c=ei(-1,c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){Ck||(Ck=!0,Dk=d);Ak(a,b)};return c} -function Ek(a,b,c){c=ei(-1,c);c.tag=3;var d=a.type.getDerivedStateFromError;if("function"===typeof d){var e=b.value;c.payload=function(){return d(e)};c.callback=function(){Ak(a,b)}}var f=a.stateNode;null!==f&&"function"===typeof f.componentDidCatch&&(c.callback=function(){Ak(a,b);"function"!==typeof d&&(null===Fk?Fk=new Set([this]):Fk.add(this));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:""})});return c} -function Gk(a,b,c,d,e){if(0===(a.mode&1))return a===b?a.flags|=65536:(a.flags|=128,c.flags|=131072,c.flags&=-52805,1===c.tag&&(null===c.alternate?c.tag=17:(b=ei(-1,2),b.tag=2,fi(c,b,2))),c.lanes|=2),a;a.flags|=65536;a.lanes=e;return a}var Hk=Ma.ReactCurrentOwner,Ik=Error(m(461)),tj=!1;function R(a,b,c,d){b.child=null===a?wi(b,null,c,d):vi(b,a.child,c,d)} -function Jk(a,b,c,d,e){c=c.render;var f=b.ref;Kk(b,e);Nc(b);d=cj(a,b,c,d,f,e);c=jj();Oc();if(null!==a&&!tj)return kj(a,b,e),Lk(a,b,e);I&&c&&Ch(b);b.flags|=1;R(a,b,d,e);return b.child} -function Mk(a,b,c,d,e){if(null===a){var f=c.type;if("function"===typeof f&&!Nk(f)&&void 0===f.defaultProps&&null===c.compare&&void 0===c.defaultProps)return b.tag=15,b.type=f,Ok(a,b,f,d,e);a=si(c.type,null,d,b,b.mode,e);a.ref=b.ref;a.return=b;return b.child=a}f=a.child;if(0===(a.lanes&e)){var g=f.memoizedProps;c=c.compare;c=null!==c?c:pf;if(c(g,d)&&a.ref===b.ref)return Lk(a,b,e)}b.flags|=1;a=qi(f,d);a.ref=b.ref;a.return=b;return b.child=a} -function Ok(a,b,c,d,e){if(null!==a){var f=a.memoizedProps;if(pf(f,d)&&a.ref===b.ref)if(tj=!1,b.pendingProps=d=f,0!==(a.lanes&e))0!==(a.flags&131072)&&(tj=!0);else return b.lanes=a.lanes,Lk(a,b,e)}return Pk(a,b,c,d,e)} -function Qk(a,b,c){var d=b.pendingProps,e=d.children,f=0!==(b.stateNode._pendingVisibility&2),g=null!==a?a.memoizedState:null;Rk(a,b);if("hidden"===d.mode||f){if(0!==(b.flags&128)){c=null!==g?g.baseLanes|c:c;if(null!==a){d=b.child=a.child;for(e=0;null!==d;)e=e|d.lanes|d.childLanes,d=d.sibling;b.childLanes=e&~c}else b.childLanes=0,b.child=null;return Sk(a,b,c)}if(0===(b.mode&1))b.memoizedState={baseLanes:0,cachePool:null},null!==a&&Tk(b,null),Bi(),Gi(b);else if(0!==(c&1073741824))b.memoizedState={baseLanes:0, -cachePool:null},null!==a&&Tk(b,null!==g?g.cachePool:null),null!==g?zi(b,g):Bi(),Gi(b);else return b.lanes=b.childLanes=1073741824,Sk(a,b,null!==g?g.baseLanes|c:c)}else null!==g?(Tk(b,g.cachePool),zi(b,g),Hi(),b.memoizedState=null):(null!==a&&Tk(b,null),Bi(),Hi());R(a,b,e,c);return b.child}function Sk(a,b,c){var d=Uk();d=null===d?null:{parent:S._currentValue,pool:d};b.memoizedState={baseLanes:c,cachePool:d};null!==a&&Tk(b,null);Bi();Gi(b);return null} -function Rk(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.flags|=512,b.flags|=2097152}function Pk(a,b,c,d,e){var f=fh(c)?dh:H.current;f=eh(b,f);Kk(b,e);Nc(b);c=cj(a,b,c,d,f,e);d=jj();Oc();if(null!==a&&!tj)return kj(a,b,e),Lk(a,b,e);I&&d&&Ch(b);b.flags|=1;R(a,b,c,e);return b.child}function Vk(a,b,c,d,e){var f=fh(d)?dh:H.current;f=eh(b,f);Kk(b,e);Nc(b);c=fj(b,d,c,f);gj();d=jj();Oc();if(null!==a&&!tj)return kj(a,b,e),Lk(a,b,e);I&&d&&Ch(b);b.flags|=1;R(a,b,c,e);return b.child} -function Wk(a,b,c,d,e){if(fh(c)){var f=!0;jh(b)}else f=!1;Kk(b,e);if(null===b.stateNode)Xk(a,b),vk(b,c,d),xk(b,c,d,e),d=!0;else if(null===a){var g=b.stateNode,h=b.memoizedProps;g.props=h;var k=g.context,l=c.contextType;"object"===typeof l&&null!==l?l=qj(l):(l=fh(c)?dh:H.current,l=eh(b,l));var n=c.getDerivedStateFromProps,q="function"===typeof n||"function"===typeof g.getSnapshotBeforeUpdate;q||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps|| -(h!==d||k!==l)&&wk(b,g,d,l);bi=!1;var x=b.memoizedState;g.state=x;ii(b,d,g,e);k=b.memoizedState;h!==d||x!==k||ch.current||bi?("function"===typeof n&&(sk(b,c,n,d),k=b.memoizedState),(h=bi||uk(b,c,h,d,x,k,l))?(q||"function"!==typeof g.UNSAFE_componentWillMount&&"function"!==typeof g.componentWillMount||("function"===typeof g.componentWillMount&&g.componentWillMount(),"function"===typeof g.UNSAFE_componentWillMount&&g.UNSAFE_componentWillMount()),"function"===typeof g.componentDidMount&&(b.flags|=4194308)): -("function"===typeof g.componentDidMount&&(b.flags|=4194308),b.memoizedProps=d,b.memoizedState=k),g.props=d,g.state=k,g.context=l,d=h):("function"===typeof g.componentDidMount&&(b.flags|=4194308),d=!1)}else{g=b.stateNode;di(a,b);h=b.memoizedProps;l=b.type===b.elementType?h:rk(b.type,h);g.props=l;q=b.pendingProps;x=g.context;k=c.contextType;"object"===typeof k&&null!==k?k=qj(k):(k=fh(c)?dh:H.current,k=eh(b,k));var u=c.getDerivedStateFromProps;(n="function"===typeof u||"function"===typeof g.getSnapshotBeforeUpdate)|| -"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps||(h!==q||x!==k)&&wk(b,g,d,k);bi=!1;x=b.memoizedState;g.state=x;ii(b,d,g,e);var p=b.memoizedState;h!==q||x!==p||ch.current||bi?("function"===typeof u&&(sk(b,c,u,d),p=b.memoizedState),(l=bi||uk(b,c,l,d,x,p,k)||!1)?(n||"function"!==typeof g.UNSAFE_componentWillUpdate&&"function"!==typeof g.componentWillUpdate||("function"===typeof g.componentWillUpdate&&g.componentWillUpdate(d,p,k),"function"===typeof g.UNSAFE_componentWillUpdate&& -g.UNSAFE_componentWillUpdate(d,p,k)),"function"===typeof g.componentDidUpdate&&(b.flags|=4),"function"===typeof g.getSnapshotBeforeUpdate&&(b.flags|=1024)):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&x===a.memoizedState||(b.flags|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&x===a.memoizedState||(b.flags|=1024),b.memoizedProps=d,b.memoizedState=p),g.props=d,g.state=p,g.context=k,d=l):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&x=== -a.memoizedState||(b.flags|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&x===a.memoizedState||(b.flags|=1024),d=!1)}return Yk(a,b,c,d,f,e)} -function Yk(a,b,c,d,e,f){Rk(a,b);var g=0!==(b.flags&128);if(!d&&!g)return e&&kh(b,c,!1),Lk(a,b,f);d=b.stateNode;Hk.current=b;if(g&&"function"!==typeof c.getDerivedStateFromError){var h=null;hk=-1}else Nc(b),h=d.render(),Oc();b.flags|=1;null!==a&&g?(g=h,b.child=vi(b,a.child,null,f),b.child=vi(b,null,g,f)):R(a,b,h,f);b.memoizedState=d.state;e&&kh(b,c,!0);return b.child} -function Zk(a){var b=a.stateNode;b.pendingContext?hh(a,b.pendingContext,b.pendingContext!==b.context):b.context&&hh(a,b.context,!1);pg(a,b.containerInfo)}function $k(a,b,c,d,e){Qh();Rh(e);b.flags|=256;R(a,b,c,d);return b.child}var al={dehydrated:null,treeContext:null,retryLane:0};function bl(a){return{baseLanes:a,cachePool:cl()}} -function dl(a,b,c){var d=b.pendingProps,e=!1,f=0!==(b.flags&128),g;(g=f)||(g=null!==a&&null===a.memoizedState?!1:0!==(Ji.current&2));g&&(e=!0,b.flags&=-129);if(null===a){if(I){e?Fi(b):Hi();Lh(b);a=b.memoizedState;if(null!==a&&(a=a.dehydrated,null!==a))return 0===(b.mode&1)?b.lanes=2:"$!"===a.data?b.lanes=16:b.lanes=1073741824,null;Ii(b)}f=d.children;a=d.fallback;if(e)return Hi(),d=b.mode,e=b.child,f={mode:"hidden",children:f},0===(d&1)&&null!==e?(e.childLanes=0,e.pendingProps=f,b.mode&2&&(e.actualDuration= -0,e.actualStartTime=-1,e.selfBaseDuration=0,e.treeBaseDuration=0)):e=el(f,d,0,null),a=ui(a,d,c,null),e.return=b,a.return=b,e.sibling=a,b.child=e,b.child.memoizedState=bl(c),b.memoizedState=al,a;Fi(b);return fl(b,f)}g=a.memoizedState;if(null!==g){var h=g.dehydrated;if(null!==h)return gl(a,b,f,d,h,g,c)}if(e){Hi();e=d.fallback;f=b.mode;g=a.child;h=g.sibling;var k={mode:"hidden",children:d.children};0===(f&1)&&b.child!==g?(d=b.child,d.childLanes=0,d.pendingProps=k,b.mode&2&&(d.actualDuration=0,d.actualStartTime= --1,d.selfBaseDuration=g.selfBaseDuration,d.treeBaseDuration=g.treeBaseDuration),b.deletions=null):(d=qi(g,k),d.subtreeFlags=g.subtreeFlags&14680064);null!==h?e=qi(h,e):(e=ui(e,f,c,null),e.flags|=2);e.return=b;d.return=b;d.sibling=e;b.child=d;d=e;e=b.child;f=a.child.memoizedState;null===f?f=bl(c):(g=f.cachePool,null!==g?(h=S._currentValue,g=g.parent!==h?{parent:h,pool:h}:g):g=cl(),f={baseLanes:f.baseLanes|c,cachePool:g});e.memoizedState=f;e.childLanes=a.childLanes&~c;b.memoizedState=al;return d}Fi(b); -e=a.child;a=e.sibling;d=qi(e,{mode:"visible",children:d.children});0===(b.mode&1)&&(d.lanes=c);d.return=b;d.sibling=null;null!==a&&(c=b.deletions,null===c?(b.deletions=[a],b.flags|=16):c.push(a));b.child=d;b.memoizedState=null;return d}function fl(a,b){b=el({mode:"visible",children:b},a.mode,0,null);b.return=a;return a.child=b}function hl(a,b,c,d){null!==d&&Rh(d);vi(b,a.child,null,c);a=fl(b,b.pendingProps.children);a.flags|=2;b.memoizedState=null;return a} -function gl(a,b,c,d,e,f,g){if(c){if(b.flags&256)return Fi(b),b.flags&=-257,d=zk(Error(m(422))),hl(a,b,g,d);if(null!==b.memoizedState)return Hi(),b.child=a.child,b.flags|=128,null;Hi();f=d.fallback;e=b.mode;d=el({mode:"visible",children:d.children},e,0,null);f=ui(f,e,g,null);f.flags|=2;d.return=b;f.return=b;d.sibling=f;b.child=d;0!==(b.mode&1)&&vi(b,a.child,null,g);b.child.memoizedState=bl(g);b.memoizedState=al;return f}Fi(b);if(0===(b.mode&1))return hl(a,b,g,null);if("$!"===e.data){d=e.nextSibling&& -e.nextSibling.dataset;if(d)var h=d.dgst;d=h;f=Error(m(419));f.digest=d;d=zk(f,d,void 0);return hl(a,b,g,d)}h=0!==(g&a.childLanes);if(tj||h){d=Q;if(null!==d){switch(g&-g){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:e=64;break;case 536870912:e=268435456;break;default:e= -0}e=0!==(e&(d.suspendedLanes|g))?0:e;if(0!==e&&e!==f.retryLane)throw f.retryLane=e,Yh(a,e),Ej(d,a,e,-1),Ik;}il();return hl(a,b,g,null)}if("$?"===e.data)return b.flags|=128,b.child=a.child,b=jl.bind(null,a),e._reactRetry=b,null;a=f.treeContext;Fh=Zg(e.nextSibling);Eh=b;I=!0;Gh=null;null!==a&&(vh[wh++]=yh,vh[wh++]=zh,vh[wh++]=xh,yh=a.id,zh=a.overflow,xh=b);b=fl(b,d.children);b.flags|=4096;return b}function kl(a,b,c){a.lanes|=b;var d=a.alternate;null!==d&&(d.lanes|=b);ll(a.return,b,c)} -function ml(a,b,c,d,e){var f=a.memoizedState;null===f?a.memoizedState={isBackwards:b,rendering:null,renderingStartTime:0,last:d,tail:c,tailMode:e}:(f.isBackwards=b,f.rendering=null,f.renderingStartTime=0,f.last=d,f.tail=c,f.tailMode=e)} -function nl(a,b,c){var d=b.pendingProps,e=d.revealOrder,f=d.tail;R(a,b,d.children,c);d=Ji.current;if(0!==(d&2))d=d&1|2,b.flags|=128;else{if(null!==a&&0!==(a.flags&128))a:for(a=b.child;null!==a;){if(13===a.tag)null!==a.memoizedState&&kl(a,c,b);else if(19===a.tag)kl(a,c,b);else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===b)break a;for(;null===a.sibling;){if(null===a.return||a.return===b)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}d&=1}G(Ji,d);if(0===(b.mode&1))b.memoizedState= -null;else switch(e){case "forwards":c=b.child;for(e=null;null!==c;)a=c.alternate,null!==a&&null===Ki(a)&&(e=c),c=c.sibling;c=e;null===c?(e=b.child,b.child=null):(e=c.sibling,c.sibling=null);ml(b,!1,e,c,f);break;case "backwards":c=null;e=b.child;for(b.child=null;null!==e;){a=e.alternate;if(null!==a&&null===Ki(a)){b.child=e;break}a=e.sibling;e.sibling=c;c=e;e=a}ml(b,!0,c,null,f);break;case "together":ml(b,!1,null,null,void 0);break;default:b.memoizedState=null}return b.child} -function Xk(a,b){0===(b.mode&1)&&null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2)}function Lk(a,b,c){null!==a&&(b.dependencies=a.dependencies);hk=-1;ji|=b.lanes;if(0===(c&b.childLanes))return null;if(null!==a&&b.child!==a.child)throw Error(m(153));if(null!==b.child){a=b.child;c=qi(a,a.pendingProps);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=qi(a,a.pendingProps),c.return=b;c.sibling=null}return b.child} -function ol(a,b,c){switch(b.tag){case 3:Zk(b);pl(b,S,a.memoizedState.cache);Qh();break;case 27:case 5:rg(b);break;case 1:fh(b.type)&&jh(b);break;case 4:pg(b,b.stateNode.containerInfo);break;case 10:pl(b,b.type._context,b.memoizedProps.value);break;case 12:0!==(c&b.childLanes)&&(b.flags|=4);var d=b.stateNode;d.effectDuration=0;d.passiveEffectDuration=0;break;case 13:d=b.memoizedState;if(null!==d){if(null!==d.dehydrated)return Fi(b),b.flags|=128,null;if(0!==(c&b.child.childLanes))return dl(a,b,c);Fi(b); -a=Lk(a,b,c);return null!==a?a.sibling:null}Fi(b);break;case 19:d=0!==(c&b.childLanes);if(0!==(a.flags&128)){if(d)return nl(a,b,c);b.flags|=128}var e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null,e.lastEffect=null);G(Ji,Ji.current);if(d)break;else return null;case 22:case 23:return b.lanes=0,Qk(a,b,c);case 24:pl(b,S,a.memoizedState.cache)}return Lk(a,b,c)}var ql=lg(null),rl=null,sl=null,tl=null;function ul(){tl=sl=rl=null}function pl(a,b,c){G(ql,b._currentValue);b._currentValue=c} -function vl(a){var b=ql.current;a._currentValue=b===db?a._defaultValue:b;F(ql)}function ll(a,b,c){for(;null!==a;){var d=a.alternate;(a.childLanes&b)!==b?(a.childLanes|=b,null!==d&&(d.childLanes|=b)):null!==d&&(d.childLanes&b)!==b&&(d.childLanes|=b);if(a===c)break;a=a.return}} -function wl(a,b,c){var d=a.child;null!==d&&(d.return=a);for(;null!==d;){var e=d.dependencies;if(null!==e){var f=d.child;for(var g=e.firstContext;null!==g;){if(g.context===b){if(1===d.tag){g=ei(-1,c&-c);g.tag=2;var h=d.updateQueue;if(null!==h){h=h.shared;var k=h.pending;null===k?g.next=g:(g.next=k.next,k.next=g);h.pending=g}}d.lanes|=c;g=d.alternate;null!==g&&(g.lanes|=c);ll(d.return,c,a);e.lanes|=c;break}g=g.next}}else if(10===d.tag)f=d.type===a.type?null:d.child;else if(18===d.tag){f=d.return;if(null=== -f)throw Error(m(341));f.lanes|=c;e=f.alternate;null!==e&&(e.lanes|=c);ll(f,c,a);f=d.sibling}else f=d.child;if(null!==f)f.return=d;else for(f=d;null!==f;){if(f===a){f=null;break}d=f.sibling;if(null!==d){d.return=f.return;f=d;break}f=f.return}d=f}}function Kk(a,b){rl=a;tl=sl=null;a=a.dependencies;null!==a&&null!==a.firstContext&&(0!==(a.lanes&b)&&(tj=!0),a.firstContext=null)} -function qj(a){var b=a._currentValue;if(tl!==a)if(a={context:a,memoizedValue:b,next:null},null===sl){if(null===rl)throw Error(m(308));sl=a;rl.dependencies={lanes:0,firstContext:a}}else sl=sl.next=a;return b} -var xl="undefined"!==typeof AbortController?AbortController:function(){var a=[],b=this.signal={aborted:!1,addEventListener:function(b,d){a.push(d)}};this.abort=function(){b.aborted=!0;a.forEach(function(a){return a()})}},yl=ba.unstable_scheduleCallback,zl=ba.unstable_NormalPriority,S={$$typeof:Ta,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_defaultValue:null,_globalName:null};function Zj(){return{controller:new xl,data:new Map,refCount:0}} -function Al(a){a.refCount--;0===a.refCount&&yl(zl,function(){a.controller.abort()})}var Bl=Ma.ReactCurrentBatchConfig,Cl=lg(null);function Uk(){var a=Cl.current;return null!==a?a:Q.pooledCache}function Tk(a,b){null===b?G(Cl,Cl.current):G(Cl,b.pool)}function cl(){var a=Uk();return null===a?null:{parent:S._currentValue,pool:a}}function Dl(a){a.flags|=2097664}var El,Fl,Gl,Hl; -El=function(a,b){for(var c=b.child;null!==c;){if(5===c.tag||6===c.tag)a.appendChild(c.stateNode);else if(4!==c.tag&&27!==c.tag&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return}c.sibling.return=c.return;c=c.sibling}};Fl=function(){}; -Gl=function(a,b,c,d){var e=a.memoizedProps;if(e!==d){a=b.stateNode;var f=null;switch(c){case "input":e=tb(a,e);d=tb(a,d);f=[];break;case "select":e=y({},e,{value:void 0});d=y({},d,{value:void 0});f=[];break;case "textarea":e=Cb(a,e);d=Cb(a,d);f=[];break;default:"function"!==typeof e.onClick&&"function"===typeof d.onClick&&(a.onclick=fg)}Qb(c,d);var g;c=null;for(l in e)if(!d.hasOwnProperty(l)&&e.hasOwnProperty(l)&&null!=e[l])if("style"===l){var h=e[l];for(g in h)h.hasOwnProperty(g)&&(c||(c={}),c[g]= +function ni(a,b,c,d){var e=a.updateQueue;gi=!1;var f=e.firstBaseUpdate,g=e.lastBaseUpdate,h=e.shared.pending;if(null!==h){e.shared.pending=null;var k=h,l=k.next;k.next=null;null===g?f=l:g.next=l;g=k;var n=a.alternate;null!==n&&(n=n.updateQueue,h=n.lastBaseUpdate,h!==g&&(null===h?n.firstBaseUpdate=l:h.next=l,n.lastBaseUpdate=k))}if(null!==f){var r=e.baseState;g=0;n=l=k=null;h=f;do{var w=h.eventTime,x=h.lane&-1073741825,m=x!==h.lane;if(m?(K&x)===x:(d&x)===x){null!==n&&(n=n.next={eventTime:w,lane:0, +tag:h.tag,payload:h.payload,callback:null,next:null});a:{var t=a,A=h;x=b;w=c;switch(A.tag){case 1:t=A.payload;if("function"===typeof t){r=t.call(w,r,x);break a}r=t;break a;case 3:t.flags=t.flags&-65537|128;case 0:t=A.payload;x="function"===typeof t?t.call(w,r,x):t;if(null===x||void 0===x)break a;r=z({},r,x);break a;case 2:gi=!0}}x=h.callback;null!==x&&(a.flags|=64,m&&(a.flags|=8192),m=e.callbacks,null===m?e.callbacks=[x]:m.push(x))}else m={eventTime:w,lane:x,tag:h.tag,payload:h.payload,callback:h.callback, +next:null},null===n?(l=n=m,k=r):n=n.next=m,g|=x;h=h.next;if(null===h)if(h=e.shared.pending,null===h)break;else m=h,h=m.next,m.next=null,e.lastBaseUpdate=m,e.shared.pending=null}while(1);null===n&&(k=r);e.baseState=k;e.firstBaseUpdate=l;e.lastBaseUpdate=n;null===f&&(e.shared.lanes=0);oi|=g;a.lanes=g;a.memoizedState=r}}function pi(a,b){if("function"!==typeof a)throw Error(p(191,a));a.call(b)}function qi(a,b){var c=a.callbacks;if(null!==c)for(a.callbacks=null,a=0;a<c.length;a++)pi(c[a],b)} +function ri(a,b,c){a=c.ref;if(null!==a&&"function"!==typeof a&&"object"!==typeof a){if(c._owner){c=c._owner;if(c){if(1!==c.tag)throw Error(p(309));var d=c.stateNode}if(!d)throw Error(p(147,a));var e=d,f=""+a;if(null!==b&&null!==b.ref&&"function"===typeof b.ref&&b.ref._stringRef===f)return b.ref;b=function(a){var b=e.refs;null===a?delete b[f]:b[f]=a};b._stringRef=f;return b}if("string"!==typeof a)throw Error(p(284));if(!c._owner)throw Error(p(290,a));}return a} +function si(a,b){a=Object.prototype.toString.call(b);throw Error(p(31,"[object Object]"===a?"object with keys {"+Object.keys(b).join(", ")+"}":a));}function ti(a){var b=a._init;return b(a._payload)} +function ui(a){function b(b,c){if(a){var d=b.deletions;null===d?(b.deletions=[c],b.flags|=16):d.push(c)}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b){a=vi(a,b);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return b.flags|=1048576,c;d=b.alternate;if(null!==d)return d=d.index,d<c?(b.flags|=16777218,c):d;b.flags|=16777218;return c} +function g(b){a&&null===b.alternate&&(b.flags|=16777218);return b}function h(a,b,c,d){if(null===b||6!==b.tag)return b=wi(c,a.mode,d),b.return=a,b;b=e(b,c);b.return=a;return b}function k(a,b,c,d){var f=c.type;if(f===Pa)return n(a,b,c.props.children,d,c.key);if(null!==b&&(b.elementType===f||"object"===typeof f&&null!==f&&f.$$typeof===Za&&ti(f)===b.type))return d=e(b,c.props),d.ref=ri(a,b,c),d.return=a,d;d=xi(c.type,c.key,c.props,null,a.mode,d);d.ref=ri(a,b,c);d.return=a;return d}function l(a,b,c,d){if(null=== +b||4!==b.tag||b.stateNode.containerInfo!==c.containerInfo||b.stateNode.implementation!==c.implementation)return b=yi(c,a.mode,d),b.return=a,b;b=e(b,c.children||[]);b.return=a;return b}function n(a,b,c,d,f){if(null===b||7!==b.tag)return b=zi(c,a.mode,d,f),b.return=a,b;b=e(b,c);b.return=a;return b}function r(a,b,c){if("string"===typeof b&&""!==b||"number"===typeof b)return b=wi(""+b,a.mode,c),b.return=a,b;if("object"===typeof b&&null!==b){switch(b.$$typeof){case Na:return c=xi(b.type,b.key,b.props, +null,a.mode,c),c.ref=ri(a,null,b),c.return=a,c;case Oa:return b=yi(b,a.mode,c),b.return=a,b;case Za:var d=b._init;return r(a,d(b._payload),c)}if(Ab(b)||fb(b))return b=zi(b,a.mode,c,null),b.return=a,b;si(a,b)}return null}function w(a,b,c,d){var e=null!==b?b.key:null;if("string"===typeof c&&""!==c||"number"===typeof c)return null!==e?null:h(a,b,""+c,d);if("object"===typeof c&&null!==c){switch(c.$$typeof){case Na:return c.key===e?k(a,b,c,d):null;case Oa:return c.key===e?l(a,b,c,d):null;case Za:return e= +c._init,w(a,b,e(c._payload),d)}if(Ab(c)||fb(c))return null!==e?null:n(a,b,c,d,null);si(a,c)}return null}function x(a,b,c,d,e){if("string"===typeof d&&""!==d||"number"===typeof d)return a=a.get(c)||null,h(b,a,""+d,e);if("object"===typeof d&&null!==d){switch(d.$$typeof){case Na:return a=a.get(null===d.key?c:d.key)||null,k(b,a,d,e);case Oa:return a=a.get(null===d.key?c:d.key)||null,l(b,a,d,e);case Za:var f=d._init;return x(a,b,c,f(d._payload),e)}if(Ab(d)||fb(d))return a=a.get(c)||null,n(b,a,d,e,null); +si(b,d)}return null}function m(e,g,h,k){for(var l=null,n=null,m=g,u=g=0,y=null;null!==m&&u<h.length;u++){m.index>u?(y=m,m=null):y=m.sibling;var v=w(e,m,h[u],k);if(null===v){null===m&&(m=y);break}a&&m&&null===v.alternate&&b(e,m);g=f(v,g,u);null===n?l=v:n.sibling=v;n=v;m=y}if(u===h.length)return c(e,m),I&&Fh(e,u),l;if(null===m){for(;u<h.length;u++)m=r(e,h[u],k),null!==m&&(g=f(m,g,u),null===n?l=m:n.sibling=m,n=m);I&&Fh(e,u);return l}for(m=d(e,m);u<h.length;u++)y=x(m,e,u,h[u],k),null!==y&&(a&&null!== +y.alternate&&m.delete(null===y.key?u:y.key),g=f(y,g,u),null===n?l=y:n.sibling=y,n=y);a&&m.forEach(function(a){return b(e,a)});I&&Fh(e,u);return l}function t(e,g,h,k){var l=fb(h);if("function"!==typeof l)throw Error(p(150));h=l.call(h);if(null==h)throw Error(p(151));for(var n=l=null,m=g,u=g=0,y=null,v=h.next();null!==m&&!v.done;u++,v=h.next()){m.index>u?(y=m,m=null):y=m.sibling;var t=w(e,m,v.value,k);if(null===t){null===m&&(m=y);break}a&&m&&null===t.alternate&&b(e,m);g=f(t,g,u);null===n?l=t:n.sibling= +t;n=t;m=y}if(v.done)return c(e,m),I&&Fh(e,u),l;if(null===m){for(;!v.done;u++,v=h.next())v=r(e,v.value,k),null!==v&&(g=f(v,g,u),null===n?l=v:n.sibling=v,n=v);I&&Fh(e,u);return l}for(m=d(e,m);!v.done;u++,v=h.next())v=x(m,e,u,v.value,k),null!==v&&(a&&null!==v.alternate&&m.delete(null===v.key?u:v.key),g=f(v,g,u),null===n?l=v:n.sibling=v,n=v);a&&m.forEach(function(a){return b(e,a)});I&&Fh(e,u);return l}function A(a,d,f,h){"object"===typeof f&&null!==f&&f.type===Pa&&null===f.key&&(f=f.props.children);if("object"=== +typeof f&&null!==f){switch(f.$$typeof){case Na:a:{for(var k=f.key,l=d;null!==l;){if(l.key===k){k=f.type;if(k===Pa){if(7===l.tag){c(a,l.sibling);d=e(l,f.props.children);d.return=a;a=d;break a}}else if(l.elementType===k||"object"===typeof k&&null!==k&&k.$$typeof===Za&&ti(k)===l.type){c(a,l.sibling);d=e(l,f.props);d.ref=ri(a,l,f);d.return=a;a=d;break a}c(a,l);break}else b(a,l);l=l.sibling}f.type===Pa?(d=zi(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=xi(f.type,f.key,f.props,null,a.mode,h),h.ref= +ri(a,d,f),h.return=a,a=h)}return g(a);case Oa:a:{for(l=f.key;null!==d;){if(d.key===l)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=yi(f,a.mode,h);d.return=a;a=d}return g(a);case Za:return l=f._init,A(a,d,l(f._payload),h)}if(Ab(f))return m(a,d,f,h);if(fb(f))return t(a,d,f,h);si(a,f)}return"string"===typeof f&&""!==f||"number"===typeof f? +(f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=wi(f,a.mode,h),d.return=a,a=d),g(a)):c(a,d)}return A}var Ai=ui(!0),Bi=ui(!1),Ci=kg(null),Di=kg(0);function Ei(a,b){a=Fi;G(Di,a);G(Ci,b);Fi=a|b.baseLanes}function Gi(){G(Di,Fi);G(Ci,Ci.current)}function Hi(){Fi=Di.current;F(Ci);F(Di)}var Ii=kg(null),Ji=null;function Ki(a){var b=a.alternate;G(Ii,a);null===Ji&&(null===b||null!==Ci.current?Ji=a:null!==b.memoizedState&&(Ji=a))} +function Li(a){if(22===a.tag){if(G(Ii,a),null===Ji){var b=a.alternate;null!==b&&null!==b.memoizedState&&(Ji=a)}}else Mi()}function Mi(){G(Ii,Ii.current)}function Ni(a){F(Ii);Ji===a&&(Ji=null)}var Oi=kg(0); +function Pi(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||"$?"===c.data||"$!"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&128))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}var Qi=[]; +function Ri(){for(var a=0;a<Qi.length;a++)Qi[a]._workInProgressVersionPrimary=null;Qi.length=0}var Si=Error(p(460));function Ti(a){a=a.status;return"fulfilled"===a||"rejected"===a}function Ui(){} +function Vi(a,b,c){c=a[c];void 0===c?a.push(b):c!==b&&(b.then(Ui,Ui),b=c);switch(b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;default:"string"===typeof b.status?b.then(Ui,Ui):(a=b,a.status="pending",a.then(function(a){if("pending"===b.status){var c=b;c.status="fulfilled";c.value=a}},function(a){if("pending"===b.status){var c=b;c.status="rejected";c.reason=a}}));switch(b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;}Wi=b;throw Si;}} +var Wi=null,Xi=Ma.ReactCurrentDispatcher,Yi=Ma.ReactCurrentBatchConfig,Zi=0,L=null,M=null,O=null,$i=!1,aj=!1,bj=!1,cj=0,dj=0,ej=null,fj=0;function P(){throw Error(p(321));}function gj(a,b){if(null===b)return!1;for(var c=0;c<b.length&&c<a.length;c++)if(!of(a[c],b[c]))return!1;return!0}function hj(a,b,c,d,e,f){Zi=f;L=b;b.memoizedState=null;b.updateQueue=null;b.lanes=0;Xi.current=null===a||null===a.memoizedState?ij:jj;bj=!1;a=c(d,e);bj=!1;aj&&(a=kj(b,c,d,e));lj();return a} +function lj(){Xi.current=mj;var a=null!==M&&null!==M.next;Zi=0;O=M=L=null;$i=!1;dj=0;ej=null;if(a)throw Error(p(300));}function kj(a,b,c,d){var e=0;do{aj=!1;dj=0;if(25<=e)throw Error(p(301));e+=1;O=M=null;a.updateQueue=null;Xi.current=nj;var f=b(c,d)}while(aj);return f}function oj(){var a=0!==cj;cj=0;return a}function pj(a,b,c){b.updateQueue=a.updateQueue;b.flags&=-2053;a.lanes&=~c} +function qj(){if($i){for(var a=L.memoizedState;null!==a;){var b=a.queue;null!==b&&(b.pending=null);a=a.next}$i=!1}Zi=0;O=M=L=null;aj=!1;dj=cj=0;ej=null}function rj(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===O?L.memoizedState=O=a:O=O.next=a;return O} +function sj(){if(null===M){var a=L.alternate;a=null!==a?a.memoizedState:null}else a=M.next;var b=null===O?L.memoizedState:O.next;if(null!==b)O=b,M=a;else{if(null===a)if(null===L.alternate)a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};else throw Error(p(310));M=a;a={memoizedState:M.memoizedState,baseState:M.baseState,baseQueue:M.baseQueue,queue:M.queue,next:null};null===O?L.memoizedState=O=a:O=O.next=a}return O}var tj;tj=function(){return{lastEffect:null,events:null,stores:null}}; +function uj(a){if(null!==a&&"object"===typeof a){if("function"===typeof a.then){var b=dj;dj+=1;null===ej&&(ej=[]);return Vi(ej,a,b)}if(a.$$typeof===Ta||a.$$typeof===Ua)return vj(a)}throw Error(p(438,String(a)));}function wj(a,b){return"function"===typeof b?b(a):b} +function xj(a){var b=sj(),c=b.queue;if(null===c)throw Error(p(311));c.lastRenderedReducer=a;var d=M,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g}d.baseQueue=e=f;c.pending=null}if(null!==e){f=e.next;d=d.baseState;var h=g=null,k=null,l=f;do{var n=l.lane&-1073741825;if(n!==l.lane?(K&n)===n:(Zi&n)===n)null!==k&&(k=k.next={lane:0,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null}),n=l.action,bj&&a(d,n),d=l.hasEagerState?l.eagerState: +a(d,n);else{var r={lane:n,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null};null===k?(h=k=r,g=d):k=k.next=r;L.lanes|=n;oi|=n}l=l.next}while(null!==l&&l!==f);null===k?g=d:k.next=h;of(d,b.memoizedState)||(yj=!0);b.memoizedState=d;b.baseState=g;b.baseQueue=k;c.lastRenderedState=d}null===e&&(c.lanes=0);return[b.memoizedState,c.dispatch]} +function zj(a){var b=sj(),c=b.queue;if(null===c)throw Error(p(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);of(f,b.memoizedState)||(yj=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f}return[f,d]}function Aj(){} +function Bj(a,b){var c=L,d=sj(),e=b(),f=!of((M||d).memoizedState,e);f&&(d.memoizedState=e,yj=!0);d=d.queue;Cj(Dj.bind(null,c,d,a),[a]);if(d.getSnapshot!==b||f||null!==O&&O.memoizedState.tag&1){c.flags|=2048;Ej(9,Fj.bind(null,c,d,e,b),void 0,null);if(null===Q)throw Error(p(349));0!==(Zi&60)||Gj(c,b,e)}return e}function Gj(a,b,c){a.flags|=16384;a={getSnapshot:b,value:c};b=L.updateQueue;null===b?(b=tj(),L.updateQueue=b,b.stores=[a]):(c=b.stores,null===c?b.stores=[a]:c.push(a))} +function Fj(a,b,c,d){b.value=c;b.getSnapshot=d;Hj(b)&&Ij(a)}function Dj(a,b,c){return c(function(){Hj(b)&&Ij(a)})}function Hj(a){var b=a.getSnapshot;a=a.value;try{var c=b();return!of(a,c)}catch(d){return!0}}function Ij(a){var b=ci(a,2);null!==b&&Jj(b,a,2,-1)}function Kj(a){var b=rj();"function"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:wj,lastRenderedState:a};b.queue=a;a=a.dispatch=Lj.bind(null,L,a);return[b.memoizedState,a]} +function Ej(a,b,c,d){a={tag:a,create:b,destroy:c,deps:d,next:null};b=L.updateQueue;null===b?(b=tj(),L.updateQueue=b,b.lastEffect=a.next=a):(c=b.lastEffect,null===c?b.lastEffect=a.next=a:(d=c.next,c.next=a,a.next=d,b.lastEffect=a));return a}function Mj(){return sj().memoizedState}function Nj(a,b,c,d){var e=rj();L.flags|=a;e.memoizedState=Ej(1|b,c,void 0,void 0===d?null:d)} +function Oj(a,b,c,d){var e=sj();d=void 0===d?null:d;var f=void 0;if(null!==M){var g=M.memoizedState;f=g.destroy;if(null!==d&&gj(d,g.deps)){e.memoizedState=Ej(b,c,f,d);return}}L.flags|=a;e.memoizedState=Ej(1|b,c,f,d)}function Pj(a,b){Nj(8390656,8,a,b)}function Cj(a,b){Oj(2048,8,a,b)}function Qj(a,b){return Oj(4,2,a,b)}function Rj(a,b){return Oj(4,4,a,b)} +function Sj(a,b){if("function"===typeof b)return a=a(),b(a),function(){b(null)};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null}}function Tj(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;Oj(4,4,Sj.bind(null,b,a),c)}function Uj(){}function Vj(a,b){var c=sj();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&gj(b,d[1]))return d[0];c.memoizedState=[a,b];return a} +function Wj(a,b){var c=sj();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&gj(b,d[1]))return d[0];bj&&a();a=a();c.memoizedState=[a,b];return a}function Xj(a,b,c){if(0===(Zi&42))return a.baseState&&(a.baseState=!1,yj=!0),a.memoizedState=c;of(c,b)||(c=ed(),L.lanes|=c,oi|=c,a.baseState=!0);return b}function Yj(a,b){var c=D;D=0!==c&&8>c?c:8;a(!0);var d=Yi.transition;Yi.transition={};try{a(!1),b()}finally{D=c,Yi.transition=d}}function Zj(){return sj().memoizedState} +function ak(){return sj().memoizedState}function bk(a){for(var b=a.return;null!==b;){switch(b.tag){case 24:case 3:var c=ck(b),d=dk();a=ji(d,c);var e=ki(b,a,c);null!==e&&(Jj(e,b,c,d),li(e,b,c));b={cache:ek()};a.payload=b;return}b=b.return}}function fk(a,b,c){var d=ck(a);c={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(gk(a))hk(b,c);else if(bi(a,b,c,d),c=di(a),null!==c){var e=dk();Jj(c,a,d,e);ik(c,b,d)}Tc(a,d)} +function Lj(a,b,c){var d=ck(a),e={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(gk(a))hk(b,e);else{var f=a.alternate;if(0===a.lanes&&(null===f||0===f.lanes)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,h=f(g,c);e.hasEagerState=!0;e.eagerState=h;if(of(h,g)){bi(a,b,e,0);null===Q&&$h();return}}catch(k){}finally{}bi(a,b,e,d);c=di(a);null!==c&&(e=dk(),Jj(c,a,d,e),ik(c,b,d))}Tc(a,d)}function gk(a){var b=a.alternate;return a===L||null!==b&&b===L} +function hk(a,b){aj=$i=!0;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}function ik(a,b,c){if(0!==(c&8388480)){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;id(a,c)}}var mj={readContext:vj,useCallback:P,useContext:P,useEffect:P,useImperativeHandle:P,useInsertionEffect:P,useLayoutEffect:P,useMemo:P,useReducer:P,useRef:P,useState:P,useDebugValue:P,useDeferredValue:P,useTransition:P,useMutableSource:P,useSyncExternalStore:P,useId:P};mj.useCacheRefresh=P;mj.use=P; +var ij={readContext:vj,useCallback:function(a,b){rj().memoizedState=[a,void 0===b?null:b];return a},useContext:vj,useEffect:Pj,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;Nj(4194308,4,Sj.bind(null,b,a),c)},useLayoutEffect:function(a,b){return Nj(4194308,4,a,b)},useInsertionEffect:function(a,b){Nj(4,2,a,b)},useMemo:function(a,b){var c=rj();b=void 0===b?null:b;bj&&a();a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=rj();b=void 0!==c?c(b):b;d.memoizedState= +d.baseState=b;a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};d.queue=a;a=a.dispatch=fk.bind(null,L,a);return[d.memoizedState,a]},useRef:function(a){var b=rj();a={current:a};return b.memoizedState=a},useState:Kj,useDebugValue:Uj,useDeferredValue:function(a){return rj().memoizedState=a},useTransition:function(){var a=Kj(!1),b=a[0];a=Yj.bind(null,a[1]);rj().memoizedState=a;return[b,a]},useMutableSource:function(){},useSyncExternalStore:function(a,b,c){var d=L,e=rj(); +if(I){if(void 0===c)throw Error(p(407));c=c()}else{c=b();if(null===Q)throw Error(p(349));0!==(Zi&60)||Gj(d,b,c)}e.memoizedState=c;var f={value:c,getSnapshot:b};e.queue=f;Pj(Dj.bind(null,d,f,a),[a]);d.flags|=2048;Ej(9,Fj.bind(null,d,f,c,b),void 0,null);return c},useId:function(){var a=rj(),b=Q.identifierPrefix;if(I){var c=Eh;var d=Dh;c=(d&~(1<<32-Vc(d)-1)).toString(32)+c;b=":"+b+"R"+c;c=cj++;0<c&&(b+="H"+c.toString(32));b+=":"}else c=fj++,b=":"+b+"r"+c.toString(32)+":";return a.memoizedState=b},useCacheRefresh:function(){return rj().memoizedState= +bk.bind(null,L)}};ij.use=uj;var jj={readContext:vj,useCallback:Vj,useContext:vj,useEffect:Cj,useImperativeHandle:Tj,useInsertionEffect:Qj,useLayoutEffect:Rj,useMemo:Wj,useReducer:xj,useRef:Mj,useState:function(){return xj(wj)},useDebugValue:Uj,useDeferredValue:function(a){var b=sj();return Xj(b,M.memoizedState,a)},useTransition:function(){var a=xj(wj)[0],b=sj().memoizedState;return[a,b]},useMutableSource:Aj,useSyncExternalStore:Bj,useId:Zj};jj.useCacheRefresh=ak;jj.use=uj; +var nj={readContext:vj,useCallback:Vj,useContext:vj,useEffect:Cj,useImperativeHandle:Tj,useInsertionEffect:Qj,useLayoutEffect:Rj,useMemo:Wj,useReducer:zj,useRef:Mj,useState:function(){return zj(wj)},useDebugValue:Uj,useDeferredValue:function(a){var b=sj();return null===M?b.memoizedState=a:Xj(b,M.memoizedState,a)},useTransition:function(){var a=zj(wj)[0],b=sj().memoizedState;return[a,b]},useMutableSource:Aj,useSyncExternalStore:Bj,useId:Zj};nj.useCacheRefresh=ak;nj.use=uj; +var jk=ba.unstable_now,kk=0,lk=-1,mk=-1,nk=-1,ok=!1,pk=!1;function qk(a){mk=jk();0>a.actualStartTime&&(a.actualStartTime=jk())}function rk(a,b){if(0<=mk){var c=jk()-mk;a.actualDuration+=c;b&&(a.selfBaseDuration=c);mk=-1}}function sk(a){if(0<=lk){var b=jk()-lk;lk=-1;for(a=a.return;null!==a;){switch(a.tag){case 3:a.stateNode.effectDuration+=b;return;case 12:a.stateNode.effectDuration+=b;return}a=a.return}}} +function tk(a){if(0<=nk){var b=jk()-nk;nk=-1;for(a=a.return;null!==a;){switch(a.tag){case 3:a=a.stateNode;null!==a&&(a.passiveEffectDuration+=b);return;case 12:a=a.stateNode;null!==a&&(a.passiveEffectDuration+=b);return}a=a.return}}}function uk(){lk=jk()}function vk(a){for(var b=a.child;b;)a.actualDuration+=b.actualDuration,b=b.sibling}function wk(a,b){if(a&&a.defaultProps){b=z({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c]);return b}return b} +function xk(a,b,c,d){b=a.memoizedState;c=c(d,b);c=null===c||void 0===c?b:z({},b,c);a.memoizedState=c;0===a.lanes&&(a.updateQueue.baseState=c)} +var yk={isMounted:function(a){return(a=a._reactInternals)?pc(a)===a:!1},enqueueSetState:function(a,b,c){a=a._reactInternals;var d=dk(),e=ck(a),f=ji(d,e);f.payload=b;void 0!==c&&null!==c&&(f.callback=c);b=ki(a,f,e);null!==b&&(Jj(b,a,e,d),li(b,a,e));Tc(a,e)},enqueueReplaceState:function(a,b,c){a=a._reactInternals;var d=dk(),e=ck(a),f=ji(d,e);f.tag=1;f.payload=b;void 0!==c&&null!==c&&(f.callback=c);b=ki(a,f,e);null!==b&&(Jj(b,a,e,d),li(b,a,e));Tc(a,e)},enqueueForceUpdate:function(a,b){a=a._reactInternals; +var c=dk(),d=ck(a),e=ji(c,d);e.tag=2;void 0!==b&&null!==b&&(e.callback=b);b=ki(a,e,d);null!==b&&(Jj(b,a,d,c),li(b,a,d));null!==C&&"function"===typeof C.markForceUpdateScheduled&&C.markForceUpdateScheduled(a,d)}};function zk(a,b,c,d,e,f,g){a=a.stateNode;return"function"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(d,f,g):b.prototype&&b.prototype.isPureReactComponent?!pf(c,d)||!pf(e,f):!0} +function Ak(a,b,c){var d=!1,e=fh;var f=b.contextType;"object"===typeof f&&null!==f?f=vj(f):(e=kh(b)?ih:gh.current,d=b.contextTypes,f=(d=null!==d&&void 0!==d)?jh(a,e):fh);b=new b(c,f);a.memoizedState=null!==b.state&&void 0!==b.state?b.state:null;b.updater=yk;a.stateNode=b;b._reactInternals=a;d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=e,a.__reactInternalMemoizedMaskedChildContext=f);return b} +function Bk(a,b,c,d){a=b.state;"function"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);"function"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&yk.enqueueReplaceState(b,b.state,null)} +function Ck(a,b,c,d){var e=a.stateNode;e.props=c;e.state=a.memoizedState;e.refs={};hi(a);var f=b.contextType;"object"===typeof f&&null!==f?e.context=vj(f):(f=kh(b)?ih:gh.current,e.context=jh(a,f));e.state=a.memoizedState;f=b.getDerivedStateFromProps;"function"===typeof f&&(xk(a,b,f,c),e.state=a.memoizedState);"function"===typeof b.getDerivedStateFromProps||"function"===typeof e.getSnapshotBeforeUpdate||"function"!==typeof e.UNSAFE_componentWillMount&&"function"!==typeof e.componentWillMount||(b=e.state, +"function"===typeof e.componentWillMount&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),b!==e.state&&yk.enqueueReplaceState(e,e.state,null),ni(a,c,e,d),e.state=a.memoizedState);"function"===typeof e.componentDidMount&&(a.flags|=4194308)}function Dk(a,b){try{var c="",d=b;do c+=kb(d),d=d.return;while(d);var e=c}catch(f){e="\nError generating stack: "+f.message+"\n"+f.stack}return{value:a,source:b,stack:e,digest:null}} +function Ek(a,b,c){return{value:a,source:null,stack:null!=c?c:null,digest:null!=b?b:null}}function Fk(a,b){try{console.error(b.value)}catch(c){setTimeout(function(){throw c;})}}function Gk(a,b,c){c=ji(-1,c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){Hk||(Hk=!0,Ik=d);Fk(a,b)};return c} +function Jk(a,b,c){c=ji(-1,c);c.tag=3;var d=a.type.getDerivedStateFromError;if("function"===typeof d){var e=b.value;c.payload=function(){return d(e)};c.callback=function(){Fk(a,b)}}var f=a.stateNode;null!==f&&"function"===typeof f.componentDidCatch&&(c.callback=function(){Fk(a,b);"function"!==typeof d&&(null===Kk?Kk=new Set([this]):Kk.add(this));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:""})});return c} +function Lk(a,b,c,d,e){if(0===(a.mode&1))return a===b?a.flags|=65536:(a.flags|=128,c.flags|=131072,c.flags&=-52805,1===c.tag&&(null===c.alternate?c.tag=17:(b=ji(-1,2),b.tag=2,ki(c,b,2))),c.lanes|=2),a;a.flags|=65536;a.lanes=e;return a}var Mk=Ma.ReactCurrentOwner,Nk=Error(p(461)),yj=!1;function R(a,b,c,d){b.child=null===a?Bi(b,null,c,d):Ai(b,a.child,c,d)} +function Ok(a,b,c,d,e){c=c.render;var f=b.ref;Pk(b,e);Nc(b);d=hj(a,b,c,d,f,e);c=oj();Oc();if(null!==a&&!yj)return pj(a,b,e),Qk(a,b,e);I&&c&&Hh(b);b.flags|=1;R(a,b,d,e);return b.child} +function Rk(a,b,c,d,e){if(null===a){var f=c.type;if("function"===typeof f&&!Sk(f)&&void 0===f.defaultProps&&null===c.compare&&void 0===c.defaultProps)return b.tag=15,b.type=f,Tk(a,b,f,d,e);a=xi(c.type,null,d,b,b.mode,e);a.ref=b.ref;a.return=b;return b.child=a}f=a.child;if(0===(a.lanes&e)){var g=f.memoizedProps;c=c.compare;c=null!==c?c:pf;if(c(g,d)&&a.ref===b.ref)return Qk(a,b,e)}b.flags|=1;a=vi(f,d);a.ref=b.ref;a.return=b;return b.child=a} +function Tk(a,b,c,d,e){if(null!==a){var f=a.memoizedProps;if(pf(f,d)&&a.ref===b.ref)if(yj=!1,b.pendingProps=d=f,0!==(a.lanes&e))0!==(a.flags&131072)&&(yj=!0);else return b.lanes=a.lanes,Qk(a,b,e)}return Uk(a,b,c,d,e)} +function Vk(a,b,c){var d=b.pendingProps,e=d.children,f=0!==(b.stateNode._pendingVisibility&2),g=null!==a?a.memoizedState:null;Wk(a,b);if("hidden"===d.mode||f){if(0!==(b.flags&128)){c=null!==g?g.baseLanes|c:c;if(null!==a){d=b.child=a.child;for(e=0;null!==d;)e=e|d.lanes|d.childLanes,d=d.sibling;b.childLanes=e&~c}else b.childLanes=0,b.child=null;return Xk(a,b,c)}if(0===(b.mode&1))b.memoizedState={baseLanes:0,cachePool:null},null!==a&&Yk(b,null),Gi(),Li(b);else if(0!==(c&1073741824))b.memoizedState={baseLanes:0, +cachePool:null},null!==a&&Yk(b,null!==g?g.cachePool:null),null!==g?Ei(b,g):Gi(),Li(b);else return b.lanes=b.childLanes=1073741824,Xk(a,b,null!==g?g.baseLanes|c:c)}else null!==g?(Yk(b,g.cachePool),Ei(b,g),Mi(),b.memoizedState=null):(null!==a&&Yk(b,null),Gi(),Mi());R(a,b,e,c);return b.child}function Xk(a,b,c){var d=Zk();d=null===d?null:{parent:S._currentValue,pool:d};b.memoizedState={baseLanes:c,cachePool:d};null!==a&&Yk(b,null);Gi();Li(b);return null} +function Wk(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.flags|=512,b.flags|=2097152}function Uk(a,b,c,d,e){var f=kh(c)?ih:gh.current;f=jh(b,f);Pk(b,e);Nc(b);c=hj(a,b,c,d,f,e);d=oj();Oc();if(null!==a&&!yj)return pj(a,b,e),Qk(a,b,e);I&&d&&Hh(b);b.flags|=1;R(a,b,c,e);return b.child}function $k(a,b,c,d,e){var f=kh(d)?ih:gh.current;f=jh(b,f);Pk(b,e);Nc(b);c=kj(b,d,c,f);lj();d=oj();Oc();if(null!==a&&!yj)return pj(a,b,e),Qk(a,b,e);I&&d&&Hh(b);b.flags|=1;R(a,b,c,e);return b.child} +function al(a,b,c,d,e){if(kh(c)){var f=!0;oh(b)}else f=!1;Pk(b,e);if(null===b.stateNode)bl(a,b),Ak(b,c,d),Ck(b,c,d,e),d=!0;else if(null===a){var g=b.stateNode,h=b.memoizedProps;g.props=h;var k=g.context,l=c.contextType;"object"===typeof l&&null!==l?l=vj(l):(l=kh(c)?ih:gh.current,l=jh(b,l));var n=c.getDerivedStateFromProps,r="function"===typeof n||"function"===typeof g.getSnapshotBeforeUpdate;r||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps|| +(h!==d||k!==l)&&Bk(b,g,d,l);gi=!1;var w=b.memoizedState;g.state=w;ni(b,d,g,e);k=b.memoizedState;h!==d||w!==k||hh.current||gi?("function"===typeof n&&(xk(b,c,n,d),k=b.memoizedState),(h=gi||zk(b,c,h,d,w,k,l))?(r||"function"!==typeof g.UNSAFE_componentWillMount&&"function"!==typeof g.componentWillMount||("function"===typeof g.componentWillMount&&g.componentWillMount(),"function"===typeof g.UNSAFE_componentWillMount&&g.UNSAFE_componentWillMount()),"function"===typeof g.componentDidMount&&(b.flags|=4194308)): +("function"===typeof g.componentDidMount&&(b.flags|=4194308),b.memoizedProps=d,b.memoizedState=k),g.props=d,g.state=k,g.context=l,d=h):("function"===typeof g.componentDidMount&&(b.flags|=4194308),d=!1)}else{g=b.stateNode;ii(a,b);h=b.memoizedProps;l=b.type===b.elementType?h:wk(b.type,h);g.props=l;r=b.pendingProps;w=g.context;k=c.contextType;"object"===typeof k&&null!==k?k=vj(k):(k=kh(c)?ih:gh.current,k=jh(b,k));var x=c.getDerivedStateFromProps;(n="function"===typeof x||"function"===typeof g.getSnapshotBeforeUpdate)|| +"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps||(h!==r||w!==k)&&Bk(b,g,d,k);gi=!1;w=b.memoizedState;g.state=w;ni(b,d,g,e);var m=b.memoizedState;h!==r||w!==m||hh.current||gi?("function"===typeof x&&(xk(b,c,x,d),m=b.memoizedState),(l=gi||zk(b,c,l,d,w,m,k)||!1)?(n||"function"!==typeof g.UNSAFE_componentWillUpdate&&"function"!==typeof g.componentWillUpdate||("function"===typeof g.componentWillUpdate&&g.componentWillUpdate(d,m,k),"function"===typeof g.UNSAFE_componentWillUpdate&& +g.UNSAFE_componentWillUpdate(d,m,k)),"function"===typeof g.componentDidUpdate&&(b.flags|=4),"function"===typeof g.getSnapshotBeforeUpdate&&(b.flags|=1024)):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&w===a.memoizedState||(b.flags|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&w===a.memoizedState||(b.flags|=1024),b.memoizedProps=d,b.memoizedState=m),g.props=d,g.state=m,g.context=k,d=l):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&w=== +a.memoizedState||(b.flags|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&w===a.memoizedState||(b.flags|=1024),d=!1)}return cl(a,b,c,d,f,e)} +function cl(a,b,c,d,e,f){Wk(a,b);var g=0!==(b.flags&128);if(!d&&!g)return e&&ph(b,c,!1),Qk(a,b,f);d=b.stateNode;Mk.current=b;if(g&&"function"!==typeof c.getDerivedStateFromError){var h=null;mk=-1}else Nc(b),h=d.render(),Oc();b.flags|=1;null!==a&&g?(g=h,b.child=Ai(b,a.child,null,f),b.child=Ai(b,null,g,f)):R(a,b,h,f);b.memoizedState=d.state;e&&ph(b,c,!0);return b.child} +function dl(a){var b=a.stateNode;b.pendingContext?mh(a,b.pendingContext,b.pendingContext!==b.context):b.context&&mh(a,b.context,!1);og(a,b.containerInfo)}function el(a,b,c,d,e){Vh();Wh(e);b.flags|=256;R(a,b,c,d);return b.child}var fl={dehydrated:null,treeContext:null,retryLane:0};function gl(a){return{baseLanes:a,cachePool:hl()}} +function il(a,b,c){var d=b.pendingProps,e=!1,f=0!==(b.flags&128),g;(g=f)||(g=null!==a&&null===a.memoizedState?!1:0!==(Oi.current&2));g&&(e=!0,b.flags&=-129);if(null===a){if(I){e?Ki(b):Mi();Qh(b);a=b.memoizedState;if(null!==a&&(a=a.dehydrated,null!==a))return 0===(b.mode&1)?b.lanes=2:"$!"===a.data?b.lanes=16:b.lanes=1073741824,null;Ni(b)}f=d.children;a=d.fallback;if(e)return Mi(),d=b.mode,e=b.child,f={mode:"hidden",children:f},0===(d&1)&&null!==e?(e.childLanes=0,e.pendingProps=f,b.mode&2&&(e.actualDuration= +0,e.actualStartTime=-1,e.selfBaseDuration=0,e.treeBaseDuration=0)):e=jl(f,d,0,null),a=zi(a,d,c,null),e.return=b,a.return=b,e.sibling=a,b.child=e,b.child.memoizedState=gl(c),b.memoizedState=fl,a;Ki(b);return kl(b,f)}g=a.memoizedState;if(null!==g){var h=g.dehydrated;if(null!==h)return ll(a,b,f,d,h,g,c)}if(e){Mi();e=d.fallback;f=b.mode;g=a.child;h=g.sibling;var k={mode:"hidden",children:d.children};0===(f&1)&&b.child!==g?(d=b.child,d.childLanes=0,d.pendingProps=k,b.mode&2&&(d.actualDuration=0,d.actualStartTime= +-1,d.selfBaseDuration=g.selfBaseDuration,d.treeBaseDuration=g.treeBaseDuration),b.deletions=null):(d=vi(g,k),d.subtreeFlags=g.subtreeFlags&14680064);null!==h?e=vi(h,e):(e=zi(e,f,c,null),e.flags|=2);e.return=b;d.return=b;d.sibling=e;b.child=d;d=e;e=b.child;f=a.child.memoizedState;null===f?f=gl(c):(g=f.cachePool,null!==g?(h=S._currentValue,g=g.parent!==h?{parent:h,pool:h}:g):g=hl(),f={baseLanes:f.baseLanes|c,cachePool:g});e.memoizedState=f;e.childLanes=a.childLanes&~c;b.memoizedState=fl;return d}Ki(b); +e=a.child;a=e.sibling;d=vi(e,{mode:"visible",children:d.children});0===(b.mode&1)&&(d.lanes=c);d.return=b;d.sibling=null;null!==a&&(c=b.deletions,null===c?(b.deletions=[a],b.flags|=16):c.push(a));b.child=d;b.memoizedState=null;return d}function kl(a,b){b=jl({mode:"visible",children:b},a.mode,0,null);b.return=a;return a.child=b}function ml(a,b,c,d){null!==d&&Wh(d);Ai(b,a.child,null,c);a=kl(b,b.pendingProps.children);a.flags|=2;b.memoizedState=null;return a} +function ll(a,b,c,d,e,f,g){if(c){if(b.flags&256)return Ki(b),b.flags&=-257,d=Ek(Error(p(422))),ml(a,b,g,d);if(null!==b.memoizedState)return Mi(),b.child=a.child,b.flags|=128,null;Mi();f=d.fallback;e=b.mode;d=jl({mode:"visible",children:d.children},e,0,null);f=zi(f,e,g,null);f.flags|=2;d.return=b;f.return=b;d.sibling=f;b.child=d;0!==(b.mode&1)&&Ai(b,a.child,null,g);b.child.memoizedState=gl(g);b.memoizedState=fl;return f}Ki(b);if(0===(b.mode&1))return ml(a,b,g,null);if("$!"===e.data){d=e.nextSibling&& +e.nextSibling.dataset;if(d)var h=d.dgst;d=h;f=Error(p(419));f.digest=d;d=Ek(f,d,void 0);return ml(a,b,g,d)}h=0!==(g&a.childLanes);if(yj||h){d=Q;if(null!==d){switch(g&-g){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:e=64;break;case 536870912:e=268435456;break;default:e= +0}e=0!==(e&(d.suspendedLanes|g))?0:e;if(0!==e&&e!==f.retryLane)throw f.retryLane=e,ci(a,e),Jj(d,a,e,-1),Nk;}nl();return ml(a,b,g,null)}if("$?"===e.data)return b.flags|=128,b.child=a.child,b=ol.bind(null,a),e._reactRetry=b,null;a=f.treeContext;Kh=ch(e.nextSibling);Jh=b;I=!0;Lh=null;null!==a&&(Ah[Bh++]=Dh,Ah[Bh++]=Eh,Ah[Bh++]=Ch,Dh=a.id,Eh=a.overflow,Ch=b);b=kl(b,d.children);b.flags|=4096;return b}function pl(a,b,c){a.lanes|=b;var d=a.alternate;null!==d&&(d.lanes|=b);ql(a.return,b,c)} +function rl(a,b,c,d,e){var f=a.memoizedState;null===f?a.memoizedState={isBackwards:b,rendering:null,renderingStartTime:0,last:d,tail:c,tailMode:e}:(f.isBackwards=b,f.rendering=null,f.renderingStartTime=0,f.last=d,f.tail=c,f.tailMode=e)} +function sl(a,b,c){var d=b.pendingProps,e=d.revealOrder,f=d.tail;R(a,b,d.children,c);d=Oi.current;if(0!==(d&2))d=d&1|2,b.flags|=128;else{if(null!==a&&0!==(a.flags&128))a:for(a=b.child;null!==a;){if(13===a.tag)null!==a.memoizedState&&pl(a,c,b);else if(19===a.tag)pl(a,c,b);else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===b)break a;for(;null===a.sibling;){if(null===a.return||a.return===b)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}d&=1}G(Oi,d);if(0===(b.mode&1))b.memoizedState= +null;else switch(e){case "forwards":c=b.child;for(e=null;null!==c;)a=c.alternate,null!==a&&null===Pi(a)&&(e=c),c=c.sibling;c=e;null===c?(e=b.child,b.child=null):(e=c.sibling,c.sibling=null);rl(b,!1,e,c,f);break;case "backwards":c=null;e=b.child;for(b.child=null;null!==e;){a=e.alternate;if(null!==a&&null===Pi(a)){b.child=e;break}a=e.sibling;e.sibling=c;c=e;e=a}rl(b,!0,c,null,f);break;case "together":rl(b,!1,null,null,void 0);break;default:b.memoizedState=null}return b.child} +function bl(a,b){0===(b.mode&1)&&null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2)}function Qk(a,b,c){null!==a&&(b.dependencies=a.dependencies);mk=-1;oi|=b.lanes;if(0===(c&b.childLanes))return null;if(null!==a&&b.child!==a.child)throw Error(p(153));if(null!==b.child){a=b.child;c=vi(a,a.pendingProps);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=vi(a,a.pendingProps),c.return=b;c.sibling=null}return b.child} +function tl(a,b,c){switch(b.tag){case 3:dl(b);ul(b,S,a.memoizedState.cache);Vh();break;case 26:case 27:case 5:qg(b);break;case 1:kh(b.type)&&oh(b);break;case 4:og(b,b.stateNode.containerInfo);break;case 10:ul(b,b.type._context,b.memoizedProps.value);break;case 12:0!==(c&b.childLanes)&&(b.flags|=4);var d=b.stateNode;d.effectDuration=0;d.passiveEffectDuration=0;break;case 13:d=b.memoizedState;if(null!==d){if(null!==d.dehydrated)return Ki(b),b.flags|=128,null;if(0!==(c&b.child.childLanes))return il(a, +b,c);Ki(b);a=Qk(a,b,c);return null!==a?a.sibling:null}Ki(b);break;case 19:d=0!==(c&b.childLanes);if(0!==(a.flags&128)){if(d)return sl(a,b,c);b.flags|=128}var e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null,e.lastEffect=null);G(Oi,Oi.current);if(d)break;else return null;case 22:case 23:return b.lanes=0,Vk(a,b,c);case 24:ul(b,S,a.memoizedState.cache)}return Qk(a,b,c)}var vl=kg(null),wl=null,xl=null,yl=null;function zl(){yl=xl=wl=null} +function ul(a,b,c){G(vl,b._currentValue);b._currentValue=c}function Al(a){var b=vl.current;a._currentValue=b===db?a._defaultValue:b;F(vl)}function ql(a,b,c){for(;null!==a;){var d=a.alternate;(a.childLanes&b)!==b?(a.childLanes|=b,null!==d&&(d.childLanes|=b)):null!==d&&(d.childLanes&b)!==b&&(d.childLanes|=b);if(a===c)break;a=a.return}} +function Bl(a,b,c){var d=a.child;null!==d&&(d.return=a);for(;null!==d;){var e=d.dependencies;if(null!==e){var f=d.child;for(var g=e.firstContext;null!==g;){if(g.context===b){if(1===d.tag){g=ji(-1,c&-c);g.tag=2;var h=d.updateQueue;if(null!==h){h=h.shared;var k=h.pending;null===k?g.next=g:(g.next=k.next,k.next=g);h.pending=g}}d.lanes|=c;g=d.alternate;null!==g&&(g.lanes|=c);ql(d.return,c,a);e.lanes|=c;break}g=g.next}}else if(10===d.tag)f=d.type===a.type?null:d.child;else if(18===d.tag){f=d.return;if(null=== +f)throw Error(p(341));f.lanes|=c;e=f.alternate;null!==e&&(e.lanes|=c);ql(f,c,a);f=d.sibling}else f=d.child;if(null!==f)f.return=d;else for(f=d;null!==f;){if(f===a){f=null;break}d=f.sibling;if(null!==d){d.return=f.return;f=d;break}f=f.return}d=f}}function Pk(a,b){wl=a;yl=xl=null;a=a.dependencies;null!==a&&null!==a.firstContext&&(0!==(a.lanes&b)&&(yj=!0),a.firstContext=null)} +function vj(a){var b=a._currentValue;if(yl!==a)if(a={context:a,memoizedValue:b,next:null},null===xl){if(null===wl)throw Error(p(308));xl=a;wl.dependencies={lanes:0,firstContext:a}}else xl=xl.next=a;return b} +var Cl="undefined"!==typeof AbortController?AbortController:function(){var a=[],b=this.signal={aborted:!1,addEventListener:function(b,d){a.push(d)}};this.abort=function(){b.aborted=!0;a.forEach(function(a){return a()})}},Dl=ba.unstable_scheduleCallback,El=ba.unstable_NormalPriority,S={$$typeof:Ta,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_defaultValue:null,_globalName:null};function ek(){return{controller:new Cl,data:new Map,refCount:0}} +function Fl(a){a.refCount--;0===a.refCount&&Dl(El,function(){a.controller.abort()})}var Gl=Ma.ReactCurrentBatchConfig,Hl=kg(null);function Zk(){var a=Hl.current;return null!==a?a:Q.pooledCache}function Yk(a,b){null===b?G(Hl,Hl.current):G(Hl,b.pool)}function hl(){var a=Zk();return null===a?null:{parent:S._currentValue,pool:a}}function Il(a){a.flags|=2097664}var Jl,Kl,Ll,Ml; +Jl=function(a,b){for(var c=b.child;null!==c;){if(5===c.tag||6===c.tag)a.appendChild(c.stateNode);else if(4!==c.tag&&27!==c.tag&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return}c.sibling.return=c.return;c=c.sibling}};Kl=function(){}; +Ll=function(a,b,c,d){var e=a.memoizedProps;if(e!==d){a=b.stateNode;var f=null;switch(c){case "input":e=tb(a,e);d=tb(a,d);f=[];break;case "select":e=z({},e,{value:void 0});d=z({},d,{value:void 0});f=[];break;case "textarea":e=Cb(a,e);d=Cb(a,d);f=[];break;default:"function"!==typeof e.onClick&&"function"===typeof d.onClick&&(a.onclick=fg)}Qb(c,d);var g;c=null;for(l in e)if(!d.hasOwnProperty(l)&&e.hasOwnProperty(l)&&null!=e[l])if("style"===l){var h=e[l];for(g in h)h.hasOwnProperty(g)&&(c||(c={}),c[g]= "")}else"dangerouslySetInnerHTML"!==l&&"children"!==l&&"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(wa.hasOwnProperty(l)?f||(f=[]):(f=f||[]).push(l,null));for(l in d){var k=d[l];h=null!=e?e[l]:void 0;if(d.hasOwnProperty(l)&&k!==h&&(null!=k||null!=h))if("style"===l)if(h){for(g in h)!h.hasOwnProperty(g)||k&&k.hasOwnProperty(g)||(c||(c={}),c[g]="");for(g in k)k.hasOwnProperty(g)&&h[g]!==k[g]&&(c||(c={}),c[g]=k[g])}else c||(f||(f=[]),f.push(l,c)),c=k;else"dangerouslySetInnerHTML"=== -l?(k=k?k.__html:void 0,h=h?h.__html:void 0,null!=k&&h!==k&&(f=f||[]).push(l,k)):"children"===l?"string"!==typeof k&&"number"!==typeof k||(f=f||[]).push(l,""+k):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&(wa.hasOwnProperty(l)?(null!=k&&"onScroll"===l&&E("scroll",a),f||h===k||(f=[])):(f=f||[]).push(l,k))}c&&(f=f||[]).push("style",c);var l=f;if(b.updateQueue=l)b.flags|=4}};Hl=function(a,b,c,d){c!==d&&(b.flags|=4)}; -function Il(a,b){if(!I)switch(a.tailMode){case "hidden":b=a.tail;for(var c=null;null!==b;)null!==b.alternate&&(c=b),b=b.sibling;null===c?a.tail=null:c.sibling=null;break;case "collapsed":c=a.tail;for(var d=null;null!==c;)null!==c.alternate&&(d=c),c=c.sibling;null===d?b||null===a.tail?a.tail=null:a.tail.sibling=null:d.sibling=null}} +l?(k=k?k.__html:void 0,h=h?h.__html:void 0,null!=k&&h!==k&&(f=f||[]).push(l,k)):"children"===l?"string"!==typeof k&&"number"!==typeof k||(f=f||[]).push(l,""+k):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&(wa.hasOwnProperty(l)?(null!=k&&"onScroll"===l&&E("scroll",a),f||h===k||(f=[])):(f=f||[]).push(l,k))}c&&(f=f||[]).push("style",c);var l=f;if(b.updateQueue=l)b.flags|=4}};Ml=function(a,b,c,d){c!==d&&(b.flags|=4)}; +function Nl(a,b){if(!I)switch(a.tailMode){case "hidden":b=a.tail;for(var c=null;null!==b;)null!==b.alternate&&(c=b),b=b.sibling;null===c?a.tail=null:c.sibling=null;break;case "collapsed":c=a.tail;for(var d=null;null!==c;)null!==c.alternate&&(d=c),c=c.sibling;null===d?b||null===a.tail?a.tail=null:a.tail.sibling=null:d.sibling=null}} function T(a){var b=null!==a.alternate&&a.alternate.child===a.child,c=0,d=0;if(b)if(0!==(a.mode&2)){for(var e=a.selfBaseDuration,f=a.child;null!==f;)c|=f.lanes|f.childLanes,d|=f.subtreeFlags&14680064,d|=f.flags&14680064,e+=f.treeBaseDuration,f=f.sibling;a.treeBaseDuration=e}else for(e=a.child;null!==e;)c|=e.lanes|e.childLanes,d|=e.subtreeFlags&14680064,d|=e.flags&14680064,e.return=a,e=e.sibling;else if(0!==(a.mode&2)){e=a.actualDuration;f=a.selfBaseDuration;for(var g=a.child;null!==g;)c|=g.lanes| g.childLanes,d|=g.subtreeFlags,d|=g.flags,e+=g.actualDuration,f+=g.treeBaseDuration,g=g.sibling;a.actualDuration=e;a.treeBaseDuration=f}else for(e=a.child;null!==e;)c|=e.lanes|e.childLanes,d|=e.subtreeFlags,d|=e.flags,e.return=a,e=e.sibling;a.subtreeFlags|=d;a.childLanes=c;return b} -function Jl(a,b,c){var d=b.pendingProps;Dh(b);switch(b.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return T(b),null;case 1:return fh(b.type)&&gh(),T(b),null;case 3:c=b.stateNode;d=null;null!==a&&(d=a.memoizedState.cache);b.memoizedState.cache!==d&&(b.flags|=2048);vl(S);qg();F(ch);F(H);Mi();c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null);if(null===a||null===a.child)Oh(b)?b.flags|=4:null===a||a.memoizedState.isDehydrated&&0===(b.flags&256)||(b.flags|= -1024,null!==Gh&&(Kl(Gh),Gh=null));Fl(a,b);T(b);return null;case 26:return(a?a.ref:null)!==b.ref&&Dl(b),null===a||a.memoizedState!==b.memoizedState?b.flags|=4:null===b.memoizedState&&Gl(a,b,b.type,b.pendingProps),T(b),null;case 27:sg(b);c=og.current;var e=b.type;if(null!==a&&null!=b.stateNode)Gl(a,b,e,d),a.ref!==b.ref&&Dl(b);else{if(!d){if(null===b.stateNode)throw Error(m(166));T(b);return null}a=mg.current;Oh(b)?Mh(b,a):(b.stateNode=ah(e,d,c),b.flags|=4);null!==b.ref&&Dl(b)}T(b);return null;case 5:sg(b); -c=b.type;if(null!==a&&null!=b.stateNode)Gl(a,b,c,d),a.ref!==b.ref&&Dl(b);else{if(!d){if(null===b.stateNode)throw Error(m(166));T(b);return null}a=mg.current;if(Oh(b))Mh(b,a)&&(b.flags|=4);else{a=gg(c,d,og.current,a);a[ea]=b;a[fa]=d;El(a,b,!1,!1);b.stateNode=a;a:switch(hg(a,c,d),c){case "button":case "input":case "select":case "textarea":a=!!d.autoFocus;break a;case "img":a=!0;break a;default:a=!1}a&&(b.flags|=4)}null!==b.ref&&Dl(b)}T(b);return null;case 6:if(a&&null!=b.stateNode)Hl(a,b,a.memoizedProps, -d);else{if("string"!==typeof d&&null===b.stateNode)throw Error(m(166));a=og.current;if(Oh(b)){a=b.stateNode;c=b.memoizedProps;a[ea]=b;if(d=a.nodeValue!==c)if(e=Eh,null!==e)switch(e.tag){case 3:eg(a.nodeValue,c,0!==(e.mode&1));break;case 27:case 5:!0!==e.memoizedProps.suppressHydrationWarning&&eg(a.nodeValue,c,0!==(e.mode&1))}d&&(b.flags|=4)}else a=(9===a.nodeType?a:a.ownerDocument).createTextNode(d),a[ea]=b,b.stateNode=a}T(b);return null;case 13:Ii(b);d=b.memoizedState;if(null===a||null!==a.memoizedState&& -null!==a.memoizedState.dehydrated){if(I&&null!==Fh&&0!==(b.mode&1)&&0===(b.flags&128))Ph(),Qh(),b.flags|=98560,e=!1;else if(e=Oh(b),null!==d&&null!==d.dehydrated){if(null===a){if(!e)throw Error(m(318));e=b.memoizedState;e=null!==e?e.dehydrated:null;if(!e)throw Error(m(317));e[ea]=b;T(b);0!==(b.mode&2)&&null!==d&&(e=b.child,null!==e&&(b.treeBaseDuration-=e.treeBaseDuration))}else Qh(),0===(b.flags&128)&&(b.memoizedState=null),b.flags|=4,T(b),0!==(b.mode&2)&&null!==d&&(e=b.child,null!==e&&(b.treeBaseDuration-= -e.treeBaseDuration));e=!1}else null!==Gh&&(Kl(Gh),Gh=null),e=!0;if(!e)return b.flags&65536?b:null}if(0!==(b.flags&128))return b.lanes=c,0!==(b.mode&2)&&qk(b),b;c=null!==d;a=null!==a&&null!==a.memoizedState;if(c){d=b.child;e=null;null!==d.alternate&&null!==d.alternate.memoizedState&&null!==d.alternate.memoizedState.cachePool&&(e=d.alternate.memoizedState.cachePool.pool);var f=null;null!==d.memoizedState&&null!==d.memoizedState.cachePool&&(f=d.memoizedState.cachePool.pool);f!==e&&(d.flags|=2048)}c!== -a&&c&&(b.child.flags|=8192);null!==b.updateQueue&&(b.flags|=4);T(b);0!==(b.mode&2)&&c&&(a=b.child,null!==a&&(b.treeBaseDuration-=a.treeBaseDuration));return null;case 4:return qg(),Fl(a,b),null===a&&Yf(b.stateNode.containerInfo),T(b),null;case 10:return vl(b.type._context),T(b),null;case 17:return fh(b.type)&&gh(),T(b),null;case 19:F(Ji);e=b.memoizedState;if(null===e)return T(b),null;d=0!==(b.flags&128);f=e.rendering;if(null===f)if(d)Il(e,!1);else{if(0!==U||null!==a&&0!==(a.flags&128))for(a=b.child;null!== -a;){f=Ki(a);if(null!==f){b.flags|=128;Il(e,!1);a=f.updateQueue;null!==a&&(b.updateQueue=a,b.flags|=4);b.subtreeFlags=0;a=c;for(c=b.child;null!==c;)Ll(c,a),c=c.sibling;G(Ji,Ji.current&1|2);return b.child}a=a.sibling}null!==e.tail&&A()>Ml&&(b.flags|=128,d=!0,Il(e,!1),b.lanes=8388608)}else{if(!d)if(a=Ki(f),null!==a){if(b.flags|=128,d=!0,a=a.updateQueue,null!==a&&(b.updateQueue=a,b.flags|=4),Il(e,!0),null===e.tail&&"hidden"===e.tailMode&&!f.alternate&&!I)return T(b),null}else 2*A()-e.renderingStartTime> -Ml&&1073741824!==c&&(b.flags|=128,d=!0,Il(e,!1),b.lanes=8388608);e.isBackwards?(f.sibling=b.child,b.child=f):(a=e.last,null!==a?a.sibling=f:b.child=f,e.last=f)}if(null!==e.tail)return b=e.tail,e.rendering=b,e.tail=b.sibling,e.renderingStartTime=A(),b.sibling=null,a=Ji.current,G(Ji,d?a&1|2:a&1),b;T(b);return null;case 22:case 23:return Ii(b),Ci(),d=null!==b.memoizedState,null!==a?null!==a.memoizedState!==d&&(b.flags|=8192):d&&(b.flags|=8192),d&&0!==(b.mode&1)?0!==(c&1073741824)&&0===(b.flags&128)&& -(T(b),b.subtreeFlags&6&&(b.flags|=8192)):T(b),null!==b.updateQueue&&(b.flags|=4),c=null,null!==a&&null!==a.memoizedState&&null!==a.memoizedState.cachePool&&(c=a.memoizedState.cachePool.pool),d=null,null!==b.memoizedState&&null!==b.memoizedState.cachePool&&(d=b.memoizedState.cachePool.pool),d!==c&&(b.flags|=2048),null!==a&&F(Cl),null;case 24:return c=null,null!==a&&(c=a.memoizedState.cache),b.memoizedState.cache!==c&&(b.flags|=2048),vl(S),T(b),null;case 25:return null}throw Error(m(156,b.tag));} -function Nl(a,b){Dh(b);switch(b.tag){case 1:return fh(b.type)&&gh(),a=b.flags,a&65536?(b.flags=a&-65537|128,0!==(b.mode&2)&&qk(b),b):null;case 3:return vl(S),qg(),F(ch),F(H),Mi(),a=b.flags,0!==(a&65536)&&0===(a&128)?(b.flags=a&-65537|128,b):null;case 26:case 27:case 5:return sg(b),null;case 13:Ii(b);a=b.memoizedState;if(null!==a&&null!==a.dehydrated){if(null===b.alternate)throw Error(m(340));Qh()}a=b.flags;return a&65536?(b.flags=a&-65537|128,0!==(b.mode&2)&&qk(b),b):null;case 19:return F(Ji),null; -case 4:return qg(),null;case 10:return vl(b.type._context),null;case 22:case 23:return Ii(b),Ci(),null!==a&&F(Cl),a=b.flags,a&65536?(b.flags=a&-65537|128,0!==(b.mode&2)&&qk(b),b):null;case 24:return vl(S),null;case 25:return null;default:return null}} -function Ol(a,b){Dh(b);switch(b.tag){case 1:a=b.type.childContextTypes;null!==a&&void 0!==a&&gh();break;case 3:vl(S);qg();F(ch);F(H);Mi();break;case 26:case 27:case 5:sg(b);break;case 4:qg();break;case 13:Ii(b);break;case 19:F(Ji);break;case 10:vl(b.type._context);break;case 22:case 23:Ii(b);Ci();null!==a&&F(Cl);break;case 24:vl(S)}}var Pl=!1,Ql=!1,Rl="function"===typeof WeakSet?WeakSet:Set,V=null,Sl=null,Tl=null;function Ul(a){return 0!==(a.mode&2)&&0!==(J&4)} -function Vl(a,b){b.props=a.memoizedProps;b.state=a.memoizedState;if(Ul(a))try{pk(),b.componentWillUnmount()}finally{nk(a)}else b.componentWillUnmount()}function Wl(a,b){try{var c=a.ref;if(null!==c){var d=a.stateNode;switch(a.tag){case 26:case 27:case 5:var e=d;break;default:e=d}if("function"===typeof c)if(Ul(a))try{pk(),a.refCleanup=c(e)}finally{nk(a)}else a.refCleanup=c(e);else c.current=e}}catch(f){W(a,b,f)}} -function Xl(a,b){var c=a.ref,d=a.refCleanup;if(null!==c)if("function"===typeof d)try{if(Ul(a))try{pk(),d()}finally{nk(a)}else d()}catch(e){W(a,b,e)}finally{a.refCleanup=null,a=a.alternate,null!=a&&(a.refCleanup=null)}else if("function"===typeof c)try{if(Ul(a))try{pk(),c(null)}finally{nk(a)}else c(null)}catch(e){W(a,b,e)}else c.current=null}function Yl(a,b,c){try{c()}catch(d){W(a,b,d)}}var Zl=!1; -function $l(a,b){Og=Ld;a=tf();if(uf(a)){if("selectionStart"in a)var c={start:a.selectionStart,end:a.selectionEnd};else a:{c=(c=a.ownerDocument)&&c.defaultView||window;var d=c.getSelection&&c.getSelection();if(d&&0!==d.rangeCount){c=d.anchorNode;var e=d.anchorOffset,f=d.focusNode;d=d.focusOffset;try{c.nodeType,f.nodeType}catch(N){c=null;break a}var g=0,h=-1,k=-1,l=0,n=0,q=a,x=null;b:for(;;){for(var u;;){q!==c||0!==e&&3!==q.nodeType||(h=g+e);q!==f||0!==d&&3!==q.nodeType||(k=g+d);3===q.nodeType&&(g+= -q.nodeValue.length);if(null===(u=q.firstChild))break;x=q;q=u}for(;;){if(q===a)break b;x===c&&++l===e&&(h=g);x===f&&++n===d&&(k=g);if(null!==(u=q.nextSibling))break;q=x;x=q.parentNode}q=u}c=-1===h||-1===k?null:{start:h,end:k}}else c=null}c=c||{start:0,end:0}}else c=null;Pg={focusedElem:a,selectionRange:c};Ld=!1;for(V=b;null!==V;)if(b=V,a=b.child,0!==(b.subtreeFlags&1028)&&null!==a)a.return=b,V=a;else for(;null!==V;){b=V;try{var p=b.alternate,t=b.flags;switch(b.tag){case 0:break;case 11:case 15:break; -case 1:if(0!==(t&1024)&&null!==p){var B=p.memoizedProps,v=p.memoizedState,z=b.stateNode,w=z.getSnapshotBeforeUpdate(b.elementType===b.type?B:rk(b.type,B),v);z.__reactInternalSnapshotBeforeUpdate=w}break;case 3:0!==(t&1024)&&Xg(b.stateNode.containerInfo);break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(0!==(t&1024))throw Error(m(163));}}catch(N){W(b,b.return,N)}a=b.sibling;if(null!==a){a.return=b.return;V=a;break}V=b.return}p=Zl;Zl=!1;return p} -function am(a,b,c){var d=b.updateQueue;d=null!==d?d.lastEffect:null;if(null!==d){var e=d=d.next;do{if((e.tag&a)===a){var f=e.destroy;e.destroy=void 0;void 0!==f&&(0!==(a&8)?null!==C&&"function"===typeof C.markComponentPassiveEffectUnmountStarted&&C.markComponentPassiveEffectUnmountStarted(b):0!==(a&4)&&Pc(b),Yl(b,c,f),0!==(a&8)?null!==C&&"function"===typeof C.markComponentPassiveEffectUnmountStopped&&C.markComponentPassiveEffectUnmountStopped():0!==(a&4)&&Qc())}e=e.next}while(e!==d)}} -function bm(a,b){var c=b.updateQueue;c=null!==c?c.lastEffect:null;if(null!==c){var d=c=c.next;do{if((d.tag&a)===a){0!==(a&8)?null!==C&&"function"===typeof C.markComponentPassiveEffectMountStarted&&C.markComponentPassiveEffectMountStarted(b):0!==(a&4)&&null!==C&&"function"===typeof C.markComponentLayoutEffectMountStarted&&C.markComponentLayoutEffectMountStarted(b);var e=d.create;d.destroy=e();0!==(a&8)?null!==C&&"function"===typeof C.markComponentPassiveEffectMountStopped&&C.markComponentPassiveEffectMountStopped(): -0!==(a&4)&&null!==C&&"function"===typeof C.markComponentLayoutEffectMountStopped&&C.markComponentLayoutEffectMountStopped()}d=d.next}while(d!==c)}}function cm(a,b){if(Ul(a)){try{pk(),bm(b,a)}catch(c){W(a,a.return,c)}nk(a)}else try{bm(b,a)}catch(c){W(a,a.return,c)}}function dm(a){var b=a.updateQueue;if(null!==b){var c=a.stateNode;try{li(b,c)}catch(d){W(a,a.return,d)}}} -function em(a){var b=a.type,c=a.memoizedProps,d=a.stateNode;try{a:switch(b){case "button":case "input":case "select":case "textarea":c.autoFocus&&d.focus();break a;case "img":c.src&&(d.src=c.src)}}catch(e){W(a,a.return,e)}} -function fm(a,b){if(J&4)try{var c=a.memoizedProps,d=c.onCommit,e=c.onRender,f=a.stateNode.effectDuration;c=fk;b=null===b?"mount":"update";jk&&(b="nested-update");"function"===typeof e&&e(a.memoizedProps.id,b,a.actualDuration,a.treeBaseDuration,a.actualStartTime,c);"function"===typeof d&&d(a.memoizedProps.id,b,f,c);gm(a);var g=a.return;a:for(;null!==g;){switch(g.tag){case 3:g.stateNode.effectDuration+=f;break a;case 12:g.stateNode.effectDuration+=f;break a}g=g.return}}catch(h){W(a,a.return,h)}} -function hm(a,b,c){var d=c.flags;switch(c.tag){case 0:case 11:case 15:im(a,c);d&4&&cm(c,5);break;case 1:im(a,c);if(d&4)if(a=c.stateNode,null===b)if(Ul(c)){try{pk(),a.componentDidMount()}catch(h){W(c,c.return,h)}nk(c)}else try{a.componentDidMount()}catch(h){W(c,c.return,h)}else{var e=c.elementType===c.type?b.memoizedProps:rk(c.type,b.memoizedProps);b=b.memoizedState;if(Ul(c)){try{pk(),a.componentDidUpdate(e,b,a.__reactInternalSnapshotBeforeUpdate)}catch(h){W(c,c.return,h)}nk(c)}else try{a.componentDidUpdate(e, -b,a.__reactInternalSnapshotBeforeUpdate)}catch(h){W(c,c.return,h)}}d&64&&dm(c);d&512&&Wl(c,c.return);break;case 3:im(a,c);if(d&64&&(d=c.updateQueue,null!==d)){a=null;if(null!==c.child)switch(c.child.tag){case 27:case 5:a=c.child.stateNode;break;case 1:a=c.child.stateNode}try{li(d,a)}catch(h){W(c,c.return,h)}}break;case 26:im(a,c);d&512&&Wl(c,c.return);break;case 27:case 5:im(a,c);null===b&&d&4&&em(c);d&512&&Wl(c,c.return);break;case 12:im(a,c);d&4&&fm(c,b);break;case 13:im(a,c);d&4&&jm(a,c);break; -case 22:if(0!==(c.mode&1)){if(e=null!==c.memoizedState||Pl,!e){b=null!==b&&null!==b.memoizedState||Ql;var f=Pl,g=Ql;Pl=e;(Ql=b)&&!g?km(a,c,0!==(c.subtreeFlags&8772)):im(a,c);Pl=f;Ql=g}}else im(a,c);d&512&&("manual"===c.memoizedProps.mode?Wl(c,c.return):Xl(c,c.return));break;default:im(a,c)}} -function lm(a){var b=a.alternate;null!==b&&(a.alternate=null,lm(b));a.child=null;a.deletions=null;a.sibling=null;5===a.tag&&(b=a.stateNode,null!==b&&oa(b));a.stateNode=null;a.return=null;a.dependencies=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.stateNode=null;a.updateQueue=null}function mm(a){return 5===a.tag||3===a.tag||26===a.tag||27===a.tag||4===a.tag} -function nm(a){a:for(;;){for(;null===a.sibling;){if(null===a.return||mm(a.return))return null;a=a.return}a.sibling.return=a.return;for(a=a.sibling;5!==a.tag&&6!==a.tag&&27!==a.tag&&18!==a.tag;){if(a.flags&2)continue a;if(null===a.child||4===a.tag)continue a;else a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}} -function om(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=fg));else if(4!==d&&27!==d&&(a=a.child,null!==a))for(om(a,b,c),a=a.sibling;null!==a;)om(a,b,c),a=a.sibling} -function pm(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&27!==d&&(a=a.child,null!==a))for(pm(a,b,c),a=a.sibling;null!==a;)pm(a,b,c),a=a.sibling}var X=null,qm=!1;function rm(a,b,c){for(c=c.child;null!==c;)sm(a,b,c),c=c.sibling} -function sm(a,b,c){if(Gc&&"function"===typeof Gc.onCommitFiberUnmount)try{Gc.onCommitFiberUnmount(Fc,c)}catch(h){}switch(c.tag){case 26:Ql||Xl(c,b);rm(a,b,c);c.memoizedState?c.memoizedState.count--:c.stateNode&&(c=c.stateNode,c.parentNode.removeChild(c));break;case 27:Ql||Xl(c,b);var d=X,e=qm;X=c.stateNode;rm(a,b,c);c=c.stateNode;for(a=c.attributes;a.length;)c.removeAttributeNode(a[0]);oa(c);X=d;qm=e;break;case 5:Ql||Xl(c,b);case 6:d=X;e=qm;X=null;rm(a,b,c);X=d;qm=e;null!==X&&(qm?(a=X,c=c.stateNode, -8===a.nodeType?a.parentNode.removeChild(c):a.removeChild(c)):X.removeChild(c.stateNode));break;case 18:null!==X&&(qm?(a=X,c=c.stateNode,8===a.nodeType?Wg(a.parentNode,c):1===a.nodeType&&Wg(a,c),Jd(a)):Wg(X,c.stateNode));break;case 4:d=X;e=qm;X=c.stateNode.containerInfo;qm=!0;rm(a,b,c);X=d;qm=e;break;case 0:case 11:case 14:case 15:if(!Ql&&(d=c.updateQueue,null!==d&&(d=d.lastEffect,null!==d))){e=d=d.next;do{var f=e,g=f.destroy;f=f.tag;void 0!==g&&(0!==(f&2)?Yl(c,b,g):0!==(f&4)&&(Pc(c),Ul(c)?(pk(),Yl(c, -b,g),nk(c)):Yl(c,b,g),Qc()));e=e.next}while(e!==d)}rm(a,b,c);break;case 1:if(!Ql&&(Xl(c,b),d=c.stateNode,"function"===typeof d.componentWillUnmount))try{Vl(c,d)}catch(h){W(c,b,h)}rm(a,b,c);break;case 21:rm(a,b,c);break;case 22:Xl(c,b);c.mode&1?(Ql=(d=Ql)||null!==c.memoizedState,rm(a,b,c),Ql=d):rm(a,b,c);break;default:rm(a,b,c)}}function jm(a,b){if(null===b.memoizedState&&(a=b.alternate,null!==a&&(a=a.memoizedState,null!==a&&(a=a.dehydrated,null!==a))))try{Jd(a)}catch(c){W(b,b.return,c)}} -function tm(a){switch(a.tag){case 13:case 19:var b=a.stateNode;null===b&&(b=a.stateNode=new Rl);return b;case 22:return a=a.stateNode,b=a._retryCache,null===b&&(b=a._retryCache=new Rl),b;default:throw Error(m(435,a.tag));}}function um(a,b){var c=tm(a);b.forEach(function(b){var d=vm.bind(null,a,b);if(!c.has(b)){c.add(b);if(Hc)if(null!==Sl&&null!==Tl)wm(Tl,Sl);else throw Error(m(413));b.then(d,d)}})}function xm(a,b,c){Sl=c;Tl=a;ym(b,a);Tl=Sl=null} -function zm(a,b){var c=b.deletions;if(null!==c)for(var d=0;d<c.length;d++){var e=c[d];try{var f=a,g=b,h=g;a:for(;null!==h;){switch(h.tag){case 27:case 5:X=h.stateNode;qm=!1;break a;case 3:X=h.stateNode.containerInfo;qm=!0;break a;case 4:X=h.stateNode.containerInfo;qm=!0;break a}h=h.return}if(null===X)throw Error(m(160));sm(f,g,e);X=null;qm=!1;var k=e.alternate;null!==k&&(k.return=null);e.return=null}catch(l){W(e,b,l)}}if(b.subtreeFlags&12854)for(b=b.child;null!==b;)ym(b,a),b=b.sibling}var Am=null; -function ym(a,b){var c=a.alternate,d=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:zm(b,a);Bm(a);if(d&4){try{am(3,a,a.return),bm(3,a)}catch(u){W(a,a.return,u)}if(Ul(a)){try{pk(),am(5,a,a.return)}catch(u){W(a,a.return,u)}nk(a)}else try{am(5,a,a.return)}catch(u){W(a,a.return,u)}}break;case 1:zm(b,a);Bm(a);d&512&&null!==c&&Xl(c,c.return);d&64&&Pl&&(a=a.updateQueue,null!==a&&(c=a.callbacks,null!==c&&(d=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=null===d?c:d.concat(c))));break;case 26:var e= -Am;zm(b,a);Bm(a);d&512&&null!==c&&Xl(c,c.return);if(d&4)if(b=null!==c?c.memoizedState:null,d=a.memoizedState,null===c)if(null===d)if(null===a.stateNode){a:{c=a.type;d=a.memoizedProps;b=e.ownerDocument||e;e=b.getElementsByTagName(c);var f=d.children;f=Array.isArray(f)?1===f.length?f[0]:null:f;f="function"!==typeof f&&"symbol"!==typeof f&&null!==f&&void 0!==f?""+f:"";var g=0;b:for(;g<e.length;g++){var h=e[g];if(!h[na]&&"http://www.w3.org/2000/svg"!==h.namespaceURI&&h.textContent===f){var k=0;for(q in d){var l= -d[q];if(d.hasOwnProperty(q)){switch(q){case "children":case "defaultValue":case "dangerouslySetInnerHTML":case "defaultChecked":case "innerHTML":case "suppressContentEditableWarning":case "suppressHydrationWarning":case "style":continue;case "className":if(h.getAttribute("class")!==""+l)continue b;break;case "httpEquiv":if(h.getAttribute("http-equiv")!==""+l)continue b;break;case "contentEditable":case "draggable":case "spellCheck":if(h.getAttribute(q)!==""+l)continue b;break;case "async":case "defer":case "disabled":case "hidden":case "noModule":case "scoped":case "itemScope":if(l!== -h.hasAttribute(q))continue b;break;default:if(Ea(q)){var n=q;if(null==l&&h.hasAttribute(n))continue b;if(h.getAttribute(n)!==""+l)continue b}}k++}}if(h.attributes.length!==k)continue b;h[na]=!0;c=h;break a}}var q=gg(c,d,b,"http://www.w3.org/1999/xhtml");hg(q,c,d);q[ea]=a;q[na]=!0;b.head.insertBefore(q,"title"===c?b.querySelector("head > title"):null);c=q}a.stateNode=c}else Mg(e,a.type,a.stateNode);else a.stateNode=Lg(e,d,a.memoizedProps);else if(b!==d)null===b?null!==c.stateNode&&(c=c.stateNode,c.parentNode.removeChild(c)): -b.count--,null===d?Mg(e,a.type,a.stateNode):Lg(e,d,a.memoizedProps);else if(null===d&&null!==a.stateNode&&(d=a.updateQueue,a.updateQueue=null,null!==d))try{l=a.stateNode,n=a.memoizedProps,ig(l,d,a.type,c.memoizedProps,n),l[fa]=n}catch(u){W(a,a.return,u)}break;case 27:if(d&4&&null===a.alternate){q=a.stateNode;e=a.memoizedProps;for(f=q.firstChild;f;)g=f.nextSibling,h=f.nodeName,f[na]||"HEAD"===h||"BODY"===h||"STYLE"===h||"LINK"===h&&"stylesheet"===f.rel.toLowerCase()||q.removeChild(f),f=g;f=a.type; -for(g=q.attributes;g.length;)q.removeAttributeNode(g[0]);hg(q,f,e);q[ea]=a;q[fa]=e}case 5:zm(b,a);Bm(a);d&512&&null!==c&&Xl(c,c.return);if(a.flags&32){q=a.stateNode;try{Kb(q,"")}catch(u){W(a,a.return,u)}}if(d&4&&(d=a.stateNode,null!=d&&(q=a.memoizedProps,c=null!==c?c.memoizedProps:q,b=a.type,e=a.updateQueue,a.updateQueue=null,null!==e)))try{ig(d,e,b,c,q),d[fa]=q}catch(u){W(a,a.return,u)}break;case 6:zm(b,a);Bm(a);if(d&4){if(null===a.stateNode)throw Error(m(162));c=a.stateNode;d=a.memoizedProps;try{c.nodeValue= -d}catch(u){W(a,a.return,u)}}break;case 3:q=Am;Am=Ag(b.containerInfo);zm(b,a);Am=q;Bm(a);if(d&4&&null!==c&&c.memoizedState.isDehydrated)try{Jd(b.containerInfo)}catch(u){W(a,a.return,u)}break;case 4:c=Am;Am=Ag(a.stateNode.containerInfo);zm(b,a);Bm(a);Am=c;break;case 13:zm(b,a);Bm(a);c=a.child;c.flags&8192&&null!==c.memoizedState&&(null===c.alternate||null===c.alternate.memoizedState)&&(Cm=A());d&4&&(c=a.updateQueue,null!==c&&(a.updateQueue=null,um(a,c)));break;case 22:d&512&&null!==c&&Xl(c,c.return); -q=null!==a.memoizedState;l=null!==c&&null!==c.memoizedState;if(a.mode&1){n=Pl;var x=Ql;Pl=n||q;Ql=x||l;zm(b,a);Ql=x;Pl=n}else zm(b,a);Bm(a);b=a.stateNode;b._current=a;b._visibility&=-3;b._visibility|=b._pendingVisibility&2;if(d&8192&&(b._visibility=q?b._visibility&-2:b._visibility|1,q&&(b=Pl||Ql,null===c||l||b||0!==(a.mode&1)&&Dm(a)),null===a.memoizedProps||"manual"!==a.memoizedProps.mode))a:for(c=null,b=a;;){if(5===b.tag||26===b.tag||27===b.tag){if(null===c){c=b;try{e=b.stateNode,q?(f=e.style,"function"=== -typeof f.setProperty?f.setProperty("display","none","important"):f.display="none"):(g=b.stateNode,h=b.memoizedProps.style,k=void 0!==h&&null!==h&&h.hasOwnProperty("display")?h.display:null,g.style.display=Nb("display",k))}catch(u){W(a,a.return,u)}}}else if(6===b.tag){if(null===c)try{b.stateNode.nodeValue=q?"":b.memoizedProps}catch(u){W(a,a.return,u)}}else if((22!==b.tag&&23!==b.tag||null===b.memoizedState||b===a)&&null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break a;for(;null===b.sibling;){if(null=== -b.return||b.return===a)break a;c===b&&(c=null);b=b.return}c===b&&(c=null);b.sibling.return=b.return;b=b.sibling}d&4&&(c=a.updateQueue,null!==c&&(d=c.wakeables,null!==d&&(c.wakeables=null,um(a,d))));break;case 19:zm(b,a);Bm(a);d&4&&(c=a.updateQueue,null!==c&&(a.updateQueue=null,um(a,c)));break;case 21:break;default:zm(b,a),Bm(a)}} -function Bm(a){var b=a.flags;if(b&2){try{if(27!==a.tag){b:{for(var c=a.return;null!==c;){if(mm(c)){var d=c;break b}c=c.return}throw Error(m(160));}switch(d.tag){case 27:var e=d.stateNode,f=nm(a);pm(a,f,e);break;case 5:var g=d.stateNode;d.flags&32&&(Kb(g,""),d.flags&=-33);var h=nm(a);pm(a,h,g);break;case 3:case 4:var k=d.stateNode.containerInfo,l=nm(a);om(a,l,k);break;default:throw Error(m(161));}}}catch(n){W(a,a.return,n)}a.flags&=-3}b&4096&&(a.flags&=-4097)} -function Em(a,b,c){Sl=c;Tl=b;hm(b,a.alternate,a);Tl=Sl=null}function im(a,b){if(b.subtreeFlags&8772)for(b=b.child;null!==b;)hm(a,b.alternate,b),b=b.sibling} -function Dm(a){for(a=a.child;null!==a;){var b=a;switch(b.tag){case 0:case 11:case 14:case 15:if(Ul(b))try{pk(),am(4,b,b.return)}finally{nk(b)}else am(4,b,b.return);Dm(b);break;case 1:Xl(b,b.return);var c=b.stateNode;if("function"===typeof c.componentWillUnmount){var d=b,e=b.return;try{Vl(d,c)}catch(f){W(d,e,f)}}Dm(b);break;case 26:case 27:case 5:Xl(b,b.return);Dm(b);break;case 22:Xl(b,b.return);null===b.memoizedState&&Dm(b);break;default:Dm(b)}a=a.sibling}} -function km(a,b,c){c=c&&0!==(b.subtreeFlags&8772);for(b=b.child;null!==b;){var d=b.alternate,e=a,f=b,g=f.flags;switch(f.tag){case 0:case 11:case 15:km(e,f,c);cm(f,4);break;case 1:km(e,f,c);e=f.stateNode;if("function"===typeof e.componentDidMount)try{e.componentDidMount()}catch(k){W(f,f.return,k)}d=f.updateQueue;if(null!==d){var h=d.shared.hiddenCallbacks;if(null!==h)for(d.shared.hiddenCallbacks=null,d=0;d<h.length;d++)ki(h[d],e)}c&&g&64&&dm(f);Wl(f,f.return);break;case 26:case 27:case 5:km(e,f,c); -c&&null===d&&g&4&&em(f);Wl(f,f.return);break;case 12:km(e,f,c);c&&g&4&&fm(f,d);break;case 13:km(e,f,c);c&&g&4&&jm(e,f);break;case 22:null===f.memoizedState&&km(e,f,c);Wl(f,f.return);break;default:km(e,f,c)}b=b.sibling}}function Fm(a,b){if(Ul(a)){ik=ek();try{bm(b,a)}catch(c){W(a,a.return,c)}ok(a)}else try{bm(b,a)}catch(c){W(a,a.return,c)}} -function Gm(a,b){var c=null;null!==a&&null!==a.memoizedState&&null!==a.memoizedState.cachePool&&(c=a.memoizedState.cachePool.pool);a=null;null!==b.memoizedState&&null!==b.memoizedState.cachePool&&(a=b.memoizedState.cachePool.pool);a!==c&&(null!=a&&a.refCount++,null!=c&&Al(c))}function Hm(a,b){a=null;null!==b.alternate&&(a=b.alternate.memoizedState.cache);b=b.memoizedState.cache;b!==a&&(b.refCount++,null!=a&&Al(a))} -function Im(a,b,c,d){if(b.subtreeFlags&10256)for(b=b.child;null!==b;)Jm(a,b,c,d),b=b.sibling} -function Jm(a,b,c,d){var e=b.flags;switch(b.tag){case 0:case 11:case 15:Im(a,b,c,d);e&2048&&Fm(b,9);break;case 3:Im(a,b,c,d);e&2048&&(a=null,null!==b.alternate&&(a=b.alternate.memoizedState.cache),b=b.memoizedState.cache,b!==a&&(b.refCount++,null!=a&&Al(a)));break;case 23:break;case 22:var f=b.stateNode;null!==b.memoizedState?f._visibility&4?Im(a,b,c,d):b.mode&1?Km(a,b):(f._visibility|=4,Im(a,b,c,d)):f._visibility&4?Im(a,b,c,d):(f._visibility|=4,Lm(a,b,c,d,0!==(b.subtreeFlags&10256)));e&2048&&Gm(b.alternate, -b);break;case 24:Im(a,b,c,d);e&2048&&Hm(b.alternate,b);break;default:Im(a,b,c,d)}} -function Lm(a,b,c,d,e){e=e&&0!==(b.subtreeFlags&10256);for(b=b.child;null!==b;){var f=a,g=b,h=c,k=d,l=g.flags;switch(g.tag){case 0:case 11:case 15:Lm(f,g,h,k,e);Fm(g,8);break;case 23:break;case 22:var n=g.stateNode;null!==g.memoizedState?n._visibility&4?Lm(f,g,h,k,e):g.mode&1?Km(f,g):(n._visibility|=4,Lm(f,g,h,k,e)):(n._visibility|=4,Lm(f,g,h,k,e));e&&l&2048&&Gm(g.alternate,g);break;case 24:Lm(f,g,h,k,e);e&&l&2048&&Hm(g.alternate,g);break;default:Lm(f,g,h,k,e)}b=b.sibling}} -function Km(a,b){if(b.subtreeFlags&10256)for(b=b.child;null!==b;){var c=a,d=b,e=d.flags;switch(d.tag){case 22:Km(c,d);e&2048&&Gm(d.alternate,d);break;case 24:Km(c,d);e&2048&&Hm(d.alternate,d);break;default:Km(c,d)}b=b.sibling}}function Mm(a){var b=a.alternate;if(null!==b&&(a=b.child,null!==a)){b.child=null;do b=a.sibling,a.sibling=null,a=b;while(null!==a)}}function Nm(a,b,c){Ul(a)?(ik=ek(),am(c,a,b),ok(a)):am(c,a,b)} -function Om(a){var b=a.deletions;if(0!==(a.flags&16)){if(null!==b)for(var c=0;c<b.length;c++){var d=b[c];V=d;Pm(d,a)}Mm(a)}if(a.subtreeFlags&10256)for(a=a.child;null!==a;)Qm(a),a=a.sibling}function Qm(a){switch(a.tag){case 0:case 11:case 15:Om(a);a.flags&2048&&Nm(a,a.return,9);break;case 22:var b=a.stateNode;null!==a.memoizedState&&b._visibility&4&&(null===a.return||13!==a.return.tag)?(b._visibility&=-5,Rm(a)):Om(a);break;default:Om(a)}} -function Rm(a){var b=a.deletions;if(0!==(a.flags&16)){if(null!==b)for(var c=0;c<b.length;c++){var d=b[c];V=d;Pm(d,a)}Mm(a)}for(a=a.child;null!==a;){b=a;switch(b.tag){case 0:case 11:case 15:Nm(b,b.return,8);Rm(b);break;case 22:c=b.stateNode;c._visibility&4&&(c._visibility&=-5,Rm(b));break;default:Rm(b)}a=a.sibling}} -function Pm(a,b){for(;null!==V;){var c=V;switch(c.tag){case 0:case 11:case 15:Nm(c,b,8);break;case 23:case 22:if(null!==c.memoizedState&&null!==c.memoizedState.cachePool){var d=c.memoizedState.cachePool.pool;null!=d&&d.refCount++}break;case 24:Al(c.memoizedState.cache)}d=c.child;if(null!==d)d.return=c,V=d;else a:for(c=a;null!==V;){d=V;var e=d.sibling,f=d.return;lm(d);if(d===c){V=null;break a}if(null!==e){e.return=f;V=e;break a}V=f}}} -var Sm={getCacheSignal:function(){return qj(S).controller.signal},getCacheForType:function(a){var b=qj(S),c=b.data.get(a);void 0===c&&(c=a(),b.data.set(a,c));return c}},Tm=Math.ceil,Um="function"===typeof WeakMap?WeakMap:Map,Vm=Ma.ReactCurrentDispatcher,Wm=Ma.ReactCurrentCache,Xm=Ma.ReactCurrentOwner,Ym=Ma.ReactCurrentBatchConfig,J=0,Q=null,Y=null,K=0,Z=0,Zm=null,$m=!1,Ai=0,U=0,an=null,ji=0,bn=0,cn=0,dn=null,en=null,Cm=0,Ml=Infinity,fn=null,Ck=!1,Dk=null,Fk=null,gn=!1,hn=null,jn=0,kn=[],ln=0,mn=null, -$h=0,ai=null,nn=-1,on=0;function Yj(){return 0!==(J&6)?A():-1!==nn?nn:nn=A()}function Xj(a){if(0===(a.mode&1))return 2;if(0!==(J&2)&&0!==K)return K&-K;if(null!==Bl.transition)return 0===on&&(on=ed()),on;a=D;if(0!==a)return a;a=window.event;a=void 0===a?32:Rd(a.type);return a}function Ej(a,b,c,d){2===Z&&a===Q&&(pn(a,0),qn(a,K));gd(a,c,d);if(0===(J&2)||a!==Q)Hc&&jd(a,b,c),a===Q&&(0===(J&2)&&(bn|=c),4===U&&qn(a,K)),rn(a,d),2===c&&0===J&&0===(b.mode&1)&&(Ml=A()+500,mh&&qh())} -function rn(a,b){var c=a.callbackNode;cd(a,b);var d=ad(a,a===Q?K:0);if(0===d)null!==c&&wc(c),a.callbackNode=null,a.callbackPriority=0;else if(b=d&-d,a.callbackPriority!==b){null!=c&&wc(c);if(0!==(b&3))0===a.tag?ph(sn.bind(null,a)):oh(sn.bind(null,a)),Vg(function(){0===(J&6)&&qh()}),c=null;else{switch(ld(d)){case 2:c=Ac;break;case 8:c=Bc;break;case 32:c=Cc;break;case 536870912:c=Ec;break;default:c=Cc}c=tn(c,un.bind(null,a))}a.callbackPriority=b;a.callbackNode=c}} -function un(a,b){kk=jk=!1;nn=-1;on=0;if(0!==(J&6))throw Error(m(327));var c=a.callbackNode;if(vn()&&a.callbackNode!==c)return null;var d=ad(a,a===Q?K:0);if(0===d)return null;b=0!==(d&60)||0!==(d&a.expiredLanes)||b?wn(a,d):xn(a,d);if(0!==b){if(2===b){var e=d,f=dd(a,e);0!==f&&(d=f,b=yn(a,e,f))}if(1===b)throw c=an,pn(a,0),qn(a,d),rn(a,A()),c;if(6===b)qn(a,d);else{e=a.current.alternate;if(0===(d&60)&&!zn(e)){b=wn(a,d);if(2===b){f=d;var g=dd(a,f);0!==g&&(d=g,b=yn(a,f,g))}if(1===b)throw c=an,pn(a,0),qn(a, -d),rn(a,A()),c;}a.finishedWork=e;a.finishedLanes=d;switch(b){case 0:case 1:throw Error(m(345));case 2:An(a,en,fn);break;case 3:qn(a,d);if((d&125829120)===d&&(d=Cm+500-A(),10<d)){if(0!==ad(a,0))break;a.timeoutHandle=Rg(An.bind(null,a,en,fn),d);break}An(a,en,fn);break;case 4:qn(a,d);if((d&8388480)===d)break;b=a.eventTimes;for(e=-1;0<d;)g=31-Vc(d),f=1<<g,g=b[g],g>e&&(e=g),d&=~f;d=e;d=A()-d;d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*Tm(d/1960))-d;if(10<d){a.timeoutHandle= -Rg(An.bind(null,a,en,fn),d);break}An(a,en,fn);break;case 5:An(a,en,fn);break;default:throw Error(m(329));}}}rn(a,A());return a.callbackNode===c?2===Z&&Q===a?(a.callbackPriority=0,a.callbackNode=null):un.bind(null,a):null}function yn(a,b,c){var d=dn,e=a.current.memoizedState.isDehydrated;e&&(pn(a,c).flags|=256);c=wn(a,c);if(2!==c){if($m&&!e)return a.errorRecoveryDisabledLanes|=b,bn|=b,4;a=en;en=d;null!==a&&Kl(a)}return c}function Kl(a){null===en?en=a:en.push.apply(en,a)} -function zn(a){for(var b=a;;){if(b.flags&16384){var c=b.updateQueue;if(null!==c&&(c=c.stores,null!==c))for(var d=0;d<c.length;d++){var e=c[d],f=e.getSnapshot;e=e.value;try{if(!of(f(),e))return!1}catch(g){return!1}}}c=b.child;if(b.subtreeFlags&16384&&null!==c)c.return=b,b=c;else{if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return!0;b=b.return}b.sibling.return=b.return;b=b.sibling}}return!0} -function qn(a,b){b&=~cn;b&=~bn;a.suspendedLanes|=b;a.pingedLanes&=~b;for(a=a.expirationTimes;0<b;){var c=31-Vc(b),d=1<<c;a[c]=-1;b&=~d}} -function sn(a){jk=kk;kk=!1;if(0!==(J&6))throw Error(m(327));vn();var b=ad(a,0);if(0===(b&3))return rn(a,A()),null;var c=wn(a,b);if(0!==a.tag&&2===c){var d=b,e=dd(a,d);0!==e&&(b=e,c=yn(a,d,e))}if(1===c)throw c=an,pn(a,0),qn(a,b),rn(a,A()),c;if(6===c)return qn(a,b),rn(a,A()),null;a.finishedWork=a.current.alternate;a.finishedLanes=b;An(a,en,fn);rn(a,A());return null}function Bn(a,b){var c=J;J|=1;try{return a(b)}finally{J=c,0===J&&(Ml=A()+500,mh&&qh())}} -function Cn(a){null!==hn&&0===hn.tag&&0===(J&6)&&vn();var b=J;J|=1;var c=Ym.transition,d=D;try{if(Ym.transition=null,D=2,a)return a()}finally{D=d,Ym.transition=c,J=b,0===(J&6)&&qh()}}function Dn(){if(null!==Y){if(0===Z)var a=Y.return;else ul(),lj(),a=Y;for(;null!==a;)Ol(a.alternate,a),a=a.return;Y=null}} -function pn(a,b){a.finishedWork=null;a.finishedLanes=0;var c=a.timeoutHandle;-1!==c&&(a.timeoutHandle=-1,Sg(c));Dn();Q=a;Y=a=qi(a.current,null);K=Ai=b;Z=0;Zm=null;$m=!1;U=0;an=null;cn=bn=ji=0;en=dn=null;Vh();return a} -function En(a,b){Si.current=hj;Xm.current=null;if(b===Ni){if(null===Ri)throw Error(m(459));b=Ri;Ri=null;Z=Fn()?2:3}else Z=b===Ik?6:null!==b&&"object"===typeof b&&"function"===typeof b.then?4:1;Zm=b;a=Y;null===a?(U=1,an=b):(a.mode&2&&mk(a,!0),Oc(),1!==Z?null!==C&&"function"===typeof C.markComponentSuspended&&C.markComponentSuspended(a,b,K):null!==C&&"function"===typeof C.markComponentErrored&&C.markComponentErrored(a,b,K))} -function Fn(){if(0!==(ji&268435455)||0!==(bn&268435455))return!1;if((K&8388480)===K)return null===Ei;var a=Di.current;return null!==a&&(K&125829120)===K?a===Ei:!1}function Gn(a){a=Ag(a);ug=a.ownerDocument||a;vg=tg.current;tg.current=yg;a=Vm.current;Vm.current=hj;return null===a?hj:a}function Hn(){var a=Wm.current;Wm.current=Sm;return a}function il(){U=4;null===Q||0===(ji&268435455)&&0===(bn&268435455)||qn(Q,K)} -function wn(a,b){var c=J;J|=2;var d=Gn(a.containerInfo),e=Hn();if(Q!==a||K!==b){if(Hc){var f=a.memoizedUpdaters;0<f.size&&(wm(a,K),f.clear());kd(a,b)}fn=null;pn(a,b)}Rc(b);a:do try{if(0!==Z&&null!==Y)switch(b=Y,f=Zm,Z){case 6:Dn();U=6;break a;default:Z=0,Zm=null,In(b,f)}Jn();break}catch(g){En(a,g)}while(1);ul();J=c;tg.current=vg;vg=null;Vm.current=d;Wm.current=e;if(null!==Y)throw Error(m(261));Sc();Q=null;K=0;Vh();return U}function Jn(){for(;null!==Y;)Kn(Y)} -function xn(a,b){var c=J;J|=2;var d=Gn(a.containerInfo),e=Hn();if(Q!==a||K!==b){if(Hc){var f=a.memoizedUpdaters;0<f.size&&(wm(a,K),f.clear());kd(a,b)}fn=null;Ml=A()+500;pn(a,b)}Rc(b);a:do try{if(0!==Z&&null!==Y)switch(b=Y,f=Zm,Z){case 1:Z=0;Zm=null;In(b,f);break;case 2:if(Oi(f)){Z=0;Zm=null;Ln(b);break}b=function(){rn(a,A())};f.then(b,b);break a;case 3:Z=5;break a;case 5:Oi(f)?(Z=0,Zm=null,Ln(b)):(Z=0,Zm=null,In(b,f));break;case 4:Z=0;Zm=null;In(b,f);break;case 6:Dn();U=6;break a;default:throw Error(m(462)); -}Mn();break}catch(g){En(a,g)}while(1);ul();tg.current=vg;vg=null;Vm.current=d;Wm.current=e;J=c;if(null!==Y)return null!==C&&"function"===typeof C.markRenderYielded&&C.markRenderYielded(),0;Sc();Q=null;K=0;Vh();return U}function Mn(){for(;null!==Y&&!xc();)Kn(Y)}function Kn(a){var b=a.alternate;0!==(a.mode&2)?(lk(a),b=Nn(b,a,Ai),mk(a,!0)):b=Nn(b,a,Ai);a.memoizedProps=a.pendingProps;null===b?On(a):Y=b;Xm.current=null} -function Ln(a){var b=a.alternate,c=0!==(a.mode&2);c&&lk(a);switch(a.tag){case 2:a.tag=0;case 0:case 11:var d=a.type,e=a.pendingProps;e=a.elementType===d?e:rk(d,e);b=Vk(b,a,e,d,K);break;case 15:b=Vk(b,a,a.pendingProps,a.type,K);break;default:ul(),lj(),Ol(b,a),a=Y=Ll(a,Ai),b=Nn(b,a,Ai)}c&&mk(a,!0);a.memoizedProps=a.pendingProps;null===b?On(a):Y=b;Xm.current=null} -function In(a,b){ul();lj();var c=a.return;if(null===c||null===Q)U=1,an=b,Y=null;else{try{a:{var d=Q,e=b;b=K;a.flags|=32768;Hc&&wm(d,b);if(null!==e&&"object"===typeof e&&"function"===typeof e.then){var f=e,g=a.tag;if(0===(a.mode&1)&&(0===g||11===g||15===g)){var h=a.alternate;h?(a.updateQueue=h.updateQueue,a.memoizedState=h.memoizedState,a.lanes=h.lanes):(a.updateQueue=null,a.memoizedState=null)}var k=Di.current;if(null!==k){switch(k.tag){case 13:a.mode&1&&(null===Ei?il():null===k.alternate&&0===U&& -(U=3));k.flags&=-257;Gk(k,c,a,d,b);var l=k.updateQueue;null===l?k.updateQueue=new Set([f]):l.add(f);break;case 22:if(k.mode&1){k.flags|=65536;var n=k.updateQueue;if(null===n){var q={transitions:null,markerInstances:null,wakeables:new Set([f])};k.updateQueue=q}else{var x=n.wakeables;null===x?n.wakeables=new Set([f]):x.add(f)}break}default:throw Error(m(435,k.tag));}k.mode&1&&Pn(d,f,b);break a}else if(1===d.tag){Pn(d,f,b);il();break a}else e=Error(m(426))}else if(I&&a.mode&1&&(f=Di.current,null!==f)){0=== -(f.flags&65536)&&(f.flags|=256);Gk(f,c,a,d,b);Rh(yk(e,a));break a}d=e=yk(e,a);4!==U&&(U=2);null===dn?dn=[d]:dn.push(d);d=c;do{switch(d.tag){case 3:var u=e;d.flags|=65536;b&=-b;d.lanes|=b;var p=Bk(d,u,b);hi(d,p);break a;case 1:g=e;var t=d.type,B=d.stateNode;if(0===(d.flags&128)&&("function"===typeof t.getDerivedStateFromError||null!==B&&"function"===typeof B.componentDidCatch&&(null===Fk||!Fk.has(B)))){d.flags|=65536;p=b&-b;d.lanes|=p;u=Ek(d,g,p);hi(d,u);break a}}d=d.return}while(null!==d)}}catch(v){throw Y= -c,v;}On(a)}} -function On(a){var b=a;do{var c=b.alternate;a=b.return;if(0===(b.flags&32768)){if(0===(b.mode&2)?c=Jl(c,b,Ai):(lk(b),c=Jl(c,b,Ai),mk(b,!1)),null!==c){Y=c;return}}else{c=Nl(c,b);if(null!==c){c.flags&=16383;Y=c;return}if(0!==(b.mode&2)){mk(b,!1);c=b.actualDuration;for(var d=b.child;null!==d;)c+=d.actualDuration,d=d.sibling;b.actualDuration=c}if(null!==a)a.flags|=32768,a.subtreeFlags=0,a.deletions=null;else{U=6;Y=null;return}}b=b.sibling;if(null!==b){Y=b;return}Y=b=a}while(null!==b);0===U&&(U=5)} -function An(a,b,c){var d=D,e=Ym.transition;try{Ym.transition=null,D=2,Qn(a,b,c,d)}finally{Ym.transition=e,D=d}return null} -function Qn(a,b,c,d){do vn();while(null!==hn);if(0!==(J&6))throw Error(m(327));var e=a.finishedWork,f=a.finishedLanes;null!==C&&"function"===typeof C.markCommitStarted&&C.markCommitStarted(f);if(null===e)return Mc(),null;a.finishedWork=null;a.finishedLanes=0;if(e===a.current)throw Error(m(177));a.callbackNode=null;a.callbackPriority=0;var g=e.lanes|e.childLanes;g|=Uh;hd(a,g);a===Q&&(Y=Q=null,K=0);0===(e.subtreeFlags&10256)&&0===(e.flags&10256)||gn||(gn=!0,ln=g,mn=c,tn(Cc,function(){vn();return null})); -c=0!==(e.flags&15990);if(0!==(e.subtreeFlags&15990)||c){c=Ym.transition;Ym.transition=null;var h=D;D=2;var k=J;J|=4;Xm.current=null;$l(a,e);fk=ek();xm(a,e,f);vf(Pg);Ld=!!Og;Pg=Og=null;a.current=e;null!==C&&"function"===typeof C.markLayoutEffectsStarted&&C.markLayoutEffectsStarted(f);Em(e,a,f);null!==C&&"function"===typeof C.markLayoutEffectsStopped&&C.markLayoutEffectsStopped();yc();J=k;D=h;Ym.transition=c}else a.current=e,fk=ek();gn?(gn=!1,hn=a,jn=f):Rn(a,g);g=a.pendingLanes;0===g&&(Fk=null);Ic(e.stateNode, -d);Hc&&a.memoizedUpdaters.clear();rn(a,A());if(null!==b)for(d=a.onRecoverableError,e=0;e<b.length;e++)f=b[e],g={digest:f.digest,componentStack:f.stack},d(f.value,g);if(Ck)throw Ck=!1,a=Dk,Dk=null,a;0!==(jn&3)&&0!==a.tag&&vn();g=a.pendingLanes;0!==(g&3)?(kk=!0,a===ai?$h++:($h=0,ai=a)):$h=0;qh();Mc();return null}function Rn(a,b){0===(a.pooledCacheLanes&=b)&&(b=a.pooledCache,null!=b&&(a.pooledCache=null,Al(b)))} -function vn(){if(null!==hn){var a=hn,b=ln;ln=0;var c=ld(jn),d=32>c?32:c;c=Ym.transition;var e=D;try{Ym.transition=null;D=d;if(null===hn)var f=!1;else{var g=mn;mn=null;d=hn;var h=jn;hn=null;jn=0;if(0!==(J&6))throw Error(m(331));null!==C&&"function"===typeof C.markPassiveEffectsStarted&&C.markPassiveEffectsStarted(h);var k=J;J|=4;Qm(d.current);Jm(d,d.current,h,g);g=kn;kn=[];for(h=0;h<g.length;h++){var l=g[h];if(J&4&&0!==(l.flags&4))switch(l.tag){case 12:var n=l.stateNode.passiveEffectDuration,q=l.memoizedProps, -x=q.id,u=q.onPostCommit,p=fk,t=null===l.alternate?"mount":"update";jk&&(t="nested-update");"function"===typeof u&&u(x,t,n,p);var B=l.return;b:for(;null!==B;){switch(B.tag){case 3:B.stateNode.passiveEffectDuration+=n;break b;case 12:B.stateNode.passiveEffectDuration+=n;break b}B=B.return}}}null!==C&&"function"===typeof C.markPassiveEffectsStopped&&C.markPassiveEffectsStopped();J=k;qh();if(Gc&&"function"===typeof Gc.onPostCommitFiberRoot)try{Gc.onPostCommitFiberRoot(Fc,d)}catch(z){}var v=d.current.stateNode; -v.effectDuration=0;v.passiveEffectDuration=0;f=!0}return f}finally{D=e,Ym.transition=c,Rn(a,b)}}return!1}function gm(a){kn.push(a);gn||(gn=!0,tn(Cc,function(){vn();return null}))}function Sn(a,b,c){b=yk(c,b);b=Bk(a,b,2);a=fi(a,b,2);b=Yj();null!==a&&(gd(a,2,b),rn(a,b))} -function W(a,b,c){if(3===a.tag)Sn(a,a,c);else for(;null!==b;){if(3===b.tag){Sn(b,a,c);break}else if(1===b.tag){var d=b.stateNode;if("function"===typeof b.type.getDerivedStateFromError||"function"===typeof d.componentDidCatch&&(null===Fk||!Fk.has(d))){a=yk(c,a);a=Ek(b,a,2);b=fi(b,a,2);a=Yj();null!==b&&(gd(b,2,a),rn(b,a));break}}b=b.return}} -function Pn(a,b,c){var d=a.pingCache;if(null===d){d=a.pingCache=new Um;var e=new Set;d.set(b,e)}else e=d.get(b),void 0===e&&(e=new Set,d.set(b,e));e.has(c)||($m=!0,e.add(c),d=Tn.bind(null,a,b,c),Hc&&wm(a,c),b.then(d,d))}function Tn(a,b,c){var d=a.pingCache;null!==d&&d.delete(b);b=Yj();a.pingedLanes|=a.suspendedLanes&c;Q===a&&(K&c)===c&&(4===U||3===U&&(K&125829120)===K&&500>A()-Cm?0===(J&2)&&pn(a,0):cn|=c);rn(a,b)} -function Un(a,b){0===b&&(0===(a.mode&1)?b=2:(b=Zc,Zc<<=1,0===(Zc&125829120)&&(Zc=8388608)));var c=Yj();a=Yh(a,b);null!==a&&(gd(a,b,c),rn(a,c))}function jl(a){var b=a.memoizedState,c=0;null!==b&&(c=b.retryLane);Un(a,c)}function vm(a,b){var c=0;switch(a.tag){case 13:var d=a.stateNode;var e=a.memoizedState;null!==e&&(c=e.retryLane);break;case 19:d=a.stateNode;break;case 22:d=a.stateNode._retryCache;break;default:throw Error(m(314));}null!==d&&d.delete(b);Un(a,c)}var Nn; -Nn=function(a,b,c){if(null!==a)if(a.memoizedProps!==b.pendingProps||ch.current)tj=!0;else{if(0===(a.lanes&c)&&0===(b.flags&128))return tj=!1,ol(a,b,c);tj=0!==(a.flags&131072)?!0:!1}else tj=!1,I&&0!==(b.flags&1048576)&&Bh(b,uh,b.index);b.lanes=0;switch(b.tag){case 2:var d=b.type;Xk(a,b);a=b.pendingProps;var e=eh(b,H.current);Kk(b,c);Nc(b);e=cj(null,b,d,a,e,c);var f=jj();Oc();b.flags|=1;"object"===typeof e&&null!==e&&"function"===typeof e.render&&void 0===e.$$typeof?(b.tag=1,b.memoizedState=null,b.updateQueue= -null,fh(d)?(f=!0,jh(b)):f=!1,b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,ci(b),e.updater=tk,b.stateNode=e,e._reactInternals=b,xk(b,d,a,c),b=Yk(null,b,d,!0,f,c)):(b.tag=0,I&&f&&Ch(b),R(null,b,e,c),b=b.child);return b;case 16:d=b.elementType;a:{Xk(a,b);a=b.pendingProps;e=d._init;d=e(d._payload);b.type=d;e=b.tag=Vn(d);a=rk(d,a);switch(e){case 0:b=Pk(null,b,d,a,c);break a;case 1:b=Wk(null,b,d,a,c);break a;case 11:b=Jk(null,b,d,a,c);break a;case 14:b=Mk(null,b,d,rk(d.type,a),c);break a}throw Error(m(306, -d,""));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:rk(d,e),Pk(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:rk(d,e),Wk(a,b,d,e,c);case 3:a:{Zk(b);if(null===a)throw Error(m(387));e=b.pendingProps;f=b.memoizedState;d=f.element;di(a,b);ii(b,e,null,c);var g=b.memoizedState;e=g.cache;pl(b,S,e);e!==f.cache&&wl(b,S,c);e=g.element;if(f.isDehydrated)if(f={element:e,isDehydrated:!1,cache:g.cache},b.updateQueue.baseState=f,b.memoizedState=f,b.flags&256){d= -yk(Error(m(423)),b);b=$k(a,b,e,c,d);break a}else if(e!==d){d=yk(Error(m(424)),b);b=$k(a,b,e,c,d);break a}else for(Fh=Zg(b.stateNode.containerInfo.firstChild),Eh=b,I=!0,Gh=null,c=wi(b,null,e,c),b.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{Qh();if(e===d){b=Lk(a,b,c);break a}R(a,b,e,c)}b=b.child}return b;case 26:return Rk(a,b),c=b.memoizedState=Kg(b.type,null===a?null:a.memoizedProps,b.pendingProps),null!==a||I||null!==c||(c=b.type,a=b.pendingProps,d=gg(c,a,og.current,"http://www.w3.org/1999/xhtml"), -d[ea]=b,d[fa]=a,hg(d,c,a),d[na]=!0,b.stateNode=d),null;case 27:return rg(b),null===a&&I&&(d=b.stateNode=ah(b.type,b.pendingProps,og.current),Eh=b,Fh=Zg(d.firstChild)),d=b.pendingProps.children,null!==a||I?R(a,b,d,c):b.child=vi(b,null,d,c),Rk(a,b),b.child;case 5:return rg(b),null===a&&Lh(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,Qg(d,e)?g=null:null!==f&&Qg(d,f)&&(b.flags|=32),Rk(a,b),R(a,b,g,c),b.child;case 6:return null===a&&Lh(b),null;case 13:return dl(a,b,c);case 4:return pg(b, -b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=vi(b,null,d,c):R(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:rk(d,e),Jk(a,b,d,e,c);case 7:return R(a,b,b.pendingProps,c),b.child;case 8:return R(a,b,b.pendingProps.children,c),b.child;case 12:return b.flags|=4,d=b.stateNode,d.effectDuration=0,d.passiveEffectDuration=0,R(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;f=b.memoizedProps;g=e.value;pl(b,d,g);if(null!== -f)if(of(f.value,g)){if(f.children===e.children&&!ch.current){b=Lk(a,b,c);break a}}else wl(b,d,c);R(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,d=b.pendingProps.children,Kk(b,c),e=qj(e),Nc(b),d=d(e),Oc(),b.flags|=1,R(a,b,d,c),b.child;case 14:return d=b.type,e=rk(d,b.pendingProps),e=rk(d.type,e),Mk(a,b,d,e,c);case 15:return Ok(a,b,b.type,b.pendingProps,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:rk(d,e),Xk(a,b),b.tag=1,fh(d)?(a=!0,jh(b)):a=!1,Kk(b,c),vk(b,d,e), -xk(b,d,e,c),Yk(null,b,d,!0,a,c);case 19:return nl(a,b,c);case 22:return Qk(a,b,c);case 24:return Kk(b,c),d=qj(S),null===a?(e=Uk(),null===e&&(e=Q,f=Zj(),e.pooledCache=f,f.refCount++,null!==f&&(e.pooledCacheLanes|=c),e=f),b.memoizedState={parent:d,cache:e},ci(b),pl(b,S,e)):(0!==(a.lanes&c)&&(di(a,b),ii(b,null,null,c)),e=a.memoizedState,f=b.memoizedState,e.parent!==d?(e={parent:d,cache:d},b.memoizedState=e,0===b.lanes&&(b.memoizedState=b.updateQueue.baseState=e),pl(b,S,d)):(d=f.cache,pl(b,S,d),d!==e.cache&& -wl(b,S,c))),R(a,b,b.pendingProps.children,c),b.child}throw Error(m(156,b.tag));};function wm(a,b){Hc&&a.memoizedUpdaters.forEach(function(c){jd(a,c,b)})}function tn(a,b){return vc(a,b)} -function Wn(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.refCleanup=this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.subtreeFlags=this.flags=0;this.deletions=null;this.childLanes=this.lanes=0;this.alternate=null;this.actualDuration=0;this.actualStartTime=-1;this.treeBaseDuration=this.selfBaseDuration=0} -function Ih(a,b,c,d){return new Wn(a,b,c,d)}function Nk(a){a=a.prototype;return!(!a||!a.isReactComponent)}function Vn(a){if("function"===typeof a)return Nk(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Va)return 11;if(a===Ya)return 14}return 2} -function qi(a,b){var c=a.alternate;null===c?(c=Ih(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null,c.actualDuration=0,c.actualStartTime=-1);c.flags=a.flags&14680064;c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null: +function Ol(a,b,c){var d=b.pendingProps;Ih(b);switch(b.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return T(b),null;case 1:return kh(b.type)&&lh(),T(b),null;case 3:c=b.stateNode;d=null;null!==a&&(d=a.memoizedState.cache);b.memoizedState.cache!==d&&(b.flags|=2048);Al(S);pg();F(hh);F(gh);Ri();c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null);if(null===a||null===a.child)Th(b)?b.flags|=4:null===a||a.memoizedState.isDehydrated&&0===(b.flags&256)|| +(b.flags|=1024,null!==Lh&&(Pl(Lh),Lh=null));Kl(a,b);T(b);return null;case 26:rg(b);(a?a.ref:null)!==b.ref&&Il(b);if(null===a||a.memoizedState!==b.memoizedState)b.flags|=4;T(b);return null;case 27:rg(b);c=ng.current;var e=b.type;if(null!==a&&null!=b.stateNode)Ll(a,b,e,d),a.ref!==b.ref&&Il(b);else{if(!d){if(null===b.stateNode)throw Error(p(166));T(b);return null}a=lg.current;Th(b)?Rh(b,a):(b.stateNode=eh(e,d,c),b.flags|=4);null!==b.ref&&Il(b)}T(b);return null;case 5:rg(b);c=b.type;if(null!==a&&null!= +b.stateNode)Ll(a,b,c,d),a.ref!==b.ref&&Il(b);else{if(!d){if(null===b.stateNode)throw Error(p(166));T(b);return null}a=lg.current;if(Th(b))Rh(b,a)&&(b.flags|=4);else{a=gg(c,d,ng.current,a);a[ea]=b;a[fa]=d;Jl(a,b,!1,!1);b.stateNode=a;a:switch(hg(a,c,d),c){case "button":case "input":case "select":case "textarea":a=!!d.autoFocus;break a;case "img":a=!0;break a;default:a=!1}a&&(b.flags|=4)}null!==b.ref&&Il(b)}T(b);return null;case 6:if(a&&null!=b.stateNode)Ml(a,b,a.memoizedProps,d);else{if("string"!== +typeof d&&null===b.stateNode)throw Error(p(166));a=ng.current;if(Th(b)){a=b.stateNode;c=b.memoizedProps;a[ea]=b;if(d=a.nodeValue!==c)if(e=Jh,null!==e)switch(e.tag){case 3:eg(a.nodeValue,c,0!==(e.mode&1));break;case 27:case 5:!0!==e.memoizedProps.suppressHydrationWarning&&eg(a.nodeValue,c,0!==(e.mode&1))}d&&(b.flags|=4)}else a=(9===a.nodeType?a:a.ownerDocument).createTextNode(d),a[ea]=b,b.stateNode=a}T(b);return null;case 13:Ni(b);d=b.memoizedState;if(null===a||null!==a.memoizedState&&null!==a.memoizedState.dehydrated){if(I&& +null!==Kh&&0!==(b.mode&1)&&0===(b.flags&128))Uh(),Vh(),b.flags|=98560,e=!1;else if(e=Th(b),null!==d&&null!==d.dehydrated){if(null===a){if(!e)throw Error(p(318));e=b.memoizedState;e=null!==e?e.dehydrated:null;if(!e)throw Error(p(317));e[ea]=b;T(b);0!==(b.mode&2)&&null!==d&&(e=b.child,null!==e&&(b.treeBaseDuration-=e.treeBaseDuration))}else Vh(),0===(b.flags&128)&&(b.memoizedState=null),b.flags|=4,T(b),0!==(b.mode&2)&&null!==d&&(e=b.child,null!==e&&(b.treeBaseDuration-=e.treeBaseDuration));e=!1}else null!== +Lh&&(Pl(Lh),Lh=null),e=!0;if(!e)return b.flags&65536?b:null}if(0!==(b.flags&128))return b.lanes=c,0!==(b.mode&2)&&vk(b),b;c=null!==d;a=null!==a&&null!==a.memoizedState;if(c){d=b.child;e=null;null!==d.alternate&&null!==d.alternate.memoizedState&&null!==d.alternate.memoizedState.cachePool&&(e=d.alternate.memoizedState.cachePool.pool);var f=null;null!==d.memoizedState&&null!==d.memoizedState.cachePool&&(f=d.memoizedState.cachePool.pool);f!==e&&(d.flags|=2048)}c!==a&&c&&(b.child.flags|=8192);null!==b.updateQueue&& +(b.flags|=4);T(b);0!==(b.mode&2)&&c&&(a=b.child,null!==a&&(b.treeBaseDuration-=a.treeBaseDuration));return null;case 4:return pg(),Kl(a,b),null===a&&Yf(b.stateNode.containerInfo),T(b),null;case 10:return Al(b.type._context),T(b),null;case 17:return kh(b.type)&&lh(),T(b),null;case 19:F(Oi);e=b.memoizedState;if(null===e)return T(b),null;d=0!==(b.flags&128);f=e.rendering;if(null===f)if(d)Nl(e,!1);else{if(0!==U||null!==a&&0!==(a.flags&128))for(a=b.child;null!==a;){f=Pi(a);if(null!==f){b.flags|=128;Nl(e, +!1);a=f.updateQueue;null!==a&&(b.updateQueue=a,b.flags|=4);b.subtreeFlags=0;a=c;for(c=b.child;null!==c;)Ql(c,a),c=c.sibling;G(Oi,Oi.current&1|2);return b.child}a=a.sibling}null!==e.tail&&B()>Rl&&(b.flags|=128,d=!0,Nl(e,!1),b.lanes=8388608)}else{if(!d)if(a=Pi(f),null!==a){if(b.flags|=128,d=!0,a=a.updateQueue,null!==a&&(b.updateQueue=a,b.flags|=4),Nl(e,!0),null===e.tail&&"hidden"===e.tailMode&&!f.alternate&&!I)return T(b),null}else 2*B()-e.renderingStartTime>Rl&&1073741824!==c&&(b.flags|=128,d=!0,Nl(e, +!1),b.lanes=8388608);e.isBackwards?(f.sibling=b.child,b.child=f):(a=e.last,null!==a?a.sibling=f:b.child=f,e.last=f)}if(null!==e.tail)return b=e.tail,e.rendering=b,e.tail=b.sibling,e.renderingStartTime=B(),b.sibling=null,a=Oi.current,G(Oi,d?a&1|2:a&1),b;T(b);return null;case 22:case 23:return Ni(b),Hi(),d=null!==b.memoizedState,null!==a?null!==a.memoizedState!==d&&(b.flags|=8192):d&&(b.flags|=8192),d&&0!==(b.mode&1)?0!==(c&1073741824)&&0===(b.flags&128)&&(T(b),b.subtreeFlags&6&&(b.flags|=8192)):T(b), +null!==b.updateQueue&&(b.flags|=4),c=null,null!==a&&null!==a.memoizedState&&null!==a.memoizedState.cachePool&&(c=a.memoizedState.cachePool.pool),d=null,null!==b.memoizedState&&null!==b.memoizedState.cachePool&&(d=b.memoizedState.cachePool.pool),d!==c&&(b.flags|=2048),null!==a&&F(Hl),null;case 24:return c=null,null!==a&&(c=a.memoizedState.cache),b.memoizedState.cache!==c&&(b.flags|=2048),Al(S),T(b),null;case 25:return null}throw Error(p(156,b.tag));} +function Sl(a,b){Ih(b);switch(b.tag){case 1:return kh(b.type)&&lh(),a=b.flags,a&65536?(b.flags=a&-65537|128,0!==(b.mode&2)&&vk(b),b):null;case 3:return Al(S),pg(),F(hh),F(gh),Ri(),a=b.flags,0!==(a&65536)&&0===(a&128)?(b.flags=a&-65537|128,b):null;case 26:case 27:case 5:return rg(b),null;case 13:Ni(b);a=b.memoizedState;if(null!==a&&null!==a.dehydrated){if(null===b.alternate)throw Error(p(340));Vh()}a=b.flags;return a&65536?(b.flags=a&-65537|128,0!==(b.mode&2)&&vk(b),b):null;case 19:return F(Oi),null; +case 4:return pg(),null;case 10:return Al(b.type._context),null;case 22:case 23:return Ni(b),Hi(),null!==a&&F(Hl),a=b.flags,a&65536?(b.flags=a&-65537|128,0!==(b.mode&2)&&vk(b),b):null;case 24:return Al(S),null;case 25:return null;default:return null}} +function Tl(a,b){Ih(b);switch(b.tag){case 1:a=b.type.childContextTypes;null!==a&&void 0!==a&&lh();break;case 3:Al(S);pg();F(hh);F(gh);Ri();break;case 26:case 27:case 5:rg(b);break;case 4:pg();break;case 13:Ni(b);break;case 19:F(Oi);break;case 10:Al(b.type._context);break;case 22:case 23:Ni(b);Hi();null!==a&&F(Hl);break;case 24:Al(S)}}var Ul=!1,Vl=!1,Wl="function"===typeof WeakSet?WeakSet:Set,V=null,Xl=null,Yl=null;function Zl(a){return 0!==(a.mode&2)&&0!==(J&4)} +function $l(a,b){b.props=a.memoizedProps;b.state=a.memoizedState;if(Zl(a))try{uk(),b.componentWillUnmount()}finally{sk(a)}else b.componentWillUnmount()}function am(a,b){try{var c=a.ref;if(null!==c){var d=a.stateNode;switch(a.tag){case 26:case 27:case 5:var e=d;break;default:e=d}if("function"===typeof c)if(Zl(a))try{uk(),a.refCleanup=c(e)}finally{sk(a)}else a.refCleanup=c(e);else c.current=e}}catch(f){W(a,b,f)}} +function bm(a,b){var c=a.ref,d=a.refCleanup;if(null!==c)if("function"===typeof d)try{if(Zl(a))try{uk(),d()}finally{sk(a)}else d()}catch(e){W(a,b,e)}finally{a.refCleanup=null,a=a.alternate,null!=a&&(a.refCleanup=null)}else if("function"===typeof c)try{if(Zl(a))try{uk(),c(null)}finally{sk(a)}else c(null)}catch(e){W(a,b,e)}else c.current=null}function cm(a,b,c){try{c()}catch(d){W(a,b,d)}}var dm=!1; +function em(a,b){Sg=Ld;a=tf();if(uf(a)){if("selectionStart"in a)var c={start:a.selectionStart,end:a.selectionEnd};else a:{c=(c=a.ownerDocument)&&c.defaultView||window;var d=c.getSelection&&c.getSelection();if(d&&0!==d.rangeCount){c=d.anchorNode;var e=d.anchorOffset,f=d.focusNode;d=d.focusOffset;try{c.nodeType,f.nodeType}catch(N){c=null;break a}var g=0,h=-1,k=-1,l=0,n=0,r=a,w=null;b:for(;;){for(var x;;){r!==c||0!==e&&3!==r.nodeType||(h=g+e);r!==f||0!==d&&3!==r.nodeType||(k=g+d);3===r.nodeType&&(g+= +r.nodeValue.length);if(null===(x=r.firstChild))break;w=r;r=x}for(;;){if(r===a)break b;w===c&&++l===e&&(h=g);w===f&&++n===d&&(k=g);if(null!==(x=r.nextSibling))break;r=w;w=r.parentNode}r=x}c=-1===h||-1===k?null:{start:h,end:k}}else c=null}c=c||{start:0,end:0}}else c=null;Tg={focusedElem:a,selectionRange:c};Ld=!1;for(V=b;null!==V;)if(b=V,a=b.child,0!==(b.subtreeFlags&1028)&&null!==a)a.return=b,V=a;else for(;null!==V;){b=V;try{var m=b.alternate,t=b.flags;switch(b.tag){case 0:break;case 11:case 15:break; +case 1:if(0!==(t&1024)&&null!==m){var A=m.memoizedProps,y=m.memoizedState,u=b.stateNode,v=u.getSnapshotBeforeUpdate(b.elementType===b.type?A:wk(b.type,A),y);u.__reactInternalSnapshotBeforeUpdate=v}break;case 3:0!==(t&1024)&&ah(b.stateNode.containerInfo);break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(0!==(t&1024))throw Error(p(163));}}catch(N){W(b,b.return,N)}a=b.sibling;if(null!==a){a.return=b.return;V=a;break}V=b.return}m=dm;dm=!1;return m} +function fm(a,b,c){var d=b.updateQueue;d=null!==d?d.lastEffect:null;if(null!==d){var e=d=d.next;do{if((e.tag&a)===a){var f=e.destroy;e.destroy=void 0;void 0!==f&&(0!==(a&8)?null!==C&&"function"===typeof C.markComponentPassiveEffectUnmountStarted&&C.markComponentPassiveEffectUnmountStarted(b):0!==(a&4)&&Pc(b),cm(b,c,f),0!==(a&8)?null!==C&&"function"===typeof C.markComponentPassiveEffectUnmountStopped&&C.markComponentPassiveEffectUnmountStopped():0!==(a&4)&&Qc())}e=e.next}while(e!==d)}} +function gm(a,b){var c=b.updateQueue;c=null!==c?c.lastEffect:null;if(null!==c){var d=c=c.next;do{if((d.tag&a)===a){0!==(a&8)?null!==C&&"function"===typeof C.markComponentPassiveEffectMountStarted&&C.markComponentPassiveEffectMountStarted(b):0!==(a&4)&&null!==C&&"function"===typeof C.markComponentLayoutEffectMountStarted&&C.markComponentLayoutEffectMountStarted(b);var e=d.create;d.destroy=e();0!==(a&8)?null!==C&&"function"===typeof C.markComponentPassiveEffectMountStopped&&C.markComponentPassiveEffectMountStopped(): +0!==(a&4)&&null!==C&&"function"===typeof C.markComponentLayoutEffectMountStopped&&C.markComponentLayoutEffectMountStopped()}d=d.next}while(d!==c)}}function hm(a,b){if(Zl(a)){try{uk(),gm(b,a)}catch(c){W(a,a.return,c)}sk(a)}else try{gm(b,a)}catch(c){W(a,a.return,c)}}function im(a){var b=a.updateQueue;if(null!==b){var c=a.stateNode;try{qi(b,c)}catch(d){W(a,a.return,d)}}} +function jm(a){var b=a.type,c=a.memoizedProps,d=a.stateNode;try{a:switch(b){case "button":case "input":case "select":case "textarea":c.autoFocus&&d.focus();break a;case "img":c.src&&(d.src=c.src)}}catch(e){W(a,a.return,e)}} +function km(a,b){if(J&4)try{var c=a.memoizedProps,d=c.onCommit,e=c.onRender,f=a.stateNode.effectDuration;c=kk;b=null===b?"mount":"update";ok&&(b="nested-update");"function"===typeof e&&e(a.memoizedProps.id,b,a.actualDuration,a.treeBaseDuration,a.actualStartTime,c);"function"===typeof d&&d(a.memoizedProps.id,b,f,c);lm(a);var g=a.return;a:for(;null!==g;){switch(g.tag){case 3:g.stateNode.effectDuration+=f;break a;case 12:g.stateNode.effectDuration+=f;break a}g=g.return}}catch(h){W(a,a.return,h)}} +function mm(a,b,c){var d=c.flags;switch(c.tag){case 0:case 11:case 15:nm(a,c);d&4&&hm(c,5);break;case 1:nm(a,c);if(d&4)if(a=c.stateNode,null===b)if(Zl(c)){try{uk(),a.componentDidMount()}catch(h){W(c,c.return,h)}sk(c)}else try{a.componentDidMount()}catch(h){W(c,c.return,h)}else{var e=c.elementType===c.type?b.memoizedProps:wk(c.type,b.memoizedProps);b=b.memoizedState;if(Zl(c)){try{uk(),a.componentDidUpdate(e,b,a.__reactInternalSnapshotBeforeUpdate)}catch(h){W(c,c.return,h)}sk(c)}else try{a.componentDidUpdate(e, +b,a.__reactInternalSnapshotBeforeUpdate)}catch(h){W(c,c.return,h)}}d&64&&im(c);d&512&&am(c,c.return);break;case 3:nm(a,c);if(d&64&&(d=c.updateQueue,null!==d)){a=null;if(null!==c.child)switch(c.child.tag){case 27:case 5:a=c.child.stateNode;break;case 1:a=c.child.stateNode}try{qi(d,a)}catch(h){W(c,c.return,h)}}break;case 26:nm(a,c);d&512&&am(c,c.return);break;case 27:case 5:nm(a,c);null===b&&d&4&&jm(c);d&512&&am(c,c.return);break;case 12:nm(a,c);d&4&&km(c,b);break;case 13:nm(a,c);d&4&&om(a,c);break; +case 22:if(0!==(c.mode&1)){if(e=null!==c.memoizedState||Ul,!e){b=null!==b&&null!==b.memoizedState||Vl;var f=Ul,g=Vl;Ul=e;(Vl=b)&&!g?pm(a,c,0!==(c.subtreeFlags&8772)):nm(a,c);Ul=f;Vl=g}}else nm(a,c);d&512&&("manual"===c.memoizedProps.mode?am(c,c.return):bm(c,c.return));break;default:nm(a,c)}} +function qm(a){var b=a.alternate;null!==b&&(a.alternate=null,qm(b));a.child=null;a.deletions=null;a.sibling=null;5===a.tag&&(b=a.stateNode,null!==b&&oa(b));a.stateNode=null;a.return=null;a.dependencies=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.stateNode=null;a.updateQueue=null}function rm(a){return 5===a.tag||3===a.tag||26===a.tag||27===a.tag||4===a.tag} +function sm(a){a:for(;;){for(;null===a.sibling;){if(null===a.return||rm(a.return))return null;a=a.return}a.sibling.return=a.return;for(a=a.sibling;5!==a.tag&&6!==a.tag&&27!==a.tag&&18!==a.tag;){if(a.flags&2)continue a;if(null===a.child||4===a.tag)continue a;else a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}} +function tm(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=fg));else if(4!==d&&27!==d&&(a=a.child,null!==a))for(tm(a,b,c),a=a.sibling;null!==a;)tm(a,b,c),a=a.sibling} +function um(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&27!==d&&(a=a.child,null!==a))for(um(a,b,c),a=a.sibling;null!==a;)um(a,b,c),a=a.sibling}var X=null,vm=!1;function wm(a,b,c){for(c=c.child;null!==c;)xm(a,b,c),c=c.sibling} +function xm(a,b,c){if(Gc&&"function"===typeof Gc.onCommitFiberUnmount)try{Gc.onCommitFiberUnmount(Fc,c)}catch(h){}switch(c.tag){case 26:Vl||bm(c,b);wm(a,b,c);c.memoizedState&&Ng(c.memoizedState);break;case 27:Vl||bm(c,b);var d=X,e=vm;X=c.stateNode;wm(a,b,c);c=c.stateNode;for(a=c.attributes;a.length;)c.removeAttributeNode(a[0]);oa(c);X=d;vm=e;break;case 5:Vl||bm(c,b);case 6:d=X;e=vm;X=null;wm(a,b,c);X=d;vm=e;null!==X&&(vm?(a=X,c=c.stateNode,8===a.nodeType?a.parentNode.removeChild(c):a.removeChild(c)): +X.removeChild(c.stateNode));break;case 18:null!==X&&(vm?(a=X,c=c.stateNode,8===a.nodeType?$g(a.parentNode,c):1===a.nodeType&&$g(a,c),Jd(a)):$g(X,c.stateNode));break;case 4:d=X;e=vm;X=c.stateNode.containerInfo;vm=!0;wm(a,b,c);X=d;vm=e;break;case 0:case 11:case 14:case 15:if(!Vl&&(d=c.updateQueue,null!==d&&(d=d.lastEffect,null!==d))){e=d=d.next;do{var f=e,g=f.destroy;f=f.tag;void 0!==g&&(0!==(f&2)?cm(c,b,g):0!==(f&4)&&(Pc(c),Zl(c)?(uk(),cm(c,b,g),sk(c)):cm(c,b,g),Qc()));e=e.next}while(e!==d)}wm(a,b, +c);break;case 1:if(!Vl&&(bm(c,b),d=c.stateNode,"function"===typeof d.componentWillUnmount))try{$l(c,d)}catch(h){W(c,b,h)}wm(a,b,c);break;case 21:wm(a,b,c);break;case 22:bm(c,b);c.mode&1?(Vl=(d=Vl)||null!==c.memoizedState,wm(a,b,c),Vl=d):wm(a,b,c);break;default:wm(a,b,c)}}function om(a,b){if(null===b.memoizedState&&(a=b.alternate,null!==a&&(a=a.memoizedState,null!==a&&(a=a.dehydrated,null!==a))))try{Jd(a)}catch(c){W(b,b.return,c)}} +function ym(a){switch(a.tag){case 13:case 19:var b=a.stateNode;null===b&&(b=a.stateNode=new Wl);return b;case 22:return a=a.stateNode,b=a._retryCache,null===b&&(b=a._retryCache=new Wl),b;default:throw Error(p(435,a.tag));}}function zm(a,b){var c=ym(a);b.forEach(function(b){var d=Am.bind(null,a,b);if(!c.has(b)){c.add(b);if(Hc)if(null!==Xl&&null!==Yl)Bm(Yl,Xl);else throw Error(p(413));b.then(d,d)}})}function Cm(a,b,c){Xl=c;Yl=a;Dm(b,a);Yl=Xl=null} +function Em(a,b){var c=b.deletions;if(null!==c)for(var d=0;d<c.length;d++){var e=c[d];try{var f=a,g=b,h=g;a:for(;null!==h;){switch(h.tag){case 27:case 5:X=h.stateNode;vm=!1;break a;case 3:X=h.stateNode.containerInfo;vm=!0;break a;case 4:X=h.stateNode.containerInfo;vm=!0;break a}h=h.return}if(null===X)throw Error(p(160));xm(f,g,e);X=null;vm=!1;var k=e.alternate;null!==k&&(k.return=null);e.return=null}catch(l){W(e,b,l)}}if(b.subtreeFlags&12854)for(b=b.child;null!==b;)Dm(b,a),b=b.sibling} +function Dm(a,b){var c=a.alternate,d=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:Em(b,a);Fm(a);if(d&4){try{fm(3,a,a.return),gm(3,a)}catch(m){W(a,a.return,m)}if(Zl(a)){try{uk(),fm(5,a,a.return)}catch(m){W(a,a.return,m)}sk(a)}else try{fm(5,a,a.return)}catch(m){W(a,a.return,m)}}break;case 1:Em(b,a);Fm(a);d&512&&null!==c&&bm(c,c.return);d&64&&Ul&&(a=a.updateQueue,null!==a&&(c=a.callbacks,null!==c&&(d=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=null===d?c:d.concat(c))));break;case 26:Em(b, +a);Fm(a);d&512&&null!==c&&bm(c,c.return);d&4&&(d=a.memoizedState,null!==c&&(c=c.memoizedState,c!==d&&Ng(c)),a.stateNode=d?Hg(d):null);break;case 27:if(d&4&&null===a.alternate){for(var e=a.stateNode,f=a.memoizedProps,g=e.firstChild;g;){var h=g.nextSibling,k=g.nodeName;g[na]||"HEAD"===k||"BODY"===k||"STYLE"===k||"LINK"===k&&"stylesheet"===g.rel.toLowerCase()||e.removeChild(g);g=h}g=a.type;for(h=e.attributes;h.length;)e.removeAttributeNode(h[0]);hg(e,g,f);e[ea]=a;e[fa]=f}case 5:Em(b,a);Fm(a);d&512&& +null!==c&&bm(c,c.return);if(a.flags&32){b=a.stateNode;try{Kb(b,"")}catch(m){W(a,a.return,m)}}if(d&4&&(d=a.stateNode,null!=d&&(b=a.memoizedProps,f=null!==c?c.memoizedProps:b,c=a.type,e=a.updateQueue,a.updateQueue=null,null!==e)))try{"input"===c&&"radio"===b.type&&null!=b.name&&vb(d,b);Rb(c,f);var l=Rb(c,b);for(f=0;f<e.length;f+=2){var n=e[f],r=e[f+1];"style"===n?Ob(d,r):"dangerouslySetInnerHTML"===n?Jb(d,r):"children"===n?Kb(d,r):La(d,n,r,l)}switch(c){case "input":wb(d,b);break;case "textarea":Eb(d, +b);break;case "select":var w=d._wrapperState.wasMultiple;d._wrapperState.wasMultiple=!!b.multiple;var x=b.value;null!=x?Bb(d,!!b.multiple,x,!1):w!==!!b.multiple&&(null!=b.defaultValue?Bb(d,!!b.multiple,b.defaultValue,!0):Bb(d,!!b.multiple,b.multiple?[]:"",!1))}d[fa]=b}catch(m){W(a,a.return,m)}break;case 6:Em(b,a);Fm(a);if(d&4){if(null===a.stateNode)throw Error(p(162));c=a.stateNode;d=a.memoizedProps;try{c.nodeValue=d}catch(m){W(a,a.return,m)}}break;case 3:Em(b,a);Fm(a);if(d&4&&null!==c&&c.memoizedState.isDehydrated)try{Jd(b.containerInfo)}catch(m){W(a, +a.return,m)}break;case 4:Em(b,a);Fm(a);break;case 13:Em(b,a);Fm(a);c=a.child;c.flags&8192&&null!==c.memoizedState&&(null===c.alternate||null===c.alternate.memoizedState)&&(Gm=B());d&4&&(c=a.updateQueue,null!==c&&(a.updateQueue=null,zm(a,c)));break;case 22:d&512&&null!==c&&bm(c,c.return);l=null!==a.memoizedState;n=null!==c&&null!==c.memoizedState;a.mode&1?(r=Ul,w=Vl,Ul=r||l,Vl=w||n,Em(b,a),Vl=w,Ul=r):Em(b,a);Fm(a);r=a.stateNode;r._current=a;r._visibility&=-3;r._visibility|=r._pendingVisibility&2;if(d& +8192&&(r._visibility=l?r._visibility&-2:r._visibility|1,l&&(r=Ul||Vl,null===c||n||r||0!==(a.mode&1)&&Hm(a)),null===a.memoizedProps||"manual"!==a.memoizedProps.mode))a:for(c=null,n=a;;){if(5===n.tag||26===n.tag||27===n.tag){if(null===c){c=n;try{e=n.stateNode,l?(f=e.style,"function"===typeof f.setProperty?f.setProperty("display","none","important"):f.display="none"):(g=n.stateNode,h=n.memoizedProps.style,k=void 0!==h&&null!==h&&h.hasOwnProperty("display")?h.display:null,g.style.display=Nb("display", +k))}catch(m){W(a,a.return,m)}}}else if(6===n.tag){if(null===c)try{n.stateNode.nodeValue=l?"":n.memoizedProps}catch(m){W(a,a.return,m)}}else if((22!==n.tag&&23!==n.tag||null===n.memoizedState||n===a)&&null!==n.child){n.child.return=n;n=n.child;continue}if(n===a)break a;for(;null===n.sibling;){if(null===n.return||n.return===a)break a;c===n&&(c=null);n=n.return}c===n&&(c=null);n.sibling.return=n.return;n=n.sibling}d&4&&(c=a.updateQueue,null!==c&&(d=c.wakeables,null!==d&&(c.wakeables=null,zm(a,d)))); +break;case 19:Em(b,a);Fm(a);d&4&&(c=a.updateQueue,null!==c&&(a.updateQueue=null,zm(a,c)));break;case 21:break;default:Em(b,a),Fm(a)}} +function Fm(a){var b=a.flags;if(b&2){try{if(27!==a.tag){b:{for(var c=a.return;null!==c;){if(rm(c)){var d=c;break b}c=c.return}throw Error(p(160));}switch(d.tag){case 27:var e=d.stateNode,f=sm(a);um(a,f,e);break;case 5:var g=d.stateNode;d.flags&32&&(Kb(g,""),d.flags&=-33);var h=sm(a);um(a,h,g);break;case 3:case 4:var k=d.stateNode.containerInfo,l=sm(a);tm(a,l,k);break;default:throw Error(p(161));}}}catch(n){W(a,a.return,n)}a.flags&=-3}b&4096&&(a.flags&=-4097)} +function Im(a,b,c){Xl=c;Yl=b;mm(b,a.alternate,a);Yl=Xl=null}function nm(a,b){if(b.subtreeFlags&8772)for(b=b.child;null!==b;)mm(a,b.alternate,b),b=b.sibling} +function Hm(a){for(a=a.child;null!==a;){var b=a;switch(b.tag){case 0:case 11:case 14:case 15:if(Zl(b))try{uk(),fm(4,b,b.return)}finally{sk(b)}else fm(4,b,b.return);Hm(b);break;case 1:bm(b,b.return);var c=b.stateNode;if("function"===typeof c.componentWillUnmount){var d=b,e=b.return;try{$l(d,c)}catch(f){W(d,e,f)}}Hm(b);break;case 26:case 27:case 5:bm(b,b.return);Hm(b);break;case 22:bm(b,b.return);null===b.memoizedState&&Hm(b);break;default:Hm(b)}a=a.sibling}} +function pm(a,b,c){c=c&&0!==(b.subtreeFlags&8772);for(b=b.child;null!==b;){var d=b.alternate,e=a,f=b,g=f.flags;switch(f.tag){case 0:case 11:case 15:pm(e,f,c);hm(f,4);break;case 1:pm(e,f,c);e=f.stateNode;if("function"===typeof e.componentDidMount)try{e.componentDidMount()}catch(k){W(f,f.return,k)}d=f.updateQueue;if(null!==d){var h=d.shared.hiddenCallbacks;if(null!==h)for(d.shared.hiddenCallbacks=null,d=0;d<h.length;d++)pi(h[d],e)}c&&g&64&&im(f);am(f,f.return);break;case 26:case 27:case 5:pm(e,f,c); +c&&null===d&&g&4&&jm(f);am(f,f.return);break;case 12:pm(e,f,c);c&&g&4&&km(f,d);break;case 13:pm(e,f,c);c&&g&4&&om(e,f);break;case 22:null===f.memoizedState&&pm(e,f,c);am(f,f.return);break;default:pm(e,f,c)}b=b.sibling}}function Jm(a,b){if(Zl(a)){nk=jk();try{gm(b,a)}catch(c){W(a,a.return,c)}tk(a)}else try{gm(b,a)}catch(c){W(a,a.return,c)}} +function Km(a,b){var c=null;null!==a&&null!==a.memoizedState&&null!==a.memoizedState.cachePool&&(c=a.memoizedState.cachePool.pool);a=null;null!==b.memoizedState&&null!==b.memoizedState.cachePool&&(a=b.memoizedState.cachePool.pool);a!==c&&(null!=a&&a.refCount++,null!=c&&Fl(c))}function Lm(a,b){a=null;null!==b.alternate&&(a=b.alternate.memoizedState.cache);b=b.memoizedState.cache;b!==a&&(b.refCount++,null!=a&&Fl(a))} +function Mm(a,b,c,d){if(b.subtreeFlags&10256)for(b=b.child;null!==b;)Nm(a,b,c,d),b=b.sibling} +function Nm(a,b,c,d){var e=b.flags;switch(b.tag){case 0:case 11:case 15:Mm(a,b,c,d);e&2048&&Jm(b,9);break;case 3:Mm(a,b,c,d);e&2048&&(a=null,null!==b.alternate&&(a=b.alternate.memoizedState.cache),b=b.memoizedState.cache,b!==a&&(b.refCount++,null!=a&&Fl(a)));break;case 23:break;case 22:var f=b.stateNode;null!==b.memoizedState?f._visibility&4?Mm(a,b,c,d):b.mode&1?Om(a,b):(f._visibility|=4,Mm(a,b,c,d)):f._visibility&4?Mm(a,b,c,d):(f._visibility|=4,Pm(a,b,c,d,0!==(b.subtreeFlags&10256)));e&2048&&Km(b.alternate, +b);break;case 24:Mm(a,b,c,d);e&2048&&Lm(b.alternate,b);break;default:Mm(a,b,c,d)}} +function Pm(a,b,c,d,e){e=e&&0!==(b.subtreeFlags&10256);for(b=b.child;null!==b;){var f=a,g=b,h=c,k=d,l=g.flags;switch(g.tag){case 0:case 11:case 15:Pm(f,g,h,k,e);Jm(g,8);break;case 23:break;case 22:var n=g.stateNode;null!==g.memoizedState?n._visibility&4?Pm(f,g,h,k,e):g.mode&1?Om(f,g):(n._visibility|=4,Pm(f,g,h,k,e)):(n._visibility|=4,Pm(f,g,h,k,e));e&&l&2048&&Km(g.alternate,g);break;case 24:Pm(f,g,h,k,e);e&&l&2048&&Lm(g.alternate,g);break;default:Pm(f,g,h,k,e)}b=b.sibling}} +function Om(a,b){if(b.subtreeFlags&10256)for(b=b.child;null!==b;){var c=a,d=b,e=d.flags;switch(d.tag){case 22:Om(c,d);e&2048&&Km(d.alternate,d);break;case 24:Om(c,d);e&2048&&Lm(d.alternate,d);break;default:Om(c,d)}b=b.sibling}}function Qm(a){var b=a.alternate;if(null!==b&&(a=b.child,null!==a)){b.child=null;do b=a.sibling,a.sibling=null,a=b;while(null!==a)}}function Rm(a,b,c){Zl(a)?(nk=jk(),fm(c,a,b),tk(a)):fm(c,a,b)} +function Sm(a){var b=a.deletions;if(0!==(a.flags&16)){if(null!==b)for(var c=0;c<b.length;c++){var d=b[c];V=d;Tm(d,a)}Qm(a)}if(a.subtreeFlags&10256)for(a=a.child;null!==a;)Um(a),a=a.sibling}function Um(a){switch(a.tag){case 0:case 11:case 15:Sm(a);a.flags&2048&&Rm(a,a.return,9);break;case 22:var b=a.stateNode;null!==a.memoizedState&&b._visibility&4&&(null===a.return||13!==a.return.tag)?(b._visibility&=-5,Vm(a)):Sm(a);break;default:Sm(a)}} +function Vm(a){var b=a.deletions;if(0!==(a.flags&16)){if(null!==b)for(var c=0;c<b.length;c++){var d=b[c];V=d;Tm(d,a)}Qm(a)}for(a=a.child;null!==a;){b=a;switch(b.tag){case 0:case 11:case 15:Rm(b,b.return,8);Vm(b);break;case 22:c=b.stateNode;c._visibility&4&&(c._visibility&=-5,Vm(b));break;default:Vm(b)}a=a.sibling}} +function Tm(a,b){for(;null!==V;){var c=V;switch(c.tag){case 0:case 11:case 15:Rm(c,b,8);break;case 23:case 22:if(null!==c.memoizedState&&null!==c.memoizedState.cachePool){var d=c.memoizedState.cachePool.pool;null!=d&&d.refCount++}break;case 24:Fl(c.memoizedState.cache)}d=c.child;if(null!==d)d.return=c,V=d;else a:for(c=a;null!==V;){d=V;var e=d.sibling,f=d.return;qm(d);if(d===c){V=null;break a}if(null!==e){e.return=f;V=e;break a}V=f}}} +var Wm={getCacheSignal:function(){return vj(S).controller.signal},getCacheForType:function(a){var b=vj(S),c=b.data.get(a);void 0===c&&(c=a(),b.data.set(a,c));return c}},Xm=Math.ceil,Ym="function"===typeof WeakMap?WeakMap:Map,Zm=Ma.ReactCurrentDispatcher,$m=Ma.ReactCurrentCache,an=Ma.ReactCurrentOwner,bn=Ma.ReactCurrentBatchConfig,J=0,Q=null,Y=null,K=0,Z=0,cn=null,dn=!1,Fi=0,U=0,en=null,oi=0,fn=0,gn=0,hn=null,jn=null,Gm=0,Rl=Infinity,kn=null,Hk=!1,Ik=null,Kk=null,ln=!1,mn=null,nn=0,on=[],pn=0,qn=null, +ei=0,fi=null,rn=-1,sn=0;function dk(){return 0!==(J&6)?B():-1!==rn?rn:rn=B()}function ck(a){if(0===(a.mode&1))return 2;if(0!==(J&2)&&0!==K)return K&-K;if(null!==Gl.transition)return 0===sn&&(sn=ed()),sn;a=D;if(0!==a)return a;a=window.event;a=void 0===a?32:Rd(a.type);return a}function Jj(a,b,c,d){2===Z&&a===Q&&(tn(a,0),un(a,K));gd(a,c,d);if(0===(J&2)||a!==Q)Hc&&jd(a,b,c),a===Q&&(0===(J&2)&&(fn|=c),4===U&&un(a,K)),vn(a,d),2===c&&0===J&&0===(b.mode&1)&&(Rl=B()+500,rh&&vh())} +function vn(a,b){var c=a.callbackNode;cd(a,b);var d=ad(a,a===Q?K:0);if(0===d)null!==c&&wc(c),a.callbackNode=null,a.callbackPriority=0;else if(b=d&-d,a.callbackPriority!==b){null!=c&&wc(c);if(0!==(b&3))0===a.tag?uh(wn.bind(null,a)):th(wn.bind(null,a)),Zg(function(){0===(J&6)&&vh()}),c=null;else{switch(ld(d)){case 2:c=Ac;break;case 8:c=Bc;break;case 32:c=Cc;break;case 536870912:c=Ec;break;default:c=Cc}c=xn(c,yn.bind(null,a))}a.callbackPriority=b;a.callbackNode=c}} +function yn(a,b){pk=ok=!1;rn=-1;sn=0;if(0!==(J&6))throw Error(p(327));var c=a.callbackNode;if(zn()&&a.callbackNode!==c)return null;var d=ad(a,a===Q?K:0);if(0===d)return null;b=0!==(d&60)||0!==(d&a.expiredLanes)||b?An(a,d):Bn(a,d);if(0!==b){if(2===b){var e=d,f=dd(a,e);0!==f&&(d=f,b=Cn(a,e,f))}if(1===b)throw c=en,tn(a,0),un(a,d),vn(a,B()),c;if(6===b)un(a,d);else{e=a.current.alternate;if(0===(d&60)&&!Dn(e)){b=An(a,d);if(2===b){f=d;var g=dd(a,f);0!==g&&(d=g,b=Cn(a,f,g))}if(1===b)throw c=en,tn(a,0),un(a, +d),vn(a,B()),c;}a.finishedWork=e;a.finishedLanes=d;switch(b){case 0:case 1:throw Error(p(345));case 2:En(a,jn,kn);break;case 3:un(a,d);if((d&125829120)===d&&(d=Gm+500-B(),10<d)){if(0!==ad(a,0))break;a.timeoutHandle=Vg(En.bind(null,a,jn,kn),d);break}En(a,jn,kn);break;case 4:un(a,d);if((d&8388480)===d)break;b=a.eventTimes;for(e=-1;0<d;)g=31-Vc(d),f=1<<g,g=b[g],g>e&&(e=g),d&=~f;d=e;d=B()-d;d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*Xm(d/1960))-d;if(10<d){a.timeoutHandle= +Vg(En.bind(null,a,jn,kn),d);break}En(a,jn,kn);break;case 5:En(a,jn,kn);break;default:throw Error(p(329));}}}vn(a,B());return a.callbackNode===c?2===Z&&Q===a?(a.callbackPriority=0,a.callbackNode=null):yn.bind(null,a):null}function Cn(a,b,c){var d=hn,e=a.current.memoizedState.isDehydrated;e&&(tn(a,c).flags|=256);c=An(a,c);if(2!==c){if(dn&&!e)return a.errorRecoveryDisabledLanes|=b,fn|=b,4;a=jn;jn=d;null!==a&&Pl(a)}return c}function Pl(a){null===jn?jn=a:jn.push.apply(jn,a)} +function Dn(a){for(var b=a;;){if(b.flags&16384){var c=b.updateQueue;if(null!==c&&(c=c.stores,null!==c))for(var d=0;d<c.length;d++){var e=c[d],f=e.getSnapshot;e=e.value;try{if(!of(f(),e))return!1}catch(g){return!1}}}c=b.child;if(b.subtreeFlags&16384&&null!==c)c.return=b,b=c;else{if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return!0;b=b.return}b.sibling.return=b.return;b=b.sibling}}return!0} +function un(a,b){b&=~gn;b&=~fn;a.suspendedLanes|=b;a.pingedLanes&=~b;for(a=a.expirationTimes;0<b;){var c=31-Vc(b),d=1<<c;a[c]=-1;b&=~d}} +function wn(a){ok=pk;pk=!1;if(0!==(J&6))throw Error(p(327));zn();var b=ad(a,0);if(0===(b&3))return vn(a,B()),null;var c=An(a,b);if(0!==a.tag&&2===c){var d=b,e=dd(a,d);0!==e&&(b=e,c=Cn(a,d,e))}if(1===c)throw c=en,tn(a,0),un(a,b),vn(a,B()),c;if(6===c)return un(a,b),vn(a,B()),null;a.finishedWork=a.current.alternate;a.finishedLanes=b;En(a,jn,kn);vn(a,B());return null}function Fn(a,b){var c=J;J|=1;try{return a(b)}finally{J=c,0===J&&(Rl=B()+500,rh&&vh())}} +function Gn(a){null!==mn&&0===mn.tag&&0===(J&6)&&zn();var b=J;J|=1;var c=bn.transition,d=D;try{if(bn.transition=null,D=2,a)return a()}finally{D=d,bn.transition=c,J=b,0===(J&6)&&vh()}}function Hn(){if(null!==Y){if(0===Z)var a=Y.return;else zl(),qj(),a=Y;for(;null!==a;)Tl(a.alternate,a),a=a.return;Y=null}} +function tn(a,b){a.finishedWork=null;a.finishedLanes=0;var c=a.timeoutHandle;-1!==c&&(a.timeoutHandle=-1,Wg(c));Hn();Q=a;Y=a=vi(a.current,null);K=Fi=b;Z=0;cn=null;dn=!1;U=0;en=null;gn=fn=oi=0;jn=hn=null;$h();return a} +function In(a,b){Xi.current=mj;an.current=null;if(b===Si){if(null===Wi)throw Error(p(459));b=Wi;Wi=null;Z=Jn()?2:3}else Z=b===Nk?6:null!==b&&"object"===typeof b&&"function"===typeof b.then?4:1;cn=b;a=Y;null===a?(U=1,en=b):(a.mode&2&&rk(a,!0),Oc(),1!==Z?null!==C&&"function"===typeof C.markComponentSuspended&&C.markComponentSuspended(a,b,K):null!==C&&"function"===typeof C.markComponentErrored&&C.markComponentErrored(a,b,K))} +function Jn(){if(0!==(oi&268435455)||0!==(fn&268435455))return!1;if((K&8388480)===K)return null===Ji;var a=Ii.current;return null!==a&&(K&125829120)===K?a===Ji:!1}function Kn(a){a=zg(a);tg=Eg(a);ug=sg.current;sg.current=xg;a=Zm.current;Zm.current=mj;return null===a?mj:a}function Ln(){var a=$m.current;$m.current=Wm;return a}function nl(){U=4;null===Q||0===(oi&268435455)&&0===(fn&268435455)||un(Q,K)} +function An(a,b){var c=J;J|=2;var d=Kn(a.containerInfo),e=Ln();if(Q!==a||K!==b){if(Hc){var f=a.memoizedUpdaters;0<f.size&&(Bm(a,K),f.clear());kd(a,b)}kn=null;tn(a,b)}Rc(b);a:do try{if(0!==Z&&null!==Y)switch(b=Y,f=cn,Z){case 6:Hn();U=6;break a;default:Z=0,cn=null,Mn(b,f)}Nn();break}catch(g){In(a,g)}while(1);zl();J=c;sg.current=ug;ug=null;Zm.current=d;$m.current=e;if(null!==Y)throw Error(p(261));Sc();Q=null;K=0;$h();return U}function Nn(){for(;null!==Y;)On(Y)} +function Bn(a,b){var c=J;J|=2;var d=Kn(a.containerInfo),e=Ln();if(Q!==a||K!==b){if(Hc){var f=a.memoizedUpdaters;0<f.size&&(Bm(a,K),f.clear());kd(a,b)}kn=null;Rl=B()+500;tn(a,b)}Rc(b);a:do try{if(0!==Z&&null!==Y)switch(b=Y,f=cn,Z){case 1:Z=0;cn=null;Mn(b,f);break;case 2:if(Ti(f)){Z=0;cn=null;Pn(b);break}b=function(){vn(a,B())};f.then(b,b);break a;case 3:Z=5;break a;case 5:Ti(f)?(Z=0,cn=null,Pn(b)):(Z=0,cn=null,Mn(b,f));break;case 4:Z=0;cn=null;Mn(b,f);break;case 6:Hn();U=6;break a;default:throw Error(p(462)); +}Qn();break}catch(g){In(a,g)}while(1);zl();sg.current=ug;ug=null;Zm.current=d;$m.current=e;J=c;if(null!==Y)return null!==C&&"function"===typeof C.markRenderYielded&&C.markRenderYielded(),0;Sc();Q=null;K=0;$h();return U}function Qn(){for(;null!==Y&&!xc();)On(Y)}function On(a){var b=a.alternate;0!==(a.mode&2)?(qk(a),b=Rn(b,a,Fi),rk(a,!0)):b=Rn(b,a,Fi);a.memoizedProps=a.pendingProps;null===b?Sn(a):Y=b;an.current=null} +function Pn(a){var b=a.alternate,c=0!==(a.mode&2);c&&qk(a);switch(a.tag){case 2:a.tag=0;case 0:case 11:var d=a.type,e=a.pendingProps;e=a.elementType===d?e:wk(d,e);b=$k(b,a,e,d,K);break;case 15:b=$k(b,a,a.pendingProps,a.type,K);break;default:zl(),qj(),Tl(b,a),a=Y=Ql(a,Fi),b=Rn(b,a,Fi)}c&&rk(a,!0);a.memoizedProps=a.pendingProps;null===b?Sn(a):Y=b;an.current=null} +function Mn(a,b){zl();qj();var c=a.return;if(null===c||null===Q)U=1,en=b,Y=null;else{try{a:{var d=Q,e=b;b=K;a.flags|=32768;Hc&&Bm(d,b);if(null!==e&&"object"===typeof e&&"function"===typeof e.then){var f=e,g=a.tag;if(0===(a.mode&1)&&(0===g||11===g||15===g)){var h=a.alternate;h?(a.updateQueue=h.updateQueue,a.memoizedState=h.memoizedState,a.lanes=h.lanes):(a.updateQueue=null,a.memoizedState=null)}var k=Ii.current;if(null!==k){switch(k.tag){case 13:a.mode&1&&(null===Ji?nl():null===k.alternate&&0===U&& +(U=3));k.flags&=-257;Lk(k,c,a,d,b);var l=k.updateQueue;null===l?k.updateQueue=new Set([f]):l.add(f);break;case 22:if(k.mode&1){k.flags|=65536;var n=k.updateQueue;if(null===n){var r={transitions:null,markerInstances:null,wakeables:new Set([f])};k.updateQueue=r}else{var w=n.wakeables;null===w?n.wakeables=new Set([f]):w.add(f)}break}default:throw Error(p(435,k.tag));}k.mode&1&&Tn(d,f,b);break a}else if(1===d.tag){Tn(d,f,b);nl();break a}else e=Error(p(426))}else if(I&&a.mode&1&&(f=Ii.current,null!==f)){0=== +(f.flags&65536)&&(f.flags|=256);Lk(f,c,a,d,b);Wh(Dk(e,a));break a}d=e=Dk(e,a);4!==U&&(U=2);null===hn?hn=[d]:hn.push(d);d=c;do{switch(d.tag){case 3:var x=e;d.flags|=65536;b&=-b;d.lanes|=b;var m=Gk(d,x,b);mi(d,m);break a;case 1:g=e;var t=d.type,A=d.stateNode;if(0===(d.flags&128)&&("function"===typeof t.getDerivedStateFromError||null!==A&&"function"===typeof A.componentDidCatch&&(null===Kk||!Kk.has(A)))){d.flags|=65536;m=b&-b;d.lanes|=m;x=Jk(d,g,m);mi(d,x);break a}}d=d.return}while(null!==d)}}catch(y){throw Y= +c,y;}Sn(a)}} +function Sn(a){var b=a;do{var c=b.alternate;a=b.return;if(0===(b.flags&32768)){if(0===(b.mode&2)?c=Ol(c,b,Fi):(qk(b),c=Ol(c,b,Fi),rk(b,!1)),null!==c){Y=c;return}}else{c=Sl(c,b);if(null!==c){c.flags&=16383;Y=c;return}if(0!==(b.mode&2)){rk(b,!1);c=b.actualDuration;for(var d=b.child;null!==d;)c+=d.actualDuration,d=d.sibling;b.actualDuration=c}if(null!==a)a.flags|=32768,a.subtreeFlags=0,a.deletions=null;else{U=6;Y=null;return}}b=b.sibling;if(null!==b){Y=b;return}Y=b=a}while(null!==b);0===U&&(U=5)} +function En(a,b,c){var d=D,e=bn.transition;try{bn.transition=null,D=2,Un(a,b,c,d)}finally{bn.transition=e,D=d}return null} +function Un(a,b,c,d){do zn();while(null!==mn);if(0!==(J&6))throw Error(p(327));var e=a.finishedWork,f=a.finishedLanes;null!==C&&"function"===typeof C.markCommitStarted&&C.markCommitStarted(f);if(null===e)return Mc(),null;a.finishedWork=null;a.finishedLanes=0;if(e===a.current)throw Error(p(177));a.callbackNode=null;a.callbackPriority=0;var g=e.lanes|e.childLanes;g|=Zh;hd(a,g);a===Q&&(Y=Q=null,K=0);0===(e.subtreeFlags&10256)&&0===(e.flags&10256)||ln||(ln=!0,pn=g,qn=c,xn(Cc,function(){zn();return null})); +c=0!==(e.flags&15990);if(0!==(e.subtreeFlags&15990)||c){c=bn.transition;bn.transition=null;var h=D;D=2;var k=J;J|=4;an.current=null;em(a,e);kk=jk();Cm(a,e,f);vf(Tg);Ld=!!Sg;Tg=Sg=null;a.current=e;null!==C&&"function"===typeof C.markLayoutEffectsStarted&&C.markLayoutEffectsStarted(f);Im(e,a,f);null!==C&&"function"===typeof C.markLayoutEffectsStopped&&C.markLayoutEffectsStopped();yc();J=k;D=h;bn.transition=c}else a.current=e,kk=jk();ln?(ln=!1,mn=a,nn=f):Vn(a,g);g=a.pendingLanes;0===g&&(Kk=null);Ic(e.stateNode, +d);Hc&&a.memoizedUpdaters.clear();vn(a,B());if(null!==b)for(d=a.onRecoverableError,e=0;e<b.length;e++)f=b[e],g={digest:f.digest,componentStack:f.stack},d(f.value,g);if(Hk)throw Hk=!1,a=Ik,Ik=null,a;0!==(nn&3)&&0!==a.tag&&zn();g=a.pendingLanes;0!==(g&3)?(pk=!0,a===fi?ei++:(ei=0,fi=a)):ei=0;vh();Mc();return null}function Vn(a,b){0===(a.pooledCacheLanes&=b)&&(b=a.pooledCache,null!=b&&(a.pooledCache=null,Fl(b)))} +function zn(){if(null!==mn){var a=mn,b=pn;pn=0;var c=ld(nn),d=32>c?32:c;c=bn.transition;var e=D;try{bn.transition=null;D=d;if(null===mn)var f=!1;else{var g=qn;qn=null;d=mn;var h=nn;mn=null;nn=0;if(0!==(J&6))throw Error(p(331));null!==C&&"function"===typeof C.markPassiveEffectsStarted&&C.markPassiveEffectsStarted(h);var k=J;J|=4;Um(d.current);Nm(d,d.current,h,g);g=on;on=[];for(h=0;h<g.length;h++){var l=g[h];if(J&4&&0!==(l.flags&4))switch(l.tag){case 12:var n=l.stateNode.passiveEffectDuration,r=l.memoizedProps, +w=r.id,x=r.onPostCommit,m=kk,t=null===l.alternate?"mount":"update";ok&&(t="nested-update");"function"===typeof x&&x(w,t,n,m);var A=l.return;b:for(;null!==A;){switch(A.tag){case 3:A.stateNode.passiveEffectDuration+=n;break b;case 12:A.stateNode.passiveEffectDuration+=n;break b}A=A.return}}}null!==C&&"function"===typeof C.markPassiveEffectsStopped&&C.markPassiveEffectsStopped();J=k;vh();if(Gc&&"function"===typeof Gc.onPostCommitFiberRoot)try{Gc.onPostCommitFiberRoot(Fc,d)}catch(u){}var y=d.current.stateNode; +y.effectDuration=0;y.passiveEffectDuration=0;f=!0}return f}finally{D=e,bn.transition=c,Vn(a,b)}}return!1}function lm(a){on.push(a);ln||(ln=!0,xn(Cc,function(){zn();return null}))}function Wn(a,b,c){b=Dk(c,b);b=Gk(a,b,2);a=ki(a,b,2);b=dk();null!==a&&(gd(a,2,b),vn(a,b))} +function W(a,b,c){if(3===a.tag)Wn(a,a,c);else for(;null!==b;){if(3===b.tag){Wn(b,a,c);break}else if(1===b.tag){var d=b.stateNode;if("function"===typeof b.type.getDerivedStateFromError||"function"===typeof d.componentDidCatch&&(null===Kk||!Kk.has(d))){a=Dk(c,a);a=Jk(b,a,2);b=ki(b,a,2);a=dk();null!==b&&(gd(b,2,a),vn(b,a));break}}b=b.return}} +function Tn(a,b,c){var d=a.pingCache;if(null===d){d=a.pingCache=new Ym;var e=new Set;d.set(b,e)}else e=d.get(b),void 0===e&&(e=new Set,d.set(b,e));e.has(c)||(dn=!0,e.add(c),d=Xn.bind(null,a,b,c),Hc&&Bm(a,c),b.then(d,d))}function Xn(a,b,c){var d=a.pingCache;null!==d&&d.delete(b);b=dk();a.pingedLanes|=a.suspendedLanes&c;Q===a&&(K&c)===c&&(4===U||3===U&&(K&125829120)===K&&500>B()-Gm?0===(J&2)&&tn(a,0):gn|=c);vn(a,b)} +function Yn(a,b){0===b&&(0===(a.mode&1)?b=2:(b=Zc,Zc<<=1,0===(Zc&125829120)&&(Zc=8388608)));var c=dk();a=ci(a,b);null!==a&&(gd(a,b,c),vn(a,c))}function ol(a){var b=a.memoizedState,c=0;null!==b&&(c=b.retryLane);Yn(a,c)}function Am(a,b){var c=0;switch(a.tag){case 13:var d=a.stateNode;var e=a.memoizedState;null!==e&&(c=e.retryLane);break;case 19:d=a.stateNode;break;case 22:d=a.stateNode._retryCache;break;default:throw Error(p(314));}null!==d&&d.delete(b);Yn(a,c)}var Rn; +Rn=function(a,b,c){if(null!==a)if(a.memoizedProps!==b.pendingProps||hh.current)yj=!0;else{if(0===(a.lanes&c)&&0===(b.flags&128))return yj=!1,tl(a,b,c);yj=0!==(a.flags&131072)?!0:!1}else yj=!1,I&&0!==(b.flags&1048576)&&Gh(b,zh,b.index);b.lanes=0;switch(b.tag){case 2:var d=b.type;bl(a,b);a=b.pendingProps;var e=jh(b,gh.current);Pk(b,c);Nc(b);e=hj(null,b,d,a,e,c);var f=oj();Oc();b.flags|=1;"object"===typeof e&&null!==e&&"function"===typeof e.render&&void 0===e.$$typeof?(b.tag=1,b.memoizedState=null,b.updateQueue= +null,kh(d)?(f=!0,oh(b)):f=!1,b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,hi(b),e.updater=yk,b.stateNode=e,e._reactInternals=b,Ck(b,d,a,c),b=cl(null,b,d,!0,f,c)):(b.tag=0,I&&f&&Hh(b),R(null,b,e,c),b=b.child);return b;case 16:d=b.elementType;a:{bl(a,b);a=b.pendingProps;e=d._init;d=e(d._payload);b.type=d;e=b.tag=Zn(d);a=wk(d,a);switch(e){case 0:b=Uk(null,b,d,a,c);break a;case 1:b=al(null,b,d,a,c);break a;case 11:b=Ok(null,b,d,a,c);break a;case 14:b=Rk(null,b,d,wk(d.type,a),c);break a}throw Error(p(306, +d,""));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:wk(d,e),Uk(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:wk(d,e),al(a,b,d,e,c);case 3:a:{dl(b);if(null===a)throw Error(p(387));e=b.pendingProps;f=b.memoizedState;d=f.element;ii(a,b);ni(b,e,null,c);var g=b.memoizedState;e=g.cache;ul(b,S,e);e!==f.cache&&Bl(b,S,c);e=g.element;if(f.isDehydrated)if(f={element:e,isDehydrated:!1,cache:g.cache},b.updateQueue.baseState=f,b.memoizedState=f,b.flags&256){d= +Dk(Error(p(423)),b);b=el(a,b,e,c,d);break a}else if(e!==d){d=Dk(Error(p(424)),b);b=el(a,b,e,c,d);break a}else for(Kh=ch(b.stateNode.containerInfo.firstChild),Jh=b,I=!0,Lh=null,c=Bi(b,null,e,c),b.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{Vh();if(e===d){b=Qk(a,b,c);break a}R(a,b,e,c)}b=b.child}return b;case 26:return qg(b),Wk(a,b),b.memoizedState=Jg(b.type,b.pendingProps),null;case 27:return qg(b),null===a&&I&&(d=b.stateNode=eh(b.type,b.pendingProps,ng.current),Jh=b,Kh=ch(d.firstChild)),d= +b.pendingProps.children,null!==a||I?R(a,b,d,c):b.child=Ai(b,null,d,c),Wk(a,b),b.child;case 5:return qg(b),null===a&&Qh(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,Ug(d,e)?g=null:null!==f&&Ug(d,f)&&(b.flags|=32),Wk(a,b),R(a,b,g,c),b.child;case 6:return null===a&&Qh(b),null;case 13:return il(a,b,c);case 4:return og(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Ai(b,null,d,c):R(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType=== +d?e:wk(d,e),Ok(a,b,d,e,c);case 7:return R(a,b,b.pendingProps,c),b.child;case 8:return R(a,b,b.pendingProps.children,c),b.child;case 12:return b.flags|=4,d=b.stateNode,d.effectDuration=0,d.passiveEffectDuration=0,R(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;f=b.memoizedProps;g=e.value;ul(b,d,g);if(null!==f)if(of(f.value,g)){if(f.children===e.children&&!hh.current){b=Qk(a,b,c);break a}}else Bl(b,d,c);R(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type, +d=b.pendingProps.children,Pk(b,c),e=vj(e),Nc(b),d=d(e),Oc(),b.flags|=1,R(a,b,d,c),b.child;case 14:return d=b.type,e=wk(d,b.pendingProps),e=wk(d.type,e),Rk(a,b,d,e,c);case 15:return Tk(a,b,b.type,b.pendingProps,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:wk(d,e),bl(a,b),b.tag=1,kh(d)?(a=!0,oh(b)):a=!1,Pk(b,c),Ak(b,d,e),Ck(b,d,e,c),cl(null,b,d,!0,a,c);case 19:return sl(a,b,c);case 22:return Vk(a,b,c);case 24:return Pk(b,c),d=vj(S),null===a?(e=Zk(),null===e&&(e=Q,f=ek(),e.pooledCache= +f,f.refCount++,null!==f&&(e.pooledCacheLanes|=c),e=f),b.memoizedState={parent:d,cache:e},hi(b),ul(b,S,e)):(0!==(a.lanes&c)&&(ii(a,b),ni(b,null,null,c)),e=a.memoizedState,f=b.memoizedState,e.parent!==d?(e={parent:d,cache:d},b.memoizedState=e,0===b.lanes&&(b.memoizedState=b.updateQueue.baseState=e),ul(b,S,d)):(d=f.cache,ul(b,S,d),d!==e.cache&&Bl(b,S,c))),R(a,b,b.pendingProps.children,c),b.child}throw Error(p(156,b.tag));};function Bm(a,b){Hc&&a.memoizedUpdaters.forEach(function(c){jd(a,c,b)})} +function xn(a,b){return vc(a,b)} +function $n(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.refCleanup=this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.subtreeFlags=this.flags=0;this.deletions=null;this.childLanes=this.lanes=0;this.alternate=null;this.actualDuration=0;this.actualStartTime=-1;this.treeBaseDuration=this.selfBaseDuration=0} +function Nh(a,b,c,d){return new $n(a,b,c,d)}function Sk(a){a=a.prototype;return!(!a||!a.isReactComponent)}function Zn(a){if("function"===typeof a)return Sk(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Va)return 11;if(a===Ya)return 14}return 2} +function vi(a,b){var c=a.alternate;null===c?(c=Nh(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null,c.actualDuration=0,c.actualStartTime=-1);c.flags=a.flags&14680064;c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null: {lanes:b.lanes,firstContext:b.firstContext};c.sibling=a.sibling;c.index=a.index;c.ref=a.ref;c.refCleanup=a.refCleanup;c.selfBaseDuration=a.selfBaseDuration;c.treeBaseDuration=a.treeBaseDuration;return c} -function Ll(a,b){a.flags&=14680066;var c=a.alternate;null===c?(a.childLanes=0,a.lanes=b,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null,a.selfBaseDuration=0,a.treeBaseDuration=0):(a.childLanes=c.childLanes,a.lanes=c.lanes,a.child=c.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=c.memoizedProps,a.memoizedState=c.memoizedState,a.updateQueue=c.updateQueue,a.type=c.type,b=c.dependencies,a.dependencies=null===b?null: +function Ql(a,b){a.flags&=14680066;var c=a.alternate;null===c?(a.childLanes=0,a.lanes=b,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null,a.selfBaseDuration=0,a.treeBaseDuration=0):(a.childLanes=c.childLanes,a.lanes=c.lanes,a.child=c.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=c.memoizedProps,a.memoizedState=c.memoizedState,a.updateQueue=c.updateQueue,a.type=c.type,b=c.dependencies,a.dependencies=null===b?null: {lanes:b.lanes,firstContext:b.firstContext},a.selfBaseDuration=c.selfBaseDuration,a.treeBaseDuration=c.treeBaseDuration);return a} -function si(a,b,c,d,e,f){var g=2;d=a;if("function"===typeof a)Nk(a)&&(g=1);else if("string"===typeof a)g=$g(a,c,mg.current)?26:"html"===a||"head"===a||"body"===a?27:5;else a:switch(a){case Pa:return ui(c.children,e,f,b);case Qa:g=8;e|=8;0!==(e&1)&&(e|=16);break;case Ra:return a=Ih(12,c,b,e|2),a.elementType=Ra,a.lanes=f,a.stateNode={effectDuration:0,passiveEffectDuration:0},a;case Wa:return a=Ih(13,c,b,e),a.elementType=Wa,a.lanes=f,a;case Xa:return a=Ih(19,c,b,e),a.elementType=Xa,a.lanes=f,a;case ab:return el(c, -e,f,b);case bb:case $a:case cb:return a=Ih(24,c,b,e),a.elementType=cb,a.lanes=f,a;default:if("object"===typeof a&&null!==a)switch(a.$$typeof){case Sa:g=10;break a;case Ta:g=9;break a;case Va:g=11;break a;case Ya:g=14;break a;case Za:g=16;d=null;break a}throw Error(m(130,null==a?a:typeof a,""));}b=Ih(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function ui(a,b,c,d){a=Ih(7,a,d,b);a.lanes=c;return a} -function el(a,b,c,d){a=Ih(22,a,d,b);a.elementType=ab;a.lanes=c;var e={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var a=e._current;if(null===a)throw Error(m(456));if(0===(e._pendingVisibility&2)){var b=Yh(a,2);null!==b&&(e._pendingVisibility|=2,Ej(b,a,2,-1))}},attach:function(){var a=e._current;if(null===a)throw Error(m(456));if(0!==(e._pendingVisibility&2)){var b=Yh(a,2);null!==b&&(e._pendingVisibility&=-3,Ej(b,a,2,-1))}}}; -a.stateNode=e;return a}function ri(a,b,c){a=Ih(6,a,null,b);a.lanes=c;return a}function ti(a,b,c){b=Ih(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b} -function Xn(a,b,c,d,e){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.callbackNode=this.pendingContext=this.context=null;this.callbackPriority=0;this.eventTimes=fd(0);this.expirationTimes=fd(-1);this.entangledLanes=this.errorRecoveryDisabledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=fd(0);this.hiddenUpdates=fd(null);this.identifierPrefix= +function xi(a,b,c,d,e,f){var g=2;d=a;if("function"===typeof a)Sk(a)&&(g=1);else if("string"===typeof a)g=dh(a,c,lg.current)?26:"html"===a||"head"===a||"body"===a?27:5;else a:switch(a){case Pa:return zi(c.children,e,f,b);case Qa:g=8;e|=8;0!==(e&1)&&(e|=16);break;case Ra:return a=Nh(12,c,b,e|2),a.elementType=Ra,a.lanes=f,a.stateNode={effectDuration:0,passiveEffectDuration:0},a;case Wa:return a=Nh(13,c,b,e),a.elementType=Wa,a.lanes=f,a;case Xa:return a=Nh(19,c,b,e),a.elementType=Xa,a.lanes=f,a;case ab:return jl(c, +e,f,b);case bb:case $a:case cb:return a=Nh(24,c,b,e),a.elementType=cb,a.lanes=f,a;default:if("object"===typeof a&&null!==a)switch(a.$$typeof){case Sa:g=10;break a;case Ta:g=9;break a;case Va:g=11;break a;case Ya:g=14;break a;case Za:g=16;d=null;break a}throw Error(p(130,null==a?a:typeof a,""));}b=Nh(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function zi(a,b,c,d){a=Nh(7,a,d,b);a.lanes=c;return a} +function jl(a,b,c,d){a=Nh(22,a,d,b);a.elementType=ab;a.lanes=c;var e={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var a=e._current;if(null===a)throw Error(p(456));if(0===(e._pendingVisibility&2)){var b=ci(a,2);null!==b&&(e._pendingVisibility|=2,Jj(b,a,2,-1))}},attach:function(){var a=e._current;if(null===a)throw Error(p(456));if(0!==(e._pendingVisibility&2)){var b=ci(a,2);null!==b&&(e._pendingVisibility&=-3,Jj(b,a,2,-1))}}}; +a.stateNode=e;return a}function wi(a,b,c){a=Nh(6,a,null,b);a.lanes=c;return a}function yi(a,b,c){b=Nh(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b} +function ao(a,b,c,d,e){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.callbackNode=this.pendingContext=this.context=null;this.callbackPriority=0;this.eventTimes=fd(0);this.expirationTimes=fd(-1);this.entangledLanes=this.errorRecoveryDisabledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=fd(0);this.hiddenUpdates=fd(null);this.identifierPrefix= d;this.onRecoverableError=e;this.pooledCache=null;this.pooledCacheLanes=0;this.mutableSourceEagerHydrationData=null;this.incompleteTransitions=new Map;this.passiveEffectDuration=this.effectDuration=0;this.memoizedUpdaters=new Set;a=this.pendingUpdatersLaneMap=[];for(b=0;31>b;b++)a.push(new Set)} -function Yn(a,b,c,d,e,f,g,h,k){a=new Xn(a,b,c,h,k);1===b?(b=1,!0===f&&(b|=24)):b=0;Hc&&(b|=2);f=Ih(3,null,null,b);a.current=f;f.stateNode=a;b=Zj();b.refCount++;a.pooledCache=b;b.refCount++;f.memoizedState={element:d,isDehydrated:c,cache:b};ci(f);return a}function Zn(a,b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Oa,key:null==d?null:""+d,children:a,containerInfo:b,implementation:c}} -function $n(a){if(!a)return bh;a=a._reactInternals;a:{if(pc(a)!==a||1!==a.tag)throw Error(m(170));var b=a;do{switch(b.tag){case 3:b=b.stateNode.context;break a;case 1:if(fh(b.type)){b=b.stateNode.__reactInternalMemoizedMergedChildContext;break a}}b=b.return}while(null!==b);throw Error(m(171));}if(1===a.tag){var c=a.type;if(fh(c))return ih(a,c,b)}return b} -function ao(a,b,c,d,e,f,g,h,k){a=Yn(c,d,!0,a,e,f,g,h,k);a.context=$n(null);c=a.current;d=Yj();e=Xj(c);f=ei(d,e);f.callback=void 0!==b&&null!==b?b:null;fi(c,f,e);a.current.lanes=e;gd(a,e,d);rn(a,d);return a} -function bo(a,b,c,d){var e=b.current,f=Yj(),g=Xj(e);null!==C&&"function"===typeof C.markRenderScheduled&&C.markRenderScheduled(g);c=$n(c);null===b.context?b.context=c:b.pendingContext=c;b=ei(f,g);b.payload={element:a};d=void 0===d?null:d;null!==d&&(b.callback=d);a=fi(e,b,g);null!==a&&(Ej(a,e,g,f),gi(a,e,g));return g}function co(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 27:case 5:return a.child.stateNode;default:return a.child.stateNode}} -function eo(a,b){a=a.memoizedState;if(null!==a&&null!==a.dehydrated){var c=a.retryLane;a.retryLane=0!==c&&c<b?c:b}}function fo(a,b){eo(a,b);(a=a.alternate)&&eo(a,b)}function go(){return null}var ho=ca.Dispatcher,io="function"===typeof reportError?reportError:function(a){console.error(a)};function jo(a){this._internalRoot=a}ko.prototype.render=jo.prototype.render=function(a){var b=this._internalRoot;if(null===b)throw Error(m(409));bo(a,b,null,null)}; -ko.prototype.unmount=jo.prototype.unmount=function(){var a=this._internalRoot;if(null!==a){this._internalRoot=null;var b=a.containerInfo;Cn(function(){bo(null,a,null,null)});b[ha]=null}};function ko(a){this._internalRoot=a}ko.prototype.unstable_scheduleHydration=function(a){if(a){var b=pd();a={blockedOn:null,target:a,priority:b};for(var c=0;c<yd.length&&0!==b&&b<yd[c].priority;c++);yd.splice(c,0,a);0===c&&Dd(a)}};function lo(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType)} -function mo(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||" react-mount-point-unstable "!==a.nodeValue))}function no(){} -function oo(a,b,c,d,e){if(e){if("function"===typeof d){var f=d;d=function(){var a=co(g);f.call(a)}}var g=ao(b,d,a,0,null,!1,!1,"",no);a._reactRootContainer=g;a[ha]=g.current;Yf(8===a.nodeType?a.parentNode:a);Cn();return g}Xg(a);if("function"===typeof d){var h=d;d=function(){var a=co(k);h.call(a)}}var k=Yn(a,0,!1,null,null,!1,!1,"",no);a._reactRootContainer=k;a[ha]=k.current;Yf(8===a.nodeType?a.parentNode:a);Cn(function(){bo(b,k,c,d)});return k} -function po(a,b,c,d,e){var f=c._reactRootContainer;if(f){var g=f;if("function"===typeof e){var h=e;e=function(){var a=co(g);h.call(a)}}bo(b,g,a,e)}else g=oo(c,b,a,e,d);return co(g)}md=function(a){switch(a.tag){case 3:var b=a.stateNode;if(b.current.memoizedState.isDehydrated){var c=$c(b.pendingLanes);0!==c&&(id(b,c|2),rn(b,A()),0===(J&6)&&(Ml=A()+500,qh()))}break;case 13:Cn(function(){var b=Yh(a,2);if(null!==b){var c=Yj();Ej(b,a,2,c)}}),fo(a,2)}}; -nd=function(a){if(13===a.tag){var b=Yh(a,134217728);if(null!==b){var c=Yj();Ej(b,a,134217728,c)}fo(a,134217728)}};od=function(a){if(13===a.tag){var b=Xj(a),c=Yh(a,b);if(null!==c){var d=Yj();Ej(c,a,b,d)}fo(a,b)}};pd=function(){return D};qd=function(a,b){var c=D;try{return D=a,b()}finally{D=c}}; -Vb=function(a,b,c){switch(b){case "input":wb(a,c);b=c.name;if("radio"===c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll("input[name="+JSON.stringify(""+b)+'][type="radio"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=ta(d);if(!e)throw Error(m(90));rb(d);wb(d,e)}}}break;case "textarea":Eb(a,c);break;case "select":b=c.value,null!=b&&Bb(a,!!c.multiple,b,!1)}};ac=Bn;bc=Cn;ca.Events=[ra,sa,ta,Zb,$b,Bn]; -var qo={findFiberByHostInstance:pa,bundleType:0,version:"18.3.0-next-4fcc9184a-20230217",rendererPackageName:"react-dom"}; -(function(a){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(b.isDisabled||!b.supportsFiber)return!0;try{a=y({},a,{getLaneLabelMap:Kc,injectProfilingHooks:Jc}),Fc=b.inject(a),Gc=b}catch(c){}return b.checkDCE?!0:!1})({bundleType:qo.bundleType,version:qo.version,rendererPackageName:qo.rendererPackageName,rendererConfig:qo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null, -overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ma.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){a=tc(a);return null===a?null:a.stateNode},findFiberByHostInstance:qo.findFiberByHostInstance||go,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.0-next-4fcc9184a-20230217"}); -exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ca;exports.createPortal=function(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!lo(b))throw Error(m(200));return Zn(a,b,null,c)}; -exports.createRoot=function(a,b){if(!lo(a))throw Error(m(299));var c=!1,d="",e=io;null!==b&&void 0!==b&&(!0===b.unstable_strictMode&&(c=!0),void 0!==b.identifierPrefix&&(d=b.identifierPrefix),void 0!==b.onRecoverableError&&(e=b.onRecoverableError));b=Yn(a,1,!1,null,null,c,!1,d,e);a[ha]=b.current;ho.current=yg;Yf(8===a.nodeType?a.parentNode:a);return new jo(b)}; -exports.findDOMNode=function(a){if(null==a)return null;if(1===a.nodeType)return a;var b=a._reactInternals;if(void 0===b){if("function"===typeof a.render)throw Error(m(188));a=Object.keys(a).join(",");throw Error(m(268,a));}a=tc(b);a=null===a?null:a.stateNode;return a};exports.flushSync=function(a){return Cn(a)};exports.hydrate=function(a,b,c){if(!mo(b))throw Error(m(200));return po(null,a,b,!0,c)}; -exports.hydrateRoot=function(a,b,c){if(!lo(a))throw Error(m(405));var d=null!=c&&c.hydratedSources||null,e=!1,f="",g=io;null!==c&&void 0!==c&&(!0===c.unstable_strictMode&&(e=!0),void 0!==c.identifierPrefix&&(f=c.identifierPrefix),void 0!==c.onRecoverableError&&(g=c.onRecoverableError));b=ao(b,null,a,1,null!=c?c:null,e,!1,f,g);a[ha]=b.current;ho.current=yg;Yf(a);if(d)for(a=0;a<d.length;a++)c=d[a],e=c._getVersion,e=e(c._source),null==b.mutableSourceEagerHydrationData?b.mutableSourceEagerHydrationData= -[c,e]:b.mutableSourceEagerHydrationData.push(c,e);return new ko(b)};exports.preinit=function(){var a=ca.Dispatcher.current;a&&a.preinit.apply(this,arguments)};exports.preload=function(){var a=ca.Dispatcher.current;a&&a.preload.apply(this,arguments)};exports.render=function(a,b,c){if(!mo(b))throw Error(m(200));return po(null,a,b,!1,c)}; -exports.unmountComponentAtNode=function(a){if(!mo(a))throw Error(m(40));return a._reactRootContainer?(Cn(function(){po(null,null,a,!1,function(){a._reactRootContainer=null;a[ha]=null})}),!0):!1};exports.unstable_batchedUpdates=Bn;exports.unstable_renderSubtreeIntoContainer=function(a,b,c,d){if(!mo(c))throw Error(m(200));if(null==a||void 0===a._reactInternals)throw Error(m(38));return po(a,b,c,!1,d)};exports.version="18.3.0-next-4fcc9184a-20230217"; +function bo(a,b,c,d,e,f,g,h,k){a=new ao(a,b,c,h,k);1===b?(b=1,!0===f&&(b|=24)):b=0;Hc&&(b|=2);f=Nh(3,null,null,b);a.current=f;f.stateNode=a;b=ek();b.refCount++;a.pooledCache=b;b.refCount++;f.memoizedState={element:d,isDehydrated:c,cache:b};hi(f);return a}function co(a,b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Oa,key:null==d?null:""+d,children:a,containerInfo:b,implementation:c}} +function eo(a){if(!a)return fh;a=a._reactInternals;a:{if(pc(a)!==a||1!==a.tag)throw Error(p(170));var b=a;do{switch(b.tag){case 3:b=b.stateNode.context;break a;case 1:if(kh(b.type)){b=b.stateNode.__reactInternalMemoizedMergedChildContext;break a}}b=b.return}while(null!==b);throw Error(p(171));}if(1===a.tag){var c=a.type;if(kh(c))return nh(a,c,b)}return b} +function fo(a,b,c,d,e,f,g,h,k){a=bo(c,d,!0,a,e,f,g,h,k);a.context=eo(null);c=a.current;d=dk();e=ck(c);f=ji(d,e);f.callback=void 0!==b&&null!==b?b:null;ki(c,f,e);a.current.lanes=e;gd(a,e,d);vn(a,d);return a} +function go(a,b,c,d){var e=b.current,f=dk(),g=ck(e);null!==C&&"function"===typeof C.markRenderScheduled&&C.markRenderScheduled(g);c=eo(c);null===b.context?b.context=c:b.pendingContext=c;b=ji(f,g);b.payload={element:a};d=void 0===d?null:d;null!==d&&(b.callback=d);a=ki(e,b,g);null!==a&&(Jj(a,e,g,f),li(a,e,g));return g}function ho(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 27:case 5:return a.child.stateNode;default:return a.child.stateNode}} +function io(a,b){a=a.memoizedState;if(null!==a&&null!==a.dehydrated){var c=a.retryLane;a.retryLane=0!==c&&c<b?c:b}}function jo(a,b){io(a,b);(a=a.alternate)&&io(a,b)}function ko(){return null}var lo=ca.Dispatcher,mo="function"===typeof reportError?reportError:function(a){console.error(a)};function no(a){this._internalRoot=a}oo.prototype.render=no.prototype.render=function(a){var b=this._internalRoot;if(null===b)throw Error(p(409));go(a,b,null,null)}; +oo.prototype.unmount=no.prototype.unmount=function(){var a=this._internalRoot;if(null!==a){this._internalRoot=null;var b=a.containerInfo;Gn(function(){go(null,a,null,null)});b[ha]=null}};function oo(a){this._internalRoot=a}oo.prototype.unstable_scheduleHydration=function(a){if(a){var b=pd();a={blockedOn:null,target:a,priority:b};for(var c=0;c<yd.length&&0!==b&&b<yd[c].priority;c++);yd.splice(c,0,a);0===c&&Dd(a)}};function po(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType)} +function qo(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||" react-mount-point-unstable "!==a.nodeValue))}function ro(){} +function so(a,b,c,d,e){if(e){if("function"===typeof d){var f=d;d=function(){var a=ho(g);f.call(a)}}var g=fo(b,d,a,0,null,!1,!1,"",ro);a._reactRootContainer=g;a[ha]=g.current;Yf(8===a.nodeType?a.parentNode:a);Gn();return g}ah(a);if("function"===typeof d){var h=d;d=function(){var a=ho(k);h.call(a)}}var k=bo(a,0,!1,null,null,!1,!1,"",ro);a._reactRootContainer=k;a[ha]=k.current;Yf(8===a.nodeType?a.parentNode:a);Gn(function(){go(b,k,c,d)});return k} +function to(a,b,c,d,e){var f=c._reactRootContainer;if(f){var g=f;if("function"===typeof e){var h=e;e=function(){var a=ho(g);h.call(a)}}go(b,g,a,e)}else g=so(c,b,a,e,d);return ho(g)}md=function(a){switch(a.tag){case 3:var b=a.stateNode;if(b.current.memoizedState.isDehydrated){var c=$c(b.pendingLanes);0!==c&&(id(b,c|2),vn(b,B()),0===(J&6)&&(Rl=B()+500,vh()))}break;case 13:Gn(function(){var b=ci(a,2);if(null!==b){var c=dk();Jj(b,a,2,c)}}),jo(a,2)}}; +nd=function(a){if(13===a.tag){var b=ci(a,134217728);if(null!==b){var c=dk();Jj(b,a,134217728,c)}jo(a,134217728)}};od=function(a){if(13===a.tag){var b=ck(a),c=ci(a,b);if(null!==c){var d=dk();Jj(c,a,b,d)}jo(a,b)}};pd=function(){return D};qd=function(a,b){var c=D;try{return D=a,b()}finally{D=c}}; +Vb=function(a,b,c){switch(b){case "input":wb(a,c);b=c.name;if("radio"===c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll("input[name="+JSON.stringify(""+b)+'][type="radio"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=ta(d);if(!e)throw Error(p(90));rb(d);wb(d,e)}}}break;case "textarea":Eb(a,c);break;case "select":b=c.value,null!=b&&Bb(a,!!c.multiple,b,!1)}};ac=Fn;bc=Gn;ca.Events=[ra,sa,ta,Zb,$b,Fn]; +var uo={findFiberByHostInstance:pa,bundleType:0,version:"18.3.0-next-6ddcbd4f9-20230209",rendererPackageName:"react-dom"}; +(function(a){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(b.isDisabled||!b.supportsFiber)return!0;try{a=z({},a,{getLaneLabelMap:Kc,injectProfilingHooks:Jc}),Fc=b.inject(a),Gc=b}catch(c){}return b.checkDCE?!0:!1})({bundleType:uo.bundleType,version:uo.version,rendererPackageName:uo.rendererPackageName,rendererConfig:uo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null, +overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ma.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){a=tc(a);return null===a?null:a.stateNode},findFiberByHostInstance:uo.findFiberByHostInstance||ko,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.0-next-6ddcbd4f9-20230209"}); +exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ca;exports.createPortal=function(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!po(b))throw Error(p(200));return co(a,b,null,c)}; +exports.createRoot=function(a,b){if(!po(a))throw Error(p(299));var c=!1,d="",e=mo;null!==b&&void 0!==b&&(!0===b.unstable_strictMode&&(c=!0),void 0!==b.identifierPrefix&&(d=b.identifierPrefix),void 0!==b.onRecoverableError&&(e=b.onRecoverableError));b=bo(a,1,!1,null,null,c,!1,d,e);a[ha]=b.current;lo.current=xg;Yf(8===a.nodeType?a.parentNode:a);return new no(b)}; +exports.findDOMNode=function(a){if(null==a)return null;if(1===a.nodeType)return a;var b=a._reactInternals;if(void 0===b){if("function"===typeof a.render)throw Error(p(188));a=Object.keys(a).join(",");throw Error(p(268,a));}a=tc(b);a=null===a?null:a.stateNode;return a};exports.flushSync=function(a){return Gn(a)};exports.hydrate=function(a,b,c){if(!qo(b))throw Error(p(200));return to(null,a,b,!0,c)}; +exports.hydrateRoot=function(a,b,c){if(!po(a))throw Error(p(405));var d=null!=c&&c.hydratedSources||null,e=!1,f="",g=mo;null!==c&&void 0!==c&&(!0===c.unstable_strictMode&&(e=!0),void 0!==c.identifierPrefix&&(f=c.identifierPrefix),void 0!==c.onRecoverableError&&(g=c.onRecoverableError));b=fo(b,null,a,1,null!=c?c:null,e,!1,f,g);a[ha]=b.current;lo.current=xg;Yf(a);if(d)for(a=0;a<d.length;a++)c=d[a],e=c._getVersion,e=e(c._source),null==b.mutableSourceEagerHydrationData?b.mutableSourceEagerHydrationData= +[c,e]:b.mutableSourceEagerHydrationData.push(c,e);return new oo(b)};exports.preinit=function(){var a=ca.Dispatcher.current;a&&a.preinit.apply(this,arguments)};exports.preload=function(){var a=ca.Dispatcher.current;a&&a.preload.apply(this,arguments)};exports.render=function(a,b,c){if(!qo(b))throw Error(p(200));return to(null,a,b,!1,c)}; +exports.unmountComponentAtNode=function(a){if(!qo(a))throw Error(p(40));return a._reactRootContainer?(Gn(function(){to(null,null,a,!1,function(){a._reactRootContainer=null;a[ha]=null})}),!0):!1};exports.unstable_batchedUpdates=Fn;exports.unstable_renderSubtreeIntoContainer=function(a,b,c,d){if(!qo(c))throw Error(p(200));if(null==a||void 0===a._reactInternals)throw Error(p(38));return to(a,b,c,!1,d)};exports.version="18.3.0-next-6ddcbd4f9-20230209"; /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( diff --git a/packages/next/src/compiled/react-dom/package.json b/packages/next/src/compiled/react-dom/package.json index d0f3d4888cd6b..7ed49bf839052 100644 --- a/packages/next/src/compiled/react-dom/package.json +++ b/packages/next/src/compiled/react-dom/package.json @@ -1,6 +1,6 @@ { "name": "react-dom", - "version": "18.3.0-next-4fcc9184a-20230217", + "version": "18.3.0-next-6ddcbd4f9-20230209", "description": "React package for working with the DOM.", "main": "index.js", "repository": { @@ -18,10 +18,10 @@ "homepage": "https://reactjs.org/", "dependencies": { "loose-envify": "^1.1.0", - "scheduler": "0.24.0-next-4fcc9184a-20230217" + "scheduler": "0.24.0-next-6ddcbd4f9-20230209" }, "peerDependencies": { - "react": "18.3.0-next-4fcc9184a-20230217" + "react": "18.3.0-next-6ddcbd4f9-20230209" }, "files": [ "LICENSE", diff --git a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-node-register.js b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-node-register.js index 34e2352526228..5c7ca47dfa555 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-node-register.js +++ b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-node-register.js @@ -10,12 +10,274 @@ 'use strict'; -'use strict';const m=require("acorn"),n=require("url"),q=require("module"); -module.exports=function(){const h=Symbol.for("react.client.reference"),k=Symbol.for("react.server.reference"),r=Promise.prototype,t=Function.prototype.bind;Function.prototype.bind=function(a){const b=t.apply(this,arguments);if(this.$$typeof===k){const a=Array.prototype.slice.call(arguments,1);b.$$typeof=k;b.$$filepath=this.$$filepath;b.$$name=this.$$name;b.$$bound=this.$$bound.concat(a)}return b};const u={get:function(a,b){switch(b){case "$$typeof":return a.$$typeof;case "filepath":return a.filepath; -case "name":return a.name;case "displayName":return;case "async":return a.async;case "defaultProps":return;case "toJSON":return;case Symbol.toPrimitive:return Object.prototype[Symbol.toPrimitive];case "Provider":throw Error("Cannot render a Client Context Provider on the Server. Instead, you can export a Client Component wrapper that itself renders a Client Context Provider.");}switch(a.name){case "":a=String(b);break;case "*":a=String(b);break;default:a=String(a.name)+"."+String(b)}throw Error("Cannot access "+ -a+" on the server. You cannot dot into a client module from a server component. You can only pass the imported name through.");},set:function(){throw Error("Cannot assign to a client module from a server module.");}},p={get:function(a,b){switch(b){case "$$typeof":return a.$$typeof;case "filepath":return a.filepath;case "name":return a.name;case "async":return a.async;case "defaultProps":return;case "toJSON":return;case Symbol.toPrimitive:return Object.prototype[Symbol.toPrimitive];case "__esModule":const d= -a.filepath;a.default=Object.defineProperties(function(){throw Error("Attempted to call the default export of "+d+" from the server but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.");},{name:{value:""},$$typeof:{value:h},filepath:{value:a.filepath},async:{value:a.async}});return!0;case "then":if(a.then)return a.then;if(a.async)return;{var c=Object.defineProperties({},{name:{value:"*"}, -$$typeof:{value:h},filepath:{value:a.filepath},async:{value:!0}});const b=new Proxy(c,p);a.status="fulfilled";a.value=b;return a.then=Object.defineProperties(function(a){return Promise.resolve(a(b))},{name:{value:"then"},$$typeof:{value:h},filepath:{value:a.filepath},async:{value:!1}})}}c=a[b];c||(c=Object.defineProperties(function(){throw Error("Attempted to call "+String(b)+"() from the server but "+String(b)+" is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."); -},{name:{value:b},$$typeof:{value:h},filepath:{value:a.filepath},async:{value:a.async}}),c=a[b]=new Proxy(c,u));return c},getPrototypeOf(){return r},set:function(){throw Error("Cannot assign to a client module from a server module.");}},l=q.prototype._compile;q.prototype._compile=function(a,b){if(-1===a.indexOf("use client")&&-1===a.indexOf("use server"))return l.apply(this,arguments);var c=m.parse(a,{ecmaVersion:"2019",sourceType:"source"}).body,d=!1,f=!1;for(var e=0;e<c.length;e++){var g=c[e];if("ExpressionStatement"!== -g.type||!g.directive)break;"use client"===g.directive&&(d=!0);"use server"===g.directive&&(f=!0)}if(!d&&!f)return l.apply(this,arguments);if(d&&f)throw Error('Cannot have both "use client" and "use server" directives in the same file.');d&&(c=n.pathToFileURL(b).href,c=Object.defineProperties({},{name:{value:"*"},$$typeof:{value:h},filepath:{value:c},async:{value:!1}}),this.exports=new Proxy(c,p));if(f)if(l.apply(this,arguments),f=n.pathToFileURL(b).href,c=this.exports,"function"===typeof c)Object.defineProperties(c, -{$$typeof:{value:k},$$filepath:{value:f},$$name:{value:"*"},$$bound:{value:[]}});else for(d=Object.keys(c),e=0;e<d.length;e++){g=d[e];const a=c[d[e]];"function"===typeof a&&Object.defineProperties(a,{$$typeof:{value:k},$$filepath:{value:f},$$name:{value:g},$$bound:{value:[]}})}}}; +'use strict'; + +var acorn = require('acorn'); + +var url = require('url'); + +var Module = require('module'); + +module.exports = function register() { + var CLIENT_REFERENCE = Symbol.for('react.client.reference'); + var PROMISE_PROTOTYPE = Promise.prototype; + var deepProxyHandlers = { + get: function (target, name, receiver) { + switch (name) { + // These names are read by the Flight runtime if you end up using the exports object. + case '$$typeof': + // These names are a little too common. We should probably have a way to + // have the Flight runtime extract the inner target instead. + return target.$$typeof; + + case 'filepath': + return target.filepath; + + case 'name': + return target.name; + + case 'async': + return target.async; + // We need to special case this because createElement reads it if we pass this + // reference. + + case 'defaultProps': + return undefined; + // Avoid this attempting to be serialized. + + case 'toJSON': + return undefined; + + case Symbol.toPrimitive: + // $FlowFixMe[prop-missing] + return Object.prototype[Symbol.toPrimitive]; + + case 'Provider': + throw new Error("Cannot render a Client Context Provider on the Server. " + "Instead, you can export a Client Component wrapper " + "that itself renders a Client Context Provider."); + } + + var expression; + + switch (target.name) { + case '': + // eslint-disable-next-line react-internal/safe-string-coercion + expression = String(name); + break; + + case '*': + // eslint-disable-next-line react-internal/safe-string-coercion + expression = String(name); + break; + + default: + // eslint-disable-next-line react-internal/safe-string-coercion + expression = String(target.name) + '.' + String(name); + } + + throw new Error("Cannot access " + expression + " on the server. " + 'You cannot dot into a client module from a server component. ' + 'You can only pass the imported name through.'); + }, + set: function () { + throw new Error('Cannot assign to a client module from a server module.'); + } + }; + var proxyHandlers = { + get: function (target, name, receiver) { + switch (name) { + // These names are read by the Flight runtime if you end up using the exports object. + case '$$typeof': + // These names are a little too common. We should probably have a way to + // have the Flight runtime extract the inner target instead. + return target.$$typeof; + + case 'filepath': + return target.filepath; + + case 'name': + return target.name; + + case 'async': + return target.async; + // We need to special case this because createElement reads it if we pass this + // reference. + + case 'defaultProps': + return undefined; + // Avoid this attempting to be serialized. + + case 'toJSON': + return undefined; + + case Symbol.toPrimitive: + // $FlowFixMe[prop-missing] + return Object.prototype[Symbol.toPrimitive]; + + case '__esModule': + // Something is conditionally checking which export to use. We'll pretend to be + // an ESM compat module but then we'll check again on the client. + var moduleId = target.filepath; + target.default = Object.defineProperties(function () { + throw new Error("Attempted to call the default export of " + moduleId + " from the server " + "but it's on the client. It's not possible to invoke a client function from " + "the server, it can only be rendered as a Component or passed to props of a " + "Client Component."); + }, { + // This a placeholder value that tells the client to conditionally use the + // whole object or just the default export. + name: { + value: '' + }, + $$typeof: { + value: CLIENT_REFERENCE + }, + filepath: { + value: target.filepath + }, + async: { + value: target.async + } + }); + return true; + + case 'then': + if (target.then) { + // Use a cached value + return target.then; + } + + if (!target.async) { + // If this module is expected to return a Promise (such as an AsyncModule) then + // we should resolve that with a client reference that unwraps the Promise on + // the client. + var clientReference = Object.defineProperties({}, { + // Represents the whole Module object instead of a particular import. + name: { + value: '*' + }, + $$typeof: { + value: CLIENT_REFERENCE + }, + filepath: { + value: target.filepath + }, + async: { + value: true + } + }); + var proxy = new Proxy(clientReference, proxyHandlers); // Treat this as a resolved Promise for React's use() + + target.status = 'fulfilled'; + target.value = proxy; + var then = target.then = Object.defineProperties(function then(resolve, reject) { + // Expose to React. + return Promise.resolve(resolve(proxy)); + }, // If this is not used as a Promise but is treated as a reference to a `.then` + // export then we should treat it as a reference to that name. + { + name: { + value: 'then' + }, + $$typeof: { + value: CLIENT_REFERENCE + }, + filepath: { + value: target.filepath + }, + async: { + value: false + } + }); + return then; + } else { + // Since typeof .then === 'function' is a feature test we'd continue recursing + // indefinitely if we return a function. Instead, we return an object reference + // if we check further. + return undefined; + } + + } + + var cachedReference = target[name]; + + if (!cachedReference) { + var reference = Object.defineProperties(function () { + throw new Error( // eslint-disable-next-line react-internal/safe-string-coercion + "Attempted to call " + String(name) + "() from the server but " + String(name) + " is on the client. " + "It's not possible to invoke a client function from the server, it can " + "only be rendered as a Component or passed to props of a Client Component."); + }, { + name: { + value: name + }, + $$typeof: { + value: CLIENT_REFERENCE + }, + filepath: { + value: target.filepath + }, + async: { + value: target.async + } + }); + cachedReference = target[name] = new Proxy(reference, deepProxyHandlers); + } + + return cachedReference; + }, + getPrototypeOf: function (target) { + // Pretend to be a Promise in case anyone asks. + return PROMISE_PROTOTYPE; + }, + set: function () { + throw new Error('Cannot assign to a client module from a server module.'); + } + }; // $FlowFixMe[prop-missing] found when upgrading Flow + + var originalCompile = Module.prototype._compile; // $FlowFixMe[prop-missing] found when upgrading Flow + + Module.prototype._compile = function (content, filename) { + // Do a quick check for the exact string. If it doesn't exist, don't + // bother parsing. + if (content.indexOf('use client') === -1) { + return originalCompile.apply(this, arguments); + } + + var _acorn$parse = acorn.parse(content, { + ecmaVersion: '2019', + sourceType: 'source' + }), + body = _acorn$parse.body; + + var useClient = false; + + for (var i = 0; i < body.length; i++) { + var node = body[i]; + + if (node.type !== 'ExpressionStatement' || !node.directive) { + break; + } + + if (node.directive === 'use client') { + useClient = true; + break; + } + } + + if (!useClient) { + return originalCompile.apply(this, arguments); + } + + var moduleId = url.pathToFileURL(filename).href; + var clientReference = Object.defineProperties({}, { + // Represents the whole Module object instead of a particular import. + name: { + value: '*' + }, + $$typeof: { + value: CLIENT_REFERENCE + }, + filepath: { + value: moduleId + }, + async: { + value: false + } + }); // $FlowFixMe[incompatible-call] found when upgrading Flow + + this.exports = new Proxy(clientReference, proxyHandlers); + }; +}; diff --git a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-plugin.js b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-plugin.js index c4793b74b9830..cfbc65e6526da 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-plugin.js +++ b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-plugin.js @@ -10,11 +10,250 @@ 'use strict'; -'use strict';var k=require("path"),l=require("url"),n=require("neo-async"),p=require("webpack/lib/dependencies/ModuleDependency"),q=require("webpack/lib/dependencies/NullDependency"),r=require("webpack/lib/Template"),t=require("webpack");const u=Array.isArray;class v extends p{constructor(a){super(a)}get type(){return"client-reference"}}const w=require.resolve("../client.browser.js"); -class x{constructor(a){this.manifestFilename=this.chunkName=this.clientReferences=void 0;if(!a||"boolean"!==typeof a.isServer)throw Error("React Server Plugin: You must specify the isServer option as a boolean.");if(a.isServer)throw Error("TODO: Implement the server compiler.");a.clientReferences?"string"!==typeof a.clientReferences&&u(a.clientReferences)?this.clientReferences=a.clientReferences:this.clientReferences=[a.clientReferences]:this.clientReferences=[{directory:".",recursive:!0,include:/\.(js|ts|jsx|tsx)$/}]; -"string"===typeof a.chunkName?(this.chunkName=a.chunkName,/\[(index|request)\]/.test(this.chunkName)||(this.chunkName+="[index]")):this.chunkName="client[index]";this.manifestFilename=a.manifestFilename||"react-client-manifest.json"}apply(a){const e=this;let f,m=!1;a.hooks.beforeCompile.tapAsync("React Server Plugin",(c,b)=>{c=c.contextModuleFactory;const d=a.resolverFactory.get("context",{});e.resolveAllClientFiles(a.context,d,a.inputFileSystem,c,function(a,c){a?b(a):(f=c,b())})});a.hooks.thisCompilation.tap("React Server Plugin", -(a,b)=>{b=b.normalModuleFactory;a.dependencyFactories.set(v,b);a.dependencyTemplates.set(v,new q.Template);a=a=>{a.hooks.program.tap("React Server Plugin",()=>{const b=a.state.module;if(b.resource===w&&(m=!0,f))for(let a=0;a<f.length;a++){const g=f[a];var c=e.chunkName.replace(/\[index\]/g,""+a).replace(/\[request\]/g,r.toPath(g.userRequest));c=new t.AsyncDependenciesBlock({name:c},null,g.request);c.addDependency(g);b.addBlock(c)}})};b.hooks.parser.for("javascript/auto").tap("HarmonyModulesPlugin", -a);b.hooks.parser.for("javascript/esm").tap("HarmonyModulesPlugin",a);b.hooks.parser.for("javascript/dynamic").tap("HarmonyModulesPlugin",a)});a.hooks.make.tap("React Server Plugin",a=>{a.hooks.processAssets.tap({name:"React Server Plugin",stage:t.Compilation.PROCESS_ASSETS_STAGE_REPORT},function(){if(!1===m)a.warnings.push(new t.WebpackError("Client runtime at react-server-dom-webpack/client was not found. React Server Components module map file "+e.manifestFilename+" was not created."));else{var b= -{};a.chunkGroups.forEach(function(c){function d(c,h){if(/\.(js|ts)x?$/.test(h.resource)){var d=a.moduleGraph.getExportsInfo(h).getProvidedExports(),g={};["","*"].concat(Array.isArray(d)?d:[]).forEach(function(a){g[a]={id:c,chunks:e,name:a}});h=l.pathToFileURL(h.resource).href;void 0!==h&&(b[h]=g)}}const e=c.chunks.map(function(a){return a.id});c.chunks.forEach(function(b){b=a.chunkGraph.getChunkModulesIterable(b);Array.from(b).forEach(function(b){const c=a.chunkGraph.getModuleId(b);d(c,b);b.modules&& -b.modules.forEach(a=>{d(c,a)})})})});var c=JSON.stringify(b,null,2);a.emitAsset(e.manifestFilename,new t.sources.RawSource(c,!1))}})})}resolveAllClientFiles(a,e,f,m,c){n.map(this.clientReferences,(b,c)=>{"string"===typeof b?c(null,[new v(b)]):e.resolve({},a,b.directory,{},(a,d)=>{if(a)return c(a);m.resolveDependencies(f,{resource:d,resourceQuery:"",recursive:void 0===b.recursive?!0:b.recursive,regExp:b.include,include:void 0,exclude:b.exclude},(a,b)=>{if(a)return c(a);a=b.map(a=>{var b=k.join(d,a.userRequest); -b=new v(b);b.userRequest=a.userRequest;return b});c(null,a)})})},(a,d)=>{if(a)return c(a);a=[];for(let b=0;b<d.length;b++)a.push.apply(a,d[b]);c(null,a)})}}module.exports=x; +'use strict'; + +var path = require('path'); +var url = require('url'); +var asyncLib = require('neo-async'); +var ModuleDependency = require('webpack/lib/dependencies/ModuleDependency'); +var NullDependency = require('webpack/lib/dependencies/NullDependency'); +var Template = require('webpack/lib/Template'); +var webpack = require('webpack'); + +var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare + +function isArray(a) { + return isArrayImpl(a); +} + +class ClientReferenceDependency extends ModuleDependency { + constructor(request) { + super(request); + } + + get type() { + return 'client-reference'; + } + +} // This is the module that will be used to anchor all client references to. +// I.e. it will have all the client files as async deps from this point on. +// We use the Flight client implementation because you can't get to these +// without the client runtime so it's the first time in the loading sequence +// you might want them. + + +var clientImportName = 'react-server-dom-webpack/client'; + +var clientFileName = require.resolve('../client'); + +var PLUGIN_NAME = 'React Server Plugin'; +class ReactFlightWebpackPlugin { + constructor(options) { + this.clientReferences = void 0; + this.chunkName = void 0; + this.manifestFilename = void 0; + + if (!options || typeof options.isServer !== 'boolean') { + throw new Error(PLUGIN_NAME + ': You must specify the isServer option as a boolean.'); + } + + if (options.isServer) { + throw new Error('TODO: Implement the server compiler.'); + } + + if (!options.clientReferences) { + this.clientReferences = [{ + directory: '.', + recursive: true, + include: /\.(js|ts|jsx|tsx)$/ + }]; + } else if (typeof options.clientReferences === 'string' || !isArray(options.clientReferences)) { + this.clientReferences = [options.clientReferences]; + } else { + // $FlowFixMe[incompatible-type] found when upgrading Flow + this.clientReferences = options.clientReferences; + } + + if (typeof options.chunkName === 'string') { + this.chunkName = options.chunkName; + + if (!/\[(index|request)\]/.test(this.chunkName)) { + this.chunkName += '[index]'; + } + } else { + this.chunkName = 'client[index]'; + } + + this.manifestFilename = options.manifestFilename || 'react-client-manifest.json'; + } + + apply(compiler) { + var _this = this; + + var resolvedClientReferences; + var clientFileNameFound = false; // Find all client files on the file system + + compiler.hooks.beforeCompile.tapAsync(PLUGIN_NAME, function (_ref, callback) { + var contextModuleFactory = _ref.contextModuleFactory; + var contextResolver = compiler.resolverFactory.get('context', {}); + + _this.resolveAllClientFiles(compiler.context, contextResolver, compiler.inputFileSystem, contextModuleFactory, function (err, resolvedClientRefs) { + if (err) { + callback(err); + return; + } + + resolvedClientReferences = resolvedClientRefs; + callback(); + }); + }); + compiler.hooks.thisCompilation.tap(PLUGIN_NAME, function (compilation, _ref2) { + var normalModuleFactory = _ref2.normalModuleFactory; + compilation.dependencyFactories.set(ClientReferenceDependency, normalModuleFactory); + compilation.dependencyTemplates.set(ClientReferenceDependency, new NullDependency.Template()); // $FlowFixMe[missing-local-annot] + + var handler = function (parser) { + // We need to add all client references as dependency of something in the graph so + // Webpack knows which entries need to know about the relevant chunks and include the + // map in their runtime. The things that actually resolves the dependency is the Flight + // client runtime. So we add them as a dependency of the Flight client runtime. + // Anything that imports the runtime will be made aware of these chunks. + parser.hooks.program.tap(PLUGIN_NAME, function () { + var module = parser.state.module; + + if (module.resource !== clientFileName) { + return; + } + + clientFileNameFound = true; + + if (resolvedClientReferences) { + // $FlowFixMe[incompatible-use] found when upgrading Flow + for (var i = 0; i < resolvedClientReferences.length; i++) { + // $FlowFixMe[incompatible-use] found when upgrading Flow + var dep = resolvedClientReferences[i]; + + var chunkName = _this.chunkName.replace(/\[index\]/g, '' + i).replace(/\[request\]/g, Template.toPath(dep.userRequest)); + + var block = new webpack.AsyncDependenciesBlock({ + name: chunkName + }, null, dep.request); + block.addDependency(dep); + module.addBlock(block); + } + } + }); + }; + + normalModuleFactory.hooks.parser.for('javascript/auto').tap('HarmonyModulesPlugin', handler); + normalModuleFactory.hooks.parser.for('javascript/esm').tap('HarmonyModulesPlugin', handler); + normalModuleFactory.hooks.parser.for('javascript/dynamic').tap('HarmonyModulesPlugin', handler); + }); + compiler.hooks.make.tap(PLUGIN_NAME, function (compilation) { + compilation.hooks.processAssets.tap({ + name: PLUGIN_NAME, + stage: webpack.Compilation.PROCESS_ASSETS_STAGE_REPORT + }, function () { + if (clientFileNameFound === false) { + compilation.warnings.push(new webpack.WebpackError("Client runtime at " + clientImportName + " was not found. React Server Components module map file " + _this.manifestFilename + " was not created.")); + return; + } + + var json = {}; + compilation.chunkGroups.forEach(function (chunkGroup) { + var chunkIds = chunkGroup.chunks.map(function (c) { + return c.id; + }); // $FlowFixMe[missing-local-annot] + + function recordModule(id, module) { + // TODO: Hook into deps instead of the target module. + // That way we know by the type of dep whether to include. + // It also resolves conflicts when the same module is in multiple chunks. + if (!/\.(js|ts)x?$/.test(module.resource)) { + return; + } + + var moduleProvidedExports = compilation.moduleGraph.getExportsInfo(module).getProvidedExports(); + var moduleExports = {}; + ['', '*'].concat(Array.isArray(moduleProvidedExports) ? moduleProvidedExports : []).forEach(function (name) { + moduleExports[name] = { + id: id, + chunks: chunkIds, + name: name + }; + }); + var href = url.pathToFileURL(module.resource).href; + + if (href !== undefined) { + json[href] = moduleExports; + } + } + + chunkGroup.chunks.forEach(function (chunk) { + var chunkModules = compilation.chunkGraph.getChunkModulesIterable(chunk); + Array.from(chunkModules).forEach(function (module) { + var moduleId = compilation.chunkGraph.getModuleId(module); + recordModule(moduleId, module); // If this is a concatenation, register each child to the parent ID. + + if (module.modules) { + module.modules.forEach(function (concatenatedMod) { + recordModule(moduleId, concatenatedMod); + }); + } + }); + }); + }); + var output = JSON.stringify(json, null, 2); + compilation.emitAsset(_this.manifestFilename, new webpack.sources.RawSource(output, false)); + }); + }); + } // This attempts to replicate the dynamic file path resolution used for other wildcard + // resolution in Webpack is using. + + + resolveAllClientFiles(context, contextResolver, fs, contextModuleFactory, callback) { + asyncLib.map(this.clientReferences, function (clientReferencePath, cb) { + if (typeof clientReferencePath === 'string') { + cb(null, [new ClientReferenceDependency(clientReferencePath)]); + return; + } + + var clientReferenceSearch = clientReferencePath; + contextResolver.resolve({}, context, clientReferencePath.directory, {}, function (err, resolvedDirectory) { + if (err) return cb(err); + var options = { + resource: resolvedDirectory, + resourceQuery: '', + recursive: clientReferenceSearch.recursive === undefined ? true : clientReferenceSearch.recursive, + regExp: clientReferenceSearch.include, + include: undefined, + exclude: clientReferenceSearch.exclude + }; + contextModuleFactory.resolveDependencies(fs, options, function (err2, deps) { + if (err2) return cb(err2); + var clientRefDeps = deps.map(function (dep) { + // use userRequest instead of request. request always end with undefined which is wrong + var request = path.join(resolvedDirectory, dep.userRequest); + var clientRefDep = new ClientReferenceDependency(request); + clientRefDep.userRequest = dep.userRequest; + return clientRefDep; + }); + cb(null, clientRefDeps); + }); + }); + }, function (err, result) { + if (err) return callback(err); + var flat = []; + + for (var i = 0; i < result.length; i++) { + // $FlowFixMe[method-unbinding] + flat.push.apply(flat, result[i]); + } + + callback(null, flat); + }); + } + +} + +module.exports = ReactFlightWebpackPlugin; diff --git a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.development.js b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.development.js index 93825f2eb42f0..f8d63f740760d 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.development.js @@ -200,25 +200,21 @@ function processReferenceChunk(request, id, reference) { var row = id.toString(16) + ':' + json + '\n'; return stringToChunk(row); } -function processImportChunk(request, id, clientReferenceMetadata) { - var json = stringify(clientReferenceMetadata); +function processModuleChunk(request, id, moduleMetaData) { + var json = stringify(moduleMetaData); var row = serializeRowHeader('I', id) + json + '\n'; return stringToChunk(row); } // eslint-disable-next-line no-unused-vars var CLIENT_REFERENCE_TAG = Symbol.for('react.client.reference'); -var SERVER_REFERENCE_TAG = Symbol.for('react.server.reference'); function getClientReferenceKey(reference) { return reference.filepath + '#' + reference.name + (reference.async ? '#async' : ''); } function isClientReference(reference) { return reference.$$typeof === CLIENT_REFERENCE_TAG; } -function isServerReference(reference) { - return reference.$$typeof === SERVER_REFERENCE_TAG; -} -function resolveClientReferenceMetadata(config, clientReference) { +function resolveModuleMetaData(config, clientReference) { var resolvedModuleData = config[clientReference.filepath][clientReference.name]; if (clientReference.async) { @@ -232,13 +228,6 @@ function resolveClientReferenceMetadata(config, clientReference) { return resolvedModuleData; } } -function resolveServerReferenceMetadata(config, serverReference) { - return { - id: serverReference.$$filepath, - name: serverReference.$$name, - bound: Promise.resolve(serverReference.$$bound) - }; -} // ATTENTION // When adding new symbols to this file, @@ -514,7 +503,6 @@ var isUnitlessNumber = { opacity: true, order: true, orphans: true, - scale: true, tabSize: true, widows: true, zIndex: true, @@ -564,7 +552,7 @@ function isArray(a) { // Run `yarn generate-inline-fizz-runtime` to generate. var clientRenderBoundary = '$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};'; var completeBoundary = '$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};'; -var completeBoundaryWithStyles = '$RM=new Map;\n$RR=function(p,q,w){function r(l){this.s=l}for(var t=$RC,m=$RM,u=new Map,n=new Map,g=document,h,e,f=g.querySelectorAll("template[data-precedence]"),c=0;e=f[c++];){for(var b=e.content.firstChild;b;b=b.nextSibling)u.set(b.getAttribute("data-href"),b);e.parentNode.removeChild(e)}f=g.querySelectorAll("link[data-precedence],style[data-precedence]");for(c=0;e=f[c++];)m.set(e.getAttribute("STYLE"===e.nodeName?"data-href":"href"),e),n.set(e.dataset.precedence,h=e);e=0;f=[];for(var d,\nv,a;d=w[e++];){var k=0;b=d[k++];if(!(a=m.get(b))){if(a=u.get(b))c=a.getAttribute("data-precedence");else{a=g.createElement("link");a.href=b;a.rel="stylesheet";for(a.dataset.precedence=c=d[k++];v=d[k++];)a.setAttribute(v,d[k++]);d=a._p=new Promise(function(l,x){a.onload=l;a.onerror=x});d.then(r.bind(d,"l"),r.bind(d,"e"))}m.set(b,a);b=n.get(c)||h;b===h&&(h=a);n.set(c,a);b?b.parentNode.insertBefore(a,b.nextSibling):(c=g.head,c.insertBefore(a,c.firstChild))}d=a._p;c=a.getAttribute("media");!d||"l"===\nd.s||c&&!matchMedia(c).matches||f.push(d)}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};'; +var completeBoundaryWithStyles = '$RM=new Map;\n$RR=function(p,q,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};'; var completeSegment = '$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};'; var ReactDOMSharedInternals = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; @@ -645,10 +633,10 @@ var completeSegmentScript2 = stringToPrecomputedChunk('","'); var completeSegmentScriptEnd = stringToPrecomputedChunk('")</script>'); var completeSegmentData1 = stringToPrecomputedChunk('<template data-rsi="" data-sid="'); var completeSegmentData2 = stringToPrecomputedChunk('" data-pid="'); -var completeBoundaryScript1Full = stringToPrecomputedChunk(completeBoundary + '$RC("'); +var completeBoundaryScript1Full = stringToPrecomputedChunk(completeBoundary + ';$RC("'); var completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC("'); -var completeBoundaryWithStylesScript1FullBoth = stringToPrecomputedChunk(completeBoundary + completeBoundaryWithStyles + '$RR("'); -var completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk(completeBoundaryWithStyles + '$RR("'); +var completeBoundaryWithStylesScript1FullBoth = stringToPrecomputedChunk(completeBoundary + ';' + completeBoundaryWithStyles + ';$RR("'); +var completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk(completeBoundaryWithStyles + ';$RR("'); var completeBoundaryWithStylesScript1Partial = stringToPrecomputedChunk('$RR("'); var completeBoundaryScript2 = stringToPrecomputedChunk('","'); var completeBoundaryScript3a = stringToPrecomputedChunk('",'); @@ -668,8 +656,6 @@ var clientRenderData2 = stringToPrecomputedChunk('" data-dgst="'); var clientRenderData3 = stringToPrecomputedChunk('" data-msg="'); var clientRenderData4 = stringToPrecomputedChunk('" data-stck="'); -var styleTagTemplateOpen = stringToPrecomputedChunk('<template data-precedence="">'); -var styleTagTemplateClose = stringToPrecomputedChunk('</template>'); // Tracks whether we wrote any late style tags. We use this to determine var precedencePlaceholderStart = stringToPrecomputedChunk('<style data-precedence="'); var precedencePlaceholderEnd = stringToPrecomputedChunk('"></style>'); @@ -1196,12 +1182,11 @@ function createRequest(model, bundlerConfig, onError, context, identifierPrefix) pendingChunks: 0, abortableTasks: abortSet, pingedTasks: pingedTasks, - completedImportChunks: [], + completedModuleChunks: [], completedJSONChunks: [], completedErrorChunks: [], writtenSymbols: new Map(), - writtenClientReferences: new Map(), - writtenServerReferences: new Map(), + writtenModules: new Map(), writtenProviders: new Map(), identifierPrefix: identifierPrefix || '', identifierCount: 1, @@ -1512,10 +1497,6 @@ function serializePromiseID(id) { return '$@' + id.toString(16); } -function serializeServerReferenceID(id) { - return '$F' + id.toString(16); -} - function serializeSymbolReference(name) { return '$S' + name; } @@ -1524,10 +1505,10 @@ function serializeProviderReference(name) { return '$P' + name; } -function serializeClientReference(request, parent, key, clientReference) { - var clientReferenceKey = getClientReferenceKey(clientReference); - var writtenClientReferences = request.writtenClientReferences; - var existingId = writtenClientReferences.get(clientReferenceKey); +function serializeClientReference(request, parent, key, moduleReference) { + var moduleKey = getClientReferenceKey(moduleReference); + var writtenModules = request.writtenModules; + var existingId = writtenModules.get(moduleKey); if (existingId !== undefined) { if (parent[0] === REACT_ELEMENT_TYPE && key === '1') { @@ -1543,11 +1524,11 @@ function serializeClientReference(request, parent, key, clientReference) { } try { - var clientReferenceMetadata = resolveClientReferenceMetadata(request.bundlerConfig, clientReference); + var moduleMetaData = resolveModuleMetaData(request.bundlerConfig, moduleReference); request.pendingChunks++; - var importId = request.nextChunkId++; - emitImportChunk(request, importId, clientReferenceMetadata); - writtenClientReferences.set(clientReferenceKey, importId); + var moduleId = request.nextChunkId++; + emitModuleChunk(request, moduleId, moduleMetaData); + writtenModules.set(moduleKey, moduleId); if (parent[0] === REACT_ELEMENT_TYPE && key === '1') { // If we're encoding the "type" of an element, we can refer @@ -1555,10 +1536,10 @@ function serializeClientReference(request, parent, key, clientReference) { // knows how to deal with lazy values. This lets us suspend // on this component rather than its parent until the code has // loaded. - return serializeLazyID(importId); + return serializeLazyID(moduleId); } - return serializeByValueID(importId); + return serializeByValueID(moduleId); } catch (x) { request.pendingChunks++; var errorId = request.nextChunkId++; @@ -1576,24 +1557,6 @@ function serializeClientReference(request, parent, key, clientReference) { } } -function serializeServerReference(request, parent, key, serverReference) { - var writtenServerReferences = request.writtenServerReferences; - var existingId = writtenServerReferences.get(serverReference); - - if (existingId !== undefined) { - return serializeServerReferenceID(existingId); - } - - var serverReferenceMetadata = resolveServerReferenceMetadata(request.bundlerConfig, serverReference); - request.pendingChunks++; - var metadataId = request.nextChunkId++; // We assume that this object doesn't suspend. - - var processedChunk = processModelChunk(request, metadataId, serverReferenceMetadata); - request.completedJSONChunks.push(processedChunk); - writtenServerReferences.set(serverReference, metadataId); - return serializeServerReferenceID(metadataId); -} - function escapeStringValue(value) { if (value[0] === '$') { // We need to escape $ or @ prefixed strings since we use those to encode @@ -2022,7 +1985,7 @@ function resolveModelToJSON(request, parent, key, value) { if (typeof value === 'object') { if (isClientReference(value)) { - return serializeClientReference(request, parent, key, value); // $FlowFixMe[method-unbinding] + return serializeClientReference(request, parent, key, value); } else if (typeof value.then === 'function') { // We assume that any object with a .then property is a "Thenable" type, // or a Promise type. Either of which can be represented by a Promise. @@ -2086,14 +2049,10 @@ function resolveModelToJSON(request, parent, key, value) { return serializeClientReference(request, parent, key, value); } - if (isServerReference(value)) { - return serializeServerReference(request, parent, key, value); - } - if (/^on[A-Z]/.test(key)) { throw new Error('Event handlers cannot be passed to Client Component props.' + describeObjectForErrorMessage(parent, key) + '\nIf you need interactivity, consider converting part of this to a Client Component.'); } else { - throw new Error('Functions cannot be passed directly to Client Components ' + 'unless you explicitly expose it by marking it with "use server".' + describeObjectForErrorMessage(parent, key)); + throw new Error('Functions cannot be passed directly to Client Components ' + "because they're not serializable." + describeObjectForErrorMessage(parent, key)); } } @@ -2185,15 +2144,15 @@ function emitErrorChunkDev(request, id, digest, message, stack) { request.completedErrorChunks.push(processedChunk); } -function emitImportChunk(request, id, clientReferenceMetadata) { - var processedChunk = processImportChunk(request, id, clientReferenceMetadata); - request.completedImportChunks.push(processedChunk); +function emitModuleChunk(request, id, moduleMetaData) { + var processedChunk = processModuleChunk(request, id, moduleMetaData); + request.completedModuleChunks.push(processedChunk); } function emitSymbolChunk(request, id, name) { var symbolReference = serializeSymbolReference(name); var processedChunk = processReferenceChunk(request, id, symbolReference); - request.completedImportChunks.push(processedChunk); + request.completedModuleChunks.push(processedChunk); } function emitProviderChunk(request, id, contextName) { @@ -2316,12 +2275,12 @@ function flushCompletedChunks(request, destination) { try { // We emit module chunks first in the stream so that // they can be preloaded as early as possible. - var importsChunks = request.completedImportChunks; + var moduleChunks = request.completedModuleChunks; var i = 0; - for (; i < importsChunks.length; i++) { + for (; i < moduleChunks.length; i++) { request.pendingChunks--; - var chunk = importsChunks[i]; + var chunk = moduleChunks[i]; var keepWriting = writeChunkAndReturn(destination, chunk); if (!keepWriting) { @@ -2331,7 +2290,7 @@ function flushCompletedChunks(request, destination) { } } - importsChunks.splice(0, i); // Next comes model data. + moduleChunks.splice(0, i); // Next comes model data. var jsonChunks = request.completedJSONChunks; i = 0; diff --git a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.production.min.js b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.production.min.js index 94bd0cd57e92b..ecaf60557a9c6 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.production.min.js +++ b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.production.min.js @@ -7,55 +7,53 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -'use strict';var aa=require("react");var e=null,m=0;function n(a,b){if(0!==b.length)if(512<b.length)0<m&&(a.enqueue(new Uint8Array(e.buffer,0,m)),e=new Uint8Array(512),m=0),a.enqueue(b);else{var c=e.length-m;c<b.length&&(0===c?a.enqueue(e):(e.set(b.subarray(0,c),m),a.enqueue(e),b=b.subarray(c)),e=new Uint8Array(512),m=0);e.set(b,m);m+=b.length}return!0}var p=new TextEncoder;function q(a){return p.encode(a)}function ba(a,b){"function"===typeof a.error?a.error(b):a.close()} -var r=JSON.stringify;function ea(a,b,c){a=r(c,a.toJSON);b=b.toString(16)+":"+a+"\n";return p.encode(b)}function t(a,b,c){a=r(c);b=b.toString(16)+":"+a+"\n";return p.encode(b)} -var u=Symbol.for("react.client.reference"),fa=Symbol.for("react.server.reference"),v=Symbol.for("react.element"),ha=Symbol.for("react.fragment"),ia=Symbol.for("react.provider"),ja=Symbol.for("react.server_context"),ka=Symbol.for("react.forward_ref"),la=Symbol.for("react.suspense"),ma=Symbol.for("react.suspense_list"),na=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),oa=Symbol.for("react.default_value"),pa=Symbol.for("react.memo_cache_sentinel"); -function y(a,b,c,d,f,g,h){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=f;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=g;this.removeEmptyString=h}"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){new y(a,0,!1,a,null,!1,!1)}); -[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){new y(a[0],1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){new y(a,2,!1,a.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){new y(a,2,!1,a,null,!1,!1)}); -"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){new y(a,3,!1,a.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(a){new y(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){new y(a,4,!1,a,null,!1,!1)}); -["cols","rows","size","span"].forEach(function(a){new y(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){new y(a,5,!1,a.toLowerCase(),null,!1,!1)});var A=/[\-:]([a-z])/g;function B(a){return a[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 transform-origin 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".split(" ").forEach(function(a){var b=a.replace(A, -B);new y(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(A,B);new y(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(A,B);new y(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){new y(a,1,!1,a.toLowerCase(),null,!1,!1)}); -new y("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){new y(a,1,!1,a.toLowerCase(),null,!0,!0)}); -var C={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,tabSize:!0,widows:!0,zIndex:!0, -zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},qa=["Webkit","ms","Moz","O"];Object.keys(C).forEach(function(a){qa.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);C[b]=C[a]})});var ra=Array.isArray;q('"></template>');q("<script>");q("\x3c/script>");q('<script src="');q('<script type="module" src="');q('" integrity="');q('" async="">\x3c/script>');q("\x3c!-- --\x3e");q(' style="');q(":"); -q(";");q(" ");q('="');q('"');q('=""');q(">");q("/>");q(' selected=""');q("\n");q("<!DOCTYPE html>");q("</");q(">");q('<template id="');q('"></template>');q("\x3c!--$--\x3e");q('\x3c!--$?--\x3e<template id="');q('"></template>');q("\x3c!--$!--\x3e");q("\x3c!--/$--\x3e");q("<template");q('"');q(' data-dgst="');q(' data-msg="');q(' data-stck="');q("></template>");q('<div hidden id="');q('">');q("</div>");q('<svg aria-hidden="true" style="display:none" id="');q('">');q("</svg>");q('<math aria-hidden="true" style="display:none" id="'); +'use strict';var aa=require("react");var e=null,m=0;function n(a,b){if(0!==b.length)if(512<b.length)0<m&&(a.enqueue(new Uint8Array(e.buffer,0,m)),e=new Uint8Array(512),m=0),a.enqueue(b);else{var c=e.length-m;c<b.length&&(0===c?a.enqueue(e):(e.set(b.subarray(0,c),m),a.enqueue(e),b=b.subarray(c)),e=new Uint8Array(512),m=0);e.set(b,m);m+=b.length}return!0}var p=new TextEncoder;function q(a){return p.encode(a)}function fa(a,b){"function"===typeof a.error?a.error(b):a.close()} +var r=JSON.stringify;function t(a,b,c){a=r(c);b=b.toString(16)+":"+a+"\n";return p.encode(b)}var u=Symbol.for("react.client.reference"),v=Symbol.for("react.element"),ha=Symbol.for("react.fragment"),ia=Symbol.for("react.provider"),ja=Symbol.for("react.server_context"),ka=Symbol.for("react.forward_ref"),la=Symbol.for("react.suspense"),ma=Symbol.for("react.suspense_list"),na=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),oa=Symbol.for("react.default_value"),pa=Symbol.for("react.memo_cache_sentinel"); +function x(a,b,c,d,f,g,h){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=f;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=g;this.removeEmptyString=h}"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){new x(a,0,!1,a,null,!1,!1)}); +[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){new x(a[0],1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){new x(a,2,!1,a.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){new x(a,2,!1,a,null,!1,!1)}); +"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){new x(a,3,!1,a.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(a){new x(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){new x(a,4,!1,a,null,!1,!1)}); +["cols","rows","size","span"].forEach(function(a){new x(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){new x(a,5,!1,a.toLowerCase(),null,!1,!1)});var z=/[\-:]([a-z])/g;function A(a){return a[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 transform-origin 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".split(" ").forEach(function(a){var b=a.replace(z, +A);new x(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(z,A);new x(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(z,A);new x(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){new x(a,1,!1,a.toLowerCase(),null,!1,!1)}); +new x("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){new x(a,1,!1,a.toLowerCase(),null,!0,!0)}); +var B={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0, +fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},qa=["Webkit","ms","Moz","O"];Object.keys(B).forEach(function(a){qa.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);B[b]=B[a]})});var ra=Array.isArray;q('"></template>');q("<script>");q("\x3c/script>");q('<script src="');q('<script type="module" src="');q('" integrity="');q('" async="">\x3c/script>');q("\x3c!-- --\x3e");q(' style="');q(":");q(";"); +q(" ");q('="');q('"');q('=""');q(">");q("/>");q(' selected=""');q("\n");q("<!DOCTYPE html>");q("</");q(">");q('<template id="');q('"></template>');q("\x3c!--$--\x3e");q('\x3c!--$?--\x3e<template id="');q('"></template>');q("\x3c!--$!--\x3e");q("\x3c!--/$--\x3e");q("<template");q('"');q(' data-dgst="');q(' data-msg="');q(' data-stck="');q("></template>");q('<div hidden id="');q('">');q("</div>");q('<svg aria-hidden="true" style="display:none" id="');q('">');q("</svg>");q('<math aria-hidden="true" style="display:none" id="'); q('">');q("</math>");q('<table hidden id="');q('">');q("</table>");q('<table hidden><tbody id="');q('">');q("</tbody></table>");q('<table hidden><tr id="');q('">');q("</tr></table>");q('<table hidden><colgroup id="');q('">');q("</colgroup></table>");q('$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};;$RS("');q('$RS("');q('","');q('")\x3c/script>');q('<template data-rsi="" data-sid="'); -q('" data-pid="');q('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RC("'); -q('$RC("');q('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RM=new Map;\n$RR=function(p,q,w){function r(l){this.s=l}for(var t=$RC,m=$RM,u=new Map,n=new Map,g=document,h,e,f=g.querySelectorAll("template[data-precedence]"),c=0;e=f[c++];){for(var b=e.content.firstChild;b;b=b.nextSibling)u.set(b.getAttribute("data-href"),b);e.parentNode.removeChild(e)}f=g.querySelectorAll("link[data-precedence],style[data-precedence]");for(c=0;e=f[c++];)m.set(e.getAttribute("STYLE"===e.nodeName?"data-href":"href"),e),n.set(e.dataset.precedence,h=e);e=0;f=[];for(var d,\nv,a;d=w[e++];){var k=0;b=d[k++];if(!(a=m.get(b))){if(a=u.get(b))c=a.getAttribute("data-precedence");else{a=g.createElement("link");a.href=b;a.rel="stylesheet";for(a.dataset.precedence=c=d[k++];v=d[k++];)a.setAttribute(v,d[k++]);d=a._p=new Promise(function(l,x){a.onload=l;a.onerror=x});d.then(r.bind(d,"l"),r.bind(d,"e"))}m.set(b,a);b=n.get(c)||h;b===h&&(h=a);n.set(c,a);b?b.parentNode.insertBefore(a,b.nextSibling):(c=g.head,c.insertBefore(a,c.firstChild))}d=a._p;c=a.getAttribute("media");!d||"l"===\nd.s||c&&!matchMedia(c).matches||f.push(d)}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};$RR("'); -q('$RM=new Map;\n$RR=function(p,q,w){function r(l){this.s=l}for(var t=$RC,m=$RM,u=new Map,n=new Map,g=document,h,e,f=g.querySelectorAll("template[data-precedence]"),c=0;e=f[c++];){for(var b=e.content.firstChild;b;b=b.nextSibling)u.set(b.getAttribute("data-href"),b);e.parentNode.removeChild(e)}f=g.querySelectorAll("link[data-precedence],style[data-precedence]");for(c=0;e=f[c++];)m.set(e.getAttribute("STYLE"===e.nodeName?"data-href":"href"),e),n.set(e.dataset.precedence,h=e);e=0;f=[];for(var d,\nv,a;d=w[e++];){var k=0;b=d[k++];if(!(a=m.get(b))){if(a=u.get(b))c=a.getAttribute("data-precedence");else{a=g.createElement("link");a.href=b;a.rel="stylesheet";for(a.dataset.precedence=c=d[k++];v=d[k++];)a.setAttribute(v,d[k++]);d=a._p=new Promise(function(l,x){a.onload=l;a.onerror=x});d.then(r.bind(d,"l"),r.bind(d,"e"))}m.set(b,a);b=n.get(c)||h;b===h&&(h=a);n.set(c,a);b?b.parentNode.insertBefore(a,b.nextSibling):(c=g.head,c.insertBefore(a,c.firstChild))}d=a._p;c=a.getAttribute("media");!d||"l"===\nd.s||c&&!matchMedia(c).matches||f.push(d)}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};$RR("'); -q('$RR("');q('","');q('",');q('"');q(")\x3c/script>");q('<template data-rci="" data-bid="');q('<template data-rri="" data-bid="');q('" data-sid="');q('" data-sty="');q('$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};;$RX("');q('$RX("');q('"');q(",");q(")\x3c/script>");q('<template data-rxi="" data-bid="');q('" data-dgst="');q('" data-msg="');q('" data-stck="');q('<template data-precedence="">'); -q("</template>");q('<style data-precedence="');q('"></style>');q("[");q(",[");q(",");q("]");var D=null;function E(a,b){if(a!==b){a.context._currentValue=a.parentValue;a=a.parent;var c=b.parent;if(null===a){if(null!==c)throw Error("The stacks must reach the root at the same time. This is a bug in React.");}else{if(null===c)throw Error("The stacks must reach the root at the same time. This is a bug in React.");E(a,c);b.context._currentValue=b.value}}} -function sa(a){a.context._currentValue=a.parentValue;a=a.parent;null!==a&&sa(a)}function ta(a){var b=a.parent;null!==b&&ta(b);a.context._currentValue=a.value}function ua(a,b){a.context._currentValue=a.parentValue;a=a.parent;if(null===a)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===b.depth?E(a,b):ua(a,b)} -function va(a,b){var c=b.parent;if(null===c)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===c.depth?E(a,c):va(a,c);b.context._currentValue=b.value}function G(a){var b=D;b!==a&&(null===b?ta(a):null===a?sa(b):b.depth===a.depth?E(b,a):b.depth>a.depth?ua(b,a):va(b,a),D=a)}function wa(a,b){var c=a._currentValue;a._currentValue=b;var d=D;return D=a={parent:d,depth:null===d?0:d.depth+1,context:a,parentValue:c,value:b}}var H=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`"); +q('" data-pid="');q('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};;$RC("'); +q('$RC("');q('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};;$RM=new Map;\n$RR=function(p,q,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};;$RR("'); +q('$RM=new Map;\n$RR=function(p,q,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};;$RR("'); +q('$RR("');q('","');q('",');q('"');q(")\x3c/script>");q('<template data-rci="" data-bid="');q('<template data-rri="" data-bid="');q('" data-sid="');q('" data-sty="');q('$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};;$RX("');q('$RX("');q('"');q(",");q(")\x3c/script>");q('<template data-rxi="" data-bid="');q('" data-dgst="');q('" data-msg="');q('" data-stck="');q('<style data-precedence="'); +q('"></style>');q("[");q(",[");q(",");q("]");var C=null;function D(a,b){if(a!==b){a.context._currentValue=a.parentValue;a=a.parent;var c=b.parent;if(null===a){if(null!==c)throw Error("The stacks must reach the root at the same time. This is a bug in React.");}else{if(null===c)throw Error("The stacks must reach the root at the same time. This is a bug in React.");D(a,c);b.context._currentValue=b.value}}}function sa(a){a.context._currentValue=a.parentValue;a=a.parent;null!==a&&sa(a)} +function ta(a){var b=a.parent;null!==b&&ta(b);a.context._currentValue=a.value}function ua(a,b){a.context._currentValue=a.parentValue;a=a.parent;if(null===a)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===b.depth?D(a,b):ua(a,b)} +function va(a,b){var c=b.parent;if(null===c)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===c.depth?D(a,c):va(a,c);b.context._currentValue=b.value}function G(a){var b=C;b!==a&&(null===b?ta(a):null===a?sa(b):b.depth===a.depth?D(b,a):b.depth>a.depth?ua(b,a):va(b,a),C=a)}function wa(a,b){var c=a._currentValue;a._currentValue=b;var d=C;return C=a={parent:d,depth:null===d?0:d.depth+1,context:a,parentValue:c,value:b}}var H=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`"); function xa(){}function ya(a,b,c){c=a[c];void 0===c?a.push(b):c!==b&&(b.then(xa,xa),b=c);switch(b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;default:if("string"!==typeof b.status)switch(a=b,a.status="pending",a.then(function(a){if("pending"===b.status){var c=b;c.status="fulfilled";c.value=a}},function(a){if("pending"===b.status){var c=b;c.status="rejected";c.reason=a}}),b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;}I=b;throw H;}}var I=null; -function za(){if(null===I)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var a=I;I=null;return a}var J=null,K=0,M=null;function Aa(){var a=M;M=null;return a}function Ba(a){return a._currentValue} -var Fa={useMemo:function(a){return a()},useCallback:function(a){return a},useDebugValue:function(){},useDeferredValue:N,useTransition:N,readContext:Ba,useContext:Ba,useReducer:N,useRef:N,useState:N,useInsertionEffect:N,useLayoutEffect:N,useImperativeHandle:N,useEffect:N,useId:Ca,useMutableSource:N,useSyncExternalStore:N,useCacheRefresh:function(){return Da},useMemoCache:function(a){for(var b=Array(a),c=0;c<a;c++)b[c]=pa;return b},use:Ea}; -function N(){throw Error("This Hook is not supported in Server Components.");}function Da(){throw Error("Refreshing the cache is not supported in Server Components.");}function Ca(){if(null===J)throw Error("useId can only be used while React is rendering");var a=J.identifierCount++;return":"+J.identifierPrefix+"S"+a.toString(32)+":"} -function Ea(a){if(null!==a&&"object"===typeof a||"function"===typeof a){if("function"===typeof a.then){var b=K;K+=1;null===M&&(M=[]);return ya(M,a,b)}if(a.$$typeof===ja)return a._currentValue}throw Error("An unsupported type was passed to use(): "+String(a));}function O(){return(new AbortController).signal} -var Ga={getCacheSignal:function(){var a=P?P:new Map,b=a.get(O);void 0===b&&(b=O(),a.set(O,b));return b},getCacheForType:function(a){var b=P?P:new Map,c=b.get(a);void 0===c&&(c=a(),b.set(a,c));return c}},P=null,Q=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,R=Q.ContextRegistry,S=Q.ReactCurrentDispatcher,T=Q.ReactCurrentCache;function Ha(a){console.error(a)} -function Ia(a,b,c,d,f){if(null!==T.current&&T.current!==Ga)throw Error("Currently React only supports one RSC renderer at a time.");T.current=Ga;var g=new Set,h=[],k={status:0,fatalError:null,destination:null,bundlerConfig:b,cache:new Map,nextChunkId:0,pendingChunks:0,abortableTasks:g,pingedTasks:h,completedImportChunks:[],completedJSONChunks:[],completedErrorChunks:[],writtenSymbols:new Map,writtenClientReferences:new Map,writtenServerReferences:new Map,writtenProviders:new Map,identifierPrefix:f|| -"",identifierCount:1,onError:void 0===c?Ha:c,toJSON:function(a,b){return Ja(k,this,a,b)}};k.pendingChunks++;b=Ka(d);a=U(k,a,b,g);h.push(a);return k}var La={}; -function Ma(a,b){a.pendingChunks++;var c=U(a,null,D,a.abortableTasks);switch(b.status){case "fulfilled":return c.model=b.value,Na(a,c),c.id;case "rejected":var d=V(a,b.reason);W(a,c.id,d);return c.id;default:"string"!==typeof b.status&&(b.status="pending",b.then(function(a){"pending"===b.status&&(b.status="fulfilled",b.value=a)},function(a){"pending"===b.status&&(b.status="rejected",b.reason=a)}))}b.then(function(b){c.model=b;Na(a,c)},function(b){b=V(a,b);W(a,c.id,b)});return c.id} +function za(){if(null===I)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var a=I;I=null;return a}var J=null,K=0,L=null;function Aa(){var a=L;L=null;return a}function Ba(a){return a._currentValue} +var Ga={useMemo:function(a){return a()},useCallback:function(a){return a},useDebugValue:function(){},useDeferredValue:M,useTransition:M,readContext:Ba,useContext:Ba,useReducer:M,useRef:M,useState:M,useInsertionEffect:M,useLayoutEffect:M,useImperativeHandle:M,useEffect:M,useId:Ca,useMutableSource:M,useSyncExternalStore:M,useCacheRefresh:function(){return Ea},useMemoCache:function(a){for(var b=Array(a),c=0;c<a;c++)b[c]=pa;return b},use:Fa}; +function M(){throw Error("This Hook is not supported in Server Components.");}function Ea(){throw Error("Refreshing the cache is not supported in Server Components.");}function Ca(){if(null===J)throw Error("useId can only be used while React is rendering");var a=J.identifierCount++;return":"+J.identifierPrefix+"S"+a.toString(32)+":"} +function Fa(a){if(null!==a&&"object"===typeof a||"function"===typeof a){if("function"===typeof a.then){var b=K;K+=1;null===L&&(L=[]);return ya(L,a,b)}if(a.$$typeof===ja)return a._currentValue}throw Error("An unsupported type was passed to use(): "+String(a));}function N(){return(new AbortController).signal} +var Ha={getCacheSignal:function(){var a=O?O:new Map,b=a.get(N);void 0===b&&(b=N(),a.set(N,b));return b},getCacheForType:function(a){var b=O?O:new Map,c=b.get(a);void 0===c&&(c=a(),b.set(a,c));return c}},O=null,P=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Q=P.ContextRegistry,R=P.ReactCurrentDispatcher,S=P.ReactCurrentCache;function Ia(a){console.error(a)} +function Ja(a,b,c,d,f){if(null!==S.current&&S.current!==Ha)throw Error("Currently React only supports one RSC renderer at a time.");S.current=Ha;var g=new Set,h=[],k={status:0,fatalError:null,destination:null,bundlerConfig:b,cache:new Map,nextChunkId:0,pendingChunks:0,abortableTasks:g,pingedTasks:h,completedModuleChunks:[],completedJSONChunks:[],completedErrorChunks:[],writtenSymbols:new Map,writtenModules:new Map,writtenProviders:new Map,identifierPrefix:f||"",identifierCount:1,onError:void 0=== +c?Ia:c,toJSON:function(a,b){return Ka(k,this,a,b)}};k.pendingChunks++;b=La(d);a=T(k,a,b,g);h.push(a);return k}var Ma={}; +function Na(a,b){a.pendingChunks++;var c=T(a,null,C,a.abortableTasks);switch(b.status){case "fulfilled":return c.model=b.value,U(a,c),c.id;case "rejected":var d=V(a,b.reason);W(a,c.id,d);return c.id;default:"string"!==typeof b.status&&(b.status="pending",b.then(function(a){"pending"===b.status&&(b.status="fulfilled",b.value=a)},function(a){"pending"===b.status&&(b.status="rejected",b.reason=a)}))}b.then(function(b){c.model=b;U(a,c)},function(b){b=V(a,b);W(a,c.id,b)});return c.id} function Oa(a){if("fulfilled"===a.status)return a.value;if("rejected"===a.status)throw a.reason;throw a;}function Pa(a){switch(a.status){case "fulfilled":case "rejected":break;default:"string"!==typeof a.status&&(a.status="pending",a.then(function(b){"pending"===a.status&&(a.status="fulfilled",a.value=b)},function(b){"pending"===a.status&&(a.status="rejected",a.reason=b)}))}return{$$typeof:w,_payload:a,_init:Oa}} -function X(a,b,c,d,f,g){if(null!==d&&void 0!==d)throw Error("Refs cannot be used in Server Components, nor passed to Client Components.");if("function"===typeof b){if(b.$$typeof===u)return[v,b,c,f];K=0;M=g;f=b(f);return"object"===typeof f&&null!==f&&"function"===typeof f.then?"fulfilled"===f.status?f.value:Pa(f):f}if("string"===typeof b)return[v,b,c,f];if("symbol"===typeof b)return b===ha?f.children:[v,b,c,f];if(null!=b&&"object"===typeof b){if(b.$$typeof===u)return[v,b,c,f];switch(b.$$typeof){case w:var h= -b._init;b=h(b._payload);return X(a,b,c,d,f,g);case ka:return a=b.render,K=0,M=g,a(f,void 0);case na:return X(a,b.type,c,d,f,g);case ia:return wa(b._context,f.value),[v,b,c,{value:f.value,children:f.children,__pop:La}]}}throw Error("Unsupported Server Component type: "+Qa(b));}function Na(a,b){var c=a.pingedTasks;c.push(b);1===c.length&&Ra(a)}function U(a,b,c,d){var f={id:a.nextChunkId++,status:0,model:b,context:c,ping:function(){return Na(a,f)},thenableState:null};d.add(f);return f} -function Sa(a,b,c,d){var f=d.filepath+"#"+d.name+(d.async?"#async":""),g=a.writtenClientReferences,h=g.get(f);if(void 0!==h)return b[0]===v&&"1"===c?"$L"+h.toString(16):"$"+h.toString(16);try{var k=a.bundlerConfig[d.filepath][d.name];var l=d.async?{id:k.id,chunks:k.chunks,name:k.name,async:!0}:k;a.pendingChunks++;var z=a.nextChunkId++,ca=r(l),x=z.toString(16)+":I"+ca+"\n";var L=p.encode(x);a.completedImportChunks.push(L);g.set(f,z);return b[0]===v&&"1"===c?"$L"+z.toString(16):"$"+z.toString(16)}catch(da){return a.pendingChunks++, -b=a.nextChunkId++,c=V(a,da),W(a,b,c),"$"+b.toString(16)}}function Ta(a){return Object.prototype.toString.call(a).replace(/^\[object (.*)\]$/,function(a,c){return c})}function Qa(a){switch(typeof a){case "string":return JSON.stringify(10>=a.length?a:a.substr(0,10)+"...");case "object":if(ra(a))return"[...]";a=Ta(a);return"Object"===a?"{...}":a;case "function":return"function";default:return String(a)}} +function X(a,b,c,d,f,g){if(null!==d&&void 0!==d)throw Error("Refs cannot be used in Server Components, nor passed to Client Components.");if("function"===typeof b){if(b.$$typeof===u)return[v,b,c,f];K=0;L=g;f=b(f);return"object"===typeof f&&null!==f&&"function"===typeof f.then?"fulfilled"===f.status?f.value:Pa(f):f}if("string"===typeof b)return[v,b,c,f];if("symbol"===typeof b)return b===ha?f.children:[v,b,c,f];if(null!=b&&"object"===typeof b){if(b.$$typeof===u)return[v,b,c,f];switch(b.$$typeof){case w:var h= +b._init;b=h(b._payload);return X(a,b,c,d,f,g);case ka:return a=b.render,K=0,L=g,a(f,void 0);case na:return X(a,b.type,c,d,f,g);case ia:return wa(b._context,f.value),[v,b,c,{value:f.value,children:f.children,__pop:Ma}]}}throw Error("Unsupported Server Component type: "+Qa(b));}function U(a,b){var c=a.pingedTasks;c.push(b);1===c.length&&Ra(a)}function T(a,b,c,d){var f={id:a.nextChunkId++,status:0,model:b,context:c,ping:function(){return U(a,f)},thenableState:null};d.add(f);return f} +function Sa(a,b,c,d){var f=d.filepath+"#"+d.name+(d.async?"#async":""),g=a.writtenModules,h=g.get(f);if(void 0!==h)return b[0]===v&&"1"===c?"$L"+h.toString(16):"$"+h.toString(16);try{var k=a.bundlerConfig[d.filepath][d.name];var l=d.async?{id:k.id,chunks:k.chunks,name:k.name,async:!0}:k;a.pendingChunks++;var y=a.nextChunkId++,ba=r(l),ca=y.toString(16)+":I"+ba+"\n";var da=p.encode(ca);a.completedModuleChunks.push(da);g.set(f,y);return b[0]===v&&"1"===c?"$L"+y.toString(16):"$"+y.toString(16)}catch(ea){return a.pendingChunks++, +b=a.nextChunkId++,c=V(a,ea),W(a,b,c),"$"+b.toString(16)}}function Ta(a){return Object.prototype.toString.call(a).replace(/^\[object (.*)\]$/,function(a,c){return c})}function Qa(a){switch(typeof a){case "string":return JSON.stringify(10>=a.length?a:a.substr(0,10)+"...");case "object":if(ra(a))return"[...]";a=Ta(a);return"Object"===a?"{...}":a;case "function":return"function";default:return String(a)}} function Y(a){if("string"===typeof a)return a;switch(a){case la:return"Suspense";case ma:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case ka:return Y(a.render);case na:return Y(a.type);case w:var b=a._payload;a=a._init;try{return Y(a(b))}catch(c){}}return""} function Z(a,b){var c=Ta(a);if("Object"!==c&&"Array"!==c)return c;c=-1;var d=0;if(ra(a)){var f="[";for(var g=0;g<a.length;g++){0<g&&(f+=", ");var h=a[g];h="object"===typeof h&&null!==h?Z(h):Qa(h);""+g===b?(c=f.length,d=h.length,f+=h):f=10>h.length&&40>f.length+h.length?f+h:f+"..."}f+="]"}else if(a.$$typeof===v)f="<"+Y(a.type)+"/>";else{f="{";g=Object.keys(a);for(h=0;h<g.length;h++){0<h&&(f+=", ");var k=g[h],l=JSON.stringify(k);f+=('"'+k+'"'===l?k:l)+": ";l=a[k];l="object"===typeof l&&null!==l?Z(l): Qa(l);k===b?(c=f.length,d=l.length,f+=l):f=10>l.length&&40>f.length+l.length?f+l:f+"..."}f+="}"}return void 0===b?f:-1<c&&0<d?(a=" ".repeat(c)+"^".repeat(d),"\n "+f+"\n "+a):"\n "+f} -function Ja(a,b,c,d){switch(d){case v:return"$"}for(;"object"===typeof d&&null!==d&&(d.$$typeof===v||d.$$typeof===w);)try{switch(d.$$typeof){case v:var f=d;d=X(a,f.type,f.key,f.ref,f.props,null);break;case w:var g=d._init;d=g(d._payload)}}catch(h){c=h===H?za():h;if("object"===typeof c&&null!==c&&"function"===typeof c.then)return a.pendingChunks++,a=U(a,d,D,a.abortableTasks),d=a.ping,c.then(d,d),a.thenableState=Aa(),"$L"+a.id.toString(16);a.pendingChunks++;d=a.nextChunkId++;c=V(a,c);W(a,d,c);return"$L"+ -d.toString(16)}if(null===d)return null;if("object"===typeof d){if(d.$$typeof===u)return Sa(a,b,c,d);if("function"===typeof d.then)return"$@"+Ma(a,d).toString(16);if(d.$$typeof===ia)return d=d._context._globalName,b=a.writtenProviders,c=b.get(c),void 0===c&&(a.pendingChunks++,c=a.nextChunkId++,b.set(d,c),d=t(a,c,"$P"+d),a.completedJSONChunks.push(d)),"$"+c.toString(16);if(d===La){a=D;if(null===a)throw Error("Tried to pop a Context at the root of the app. This is a bug in React.");d=a.parentValue;a.context._currentValue= -d===oa?a.context._defaultValue:d;D=a.parent;return}return d}if("string"===typeof d)return a="$"===d[0]?"$"+d:d,a;if("boolean"===typeof d||"number"===typeof d||"undefined"===typeof d)return d;if("function"===typeof d){if(d.$$typeof===u)return Sa(a,b,c,d);if(d.$$typeof===fa)return c=a.writtenServerReferences,b=c.get(d),void 0!==b?a="$F"+b.toString(16):(f={id:d.$$filepath,name:d.$$name,bound:Promise.resolve(d.$$bound)},a.pendingChunks++,b=a.nextChunkId++,f=ea(a,b,f),a.completedJSONChunks.push(f),c.set(d, -b),a="$F"+b.toString(16)),a;if(/^on[A-Z]/.test(c))throw Error("Event handlers cannot be passed to Client Component props."+Z(b,c)+"\nIf you need interactivity, consider converting part of this to a Client Component.");throw Error('Functions cannot be passed directly to Client Components unless you explicitly expose it by marking it with "use server".'+Z(b,c));}if("symbol"===typeof d){f=a.writtenSymbols;g=f.get(d);if(void 0!==g)return"$"+g.toString(16);g=d.description;if(Symbol.for(g)!==d)throw Error("Only global symbols received from Symbol.for(...) can be passed to Client Components. The symbol Symbol.for("+ -(d.description+") cannot be found among global symbols.")+Z(b,c));a.pendingChunks++;c=a.nextChunkId++;b=t(a,c,"$S"+g);a.completedImportChunks.push(b);f.set(d,c);return"$"+c.toString(16)}if("bigint"===typeof d)throw Error("BigInt ("+d+") is not yet supported in Client Component props."+Z(b,c));throw Error("Type "+typeof d+" is not supported in Client Component props."+Z(b,c));} -function V(a,b){a=a.onError;b=a(b);if(null!=b&&"string"!==typeof b)throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof b+'" instead');return b||""}function Ua(a,b){null!==a.destination?(a.status=2,ba(a.destination,b)):(a.status=1,a.fatalError=b)} +function Ka(a,b,c,d){switch(d){case v:return"$"}for(;"object"===typeof d&&null!==d&&(d.$$typeof===v||d.$$typeof===w);)try{switch(d.$$typeof){case v:var f=d;d=X(a,f.type,f.key,f.ref,f.props,null);break;case w:var g=d._init;d=g(d._payload)}}catch(h){c=h===H?za():h;if("object"===typeof c&&null!==c&&"function"===typeof c.then)return a.pendingChunks++,a=T(a,d,C,a.abortableTasks),d=a.ping,c.then(d,d),a.thenableState=Aa(),"$L"+a.id.toString(16);a.pendingChunks++;d=a.nextChunkId++;c=V(a,c);W(a,d,c);return"$L"+ +d.toString(16)}if(null===d)return null;if("object"===typeof d){if(d.$$typeof===u)return Sa(a,b,c,d);if("function"===typeof d.then)return"$@"+Na(a,d).toString(16);if(d.$$typeof===ia)return d=d._context._globalName,b=a.writtenProviders,c=b.get(c),void 0===c&&(a.pendingChunks++,c=a.nextChunkId++,b.set(d,c),d=t(a,c,"$P"+d),a.completedJSONChunks.push(d)),"$"+c.toString(16);if(d===Ma){a=C;if(null===a)throw Error("Tried to pop a Context at the root of the app. This is a bug in React.");d=a.parentValue;a.context._currentValue= +d===oa?a.context._defaultValue:d;C=a.parent;return}return d}if("string"===typeof d)return a="$"===d[0]?"$"+d:d,a;if("boolean"===typeof d||"number"===typeof d||"undefined"===typeof d)return d;if("function"===typeof d){if(d.$$typeof===u)return Sa(a,b,c,d);if(/^on[A-Z]/.test(c))throw Error("Event handlers cannot be passed to Client Component props."+Z(b,c)+"\nIf you need interactivity, consider converting part of this to a Client Component.");throw Error("Functions cannot be passed directly to Client Components because they're not serializable."+ +Z(b,c));}if("symbol"===typeof d){f=a.writtenSymbols;g=f.get(d);if(void 0!==g)return"$"+g.toString(16);g=d.description;if(Symbol.for(g)!==d)throw Error("Only global symbols received from Symbol.for(...) can be passed to Client Components. The symbol Symbol.for("+(d.description+") cannot be found among global symbols.")+Z(b,c));a.pendingChunks++;c=a.nextChunkId++;b=t(a,c,"$S"+g);a.completedModuleChunks.push(b);f.set(d,c);return"$"+c.toString(16)}if("bigint"===typeof d)throw Error("BigInt ("+d+") is not yet supported in Client Component props."+ +Z(b,c));throw Error("Type "+typeof d+" is not supported in Client Component props."+Z(b,c));}function V(a,b){a=a.onError;b=a(b);if(null!=b&&"string"!==typeof b)throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof b+'" instead');return b||""}function Ua(a,b){null!==a.destination?(a.status=2,fa(a.destination,b)):(a.status=1,a.fatalError=b)} function W(a,b,c){c={digest:c};b=b.toString(16)+":E"+r(c)+"\n";b=p.encode(b);a.completedErrorChunks.push(b)} -function Ra(a){var b=S.current,c=P;S.current=Fa;P=a.cache;J=a;try{var d=a.pingedTasks;a.pingedTasks=[];for(var f=0;f<d.length;f++){var g=d[f];var h=a;if(0===g.status){G(g.context);try{var k=g.model;if("object"===typeof k&&null!==k&&k.$$typeof===v){var l=k,z=g.thenableState;g.model=k;k=X(h,l.type,l.key,l.ref,l.props,z);for(g.thenableState=null;"object"===typeof k&&null!==k&&k.$$typeof===v;)l=k,g.model=k,k=X(h,l.type,l.key,l.ref,l.props,null)}var ca=ea(h,g.id,k);h.completedJSONChunks.push(ca);h.abortableTasks.delete(g); -g.status=1}catch(F){var x=F===H?za():F;if("object"===typeof x&&null!==x&&"function"===typeof x.then){var L=g.ping;x.then(L,L);g.thenableState=Aa()}else{h.abortableTasks.delete(g);g.status=4;var da=V(h,x);W(h,g.id,da)}}}}null!==a.destination&&Va(a,a.destination)}catch(F){V(a,F),Ua(a,F)}finally{S.current=b,P=c,J=null}} -function Va(a,b){e=new Uint8Array(512);m=0;try{for(var c=a.completedImportChunks,d=0;d<c.length;d++)if(a.pendingChunks--,!n(b,c[d])){a.destination=null;d++;break}c.splice(0,d);var f=a.completedJSONChunks;for(d=0;d<f.length;d++)if(a.pendingChunks--,!n(b,f[d])){a.destination=null;d++;break}f.splice(0,d);var g=a.completedErrorChunks;for(d=0;d<g.length;d++)if(a.pendingChunks--,!n(b,g[d])){a.destination=null;d++;break}g.splice(0,d)}finally{e&&0<m&&(b.enqueue(new Uint8Array(e.buffer,0,m)),e=null,m=0)}0=== +function Ra(a){var b=R.current,c=O;R.current=Ga;O=a.cache;J=a;try{var d=a.pingedTasks;a.pingedTasks=[];for(var f=0;f<d.length;f++){var g=d[f];var h=a;if(0===g.status){G(g.context);try{var k=g.model;if("object"===typeof k&&null!==k&&k.$$typeof===v){var l=k,y=g.thenableState;g.model=k;k=X(h,l.type,l.key,l.ref,l.props,y);for(g.thenableState=null;"object"===typeof k&&null!==k&&k.$$typeof===v;)l=k,g.model=k,k=X(h,l.type,l.key,l.ref,l.props,null)}var ba=g.id,ca=r(k,h.toJSON),da=ba.toString(16)+":"+ca+"\n"; +var ea=p.encode(da);h.completedJSONChunks.push(ea);h.abortableTasks.delete(g);g.status=1}catch(E){var F=E===H?za():E;if("object"===typeof F&&null!==F&&"function"===typeof F.then){var Da=g.ping;F.then(Da,Da);g.thenableState=Aa()}else{h.abortableTasks.delete(g);g.status=4;var Xa=V(h,F);W(h,g.id,Xa)}}}}null!==a.destination&&Va(a,a.destination)}catch(E){V(a,E),Ua(a,E)}finally{R.current=b,O=c,J=null}} +function Va(a,b){e=new Uint8Array(512);m=0;try{for(var c=a.completedModuleChunks,d=0;d<c.length;d++)if(a.pendingChunks--,!n(b,c[d])){a.destination=null;d++;break}c.splice(0,d);var f=a.completedJSONChunks;for(d=0;d<f.length;d++)if(a.pendingChunks--,!n(b,f[d])){a.destination=null;d++;break}f.splice(0,d);var g=a.completedErrorChunks;for(d=0;d<g.length;d++)if(a.pendingChunks--,!n(b,g[d])){a.destination=null;d++;break}g.splice(0,d)}finally{e&&0<m&&(b.enqueue(new Uint8Array(e.buffer,0,m)),e=null,m=0)}0=== a.pendingChunks&&b.close()}function Wa(a,b){try{var c=a.abortableTasks;if(0<c.size){var d=V(a,void 0===b?Error("The render was aborted by the server without a reason."):b);a.pendingChunks++;var f=a.nextChunkId++;W(a,f,d);c.forEach(function(b){b.status=3;var c="$"+f.toString(16);b=t(a,b.id,c);a.completedErrorChunks.push(b)});c.clear()}null!==a.destination&&Va(a,a.destination)}catch(g){V(a,g),Ua(a,g)}} -function Ka(a){if(a){var b=D;G(null);for(var c=0;c<a.length;c++){var d=a[c],f=d[0];d=d[1];R[f]||(R[f]=aa.createServerContext(f,oa));wa(R[f],d)}a=D;G(b);return a}return null} -exports.renderToReadableStream=function(a,b,c){var d=Ia(a,b,c?c.onError:void 0,c?c.context:void 0,c?c.identifierPrefix:void 0);if(c&&c.signal){var f=c.signal;if(f.aborted)Wa(d,f.reason);else{var g=function(){Wa(d,f.reason);f.removeEventListener("abort",g)};f.addEventListener("abort",g)}}return new ReadableStream({type:"bytes",start:function(){Ra(d)},pull:function(a){if(1===d.status)d.status=2,ba(a,d.fatalError);else if(2!==d.status&&null===d.destination){d.destination=a;try{Va(d,a)}catch(k){V(d,k), +function La(a){if(a){var b=C;G(null);for(var c=0;c<a.length;c++){var d=a[c],f=d[0];d=d[1];Q[f]||(Q[f]=aa.createServerContext(f,oa));wa(Q[f],d)}a=C;G(b);return a}return null} +exports.renderToReadableStream=function(a,b,c){var d=Ja(a,b,c?c.onError:void 0,c?c.context:void 0,c?c.identifierPrefix:void 0);if(c&&c.signal){var f=c.signal;if(f.aborted)Wa(d,f.reason);else{var g=function(){Wa(d,f.reason);f.removeEventListener("abort",g)};f.addEventListener("abort",g)}}return new ReadableStream({type:"bytes",start:function(){Ra(d)},pull:function(a){if(1===d.status)d.status=2,fa(a,d.fatalError);else if(2!==d.status&&null===d.destination){d.destination=a;try{Va(d,a)}catch(k){V(d,k), Ua(d,k)}}},cancel:function(){}},{highWaterMark:0})}; diff --git a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js index fda655f3ef2d3..8f61d6c8ba2be 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js @@ -203,25 +203,21 @@ function processReferenceChunk(request, id, reference) { var row = id.toString(16) + ':' + json + '\n'; return stringToChunk(row); } -function processImportChunk(request, id, clientReferenceMetadata) { - var json = stringify(clientReferenceMetadata); +function processModuleChunk(request, id, moduleMetaData) { + var json = stringify(moduleMetaData); var row = serializeRowHeader('I', id) + json + '\n'; return stringToChunk(row); } // eslint-disable-next-line no-unused-vars var CLIENT_REFERENCE_TAG = Symbol.for('react.client.reference'); -var SERVER_REFERENCE_TAG = Symbol.for('react.server.reference'); function getClientReferenceKey(reference) { return reference.filepath + '#' + reference.name + (reference.async ? '#async' : ''); } function isClientReference(reference) { return reference.$$typeof === CLIENT_REFERENCE_TAG; } -function isServerReference(reference) { - return reference.$$typeof === SERVER_REFERENCE_TAG; -} -function resolveClientReferenceMetadata(config, clientReference) { +function resolveModuleMetaData(config, clientReference) { var resolvedModuleData = config[clientReference.filepath][clientReference.name]; if (clientReference.async) { @@ -235,13 +231,6 @@ function resolveClientReferenceMetadata(config, clientReference) { return resolvedModuleData; } } -function resolveServerReferenceMetadata(config, serverReference) { - return { - id: serverReference.$$filepath, - name: serverReference.$$name, - bound: Promise.resolve(serverReference.$$bound) - }; -} // ATTENTION // When adding new symbols to this file, @@ -517,7 +506,6 @@ var isUnitlessNumber = { opacity: true, order: true, orphans: true, - scale: true, tabSize: true, widows: true, zIndex: true, @@ -567,7 +555,7 @@ function isArray(a) { // Run `yarn generate-inline-fizz-runtime` to generate. var clientRenderBoundary = '$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};'; var completeBoundary = '$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};'; -var completeBoundaryWithStyles = '$RM=new Map;\n$RR=function(p,q,w){function r(l){this.s=l}for(var t=$RC,m=$RM,u=new Map,n=new Map,g=document,h,e,f=g.querySelectorAll("template[data-precedence]"),c=0;e=f[c++];){for(var b=e.content.firstChild;b;b=b.nextSibling)u.set(b.getAttribute("data-href"),b);e.parentNode.removeChild(e)}f=g.querySelectorAll("link[data-precedence],style[data-precedence]");for(c=0;e=f[c++];)m.set(e.getAttribute("STYLE"===e.nodeName?"data-href":"href"),e),n.set(e.dataset.precedence,h=e);e=0;f=[];for(var d,\nv,a;d=w[e++];){var k=0;b=d[k++];if(!(a=m.get(b))){if(a=u.get(b))c=a.getAttribute("data-precedence");else{a=g.createElement("link");a.href=b;a.rel="stylesheet";for(a.dataset.precedence=c=d[k++];v=d[k++];)a.setAttribute(v,d[k++]);d=a._p=new Promise(function(l,x){a.onload=l;a.onerror=x});d.then(r.bind(d,"l"),r.bind(d,"e"))}m.set(b,a);b=n.get(c)||h;b===h&&(h=a);n.set(c,a);b?b.parentNode.insertBefore(a,b.nextSibling):(c=g.head,c.insertBefore(a,c.firstChild))}d=a._p;c=a.getAttribute("media");!d||"l"===\nd.s||c&&!matchMedia(c).matches||f.push(d)}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};'; +var completeBoundaryWithStyles = '$RM=new Map;\n$RR=function(p,q,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};'; var completeSegment = '$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};'; var ReactDOMSharedInternals = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; @@ -648,10 +636,10 @@ var completeSegmentScript2 = stringToPrecomputedChunk('","'); var completeSegmentScriptEnd = stringToPrecomputedChunk('")</script>'); var completeSegmentData1 = stringToPrecomputedChunk('<template data-rsi="" data-sid="'); var completeSegmentData2 = stringToPrecomputedChunk('" data-pid="'); -var completeBoundaryScript1Full = stringToPrecomputedChunk(completeBoundary + '$RC("'); +var completeBoundaryScript1Full = stringToPrecomputedChunk(completeBoundary + ';$RC("'); var completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC("'); -var completeBoundaryWithStylesScript1FullBoth = stringToPrecomputedChunk(completeBoundary + completeBoundaryWithStyles + '$RR("'); -var completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk(completeBoundaryWithStyles + '$RR("'); +var completeBoundaryWithStylesScript1FullBoth = stringToPrecomputedChunk(completeBoundary + ';' + completeBoundaryWithStyles + ';$RR("'); +var completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk(completeBoundaryWithStyles + ';$RR("'); var completeBoundaryWithStylesScript1Partial = stringToPrecomputedChunk('$RR("'); var completeBoundaryScript2 = stringToPrecomputedChunk('","'); var completeBoundaryScript3a = stringToPrecomputedChunk('",'); @@ -671,8 +659,6 @@ var clientRenderData2 = stringToPrecomputedChunk('" data-dgst="'); var clientRenderData3 = stringToPrecomputedChunk('" data-msg="'); var clientRenderData4 = stringToPrecomputedChunk('" data-stck="'); -var styleTagTemplateOpen = stringToPrecomputedChunk('<template data-precedence="">'); -var styleTagTemplateClose = stringToPrecomputedChunk('</template>'); // Tracks whether we wrote any late style tags. We use this to determine var precedencePlaceholderStart = stringToPrecomputedChunk('<style data-precedence="'); var precedencePlaceholderEnd = stringToPrecomputedChunk('"></style>'); @@ -1204,12 +1190,11 @@ function createRequest(model, bundlerConfig, onError, context, identifierPrefix) pendingChunks: 0, abortableTasks: abortSet, pingedTasks: pingedTasks, - completedImportChunks: [], + completedModuleChunks: [], completedJSONChunks: [], completedErrorChunks: [], writtenSymbols: new Map(), - writtenClientReferences: new Map(), - writtenServerReferences: new Map(), + writtenModules: new Map(), writtenProviders: new Map(), identifierPrefix: identifierPrefix || '', identifierCount: 1, @@ -1520,10 +1505,6 @@ function serializePromiseID(id) { return '$@' + id.toString(16); } -function serializeServerReferenceID(id) { - return '$F' + id.toString(16); -} - function serializeSymbolReference(name) { return '$S' + name; } @@ -1532,10 +1513,10 @@ function serializeProviderReference(name) { return '$P' + name; } -function serializeClientReference(request, parent, key, clientReference) { - var clientReferenceKey = getClientReferenceKey(clientReference); - var writtenClientReferences = request.writtenClientReferences; - var existingId = writtenClientReferences.get(clientReferenceKey); +function serializeClientReference(request, parent, key, moduleReference) { + var moduleKey = getClientReferenceKey(moduleReference); + var writtenModules = request.writtenModules; + var existingId = writtenModules.get(moduleKey); if (existingId !== undefined) { if (parent[0] === REACT_ELEMENT_TYPE && key === '1') { @@ -1551,11 +1532,11 @@ function serializeClientReference(request, parent, key, clientReference) { } try { - var clientReferenceMetadata = resolveClientReferenceMetadata(request.bundlerConfig, clientReference); + var moduleMetaData = resolveModuleMetaData(request.bundlerConfig, moduleReference); request.pendingChunks++; - var importId = request.nextChunkId++; - emitImportChunk(request, importId, clientReferenceMetadata); - writtenClientReferences.set(clientReferenceKey, importId); + var moduleId = request.nextChunkId++; + emitModuleChunk(request, moduleId, moduleMetaData); + writtenModules.set(moduleKey, moduleId); if (parent[0] === REACT_ELEMENT_TYPE && key === '1') { // If we're encoding the "type" of an element, we can refer @@ -1563,10 +1544,10 @@ function serializeClientReference(request, parent, key, clientReference) { // knows how to deal with lazy values. This lets us suspend // on this component rather than its parent until the code has // loaded. - return serializeLazyID(importId); + return serializeLazyID(moduleId); } - return serializeByValueID(importId); + return serializeByValueID(moduleId); } catch (x) { request.pendingChunks++; var errorId = request.nextChunkId++; @@ -1584,24 +1565,6 @@ function serializeClientReference(request, parent, key, clientReference) { } } -function serializeServerReference(request, parent, key, serverReference) { - var writtenServerReferences = request.writtenServerReferences; - var existingId = writtenServerReferences.get(serverReference); - - if (existingId !== undefined) { - return serializeServerReferenceID(existingId); - } - - var serverReferenceMetadata = resolveServerReferenceMetadata(request.bundlerConfig, serverReference); - request.pendingChunks++; - var metadataId = request.nextChunkId++; // We assume that this object doesn't suspend. - - var processedChunk = processModelChunk(request, metadataId, serverReferenceMetadata); - request.completedJSONChunks.push(processedChunk); - writtenServerReferences.set(serverReference, metadataId); - return serializeServerReferenceID(metadataId); -} - function escapeStringValue(value) { if (value[0] === '$') { // We need to escape $ or @ prefixed strings since we use those to encode @@ -2030,7 +1993,7 @@ function resolveModelToJSON(request, parent, key, value) { if (typeof value === 'object') { if (isClientReference(value)) { - return serializeClientReference(request, parent, key, value); // $FlowFixMe[method-unbinding] + return serializeClientReference(request, parent, key, value); } else if (typeof value.then === 'function') { // We assume that any object with a .then property is a "Thenable" type, // or a Promise type. Either of which can be represented by a Promise. @@ -2094,14 +2057,10 @@ function resolveModelToJSON(request, parent, key, value) { return serializeClientReference(request, parent, key, value); } - if (isServerReference(value)) { - return serializeServerReference(request, parent, key, value); - } - if (/^on[A-Z]/.test(key)) { throw new Error('Event handlers cannot be passed to Client Component props.' + describeObjectForErrorMessage(parent, key) + '\nIf you need interactivity, consider converting part of this to a Client Component.'); } else { - throw new Error('Functions cannot be passed directly to Client Components ' + 'unless you explicitly expose it by marking it with "use server".' + describeObjectForErrorMessage(parent, key)); + throw new Error('Functions cannot be passed directly to Client Components ' + "because they're not serializable." + describeObjectForErrorMessage(parent, key)); } } @@ -2193,15 +2152,15 @@ function emitErrorChunkDev(request, id, digest, message, stack) { request.completedErrorChunks.push(processedChunk); } -function emitImportChunk(request, id, clientReferenceMetadata) { - var processedChunk = processImportChunk(request, id, clientReferenceMetadata); - request.completedImportChunks.push(processedChunk); +function emitModuleChunk(request, id, moduleMetaData) { + var processedChunk = processModuleChunk(request, id, moduleMetaData); + request.completedModuleChunks.push(processedChunk); } function emitSymbolChunk(request, id, name) { var symbolReference = serializeSymbolReference(name); var processedChunk = processReferenceChunk(request, id, symbolReference); - request.completedImportChunks.push(processedChunk); + request.completedModuleChunks.push(processedChunk); } function emitProviderChunk(request, id, contextName) { @@ -2324,12 +2283,12 @@ function flushCompletedChunks(request, destination) { try { // We emit module chunks first in the stream so that // they can be preloaded as early as possible. - var importsChunks = request.completedImportChunks; + var moduleChunks = request.completedModuleChunks; var i = 0; - for (; i < importsChunks.length; i++) { + for (; i < moduleChunks.length; i++) { request.pendingChunks--; - var chunk = importsChunks[i]; + var chunk = moduleChunks[i]; var keepWriting = writeChunkAndReturn(destination, chunk); if (!keepWriting) { @@ -2339,7 +2298,7 @@ function flushCompletedChunks(request, destination) { } } - importsChunks.splice(0, i); // Next comes model data. + moduleChunks.splice(0, i); // Next comes model data. var jsonChunks = request.completedJSONChunks; i = 0; diff --git a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.min.js b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.min.js index 28f512e72faac..cc73bd75dedf6 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.min.js +++ b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.min.js @@ -8,54 +8,53 @@ * LICENSE file in the root directory of this source tree. */ 'use strict';var aa=require("react");var e="function"===typeof AsyncLocalStorage,ba=e?new AsyncLocalStorage:null,m=null,n=0;function p(a,b){if(0!==b.length)if(512<b.length)0<n&&(a.enqueue(new Uint8Array(m.buffer,0,n)),m=new Uint8Array(512),n=0),a.enqueue(b);else{var c=m.length-n;c<b.length&&(0===c?a.enqueue(m):(m.set(b.subarray(0,c),n),a.enqueue(m),b=b.subarray(c)),m=new Uint8Array(512),n=0);m.set(b,n);n+=b.length}return!0}var q=new TextEncoder; -function r(a){return q.encode(a)}function ca(a,b){"function"===typeof a.error?a.error(b):a.close()}var t=JSON.stringify;function da(a,b,c){a=t(c,a.toJSON);b=b.toString(16)+":"+a+"\n";return q.encode(b)}function u(a,b,c){a=t(c);b=b.toString(16)+":"+a+"\n";return q.encode(b)} -var v=Symbol.for("react.client.reference"),ha=Symbol.for("react.server.reference"),x=Symbol.for("react.element"),ia=Symbol.for("react.fragment"),ja=Symbol.for("react.provider"),ka=Symbol.for("react.server_context"),la=Symbol.for("react.forward_ref"),ma=Symbol.for("react.suspense"),na=Symbol.for("react.suspense_list"),oa=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),pa=Symbol.for("react.default_value"),qa=Symbol.for("react.memo_cache_sentinel"); -function A(a,b,c,d,f,g,h){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=f;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=g;this.removeEmptyString=h}"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){new A(a,0,!1,a,null,!1,!1)}); -[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){new A(a[0],1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){new A(a,2,!1,a.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){new A(a,2,!1,a,null,!1,!1)}); -"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){new A(a,3,!1,a.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(a){new A(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){new A(a,4,!1,a,null,!1,!1)}); -["cols","rows","size","span"].forEach(function(a){new A(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){new A(a,5,!1,a.toLowerCase(),null,!1,!1)});var B=/[\-:]([a-z])/g;function C(a){return a[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 transform-origin 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".split(" ").forEach(function(a){var b=a.replace(B, -C);new A(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(B,C);new A(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(B,C);new A(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){new A(a,1,!1,a.toLowerCase(),null,!1,!1)}); -new A("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){new A(a,1,!1,a.toLowerCase(),null,!0,!0)}); -var D={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,tabSize:!0,widows:!0,zIndex:!0, -zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ra=["Webkit","ms","Moz","O"];Object.keys(D).forEach(function(a){ra.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);D[b]=D[a]})});var sa=Array.isArray;r('"></template>');r("<script>");r("\x3c/script>");r('<script src="');r('<script type="module" src="');r('" integrity="');r('" async="">\x3c/script>');r("\x3c!-- --\x3e");r(' style="');r(":"); -r(";");r(" ");r('="');r('"');r('=""');r(">");r("/>");r(' selected=""');r("\n");r("<!DOCTYPE html>");r("</");r(">");r('<template id="');r('"></template>');r("\x3c!--$--\x3e");r('\x3c!--$?--\x3e<template id="');r('"></template>');r("\x3c!--$!--\x3e");r("\x3c!--/$--\x3e");r("<template");r('"');r(' data-dgst="');r(' data-msg="');r(' data-stck="');r("></template>");r('<div hidden id="');r('">');r("</div>");r('<svg aria-hidden="true" style="display:none" id="');r('">');r("</svg>");r('<math aria-hidden="true" style="display:none" id="'); +function r(a){return q.encode(a)}function ca(a,b){"function"===typeof a.error?a.error(b):a.close()}var t=JSON.stringify;function u(a,b,c){a=t(c);b=b.toString(16)+":"+a+"\n";return q.encode(b)} +var v=Symbol.for("react.client.reference"),w=Symbol.for("react.element"),ia=Symbol.for("react.fragment"),ja=Symbol.for("react.provider"),ka=Symbol.for("react.server_context"),la=Symbol.for("react.forward_ref"),ma=Symbol.for("react.suspense"),na=Symbol.for("react.suspense_list"),oa=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),pa=Symbol.for("react.default_value"),qa=Symbol.for("react.memo_cache_sentinel"); +function z(a,b,c,d,f,g,h){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=f;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=g;this.removeEmptyString=h}"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){new z(a,0,!1,a,null,!1,!1)}); +[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){new z(a[0],1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){new z(a,2,!1,a.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){new z(a,2,!1,a,null,!1,!1)}); +"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){new z(a,3,!1,a.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(a){new z(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){new z(a,4,!1,a,null,!1,!1)}); +["cols","rows","size","span"].forEach(function(a){new z(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){new z(a,5,!1,a.toLowerCase(),null,!1,!1)});var A=/[\-:]([a-z])/g;function B(a){return a[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 transform-origin 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".split(" ").forEach(function(a){var b=a.replace(A, +B);new z(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(A,B);new z(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(A,B);new z(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){new z(a,1,!1,a.toLowerCase(),null,!1,!1)}); +new z("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){new z(a,1,!1,a.toLowerCase(),null,!0,!0)}); +var C={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0, +fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ra=["Webkit","ms","Moz","O"];Object.keys(C).forEach(function(a){ra.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);C[b]=C[a]})});var sa=Array.isArray;r('"></template>');r("<script>");r("\x3c/script>");r('<script src="');r('<script type="module" src="');r('" integrity="');r('" async="">\x3c/script>');r("\x3c!-- --\x3e");r(' style="');r(":");r(";"); +r(" ");r('="');r('"');r('=""');r(">");r("/>");r(' selected=""');r("\n");r("<!DOCTYPE html>");r("</");r(">");r('<template id="');r('"></template>');r("\x3c!--$--\x3e");r('\x3c!--$?--\x3e<template id="');r('"></template>');r("\x3c!--$!--\x3e");r("\x3c!--/$--\x3e");r("<template");r('"');r(' data-dgst="');r(' data-msg="');r(' data-stck="');r("></template>");r('<div hidden id="');r('">');r("</div>");r('<svg aria-hidden="true" style="display:none" id="');r('">');r("</svg>");r('<math aria-hidden="true" style="display:none" id="'); r('">');r("</math>");r('<table hidden id="');r('">');r("</table>");r('<table hidden><tbody id="');r('">');r("</tbody></table>");r('<table hidden><tr id="');r('">');r("</tr></table>");r('<table hidden><colgroup id="');r('">');r("</colgroup></table>");r('$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};;$RS("');r('$RS("');r('","');r('")\x3c/script>');r('<template data-rsi="" data-sid="'); -r('" data-pid="');r('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RC("'); -r('$RC("');r('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RM=new Map;\n$RR=function(p,q,w){function r(l){this.s=l}for(var t=$RC,m=$RM,u=new Map,n=new Map,g=document,h,e,f=g.querySelectorAll("template[data-precedence]"),c=0;e=f[c++];){for(var b=e.content.firstChild;b;b=b.nextSibling)u.set(b.getAttribute("data-href"),b);e.parentNode.removeChild(e)}f=g.querySelectorAll("link[data-precedence],style[data-precedence]");for(c=0;e=f[c++];)m.set(e.getAttribute("STYLE"===e.nodeName?"data-href":"href"),e),n.set(e.dataset.precedence,h=e);e=0;f=[];for(var d,\nv,a;d=w[e++];){var k=0;b=d[k++];if(!(a=m.get(b))){if(a=u.get(b))c=a.getAttribute("data-precedence");else{a=g.createElement("link");a.href=b;a.rel="stylesheet";for(a.dataset.precedence=c=d[k++];v=d[k++];)a.setAttribute(v,d[k++]);d=a._p=new Promise(function(l,x){a.onload=l;a.onerror=x});d.then(r.bind(d,"l"),r.bind(d,"e"))}m.set(b,a);b=n.get(c)||h;b===h&&(h=a);n.set(c,a);b?b.parentNode.insertBefore(a,b.nextSibling):(c=g.head,c.insertBefore(a,c.firstChild))}d=a._p;c=a.getAttribute("media");!d||"l"===\nd.s||c&&!matchMedia(c).matches||f.push(d)}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};$RR("'); -r('$RM=new Map;\n$RR=function(p,q,w){function r(l){this.s=l}for(var t=$RC,m=$RM,u=new Map,n=new Map,g=document,h,e,f=g.querySelectorAll("template[data-precedence]"),c=0;e=f[c++];){for(var b=e.content.firstChild;b;b=b.nextSibling)u.set(b.getAttribute("data-href"),b);e.parentNode.removeChild(e)}f=g.querySelectorAll("link[data-precedence],style[data-precedence]");for(c=0;e=f[c++];)m.set(e.getAttribute("STYLE"===e.nodeName?"data-href":"href"),e),n.set(e.dataset.precedence,h=e);e=0;f=[];for(var d,\nv,a;d=w[e++];){var k=0;b=d[k++];if(!(a=m.get(b))){if(a=u.get(b))c=a.getAttribute("data-precedence");else{a=g.createElement("link");a.href=b;a.rel="stylesheet";for(a.dataset.precedence=c=d[k++];v=d[k++];)a.setAttribute(v,d[k++]);d=a._p=new Promise(function(l,x){a.onload=l;a.onerror=x});d.then(r.bind(d,"l"),r.bind(d,"e"))}m.set(b,a);b=n.get(c)||h;b===h&&(h=a);n.set(c,a);b?b.parentNode.insertBefore(a,b.nextSibling):(c=g.head,c.insertBefore(a,c.firstChild))}d=a._p;c=a.getAttribute("media");!d||"l"===\nd.s||c&&!matchMedia(c).matches||f.push(d)}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};$RR("'); -r('$RR("');r('","');r('",');r('"');r(")\x3c/script>");r('<template data-rci="" data-bid="');r('<template data-rri="" data-bid="');r('" data-sid="');r('" data-sty="');r('$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};;$RX("');r('$RX("');r('"');r(",");r(")\x3c/script>");r('<template data-rxi="" data-bid="');r('" data-dgst="');r('" data-msg="');r('" data-stck="');r('<template data-precedence="">'); -r("</template>");r('<style data-precedence="');r('"></style>');r("[");r(",[");r(",");r("]");var E=null;function G(a,b){if(a!==b){a.context._currentValue=a.parentValue;a=a.parent;var c=b.parent;if(null===a){if(null!==c)throw Error("The stacks must reach the root at the same time. This is a bug in React.");}else{if(null===c)throw Error("The stacks must reach the root at the same time. This is a bug in React.");G(a,c);b.context._currentValue=b.value}}} -function ta(a){a.context._currentValue=a.parentValue;a=a.parent;null!==a&&ta(a)}function ua(a){var b=a.parent;null!==b&&ua(b);a.context._currentValue=a.value}function va(a,b){a.context._currentValue=a.parentValue;a=a.parent;if(null===a)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===b.depth?G(a,b):va(a,b)} -function wa(a,b){var c=b.parent;if(null===c)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===c.depth?G(a,c):wa(a,c);b.context._currentValue=b.value}function H(a){var b=E;b!==a&&(null===b?ua(a):null===a?ta(b):b.depth===a.depth?G(b,a):b.depth>a.depth?va(b,a):wa(b,a),E=a)}function xa(a,b){var c=a._currentValue;a._currentValue=b;var d=E;return E=a={parent:d,depth:null===d?0:d.depth+1,context:a,parentValue:c,value:b}}var I=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`"); +r('" data-pid="');r('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};;$RC("'); +r('$RC("');r('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};;$RM=new Map;\n$RR=function(p,q,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};;$RR("'); +r('$RM=new Map;\n$RR=function(p,q,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};;$RR("'); +r('$RR("');r('","');r('",');r('"');r(")\x3c/script>");r('<template data-rci="" data-bid="');r('<template data-rri="" data-bid="');r('" data-sid="');r('" data-sty="');r('$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};;$RX("');r('$RX("');r('"');r(",");r(")\x3c/script>");r('<template data-rxi="" data-bid="');r('" data-dgst="');r('" data-msg="');r('" data-stck="');r('<style data-precedence="'); +r('"></style>');r("[");r(",[");r(",");r("]");var D=null;function G(a,b){if(a!==b){a.context._currentValue=a.parentValue;a=a.parent;var c=b.parent;if(null===a){if(null!==c)throw Error("The stacks must reach the root at the same time. This is a bug in React.");}else{if(null===c)throw Error("The stacks must reach the root at the same time. This is a bug in React.");G(a,c);b.context._currentValue=b.value}}}function ta(a){a.context._currentValue=a.parentValue;a=a.parent;null!==a&&ta(a)} +function ua(a){var b=a.parent;null!==b&&ua(b);a.context._currentValue=a.value}function va(a,b){a.context._currentValue=a.parentValue;a=a.parent;if(null===a)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===b.depth?G(a,b):va(a,b)} +function wa(a,b){var c=b.parent;if(null===c)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===c.depth?G(a,c):wa(a,c);b.context._currentValue=b.value}function H(a){var b=D;b!==a&&(null===b?ua(a):null===a?ta(b):b.depth===a.depth?G(b,a):b.depth>a.depth?va(b,a):wa(b,a),D=a)}function xa(a,b){var c=a._currentValue;a._currentValue=b;var d=D;return D=a={parent:d,depth:null===d?0:d.depth+1,context:a,parentValue:c,value:b}}var I=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`"); function ya(){}function za(a,b,c){c=a[c];void 0===c?a.push(b):c!==b&&(b.then(ya,ya),b=c);switch(b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;default:if("string"!==typeof b.status)switch(a=b,a.status="pending",a.then(function(a){if("pending"===b.status){var c=b;c.status="fulfilled";c.value=a}},function(a){if("pending"===b.status){var c=b;c.status="rejected";c.reason=a}}),b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;}J=b;throw I;}}var J=null; -function Aa(){if(null===J)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var a=J;J=null;return a}var K=null,M=0,N=null;function Ba(){var a=N;N=null;return a}function Ca(a){return a._currentValue} -var Ga={useMemo:function(a){return a()},useCallback:function(a){return a},useDebugValue:function(){},useDeferredValue:O,useTransition:O,readContext:Ca,useContext:Ca,useReducer:O,useRef:O,useState:O,useInsertionEffect:O,useLayoutEffect:O,useImperativeHandle:O,useEffect:O,useId:Da,useMutableSource:O,useSyncExternalStore:O,useCacheRefresh:function(){return Ea},useMemoCache:function(a){for(var b=Array(a),c=0;c<a;c++)b[c]=qa;return b},use:Fa}; -function O(){throw Error("This Hook is not supported in Server Components.");}function Ea(){throw Error("Refreshing the cache is not supported in Server Components.");}function Da(){if(null===K)throw Error("useId can only be used while React is rendering");var a=K.identifierCount++;return":"+K.identifierPrefix+"S"+a.toString(32)+":"} -function Fa(a){if(null!==a&&"object"===typeof a||"function"===typeof a){if("function"===typeof a.then){var b=M;M+=1;null===N&&(N=[]);return za(N,a,b)}if(a.$$typeof===ka)return a._currentValue}throw Error("An unsupported type was passed to use(): "+String(a));}function P(){return(new AbortController).signal}function Ha(){if(Q)return Q;if(e){var a=ba.getStore();if(a)return a}return new Map} -var Ia={getCacheSignal:function(){var a=Ha(),b=a.get(P);void 0===b&&(b=P(),a.set(P,b));return b},getCacheForType:function(a){var b=Ha(),c=b.get(a);void 0===c&&(c=a(),b.set(a,c));return c}},Q=null,R=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,S=R.ContextRegistry,T=R.ReactCurrentDispatcher,U=R.ReactCurrentCache;function Ja(a){console.error(a)} -function Ka(a,b,c,d,f){if(null!==U.current&&U.current!==Ia)throw Error("Currently React only supports one RSC renderer at a time.");U.current=Ia;var g=new Set,h=[],k={status:0,fatalError:null,destination:null,bundlerConfig:b,cache:new Map,nextChunkId:0,pendingChunks:0,abortableTasks:g,pingedTasks:h,completedImportChunks:[],completedJSONChunks:[],completedErrorChunks:[],writtenSymbols:new Map,writtenClientReferences:new Map,writtenServerReferences:new Map,writtenProviders:new Map,identifierPrefix:f|| -"",identifierCount:1,onError:void 0===c?Ja:c,toJSON:function(a,b){return La(k,this,a,b)}};k.pendingChunks++;b=Ma(d);a=Na(k,a,b,g);h.push(a);return k}var Oa={}; -function Pa(a,b){a.pendingChunks++;var c=Na(a,null,E,a.abortableTasks);switch(b.status){case "fulfilled":return c.model=b.value,Qa(a,c),c.id;case "rejected":var d=V(a,b.reason);W(a,c.id,d);return c.id;default:"string"!==typeof b.status&&(b.status="pending",b.then(function(a){"pending"===b.status&&(b.status="fulfilled",b.value=a)},function(a){"pending"===b.status&&(b.status="rejected",b.reason=a)}))}b.then(function(b){c.model=b;Qa(a,c)},function(b){b=V(a,b);W(a,c.id,b)});return c.id} -function Ra(a){if("fulfilled"===a.status)return a.value;if("rejected"===a.status)throw a.reason;throw a;}function Sa(a){switch(a.status){case "fulfilled":case "rejected":break;default:"string"!==typeof a.status&&(a.status="pending",a.then(function(b){"pending"===a.status&&(a.status="fulfilled",a.value=b)},function(b){"pending"===a.status&&(a.status="rejected",a.reason=b)}))}return{$$typeof:z,_payload:a,_init:Ra}} -function X(a,b,c,d,f,g){if(null!==d&&void 0!==d)throw Error("Refs cannot be used in Server Components, nor passed to Client Components.");if("function"===typeof b){if(b.$$typeof===v)return[x,b,c,f];M=0;N=g;f=b(f);return"object"===typeof f&&null!==f&&"function"===typeof f.then?"fulfilled"===f.status?f.value:Sa(f):f}if("string"===typeof b)return[x,b,c,f];if("symbol"===typeof b)return b===ia?f.children:[x,b,c,f];if(null!=b&&"object"===typeof b){if(b.$$typeof===v)return[x,b,c,f];switch(b.$$typeof){case z:var h= -b._init;b=h(b._payload);return X(a,b,c,d,f,g);case la:return a=b.render,M=0,N=g,a(f,void 0);case oa:return X(a,b.type,c,d,f,g);case ja:return xa(b._context,f.value),[x,b,c,{value:f.value,children:f.children,__pop:Oa}]}}throw Error("Unsupported Server Component type: "+Ta(b));}function Qa(a,b){var c=a.pingedTasks;c.push(b);1===c.length&&Ua(a)}function Na(a,b,c,d){var f={id:a.nextChunkId++,status:0,model:b,context:c,ping:function(){return Qa(a,f)},thenableState:null};d.add(f);return f} -function Va(a,b,c,d){var f=d.filepath+"#"+d.name+(d.async?"#async":""),g=a.writtenClientReferences,h=g.get(f);if(void 0!==h)return b[0]===x&&"1"===c?"$L"+h.toString(16):"$"+h.toString(16);try{var k=a.bundlerConfig[d.filepath][d.name];var l=d.async?{id:k.id,chunks:k.chunks,name:k.name,async:!0}:k;a.pendingChunks++;var y=a.nextChunkId++,ea=t(l),w=y.toString(16)+":I"+ea+"\n";var L=q.encode(w);a.completedImportChunks.push(L);g.set(f,y);return b[0]===x&&"1"===c?"$L"+y.toString(16):"$"+y.toString(16)}catch(fa){return a.pendingChunks++, -b=a.nextChunkId++,c=V(a,fa),W(a,b,c),"$"+b.toString(16)}}function Wa(a){return Object.prototype.toString.call(a).replace(/^\[object (.*)\]$/,function(a,c){return c})}function Ta(a){switch(typeof a){case "string":return JSON.stringify(10>=a.length?a:a.substr(0,10)+"...");case "object":if(sa(a))return"[...]";a=Wa(a);return"Object"===a?"{...}":a;case "function":return"function";default:return String(a)}} -function Y(a){if("string"===typeof a)return a;switch(a){case ma:return"Suspense";case na:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case la:return Y(a.render);case oa:return Y(a.type);case z:var b=a._payload;a=a._init;try{return Y(a(b))}catch(c){}}return""} -function Z(a,b){var c=Wa(a);if("Object"!==c&&"Array"!==c)return c;c=-1;var d=0;if(sa(a)){var f="[";for(var g=0;g<a.length;g++){0<g&&(f+=", ");var h=a[g];h="object"===typeof h&&null!==h?Z(h):Ta(h);""+g===b?(c=f.length,d=h.length,f+=h):f=10>h.length&&40>f.length+h.length?f+h:f+"..."}f+="]"}else if(a.$$typeof===x)f="<"+Y(a.type)+"/>";else{f="{";g=Object.keys(a);for(h=0;h<g.length;h++){0<h&&(f+=", ");var k=g[h],l=JSON.stringify(k);f+=('"'+k+'"'===l?k:l)+": ";l=a[k];l="object"===typeof l&&null!==l?Z(l): +function Aa(){if(null===J)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var a=J;J=null;return a}var K=null,L=0,M=null;function Ba(){var a=M;M=null;return a}function Ca(a){return a._currentValue} +var Ha={useMemo:function(a){return a()},useCallback:function(a){return a},useDebugValue:function(){},useDeferredValue:N,useTransition:N,readContext:Ca,useContext:Ca,useReducer:N,useRef:N,useState:N,useInsertionEffect:N,useLayoutEffect:N,useImperativeHandle:N,useEffect:N,useId:Da,useMutableSource:N,useSyncExternalStore:N,useCacheRefresh:function(){return Ea},useMemoCache:function(a){for(var b=Array(a),c=0;c<a;c++)b[c]=qa;return b},use:Fa}; +function N(){throw Error("This Hook is not supported in Server Components.");}function Ea(){throw Error("Refreshing the cache is not supported in Server Components.");}function Da(){if(null===K)throw Error("useId can only be used while React is rendering");var a=K.identifierCount++;return":"+K.identifierPrefix+"S"+a.toString(32)+":"} +function Fa(a){if(null!==a&&"object"===typeof a||"function"===typeof a){if("function"===typeof a.then){var b=L;L+=1;null===M&&(M=[]);return za(M,a,b)}if(a.$$typeof===ka)return a._currentValue}throw Error("An unsupported type was passed to use(): "+String(a));}function O(){return(new AbortController).signal}function Ia(){if(P)return P;if(e){var a=ba.getStore();if(a)return a}return new Map} +var Ja={getCacheSignal:function(){var a=Ia(),b=a.get(O);void 0===b&&(b=O(),a.set(O,b));return b},getCacheForType:function(a){var b=Ia(),c=b.get(a);void 0===c&&(c=a(),b.set(a,c));return c}},P=null,Q=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,R=Q.ContextRegistry,S=Q.ReactCurrentDispatcher,T=Q.ReactCurrentCache;function Ka(a){console.error(a)} +function La(a,b,c,d,f){if(null!==T.current&&T.current!==Ja)throw Error("Currently React only supports one RSC renderer at a time.");T.current=Ja;var g=new Set,h=[],k={status:0,fatalError:null,destination:null,bundlerConfig:b,cache:new Map,nextChunkId:0,pendingChunks:0,abortableTasks:g,pingedTasks:h,completedModuleChunks:[],completedJSONChunks:[],completedErrorChunks:[],writtenSymbols:new Map,writtenModules:new Map,writtenProviders:new Map,identifierPrefix:f||"",identifierCount:1,onError:void 0=== +c?Ka:c,toJSON:function(a,b){return Ma(k,this,a,b)}};k.pendingChunks++;b=Na(d);a=U(k,a,b,g);h.push(a);return k}var Oa={}; +function Pa(a,b){a.pendingChunks++;var c=U(a,null,D,a.abortableTasks);switch(b.status){case "fulfilled":return c.model=b.value,Qa(a,c),c.id;case "rejected":var d=V(a,b.reason);W(a,c.id,d);return c.id;default:"string"!==typeof b.status&&(b.status="pending",b.then(function(a){"pending"===b.status&&(b.status="fulfilled",b.value=a)},function(a){"pending"===b.status&&(b.status="rejected",b.reason=a)}))}b.then(function(b){c.model=b;Qa(a,c)},function(b){b=V(a,b);W(a,c.id,b)});return c.id} +function Ra(a){if("fulfilled"===a.status)return a.value;if("rejected"===a.status)throw a.reason;throw a;}function Sa(a){switch(a.status){case "fulfilled":case "rejected":break;default:"string"!==typeof a.status&&(a.status="pending",a.then(function(b){"pending"===a.status&&(a.status="fulfilled",a.value=b)},function(b){"pending"===a.status&&(a.status="rejected",a.reason=b)}))}return{$$typeof:y,_payload:a,_init:Ra}} +function X(a,b,c,d,f,g){if(null!==d&&void 0!==d)throw Error("Refs cannot be used in Server Components, nor passed to Client Components.");if("function"===typeof b){if(b.$$typeof===v)return[w,b,c,f];L=0;M=g;f=b(f);return"object"===typeof f&&null!==f&&"function"===typeof f.then?"fulfilled"===f.status?f.value:Sa(f):f}if("string"===typeof b)return[w,b,c,f];if("symbol"===typeof b)return b===ia?f.children:[w,b,c,f];if(null!=b&&"object"===typeof b){if(b.$$typeof===v)return[w,b,c,f];switch(b.$$typeof){case y:var h= +b._init;b=h(b._payload);return X(a,b,c,d,f,g);case la:return a=b.render,L=0,M=g,a(f,void 0);case oa:return X(a,b.type,c,d,f,g);case ja:return xa(b._context,f.value),[w,b,c,{value:f.value,children:f.children,__pop:Oa}]}}throw Error("Unsupported Server Component type: "+Ta(b));}function Qa(a,b){var c=a.pingedTasks;c.push(b);1===c.length&&Ua(a)}function U(a,b,c,d){var f={id:a.nextChunkId++,status:0,model:b,context:c,ping:function(){return Qa(a,f)},thenableState:null};d.add(f);return f} +function Va(a,b,c,d){var f=d.filepath+"#"+d.name+(d.async?"#async":""),g=a.writtenModules,h=g.get(f);if(void 0!==h)return b[0]===w&&"1"===c?"$L"+h.toString(16):"$"+h.toString(16);try{var k=a.bundlerConfig[d.filepath][d.name];var l=d.async?{id:k.id,chunks:k.chunks,name:k.name,async:!0}:k;a.pendingChunks++;var x=a.nextChunkId++,da=t(l),ea=x.toString(16)+":I"+da+"\n";var fa=q.encode(ea);a.completedModuleChunks.push(fa);g.set(f,x);return b[0]===w&&"1"===c?"$L"+x.toString(16):"$"+x.toString(16)}catch(ha){return a.pendingChunks++, +b=a.nextChunkId++,c=V(a,ha),W(a,b,c),"$"+b.toString(16)}}function Wa(a){return Object.prototype.toString.call(a).replace(/^\[object (.*)\]$/,function(a,c){return c})}function Ta(a){switch(typeof a){case "string":return JSON.stringify(10>=a.length?a:a.substr(0,10)+"...");case "object":if(sa(a))return"[...]";a=Wa(a);return"Object"===a?"{...}":a;case "function":return"function";default:return String(a)}} +function Y(a){if("string"===typeof a)return a;switch(a){case ma:return"Suspense";case na:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case la:return Y(a.render);case oa:return Y(a.type);case y:var b=a._payload;a=a._init;try{return Y(a(b))}catch(c){}}return""} +function Z(a,b){var c=Wa(a);if("Object"!==c&&"Array"!==c)return c;c=-1;var d=0;if(sa(a)){var f="[";for(var g=0;g<a.length;g++){0<g&&(f+=", ");var h=a[g];h="object"===typeof h&&null!==h?Z(h):Ta(h);""+g===b?(c=f.length,d=h.length,f+=h):f=10>h.length&&40>f.length+h.length?f+h:f+"..."}f+="]"}else if(a.$$typeof===w)f="<"+Y(a.type)+"/>";else{f="{";g=Object.keys(a);for(h=0;h<g.length;h++){0<h&&(f+=", ");var k=g[h],l=JSON.stringify(k);f+=('"'+k+'"'===l?k:l)+": ";l=a[k];l="object"===typeof l&&null!==l?Z(l): Ta(l);k===b?(c=f.length,d=l.length,f+=l):f=10>l.length&&40>f.length+l.length?f+l:f+"..."}f+="}"}return void 0===b?f:-1<c&&0<d?(a=" ".repeat(c)+"^".repeat(d),"\n "+f+"\n "+a):"\n "+f} -function La(a,b,c,d){switch(d){case x:return"$"}for(;"object"===typeof d&&null!==d&&(d.$$typeof===x||d.$$typeof===z);)try{switch(d.$$typeof){case x:var f=d;d=X(a,f.type,f.key,f.ref,f.props,null);break;case z:var g=d._init;d=g(d._payload)}}catch(h){c=h===I?Aa():h;if("object"===typeof c&&null!==c&&"function"===typeof c.then)return a.pendingChunks++,a=Na(a,d,E,a.abortableTasks),d=a.ping,c.then(d,d),a.thenableState=Ba(),"$L"+a.id.toString(16);a.pendingChunks++;d=a.nextChunkId++;c=V(a,c);W(a,d,c);return"$L"+ -d.toString(16)}if(null===d)return null;if("object"===typeof d){if(d.$$typeof===v)return Va(a,b,c,d);if("function"===typeof d.then)return"$@"+Pa(a,d).toString(16);if(d.$$typeof===ja)return d=d._context._globalName,b=a.writtenProviders,c=b.get(c),void 0===c&&(a.pendingChunks++,c=a.nextChunkId++,b.set(d,c),d=u(a,c,"$P"+d),a.completedJSONChunks.push(d)),"$"+c.toString(16);if(d===Oa){a=E;if(null===a)throw Error("Tried to pop a Context at the root of the app. This is a bug in React.");d=a.parentValue;a.context._currentValue= -d===pa?a.context._defaultValue:d;E=a.parent;return}return d}if("string"===typeof d)return a="$"===d[0]?"$"+d:d,a;if("boolean"===typeof d||"number"===typeof d||"undefined"===typeof d)return d;if("function"===typeof d){if(d.$$typeof===v)return Va(a,b,c,d);if(d.$$typeof===ha)return c=a.writtenServerReferences,b=c.get(d),void 0!==b?a="$F"+b.toString(16):(f={id:d.$$filepath,name:d.$$name,bound:Promise.resolve(d.$$bound)},a.pendingChunks++,b=a.nextChunkId++,f=da(a,b,f),a.completedJSONChunks.push(f),c.set(d, -b),a="$F"+b.toString(16)),a;if(/^on[A-Z]/.test(c))throw Error("Event handlers cannot be passed to Client Component props."+Z(b,c)+"\nIf you need interactivity, consider converting part of this to a Client Component.");throw Error('Functions cannot be passed directly to Client Components unless you explicitly expose it by marking it with "use server".'+Z(b,c));}if("symbol"===typeof d){f=a.writtenSymbols;g=f.get(d);if(void 0!==g)return"$"+g.toString(16);g=d.description;if(Symbol.for(g)!==d)throw Error("Only global symbols received from Symbol.for(...) can be passed to Client Components. The symbol Symbol.for("+ -(d.description+") cannot be found among global symbols.")+Z(b,c));a.pendingChunks++;c=a.nextChunkId++;b=u(a,c,"$S"+g);a.completedImportChunks.push(b);f.set(d,c);return"$"+c.toString(16)}if("bigint"===typeof d)throw Error("BigInt ("+d+") is not yet supported in Client Component props."+Z(b,c));throw Error("Type "+typeof d+" is not supported in Client Component props."+Z(b,c));} -function V(a,b){a=a.onError;b=a(b);if(null!=b&&"string"!==typeof b)throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof b+'" instead');return b||""}function Xa(a,b){null!==a.destination?(a.status=2,ca(a.destination,b)):(a.status=1,a.fatalError=b)} +function Ma(a,b,c,d){switch(d){case w:return"$"}for(;"object"===typeof d&&null!==d&&(d.$$typeof===w||d.$$typeof===y);)try{switch(d.$$typeof){case w:var f=d;d=X(a,f.type,f.key,f.ref,f.props,null);break;case y:var g=d._init;d=g(d._payload)}}catch(h){c=h===I?Aa():h;if("object"===typeof c&&null!==c&&"function"===typeof c.then)return a.pendingChunks++,a=U(a,d,D,a.abortableTasks),d=a.ping,c.then(d,d),a.thenableState=Ba(),"$L"+a.id.toString(16);a.pendingChunks++;d=a.nextChunkId++;c=V(a,c);W(a,d,c);return"$L"+ +d.toString(16)}if(null===d)return null;if("object"===typeof d){if(d.$$typeof===v)return Va(a,b,c,d);if("function"===typeof d.then)return"$@"+Pa(a,d).toString(16);if(d.$$typeof===ja)return d=d._context._globalName,b=a.writtenProviders,c=b.get(c),void 0===c&&(a.pendingChunks++,c=a.nextChunkId++,b.set(d,c),d=u(a,c,"$P"+d),a.completedJSONChunks.push(d)),"$"+c.toString(16);if(d===Oa){a=D;if(null===a)throw Error("Tried to pop a Context at the root of the app. This is a bug in React.");d=a.parentValue;a.context._currentValue= +d===pa?a.context._defaultValue:d;D=a.parent;return}return d}if("string"===typeof d)return a="$"===d[0]?"$"+d:d,a;if("boolean"===typeof d||"number"===typeof d||"undefined"===typeof d)return d;if("function"===typeof d){if(d.$$typeof===v)return Va(a,b,c,d);if(/^on[A-Z]/.test(c))throw Error("Event handlers cannot be passed to Client Component props."+Z(b,c)+"\nIf you need interactivity, consider converting part of this to a Client Component.");throw Error("Functions cannot be passed directly to Client Components because they're not serializable."+ +Z(b,c));}if("symbol"===typeof d){f=a.writtenSymbols;g=f.get(d);if(void 0!==g)return"$"+g.toString(16);g=d.description;if(Symbol.for(g)!==d)throw Error("Only global symbols received from Symbol.for(...) can be passed to Client Components. The symbol Symbol.for("+(d.description+") cannot be found among global symbols.")+Z(b,c));a.pendingChunks++;c=a.nextChunkId++;b=u(a,c,"$S"+g);a.completedModuleChunks.push(b);f.set(d,c);return"$"+c.toString(16)}if("bigint"===typeof d)throw Error("BigInt ("+d+") is not yet supported in Client Component props."+ +Z(b,c));throw Error("Type "+typeof d+" is not supported in Client Component props."+Z(b,c));}function V(a,b){a=a.onError;b=a(b);if(null!=b&&"string"!==typeof b)throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof b+'" instead');return b||""}function Xa(a,b){null!==a.destination?(a.status=2,ca(a.destination,b)):(a.status=1,a.fatalError=b)} function W(a,b,c){c={digest:c};b=b.toString(16)+":E"+t(c)+"\n";b=q.encode(b);a.completedErrorChunks.push(b)} -function Ua(a){var b=T.current,c=Q;T.current=Ga;Q=a.cache;K=a;try{var d=a.pingedTasks;a.pingedTasks=[];for(var f=0;f<d.length;f++){var g=d[f];var h=a;if(0===g.status){H(g.context);try{var k=g.model;if("object"===typeof k&&null!==k&&k.$$typeof===x){var l=k,y=g.thenableState;g.model=k;k=X(h,l.type,l.key,l.ref,l.props,y);for(g.thenableState=null;"object"===typeof k&&null!==k&&k.$$typeof===x;)l=k,g.model=k,k=X(h,l.type,l.key,l.ref,l.props,null)}var ea=da(h,g.id,k);h.completedJSONChunks.push(ea);h.abortableTasks.delete(g); -g.status=1}catch(F){var w=F===I?Aa():F;if("object"===typeof w&&null!==w&&"function"===typeof w.then){var L=g.ping;w.then(L,L);g.thenableState=Ba()}else{h.abortableTasks.delete(g);g.status=4;var fa=V(h,w);W(h,g.id,fa)}}}}null!==a.destination&&Ya(a,a.destination)}catch(F){V(a,F),Xa(a,F)}finally{T.current=b,Q=c,K=null}} -function Ya(a,b){m=new Uint8Array(512);n=0;try{for(var c=a.completedImportChunks,d=0;d<c.length;d++)if(a.pendingChunks--,!p(b,c[d])){a.destination=null;d++;break}c.splice(0,d);var f=a.completedJSONChunks;for(d=0;d<f.length;d++)if(a.pendingChunks--,!p(b,f[d])){a.destination=null;d++;break}f.splice(0,d);var g=a.completedErrorChunks;for(d=0;d<g.length;d++)if(a.pendingChunks--,!p(b,g[d])){a.destination=null;d++;break}g.splice(0,d)}finally{m&&0<n&&(b.enqueue(new Uint8Array(m.buffer,0,n)),m=null,n=0)}0=== +function Ua(a){var b=S.current,c=P;S.current=Ha;P=a.cache;K=a;try{var d=a.pingedTasks;a.pingedTasks=[];for(var f=0;f<d.length;f++){var g=d[f];var h=a;if(0===g.status){H(g.context);try{var k=g.model;if("object"===typeof k&&null!==k&&k.$$typeof===w){var l=k,x=g.thenableState;g.model=k;k=X(h,l.type,l.key,l.ref,l.props,x);for(g.thenableState=null;"object"===typeof k&&null!==k&&k.$$typeof===w;)l=k,g.model=k,k=X(h,l.type,l.key,l.ref,l.props,null)}var da=g.id,ea=t(k,h.toJSON),fa=da.toString(16)+":"+ea+"\n"; +var ha=q.encode(fa);h.completedJSONChunks.push(ha);h.abortableTasks.delete(g);g.status=1}catch(E){var F=E===I?Aa():E;if("object"===typeof F&&null!==F&&"function"===typeof F.then){var Ga=g.ping;F.then(Ga,Ga);g.thenableState=Ba()}else{h.abortableTasks.delete(g);g.status=4;var $a=V(h,F);W(h,g.id,$a)}}}}null!==a.destination&&Ya(a,a.destination)}catch(E){V(a,E),Xa(a,E)}finally{S.current=b,P=c,K=null}} +function Ya(a,b){m=new Uint8Array(512);n=0;try{for(var c=a.completedModuleChunks,d=0;d<c.length;d++)if(a.pendingChunks--,!p(b,c[d])){a.destination=null;d++;break}c.splice(0,d);var f=a.completedJSONChunks;for(d=0;d<f.length;d++)if(a.pendingChunks--,!p(b,f[d])){a.destination=null;d++;break}f.splice(0,d);var g=a.completedErrorChunks;for(d=0;d<g.length;d++)if(a.pendingChunks--,!p(b,g[d])){a.destination=null;d++;break}g.splice(0,d)}finally{m&&0<n&&(b.enqueue(new Uint8Array(m.buffer,0,n)),m=null,n=0)}0=== a.pendingChunks&&b.close()}function Za(a,b){try{var c=a.abortableTasks;if(0<c.size){var d=V(a,void 0===b?Error("The render was aborted by the server without a reason."):b);a.pendingChunks++;var f=a.nextChunkId++;W(a,f,d);c.forEach(function(b){b.status=3;var c="$"+f.toString(16);b=u(a,b.id,c);a.completedErrorChunks.push(b)});c.clear()}null!==a.destination&&Ya(a,a.destination)}catch(g){V(a,g),Xa(a,g)}} -function Ma(a){if(a){var b=E;H(null);for(var c=0;c<a.length;c++){var d=a[c],f=d[0];d=d[1];S[f]||(S[f]=aa.createServerContext(f,pa));xa(S[f],d)}a=E;H(b);return a}return null} -exports.renderToReadableStream=function(a,b,c){var d=Ka(a,b,c?c.onError:void 0,c?c.context:void 0,c?c.identifierPrefix:void 0);if(c&&c.signal){var f=c.signal;if(f.aborted)Za(d,f.reason);else{var g=function(){Za(d,f.reason);f.removeEventListener("abort",g)};f.addEventListener("abort",g)}}return new ReadableStream({type:"bytes",start:function(){e?ba.run(d.cache,Ua,d):Ua(d)},pull:function(a){if(1===d.status)d.status=2,ca(a,d.fatalError);else if(2!==d.status&&null===d.destination){d.destination=a;try{Ya(d, +function Na(a){if(a){var b=D;H(null);for(var c=0;c<a.length;c++){var d=a[c],f=d[0];d=d[1];R[f]||(R[f]=aa.createServerContext(f,pa));xa(R[f],d)}a=D;H(b);return a}return null} +exports.renderToReadableStream=function(a,b,c){var d=La(a,b,c?c.onError:void 0,c?c.context:void 0,c?c.identifierPrefix:void 0);if(c&&c.signal){var f=c.signal;if(f.aborted)Za(d,f.reason);else{var g=function(){Za(d,f.reason);f.removeEventListener("abort",g)};f.addEventListener("abort",g)}}return new ReadableStream({type:"bytes",start:function(){e?ba.run(d.cache,Ua,d):Ua(d)},pull:function(a){if(1===d.status)d.status=2,ca(a,d.fatalError);else if(2!==d.status&&null===d.destination){d.destination=a;try{Ya(d, a)}catch(k){V(d,k),Xa(d,k)}}},cancel:function(){}},{highWaterMark:0})}; diff --git a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js index c1f778c8b40ea..4332e7c7a8693 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js @@ -270,25 +270,21 @@ function processReferenceChunk(request, id, reference) { var row = id.toString(16) + ':' + json + '\n'; return stringToChunk(row); } -function processImportChunk(request, id, clientReferenceMetadata) { - var json = stringify(clientReferenceMetadata); +function processModuleChunk(request, id, moduleMetaData) { + var json = stringify(moduleMetaData); var row = serializeRowHeader('I', id) + json + '\n'; return stringToChunk(row); } // eslint-disable-next-line no-unused-vars var CLIENT_REFERENCE_TAG = Symbol.for('react.client.reference'); -var SERVER_REFERENCE_TAG = Symbol.for('react.server.reference'); function getClientReferenceKey(reference) { return reference.filepath + '#' + reference.name + (reference.async ? '#async' : ''); } function isClientReference(reference) { return reference.$$typeof === CLIENT_REFERENCE_TAG; } -function isServerReference(reference) { - return reference.$$typeof === SERVER_REFERENCE_TAG; -} -function resolveClientReferenceMetadata(config, clientReference) { +function resolveModuleMetaData(config, clientReference) { var resolvedModuleData = config[clientReference.filepath][clientReference.name]; if (clientReference.async) { @@ -302,13 +298,6 @@ function resolveClientReferenceMetadata(config, clientReference) { return resolvedModuleData; } } -function resolveServerReferenceMetadata(config, serverReference) { - return { - id: serverReference.$$filepath, - name: serverReference.$$name, - bound: Promise.resolve(serverReference.$$bound) - }; -} // ATTENTION // When adding new symbols to this file, @@ -584,7 +573,6 @@ var isUnitlessNumber = { opacity: true, order: true, orphans: true, - scale: true, tabSize: true, widows: true, zIndex: true, @@ -634,7 +622,7 @@ function isArray(a) { // Run `yarn generate-inline-fizz-runtime` to generate. var clientRenderBoundary = '$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};'; var completeBoundary = '$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};'; -var completeBoundaryWithStyles = '$RM=new Map;\n$RR=function(p,q,w){function r(l){this.s=l}for(var t=$RC,m=$RM,u=new Map,n=new Map,g=document,h,e,f=g.querySelectorAll("template[data-precedence]"),c=0;e=f[c++];){for(var b=e.content.firstChild;b;b=b.nextSibling)u.set(b.getAttribute("data-href"),b);e.parentNode.removeChild(e)}f=g.querySelectorAll("link[data-precedence],style[data-precedence]");for(c=0;e=f[c++];)m.set(e.getAttribute("STYLE"===e.nodeName?"data-href":"href"),e),n.set(e.dataset.precedence,h=e);e=0;f=[];for(var d,\nv,a;d=w[e++];){var k=0;b=d[k++];if(!(a=m.get(b))){if(a=u.get(b))c=a.getAttribute("data-precedence");else{a=g.createElement("link");a.href=b;a.rel="stylesheet";for(a.dataset.precedence=c=d[k++];v=d[k++];)a.setAttribute(v,d[k++]);d=a._p=new Promise(function(l,x){a.onload=l;a.onerror=x});d.then(r.bind(d,"l"),r.bind(d,"e"))}m.set(b,a);b=n.get(c)||h;b===h&&(h=a);n.set(c,a);b?b.parentNode.insertBefore(a,b.nextSibling):(c=g.head,c.insertBefore(a,c.firstChild))}d=a._p;c=a.getAttribute("media");!d||"l"===\nd.s||c&&!matchMedia(c).matches||f.push(d)}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};'; +var completeBoundaryWithStyles = '$RM=new Map;\n$RR=function(p,q,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};'; var completeSegment = '$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};'; var ReactDOMSharedInternals = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; @@ -715,10 +703,10 @@ var completeSegmentScript2 = stringToPrecomputedChunk('","'); var completeSegmentScriptEnd = stringToPrecomputedChunk('")</script>'); var completeSegmentData1 = stringToPrecomputedChunk('<template data-rsi="" data-sid="'); var completeSegmentData2 = stringToPrecomputedChunk('" data-pid="'); -var completeBoundaryScript1Full = stringToPrecomputedChunk(completeBoundary + '$RC("'); +var completeBoundaryScript1Full = stringToPrecomputedChunk(completeBoundary + ';$RC("'); var completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC("'); -var completeBoundaryWithStylesScript1FullBoth = stringToPrecomputedChunk(completeBoundary + completeBoundaryWithStyles + '$RR("'); -var completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk(completeBoundaryWithStyles + '$RR("'); +var completeBoundaryWithStylesScript1FullBoth = stringToPrecomputedChunk(completeBoundary + ';' + completeBoundaryWithStyles + ';$RR("'); +var completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk(completeBoundaryWithStyles + ';$RR("'); var completeBoundaryWithStylesScript1Partial = stringToPrecomputedChunk('$RR("'); var completeBoundaryScript2 = stringToPrecomputedChunk('","'); var completeBoundaryScript3a = stringToPrecomputedChunk('",'); @@ -738,8 +726,6 @@ var clientRenderData2 = stringToPrecomputedChunk('" data-dgst="'); var clientRenderData3 = stringToPrecomputedChunk('" data-msg="'); var clientRenderData4 = stringToPrecomputedChunk('" data-stck="'); -var styleTagTemplateOpen = stringToPrecomputedChunk('<template data-precedence="">'); -var styleTagTemplateClose = stringToPrecomputedChunk('</template>'); // Tracks whether we wrote any late style tags. We use this to determine var precedencePlaceholderStart = stringToPrecomputedChunk('<style data-precedence="'); var precedencePlaceholderEnd = stringToPrecomputedChunk('"></style>'); @@ -1271,12 +1257,11 @@ function createRequest(model, bundlerConfig, onError, context, identifierPrefix) pendingChunks: 0, abortableTasks: abortSet, pingedTasks: pingedTasks, - completedImportChunks: [], + completedModuleChunks: [], completedJSONChunks: [], completedErrorChunks: [], writtenSymbols: new Map(), - writtenClientReferences: new Map(), - writtenServerReferences: new Map(), + writtenModules: new Map(), writtenProviders: new Map(), identifierPrefix: identifierPrefix || '', identifierCount: 1, @@ -1587,10 +1572,6 @@ function serializePromiseID(id) { return '$@' + id.toString(16); } -function serializeServerReferenceID(id) { - return '$F' + id.toString(16); -} - function serializeSymbolReference(name) { return '$S' + name; } @@ -1599,10 +1580,10 @@ function serializeProviderReference(name) { return '$P' + name; } -function serializeClientReference(request, parent, key, clientReference) { - var clientReferenceKey = getClientReferenceKey(clientReference); - var writtenClientReferences = request.writtenClientReferences; - var existingId = writtenClientReferences.get(clientReferenceKey); +function serializeClientReference(request, parent, key, moduleReference) { + var moduleKey = getClientReferenceKey(moduleReference); + var writtenModules = request.writtenModules; + var existingId = writtenModules.get(moduleKey); if (existingId !== undefined) { if (parent[0] === REACT_ELEMENT_TYPE && key === '1') { @@ -1618,11 +1599,11 @@ function serializeClientReference(request, parent, key, clientReference) { } try { - var clientReferenceMetadata = resolveClientReferenceMetadata(request.bundlerConfig, clientReference); + var moduleMetaData = resolveModuleMetaData(request.bundlerConfig, moduleReference); request.pendingChunks++; - var importId = request.nextChunkId++; - emitImportChunk(request, importId, clientReferenceMetadata); - writtenClientReferences.set(clientReferenceKey, importId); + var moduleId = request.nextChunkId++; + emitModuleChunk(request, moduleId, moduleMetaData); + writtenModules.set(moduleKey, moduleId); if (parent[0] === REACT_ELEMENT_TYPE && key === '1') { // If we're encoding the "type" of an element, we can refer @@ -1630,10 +1611,10 @@ function serializeClientReference(request, parent, key, clientReference) { // knows how to deal with lazy values. This lets us suspend // on this component rather than its parent until the code has // loaded. - return serializeLazyID(importId); + return serializeLazyID(moduleId); } - return serializeByValueID(importId); + return serializeByValueID(moduleId); } catch (x) { request.pendingChunks++; var errorId = request.nextChunkId++; @@ -1651,24 +1632,6 @@ function serializeClientReference(request, parent, key, clientReference) { } } -function serializeServerReference(request, parent, key, serverReference) { - var writtenServerReferences = request.writtenServerReferences; - var existingId = writtenServerReferences.get(serverReference); - - if (existingId !== undefined) { - return serializeServerReferenceID(existingId); - } - - var serverReferenceMetadata = resolveServerReferenceMetadata(request.bundlerConfig, serverReference); - request.pendingChunks++; - var metadataId = request.nextChunkId++; // We assume that this object doesn't suspend. - - var processedChunk = processModelChunk(request, metadataId, serverReferenceMetadata); - request.completedJSONChunks.push(processedChunk); - writtenServerReferences.set(serverReference, metadataId); - return serializeServerReferenceID(metadataId); -} - function escapeStringValue(value) { if (value[0] === '$') { // We need to escape $ or @ prefixed strings since we use those to encode @@ -2097,7 +2060,7 @@ function resolveModelToJSON(request, parent, key, value) { if (typeof value === 'object') { if (isClientReference(value)) { - return serializeClientReference(request, parent, key, value); // $FlowFixMe[method-unbinding] + return serializeClientReference(request, parent, key, value); } else if (typeof value.then === 'function') { // We assume that any object with a .then property is a "Thenable" type, // or a Promise type. Either of which can be represented by a Promise. @@ -2161,14 +2124,10 @@ function resolveModelToJSON(request, parent, key, value) { return serializeClientReference(request, parent, key, value); } - if (isServerReference(value)) { - return serializeServerReference(request, parent, key, value); - } - if (/^on[A-Z]/.test(key)) { throw new Error('Event handlers cannot be passed to Client Component props.' + describeObjectForErrorMessage(parent, key) + '\nIf you need interactivity, consider converting part of this to a Client Component.'); } else { - throw new Error('Functions cannot be passed directly to Client Components ' + 'unless you explicitly expose it by marking it with "use server".' + describeObjectForErrorMessage(parent, key)); + throw new Error('Functions cannot be passed directly to Client Components ' + "because they're not serializable." + describeObjectForErrorMessage(parent, key)); } } @@ -2260,15 +2219,15 @@ function emitErrorChunkDev(request, id, digest, message, stack) { request.completedErrorChunks.push(processedChunk); } -function emitImportChunk(request, id, clientReferenceMetadata) { - var processedChunk = processImportChunk(request, id, clientReferenceMetadata); - request.completedImportChunks.push(processedChunk); +function emitModuleChunk(request, id, moduleMetaData) { + var processedChunk = processModuleChunk(request, id, moduleMetaData); + request.completedModuleChunks.push(processedChunk); } function emitSymbolChunk(request, id, name) { var symbolReference = serializeSymbolReference(name); var processedChunk = processReferenceChunk(request, id, symbolReference); - request.completedImportChunks.push(processedChunk); + request.completedModuleChunks.push(processedChunk); } function emitProviderChunk(request, id, contextName) { @@ -2391,12 +2350,12 @@ function flushCompletedChunks(request, destination) { try { // We emit module chunks first in the stream so that // they can be preloaded as early as possible. - var importsChunks = request.completedImportChunks; + var moduleChunks = request.completedModuleChunks; var i = 0; - for (; i < importsChunks.length; i++) { + for (; i < moduleChunks.length; i++) { request.pendingChunks--; - var chunk = importsChunks[i]; + var chunk = moduleChunks[i]; var keepWriting = writeChunkAndReturn(destination, chunk); if (!keepWriting) { @@ -2406,7 +2365,7 @@ function flushCompletedChunks(request, destination) { } } - importsChunks.splice(0, i); // Next comes model data. + moduleChunks.splice(0, i); // Next comes model data. var jsonChunks = request.completedJSONChunks; i = 0; diff --git a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.production.min.js b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.production.min.js index e75dbae06db18..926e90b6de19d 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.production.min.js +++ b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.production.min.js @@ -7,57 +7,56 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -'use strict';var aa=require("util"),ba=require("async_hooks"),ca=require("react");var da=new ba.AsyncLocalStorage,e=null,m=0,n=!0;function p(a,b){a=a.write(b);n=n&&a} +'use strict';var aa=require("util"),ba=require("async_hooks"),ca=require("react");var ha=new ba.AsyncLocalStorage,e=null,m=0,n=!0;function p(a,b){a=a.write(b);n=n&&a} function q(a,b){if("string"===typeof b){if(0!==b.length)if(2048<3*b.length)0<m&&(p(a,e.subarray(0,m)),e=new Uint8Array(2048),m=0),p(a,r.encode(b));else{var c=e;0<m&&(c=e.subarray(m));c=r.encodeInto(b,c);var d=c.read;m+=c.written;d<b.length&&(p(a,e),e=new Uint8Array(2048),m=r.encodeInto(b.slice(d),e).written);2048===m&&(p(a,e),e=new Uint8Array(2048),m=0)}}else 0!==b.byteLength&&(2048<b.byteLength?(0<m&&(p(a,e.subarray(0,m)),e=new Uint8Array(2048),m=0),p(a,b)):(c=e.length-m,c<b.byteLength&&(0===c?p(a, -e):(e.set(b.subarray(0,c),m),m+=c,p(a,e),b=b.subarray(c)),e=new Uint8Array(2048),m=0),e.set(b,m),m+=b.byteLength,2048===m&&(p(a,e),e=new Uint8Array(2048),m=0)));return n}var r=new aa.TextEncoder;function t(a){return r.encode(a)}var u=JSON.stringify;function fa(a,b,c){a=u(c,a.toJSON);return b.toString(16)+":"+a+"\n"}function v(a,b,c){a=u(c);return b.toString(16)+":"+a+"\n"} -var w=Symbol.for("react.client.reference"),ha=Symbol.for("react.server.reference"),y=Symbol.for("react.element"),ia=Symbol.for("react.fragment"),ja=Symbol.for("react.provider"),ka=Symbol.for("react.server_context"),la=Symbol.for("react.forward_ref"),ma=Symbol.for("react.suspense"),na=Symbol.for("react.suspense_list"),oa=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),pa=Symbol.for("react.default_value"),qa=Symbol.for("react.memo_cache_sentinel"); -function B(a,b,c,d,f,g,h){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=f;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=g;this.removeEmptyString=h}"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){new B(a,0,!1,a,null,!1,!1)}); -[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){new B(a[0],1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){new B(a,2,!1,a.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){new B(a,2,!1,a,null,!1,!1)}); -"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){new B(a,3,!1,a.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(a){new B(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){new B(a,4,!1,a,null,!1,!1)}); -["cols","rows","size","span"].forEach(function(a){new B(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){new B(a,5,!1,a.toLowerCase(),null,!1,!1)});var C=/[\-:]([a-z])/g;function D(a){return a[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 transform-origin 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".split(" ").forEach(function(a){var b=a.replace(C, -D);new B(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(C,D);new B(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(C,D);new B(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){new B(a,1,!1,a.toLowerCase(),null,!1,!1)}); -new B("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){new B(a,1,!1,a.toLowerCase(),null,!0,!0)}); -var E={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,tabSize:!0,widows:!0,zIndex:!0, -zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ra=["Webkit","ms","Moz","O"];Object.keys(E).forEach(function(a){ra.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);E[b]=E[a]})});var sa=Array.isArray;t('"></template>');t("<script>");t("\x3c/script>");t('<script src="');t('<script type="module" src="');t('" integrity="');t('" async="">\x3c/script>');t("\x3c!-- --\x3e");t(' style="');t(":"); -t(";");t(" ");t('="');t('"');t('=""');t(">");t("/>");t(' selected=""');t("\n");t("<!DOCTYPE html>");t("</");t(">");t('<template id="');t('"></template>');t("\x3c!--$--\x3e");t('\x3c!--$?--\x3e<template id="');t('"></template>');t("\x3c!--$!--\x3e");t("\x3c!--/$--\x3e");t("<template");t('"');t(' data-dgst="');t(' data-msg="');t(' data-stck="');t("></template>");t('<div hidden id="');t('">');t("</div>");t('<svg aria-hidden="true" style="display:none" id="');t('">');t("</svg>");t('<math aria-hidden="true" style="display:none" id="'); +e):(e.set(b.subarray(0,c),m),m+=c,p(a,e),b=b.subarray(c)),e=new Uint8Array(2048),m=0),e.set(b,m),m+=b.byteLength,2048===m&&(p(a,e),e=new Uint8Array(2048),m=0)));return n}var r=new aa.TextEncoder;function t(a){return r.encode(a)}var u=JSON.stringify;function v(a,b,c){a=u(c);return b.toString(16)+":"+a+"\n"} +var w=Symbol.for("react.client.reference"),x=Symbol.for("react.element"),ia=Symbol.for("react.fragment"),ja=Symbol.for("react.provider"),ka=Symbol.for("react.server_context"),la=Symbol.for("react.forward_ref"),ma=Symbol.for("react.suspense"),na=Symbol.for("react.suspense_list"),oa=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),pa=Symbol.for("react.default_value"),qa=Symbol.for("react.memo_cache_sentinel"); +function A(a,b,c,d,f,g,h){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=f;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=g;this.removeEmptyString=h}"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){new A(a,0,!1,a,null,!1,!1)}); +[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){new A(a[0],1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){new A(a,2,!1,a.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){new A(a,2,!1,a,null,!1,!1)}); +"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){new A(a,3,!1,a.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(a){new A(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){new A(a,4,!1,a,null,!1,!1)}); +["cols","rows","size","span"].forEach(function(a){new A(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){new A(a,5,!1,a.toLowerCase(),null,!1,!1)});var B=/[\-:]([a-z])/g;function C(a){return a[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 transform-origin 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".split(" ").forEach(function(a){var b=a.replace(B, +C);new A(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(B,C);new A(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(B,C);new A(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){new A(a,1,!1,a.toLowerCase(),null,!1,!1)}); +new A("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){new A(a,1,!1,a.toLowerCase(),null,!0,!0)}); +var D={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0, +fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ra=["Webkit","ms","Moz","O"];Object.keys(D).forEach(function(a){ra.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);D[b]=D[a]})});var sa=Array.isArray;t('"></template>');t("<script>");t("\x3c/script>");t('<script src="');t('<script type="module" src="');t('" integrity="');t('" async="">\x3c/script>');t("\x3c!-- --\x3e");t(' style="');t(":");t(";"); +t(" ");t('="');t('"');t('=""');t(">");t("/>");t(' selected=""');t("\n");t("<!DOCTYPE html>");t("</");t(">");t('<template id="');t('"></template>');t("\x3c!--$--\x3e");t('\x3c!--$?--\x3e<template id="');t('"></template>');t("\x3c!--$!--\x3e");t("\x3c!--/$--\x3e");t("<template");t('"');t(' data-dgst="');t(' data-msg="');t(' data-stck="');t("></template>");t('<div hidden id="');t('">');t("</div>");t('<svg aria-hidden="true" style="display:none" id="');t('">');t("</svg>");t('<math aria-hidden="true" style="display:none" id="'); t('">');t("</math>");t('<table hidden id="');t('">');t("</table>");t('<table hidden><tbody id="');t('">');t("</tbody></table>");t('<table hidden><tr id="');t('">');t("</tr></table>");t('<table hidden><colgroup id="');t('">');t("</colgroup></table>");t('$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};;$RS("');t('$RS("');t('","');t('")\x3c/script>');t('<template data-rsi="" data-sid="'); -t('" data-pid="');t('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RC("'); -t('$RC("');t('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RM=new Map;\n$RR=function(p,q,w){function r(l){this.s=l}for(var t=$RC,m=$RM,u=new Map,n=new Map,g=document,h,e,f=g.querySelectorAll("template[data-precedence]"),c=0;e=f[c++];){for(var b=e.content.firstChild;b;b=b.nextSibling)u.set(b.getAttribute("data-href"),b);e.parentNode.removeChild(e)}f=g.querySelectorAll("link[data-precedence],style[data-precedence]");for(c=0;e=f[c++];)m.set(e.getAttribute("STYLE"===e.nodeName?"data-href":"href"),e),n.set(e.dataset.precedence,h=e);e=0;f=[];for(var d,\nv,a;d=w[e++];){var k=0;b=d[k++];if(!(a=m.get(b))){if(a=u.get(b))c=a.getAttribute("data-precedence");else{a=g.createElement("link");a.href=b;a.rel="stylesheet";for(a.dataset.precedence=c=d[k++];v=d[k++];)a.setAttribute(v,d[k++]);d=a._p=new Promise(function(l,x){a.onload=l;a.onerror=x});d.then(r.bind(d,"l"),r.bind(d,"e"))}m.set(b,a);b=n.get(c)||h;b===h&&(h=a);n.set(c,a);b?b.parentNode.insertBefore(a,b.nextSibling):(c=g.head,c.insertBefore(a,c.firstChild))}d=a._p;c=a.getAttribute("media");!d||"l"===\nd.s||c&&!matchMedia(c).matches||f.push(d)}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};$RR("'); -t('$RM=new Map;\n$RR=function(p,q,w){function r(l){this.s=l}for(var t=$RC,m=$RM,u=new Map,n=new Map,g=document,h,e,f=g.querySelectorAll("template[data-precedence]"),c=0;e=f[c++];){for(var b=e.content.firstChild;b;b=b.nextSibling)u.set(b.getAttribute("data-href"),b);e.parentNode.removeChild(e)}f=g.querySelectorAll("link[data-precedence],style[data-precedence]");for(c=0;e=f[c++];)m.set(e.getAttribute("STYLE"===e.nodeName?"data-href":"href"),e),n.set(e.dataset.precedence,h=e);e=0;f=[];for(var d,\nv,a;d=w[e++];){var k=0;b=d[k++];if(!(a=m.get(b))){if(a=u.get(b))c=a.getAttribute("data-precedence");else{a=g.createElement("link");a.href=b;a.rel="stylesheet";for(a.dataset.precedence=c=d[k++];v=d[k++];)a.setAttribute(v,d[k++]);d=a._p=new Promise(function(l,x){a.onload=l;a.onerror=x});d.then(r.bind(d,"l"),r.bind(d,"e"))}m.set(b,a);b=n.get(c)||h;b===h&&(h=a);n.set(c,a);b?b.parentNode.insertBefore(a,b.nextSibling):(c=g.head,c.insertBefore(a,c.firstChild))}d=a._p;c=a.getAttribute("media");!d||"l"===\nd.s||c&&!matchMedia(c).matches||f.push(d)}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};$RR("'); -t('$RR("');t('","');t('",');t('"');t(")\x3c/script>");t('<template data-rci="" data-bid="');t('<template data-rri="" data-bid="');t('" data-sid="');t('" data-sty="');t('$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};;$RX("');t('$RX("');t('"');t(",");t(")\x3c/script>");t('<template data-rxi="" data-bid="');t('" data-dgst="');t('" data-msg="');t('" data-stck="');t('<template data-precedence="">'); -t("</template>");t('<style data-precedence="');t('"></style>');t("[");t(",[");t(",");t("]");var F=null;function H(a,b){if(a!==b){a.context._currentValue=a.parentValue;a=a.parent;var c=b.parent;if(null===a){if(null!==c)throw Error("The stacks must reach the root at the same time. This is a bug in React.");}else{if(null===c)throw Error("The stacks must reach the root at the same time. This is a bug in React.");H(a,c);b.context._currentValue=b.value}}} -function ta(a){a.context._currentValue=a.parentValue;a=a.parent;null!==a&&ta(a)}function ua(a){var b=a.parent;null!==b&&ua(b);a.context._currentValue=a.value}function va(a,b){a.context._currentValue=a.parentValue;a=a.parent;if(null===a)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===b.depth?H(a,b):va(a,b)} -function wa(a,b){var c=b.parent;if(null===c)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===c.depth?H(a,c):wa(a,c);b.context._currentValue=b.value}function I(a){var b=F;b!==a&&(null===b?ua(a):null===a?ta(b):b.depth===a.depth?H(b,a):b.depth>a.depth?va(b,a):wa(b,a),F=a)}function xa(a,b){var c=a._currentValue;a._currentValue=b;var d=F;return F=a={parent:d,depth:null===d?0:d.depth+1,context:a,parentValue:c,value:b}}var J=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`"); +t('" data-pid="');t('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};;$RC("'); +t('$RC("');t('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};;$RM=new Map;\n$RR=function(p,q,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};;$RR("'); +t('$RM=new Map;\n$RR=function(p,q,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};;$RR("'); +t('$RR("');t('","');t('",');t('"');t(")\x3c/script>");t('<template data-rci="" data-bid="');t('<template data-rri="" data-bid="');t('" data-sid="');t('" data-sty="');t('$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};;$RX("');t('$RX("');t('"');t(",");t(")\x3c/script>");t('<template data-rxi="" data-bid="');t('" data-dgst="');t('" data-msg="');t('" data-stck="');t('<style data-precedence="'); +t('"></style>');t("[");t(",[");t(",");t("]");var E=null;function H(a,b){if(a!==b){a.context._currentValue=a.parentValue;a=a.parent;var c=b.parent;if(null===a){if(null!==c)throw Error("The stacks must reach the root at the same time. This is a bug in React.");}else{if(null===c)throw Error("The stacks must reach the root at the same time. This is a bug in React.");H(a,c);b.context._currentValue=b.value}}}function ta(a){a.context._currentValue=a.parentValue;a=a.parent;null!==a&&ta(a)} +function ua(a){var b=a.parent;null!==b&&ua(b);a.context._currentValue=a.value}function va(a,b){a.context._currentValue=a.parentValue;a=a.parent;if(null===a)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===b.depth?H(a,b):va(a,b)} +function wa(a,b){var c=b.parent;if(null===c)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===c.depth?H(a,c):wa(a,c);b.context._currentValue=b.value}function I(a){var b=E;b!==a&&(null===b?ua(a):null===a?ta(b):b.depth===a.depth?H(b,a):b.depth>a.depth?va(b,a):wa(b,a),E=a)}function xa(a,b){var c=a._currentValue;a._currentValue=b;var d=E;return E=a={parent:d,depth:null===d?0:d.depth+1,context:a,parentValue:c,value:b}}var J=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`"); function ya(){}function za(a,b,c){c=a[c];void 0===c?a.push(b):c!==b&&(b.then(ya,ya),b=c);switch(b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;default:if("string"!==typeof b.status)switch(a=b,a.status="pending",a.then(function(a){if("pending"===b.status){var c=b;c.status="fulfilled";c.value=a}},function(a){if("pending"===b.status){var c=b;c.status="rejected";c.reason=a}}),b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;}K=b;throw J;}}var K=null; -function Aa(){if(null===K)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var a=K;K=null;return a}var L=null,M=0,O=null;function Ba(){var a=O;O=null;return a}function Ca(a){return a._currentValue} -var Ga={useMemo:function(a){return a()},useCallback:function(a){return a},useDebugValue:function(){},useDeferredValue:P,useTransition:P,readContext:Ca,useContext:Ca,useReducer:P,useRef:P,useState:P,useInsertionEffect:P,useLayoutEffect:P,useImperativeHandle:P,useEffect:P,useId:Da,useMutableSource:P,useSyncExternalStore:P,useCacheRefresh:function(){return Ea},useMemoCache:function(a){for(var b=Array(a),c=0;c<a;c++)b[c]=qa;return b},use:Fa}; -function P(){throw Error("This Hook is not supported in Server Components.");}function Ea(){throw Error("Refreshing the cache is not supported in Server Components.");}function Da(){if(null===L)throw Error("useId can only be used while React is rendering");var a=L.identifierCount++;return":"+L.identifierPrefix+"S"+a.toString(32)+":"} -function Fa(a){if(null!==a&&"object"===typeof a||"function"===typeof a){if("function"===typeof a.then){var b=M;M+=1;null===O&&(O=[]);return za(O,a,b)}if(a.$$typeof===ka)return a._currentValue}throw Error("An unsupported type was passed to use(): "+String(a));}function Q(){return(new AbortController).signal}function Ha(){if(R)return R;var a=da.getStore();return a?a:new Map} -var Ia={getCacheSignal:function(){var a=Ha(),b=a.get(Q);void 0===b&&(b=Q(),a.set(Q,b));return b},getCacheForType:function(a){var b=Ha(),c=b.get(a);void 0===c&&(c=a(),b.set(a,c));return c}},R=null,S=ca.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,T=S.ContextRegistry,U=S.ReactCurrentDispatcher,Ja=S.ReactCurrentCache;function Ka(a){console.error(a)} -function La(a,b,c,d,f){if(null!==Ja.current&&Ja.current!==Ia)throw Error("Currently React only supports one RSC renderer at a time.");Ja.current=Ia;var g=new Set,h=[],k={status:0,fatalError:null,destination:null,bundlerConfig:b,cache:new Map,nextChunkId:0,pendingChunks:0,abortableTasks:g,pingedTasks:h,completedImportChunks:[],completedJSONChunks:[],completedErrorChunks:[],writtenSymbols:new Map,writtenClientReferences:new Map,writtenServerReferences:new Map,writtenProviders:new Map,identifierPrefix:f|| -"",identifierCount:1,onError:void 0===c?Ka:c,toJSON:function(a,b){return Ma(k,this,a,b)}};k.pendingChunks++;b=Na(d);a=Oa(k,a,b,g);h.push(a);return k}var Pa={}; -function Qa(a,b){a.pendingChunks++;var c=Oa(a,null,F,a.abortableTasks);switch(b.status){case "fulfilled":return c.model=b.value,Ra(a,c),c.id;case "rejected":var d=V(a,b.reason);W(a,c.id,d);return c.id;default:"string"!==typeof b.status&&(b.status="pending",b.then(function(a){"pending"===b.status&&(b.status="fulfilled",b.value=a)},function(a){"pending"===b.status&&(b.status="rejected",b.reason=a)}))}b.then(function(b){c.model=b;Ra(a,c)},function(b){b=V(a,b);W(a,c.id,b)});return c.id} -function Sa(a){if("fulfilled"===a.status)return a.value;if("rejected"===a.status)throw a.reason;throw a;}function Ta(a){switch(a.status){case "fulfilled":case "rejected":break;default:"string"!==typeof a.status&&(a.status="pending",a.then(function(b){"pending"===a.status&&(a.status="fulfilled",a.value=b)},function(b){"pending"===a.status&&(a.status="rejected",a.reason=b)}))}return{$$typeof:A,_payload:a,_init:Sa}} -function X(a,b,c,d,f,g){if(null!==d&&void 0!==d)throw Error("Refs cannot be used in Server Components, nor passed to Client Components.");if("function"===typeof b){if(b.$$typeof===w)return[y,b,c,f];M=0;O=g;f=b(f);return"object"===typeof f&&null!==f&&"function"===typeof f.then?"fulfilled"===f.status?f.value:Ta(f):f}if("string"===typeof b)return[y,b,c,f];if("symbol"===typeof b)return b===ia?f.children:[y,b,c,f];if(null!=b&&"object"===typeof b){if(b.$$typeof===w)return[y,b,c,f];switch(b.$$typeof){case A:var h= -b._init;b=h(b._payload);return X(a,b,c,d,f,g);case la:return a=b.render,M=0,O=g,a(f,void 0);case oa:return X(a,b.type,c,d,f,g);case ja:return xa(b._context,f.value),[y,b,c,{value:f.value,children:f.children,__pop:Pa}]}}throw Error("Unsupported Server Component type: "+Ua(b));}function Ra(a,b){var c=a.pingedTasks;c.push(b);1===c.length&&setImmediate(function(){return Va(a)})} +function Aa(){if(null===K)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var a=K;K=null;return a}var L=null,M=0,N=null;function Ba(){var a=N;N=null;return a}function Ca(a){return a._currentValue} +var Ha={useMemo:function(a){return a()},useCallback:function(a){return a},useDebugValue:function(){},useDeferredValue:O,useTransition:O,readContext:Ca,useContext:Ca,useReducer:O,useRef:O,useState:O,useInsertionEffect:O,useLayoutEffect:O,useImperativeHandle:O,useEffect:O,useId:Da,useMutableSource:O,useSyncExternalStore:O,useCacheRefresh:function(){return Ea},useMemoCache:function(a){for(var b=Array(a),c=0;c<a;c++)b[c]=qa;return b},use:Ga}; +function O(){throw Error("This Hook is not supported in Server Components.");}function Ea(){throw Error("Refreshing the cache is not supported in Server Components.");}function Da(){if(null===L)throw Error("useId can only be used while React is rendering");var a=L.identifierCount++;return":"+L.identifierPrefix+"S"+a.toString(32)+":"} +function Ga(a){if(null!==a&&"object"===typeof a||"function"===typeof a){if("function"===typeof a.then){var b=M;M+=1;null===N&&(N=[]);return za(N,a,b)}if(a.$$typeof===ka)return a._currentValue}throw Error("An unsupported type was passed to use(): "+String(a));}function P(){return(new AbortController).signal}function Ia(){if(Q)return Q;var a=ha.getStore();return a?a:new Map} +var Ja={getCacheSignal:function(){var a=Ia(),b=a.get(P);void 0===b&&(b=P(),a.set(P,b));return b},getCacheForType:function(a){var b=Ia(),c=b.get(a);void 0===c&&(c=a(),b.set(a,c));return c}},Q=null,R=ca.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,S=R.ContextRegistry,T=R.ReactCurrentDispatcher,U=R.ReactCurrentCache;function Ka(a){console.error(a)} +function La(a,b,c,d,f){if(null!==U.current&&U.current!==Ja)throw Error("Currently React only supports one RSC renderer at a time.");U.current=Ja;var g=new Set,h=[],k={status:0,fatalError:null,destination:null,bundlerConfig:b,cache:new Map,nextChunkId:0,pendingChunks:0,abortableTasks:g,pingedTasks:h,completedModuleChunks:[],completedJSONChunks:[],completedErrorChunks:[],writtenSymbols:new Map,writtenModules:new Map,writtenProviders:new Map,identifierPrefix:f||"",identifierCount:1,onError:void 0=== +c?Ka:c,toJSON:function(a,b){return Ma(k,this,a,b)}};k.pendingChunks++;b=Na(d);a=Oa(k,a,b,g);h.push(a);return k}var Pa={}; +function Qa(a,b){a.pendingChunks++;var c=Oa(a,null,E,a.abortableTasks);switch(b.status){case "fulfilled":return c.model=b.value,Ra(a,c),c.id;case "rejected":var d=V(a,b.reason);W(a,c.id,d);return c.id;default:"string"!==typeof b.status&&(b.status="pending",b.then(function(a){"pending"===b.status&&(b.status="fulfilled",b.value=a)},function(a){"pending"===b.status&&(b.status="rejected",b.reason=a)}))}b.then(function(b){c.model=b;Ra(a,c)},function(b){b=V(a,b);W(a,c.id,b)});return c.id} +function Sa(a){if("fulfilled"===a.status)return a.value;if("rejected"===a.status)throw a.reason;throw a;}function Ta(a){switch(a.status){case "fulfilled":case "rejected":break;default:"string"!==typeof a.status&&(a.status="pending",a.then(function(b){"pending"===a.status&&(a.status="fulfilled",a.value=b)},function(b){"pending"===a.status&&(a.status="rejected",a.reason=b)}))}return{$$typeof:z,_payload:a,_init:Sa}} +function X(a,b,c,d,f,g){if(null!==d&&void 0!==d)throw Error("Refs cannot be used in Server Components, nor passed to Client Components.");if("function"===typeof b){if(b.$$typeof===w)return[x,b,c,f];M=0;N=g;f=b(f);return"object"===typeof f&&null!==f&&"function"===typeof f.then?"fulfilled"===f.status?f.value:Ta(f):f}if("string"===typeof b)return[x,b,c,f];if("symbol"===typeof b)return b===ia?f.children:[x,b,c,f];if(null!=b&&"object"===typeof b){if(b.$$typeof===w)return[x,b,c,f];switch(b.$$typeof){case z:var h= +b._init;b=h(b._payload);return X(a,b,c,d,f,g);case la:return a=b.render,M=0,N=g,a(f,void 0);case oa:return X(a,b.type,c,d,f,g);case ja:return xa(b._context,f.value),[x,b,c,{value:f.value,children:f.children,__pop:Pa}]}}throw Error("Unsupported Server Component type: "+Ua(b));}function Ra(a,b){var c=a.pingedTasks;c.push(b);1===c.length&&setImmediate(function(){return Va(a)})} function Oa(a,b,c,d){var f={id:a.nextChunkId++,status:0,model:b,context:c,ping:function(){return Ra(a,f)},thenableState:null};d.add(f);return f} -function Wa(a,b,c,d){var f=d.filepath+"#"+d.name+(d.async?"#async":""),g=a.writtenClientReferences,h=g.get(f);if(void 0!==h)return b[0]===y&&"1"===c?"$L"+h.toString(16):"$"+h.toString(16);try{var k=a.bundlerConfig[d.filepath][d.name];var l=d.async?{id:k.id,chunks:k.chunks,name:k.name,async:!0}:k;a.pendingChunks++;var z=a.nextChunkId++,ea=u(l);var x=z.toString(16)+":I"+ea+"\n";a.completedImportChunks.push(x);g.set(f,z);return b[0]===y&&"1"===c?"$L"+z.toString(16):"$"+z.toString(16)}catch(N){return a.pendingChunks++, -b=a.nextChunkId++,c=V(a,N),W(a,b,c),"$"+b.toString(16)}}function Xa(a){return Object.prototype.toString.call(a).replace(/^\[object (.*)\]$/,function(a,c){return c})}function Ua(a){switch(typeof a){case "string":return JSON.stringify(10>=a.length?a:a.substr(0,10)+"...");case "object":if(sa(a))return"[...]";a=Xa(a);return"Object"===a?"{...}":a;case "function":return"function";default:return String(a)}} -function Y(a){if("string"===typeof a)return a;switch(a){case ma:return"Suspense";case na:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case la:return Y(a.render);case oa:return Y(a.type);case A:var b=a._payload;a=a._init;try{return Y(a(b))}catch(c){}}return""} -function Z(a,b){var c=Xa(a);if("Object"!==c&&"Array"!==c)return c;c=-1;var d=0;if(sa(a)){var f="[";for(var g=0;g<a.length;g++){0<g&&(f+=", ");var h=a[g];h="object"===typeof h&&null!==h?Z(h):Ua(h);""+g===b?(c=f.length,d=h.length,f+=h):f=10>h.length&&40>f.length+h.length?f+h:f+"..."}f+="]"}else if(a.$$typeof===y)f="<"+Y(a.type)+"/>";else{f="{";g=Object.keys(a);for(h=0;h<g.length;h++){0<h&&(f+=", ");var k=g[h],l=JSON.stringify(k);f+=('"'+k+'"'===l?k:l)+": ";l=a[k];l="object"===typeof l&&null!==l?Z(l): +function Wa(a,b,c,d){var f=d.filepath+"#"+d.name+(d.async?"#async":""),g=a.writtenModules,h=g.get(f);if(void 0!==h)return b[0]===x&&"1"===c?"$L"+h.toString(16):"$"+h.toString(16);try{var k=a.bundlerConfig[d.filepath][d.name];var l=d.async?{id:k.id,chunks:k.chunks,name:k.name,async:!0}:k;a.pendingChunks++;var y=a.nextChunkId++,da=u(l);var ea=y.toString(16)+":I"+da+"\n";a.completedModuleChunks.push(ea);g.set(f,y);return b[0]===x&&"1"===c?"$L"+y.toString(16):"$"+y.toString(16)}catch(fa){return a.pendingChunks++, +b=a.nextChunkId++,c=V(a,fa),W(a,b,c),"$"+b.toString(16)}}function Xa(a){return Object.prototype.toString.call(a).replace(/^\[object (.*)\]$/,function(a,c){return c})}function Ua(a){switch(typeof a){case "string":return JSON.stringify(10>=a.length?a:a.substr(0,10)+"...");case "object":if(sa(a))return"[...]";a=Xa(a);return"Object"===a?"{...}":a;case "function":return"function";default:return String(a)}} +function Y(a){if("string"===typeof a)return a;switch(a){case ma:return"Suspense";case na:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case la:return Y(a.render);case oa:return Y(a.type);case z:var b=a._payload;a=a._init;try{return Y(a(b))}catch(c){}}return""} +function Z(a,b){var c=Xa(a);if("Object"!==c&&"Array"!==c)return c;c=-1;var d=0;if(sa(a)){var f="[";for(var g=0;g<a.length;g++){0<g&&(f+=", ");var h=a[g];h="object"===typeof h&&null!==h?Z(h):Ua(h);""+g===b?(c=f.length,d=h.length,f+=h):f=10>h.length&&40>f.length+h.length?f+h:f+"..."}f+="]"}else if(a.$$typeof===x)f="<"+Y(a.type)+"/>";else{f="{";g=Object.keys(a);for(h=0;h<g.length;h++){0<h&&(f+=", ");var k=g[h],l=JSON.stringify(k);f+=('"'+k+'"'===l?k:l)+": ";l=a[k];l="object"===typeof l&&null!==l?Z(l): Ua(l);k===b?(c=f.length,d=l.length,f+=l):f=10>l.length&&40>f.length+l.length?f+l:f+"..."}f+="}"}return void 0===b?f:-1<c&&0<d?(a=" ".repeat(c)+"^".repeat(d),"\n "+f+"\n "+a):"\n "+f} -function Ma(a,b,c,d){switch(d){case y:return"$"}for(;"object"===typeof d&&null!==d&&(d.$$typeof===y||d.$$typeof===A);)try{switch(d.$$typeof){case y:var f=d;d=X(a,f.type,f.key,f.ref,f.props,null);break;case A:var g=d._init;d=g(d._payload)}}catch(h){c=h===J?Aa():h;if("object"===typeof c&&null!==c&&"function"===typeof c.then)return a.pendingChunks++,a=Oa(a,d,F,a.abortableTasks),d=a.ping,c.then(d,d),a.thenableState=Ba(),"$L"+a.id.toString(16);a.pendingChunks++;d=a.nextChunkId++;c=V(a,c);W(a,d,c);return"$L"+ -d.toString(16)}if(null===d)return null;if("object"===typeof d){if(d.$$typeof===w)return Wa(a,b,c,d);if("function"===typeof d.then)return"$@"+Qa(a,d).toString(16);if(d.$$typeof===ja)return d=d._context._globalName,b=a.writtenProviders,c=b.get(c),void 0===c&&(a.pendingChunks++,c=a.nextChunkId++,b.set(d,c),d=v(a,c,"$P"+d),a.completedJSONChunks.push(d)),"$"+c.toString(16);if(d===Pa){a=F;if(null===a)throw Error("Tried to pop a Context at the root of the app. This is a bug in React.");d=a.parentValue;a.context._currentValue= -d===pa?a.context._defaultValue:d;F=a.parent;return}return d}if("string"===typeof d)return a="$"===d[0]?"$"+d:d,a;if("boolean"===typeof d||"number"===typeof d||"undefined"===typeof d)return d;if("function"===typeof d){if(d.$$typeof===w)return Wa(a,b,c,d);if(d.$$typeof===ha)return c=a.writtenServerReferences,b=c.get(d),void 0!==b?a="$F"+b.toString(16):(f={id:d.$$filepath,name:d.$$name,bound:Promise.resolve(d.$$bound)},a.pendingChunks++,b=a.nextChunkId++,f=fa(a,b,f),a.completedJSONChunks.push(f),c.set(d, -b),a="$F"+b.toString(16)),a;if(/^on[A-Z]/.test(c))throw Error("Event handlers cannot be passed to Client Component props."+Z(b,c)+"\nIf you need interactivity, consider converting part of this to a Client Component.");throw Error('Functions cannot be passed directly to Client Components unless you explicitly expose it by marking it with "use server".'+Z(b,c));}if("symbol"===typeof d){f=a.writtenSymbols;g=f.get(d);if(void 0!==g)return"$"+g.toString(16);g=d.description;if(Symbol.for(g)!==d)throw Error("Only global symbols received from Symbol.for(...) can be passed to Client Components. The symbol Symbol.for("+ -(d.description+") cannot be found among global symbols.")+Z(b,c));a.pendingChunks++;c=a.nextChunkId++;b=v(a,c,"$S"+g);a.completedImportChunks.push(b);f.set(d,c);return"$"+c.toString(16)}if("bigint"===typeof d)throw Error("BigInt ("+d+") is not yet supported in Client Component props."+Z(b,c));throw Error("Type "+typeof d+" is not supported in Client Component props."+Z(b,c));} -function V(a,b){a=a.onError;b=a(b);if(null!=b&&"string"!==typeof b)throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof b+'" instead');return b||""}function Ya(a,b){null!==a.destination?(a.status=2,a.destination.destroy(b)):(a.status=1,a.fatalError=b)} -function W(a,b,c){c={digest:c};b=b.toString(16)+":E"+u(c)+"\n";a.completedErrorChunks.push(b)} -function Va(a){var b=U.current,c=R;U.current=Ga;R=a.cache;L=a;try{var d=a.pingedTasks;a.pingedTasks=[];for(var f=0;f<d.length;f++){var g=d[f];var h=a;if(0===g.status){I(g.context);try{var k=g.model;if("object"===typeof k&&null!==k&&k.$$typeof===y){var l=k,z=g.thenableState;g.model=k;k=X(h,l.type,l.key,l.ref,l.props,z);for(g.thenableState=null;"object"===typeof k&&null!==k&&k.$$typeof===y;)l=k,g.model=k,k=X(h,l.type,l.key,l.ref,l.props,null)}var ea=fa(h,g.id,k);h.completedJSONChunks.push(ea);h.abortableTasks.delete(g); -g.status=1}catch(G){var x=G===J?Aa():G;if("object"===typeof x&&null!==x&&"function"===typeof x.then){var N=g.ping;x.then(N,N);g.thenableState=Ba()}else{h.abortableTasks.delete(g);g.status=4;var ab=V(h,x);W(h,g.id,ab)}}}}null!==a.destination&&Za(a,a.destination)}catch(G){V(a,G),Ya(a,G)}finally{U.current=b,R=c,L=null}} -function Za(a,b){e=new Uint8Array(2048);m=0;n=!0;try{for(var c=a.completedImportChunks,d=0;d<c.length;d++)if(a.pendingChunks--,!q(b,c[d])){a.destination=null;d++;break}c.splice(0,d);var f=a.completedJSONChunks;for(d=0;d<f.length;d++)if(a.pendingChunks--,!q(b,f[d])){a.destination=null;d++;break}f.splice(0,d);var g=a.completedErrorChunks;for(d=0;d<g.length;d++)if(a.pendingChunks--,!q(b,g[d])){a.destination=null;d++;break}g.splice(0,d)}finally{e&&0<m&&b.write(e.subarray(0,m)),e=null,m=0,n=!0}"function"=== -typeof b.flush&&b.flush();0===a.pendingChunks&&b.end()}function $a(a){setImmediate(function(){return da.run(a.cache,Va,a)})}function bb(a,b){if(1===a.status)a.status=2,b.destroy(a.fatalError);else if(2!==a.status&&null===a.destination){a.destination=b;try{Za(a,b)}catch(c){V(a,c),Ya(a,c)}}} +function Ma(a,b,c,d){switch(d){case x:return"$"}for(;"object"===typeof d&&null!==d&&(d.$$typeof===x||d.$$typeof===z);)try{switch(d.$$typeof){case x:var f=d;d=X(a,f.type,f.key,f.ref,f.props,null);break;case z:var g=d._init;d=g(d._payload)}}catch(h){c=h===J?Aa():h;if("object"===typeof c&&null!==c&&"function"===typeof c.then)return a.pendingChunks++,a=Oa(a,d,E,a.abortableTasks),d=a.ping,c.then(d,d),a.thenableState=Ba(),"$L"+a.id.toString(16);a.pendingChunks++;d=a.nextChunkId++;c=V(a,c);W(a,d,c);return"$L"+ +d.toString(16)}if(null===d)return null;if("object"===typeof d){if(d.$$typeof===w)return Wa(a,b,c,d);if("function"===typeof d.then)return"$@"+Qa(a,d).toString(16);if(d.$$typeof===ja)return d=d._context._globalName,b=a.writtenProviders,c=b.get(c),void 0===c&&(a.pendingChunks++,c=a.nextChunkId++,b.set(d,c),d=v(a,c,"$P"+d),a.completedJSONChunks.push(d)),"$"+c.toString(16);if(d===Pa){a=E;if(null===a)throw Error("Tried to pop a Context at the root of the app. This is a bug in React.");d=a.parentValue;a.context._currentValue= +d===pa?a.context._defaultValue:d;E=a.parent;return}return d}if("string"===typeof d)return a="$"===d[0]?"$"+d:d,a;if("boolean"===typeof d||"number"===typeof d||"undefined"===typeof d)return d;if("function"===typeof d){if(d.$$typeof===w)return Wa(a,b,c,d);if(/^on[A-Z]/.test(c))throw Error("Event handlers cannot be passed to Client Component props."+Z(b,c)+"\nIf you need interactivity, consider converting part of this to a Client Component.");throw Error("Functions cannot be passed directly to Client Components because they're not serializable."+ +Z(b,c));}if("symbol"===typeof d){f=a.writtenSymbols;g=f.get(d);if(void 0!==g)return"$"+g.toString(16);g=d.description;if(Symbol.for(g)!==d)throw Error("Only global symbols received from Symbol.for(...) can be passed to Client Components. The symbol Symbol.for("+(d.description+") cannot be found among global symbols.")+Z(b,c));a.pendingChunks++;c=a.nextChunkId++;b=v(a,c,"$S"+g);a.completedModuleChunks.push(b);f.set(d,c);return"$"+c.toString(16)}if("bigint"===typeof d)throw Error("BigInt ("+d+") is not yet supported in Client Component props."+ +Z(b,c));throw Error("Type "+typeof d+" is not supported in Client Component props."+Z(b,c));}function V(a,b){a=a.onError;b=a(b);if(null!=b&&"string"!==typeof b)throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof b+'" instead');return b||""} +function Ya(a,b){null!==a.destination?(a.status=2,a.destination.destroy(b)):(a.status=1,a.fatalError=b)}function W(a,b,c){c={digest:c};b=b.toString(16)+":E"+u(c)+"\n";a.completedErrorChunks.push(b)} +function Va(a){var b=T.current,c=Q;T.current=Ha;Q=a.cache;L=a;try{var d=a.pingedTasks;a.pingedTasks=[];for(var f=0;f<d.length;f++){var g=d[f];var h=a;if(0===g.status){I(g.context);try{var k=g.model;if("object"===typeof k&&null!==k&&k.$$typeof===x){var l=k,y=g.thenableState;g.model=k;k=X(h,l.type,l.key,l.ref,l.props,y);for(g.thenableState=null;"object"===typeof k&&null!==k&&k.$$typeof===x;)l=k,g.model=k,k=X(h,l.type,l.key,l.ref,l.props,null)}var da=g.id,ea=u(k,h.toJSON);var fa=da.toString(16)+":"+ +ea+"\n";h.completedJSONChunks.push(fa);h.abortableTasks.delete(g);g.status=1}catch(F){var G=F===J?Aa():F;if("object"===typeof G&&null!==G&&"function"===typeof G.then){var Fa=g.ping;G.then(Fa,Fa);g.thenableState=Ba()}else{h.abortableTasks.delete(g);g.status=4;var ab=V(h,G);W(h,g.id,ab)}}}}null!==a.destination&&Za(a,a.destination)}catch(F){V(a,F),Ya(a,F)}finally{T.current=b,Q=c,L=null}} +function Za(a,b){e=new Uint8Array(2048);m=0;n=!0;try{for(var c=a.completedModuleChunks,d=0;d<c.length;d++)if(a.pendingChunks--,!q(b,c[d])){a.destination=null;d++;break}c.splice(0,d);var f=a.completedJSONChunks;for(d=0;d<f.length;d++)if(a.pendingChunks--,!q(b,f[d])){a.destination=null;d++;break}f.splice(0,d);var g=a.completedErrorChunks;for(d=0;d<g.length;d++)if(a.pendingChunks--,!q(b,g[d])){a.destination=null;d++;break}g.splice(0,d)}finally{e&&0<m&&b.write(e.subarray(0,m)),e=null,m=0,n=!0}"function"=== +typeof b.flush&&b.flush();0===a.pendingChunks&&b.end()}function $a(a){setImmediate(function(){return ha.run(a.cache,Va,a)})}function bb(a,b){if(1===a.status)a.status=2,b.destroy(a.fatalError);else if(2!==a.status&&null===a.destination){a.destination=b;try{Za(a,b)}catch(c){V(a,c),Ya(a,c)}}} function cb(a,b){try{var c=a.abortableTasks;if(0<c.size){var d=V(a,void 0===b?Error("The render was aborted by the server without a reason."):b);a.pendingChunks++;var f=a.nextChunkId++;W(a,f,d);c.forEach(function(b){b.status=3;var c="$"+f.toString(16);b=v(a,b.id,c);a.completedErrorChunks.push(b)});c.clear()}null!==a.destination&&Za(a,a.destination)}catch(g){V(a,g),Ya(a,g)}} -function Na(a){if(a){var b=F;I(null);for(var c=0;c<a.length;c++){var d=a[c],f=d[0];d=d[1];T[f]||(T[f]=ca.createServerContext(f,pa));xa(T[f],d)}a=F;I(b);return a}return null}function db(a,b){return function(){return bb(b,a)}} +function Na(a){if(a){var b=E;I(null);for(var c=0;c<a.length;c++){var d=a[c],f=d[0];d=d[1];S[f]||(S[f]=ca.createServerContext(f,pa));xa(S[f],d)}a=E;I(b);return a}return null}function db(a,b){return function(){return bb(b,a)}} exports.renderToPipeableStream=function(a,b,c){var d=La(a,b,c?c.onError:void 0,c?c.context:void 0,c?c.identifierPrefix:void 0),f=!1;$a(d);return{pipe:function(a){if(f)throw Error("React currently only supports piping to one writable stream.");f=!0;bb(d,a);a.on("drain",db(a,d));return a},abort:function(a){cb(d,a)}}}; diff --git a/packages/next/src/compiled/react-server-dom-webpack/client.js b/packages/next/src/compiled/react-server-dom-webpack/client.js index 89d93a7a7920f..b8e9a99ec5e80 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/client.js +++ b/packages/next/src/compiled/react-server-dom-webpack/client.js @@ -1,3 +1,7 @@ 'use strict'; -module.exports = require('./client.browser'); +if (process.env.NODE_ENV === 'production') { + module.exports = require('./cjs/react-server-dom-webpack-client.production.min.js'); +} else { + module.exports = require('./cjs/react-server-dom-webpack-client.development.js'); +} diff --git a/packages/next/src/compiled/react-server-dom-webpack/package.json b/packages/next/src/compiled/react-server-dom-webpack/package.json index 0be45387e7fa4..d9d006861f3b8 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/package.json +++ b/packages/next/src/compiled/react-server-dom-webpack/package.json @@ -1,7 +1,7 @@ { "name": "react-server-dom-webpack", "description": "React Server Components bindings for DOM using Webpack. This is intended to be integrated into meta-frameworks. It is not intended to be imported directly.", - "version": "18.3.0-next-4fcc9184a-20230217", + "version": "18.3.0-next-6ddcbd4f9-20230209", "keywords": [ "react" ], @@ -14,15 +14,10 @@ "index.js", "plugin.js", "client.js", - "client.browser.js", - "client.edge.js", - "client.node.js", - "client.node.unbundled.js", "server.js", "server.browser.js", "server.edge.js", "server.node.js", - "server.node.unbundled.js", "node-register.js", "cjs/", "umd/", @@ -31,31 +26,13 @@ "exports": { ".": "./index.js", "./plugin": "./plugin.js", - "./client": { - "workerd": "./client.edge.js", - "edge-light": "./client.edge.js", - "deno": "./client.edge.js", - "worker": "./client.edge.js", - "node": { - "webpack": "./client.node.js", - "default": "./client.node.unbundled.js" - }, - "browser": "./client.browser.js", - "default": "./client.browser.js" - }, - "./client.browser": "./client.browser.js", - "./client.edge": "./client.edge.js", - "./client.node": "./client.node.js", - "./client.node.unbundled": "./client.node.unbundled.js", + "./client": "./client.js", "./server": { "react-server": { - "workerd": "./server.edge.js", "edge-light": "./server.edge.js", + "workerd": "./server.edge.js", "deno": "./server.browser.js", - "node": { - "webpack": "./server.node.js", - "default": "./server.node.unbundled.js" - }, + "node": "./server.node.js", "browser": "./server.browser.js" }, "default": "./server.js" @@ -63,7 +40,6 @@ "./server.browser": "./server.browser.js", "./server.edge": "./server.edge.js", "./server.node": "./server.node.js", - "./server.node.unbundled": "./server.node.unbundled.js", "./node-loader": "./esm/react-server-dom-webpack-node-loader.js", "./node-register": "./node-register.js", "./package.json": "./package.json" @@ -78,8 +54,8 @@ "node": ">=0.10.0" }, "peerDependencies": { - "react": "18.3.0-next-4fcc9184a-20230217", - "react-dom": "18.3.0-next-4fcc9184a-20230217", + "react": "18.3.0-next-6ddcbd4f9-20230209", + "react-dom": "18.3.0-next-6ddcbd4f9-20230209", "webpack": "^5.59.0" }, "dependencies": { diff --git a/packages/next/src/compiled/react/cjs/react.development.js b/packages/next/src/compiled/react/cjs/react.development.js index 329af82471d7b..39079ac25f0a0 100644 --- a/packages/next/src/compiled/react/cjs/react.development.js +++ b/packages/next/src/compiled/react/cjs/react.development.js @@ -23,7 +23,7 @@ if ( ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); } - var ReactVersion = '18.3.0-next-4fcc9184a-20230217'; + var ReactVersion = '18.3.0-next-6ddcbd4f9-20230209'; // ATTENTION // When adding new symbols to this file, diff --git a/packages/next/src/compiled/react/cjs/react.production.min.js b/packages/next/src/compiled/react/cjs/react.production.min.js index 63798b4388b9f..8cef0698e3897 100644 --- a/packages/next/src/compiled/react/cjs/react.production.min.js +++ b/packages/next/src/compiled/react/cjs/react.production.min.js @@ -27,4 +27,4 @@ exports.createServerContext=function(a,b){var d=!0;if(!Z[a]){d=!1;var c={$$typeo exports.isValidElement=P;exports.lazy=function(a){return{$$typeof:z,_payload:{_status:-1,_result:a},_init:ba}};exports.memo=function(a,b){return{$$typeof:y,type:a,compare:void 0===b?null:b}};exports.startTransition=function(a){var b=X.transition;X.transition={};try{a()}finally{X.transition=b}};exports.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.");};exports.unstable_useCacheRefresh=function(){return W.current.useCacheRefresh()};exports.use=function(a){return W.current.use(a)}; exports.useCallback=function(a,b){return W.current.useCallback(a,b)};exports.useContext=function(a){return W.current.useContext(a)};exports.useDebugValue=function(){};exports.useDeferredValue=function(a){return W.current.useDeferredValue(a)};exports.useEffect=function(a,b){return W.current.useEffect(a,b)};exports.useId=function(){return W.current.useId()};exports.useImperativeHandle=function(a,b,d){return W.current.useImperativeHandle(a,b,d)}; exports.useInsertionEffect=function(a,b){return W.current.useInsertionEffect(a,b)};exports.useLayoutEffect=function(a,b){return W.current.useLayoutEffect(a,b)};exports.useMemo=function(a,b){return W.current.useMemo(a,b)};exports.useReducer=function(a,b,d){return W.current.useReducer(a,b,d)};exports.useRef=function(a){return W.current.useRef(a)};exports.useState=function(a){return W.current.useState(a)};exports.useSyncExternalStore=function(a,b,d){return W.current.useSyncExternalStore(a,b,d)}; -exports.useTransition=function(){return W.current.useTransition()};exports.version="18.3.0-next-4fcc9184a-20230217"; +exports.useTransition=function(){return W.current.useTransition()};exports.version="18.3.0-next-6ddcbd4f9-20230209"; diff --git a/packages/next/src/compiled/react/cjs/react.shared-subset.development.js b/packages/next/src/compiled/react/cjs/react.shared-subset.development.js index a6c6aa3cdd3bd..a95f73aeab47e 100644 --- a/packages/next/src/compiled/react/cjs/react.shared-subset.development.js +++ b/packages/next/src/compiled/react/cjs/react.shared-subset.development.js @@ -302,7 +302,7 @@ function generateCacheKey(request) { } } -var ReactVersion = '18.3.0-next-4fcc9184a-20230217'; +var ReactVersion = '18.3.0-next-6ddcbd4f9-20230209'; // ATTENTION // When adding new symbols to this file, diff --git a/packages/next/src/compiled/react/cjs/react.shared-subset.production.min.js b/packages/next/src/compiled/react/cjs/react.shared-subset.production.min.js index b635f405ad028..9a75f2847c58a 100644 --- a/packages/next/src/compiled/react/cjs/react.shared-subset.production.min.js +++ b/packages/next/src/compiled/react/cjs/react.shared-subset.production.min.js @@ -26,4 +26,4 @@ exports.cloneElement=function(a,b,d){if(null===a||void 0===a)throw Error(F(267,a key:e,ref:f,props:c,_owner:g}};exports.createElement=function(a,b,d){var c,e={},f=null,g=null;if(null!=b)for(c in void 0!==b.ref&&(g=b.ref),void 0!==b.key&&(f=""+b.key),b)N.call(b,c)&&!P.hasOwnProperty(c)&&(e[c]=b[c]);var h=arguments.length-2;if(1===h)e.children=d;else if(1<h){for(var k=Array(h),l=0;l<h;l++)k[l]=arguments[l+2];e.children=k}if(a&&a.defaultProps)for(c in h=a.defaultProps,h)void 0===e[c]&&(e[c]=h[c]);return{$$typeof:t,type:a,key:f,ref:g,props:e,_owner:O.current}};exports.createRef=function(){return{current:null}}; exports.createServerContext=function(a,b){var d=!0;if(!Z[a]){d=!1;var c={$$typeof:z,_currentValue:b,_currentValue2:b,_defaultValue:b,_threadCount:0,Provider:null,Consumer:null,_globalName:a};c.Provider={$$typeof:y,_context:c};Z[a]=c}c=Z[a];if(c._defaultValue===D)c._defaultValue=b,c._currentValue===D&&(c._currentValue=b),c._currentValue2===D&&(c._currentValue2=b);else if(d)throw Error(F(429,a));return c};exports.forwardRef=function(a){return{$$typeof:A,render:a}};exports.isValidElement=Q; exports.lazy=function(a){return{$$typeof:aa,_payload:{_status:-1,_result:a},_init:da}};exports.memo=function(a,b){return{$$typeof:C,type:a,compare:void 0===b?null:b}};exports.startTransition=function(a){var b=X.transition;X.transition={};try{a()}finally{X.transition=b}};exports.use=function(a){return W.current.use(a)};exports.useCallback=function(a,b){return W.current.useCallback(a,b)};exports.useContext=function(a){return W.current.useContext(a)};exports.useDebugValue=function(){}; -exports.useId=function(){return W.current.useId()};exports.useMemo=function(a,b){return W.current.useMemo(a,b)};exports.version="18.3.0-next-4fcc9184a-20230217"; +exports.useId=function(){return W.current.useId()};exports.useMemo=function(a,b){return W.current.useMemo(a,b)};exports.version="18.3.0-next-6ddcbd4f9-20230209"; diff --git a/packages/next/src/compiled/react/package.json b/packages/next/src/compiled/react/package.json index a3c2081ae55a1..91303f9cc1e8b 100644 --- a/packages/next/src/compiled/react/package.json +++ b/packages/next/src/compiled/react/package.json @@ -4,7 +4,7 @@ "keywords": [ "react" ], - "version": "18.3.0-next-4fcc9184a-20230217", + "version": "18.3.0-next-6ddcbd4f9-20230209", "homepage": "https://reactjs.org/", "bugs": "https://github.com/facebook/react/issues", "license": "MIT", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 15d4da385ea51..61cea7f3a1aee 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -150,11 +150,11 @@ importers: random-seed: 0.3.0 react: 18.2.0 react-17: npm:react@17.0.2 - react-builtin: npm:react@18.3.0-next-4fcc9184a-20230217 + react-builtin: npm:react@18.3.0-next-6ddcbd4f9-20230209 react-dom: 18.2.0 react-dom-17: npm:react-dom@17.0.2 - react-dom-builtin: npm:react-dom@18.3.0-next-4fcc9184a-20230217 - react-server-dom-webpack: 18.3.0-next-4fcc9184a-20230217 + react-dom-builtin: npm:react-dom@18.3.0-next-6ddcbd4f9-20230209 + react-server-dom-webpack: 18.3.0-next-6ddcbd4f9-20230209 react-ssr-prepass: 1.0.8 react-virtualized: 9.22.3 relay-compiler: 13.0.2 @@ -325,11 +325,11 @@ importers: random-seed: 0.3.0 react: 18.2.0 react-17: /react/17.0.2 - react-builtin: /react/18.3.0-next-4fcc9184a-20230217 + react-builtin: /react/18.3.0-next-6ddcbd4f9-20230209 react-dom: 18.2.0_react@18.2.0 react-dom-17: /react-dom/17.0.2_react@18.2.0 - react-dom-builtin: /react-dom/18.3.0-next-4fcc9184a-20230217_react@18.2.0 - react-server-dom-webpack: 18.3.0-next-4fcc9184a-20230217_4ifzx734of5j5ymg4ksx54vtqi + react-dom-builtin: /react-dom/18.3.0-next-6ddcbd4f9-20230209_react@18.2.0 + react-server-dom-webpack: 18.3.0-next-6ddcbd4f9-20230209_4ifzx734of5j5ymg4ksx54vtqi react-ssr-prepass: 1.0.8_qncsgtzehe3fgiqp6tr7lwq6fm react-virtualized: 9.22.3_biqbaboplfbrettd7655fr4n2y relay-compiler: 13.0.2 @@ -20319,14 +20319,14 @@ packages: react: 18.2.0 scheduler: 0.23.0 - /react-dom/18.3.0-next-4fcc9184a-20230217_react@18.2.0: - resolution: {integrity: sha512-3m8etgM4zWCkaC20sDMcEzoAW7Gholg2MkDNTiNK0BPQb9vStJkV9AUsMw5FUXTjnabmDrSuv02T464QnQMa2g==} + /react-dom/18.3.0-next-6ddcbd4f9-20230209_react@18.2.0: + resolution: {integrity: sha512-L6o2DvkQ243RcqFHEav2yYiw9bWEKZ1VbdyusrZ9or1ELShZfFHrZe4/tLnI9Wsadmba/8DinuuZNzBXVhXPgg==} peerDependencies: - react: 18.3.0-next-4fcc9184a-20230217 + react: 18.3.0-next-6ddcbd4f9-20230209 dependencies: loose-envify: 1.4.0 react: 18.2.0 - scheduler: 0.24.0-next-4fcc9184a-20230217 + scheduler: 0.24.0-next-6ddcbd4f9-20230209 dev: true /react-is/16.13.1: @@ -20349,12 +20349,12 @@ packages: engines: {node: '>=0.10.0'} dev: true - /react-server-dom-webpack/18.3.0-next-4fcc9184a-20230217_4ifzx734of5j5ymg4ksx54vtqi: - resolution: {integrity: sha512-sUI6sztAwjfSpLYpj8xf/Vv77T7CWbowXoV6z/PPFigo3E+AFCgQa8V9SUoYxSyvH1pYnNeMTAS4mvfX8wBa5w==} + /react-server-dom-webpack/18.3.0-next-6ddcbd4f9-20230209_4ifzx734of5j5ymg4ksx54vtqi: + resolution: {integrity: sha512-S9oHclrIFDsXhxjGRcDtudv8Y5C2CFGgmJqYo9OPo+e0BmOHum7LlP7zAmb+xGX+q0mk0OSKAns8yHRNKp6dXA==} engines: {node: '>=0.10.0'} peerDependencies: - react: 18.3.0-next-4fcc9184a-20230217 - react-dom: 18.3.0-next-4fcc9184a-20230217 + react: 18.3.0-next-6ddcbd4f9-20230209 + react-dom: 18.3.0-next-6ddcbd4f9-20230209 webpack: ^5.59.0 dependencies: acorn: 6.4.2 @@ -20405,8 +20405,8 @@ packages: dependencies: loose-envify: 1.4.0 - /react/18.3.0-next-4fcc9184a-20230217: - resolution: {integrity: sha512-kXl0R0+xWw25ri4W78V8kW3Nc1Nt4ltxnzNTQEDmOeJmI31gE+lCqCZ4SSJoMOWo/nkRdPh4Jm4bQ9SCVP8Fxg==} + /react/18.3.0-next-6ddcbd4f9-20230209: + resolution: {integrity: sha512-roGw+wu3DTA4KLNPkoKwgEVJNSbQhAzd6SmA0CaEGuS56mYro3eqaVhvOdV7r8SJ35PHnyrnAp6WkBcqha0bfg==} engines: {node: '>=0.10.0'} dependencies: loose-envify: 1.4.0 @@ -21459,8 +21459,8 @@ packages: dependencies: loose-envify: 1.4.0 - /scheduler/0.24.0-next-4fcc9184a-20230217: - resolution: {integrity: sha512-G7HfZAEL0hqrlmlt6BKvgZMNRSrPVkVdSiRDahuHm/LBw79NveD+uv/2NXpH/BWRqTbWv6nqCZpHu6uqkefpww==} + /scheduler/0.24.0-next-6ddcbd4f9-20230209: + resolution: {integrity: sha512-7N137hCqbrHmfJXrq1glb369dNu5RrujffqNMaBkIU5Y+oVvOm7XumsCWW7Yt96tFJp81uoRmUdsWz11tm5AZg==} dependencies: loose-envify: 1.4.0 dev: true