@planningcenter/topbar 11.0.1 → 11.0.2-qa-767.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -139,6 +139,4503 @@
139
139
  var classnamesExports = requireClassnames();
140
140
  var classnames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
141
141
 
142
+ var server_browser = {exports: {}};
143
+
144
+ var reactDomServer_browser_production_min = {};
145
+
146
+ /*
147
+ object-assign
148
+ (c) Sindre Sorhus
149
+ @license MIT
150
+ */
151
+
152
+ var objectAssign;
153
+ var hasRequiredObjectAssign;
154
+
155
+ function requireObjectAssign () {
156
+ if (hasRequiredObjectAssign) return objectAssign;
157
+ hasRequiredObjectAssign = 1;
158
+ /* eslint-disable no-unused-vars */
159
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
160
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
161
+ var propIsEnumerable = Object.prototype.propertyIsEnumerable;
162
+
163
+ function toObject(val) {
164
+ if (val === null || val === undefined) {
165
+ throw new TypeError('Object.assign cannot be called with null or undefined');
166
+ }
167
+
168
+ return Object(val);
169
+ }
170
+
171
+ function shouldUseNative() {
172
+ try {
173
+ if (!Object.assign) {
174
+ return false;
175
+ }
176
+
177
+ // Detect buggy property enumeration order in older V8 versions.
178
+
179
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4118
180
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
181
+ test1[5] = 'de';
182
+ if (Object.getOwnPropertyNames(test1)[0] === '5') {
183
+ return false;
184
+ }
185
+
186
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
187
+ var test2 = {};
188
+ for (var i = 0; i < 10; i++) {
189
+ test2['_' + String.fromCharCode(i)] = i;
190
+ }
191
+ var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
192
+ return test2[n];
193
+ });
194
+ if (order2.join('') !== '0123456789') {
195
+ return false;
196
+ }
197
+
198
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
199
+ var test3 = {};
200
+ 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
201
+ test3[letter] = letter;
202
+ });
203
+ if (Object.keys(Object.assign({}, test3)).join('') !==
204
+ 'abcdefghijklmnopqrst') {
205
+ return false;
206
+ }
207
+
208
+ return true;
209
+ } catch (err) {
210
+ // We don't expect any of the above to throw, but better to be safe.
211
+ return false;
212
+ }
213
+ }
214
+
215
+ objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
216
+ var from;
217
+ var to = toObject(target);
218
+ var symbols;
219
+
220
+ for (var s = 1; s < arguments.length; s++) {
221
+ from = Object(arguments[s]);
222
+
223
+ for (var key in from) {
224
+ if (hasOwnProperty.call(from, key)) {
225
+ to[key] = from[key];
226
+ }
227
+ }
228
+
229
+ if (getOwnPropertySymbols) {
230
+ symbols = getOwnPropertySymbols(from);
231
+ for (var i = 0; i < symbols.length; i++) {
232
+ if (propIsEnumerable.call(from, symbols[i])) {
233
+ to[symbols[i]] = from[symbols[i]];
234
+ }
235
+ }
236
+ }
237
+ }
238
+
239
+ return to;
240
+ };
241
+ return objectAssign;
242
+ }
243
+
244
+ /** @license React v17.0.2
245
+ * react-dom-server.browser.production.min.js
246
+ *
247
+ * Copyright (c) Facebook, Inc. and its affiliates.
248
+ *
249
+ * This source code is licensed under the MIT license found in the
250
+ * LICENSE file in the root directory of this source tree.
251
+ */
252
+
253
+ var hasRequiredReactDomServer_browser_production_min;
254
+
255
+ function requireReactDomServer_browser_production_min () {
256
+ if (hasRequiredReactDomServer_browser_production_min) return reactDomServer_browser_production_min;
257
+ hasRequiredReactDomServer_browser_production_min = 1;
258
+ var l=requireObjectAssign(),m=React;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."}
259
+ var q=60106,r=60107,u=60108,z=60114,B=60109,aa=60110,ba=60112,D=60113,ca=60120,da=60115,ea=60116,fa=60121,ha=60117,ia=60119,ja=60129,ka=60131;
260
+ if("function"===typeof Symbol&&Symbol.for){var E=Symbol.for;q=E("react.portal");r=E("react.fragment");u=E("react.strict_mode");z=E("react.profiler");B=E("react.provider");aa=E("react.context");ba=E("react.forward_ref");D=E("react.suspense");ca=E("react.suspense_list");da=E("react.memo");ea=E("react.lazy");fa=E("react.block");ha=E("react.fundamental");ia=E("react.scope");ja=E("react.debug_trace_mode");ka=E("react.legacy_hidden");}
261
+ function F(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 r:return "Fragment";case q:return "Portal";case z:return "Profiler";case u:return "StrictMode";case D:return "Suspense";case ca:return "SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case aa:return (a.displayName||"Context")+".Consumer";case B:return (a._context.displayName||"Context")+".Provider";case ba:var b=a.render;b=b.displayName||b.name||"";return a.displayName||
262
+ (""!==b?"ForwardRef("+b+")":"ForwardRef");case da:return F(a.type);case fa:return F(a._render);case ea:b=a._payload;a=a._init;try{return F(a(b))}catch(c){}}return null}var la=m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ma={};function I(a,b){for(var c=a._threadCount|0;c<=b;c++)a[c]=a._currentValue2,a._threadCount=c+1;}function na(a,b,c,d){if(d&&(d=a.contextType,"object"===typeof d&&null!==d))return I(d,c),d[c];if(a=a.contextTypes){c={};for(var f in a)c[f]=b[f];b=c;}else b=ma;return b}
263
+ for(var J=new Uint16Array(16),K=0;15>K;K++)J[K]=K+1;J[15]=0;var oa=/^[: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]*$/,pa=Object.prototype.hasOwnProperty,qa={},ra={};
264
+ function sa(a){if(pa.call(ra,a))return true;if(pa.call(qa,a))return false;if(oa.test(a))return ra[a]=true;qa[a]=true;return false}function ta(a,b,c,d){if(null!==c&&0===c.type)return false;switch(typeof b){case "function":case "symbol":return true;case "boolean":if(null!==c)return !c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return "data-"!==a&&"aria-"!==a;default:return false}}
265
+ function ua(a,b,c,d){if(null===b||"undefined"===typeof b||ta(a,b,c))return true;if(null!==c)switch(c.type){case 3:return !b;case 4:return false===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return false}function M(a,b,c,d,f,h,t){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=h;this.removeEmptyString=t;}var N={};
266
+ "children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){N[a]=new M(a,0,false,a,null,false,false);});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];N[b]=new M(b,1,false,a[1],null,false,false);});["contentEditable","draggable","spellCheck","value"].forEach(function(a){N[a]=new M(a,2,false,a.toLowerCase(),null,false,false);});
267
+ ["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){N[a]=new M(a,2,false,a,null,false,false);});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){N[a]=new M(a,3,false,a.toLowerCase(),null,false,false);});
268
+ ["checked","multiple","muted","selected"].forEach(function(a){N[a]=new M(a,3,true,a,null,false,false);});["capture","download"].forEach(function(a){N[a]=new M(a,4,false,a,null,false,false);});["cols","rows","size","span"].forEach(function(a){N[a]=new M(a,6,false,a,null,false,false);});["rowSpan","start"].forEach(function(a){N[a]=new M(a,5,false,a.toLowerCase(),null,false,false);});var va=/[\-:]([a-z])/g;function wa(a){return a[1].toUpperCase()}
269
+ "accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(va,
270
+ wa);N[b]=new M(b,1,false,a,null,false,false);});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(va,wa);N[b]=new M(b,1,false,a,"http://www.w3.org/1999/xlink",false,false);});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(va,wa);N[b]=new M(b,1,false,a,"http://www.w3.org/XML/1998/namespace",false,false);});["tabIndex","crossOrigin"].forEach(function(a){N[a]=new M(a,1,false,a.toLowerCase(),null,false,false);});
271
+ N.xlinkHref=new M("xlinkHref",1,false,"xlink:href","http://www.w3.org/1999/xlink",true,false);["src","href","action","formAction"].forEach(function(a){N[a]=new M(a,1,false,a.toLowerCase(),null,true,true);});var xa=/["'&<>]/;
272
+ function O(a){if("boolean"===typeof a||"number"===typeof a)return ""+a;a=""+a;var b=xa.exec(a);if(b){var c="",d,f=0;for(d=b.index;d<a.length;d++){switch(a.charCodeAt(d)){case 34:b="&quot;";break;case 38:b="&amp;";break;case 39:b="&#x27;";break;case 60:b="&lt;";break;case 62:b="&gt;";break;default:continue}f!==d&&(c+=a.substring(f,d));f=d+1;c+=b;}a=f!==d?c+a.substring(f,d):c;}return a}
273
+ function ya(a,b){var c=N.hasOwnProperty(a)?N[a]:null;var d;if(d="style"!==a)d=null!==c?0===c.type:!(2<a.length)||"o"!==a[0]&&"O"!==a[0]||"n"!==a[1]&&"N"!==a[1]?false:true;if(d||ua(a,b,c))return "";if(null!==c){a=c.attributeName;d=c.type;if(3===d||4===d&&true===b)return a+'=""';c.sanitizeURL&&(b=""+b);return a+'="'+(O(b)+'"')}return sa(a)?a+'="'+(O(b)+'"'):""}function za(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}
274
+ var Aa="function"===typeof Object.is?Object.is:za,P=null,Q=null,R=null,S=false,T=false,U=null,V=0;function W(){if(null===P)throw Error(p(321));return P}function Ba(){if(0<V)throw Error(p(312));return {memoizedState:null,queue:null,next:null}}function Ca(){null===R?null===Q?(S=false,Q=R=Ba()):(S=true,R=Q):null===R.next?(S=false,R=R.next=Ba()):(S=true,R=R.next);return R}function Da(a,b,c,d){for(;T;)T=false,V+=1,R=null,c=a(b,d);Ea();return c}function Ea(){P=null;T=false;Q=null;V=0;R=U=null;}
275
+ function Fa(a,b){return "function"===typeof b?b(a):b}function Ga(a,b,c){P=W();R=Ca();if(S){var d=R.queue;b=d.dispatch;if(null!==U&&(c=U.get(d),void 0!==c)){U.delete(d);d=R.memoizedState;do d=a(d,c.action),c=c.next;while(null!==c);R.memoizedState=d;return [d,b]}return [R.memoizedState,b]}a=a===Fa?"function"===typeof b?b():b:void 0!==c?c(b):b;R.memoizedState=a;a=R.queue={last:null,dispatch:null};a=a.dispatch=Ha.bind(null,P,a);return [R.memoizedState,a]}
276
+ function Ia(a,b){P=W();R=Ca();b=void 0===b?null:b;if(null!==R){var c=R.memoizedState;if(null!==c&&null!==b){var d=c[1];a:if(null===d)d=false;else {for(var f=0;f<d.length&&f<b.length;f++)if(!Aa(b[f],d[f])){d=false;break a}d=true;}if(d)return c[0]}}a=a();R.memoizedState=[a,b];return a}function Ha(a,b,c){if(!(25>V))throw Error(p(301));if(a===P)if(T=true,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 Ja(){}
277
+ var X=null,Ka={readContext:function(a){var b=X.threadID;I(a,b);return a[b]},useContext:function(a){W();var b=X.threadID;I(a,b);return a[b]},useMemo:Ia,useReducer:Ga,useRef:function(a){P=W();R=Ca();var b=R.memoizedState;return null===b?(a={current:a},R.memoizedState=a):b},useState:function(a){return Ga(Fa,a)},useLayoutEffect:function(){},useCallback:function(a,b){return Ia(function(){return a},b)},useImperativeHandle:Ja,useEffect:Ja,useDebugValue:Ja,useDeferredValue:function(a){W();return a},useTransition:function(){W();
278
+ return [function(a){a();},false]},useOpaqueIdentifier:function(){return (X.identifierPrefix||"")+"R:"+(X.uniqueID++).toString(36)},useMutableSource:function(a,b){W();return b(a._source)}},La={html:"http://www.w3.org/1999/xhtml"};function Ma(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"}}
279
+ var Na={area:true,base:true,br:true,col:true,embed:true,hr:true,img:true,input:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true},Oa=l({menuitem:true},Na),Y={animationIterationCount:true,borderImageOutset:true,borderImageSlice:true,borderImageWidth:true,boxFlex:true,boxFlexGroup:true,boxOrdinalGroup:true,columnCount:true,columns:true,flex:true,flexGrow:true,flexPositive:true,flexShrink:true,flexNegative:true,flexOrder:true,gridArea:true,gridRow:true,gridRowEnd:true,gridRowSpan:true,gridRowStart:true,gridColumn:true,gridColumnEnd:true,gridColumnSpan:true,
280
+ gridColumnStart:true,fontWeight:true,lineClamp:true,lineHeight:true,opacity:true,order:true,orphans:true,tabSize:true,widows:true,zIndex:true,zoom:true,fillOpacity:true,floodOpacity:true,stopOpacity:true,strokeDasharray:true,strokeDashoffset:true,strokeMiterlimit:true,strokeOpacity:true,strokeWidth:true},Pa=["Webkit","ms","Moz","O"];Object.keys(Y).forEach(function(a){Pa.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);Y[b]=Y[a];});});
281
+ var Qa=/([A-Z])/g,Ra=/^ms-/,Z=m.Children.toArray,Sa=la.ReactCurrentDispatcher,Ta={listing:true,pre:true,textarea:true},Ua=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Va={},Wa={};function Xa(a){if(void 0===a||null===a)return a;var b="";m.Children.forEach(a,function(a){null!=a&&(b+=a);});return b}var Ya=Object.prototype.hasOwnProperty,Za={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function $a(a,b){if(void 0===a)throw Error(p(152,F(b)||"Component"));}
282
+ function ab(a,b,c){function d(d,h){var e=h.prototype&&h.prototype.isReactComponent,f=na(h,b,c,e),t=[],g=false,n={isMounted:function(){return false},enqueueForceUpdate:function(){if(null===t)return null},enqueueReplaceState:function(a,c){g=true;t=[c];},enqueueSetState:function(a,c){if(null===t)return null;t.push(c);}};if(e){if(e=new h(d.props,f,n),"function"===typeof h.getDerivedStateFromProps){var k=h.getDerivedStateFromProps.call(null,d.props,e.state);null!=k&&(e.state=l({},e.state,k));}}else if(P={},e=h(d.props,
283
+ f,n),e=Da(h,d.props,e,f),null==e||null==e.render){a=e;$a(a,h);return}e.props=d.props;e.context=f;e.updater=n;n=e.state;void 0===n&&(e.state=n=null);if("function"===typeof e.UNSAFE_componentWillMount||"function"===typeof e.componentWillMount)if("function"===typeof e.componentWillMount&&"function"!==typeof h.getDerivedStateFromProps&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&"function"!==typeof h.getDerivedStateFromProps&&e.UNSAFE_componentWillMount(),t.length){n=t;var v=
284
+ g;t=null;g=false;if(v&&1===n.length)e.state=n[0];else {k=v?n[0]:e.state;var H=true;for(v=v?1:0;v<n.length;v++){var x=n[v];x="function"===typeof x?x.call(e,k,d.props,f):x;null!=x&&(H?(H=false,k=l({},k,x)):l(k,x));}e.state=k;}}else t=null;a=e.render();$a(a,h);if("function"===typeof e.getChildContext&&(d=h.childContextTypes,"object"===typeof d)){var y=e.getChildContext();for(var A in y)if(!(A in d))throw Error(p(108,F(h)||"Unknown",A));}y&&(b=l({},b,y));}for(;m.isValidElement(a);){var f=a,h=f.type;if("function"!==
285
+ typeof h)break;d(f,h);}return {child:a,context:b}}
286
+ var bb=function(){function a(a,b,f){m.isValidElement(a)?a.type!==r?a=[a]:(a=a.props.children,a=m.isValidElement(a)?[a]:Z(a)):a=Z(a);a={type:null,domNamespace:La.html,children:a,childIndex:0,context:ma,footer:""};var c=J[0];if(0===c){var d=J;c=d.length;var g=2*c;if(!(65536>=g))throw Error(p(304));var e=new Uint16Array(g);e.set(d);J=e;J[0]=c+1;for(d=c;d<g-1;d++)J[d]=d+1;J[g-1]=0;}else J[0]=J[c];this.threadID=c;this.stack=[a];this.exhausted=false;this.currentSelectValue=null;this.previousWasTextNode=false;
287
+ this.makeStaticMarkup=b;this.suspenseDepth=0;this.contextIndex=-1;this.contextStack=[];this.contextValueStack=[];this.uniqueID=0;this.identifierPrefix=f&&f.identifierPrefix||"";}var b=a.prototype;b.destroy=function(){if(!this.exhausted){this.exhausted=true;this.clearProviders();var a=this.threadID;J[a]=J[0];J[0]=a;}};b.pushProvider=function(a){var b=++this.contextIndex,c=a.type._context,h=this.threadID;I(c,h);var t=c[h];this.contextStack[b]=c;this.contextValueStack[b]=t;c[h]=a.props.value;};b.popProvider=
288
+ function(){var a=this.contextIndex,b=this.contextStack[a],f=this.contextValueStack[a];this.contextStack[a]=null;this.contextValueStack[a]=null;this.contextIndex--;b[this.threadID]=f;};b.clearProviders=function(){for(var a=this.contextIndex;0<=a;a--)this.contextStack[a][this.threadID]=this.contextValueStack[a];};b.read=function(a){if(this.exhausted)return null;var b=X;X=this;var c=Sa.current;Sa.current=Ka;try{for(var h=[""],t=!1;h[0].length<a;){if(0===this.stack.length){this.exhausted=!0;var g=this.threadID;
289
+ J[g]=J[0];J[0]=g;break}var e=this.stack[this.stack.length-1];if(t||e.childIndex>=e.children.length){var L=e.footer;""!==L&&(this.previousWasTextNode=!1);this.stack.pop();if("select"===e.type)this.currentSelectValue=null;else if(null!=e.type&&null!=e.type.type&&e.type.type.$$typeof===B)this.popProvider(e.type);else if(e.type===D){this.suspenseDepth--;var G=h.pop();if(t){t=!1;var C=e.fallbackFrame;if(!C)throw Error(p(303));this.stack.push(C);h[this.suspenseDepth]+="\x3c!--$!--\x3e";continue}else h[this.suspenseDepth]+=
290
+ G;}h[this.suspenseDepth]+=L;}else {var n=e.children[e.childIndex++],k="";try{k+=this.render(n,e.context,e.domNamespace);}catch(v){if(null!=v&&"function"===typeof v.then)throw Error(p(294));throw v;}finally{}h.length<=this.suspenseDepth&&h.push("");h[this.suspenseDepth]+=k;}}return h[0]}finally{Sa.current=c,X=b,Ea();}};b.render=function(a,b,f){if("string"===typeof a||"number"===typeof a){f=""+a;if(""===f)return "";if(this.makeStaticMarkup)return O(f);if(this.previousWasTextNode)return "\x3c!-- --\x3e"+O(f);
291
+ this.previousWasTextNode=true;return O(f)}b=ab(a,b,this.threadID);a=b.child;b=b.context;if(null===a||false===a)return "";if(!m.isValidElement(a)){if(null!=a&&null!=a.$$typeof){f=a.$$typeof;if(f===q)throw Error(p(257));throw Error(p(258,f.toString()));}a=Z(a);this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:""});return ""}var c=a.type;if("string"===typeof c)return this.renderDOM(a,b,f);switch(c){case ka:case ja:case u:case z:case ca:case r:return a=Z(a.props.children),this.stack.push({type:null,
292
+ domNamespace:f,children:a,childIndex:0,context:b,footer:""}),"";case D:throw Error(p(294));case ia:throw Error(p(343));}if("object"===typeof c&&null!==c)switch(c.$$typeof){case ba:P={};var d=c.render(a.props,a.ref);d=Da(c.render,a.props,d,a.ref);d=Z(d);this.stack.push({type:null,domNamespace:f,children:d,childIndex:0,context:b,footer:""});return "";case da:return a=[m.createElement(c.type,l({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:""}),
293
+ "";case B:return c=Z(a.props.children),f={type:a,domNamespace:f,children:c,childIndex:0,context:b,footer:""},this.pushProvider(a),this.stack.push(f),"";case aa:c=a.type;d=a.props;var g=this.threadID;I(c,g);c=Z(d.children(c[g]));this.stack.push({type:a,domNamespace:f,children:c,childIndex:0,context:b,footer:""});return "";case ha:throw Error(p(338));case ea:return c=a.type,d=c._init,c=d(c._payload),a=[m.createElement(c,l({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,
294
+ context:b,footer:""}),""}throw Error(p(130,null==c?c:typeof c,""));};b.renderDOM=function(a,b,f){var c=a.type.toLowerCase();if(!Va.hasOwnProperty(c)){if(!Ua.test(c))throw Error(p(65,c));Va[c]=true;}var d=a.props;if("input"===c)d=l({type:void 0},d,{defaultChecked:void 0,defaultValue:void 0,value:null!=d.value?d.value:d.defaultValue,checked:null!=d.checked?d.checked:d.defaultChecked});else if("textarea"===c){var g=d.value;if(null==g){g=d.defaultValue;var e=d.children;if(null!=e){if(null!=
295
+ g)throw Error(p(92));if(Array.isArray(e)){if(!(1>=e.length))throw Error(p(93));e=e[0];}g=""+e;}null==g&&(g="");}d=l({},d,{value:void 0,children:""+g});}else if("select"===c)this.currentSelectValue=null!=d.value?d.value:d.defaultValue,d=l({},d,{value:void 0});else if("option"===c){e=this.currentSelectValue;var L=Xa(d.children);if(null!=e){var G=null!=d.value?d.value+"":L;g=false;if(Array.isArray(e))for(var C=0;C<e.length;C++){if(""+e[C]===G){g=true;break}}else g=""+e===G;d=l({selected:void 0,children:void 0},
296
+ d,{selected:g,children:L});}}if(g=d){if(Oa[c]&&(null!=g.children||null!=g.dangerouslySetInnerHTML))throw Error(p(137,c));if(null!=g.dangerouslySetInnerHTML){if(null!=g.children)throw Error(p(60));if(!("object"===typeof g.dangerouslySetInnerHTML&&"__html"in g.dangerouslySetInnerHTML))throw Error(p(61));}if(null!=g.style&&"object"!==typeof g.style)throw Error(p(62));}g=d;e=this.makeStaticMarkup;L=1===this.stack.length;G="<"+a.type;b:if(-1===c.indexOf("-"))C="string"===typeof g.is;else switch(c){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":C=
297
+ false;break b;default:C=true;}for(w in g)if(Ya.call(g,w)){var n=g[w];if(null!=n){if("style"===w){var k=void 0,v="",H="";for(k in n)if(n.hasOwnProperty(k)){var x=0===k.indexOf("--"),y=n[k];if(null!=y){if(x)var A=k;else if(A=k,Wa.hasOwnProperty(A))A=Wa[A];else {var cb=A.replace(Qa,"-$1").toLowerCase().replace(Ra,"-ms-");A=Wa[A]=cb;}v+=H+A+":";H=k;x=null==y||"boolean"===typeof y||""===y?"":x||"number"!==typeof y||0===y||Y.hasOwnProperty(H)&&Y[H]?(""+y).trim():y+"px";v+=x;H=";";}}n=v||null;}k=null;C?Za.hasOwnProperty(w)||
298
+ (k=w,k=sa(k)&&null!=n?k+'="'+(O(n)+'"'):""):k=ya(w,n);k&&(G+=" "+k);}}e||L&&(G+=' data-reactroot=""');var w=G;g="";Na.hasOwnProperty(c)?w+="/>":(w+=">",g="</"+a.type+">");a:{e=d.dangerouslySetInnerHTML;if(null!=e){if(null!=e.__html){e=e.__html;break a}}else if(e=d.children,"string"===typeof e||"number"===typeof e){e=O(e);break a}e=null;}null!=e?(d=[],Ta.hasOwnProperty(c)&&"\n"===e.charAt(0)&&(w+="\n"),w+=e):d=Z(d.children);a=a.type;f=null==f||"http://www.w3.org/1999/xhtml"===f?Ma(a):"http://www.w3.org/2000/svg"===
299
+ f&&"foreignObject"===a?"http://www.w3.org/1999/xhtml":f;this.stack.push({domNamespace:f,type:c,children:d,childIndex:0,context:b,footer:g});this.previousWasTextNode=false;return w};return a}();reactDomServer_browser_production_min.renderToNodeStream=function(){throw Error(p(207));};reactDomServer_browser_production_min.renderToStaticMarkup=function(a,b){a=new bb(a,true,b);try{return a.read(Infinity)}finally{a.destroy();}};reactDomServer_browser_production_min.renderToStaticNodeStream=function(){throw Error(p(208));};reactDomServer_browser_production_min.renderToString=function(a,b){a=new bb(a,false,b);try{return a.read(Infinity)}finally{a.destroy();}};
300
+ reactDomServer_browser_production_min.version="17.0.2";
301
+ return reactDomServer_browser_production_min;
302
+ }
303
+
304
+ var reactDomServer_browser_development = {};
305
+
306
+ /** @license React v17.0.2
307
+ * react-dom-server.browser.development.js
308
+ *
309
+ * Copyright (c) Facebook, Inc. and its affiliates.
310
+ *
311
+ * This source code is licensed under the MIT license found in the
312
+ * LICENSE file in the root directory of this source tree.
313
+ */
314
+
315
+ var hasRequiredReactDomServer_browser_development;
316
+
317
+ function requireReactDomServer_browser_development () {
318
+ if (hasRequiredReactDomServer_browser_development) return reactDomServer_browser_development;
319
+ hasRequiredReactDomServer_browser_development = 1;
320
+
321
+ if (process.env.NODE_ENV !== "production") {
322
+ (function() {
323
+
324
+ var React$1 = React;
325
+ var _assign = requireObjectAssign();
326
+
327
+ // Do not require this module directly! Use normal `invariant` calls with
328
+ // template literal strings. The messages will be replaced with error codes
329
+ // during build.
330
+ function formatProdErrorMessage(code) {
331
+ var url = 'https://reactjs.org/docs/error-decoder.html?invariant=' + code;
332
+
333
+ for (var i = 1; i < arguments.length; i++) {
334
+ url += '&args[]=' + encodeURIComponent(arguments[i]);
335
+ }
336
+
337
+ return "Minified React error #" + code + "; visit " + url + " for the full message or " + 'use the non-minified dev environment for full errors and additional ' + 'helpful warnings.';
338
+ }
339
+
340
+ // TODO: this is special because it gets imported during build.
341
+ var ReactVersion = '17.0.2';
342
+
343
+ var ReactSharedInternals = React$1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
344
+
345
+ // by calls to these methods by a Babel plugin.
346
+ //
347
+ // In PROD (or in packages without access to React internals),
348
+ // they are left as they are instead.
349
+
350
+ function warn(format) {
351
+ {
352
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
353
+ args[_key - 1] = arguments[_key];
354
+ }
355
+
356
+ printWarning('warn', format, args);
357
+ }
358
+ }
359
+ function error(format) {
360
+ {
361
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
362
+ args[_key2 - 1] = arguments[_key2];
363
+ }
364
+
365
+ printWarning('error', format, args);
366
+ }
367
+ }
368
+
369
+ function printWarning(level, format, args) {
370
+ // When changing this logic, you might want to also
371
+ // update consoleWithStackDev.www.js as well.
372
+ {
373
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
374
+ var stack = ReactDebugCurrentFrame.getStackAddendum();
375
+
376
+ if (stack !== '') {
377
+ format += '%s';
378
+ args = args.concat([stack]);
379
+ }
380
+
381
+ var argsWithFormat = args.map(function (item) {
382
+ return '' + item;
383
+ }); // Careful: RN currently depends on this prefix
384
+
385
+ argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
386
+ // breaks IE9: https://github.com/facebook/react/issues/13610
387
+ // eslint-disable-next-line react-internal/no-production-logging
388
+
389
+ Function.prototype.apply.call(console[level], console, argsWithFormat);
390
+ }
391
+ }
392
+ var REACT_PORTAL_TYPE = 0xeaca;
393
+ var REACT_FRAGMENT_TYPE = 0xeacb;
394
+ var REACT_STRICT_MODE_TYPE = 0xeacc;
395
+ var REACT_PROFILER_TYPE = 0xead2;
396
+ var REACT_PROVIDER_TYPE = 0xeacd;
397
+ var REACT_CONTEXT_TYPE = 0xeace;
398
+ var REACT_FORWARD_REF_TYPE = 0xead0;
399
+ var REACT_SUSPENSE_TYPE = 0xead1;
400
+ var REACT_SUSPENSE_LIST_TYPE = 0xead8;
401
+ var REACT_MEMO_TYPE = 0xead3;
402
+ var REACT_LAZY_TYPE = 0xead4;
403
+ var REACT_BLOCK_TYPE = 0xead9;
404
+ var REACT_FUNDAMENTAL_TYPE = 0xead5;
405
+ var REACT_SCOPE_TYPE = 0xead7;
406
+ var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
407
+ var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
408
+
409
+ if (typeof Symbol === 'function' && Symbol.for) {
410
+ var symbolFor = Symbol.for;
411
+ symbolFor('react.element');
412
+ REACT_PORTAL_TYPE = symbolFor('react.portal');
413
+ REACT_FRAGMENT_TYPE = symbolFor('react.fragment');
414
+ REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
415
+ REACT_PROFILER_TYPE = symbolFor('react.profiler');
416
+ REACT_PROVIDER_TYPE = symbolFor('react.provider');
417
+ REACT_CONTEXT_TYPE = symbolFor('react.context');
418
+ REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
419
+ REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
420
+ REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
421
+ REACT_MEMO_TYPE = symbolFor('react.memo');
422
+ REACT_LAZY_TYPE = symbolFor('react.lazy');
423
+ REACT_BLOCK_TYPE = symbolFor('react.block');
424
+ symbolFor('react.server.block');
425
+ REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
426
+ REACT_SCOPE_TYPE = symbolFor('react.scope');
427
+ symbolFor('react.opaque.id');
428
+ REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
429
+ symbolFor('react.offscreen');
430
+ REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
431
+ }
432
+
433
+ function getWrappedName(outerType, innerType, wrapperName) {
434
+ var functionName = innerType.displayName || innerType.name || '';
435
+ return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
436
+ }
437
+
438
+ function getContextName(type) {
439
+ return type.displayName || 'Context';
440
+ }
441
+
442
+ function getComponentName(type) {
443
+ if (type == null) {
444
+ // Host root, text node or just invalid type.
445
+ return null;
446
+ }
447
+
448
+ {
449
+ if (typeof type.tag === 'number') {
450
+ error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
451
+ }
452
+ }
453
+
454
+ if (typeof type === 'function') {
455
+ return type.displayName || type.name || null;
456
+ }
457
+
458
+ if (typeof type === 'string') {
459
+ return type;
460
+ }
461
+
462
+ switch (type) {
463
+ case REACT_FRAGMENT_TYPE:
464
+ return 'Fragment';
465
+
466
+ case REACT_PORTAL_TYPE:
467
+ return 'Portal';
468
+
469
+ case REACT_PROFILER_TYPE:
470
+ return 'Profiler';
471
+
472
+ case REACT_STRICT_MODE_TYPE:
473
+ return 'StrictMode';
474
+
475
+ case REACT_SUSPENSE_TYPE:
476
+ return 'Suspense';
477
+
478
+ case REACT_SUSPENSE_LIST_TYPE:
479
+ return 'SuspenseList';
480
+ }
481
+
482
+ if (typeof type === 'object') {
483
+ switch (type.$$typeof) {
484
+ case REACT_CONTEXT_TYPE:
485
+ var context = type;
486
+ return getContextName(context) + '.Consumer';
487
+
488
+ case REACT_PROVIDER_TYPE:
489
+ var provider = type;
490
+ return getContextName(provider._context) + '.Provider';
491
+
492
+ case REACT_FORWARD_REF_TYPE:
493
+ return getWrappedName(type, type.render, 'ForwardRef');
494
+
495
+ case REACT_MEMO_TYPE:
496
+ return getComponentName(type.type);
497
+
498
+ case REACT_BLOCK_TYPE:
499
+ return getComponentName(type._render);
500
+
501
+ case REACT_LAZY_TYPE:
502
+ {
503
+ var lazyComponent = type;
504
+ var payload = lazyComponent._payload;
505
+ var init = lazyComponent._init;
506
+
507
+ try {
508
+ return getComponentName(init(payload));
509
+ } catch (x) {
510
+ return null;
511
+ }
512
+ }
513
+ }
514
+ }
515
+
516
+ return null;
517
+ }
518
+
519
+ // Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
520
+
521
+ var enableSuspenseServerRenderer = false;
522
+
523
+ // Helpers to patch console.logs to avoid logging during side-effect free
524
+ // replaying on render function. This currently only patches the object
525
+ // lazily which won't cover if the log function was extracted eagerly.
526
+ // We could also eagerly patch the method.
527
+ var disabledDepth = 0;
528
+ var prevLog;
529
+ var prevInfo;
530
+ var prevWarn;
531
+ var prevError;
532
+ var prevGroup;
533
+ var prevGroupCollapsed;
534
+ var prevGroupEnd;
535
+
536
+ function disabledLog() {}
537
+
538
+ disabledLog.__reactDisabledLog = true;
539
+ function disableLogs() {
540
+ {
541
+ if (disabledDepth === 0) {
542
+ /* eslint-disable react-internal/no-production-logging */
543
+ prevLog = console.log;
544
+ prevInfo = console.info;
545
+ prevWarn = console.warn;
546
+ prevError = console.error;
547
+ prevGroup = console.group;
548
+ prevGroupCollapsed = console.groupCollapsed;
549
+ prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
550
+
551
+ var props = {
552
+ configurable: true,
553
+ enumerable: true,
554
+ value: disabledLog,
555
+ writable: true
556
+ }; // $FlowFixMe Flow thinks console is immutable.
557
+
558
+ Object.defineProperties(console, {
559
+ info: props,
560
+ log: props,
561
+ warn: props,
562
+ error: props,
563
+ group: props,
564
+ groupCollapsed: props,
565
+ groupEnd: props
566
+ });
567
+ /* eslint-enable react-internal/no-production-logging */
568
+ }
569
+
570
+ disabledDepth++;
571
+ }
572
+ }
573
+ function reenableLogs() {
574
+ {
575
+ disabledDepth--;
576
+
577
+ if (disabledDepth === 0) {
578
+ /* eslint-disable react-internal/no-production-logging */
579
+ var props = {
580
+ configurable: true,
581
+ enumerable: true,
582
+ writable: true
583
+ }; // $FlowFixMe Flow thinks console is immutable.
584
+
585
+ Object.defineProperties(console, {
586
+ log: _assign({}, props, {
587
+ value: prevLog
588
+ }),
589
+ info: _assign({}, props, {
590
+ value: prevInfo
591
+ }),
592
+ warn: _assign({}, props, {
593
+ value: prevWarn
594
+ }),
595
+ error: _assign({}, props, {
596
+ value: prevError
597
+ }),
598
+ group: _assign({}, props, {
599
+ value: prevGroup
600
+ }),
601
+ groupCollapsed: _assign({}, props, {
602
+ value: prevGroupCollapsed
603
+ }),
604
+ groupEnd: _assign({}, props, {
605
+ value: prevGroupEnd
606
+ })
607
+ });
608
+ /* eslint-enable react-internal/no-production-logging */
609
+ }
610
+
611
+ if (disabledDepth < 0) {
612
+ error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
613
+ }
614
+ }
615
+ }
616
+
617
+ var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
618
+ var prefix;
619
+ function describeBuiltInComponentFrame(name, source, ownerFn) {
620
+ {
621
+ if (prefix === undefined) {
622
+ // Extract the VM specific prefix used by each line.
623
+ try {
624
+ throw Error();
625
+ } catch (x) {
626
+ var match = x.stack.trim().match(/\n( *(at )?)/);
627
+ prefix = match && match[1] || '';
628
+ }
629
+ } // We use the prefix to ensure our stacks line up with native stack frames.
630
+
631
+
632
+ return '\n' + prefix + name;
633
+ }
634
+ }
635
+ var reentry = false;
636
+ var componentFrameCache;
637
+
638
+ {
639
+ var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
640
+ componentFrameCache = new PossiblyWeakMap();
641
+ }
642
+
643
+ function describeNativeComponentFrame(fn, construct) {
644
+ // If something asked for a stack inside a fake render, it should get ignored.
645
+ if (!fn || reentry) {
646
+ return '';
647
+ }
648
+
649
+ {
650
+ var frame = componentFrameCache.get(fn);
651
+
652
+ if (frame !== undefined) {
653
+ return frame;
654
+ }
655
+ }
656
+
657
+ var control;
658
+ reentry = true;
659
+ var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
660
+
661
+ Error.prepareStackTrace = undefined;
662
+ var previousDispatcher;
663
+
664
+ {
665
+ previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
666
+ // for warnings.
667
+
668
+ ReactCurrentDispatcher.current = null;
669
+ disableLogs();
670
+ }
671
+
672
+ try {
673
+ // This should throw.
674
+ if (construct) {
675
+ // Something should be setting the props in the constructor.
676
+ var Fake = function () {
677
+ throw Error();
678
+ }; // $FlowFixMe
679
+
680
+
681
+ Object.defineProperty(Fake.prototype, 'props', {
682
+ set: function () {
683
+ // We use a throwing setter instead of frozen or non-writable props
684
+ // because that won't throw in a non-strict mode function.
685
+ throw Error();
686
+ }
687
+ });
688
+
689
+ if (typeof Reflect === 'object' && Reflect.construct) {
690
+ // We construct a different control for this case to include any extra
691
+ // frames added by the construct call.
692
+ try {
693
+ Reflect.construct(Fake, []);
694
+ } catch (x) {
695
+ control = x;
696
+ }
697
+
698
+ Reflect.construct(fn, [], Fake);
699
+ } else {
700
+ try {
701
+ Fake.call();
702
+ } catch (x) {
703
+ control = x;
704
+ }
705
+
706
+ fn.call(Fake.prototype);
707
+ }
708
+ } else {
709
+ try {
710
+ throw Error();
711
+ } catch (x) {
712
+ control = x;
713
+ }
714
+
715
+ fn();
716
+ }
717
+ } catch (sample) {
718
+ // This is inlined manually because closure doesn't do it for us.
719
+ if (sample && control && typeof sample.stack === 'string') {
720
+ // This extracts the first frame from the sample that isn't also in the control.
721
+ // Skipping one frame that we assume is the frame that calls the two.
722
+ var sampleLines = sample.stack.split('\n');
723
+ var controlLines = control.stack.split('\n');
724
+ var s = sampleLines.length - 1;
725
+ var c = controlLines.length - 1;
726
+
727
+ while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
728
+ // We expect at least one stack frame to be shared.
729
+ // Typically this will be the root most one. However, stack frames may be
730
+ // cut off due to maximum stack limits. In this case, one maybe cut off
731
+ // earlier than the other. We assume that the sample is longer or the same
732
+ // and there for cut off earlier. So we should find the root most frame in
733
+ // the sample somewhere in the control.
734
+ c--;
735
+ }
736
+
737
+ for (; s >= 1 && c >= 0; s--, c--) {
738
+ // Next we find the first one that isn't the same which should be the
739
+ // frame that called our sample function and the control.
740
+ if (sampleLines[s] !== controlLines[c]) {
741
+ // In V8, the first line is describing the message but other VMs don't.
742
+ // If we're about to return the first line, and the control is also on the same
743
+ // line, that's a pretty good indicator that our sample threw at same line as
744
+ // the control. I.e. before we entered the sample frame. So we ignore this result.
745
+ // This can happen if you passed a class to function component, or non-function.
746
+ if (s !== 1 || c !== 1) {
747
+ do {
748
+ s--;
749
+ c--; // We may still have similar intermediate frames from the construct call.
750
+ // The next one that isn't the same should be our match though.
751
+
752
+ if (c < 0 || sampleLines[s] !== controlLines[c]) {
753
+ // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
754
+ var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');
755
+
756
+ {
757
+ if (typeof fn === 'function') {
758
+ componentFrameCache.set(fn, _frame);
759
+ }
760
+ } // Return the line we found.
761
+
762
+
763
+ return _frame;
764
+ }
765
+ } while (s >= 1 && c >= 0);
766
+ }
767
+
768
+ break;
769
+ }
770
+ }
771
+ }
772
+ } finally {
773
+ reentry = false;
774
+
775
+ {
776
+ ReactCurrentDispatcher.current = previousDispatcher;
777
+ reenableLogs();
778
+ }
779
+
780
+ Error.prepareStackTrace = previousPrepareStackTrace;
781
+ } // Fallback to just using the name if we couldn't make it throw.
782
+
783
+
784
+ var name = fn ? fn.displayName || fn.name : '';
785
+ var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
786
+
787
+ {
788
+ if (typeof fn === 'function') {
789
+ componentFrameCache.set(fn, syntheticFrame);
790
+ }
791
+ }
792
+
793
+ return syntheticFrame;
794
+ }
795
+ function describeFunctionComponentFrame(fn, source, ownerFn) {
796
+ {
797
+ return describeNativeComponentFrame(fn, false);
798
+ }
799
+ }
800
+
801
+ function shouldConstruct(Component) {
802
+ var prototype = Component.prototype;
803
+ return !!(prototype && prototype.isReactComponent);
804
+ }
805
+
806
+ function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
807
+
808
+ if (type == null) {
809
+ return '';
810
+ }
811
+
812
+ if (typeof type === 'function') {
813
+ {
814
+ return describeNativeComponentFrame(type, shouldConstruct(type));
815
+ }
816
+ }
817
+
818
+ if (typeof type === 'string') {
819
+ return describeBuiltInComponentFrame(type);
820
+ }
821
+
822
+ switch (type) {
823
+ case REACT_SUSPENSE_TYPE:
824
+ return describeBuiltInComponentFrame('Suspense');
825
+
826
+ case REACT_SUSPENSE_LIST_TYPE:
827
+ return describeBuiltInComponentFrame('SuspenseList');
828
+ }
829
+
830
+ if (typeof type === 'object') {
831
+ switch (type.$$typeof) {
832
+ case REACT_FORWARD_REF_TYPE:
833
+ return describeFunctionComponentFrame(type.render);
834
+
835
+ case REACT_MEMO_TYPE:
836
+ // Memo may contain any component type so we recursively resolve it.
837
+ return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
838
+
839
+ case REACT_BLOCK_TYPE:
840
+ return describeFunctionComponentFrame(type._render);
841
+
842
+ case REACT_LAZY_TYPE:
843
+ {
844
+ var lazyComponent = type;
845
+ var payload = lazyComponent._payload;
846
+ var init = lazyComponent._init;
847
+
848
+ try {
849
+ // Lazy may contain any component type so we recursively resolve it.
850
+ return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
851
+ } catch (x) {}
852
+ }
853
+ }
854
+ }
855
+
856
+ return '';
857
+ }
858
+
859
+ var loggedTypeFailures = {};
860
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
861
+
862
+ function setCurrentlyValidatingElement(element) {
863
+ {
864
+ if (element) {
865
+ var owner = element._owner;
866
+ var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
867
+ ReactDebugCurrentFrame.setExtraStackFrame(stack);
868
+ } else {
869
+ ReactDebugCurrentFrame.setExtraStackFrame(null);
870
+ }
871
+ }
872
+ }
873
+
874
+ function checkPropTypes(typeSpecs, values, location, componentName, element) {
875
+ {
876
+ // $FlowFixMe This is okay but Flow doesn't know it.
877
+ var has = Function.call.bind(Object.prototype.hasOwnProperty);
878
+
879
+ for (var typeSpecName in typeSpecs) {
880
+ if (has(typeSpecs, typeSpecName)) {
881
+ var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
882
+ // fail the render phase where it didn't fail before. So we log it.
883
+ // After these have been cleaned up, we'll let them throw.
884
+
885
+ try {
886
+ // This is intentionally an invariant that gets caught. It's the same
887
+ // behavior as without this statement except with a better message.
888
+ if (typeof typeSpecs[typeSpecName] !== 'function') {
889
+ var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
890
+ err.name = 'Invariant Violation';
891
+ throw err;
892
+ }
893
+
894
+ error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
895
+ } catch (ex) {
896
+ error$1 = ex;
897
+ }
898
+
899
+ if (error$1 && !(error$1 instanceof Error)) {
900
+ setCurrentlyValidatingElement(element);
901
+
902
+ error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName, location, typeSpecName, typeof error$1);
903
+
904
+ setCurrentlyValidatingElement(null);
905
+ }
906
+
907
+ if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
908
+ // Only monitor this failure once because there tends to be a lot of the
909
+ // same error.
910
+ loggedTypeFailures[error$1.message] = true;
911
+ setCurrentlyValidatingElement(element);
912
+
913
+ error('Failed %s type: %s', location, error$1.message);
914
+
915
+ setCurrentlyValidatingElement(null);
916
+ }
917
+ }
918
+ }
919
+ }
920
+ }
921
+
922
+ var didWarnAboutInvalidateContextType;
923
+
924
+ {
925
+ didWarnAboutInvalidateContextType = new Set();
926
+ }
927
+
928
+ var emptyObject = {};
929
+
930
+ {
931
+ Object.freeze(emptyObject);
932
+ }
933
+
934
+ function maskContext(type, context) {
935
+ var contextTypes = type.contextTypes;
936
+
937
+ if (!contextTypes) {
938
+ return emptyObject;
939
+ }
940
+
941
+ var maskedContext = {};
942
+
943
+ for (var contextName in contextTypes) {
944
+ maskedContext[contextName] = context[contextName];
945
+ }
946
+
947
+ return maskedContext;
948
+ }
949
+
950
+ function checkContextTypes(typeSpecs, values, location) {
951
+ {
952
+ checkPropTypes(typeSpecs, values, location, 'Component');
953
+ }
954
+ }
955
+
956
+ function validateContextBounds(context, threadID) {
957
+ // If we don't have enough slots in this context to store this threadID,
958
+ // fill it in without leaving any holes to ensure that the VM optimizes
959
+ // this as non-holey index properties.
960
+ // (Note: If `react` package is < 16.6, _threadCount is undefined.)
961
+ for (var i = context._threadCount | 0; i <= threadID; i++) {
962
+ // We assume that this is the same as the defaultValue which might not be
963
+ // true if we're rendering inside a secondary renderer but they are
964
+ // secondary because these use cases are very rare.
965
+ context[i] = context._currentValue2;
966
+ context._threadCount = i + 1;
967
+ }
968
+ }
969
+ function processContext(type, context, threadID, isClass) {
970
+ if (isClass) {
971
+ var contextType = type.contextType;
972
+
973
+ {
974
+ if ('contextType' in type) {
975
+ var isValid = // Allow null for conditional declaration
976
+ contextType === null || contextType !== undefined && contextType.$$typeof === REACT_CONTEXT_TYPE && contextType._context === undefined; // Not a <Context.Consumer>
977
+
978
+ if (!isValid && !didWarnAboutInvalidateContextType.has(type)) {
979
+ didWarnAboutInvalidateContextType.add(type);
980
+ var addendum = '';
981
+
982
+ if (contextType === undefined) {
983
+ addendum = ' However, it is set to undefined. ' + 'This can be caused by a typo or by mixing up named and default imports. ' + 'This can also happen due to a circular dependency, so ' + 'try moving the createContext() call to a separate file.';
984
+ } else if (typeof contextType !== 'object') {
985
+ addendum = ' However, it is set to a ' + typeof contextType + '.';
986
+ } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {
987
+ addendum = ' Did you accidentally pass the Context.Provider instead?';
988
+ } else if (contextType._context !== undefined) {
989
+ // <Context.Consumer>
990
+ addendum = ' Did you accidentally pass the Context.Consumer instead?';
991
+ } else {
992
+ addendum = ' However, it is set to an object with keys {' + Object.keys(contextType).join(', ') + '}.';
993
+ }
994
+
995
+ error('%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentName(type) || 'Component', addendum);
996
+ }
997
+ }
998
+ }
999
+
1000
+ if (typeof contextType === 'object' && contextType !== null) {
1001
+ validateContextBounds(contextType, threadID);
1002
+ return contextType[threadID];
1003
+ }
1004
+
1005
+ {
1006
+ var maskedContext = maskContext(type, context);
1007
+
1008
+ {
1009
+ if (type.contextTypes) {
1010
+ checkContextTypes(type.contextTypes, maskedContext, 'context');
1011
+ }
1012
+ }
1013
+
1014
+ return maskedContext;
1015
+ }
1016
+ } else {
1017
+ {
1018
+ var _maskedContext = maskContext(type, context);
1019
+
1020
+ {
1021
+ if (type.contextTypes) {
1022
+ checkContextTypes(type.contextTypes, _maskedContext, 'context');
1023
+ }
1024
+ }
1025
+
1026
+ return _maskedContext;
1027
+ }
1028
+ }
1029
+ }
1030
+
1031
+ var nextAvailableThreadIDs = new Uint16Array(16);
1032
+
1033
+ for (var i = 0; i < 15; i++) {
1034
+ nextAvailableThreadIDs[i] = i + 1;
1035
+ }
1036
+
1037
+ nextAvailableThreadIDs[15] = 0;
1038
+
1039
+ function growThreadCountAndReturnNextAvailable() {
1040
+ var oldArray = nextAvailableThreadIDs;
1041
+ var oldSize = oldArray.length;
1042
+ var newSize = oldSize * 2;
1043
+
1044
+ if (!(newSize <= 0x10000)) {
1045
+ {
1046
+ throw Error( "Maximum number of concurrent React renderers exceeded. This can happen if you are not properly destroying the Readable provided by React. Ensure that you call .destroy() on it if you no longer want to read from it, and did not read to the end. If you use .pipe() this should be automatic." );
1047
+ }
1048
+ }
1049
+
1050
+ var newArray = new Uint16Array(newSize);
1051
+ newArray.set(oldArray);
1052
+ nextAvailableThreadIDs = newArray;
1053
+ nextAvailableThreadIDs[0] = oldSize + 1;
1054
+
1055
+ for (var _i = oldSize; _i < newSize - 1; _i++) {
1056
+ nextAvailableThreadIDs[_i] = _i + 1;
1057
+ }
1058
+
1059
+ nextAvailableThreadIDs[newSize - 1] = 0;
1060
+ return oldSize;
1061
+ }
1062
+
1063
+ function allocThreadID() {
1064
+ var nextID = nextAvailableThreadIDs[0];
1065
+
1066
+ if (nextID === 0) {
1067
+ return growThreadCountAndReturnNextAvailable();
1068
+ }
1069
+
1070
+ nextAvailableThreadIDs[0] = nextAvailableThreadIDs[nextID];
1071
+ return nextID;
1072
+ }
1073
+ function freeThreadID(id) {
1074
+ nextAvailableThreadIDs[id] = nextAvailableThreadIDs[0];
1075
+ nextAvailableThreadIDs[0] = id;
1076
+ }
1077
+
1078
+ // A reserved attribute.
1079
+ // It is handled by React separately and shouldn't be written to the DOM.
1080
+ var RESERVED = 0; // A simple string attribute.
1081
+ // Attributes that aren't in the filter are presumed to have this type.
1082
+
1083
+ var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called
1084
+ // "enumerated" attributes with "true" and "false" as possible values.
1085
+ // When true, it should be set to a "true" string.
1086
+ // When false, it should be set to a "false" string.
1087
+
1088
+ var BOOLEANISH_STRING = 2; // A real boolean attribute.
1089
+ // When true, it should be present (set either to an empty string or its name).
1090
+ // When false, it should be omitted.
1091
+
1092
+ var BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value.
1093
+ // When true, it should be present (set either to an empty string or its name).
1094
+ // When false, it should be omitted.
1095
+ // For any other value, should be present with that value.
1096
+
1097
+ var OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric.
1098
+ // When falsy, it should be removed.
1099
+
1100
+ var NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric.
1101
+ // When falsy, it should be removed.
1102
+
1103
+ var POSITIVE_NUMERIC = 6;
1104
+
1105
+ /* eslint-disable max-len */
1106
+ var ATTRIBUTE_NAME_START_CHAR = ":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
1107
+ /* eslint-enable max-len */
1108
+
1109
+ var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
1110
+ var ROOT_ATTRIBUTE_NAME = 'data-reactroot';
1111
+ var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');
1112
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
1113
+ var illegalAttributeNameCache = {};
1114
+ var validatedAttributeNameCache = {};
1115
+ function isAttributeNameSafe(attributeName) {
1116
+ if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {
1117
+ return true;
1118
+ }
1119
+
1120
+ if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {
1121
+ return false;
1122
+ }
1123
+
1124
+ if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
1125
+ validatedAttributeNameCache[attributeName] = true;
1126
+ return true;
1127
+ }
1128
+
1129
+ illegalAttributeNameCache[attributeName] = true;
1130
+
1131
+ {
1132
+ error('Invalid attribute name: `%s`', attributeName);
1133
+ }
1134
+
1135
+ return false;
1136
+ }
1137
+ function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) {
1138
+ if (propertyInfo !== null) {
1139
+ return propertyInfo.type === RESERVED;
1140
+ }
1141
+
1142
+ if (name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {
1143
+ return true;
1144
+ }
1145
+
1146
+ return false;
1147
+ }
1148
+ function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) {
1149
+ if (propertyInfo !== null && propertyInfo.type === RESERVED) {
1150
+ return false;
1151
+ }
1152
+
1153
+ switch (typeof value) {
1154
+ case 'function': // $FlowIssue symbol is perfectly valid here
1155
+
1156
+ case 'symbol':
1157
+ // eslint-disable-line
1158
+ return true;
1159
+
1160
+ case 'boolean':
1161
+ {
1162
+
1163
+ if (propertyInfo !== null) {
1164
+ return !propertyInfo.acceptsBooleans;
1165
+ } else {
1166
+ var prefix = name.toLowerCase().slice(0, 5);
1167
+ return prefix !== 'data-' && prefix !== 'aria-';
1168
+ }
1169
+ }
1170
+
1171
+ default:
1172
+ return false;
1173
+ }
1174
+ }
1175
+ function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) {
1176
+ if (value === null || typeof value === 'undefined') {
1177
+ return true;
1178
+ }
1179
+
1180
+ if (shouldRemoveAttributeWithWarning(name, value, propertyInfo)) {
1181
+ return true;
1182
+ }
1183
+
1184
+ if (propertyInfo !== null) {
1185
+
1186
+ switch (propertyInfo.type) {
1187
+ case BOOLEAN:
1188
+ return !value;
1189
+
1190
+ case OVERLOADED_BOOLEAN:
1191
+ return value === false;
1192
+
1193
+ case NUMERIC:
1194
+ return isNaN(value);
1195
+
1196
+ case POSITIVE_NUMERIC:
1197
+ return isNaN(value) || value < 1;
1198
+ }
1199
+ }
1200
+
1201
+ return false;
1202
+ }
1203
+ function getPropertyInfo(name) {
1204
+ return properties.hasOwnProperty(name) ? properties[name] : null;
1205
+ }
1206
+
1207
+ function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) {
1208
+ this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;
1209
+ this.attributeName = attributeName;
1210
+ this.attributeNamespace = attributeNamespace;
1211
+ this.mustUseProperty = mustUseProperty;
1212
+ this.propertyName = name;
1213
+ this.type = type;
1214
+ this.sanitizeURL = sanitizeURL;
1215
+ this.removeEmptyString = removeEmptyString;
1216
+ } // When adding attributes to this list, be sure to also add them to
1217
+ // the `possibleStandardNames` module to ensure casing and incorrect
1218
+ // name warnings.
1219
+
1220
+
1221
+ var properties = {}; // These props are reserved by React. They shouldn't be written to the DOM.
1222
+
1223
+ var reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular
1224
+ // elements (not just inputs). Now that ReactDOMInput assigns to the
1225
+ // defaultValue property -- do we need this?
1226
+ 'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'];
1227
+ reservedProps.forEach(function (name) {
1228
+ properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty
1229
+ name, // attributeName
1230
+ null, // attributeNamespace
1231
+ false, // sanitizeURL
1232
+ false);
1233
+ }); // A few React string attributes have a different name.
1234
+ // This is a mapping from React prop names to the attribute names.
1235
+
1236
+ [['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
1237
+ var name = _ref[0],
1238
+ attributeName = _ref[1];
1239
+ properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
1240
+ attributeName, // attributeName
1241
+ null, // attributeNamespace
1242
+ false, // sanitizeURL
1243
+ false);
1244
+ }); // These are "enumerated" HTML attributes that accept "true" and "false".
1245
+ // In React, we let users pass `true` and `false` even though technically
1246
+ // these aren't boolean attributes (they are coerced to strings).
1247
+
1248
+ ['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) {
1249
+ properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
1250
+ name.toLowerCase(), // attributeName
1251
+ null, // attributeNamespace
1252
+ false, // sanitizeURL
1253
+ false);
1254
+ }); // These are "enumerated" SVG attributes that accept "true" and "false".
1255
+ // In React, we let users pass `true` and `false` even though technically
1256
+ // these aren't boolean attributes (they are coerced to strings).
1257
+ // Since these are SVG attributes, their attribute names are case-sensitive.
1258
+
1259
+ ['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) {
1260
+ properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
1261
+ name, // attributeName
1262
+ null, // attributeNamespace
1263
+ false, // sanitizeURL
1264
+ false);
1265
+ }); // These are HTML boolean attributes.
1266
+
1267
+ ['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM
1268
+ // on the client side because the browsers are inconsistent. Instead we call focus().
1269
+ 'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'disableRemotePlayback', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata
1270
+ 'itemScope'].forEach(function (name) {
1271
+ properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty
1272
+ name.toLowerCase(), // attributeName
1273
+ null, // attributeNamespace
1274
+ false, // sanitizeURL
1275
+ false);
1276
+ }); // These are the few React props that we set as DOM properties
1277
+ // rather than attributes. These are all booleans.
1278
+
1279
+ ['checked', // Note: `option.selected` is not updated if `select.multiple` is
1280
+ // disabled with `removeAttribute`. We have special logic for handling this.
1281
+ 'multiple', 'muted', 'selected' // NOTE: if you add a camelCased prop to this list,
1282
+ // you'll need to set attributeName to name.toLowerCase()
1283
+ // instead in the assignment below.
1284
+ ].forEach(function (name) {
1285
+ properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty
1286
+ name, // attributeName
1287
+ null, // attributeNamespace
1288
+ false, // sanitizeURL
1289
+ false);
1290
+ }); // These are HTML attributes that are "overloaded booleans": they behave like
1291
+ // booleans, but can also accept a string value.
1292
+
1293
+ ['capture', 'download' // NOTE: if you add a camelCased prop to this list,
1294
+ // you'll need to set attributeName to name.toLowerCase()
1295
+ // instead in the assignment below.
1296
+ ].forEach(function (name) {
1297
+ properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty
1298
+ name, // attributeName
1299
+ null, // attributeNamespace
1300
+ false, // sanitizeURL
1301
+ false);
1302
+ }); // These are HTML attributes that must be positive numbers.
1303
+
1304
+ ['cols', 'rows', 'size', 'span' // NOTE: if you add a camelCased prop to this list,
1305
+ // you'll need to set attributeName to name.toLowerCase()
1306
+ // instead in the assignment below.
1307
+ ].forEach(function (name) {
1308
+ properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty
1309
+ name, // attributeName
1310
+ null, // attributeNamespace
1311
+ false, // sanitizeURL
1312
+ false);
1313
+ }); // These are HTML attributes that must be numbers.
1314
+
1315
+ ['rowSpan', 'start'].forEach(function (name) {
1316
+ properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty
1317
+ name.toLowerCase(), // attributeName
1318
+ null, // attributeNamespace
1319
+ false, // sanitizeURL
1320
+ false);
1321
+ });
1322
+ var CAMELIZE = /[\-\:]([a-z])/g;
1323
+
1324
+ var capitalize = function (token) {
1325
+ return token[1].toUpperCase();
1326
+ }; // This is a list of all SVG attributes that need special casing, namespacing,
1327
+ // or boolean value assignment. Regular attributes that just accept strings
1328
+ // and have the same names are omitted, just like in the HTML attribute filter.
1329
+ // Some of these attributes can be hard to find. This list was created by
1330
+ // scraping the MDN documentation.
1331
+
1332
+
1333
+ ['accent-height', 'alignment-baseline', 'arabic-form', 'baseline-shift', 'cap-height', 'clip-path', 'clip-rule', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'dominant-baseline', 'enable-background', 'fill-opacity', 'fill-rule', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-name', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'horiz-adv-x', 'horiz-origin-x', 'image-rendering', 'letter-spacing', 'lighting-color', 'marker-end', 'marker-mid', 'marker-start', 'overline-position', 'overline-thickness', 'paint-order', 'panose-1', 'pointer-events', 'rendering-intent', 'shape-rendering', 'stop-color', 'stop-opacity', 'strikethrough-position', 'strikethrough-thickness', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-decoration', 'text-rendering', 'underline-position', 'underline-thickness', 'unicode-bidi', 'unicode-range', 'units-per-em', 'v-alphabetic', 'v-hanging', 'v-ideographic', 'v-mathematical', 'vector-effect', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'word-spacing', 'writing-mode', 'xmlns:xlink', 'x-height' // NOTE: if you add a camelCased prop to this list,
1334
+ // you'll need to set attributeName to name.toLowerCase()
1335
+ // instead in the assignment below.
1336
+ ].forEach(function (attributeName) {
1337
+ var name = attributeName.replace(CAMELIZE, capitalize);
1338
+ properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
1339
+ attributeName, null, // attributeNamespace
1340
+ false, // sanitizeURL
1341
+ false);
1342
+ }); // String SVG attributes with the xlink namespace.
1343
+
1344
+ ['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type' // NOTE: if you add a camelCased prop to this list,
1345
+ // you'll need to set attributeName to name.toLowerCase()
1346
+ // instead in the assignment below.
1347
+ ].forEach(function (attributeName) {
1348
+ var name = attributeName.replace(CAMELIZE, capitalize);
1349
+ properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
1350
+ attributeName, 'http://www.w3.org/1999/xlink', false, // sanitizeURL
1351
+ false);
1352
+ }); // String SVG attributes with the xml namespace.
1353
+
1354
+ ['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list,
1355
+ // you'll need to set attributeName to name.toLowerCase()
1356
+ // instead in the assignment below.
1357
+ ].forEach(function (attributeName) {
1358
+ var name = attributeName.replace(CAMELIZE, capitalize);
1359
+ properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
1360
+ attributeName, 'http://www.w3.org/XML/1998/namespace', false, // sanitizeURL
1361
+ false);
1362
+ }); // These attribute exists both in HTML and SVG.
1363
+ // The attribute name is case-sensitive in SVG so we can't just use
1364
+ // the React name like we do for attributes that exist only in HTML.
1365
+
1366
+ ['tabIndex', 'crossOrigin'].forEach(function (attributeName) {
1367
+ properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
1368
+ attributeName.toLowerCase(), // attributeName
1369
+ null, // attributeNamespace
1370
+ false, // sanitizeURL
1371
+ false);
1372
+ }); // These attributes accept URLs. These must not allow javascript: URLS.
1373
+ // These will also need to accept Trusted Types object in the future.
1374
+
1375
+ var xlinkHref = 'xlinkHref';
1376
+ properties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty
1377
+ 'xlink:href', 'http://www.w3.org/1999/xlink', true, // sanitizeURL
1378
+ false);
1379
+ ['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {
1380
+ properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
1381
+ attributeName.toLowerCase(), // attributeName
1382
+ null, // attributeNamespace
1383
+ true, // sanitizeURL
1384
+ true);
1385
+ });
1386
+
1387
+ // and any newline or tab are filtered out as if they're not part of the URL.
1388
+ // https://url.spec.whatwg.org/#url-parsing
1389
+ // Tab or newline are defined as \r\n\t:
1390
+ // https://infra.spec.whatwg.org/#ascii-tab-or-newline
1391
+ // A C0 control is a code point in the range \u0000 NULL to \u001F
1392
+ // INFORMATION SEPARATOR ONE, inclusive:
1393
+ // https://infra.spec.whatwg.org/#c0-control-or-space
1394
+
1395
+ /* eslint-disable max-len */
1396
+
1397
+ var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i;
1398
+ var didWarn = false;
1399
+
1400
+ function sanitizeURL(url) {
1401
+ {
1402
+ if (!didWarn && isJavaScriptProtocol.test(url)) {
1403
+ didWarn = true;
1404
+
1405
+ error('A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(url));
1406
+ }
1407
+ }
1408
+ }
1409
+
1410
+ // code copied and modified from escape-html
1411
+
1412
+ /**
1413
+ * Module variables.
1414
+ * @private
1415
+ */
1416
+ var matchHtmlRegExp = /["'&<>]/;
1417
+ /**
1418
+ * Escapes special characters and HTML entities in a given html string.
1419
+ *
1420
+ * @param {string} string HTML string to escape for later insertion
1421
+ * @return {string}
1422
+ * @public
1423
+ */
1424
+
1425
+ function escapeHtml(string) {
1426
+ var str = '' + string;
1427
+ var match = matchHtmlRegExp.exec(str);
1428
+
1429
+ if (!match) {
1430
+ return str;
1431
+ }
1432
+
1433
+ var escape;
1434
+ var html = '';
1435
+ var index;
1436
+ var lastIndex = 0;
1437
+
1438
+ for (index = match.index; index < str.length; index++) {
1439
+ switch (str.charCodeAt(index)) {
1440
+ case 34:
1441
+ // "
1442
+ escape = '&quot;';
1443
+ break;
1444
+
1445
+ case 38:
1446
+ // &
1447
+ escape = '&amp;';
1448
+ break;
1449
+
1450
+ case 39:
1451
+ // '
1452
+ escape = '&#x27;'; // modified from escape-html; used to be '&#39'
1453
+
1454
+ break;
1455
+
1456
+ case 60:
1457
+ // <
1458
+ escape = '&lt;';
1459
+ break;
1460
+
1461
+ case 62:
1462
+ // >
1463
+ escape = '&gt;';
1464
+ break;
1465
+
1466
+ default:
1467
+ continue;
1468
+ }
1469
+
1470
+ if (lastIndex !== index) {
1471
+ html += str.substring(lastIndex, index);
1472
+ }
1473
+
1474
+ lastIndex = index + 1;
1475
+ html += escape;
1476
+ }
1477
+
1478
+ return lastIndex !== index ? html + str.substring(lastIndex, index) : html;
1479
+ } // end code copied and modified from escape-html
1480
+
1481
+ /**
1482
+ * Escapes text to prevent scripting attacks.
1483
+ *
1484
+ * @param {*} text Text value to escape.
1485
+ * @return {string} An escaped string.
1486
+ */
1487
+
1488
+
1489
+ function escapeTextForBrowser(text) {
1490
+ if (typeof text === 'boolean' || typeof text === 'number') {
1491
+ // this shortcircuit helps perf for types that we know will never have
1492
+ // special characters, especially given that this function is used often
1493
+ // for numeric dom ids.
1494
+ return '' + text;
1495
+ }
1496
+
1497
+ return escapeHtml(text);
1498
+ }
1499
+
1500
+ /**
1501
+ * Escapes attribute value to prevent scripting attacks.
1502
+ *
1503
+ * @param {*} value Value to escape.
1504
+ * @return {string} An escaped string.
1505
+ */
1506
+
1507
+ function quoteAttributeValueForBrowser(value) {
1508
+ return '"' + escapeTextForBrowser(value) + '"';
1509
+ }
1510
+
1511
+ function createMarkupForRoot() {
1512
+ return ROOT_ATTRIBUTE_NAME + '=""';
1513
+ }
1514
+ /**
1515
+ * Creates markup for a property.
1516
+ *
1517
+ * @param {string} name
1518
+ * @param {*} value
1519
+ * @return {?string} Markup string, or null if the property was invalid.
1520
+ */
1521
+
1522
+ function createMarkupForProperty(name, value) {
1523
+ var propertyInfo = getPropertyInfo(name);
1524
+
1525
+ if (name !== 'style' && shouldIgnoreAttribute(name, propertyInfo)) {
1526
+ return '';
1527
+ }
1528
+
1529
+ if (shouldRemoveAttribute(name, value, propertyInfo)) {
1530
+ return '';
1531
+ }
1532
+
1533
+ if (propertyInfo !== null) {
1534
+ var attributeName = propertyInfo.attributeName;
1535
+ var type = propertyInfo.type;
1536
+
1537
+ if (type === BOOLEAN || type === OVERLOADED_BOOLEAN && value === true) {
1538
+ return attributeName + '=""';
1539
+ } else {
1540
+ if (propertyInfo.sanitizeURL) {
1541
+ value = '' + value;
1542
+ sanitizeURL(value);
1543
+ }
1544
+
1545
+ return attributeName + '=' + quoteAttributeValueForBrowser(value);
1546
+ }
1547
+ } else if (isAttributeNameSafe(name)) {
1548
+ return name + '=' + quoteAttributeValueForBrowser(value);
1549
+ }
1550
+
1551
+ return '';
1552
+ }
1553
+ /**
1554
+ * Creates markup for a custom property.
1555
+ *
1556
+ * @param {string} name
1557
+ * @param {*} value
1558
+ * @return {string} Markup string, or empty string if the property was invalid.
1559
+ */
1560
+
1561
+ function createMarkupForCustomAttribute(name, value) {
1562
+ if (!isAttributeNameSafe(name) || value == null) {
1563
+ return '';
1564
+ }
1565
+
1566
+ return name + '=' + quoteAttributeValueForBrowser(value);
1567
+ }
1568
+
1569
+ /**
1570
+ * inlined Object.is polyfill to avoid requiring consumers ship their own
1571
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
1572
+ */
1573
+ function is(x, y) {
1574
+ return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare
1575
+ ;
1576
+ }
1577
+
1578
+ var objectIs = typeof Object.is === 'function' ? Object.is : is;
1579
+
1580
+ var currentlyRenderingComponent = null;
1581
+ var firstWorkInProgressHook = null;
1582
+ var workInProgressHook = null; // Whether the work-in-progress hook is a re-rendered hook
1583
+
1584
+ var isReRender = false; // Whether an update was scheduled during the currently executing render pass.
1585
+
1586
+ var didScheduleRenderPhaseUpdate = false; // Lazily created map of render-phase updates
1587
+
1588
+ var renderPhaseUpdates = null; // Counter to prevent infinite loops.
1589
+
1590
+ var numberOfReRenders = 0;
1591
+ var RE_RENDER_LIMIT = 25;
1592
+ var isInHookUserCodeInDev = false; // In DEV, this is the name of the currently executing primitive hook
1593
+
1594
+ var currentHookNameInDev;
1595
+
1596
+ function resolveCurrentlyRenderingComponent() {
1597
+ if (!(currentlyRenderingComponent !== null)) {
1598
+ {
1599
+ 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." );
1600
+ }
1601
+ }
1602
+
1603
+ {
1604
+ if (isInHookUserCodeInDev) {
1605
+ error('Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://reactjs.org/link/rules-of-hooks');
1606
+ }
1607
+ }
1608
+
1609
+ return currentlyRenderingComponent;
1610
+ }
1611
+
1612
+ function areHookInputsEqual(nextDeps, prevDeps) {
1613
+ if (prevDeps === null) {
1614
+ {
1615
+ error('%s received a final argument during this render, but not during ' + 'the previous render. Even though the final argument is optional, ' + 'its type cannot change between renders.', currentHookNameInDev);
1616
+ }
1617
+
1618
+ return false;
1619
+ }
1620
+
1621
+ {
1622
+ // Don't bother comparing lengths in prod because these arrays should be
1623
+ // passed inline.
1624
+ if (nextDeps.length !== prevDeps.length) {
1625
+ error('The final argument passed to %s changed size between renders. The ' + 'order and size of this array must remain constant.\n\n' + 'Previous: %s\n' + 'Incoming: %s', currentHookNameInDev, "[" + nextDeps.join(', ') + "]", "[" + prevDeps.join(', ') + "]");
1626
+ }
1627
+ }
1628
+
1629
+ for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) {
1630
+ if (objectIs(nextDeps[i], prevDeps[i])) {
1631
+ continue;
1632
+ }
1633
+
1634
+ return false;
1635
+ }
1636
+
1637
+ return true;
1638
+ }
1639
+
1640
+ function createHook() {
1641
+ if (numberOfReRenders > 0) {
1642
+ {
1643
+ {
1644
+ throw Error( "Rendered more hooks than during the previous render" );
1645
+ }
1646
+ }
1647
+ }
1648
+
1649
+ return {
1650
+ memoizedState: null,
1651
+ queue: null,
1652
+ next: null
1653
+ };
1654
+ }
1655
+
1656
+ function createWorkInProgressHook() {
1657
+ if (workInProgressHook === null) {
1658
+ // This is the first hook in the list
1659
+ if (firstWorkInProgressHook === null) {
1660
+ isReRender = false;
1661
+ firstWorkInProgressHook = workInProgressHook = createHook();
1662
+ } else {
1663
+ // There's already a work-in-progress. Reuse it.
1664
+ isReRender = true;
1665
+ workInProgressHook = firstWorkInProgressHook;
1666
+ }
1667
+ } else {
1668
+ if (workInProgressHook.next === null) {
1669
+ isReRender = false; // Append to the end of the list
1670
+
1671
+ workInProgressHook = workInProgressHook.next = createHook();
1672
+ } else {
1673
+ // There's already a work-in-progress. Reuse it.
1674
+ isReRender = true;
1675
+ workInProgressHook = workInProgressHook.next;
1676
+ }
1677
+ }
1678
+
1679
+ return workInProgressHook;
1680
+ }
1681
+
1682
+ function prepareToUseHooks(componentIdentity) {
1683
+ currentlyRenderingComponent = componentIdentity;
1684
+
1685
+ {
1686
+ isInHookUserCodeInDev = false;
1687
+ } // The following should have already been reset
1688
+ // didScheduleRenderPhaseUpdate = false;
1689
+ // firstWorkInProgressHook = null;
1690
+ // numberOfReRenders = 0;
1691
+ // renderPhaseUpdates = null;
1692
+ // workInProgressHook = null;
1693
+
1694
+ }
1695
+ function finishHooks(Component, props, children, refOrContext) {
1696
+ // This must be called after every function component to prevent hooks from
1697
+ // being used in classes.
1698
+ while (didScheduleRenderPhaseUpdate) {
1699
+ // Updates were scheduled during the render phase. They are stored in
1700
+ // the `renderPhaseUpdates` map. Call the component again, reusing the
1701
+ // work-in-progress hooks and applying the additional updates on top. Keep
1702
+ // restarting until no more updates are scheduled.
1703
+ didScheduleRenderPhaseUpdate = false;
1704
+ numberOfReRenders += 1; // Start over from the beginning of the list
1705
+
1706
+ workInProgressHook = null;
1707
+ children = Component(props, refOrContext);
1708
+ }
1709
+
1710
+ resetHooksState();
1711
+ return children;
1712
+ } // Reset the internal hooks state if an error occurs while rendering a component
1713
+
1714
+ function resetHooksState() {
1715
+ {
1716
+ isInHookUserCodeInDev = false;
1717
+ }
1718
+
1719
+ currentlyRenderingComponent = null;
1720
+ didScheduleRenderPhaseUpdate = false;
1721
+ firstWorkInProgressHook = null;
1722
+ numberOfReRenders = 0;
1723
+ renderPhaseUpdates = null;
1724
+ workInProgressHook = null;
1725
+ }
1726
+
1727
+ function readContext(context, observedBits) {
1728
+ var threadID = currentPartialRenderer.threadID;
1729
+ validateContextBounds(context, threadID);
1730
+
1731
+ {
1732
+ if (isInHookUserCodeInDev) {
1733
+ error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');
1734
+ }
1735
+ }
1736
+
1737
+ return context[threadID];
1738
+ }
1739
+
1740
+ function useContext(context, observedBits) {
1741
+ {
1742
+ currentHookNameInDev = 'useContext';
1743
+ }
1744
+
1745
+ resolveCurrentlyRenderingComponent();
1746
+ var threadID = currentPartialRenderer.threadID;
1747
+ validateContextBounds(context, threadID);
1748
+ return context[threadID];
1749
+ }
1750
+
1751
+ function basicStateReducer(state, action) {
1752
+ // $FlowFixMe: Flow doesn't like mixed types
1753
+ return typeof action === 'function' ? action(state) : action;
1754
+ }
1755
+
1756
+ function useState(initialState) {
1757
+ {
1758
+ currentHookNameInDev = 'useState';
1759
+ }
1760
+
1761
+ return useReducer(basicStateReducer, // useReducer has a special case to support lazy useState initializers
1762
+ initialState);
1763
+ }
1764
+ function useReducer(reducer, initialArg, init) {
1765
+ {
1766
+ if (reducer !== basicStateReducer) {
1767
+ currentHookNameInDev = 'useReducer';
1768
+ }
1769
+ }
1770
+
1771
+ currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
1772
+ workInProgressHook = createWorkInProgressHook();
1773
+
1774
+ if (isReRender) {
1775
+ // This is a re-render. Apply the new render phase updates to the previous
1776
+ // current hook.
1777
+ var queue = workInProgressHook.queue;
1778
+ var dispatch = queue.dispatch;
1779
+
1780
+ if (renderPhaseUpdates !== null) {
1781
+ // Render phase updates are stored in a map of queue -> linked list
1782
+ var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue);
1783
+
1784
+ if (firstRenderPhaseUpdate !== undefined) {
1785
+ renderPhaseUpdates.delete(queue);
1786
+ var newState = workInProgressHook.memoizedState;
1787
+ var update = firstRenderPhaseUpdate;
1788
+
1789
+ do {
1790
+ // Process this render phase update. We don't have to check the
1791
+ // priority because it will always be the same as the current
1792
+ // render's.
1793
+ var action = update.action;
1794
+
1795
+ {
1796
+ isInHookUserCodeInDev = true;
1797
+ }
1798
+
1799
+ newState = reducer(newState, action);
1800
+
1801
+ {
1802
+ isInHookUserCodeInDev = false;
1803
+ }
1804
+
1805
+ update = update.next;
1806
+ } while (update !== null);
1807
+
1808
+ workInProgressHook.memoizedState = newState;
1809
+ return [newState, dispatch];
1810
+ }
1811
+ }
1812
+
1813
+ return [workInProgressHook.memoizedState, dispatch];
1814
+ } else {
1815
+ {
1816
+ isInHookUserCodeInDev = true;
1817
+ }
1818
+
1819
+ var initialState;
1820
+
1821
+ if (reducer === basicStateReducer) {
1822
+ // Special case for `useState`.
1823
+ initialState = typeof initialArg === 'function' ? initialArg() : initialArg;
1824
+ } else {
1825
+ initialState = init !== undefined ? init(initialArg) : initialArg;
1826
+ }
1827
+
1828
+ {
1829
+ isInHookUserCodeInDev = false;
1830
+ }
1831
+
1832
+ workInProgressHook.memoizedState = initialState;
1833
+
1834
+ var _queue = workInProgressHook.queue = {
1835
+ last: null,
1836
+ dispatch: null
1837
+ };
1838
+
1839
+ var _dispatch = _queue.dispatch = dispatchAction.bind(null, currentlyRenderingComponent, _queue);
1840
+
1841
+ return [workInProgressHook.memoizedState, _dispatch];
1842
+ }
1843
+ }
1844
+
1845
+ function useMemo(nextCreate, deps) {
1846
+ currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
1847
+ workInProgressHook = createWorkInProgressHook();
1848
+ var nextDeps = deps === undefined ? null : deps;
1849
+
1850
+ if (workInProgressHook !== null) {
1851
+ var prevState = workInProgressHook.memoizedState;
1852
+
1853
+ if (prevState !== null) {
1854
+ if (nextDeps !== null) {
1855
+ var prevDeps = prevState[1];
1856
+
1857
+ if (areHookInputsEqual(nextDeps, prevDeps)) {
1858
+ return prevState[0];
1859
+ }
1860
+ }
1861
+ }
1862
+ }
1863
+
1864
+ {
1865
+ isInHookUserCodeInDev = true;
1866
+ }
1867
+
1868
+ var nextValue = nextCreate();
1869
+
1870
+ {
1871
+ isInHookUserCodeInDev = false;
1872
+ }
1873
+
1874
+ workInProgressHook.memoizedState = [nextValue, nextDeps];
1875
+ return nextValue;
1876
+ }
1877
+
1878
+ function useRef(initialValue) {
1879
+ currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
1880
+ workInProgressHook = createWorkInProgressHook();
1881
+ var previousRef = workInProgressHook.memoizedState;
1882
+
1883
+ if (previousRef === null) {
1884
+ var ref = {
1885
+ current: initialValue
1886
+ };
1887
+
1888
+ {
1889
+ Object.seal(ref);
1890
+ }
1891
+
1892
+ workInProgressHook.memoizedState = ref;
1893
+ return ref;
1894
+ } else {
1895
+ return previousRef;
1896
+ }
1897
+ }
1898
+
1899
+ function useLayoutEffect(create, inputs) {
1900
+ {
1901
+ currentHookNameInDev = 'useLayoutEffect';
1902
+
1903
+ error('useLayoutEffect does nothing on the server, because its effect cannot ' + "be encoded into the server renderer's output format. This will lead " + 'to a mismatch between the initial, non-hydrated UI and the intended ' + 'UI. To avoid this, useLayoutEffect should only be used in ' + 'components that render exclusively on the client. ' + 'See https://reactjs.org/link/uselayouteffect-ssr for common fixes.');
1904
+ }
1905
+ }
1906
+
1907
+ function dispatchAction(componentIdentity, queue, action) {
1908
+ if (!(numberOfReRenders < RE_RENDER_LIMIT)) {
1909
+ {
1910
+ throw Error( "Too many re-renders. React limits the number of renders to prevent an infinite loop." );
1911
+ }
1912
+ }
1913
+
1914
+ if (componentIdentity === currentlyRenderingComponent) {
1915
+ // This is a render phase update. Stash it in a lazily-created map of
1916
+ // queue -> linked list of updates. After this render pass, we'll restart
1917
+ // and apply the stashed updates on top of the work-in-progress hook.
1918
+ didScheduleRenderPhaseUpdate = true;
1919
+ var update = {
1920
+ action: action,
1921
+ next: null
1922
+ };
1923
+
1924
+ if (renderPhaseUpdates === null) {
1925
+ renderPhaseUpdates = new Map();
1926
+ }
1927
+
1928
+ var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue);
1929
+
1930
+ if (firstRenderPhaseUpdate === undefined) {
1931
+ renderPhaseUpdates.set(queue, update);
1932
+ } else {
1933
+ // Append the update to the end of the list.
1934
+ var lastRenderPhaseUpdate = firstRenderPhaseUpdate;
1935
+
1936
+ while (lastRenderPhaseUpdate.next !== null) {
1937
+ lastRenderPhaseUpdate = lastRenderPhaseUpdate.next;
1938
+ }
1939
+
1940
+ lastRenderPhaseUpdate.next = update;
1941
+ }
1942
+ }
1943
+ }
1944
+
1945
+ function useCallback(callback, deps) {
1946
+ return useMemo(function () {
1947
+ return callback;
1948
+ }, deps);
1949
+ } // TODO Decide on how to implement this hook for server rendering.
1950
+ // If a mutation occurs during render, consider triggering a Suspense boundary
1951
+ // and falling back to client rendering.
1952
+
1953
+ function useMutableSource(source, getSnapshot, subscribe) {
1954
+ resolveCurrentlyRenderingComponent();
1955
+ return getSnapshot(source._source);
1956
+ }
1957
+
1958
+ function useDeferredValue(value) {
1959
+ resolveCurrentlyRenderingComponent();
1960
+ return value;
1961
+ }
1962
+
1963
+ function useTransition() {
1964
+ resolveCurrentlyRenderingComponent();
1965
+
1966
+ var startTransition = function (callback) {
1967
+ callback();
1968
+ };
1969
+
1970
+ return [startTransition, false];
1971
+ }
1972
+
1973
+ function useOpaqueIdentifier() {
1974
+ return (currentPartialRenderer.identifierPrefix || '') + 'R:' + (currentPartialRenderer.uniqueID++).toString(36);
1975
+ }
1976
+
1977
+ function noop() {}
1978
+
1979
+ var currentPartialRenderer = null;
1980
+ function setCurrentPartialRenderer(renderer) {
1981
+ currentPartialRenderer = renderer;
1982
+ }
1983
+ var Dispatcher = {
1984
+ readContext: readContext,
1985
+ useContext: useContext,
1986
+ useMemo: useMemo,
1987
+ useReducer: useReducer,
1988
+ useRef: useRef,
1989
+ useState: useState,
1990
+ useLayoutEffect: useLayoutEffect,
1991
+ useCallback: useCallback,
1992
+ // useImperativeHandle is not run in the server environment
1993
+ useImperativeHandle: noop,
1994
+ // Effects are not run in the server environment.
1995
+ useEffect: noop,
1996
+ // Debugging effect
1997
+ useDebugValue: noop,
1998
+ useDeferredValue: useDeferredValue,
1999
+ useTransition: useTransition,
2000
+ useOpaqueIdentifier: useOpaqueIdentifier,
2001
+ // Subscriptions are not setup in a server environment.
2002
+ useMutableSource: useMutableSource
2003
+ };
2004
+
2005
+ var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
2006
+ var MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
2007
+ var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
2008
+ var Namespaces = {
2009
+ html: HTML_NAMESPACE}; // Assumes there is no parent namespace.
2010
+
2011
+ function getIntrinsicNamespace(type) {
2012
+ switch (type) {
2013
+ case 'svg':
2014
+ return SVG_NAMESPACE;
2015
+
2016
+ case 'math':
2017
+ return MATH_NAMESPACE;
2018
+
2019
+ default:
2020
+ return HTML_NAMESPACE;
2021
+ }
2022
+ }
2023
+ function getChildNamespace(parentNamespace, type) {
2024
+ if (parentNamespace == null || parentNamespace === HTML_NAMESPACE) {
2025
+ // No (or default) parent namespace: potential entry point.
2026
+ return getIntrinsicNamespace(type);
2027
+ }
2028
+
2029
+ if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') {
2030
+ // We're leaving SVG.
2031
+ return HTML_NAMESPACE;
2032
+ } // By default, pass namespace below.
2033
+
2034
+
2035
+ return parentNamespace;
2036
+ }
2037
+
2038
+ var hasReadOnlyValue = {
2039
+ button: true,
2040
+ checkbox: true,
2041
+ image: true,
2042
+ hidden: true,
2043
+ radio: true,
2044
+ reset: true,
2045
+ submit: true
2046
+ };
2047
+ function checkControlledValueProps(tagName, props) {
2048
+ {
2049
+ if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) {
2050
+ error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
2051
+ }
2052
+
2053
+ if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) {
2054
+ error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
2055
+ }
2056
+ }
2057
+ }
2058
+
2059
+ // For HTML, certain tags should omit their close tag. We keep a list for
2060
+ // those special-case tags.
2061
+ var omittedCloseTags = {
2062
+ area: true,
2063
+ base: true,
2064
+ br: true,
2065
+ col: true,
2066
+ embed: true,
2067
+ hr: true,
2068
+ img: true,
2069
+ input: true,
2070
+ keygen: true,
2071
+ link: true,
2072
+ meta: true,
2073
+ param: true,
2074
+ source: true,
2075
+ track: true,
2076
+ wbr: true // NOTE: menuitem's close tag should be omitted, but that causes problems.
2077
+
2078
+ };
2079
+
2080
+ // `omittedCloseTags` except that `menuitem` should still have its closing tag.
2081
+
2082
+ var voidElementTags = _assign({
2083
+ menuitem: true
2084
+ }, omittedCloseTags);
2085
+
2086
+ var HTML = '__html';
2087
+
2088
+ function assertValidProps(tag, props) {
2089
+ if (!props) {
2090
+ return;
2091
+ } // Note the use of `==` which checks for null or undefined.
2092
+
2093
+
2094
+ if (voidElementTags[tag]) {
2095
+ if (!(props.children == null && props.dangerouslySetInnerHTML == null)) {
2096
+ {
2097
+ throw Error( tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`." );
2098
+ }
2099
+ }
2100
+ }
2101
+
2102
+ if (props.dangerouslySetInnerHTML != null) {
2103
+ if (!(props.children == null)) {
2104
+ {
2105
+ throw Error( "Can only set one of `children` or `props.dangerouslySetInnerHTML`." );
2106
+ }
2107
+ }
2108
+
2109
+ if (!(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML)) {
2110
+ {
2111
+ throw Error( "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information." );
2112
+ }
2113
+ }
2114
+ }
2115
+
2116
+ {
2117
+ if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) {
2118
+ 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.');
2119
+ }
2120
+ }
2121
+
2122
+ if (!(props.style == null || typeof props.style === 'object')) {
2123
+ {
2124
+ 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." );
2125
+ }
2126
+ }
2127
+ }
2128
+
2129
+ /**
2130
+ * CSS properties which accept numbers but are not in units of "px".
2131
+ */
2132
+ var isUnitlessNumber = {
2133
+ animationIterationCount: true,
2134
+ borderImageOutset: true,
2135
+ borderImageSlice: true,
2136
+ borderImageWidth: true,
2137
+ boxFlex: true,
2138
+ boxFlexGroup: true,
2139
+ boxOrdinalGroup: true,
2140
+ columnCount: true,
2141
+ columns: true,
2142
+ flex: true,
2143
+ flexGrow: true,
2144
+ flexPositive: true,
2145
+ flexShrink: true,
2146
+ flexNegative: true,
2147
+ flexOrder: true,
2148
+ gridArea: true,
2149
+ gridRow: true,
2150
+ gridRowEnd: true,
2151
+ gridRowSpan: true,
2152
+ gridRowStart: true,
2153
+ gridColumn: true,
2154
+ gridColumnEnd: true,
2155
+ gridColumnSpan: true,
2156
+ gridColumnStart: true,
2157
+ fontWeight: true,
2158
+ lineClamp: true,
2159
+ lineHeight: true,
2160
+ opacity: true,
2161
+ order: true,
2162
+ orphans: true,
2163
+ tabSize: true,
2164
+ widows: true,
2165
+ zIndex: true,
2166
+ zoom: true,
2167
+ // SVG-related properties
2168
+ fillOpacity: true,
2169
+ floodOpacity: true,
2170
+ stopOpacity: true,
2171
+ strokeDasharray: true,
2172
+ strokeDashoffset: true,
2173
+ strokeMiterlimit: true,
2174
+ strokeOpacity: true,
2175
+ strokeWidth: true
2176
+ };
2177
+ /**
2178
+ * @param {string} prefix vendor-specific prefix, eg: Webkit
2179
+ * @param {string} key style name, eg: transitionDuration
2180
+ * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
2181
+ * WebkitTransitionDuration
2182
+ */
2183
+
2184
+ function prefixKey(prefix, key) {
2185
+ return prefix + key.charAt(0).toUpperCase() + key.substring(1);
2186
+ }
2187
+ /**
2188
+ * Support style names that may come passed in prefixed by adding permutations
2189
+ * of vendor prefixes.
2190
+ */
2191
+
2192
+
2193
+ var prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
2194
+ // infinite loop, because it iterates over the newly added props too.
2195
+
2196
+ Object.keys(isUnitlessNumber).forEach(function (prop) {
2197
+ prefixes.forEach(function (prefix) {
2198
+ isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
2199
+ });
2200
+ });
2201
+
2202
+ /**
2203
+ * Convert a value into the proper css writable value. The style name `name`
2204
+ * should be logical (no hyphens), as specified
2205
+ * in `CSSProperty.isUnitlessNumber`.
2206
+ *
2207
+ * @param {string} name CSS property name such as `topMargin`.
2208
+ * @param {*} value CSS property value such as `10px`.
2209
+ * @return {string} Normalized style value with dimensions applied.
2210
+ */
2211
+
2212
+ function dangerousStyleValue(name, value, isCustomProperty) {
2213
+ // Note that we've removed escapeTextForBrowser() calls here since the
2214
+ // whole string will be escaped when the attribute is injected into
2215
+ // the markup. If you provide unsafe user data here they can inject
2216
+ // arbitrary CSS which may be problematic (I couldn't repro this):
2217
+ // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
2218
+ // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/
2219
+ // This is not an XSS hole but instead a potential CSS injection issue
2220
+ // which has lead to a greater discussion about how we're going to
2221
+ // trust URLs moving forward. See #2115901
2222
+ var isEmpty = value == null || typeof value === 'boolean' || value === '';
2223
+
2224
+ if (isEmpty) {
2225
+ return '';
2226
+ }
2227
+
2228
+ if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) {
2229
+ return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
2230
+ }
2231
+
2232
+ return ('' + value).trim();
2233
+ }
2234
+
2235
+ var uppercasePattern = /([A-Z])/g;
2236
+ var msPattern = /^ms-/;
2237
+ /**
2238
+ * Hyphenates a camelcased CSS property name, for example:
2239
+ *
2240
+ * > hyphenateStyleName('backgroundColor')
2241
+ * < "background-color"
2242
+ * > hyphenateStyleName('MozTransition')
2243
+ * < "-moz-transition"
2244
+ * > hyphenateStyleName('msTransition')
2245
+ * < "-ms-transition"
2246
+ *
2247
+ * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
2248
+ * is converted to `-ms-`.
2249
+ */
2250
+
2251
+ function hyphenateStyleName(name) {
2252
+ return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');
2253
+ }
2254
+
2255
+ function isCustomComponent(tagName, props) {
2256
+ if (tagName.indexOf('-') === -1) {
2257
+ return typeof props.is === 'string';
2258
+ }
2259
+
2260
+ switch (tagName) {
2261
+ // These are reserved SVG and MathML elements.
2262
+ // We don't mind this list too much because we expect it to never grow.
2263
+ // The alternative is to track the namespace in a few places which is convoluted.
2264
+ // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts
2265
+ case 'annotation-xml':
2266
+ case 'color-profile':
2267
+ case 'font-face':
2268
+ case 'font-face-src':
2269
+ case 'font-face-uri':
2270
+ case 'font-face-format':
2271
+ case 'font-face-name':
2272
+ case 'missing-glyph':
2273
+ return false;
2274
+
2275
+ default:
2276
+ return true;
2277
+ }
2278
+ }
2279
+
2280
+ var warnValidStyle = function () {};
2281
+
2282
+ {
2283
+ // 'msTransform' is correct, but the other prefixes should be capitalized
2284
+ var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
2285
+ var msPattern$1 = /^-ms-/;
2286
+ var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon
2287
+
2288
+ var badStyleValueWithSemicolonPattern = /;\s*$/;
2289
+ var warnedStyleNames = {};
2290
+ var warnedStyleValues = {};
2291
+ var warnedForNaNValue = false;
2292
+ var warnedForInfinityValue = false;
2293
+
2294
+ var camelize = function (string) {
2295
+ return string.replace(hyphenPattern, function (_, character) {
2296
+ return character.toUpperCase();
2297
+ });
2298
+ };
2299
+
2300
+ var warnHyphenatedStyleName = function (name) {
2301
+ if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
2302
+ return;
2303
+ }
2304
+
2305
+ warnedStyleNames[name] = true;
2306
+
2307
+ error('Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests
2308
+ // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
2309
+ // is converted to lowercase `ms`.
2310
+ camelize(name.replace(msPattern$1, 'ms-')));
2311
+ };
2312
+
2313
+ var warnBadVendoredStyleName = function (name) {
2314
+ if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
2315
+ return;
2316
+ }
2317
+
2318
+ warnedStyleNames[name] = true;
2319
+
2320
+ error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));
2321
+ };
2322
+
2323
+ var warnStyleValueWithSemicolon = function (name, value) {
2324
+ if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
2325
+ return;
2326
+ }
2327
+
2328
+ warnedStyleValues[value] = true;
2329
+
2330
+ error("Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));
2331
+ };
2332
+
2333
+ var warnStyleValueIsNaN = function (name, value) {
2334
+ if (warnedForNaNValue) {
2335
+ return;
2336
+ }
2337
+
2338
+ warnedForNaNValue = true;
2339
+
2340
+ error('`NaN` is an invalid value for the `%s` css style property.', name);
2341
+ };
2342
+
2343
+ var warnStyleValueIsInfinity = function (name, value) {
2344
+ if (warnedForInfinityValue) {
2345
+ return;
2346
+ }
2347
+
2348
+ warnedForInfinityValue = true;
2349
+
2350
+ error('`Infinity` is an invalid value for the `%s` css style property.', name);
2351
+ };
2352
+
2353
+ warnValidStyle = function (name, value) {
2354
+ if (name.indexOf('-') > -1) {
2355
+ warnHyphenatedStyleName(name);
2356
+ } else if (badVendoredStyleNamePattern.test(name)) {
2357
+ warnBadVendoredStyleName(name);
2358
+ } else if (badStyleValueWithSemicolonPattern.test(value)) {
2359
+ warnStyleValueWithSemicolon(name, value);
2360
+ }
2361
+
2362
+ if (typeof value === 'number') {
2363
+ if (isNaN(value)) {
2364
+ warnStyleValueIsNaN(name, value);
2365
+ } else if (!isFinite(value)) {
2366
+ warnStyleValueIsInfinity(name, value);
2367
+ }
2368
+ }
2369
+ };
2370
+ }
2371
+
2372
+ var warnValidStyle$1 = warnValidStyle;
2373
+
2374
+ var ariaProperties = {
2375
+ 'aria-current': 0,
2376
+ // state
2377
+ 'aria-details': 0,
2378
+ 'aria-disabled': 0,
2379
+ // state
2380
+ 'aria-hidden': 0,
2381
+ // state
2382
+ 'aria-invalid': 0,
2383
+ // state
2384
+ 'aria-keyshortcuts': 0,
2385
+ 'aria-label': 0,
2386
+ 'aria-roledescription': 0,
2387
+ // Widget Attributes
2388
+ 'aria-autocomplete': 0,
2389
+ 'aria-checked': 0,
2390
+ 'aria-expanded': 0,
2391
+ 'aria-haspopup': 0,
2392
+ 'aria-level': 0,
2393
+ 'aria-modal': 0,
2394
+ 'aria-multiline': 0,
2395
+ 'aria-multiselectable': 0,
2396
+ 'aria-orientation': 0,
2397
+ 'aria-placeholder': 0,
2398
+ 'aria-pressed': 0,
2399
+ 'aria-readonly': 0,
2400
+ 'aria-required': 0,
2401
+ 'aria-selected': 0,
2402
+ 'aria-sort': 0,
2403
+ 'aria-valuemax': 0,
2404
+ 'aria-valuemin': 0,
2405
+ 'aria-valuenow': 0,
2406
+ 'aria-valuetext': 0,
2407
+ // Live Region Attributes
2408
+ 'aria-atomic': 0,
2409
+ 'aria-busy': 0,
2410
+ 'aria-live': 0,
2411
+ 'aria-relevant': 0,
2412
+ // Drag-and-Drop Attributes
2413
+ 'aria-dropeffect': 0,
2414
+ 'aria-grabbed': 0,
2415
+ // Relationship Attributes
2416
+ 'aria-activedescendant': 0,
2417
+ 'aria-colcount': 0,
2418
+ 'aria-colindex': 0,
2419
+ 'aria-colspan': 0,
2420
+ 'aria-controls': 0,
2421
+ 'aria-describedby': 0,
2422
+ 'aria-errormessage': 0,
2423
+ 'aria-flowto': 0,
2424
+ 'aria-labelledby': 0,
2425
+ 'aria-owns': 0,
2426
+ 'aria-posinset': 0,
2427
+ 'aria-rowcount': 0,
2428
+ 'aria-rowindex': 0,
2429
+ 'aria-rowspan': 0,
2430
+ 'aria-setsize': 0
2431
+ };
2432
+
2433
+ var warnedProperties = {};
2434
+ var rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
2435
+ var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
2436
+ var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
2437
+
2438
+ function validateProperty(tagName, name) {
2439
+ {
2440
+ if (hasOwnProperty$1.call(warnedProperties, name) && warnedProperties[name]) {
2441
+ return true;
2442
+ }
2443
+
2444
+ if (rARIACamel.test(name)) {
2445
+ var ariaName = 'aria-' + name.slice(4).toLowerCase();
2446
+ var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM
2447
+ // DOM properties, then it is an invalid aria-* attribute.
2448
+
2449
+ if (correctName == null) {
2450
+ error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);
2451
+
2452
+ warnedProperties[name] = true;
2453
+ return true;
2454
+ } // aria-* attributes should be lowercase; suggest the lowercase version.
2455
+
2456
+
2457
+ if (name !== correctName) {
2458
+ error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);
2459
+
2460
+ warnedProperties[name] = true;
2461
+ return true;
2462
+ }
2463
+ }
2464
+
2465
+ if (rARIA.test(name)) {
2466
+ var lowerCasedName = name.toLowerCase();
2467
+ var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM
2468
+ // DOM properties, then it is an invalid aria-* attribute.
2469
+
2470
+ if (standardName == null) {
2471
+ warnedProperties[name] = true;
2472
+ return false;
2473
+ } // aria-* attributes should be lowercase; suggest the lowercase version.
2474
+
2475
+
2476
+ if (name !== standardName) {
2477
+ error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);
2478
+
2479
+ warnedProperties[name] = true;
2480
+ return true;
2481
+ }
2482
+ }
2483
+ }
2484
+
2485
+ return true;
2486
+ }
2487
+
2488
+ function warnInvalidARIAProps(type, props) {
2489
+ {
2490
+ var invalidProps = [];
2491
+
2492
+ for (var key in props) {
2493
+ var isValid = validateProperty(type, key);
2494
+
2495
+ if (!isValid) {
2496
+ invalidProps.push(key);
2497
+ }
2498
+ }
2499
+
2500
+ var unknownPropString = invalidProps.map(function (prop) {
2501
+ return '`' + prop + '`';
2502
+ }).join(', ');
2503
+
2504
+ if (invalidProps.length === 1) {
2505
+ error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
2506
+ } else if (invalidProps.length > 1) {
2507
+ error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
2508
+ }
2509
+ }
2510
+ }
2511
+
2512
+ function validateProperties(type, props) {
2513
+ if (isCustomComponent(type, props)) {
2514
+ return;
2515
+ }
2516
+
2517
+ warnInvalidARIAProps(type, props);
2518
+ }
2519
+
2520
+ var didWarnValueNull = false;
2521
+ function validateProperties$1(type, props) {
2522
+ {
2523
+ if (type !== 'input' && type !== 'textarea' && type !== 'select') {
2524
+ return;
2525
+ }
2526
+
2527
+ if (props != null && props.value === null && !didWarnValueNull) {
2528
+ didWarnValueNull = true;
2529
+
2530
+ if (type === 'select' && props.multiple) {
2531
+ error('`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.', type);
2532
+ } else {
2533
+ error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);
2534
+ }
2535
+ }
2536
+ }
2537
+ }
2538
+
2539
+ // When adding attributes to the HTML or SVG allowed attribute list, be sure to
2540
+ // also add them to this module to ensure casing and incorrect name
2541
+ // warnings.
2542
+ var possibleStandardNames = {
2543
+ // HTML
2544
+ accept: 'accept',
2545
+ acceptcharset: 'acceptCharset',
2546
+ 'accept-charset': 'acceptCharset',
2547
+ accesskey: 'accessKey',
2548
+ action: 'action',
2549
+ allowfullscreen: 'allowFullScreen',
2550
+ alt: 'alt',
2551
+ as: 'as',
2552
+ async: 'async',
2553
+ autocapitalize: 'autoCapitalize',
2554
+ autocomplete: 'autoComplete',
2555
+ autocorrect: 'autoCorrect',
2556
+ autofocus: 'autoFocus',
2557
+ autoplay: 'autoPlay',
2558
+ autosave: 'autoSave',
2559
+ capture: 'capture',
2560
+ cellpadding: 'cellPadding',
2561
+ cellspacing: 'cellSpacing',
2562
+ challenge: 'challenge',
2563
+ charset: 'charSet',
2564
+ checked: 'checked',
2565
+ children: 'children',
2566
+ cite: 'cite',
2567
+ class: 'className',
2568
+ classid: 'classID',
2569
+ classname: 'className',
2570
+ cols: 'cols',
2571
+ colspan: 'colSpan',
2572
+ content: 'content',
2573
+ contenteditable: 'contentEditable',
2574
+ contextmenu: 'contextMenu',
2575
+ controls: 'controls',
2576
+ controlslist: 'controlsList',
2577
+ coords: 'coords',
2578
+ crossorigin: 'crossOrigin',
2579
+ dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',
2580
+ data: 'data',
2581
+ datetime: 'dateTime',
2582
+ default: 'default',
2583
+ defaultchecked: 'defaultChecked',
2584
+ defaultvalue: 'defaultValue',
2585
+ defer: 'defer',
2586
+ dir: 'dir',
2587
+ disabled: 'disabled',
2588
+ disablepictureinpicture: 'disablePictureInPicture',
2589
+ disableremoteplayback: 'disableRemotePlayback',
2590
+ download: 'download',
2591
+ draggable: 'draggable',
2592
+ enctype: 'encType',
2593
+ enterkeyhint: 'enterKeyHint',
2594
+ for: 'htmlFor',
2595
+ form: 'form',
2596
+ formmethod: 'formMethod',
2597
+ formaction: 'formAction',
2598
+ formenctype: 'formEncType',
2599
+ formnovalidate: 'formNoValidate',
2600
+ formtarget: 'formTarget',
2601
+ frameborder: 'frameBorder',
2602
+ headers: 'headers',
2603
+ height: 'height',
2604
+ hidden: 'hidden',
2605
+ high: 'high',
2606
+ href: 'href',
2607
+ hreflang: 'hrefLang',
2608
+ htmlfor: 'htmlFor',
2609
+ httpequiv: 'httpEquiv',
2610
+ 'http-equiv': 'httpEquiv',
2611
+ icon: 'icon',
2612
+ id: 'id',
2613
+ innerhtml: 'innerHTML',
2614
+ inputmode: 'inputMode',
2615
+ integrity: 'integrity',
2616
+ is: 'is',
2617
+ itemid: 'itemID',
2618
+ itemprop: 'itemProp',
2619
+ itemref: 'itemRef',
2620
+ itemscope: 'itemScope',
2621
+ itemtype: 'itemType',
2622
+ keyparams: 'keyParams',
2623
+ keytype: 'keyType',
2624
+ kind: 'kind',
2625
+ label: 'label',
2626
+ lang: 'lang',
2627
+ list: 'list',
2628
+ loop: 'loop',
2629
+ low: 'low',
2630
+ manifest: 'manifest',
2631
+ marginwidth: 'marginWidth',
2632
+ marginheight: 'marginHeight',
2633
+ max: 'max',
2634
+ maxlength: 'maxLength',
2635
+ media: 'media',
2636
+ mediagroup: 'mediaGroup',
2637
+ method: 'method',
2638
+ min: 'min',
2639
+ minlength: 'minLength',
2640
+ multiple: 'multiple',
2641
+ muted: 'muted',
2642
+ name: 'name',
2643
+ nomodule: 'noModule',
2644
+ nonce: 'nonce',
2645
+ novalidate: 'noValidate',
2646
+ open: 'open',
2647
+ optimum: 'optimum',
2648
+ pattern: 'pattern',
2649
+ placeholder: 'placeholder',
2650
+ playsinline: 'playsInline',
2651
+ poster: 'poster',
2652
+ preload: 'preload',
2653
+ profile: 'profile',
2654
+ radiogroup: 'radioGroup',
2655
+ readonly: 'readOnly',
2656
+ referrerpolicy: 'referrerPolicy',
2657
+ rel: 'rel',
2658
+ required: 'required',
2659
+ reversed: 'reversed',
2660
+ role: 'role',
2661
+ rows: 'rows',
2662
+ rowspan: 'rowSpan',
2663
+ sandbox: 'sandbox',
2664
+ scope: 'scope',
2665
+ scoped: 'scoped',
2666
+ scrolling: 'scrolling',
2667
+ seamless: 'seamless',
2668
+ selected: 'selected',
2669
+ shape: 'shape',
2670
+ size: 'size',
2671
+ sizes: 'sizes',
2672
+ span: 'span',
2673
+ spellcheck: 'spellCheck',
2674
+ src: 'src',
2675
+ srcdoc: 'srcDoc',
2676
+ srclang: 'srcLang',
2677
+ srcset: 'srcSet',
2678
+ start: 'start',
2679
+ step: 'step',
2680
+ style: 'style',
2681
+ summary: 'summary',
2682
+ tabindex: 'tabIndex',
2683
+ target: 'target',
2684
+ title: 'title',
2685
+ type: 'type',
2686
+ usemap: 'useMap',
2687
+ value: 'value',
2688
+ width: 'width',
2689
+ wmode: 'wmode',
2690
+ wrap: 'wrap',
2691
+ // SVG
2692
+ about: 'about',
2693
+ accentheight: 'accentHeight',
2694
+ 'accent-height': 'accentHeight',
2695
+ accumulate: 'accumulate',
2696
+ additive: 'additive',
2697
+ alignmentbaseline: 'alignmentBaseline',
2698
+ 'alignment-baseline': 'alignmentBaseline',
2699
+ allowreorder: 'allowReorder',
2700
+ alphabetic: 'alphabetic',
2701
+ amplitude: 'amplitude',
2702
+ arabicform: 'arabicForm',
2703
+ 'arabic-form': 'arabicForm',
2704
+ ascent: 'ascent',
2705
+ attributename: 'attributeName',
2706
+ attributetype: 'attributeType',
2707
+ autoreverse: 'autoReverse',
2708
+ azimuth: 'azimuth',
2709
+ basefrequency: 'baseFrequency',
2710
+ baselineshift: 'baselineShift',
2711
+ 'baseline-shift': 'baselineShift',
2712
+ baseprofile: 'baseProfile',
2713
+ bbox: 'bbox',
2714
+ begin: 'begin',
2715
+ bias: 'bias',
2716
+ by: 'by',
2717
+ calcmode: 'calcMode',
2718
+ capheight: 'capHeight',
2719
+ 'cap-height': 'capHeight',
2720
+ clip: 'clip',
2721
+ clippath: 'clipPath',
2722
+ 'clip-path': 'clipPath',
2723
+ clippathunits: 'clipPathUnits',
2724
+ cliprule: 'clipRule',
2725
+ 'clip-rule': 'clipRule',
2726
+ color: 'color',
2727
+ colorinterpolation: 'colorInterpolation',
2728
+ 'color-interpolation': 'colorInterpolation',
2729
+ colorinterpolationfilters: 'colorInterpolationFilters',
2730
+ 'color-interpolation-filters': 'colorInterpolationFilters',
2731
+ colorprofile: 'colorProfile',
2732
+ 'color-profile': 'colorProfile',
2733
+ colorrendering: 'colorRendering',
2734
+ 'color-rendering': 'colorRendering',
2735
+ contentscripttype: 'contentScriptType',
2736
+ contentstyletype: 'contentStyleType',
2737
+ cursor: 'cursor',
2738
+ cx: 'cx',
2739
+ cy: 'cy',
2740
+ d: 'd',
2741
+ datatype: 'datatype',
2742
+ decelerate: 'decelerate',
2743
+ descent: 'descent',
2744
+ diffuseconstant: 'diffuseConstant',
2745
+ direction: 'direction',
2746
+ display: 'display',
2747
+ divisor: 'divisor',
2748
+ dominantbaseline: 'dominantBaseline',
2749
+ 'dominant-baseline': 'dominantBaseline',
2750
+ dur: 'dur',
2751
+ dx: 'dx',
2752
+ dy: 'dy',
2753
+ edgemode: 'edgeMode',
2754
+ elevation: 'elevation',
2755
+ enablebackground: 'enableBackground',
2756
+ 'enable-background': 'enableBackground',
2757
+ end: 'end',
2758
+ exponent: 'exponent',
2759
+ externalresourcesrequired: 'externalResourcesRequired',
2760
+ fill: 'fill',
2761
+ fillopacity: 'fillOpacity',
2762
+ 'fill-opacity': 'fillOpacity',
2763
+ fillrule: 'fillRule',
2764
+ 'fill-rule': 'fillRule',
2765
+ filter: 'filter',
2766
+ filterres: 'filterRes',
2767
+ filterunits: 'filterUnits',
2768
+ floodopacity: 'floodOpacity',
2769
+ 'flood-opacity': 'floodOpacity',
2770
+ floodcolor: 'floodColor',
2771
+ 'flood-color': 'floodColor',
2772
+ focusable: 'focusable',
2773
+ fontfamily: 'fontFamily',
2774
+ 'font-family': 'fontFamily',
2775
+ fontsize: 'fontSize',
2776
+ 'font-size': 'fontSize',
2777
+ fontsizeadjust: 'fontSizeAdjust',
2778
+ 'font-size-adjust': 'fontSizeAdjust',
2779
+ fontstretch: 'fontStretch',
2780
+ 'font-stretch': 'fontStretch',
2781
+ fontstyle: 'fontStyle',
2782
+ 'font-style': 'fontStyle',
2783
+ fontvariant: 'fontVariant',
2784
+ 'font-variant': 'fontVariant',
2785
+ fontweight: 'fontWeight',
2786
+ 'font-weight': 'fontWeight',
2787
+ format: 'format',
2788
+ from: 'from',
2789
+ fx: 'fx',
2790
+ fy: 'fy',
2791
+ g1: 'g1',
2792
+ g2: 'g2',
2793
+ glyphname: 'glyphName',
2794
+ 'glyph-name': 'glyphName',
2795
+ glyphorientationhorizontal: 'glyphOrientationHorizontal',
2796
+ 'glyph-orientation-horizontal': 'glyphOrientationHorizontal',
2797
+ glyphorientationvertical: 'glyphOrientationVertical',
2798
+ 'glyph-orientation-vertical': 'glyphOrientationVertical',
2799
+ glyphref: 'glyphRef',
2800
+ gradienttransform: 'gradientTransform',
2801
+ gradientunits: 'gradientUnits',
2802
+ hanging: 'hanging',
2803
+ horizadvx: 'horizAdvX',
2804
+ 'horiz-adv-x': 'horizAdvX',
2805
+ horizoriginx: 'horizOriginX',
2806
+ 'horiz-origin-x': 'horizOriginX',
2807
+ ideographic: 'ideographic',
2808
+ imagerendering: 'imageRendering',
2809
+ 'image-rendering': 'imageRendering',
2810
+ in2: 'in2',
2811
+ in: 'in',
2812
+ inlist: 'inlist',
2813
+ intercept: 'intercept',
2814
+ k1: 'k1',
2815
+ k2: 'k2',
2816
+ k3: 'k3',
2817
+ k4: 'k4',
2818
+ k: 'k',
2819
+ kernelmatrix: 'kernelMatrix',
2820
+ kernelunitlength: 'kernelUnitLength',
2821
+ kerning: 'kerning',
2822
+ keypoints: 'keyPoints',
2823
+ keysplines: 'keySplines',
2824
+ keytimes: 'keyTimes',
2825
+ lengthadjust: 'lengthAdjust',
2826
+ letterspacing: 'letterSpacing',
2827
+ 'letter-spacing': 'letterSpacing',
2828
+ lightingcolor: 'lightingColor',
2829
+ 'lighting-color': 'lightingColor',
2830
+ limitingconeangle: 'limitingConeAngle',
2831
+ local: 'local',
2832
+ markerend: 'markerEnd',
2833
+ 'marker-end': 'markerEnd',
2834
+ markerheight: 'markerHeight',
2835
+ markermid: 'markerMid',
2836
+ 'marker-mid': 'markerMid',
2837
+ markerstart: 'markerStart',
2838
+ 'marker-start': 'markerStart',
2839
+ markerunits: 'markerUnits',
2840
+ markerwidth: 'markerWidth',
2841
+ mask: 'mask',
2842
+ maskcontentunits: 'maskContentUnits',
2843
+ maskunits: 'maskUnits',
2844
+ mathematical: 'mathematical',
2845
+ mode: 'mode',
2846
+ numoctaves: 'numOctaves',
2847
+ offset: 'offset',
2848
+ opacity: 'opacity',
2849
+ operator: 'operator',
2850
+ order: 'order',
2851
+ orient: 'orient',
2852
+ orientation: 'orientation',
2853
+ origin: 'origin',
2854
+ overflow: 'overflow',
2855
+ overlineposition: 'overlinePosition',
2856
+ 'overline-position': 'overlinePosition',
2857
+ overlinethickness: 'overlineThickness',
2858
+ 'overline-thickness': 'overlineThickness',
2859
+ paintorder: 'paintOrder',
2860
+ 'paint-order': 'paintOrder',
2861
+ panose1: 'panose1',
2862
+ 'panose-1': 'panose1',
2863
+ pathlength: 'pathLength',
2864
+ patterncontentunits: 'patternContentUnits',
2865
+ patterntransform: 'patternTransform',
2866
+ patternunits: 'patternUnits',
2867
+ pointerevents: 'pointerEvents',
2868
+ 'pointer-events': 'pointerEvents',
2869
+ points: 'points',
2870
+ pointsatx: 'pointsAtX',
2871
+ pointsaty: 'pointsAtY',
2872
+ pointsatz: 'pointsAtZ',
2873
+ prefix: 'prefix',
2874
+ preservealpha: 'preserveAlpha',
2875
+ preserveaspectratio: 'preserveAspectRatio',
2876
+ primitiveunits: 'primitiveUnits',
2877
+ property: 'property',
2878
+ r: 'r',
2879
+ radius: 'radius',
2880
+ refx: 'refX',
2881
+ refy: 'refY',
2882
+ renderingintent: 'renderingIntent',
2883
+ 'rendering-intent': 'renderingIntent',
2884
+ repeatcount: 'repeatCount',
2885
+ repeatdur: 'repeatDur',
2886
+ requiredextensions: 'requiredExtensions',
2887
+ requiredfeatures: 'requiredFeatures',
2888
+ resource: 'resource',
2889
+ restart: 'restart',
2890
+ result: 'result',
2891
+ results: 'results',
2892
+ rotate: 'rotate',
2893
+ rx: 'rx',
2894
+ ry: 'ry',
2895
+ scale: 'scale',
2896
+ security: 'security',
2897
+ seed: 'seed',
2898
+ shaperendering: 'shapeRendering',
2899
+ 'shape-rendering': 'shapeRendering',
2900
+ slope: 'slope',
2901
+ spacing: 'spacing',
2902
+ specularconstant: 'specularConstant',
2903
+ specularexponent: 'specularExponent',
2904
+ speed: 'speed',
2905
+ spreadmethod: 'spreadMethod',
2906
+ startoffset: 'startOffset',
2907
+ stddeviation: 'stdDeviation',
2908
+ stemh: 'stemh',
2909
+ stemv: 'stemv',
2910
+ stitchtiles: 'stitchTiles',
2911
+ stopcolor: 'stopColor',
2912
+ 'stop-color': 'stopColor',
2913
+ stopopacity: 'stopOpacity',
2914
+ 'stop-opacity': 'stopOpacity',
2915
+ strikethroughposition: 'strikethroughPosition',
2916
+ 'strikethrough-position': 'strikethroughPosition',
2917
+ strikethroughthickness: 'strikethroughThickness',
2918
+ 'strikethrough-thickness': 'strikethroughThickness',
2919
+ string: 'string',
2920
+ stroke: 'stroke',
2921
+ strokedasharray: 'strokeDasharray',
2922
+ 'stroke-dasharray': 'strokeDasharray',
2923
+ strokedashoffset: 'strokeDashoffset',
2924
+ 'stroke-dashoffset': 'strokeDashoffset',
2925
+ strokelinecap: 'strokeLinecap',
2926
+ 'stroke-linecap': 'strokeLinecap',
2927
+ strokelinejoin: 'strokeLinejoin',
2928
+ 'stroke-linejoin': 'strokeLinejoin',
2929
+ strokemiterlimit: 'strokeMiterlimit',
2930
+ 'stroke-miterlimit': 'strokeMiterlimit',
2931
+ strokewidth: 'strokeWidth',
2932
+ 'stroke-width': 'strokeWidth',
2933
+ strokeopacity: 'strokeOpacity',
2934
+ 'stroke-opacity': 'strokeOpacity',
2935
+ suppresscontenteditablewarning: 'suppressContentEditableWarning',
2936
+ suppresshydrationwarning: 'suppressHydrationWarning',
2937
+ surfacescale: 'surfaceScale',
2938
+ systemlanguage: 'systemLanguage',
2939
+ tablevalues: 'tableValues',
2940
+ targetx: 'targetX',
2941
+ targety: 'targetY',
2942
+ textanchor: 'textAnchor',
2943
+ 'text-anchor': 'textAnchor',
2944
+ textdecoration: 'textDecoration',
2945
+ 'text-decoration': 'textDecoration',
2946
+ textlength: 'textLength',
2947
+ textrendering: 'textRendering',
2948
+ 'text-rendering': 'textRendering',
2949
+ to: 'to',
2950
+ transform: 'transform',
2951
+ typeof: 'typeof',
2952
+ u1: 'u1',
2953
+ u2: 'u2',
2954
+ underlineposition: 'underlinePosition',
2955
+ 'underline-position': 'underlinePosition',
2956
+ underlinethickness: 'underlineThickness',
2957
+ 'underline-thickness': 'underlineThickness',
2958
+ unicode: 'unicode',
2959
+ unicodebidi: 'unicodeBidi',
2960
+ 'unicode-bidi': 'unicodeBidi',
2961
+ unicoderange: 'unicodeRange',
2962
+ 'unicode-range': 'unicodeRange',
2963
+ unitsperem: 'unitsPerEm',
2964
+ 'units-per-em': 'unitsPerEm',
2965
+ unselectable: 'unselectable',
2966
+ valphabetic: 'vAlphabetic',
2967
+ 'v-alphabetic': 'vAlphabetic',
2968
+ values: 'values',
2969
+ vectoreffect: 'vectorEffect',
2970
+ 'vector-effect': 'vectorEffect',
2971
+ version: 'version',
2972
+ vertadvy: 'vertAdvY',
2973
+ 'vert-adv-y': 'vertAdvY',
2974
+ vertoriginx: 'vertOriginX',
2975
+ 'vert-origin-x': 'vertOriginX',
2976
+ vertoriginy: 'vertOriginY',
2977
+ 'vert-origin-y': 'vertOriginY',
2978
+ vhanging: 'vHanging',
2979
+ 'v-hanging': 'vHanging',
2980
+ videographic: 'vIdeographic',
2981
+ 'v-ideographic': 'vIdeographic',
2982
+ viewbox: 'viewBox',
2983
+ viewtarget: 'viewTarget',
2984
+ visibility: 'visibility',
2985
+ vmathematical: 'vMathematical',
2986
+ 'v-mathematical': 'vMathematical',
2987
+ vocab: 'vocab',
2988
+ widths: 'widths',
2989
+ wordspacing: 'wordSpacing',
2990
+ 'word-spacing': 'wordSpacing',
2991
+ writingmode: 'writingMode',
2992
+ 'writing-mode': 'writingMode',
2993
+ x1: 'x1',
2994
+ x2: 'x2',
2995
+ x: 'x',
2996
+ xchannelselector: 'xChannelSelector',
2997
+ xheight: 'xHeight',
2998
+ 'x-height': 'xHeight',
2999
+ xlinkactuate: 'xlinkActuate',
3000
+ 'xlink:actuate': 'xlinkActuate',
3001
+ xlinkarcrole: 'xlinkArcrole',
3002
+ 'xlink:arcrole': 'xlinkArcrole',
3003
+ xlinkhref: 'xlinkHref',
3004
+ 'xlink:href': 'xlinkHref',
3005
+ xlinkrole: 'xlinkRole',
3006
+ 'xlink:role': 'xlinkRole',
3007
+ xlinkshow: 'xlinkShow',
3008
+ 'xlink:show': 'xlinkShow',
3009
+ xlinktitle: 'xlinkTitle',
3010
+ 'xlink:title': 'xlinkTitle',
3011
+ xlinktype: 'xlinkType',
3012
+ 'xlink:type': 'xlinkType',
3013
+ xmlbase: 'xmlBase',
3014
+ 'xml:base': 'xmlBase',
3015
+ xmllang: 'xmlLang',
3016
+ 'xml:lang': 'xmlLang',
3017
+ xmlns: 'xmlns',
3018
+ 'xml:space': 'xmlSpace',
3019
+ xmlnsxlink: 'xmlnsXlink',
3020
+ 'xmlns:xlink': 'xmlnsXlink',
3021
+ xmlspace: 'xmlSpace',
3022
+ y1: 'y1',
3023
+ y2: 'y2',
3024
+ y: 'y',
3025
+ ychannelselector: 'yChannelSelector',
3026
+ z: 'z',
3027
+ zoomandpan: 'zoomAndPan'
3028
+ };
3029
+
3030
+ var validateProperty$1 = function () {};
3031
+
3032
+ {
3033
+ var warnedProperties$1 = {};
3034
+ var _hasOwnProperty = Object.prototype.hasOwnProperty;
3035
+ var EVENT_NAME_REGEX = /^on./;
3036
+ var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/;
3037
+ var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
3038
+ var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
3039
+
3040
+ validateProperty$1 = function (tagName, name, value, eventRegistry) {
3041
+ if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {
3042
+ return true;
3043
+ }
3044
+
3045
+ var lowerCasedName = name.toLowerCase();
3046
+
3047
+ if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {
3048
+ error('React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.');
3049
+
3050
+ warnedProperties$1[name] = true;
3051
+ return true;
3052
+ } // We can't rely on the event system being injected on the server.
3053
+
3054
+
3055
+ if (eventRegistry != null) {
3056
+ var registrationNameDependencies = eventRegistry.registrationNameDependencies,
3057
+ possibleRegistrationNames = eventRegistry.possibleRegistrationNames;
3058
+
3059
+ if (registrationNameDependencies.hasOwnProperty(name)) {
3060
+ return true;
3061
+ }
3062
+
3063
+ var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;
3064
+
3065
+ if (registrationName != null) {
3066
+ error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);
3067
+
3068
+ warnedProperties$1[name] = true;
3069
+ return true;
3070
+ }
3071
+
3072
+ if (EVENT_NAME_REGEX.test(name)) {
3073
+ error('Unknown event handler property `%s`. It will be ignored.', name);
3074
+
3075
+ warnedProperties$1[name] = true;
3076
+ return true;
3077
+ }
3078
+ } else if (EVENT_NAME_REGEX.test(name)) {
3079
+ // If no event plugins have been injected, we are in a server environment.
3080
+ // So we can't tell if the event name is correct for sure, but we can filter
3081
+ // out known bad ones like `onclick`. We can't suggest a specific replacement though.
3082
+ if (INVALID_EVENT_NAME_REGEX.test(name)) {
3083
+ error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);
3084
+ }
3085
+
3086
+ warnedProperties$1[name] = true;
3087
+ return true;
3088
+ } // Let the ARIA attribute hook validate ARIA attributes
3089
+
3090
+
3091
+ if (rARIA$1.test(name) || rARIACamel$1.test(name)) {
3092
+ return true;
3093
+ }
3094
+
3095
+ if (lowerCasedName === 'innerhtml') {
3096
+ error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');
3097
+
3098
+ warnedProperties$1[name] = true;
3099
+ return true;
3100
+ }
3101
+
3102
+ if (lowerCasedName === 'aria') {
3103
+ error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');
3104
+
3105
+ warnedProperties$1[name] = true;
3106
+ return true;
3107
+ }
3108
+
3109
+ if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {
3110
+ error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);
3111
+
3112
+ warnedProperties$1[name] = true;
3113
+ return true;
3114
+ }
3115
+
3116
+ if (typeof value === 'number' && isNaN(value)) {
3117
+ error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);
3118
+
3119
+ warnedProperties$1[name] = true;
3120
+ return true;
3121
+ }
3122
+
3123
+ var propertyInfo = getPropertyInfo(name);
3124
+ var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED; // Known attributes should match the casing specified in the property config.
3125
+
3126
+ if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {
3127
+ var standardName = possibleStandardNames[lowerCasedName];
3128
+
3129
+ if (standardName !== name) {
3130
+ error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);
3131
+
3132
+ warnedProperties$1[name] = true;
3133
+ return true;
3134
+ }
3135
+ } else if (!isReserved && name !== lowerCasedName) {
3136
+ // Unknown attributes should have lowercase casing since that's how they
3137
+ // will be cased anyway with server rendering.
3138
+ error('React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.', name, lowerCasedName);
3139
+
3140
+ warnedProperties$1[name] = true;
3141
+ return true;
3142
+ }
3143
+
3144
+ if (typeof value === 'boolean' && shouldRemoveAttributeWithWarning(name, value, propertyInfo)) {
3145
+ if (value) {
3146
+ error('Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.', value, name, name, value, name);
3147
+ } else {
3148
+ error('Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name);
3149
+ }
3150
+
3151
+ warnedProperties$1[name] = true;
3152
+ return true;
3153
+ } // Now that we've validated casing, do not validate
3154
+ // data types for reserved props
3155
+
3156
+
3157
+ if (isReserved) {
3158
+ return true;
3159
+ } // Warn when a known attribute is a bad type
3160
+
3161
+
3162
+ if (shouldRemoveAttributeWithWarning(name, value, propertyInfo)) {
3163
+ warnedProperties$1[name] = true;
3164
+ return false;
3165
+ } // Warn when passing the strings 'false' or 'true' into a boolean prop
3166
+
3167
+
3168
+ if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) {
3169
+ error('Received the string `%s` for the boolean attribute `%s`. ' + '%s ' + 'Did you mean %s={%s}?', value, name, value === 'false' ? 'The browser will interpret it as a truthy value.' : 'Although this works, it will not work as expected if you pass the string "false".', name, value);
3170
+
3171
+ warnedProperties$1[name] = true;
3172
+ return true;
3173
+ }
3174
+
3175
+ return true;
3176
+ };
3177
+ }
3178
+
3179
+ var warnUnknownProperties = function (type, props, eventRegistry) {
3180
+ {
3181
+ var unknownProps = [];
3182
+
3183
+ for (var key in props) {
3184
+ var isValid = validateProperty$1(type, key, props[key], eventRegistry);
3185
+
3186
+ if (!isValid) {
3187
+ unknownProps.push(key);
3188
+ }
3189
+ }
3190
+
3191
+ var unknownPropString = unknownProps.map(function (prop) {
3192
+ return '`' + prop + '`';
3193
+ }).join(', ');
3194
+
3195
+ if (unknownProps.length === 1) {
3196
+ error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);
3197
+ } else if (unknownProps.length > 1) {
3198
+ error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);
3199
+ }
3200
+ }
3201
+ };
3202
+
3203
+ function validateProperties$2(type, props, eventRegistry) {
3204
+ if (isCustomComponent(type, props)) {
3205
+ return;
3206
+ }
3207
+
3208
+ warnUnknownProperties(type, props, eventRegistry);
3209
+ }
3210
+
3211
+ var toArray = React$1.Children.toArray; // This is only used in DEV.
3212
+ // Each entry is `this.stack` from a currently executing renderer instance.
3213
+ // (There may be more than one because ReactDOMServer is reentrant).
3214
+ // Each stack is an array of frames which may contain nested stacks of elements.
3215
+
3216
+ var currentDebugStacks = [];
3217
+ var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
3218
+ var ReactDebugCurrentFrame$1;
3219
+ var prevGetCurrentStackImpl = null;
3220
+
3221
+ var getCurrentServerStackImpl = function () {
3222
+ return '';
3223
+ };
3224
+
3225
+ var describeStackFrame = function (element) {
3226
+ return '';
3227
+ };
3228
+
3229
+ var validatePropertiesInDevelopment = function (type, props) {};
3230
+
3231
+ var pushCurrentDebugStack = function (stack) {};
3232
+
3233
+ var pushElementToDebugStack = function (element) {};
3234
+
3235
+ var popCurrentDebugStack = function () {};
3236
+
3237
+ var hasWarnedAboutUsingContextAsConsumer = false;
3238
+
3239
+ {
3240
+ ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
3241
+
3242
+ validatePropertiesInDevelopment = function (type, props) {
3243
+ validateProperties(type, props);
3244
+ validateProperties$1(type, props);
3245
+ validateProperties$2(type, props, null);
3246
+ };
3247
+
3248
+ describeStackFrame = function (element) {
3249
+ return describeUnknownElementTypeFrameInDEV(element.type, element._source, null);
3250
+ };
3251
+
3252
+ pushCurrentDebugStack = function (stack) {
3253
+ currentDebugStacks.push(stack);
3254
+
3255
+ if (currentDebugStacks.length === 1) {
3256
+ // We are entering a server renderer.
3257
+ // Remember the previous (e.g. client) global stack implementation.
3258
+ prevGetCurrentStackImpl = ReactDebugCurrentFrame$1.getCurrentStack;
3259
+ ReactDebugCurrentFrame$1.getCurrentStack = getCurrentServerStackImpl;
3260
+ }
3261
+ };
3262
+
3263
+ pushElementToDebugStack = function (element) {
3264
+ // For the innermost executing ReactDOMServer call,
3265
+ var stack = currentDebugStacks[currentDebugStacks.length - 1]; // Take the innermost executing frame (e.g. <Foo>),
3266
+
3267
+ var frame = stack[stack.length - 1]; // and record that it has one more element associated with it.
3268
+
3269
+ frame.debugElementStack.push(element); // We only need this because we tail-optimize single-element
3270
+ // children and directly handle them in an inner loop instead of
3271
+ // creating separate frames for them.
3272
+ };
3273
+
3274
+ popCurrentDebugStack = function () {
3275
+ currentDebugStacks.pop();
3276
+
3277
+ if (currentDebugStacks.length === 0) {
3278
+ // We are exiting the server renderer.
3279
+ // Restore the previous (e.g. client) global stack implementation.
3280
+ ReactDebugCurrentFrame$1.getCurrentStack = prevGetCurrentStackImpl;
3281
+ prevGetCurrentStackImpl = null;
3282
+ }
3283
+ };
3284
+
3285
+ getCurrentServerStackImpl = function () {
3286
+ if (currentDebugStacks.length === 0) {
3287
+ // Nothing is currently rendering.
3288
+ return '';
3289
+ } // ReactDOMServer is reentrant so there may be multiple calls at the same time.
3290
+ // Take the frames from the innermost call which is the last in the array.
3291
+
3292
+
3293
+ var frames = currentDebugStacks[currentDebugStacks.length - 1];
3294
+ var stack = ''; // Go through every frame in the stack from the innermost one.
3295
+
3296
+ for (var i = frames.length - 1; i >= 0; i--) {
3297
+ var frame = frames[i]; // Every frame might have more than one debug element stack entry associated with it.
3298
+ // This is because single-child nesting doesn't create materialized frames.
3299
+ // Instead it would push them through `pushElementToDebugStack()`.
3300
+
3301
+ var debugElementStack = frame.debugElementStack;
3302
+
3303
+ for (var ii = debugElementStack.length - 1; ii >= 0; ii--) {
3304
+ stack += describeStackFrame(debugElementStack[ii]);
3305
+ }
3306
+ }
3307
+
3308
+ return stack;
3309
+ };
3310
+ }
3311
+
3312
+ var didWarnDefaultInputValue = false;
3313
+ var didWarnDefaultChecked = false;
3314
+ var didWarnDefaultSelectValue = false;
3315
+ var didWarnDefaultTextareaValue = false;
3316
+ var didWarnInvalidOptionChildren = false;
3317
+ var didWarnAboutNoopUpdateForComponent = {};
3318
+ var didWarnAboutBadClass = {};
3319
+ var didWarnAboutModulePatternComponent = {};
3320
+ var didWarnAboutDeprecatedWillMount = {};
3321
+ var didWarnAboutUndefinedDerivedState = {};
3322
+ var didWarnAboutUninitializedState = {};
3323
+ var valuePropNames = ['value', 'defaultValue'];
3324
+ var newlineEatingTags = {
3325
+ listing: true,
3326
+ pre: true,
3327
+ textarea: true
3328
+ }; // We accept any tag to be rendered but since this gets injected into arbitrary
3329
+ // HTML, we want to make sure that it's a safe tag.
3330
+ // http://www.w3.org/TR/REC-xml/#NT-Name
3331
+
3332
+ var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset
3333
+
3334
+ var validatedTagCache = {};
3335
+
3336
+ function validateDangerousTag(tag) {
3337
+ if (!validatedTagCache.hasOwnProperty(tag)) {
3338
+ if (!VALID_TAG_REGEX.test(tag)) {
3339
+ {
3340
+ throw Error( "Invalid tag: " + tag );
3341
+ }
3342
+ }
3343
+
3344
+ validatedTagCache[tag] = true;
3345
+ }
3346
+ }
3347
+
3348
+ var styleNameCache = {};
3349
+
3350
+ var processStyleName = function (styleName) {
3351
+ if (styleNameCache.hasOwnProperty(styleName)) {
3352
+ return styleNameCache[styleName];
3353
+ }
3354
+
3355
+ var result = hyphenateStyleName(styleName);
3356
+ styleNameCache[styleName] = result;
3357
+ return result;
3358
+ };
3359
+
3360
+ function createMarkupForStyles(styles) {
3361
+ var serialized = '';
3362
+ var delimiter = '';
3363
+
3364
+ for (var styleName in styles) {
3365
+ if (!styles.hasOwnProperty(styleName)) {
3366
+ continue;
3367
+ }
3368
+
3369
+ var isCustomProperty = styleName.indexOf('--') === 0;
3370
+ var styleValue = styles[styleName];
3371
+
3372
+ {
3373
+ if (!isCustomProperty) {
3374
+ warnValidStyle$1(styleName, styleValue);
3375
+ }
3376
+ }
3377
+
3378
+ if (styleValue != null) {
3379
+ serialized += delimiter + (isCustomProperty ? styleName : processStyleName(styleName)) + ':';
3380
+ serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);
3381
+ delimiter = ';';
3382
+ }
3383
+ }
3384
+
3385
+ return serialized || null;
3386
+ }
3387
+
3388
+ function warnNoop(publicInstance, callerName) {
3389
+ {
3390
+ var _constructor = publicInstance.constructor;
3391
+ var componentName = _constructor && getComponentName(_constructor) || 'ReactClass';
3392
+ var warningKey = componentName + '.' + callerName;
3393
+
3394
+ if (didWarnAboutNoopUpdateForComponent[warningKey]) {
3395
+ return;
3396
+ }
3397
+
3398
+ error('%s(...): Can only update a mounting component. ' + 'This usually means you called %s() outside componentWillMount() on the server. ' + 'This is a no-op.\n\nPlease check the code for the %s component.', callerName, callerName, componentName);
3399
+
3400
+ didWarnAboutNoopUpdateForComponent[warningKey] = true;
3401
+ }
3402
+ }
3403
+
3404
+ function shouldConstruct$1(Component) {
3405
+ return Component.prototype && Component.prototype.isReactComponent;
3406
+ }
3407
+
3408
+ function getNonChildrenInnerMarkup(props) {
3409
+ var innerHTML = props.dangerouslySetInnerHTML;
3410
+
3411
+ if (innerHTML != null) {
3412
+ if (innerHTML.__html != null) {
3413
+ return innerHTML.__html;
3414
+ }
3415
+ } else {
3416
+ var content = props.children;
3417
+
3418
+ if (typeof content === 'string' || typeof content === 'number') {
3419
+ return escapeTextForBrowser(content);
3420
+ }
3421
+ }
3422
+
3423
+ return null;
3424
+ }
3425
+
3426
+ function flattenTopLevelChildren(children) {
3427
+ if (!React$1.isValidElement(children)) {
3428
+ return toArray(children);
3429
+ }
3430
+
3431
+ var element = children;
3432
+
3433
+ if (element.type !== REACT_FRAGMENT_TYPE) {
3434
+ return [element];
3435
+ }
3436
+
3437
+ var fragmentChildren = element.props.children;
3438
+
3439
+ if (!React$1.isValidElement(fragmentChildren)) {
3440
+ return toArray(fragmentChildren);
3441
+ }
3442
+
3443
+ var fragmentChildElement = fragmentChildren;
3444
+ return [fragmentChildElement];
3445
+ }
3446
+
3447
+ function flattenOptionChildren(children) {
3448
+ if (children === undefined || children === null) {
3449
+ return children;
3450
+ }
3451
+
3452
+ var content = ''; // Flatten children and warn if they aren't strings or numbers;
3453
+ // invalid types are ignored.
3454
+
3455
+ React$1.Children.forEach(children, function (child) {
3456
+ if (child == null) {
3457
+ return;
3458
+ }
3459
+
3460
+ content += child;
3461
+
3462
+ {
3463
+ if (!didWarnInvalidOptionChildren && typeof child !== 'string' && typeof child !== 'number') {
3464
+ didWarnInvalidOptionChildren = true;
3465
+
3466
+ error('Only strings and numbers are supported as <option> children.');
3467
+ }
3468
+ }
3469
+ });
3470
+ return content;
3471
+ }
3472
+
3473
+ var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
3474
+ var STYLE = 'style';
3475
+ var RESERVED_PROPS = {
3476
+ children: null,
3477
+ dangerouslySetInnerHTML: null,
3478
+ suppressContentEditableWarning: null,
3479
+ suppressHydrationWarning: null
3480
+ };
3481
+
3482
+ function createOpenTagMarkup(tagVerbatim, tagLowercase, props, namespace, makeStaticMarkup, isRootElement) {
3483
+ var ret = '<' + tagVerbatim;
3484
+ var isCustomComponent$1 = isCustomComponent(tagLowercase, props);
3485
+
3486
+ for (var propKey in props) {
3487
+ if (!hasOwnProperty$2.call(props, propKey)) {
3488
+ continue;
3489
+ }
3490
+
3491
+ var propValue = props[propKey];
3492
+
3493
+ if (propValue == null) {
3494
+ continue;
3495
+ }
3496
+
3497
+ if (propKey === STYLE) {
3498
+ propValue = createMarkupForStyles(propValue);
3499
+ }
3500
+
3501
+ var markup = null;
3502
+
3503
+ if (isCustomComponent$1) {
3504
+ if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
3505
+ markup = createMarkupForCustomAttribute(propKey, propValue);
3506
+ }
3507
+ } else {
3508
+ markup = createMarkupForProperty(propKey, propValue);
3509
+ }
3510
+
3511
+ if (markup) {
3512
+ ret += ' ' + markup;
3513
+ }
3514
+ } // For static pages, no need to put React ID and checksum. Saves lots of
3515
+ // bytes.
3516
+
3517
+
3518
+ if (makeStaticMarkup) {
3519
+ return ret;
3520
+ }
3521
+
3522
+ if (isRootElement) {
3523
+ ret += ' ' + createMarkupForRoot();
3524
+ }
3525
+
3526
+ return ret;
3527
+ }
3528
+
3529
+ function validateRenderResult(child, type) {
3530
+ if (child === undefined) {
3531
+ {
3532
+ {
3533
+ throw Error( (getComponentName(type) || 'Component') + "(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null." );
3534
+ }
3535
+ }
3536
+ }
3537
+ }
3538
+
3539
+ function resolve(child, context, threadID) {
3540
+ while (React$1.isValidElement(child)) {
3541
+ // Safe because we just checked it's an element.
3542
+ var element = child;
3543
+ var Component = element.type;
3544
+
3545
+ {
3546
+ pushElementToDebugStack(element);
3547
+ }
3548
+
3549
+ if (typeof Component !== 'function') {
3550
+ break;
3551
+ }
3552
+
3553
+ processChild(element, Component);
3554
+ } // Extra closure so queue and replace can be captured properly
3555
+
3556
+
3557
+ function processChild(element, Component) {
3558
+ var isClass = shouldConstruct$1(Component);
3559
+ var publicContext = processContext(Component, context, threadID, isClass);
3560
+ var queue = [];
3561
+ var replace = false;
3562
+ var updater = {
3563
+ isMounted: function (publicInstance) {
3564
+ return false;
3565
+ },
3566
+ enqueueForceUpdate: function (publicInstance) {
3567
+ if (queue === null) {
3568
+ warnNoop(publicInstance, 'forceUpdate');
3569
+ return null;
3570
+ }
3571
+ },
3572
+ enqueueReplaceState: function (publicInstance, completeState) {
3573
+ replace = true;
3574
+ queue = [completeState];
3575
+ },
3576
+ enqueueSetState: function (publicInstance, currentPartialState) {
3577
+ if (queue === null) {
3578
+ warnNoop(publicInstance, 'setState');
3579
+ return null;
3580
+ }
3581
+
3582
+ queue.push(currentPartialState);
3583
+ }
3584
+ };
3585
+ var inst;
3586
+
3587
+ if (isClass) {
3588
+ inst = new Component(element.props, publicContext, updater);
3589
+
3590
+ if (typeof Component.getDerivedStateFromProps === 'function') {
3591
+ {
3592
+ if (inst.state === null || inst.state === undefined) {
3593
+ var componentName = getComponentName(Component) || 'Unknown';
3594
+
3595
+ if (!didWarnAboutUninitializedState[componentName]) {
3596
+ error('`%s` uses `getDerivedStateFromProps` but its initial state is ' + '%s. This is not recommended. Instead, define the initial state by ' + 'assigning an object to `this.state` in the constructor of `%s`. ' + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', componentName, inst.state === null ? 'null' : 'undefined', componentName);
3597
+
3598
+ didWarnAboutUninitializedState[componentName] = true;
3599
+ }
3600
+ }
3601
+ }
3602
+
3603
+ var partialState = Component.getDerivedStateFromProps.call(null, element.props, inst.state);
3604
+
3605
+ {
3606
+ if (partialState === undefined) {
3607
+ var _componentName = getComponentName(Component) || 'Unknown';
3608
+
3609
+ if (!didWarnAboutUndefinedDerivedState[_componentName]) {
3610
+ error('%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', _componentName);
3611
+
3612
+ didWarnAboutUndefinedDerivedState[_componentName] = true;
3613
+ }
3614
+ }
3615
+ }
3616
+
3617
+ if (partialState != null) {
3618
+ inst.state = _assign({}, inst.state, partialState);
3619
+ }
3620
+ }
3621
+ } else {
3622
+ {
3623
+ if (Component.prototype && typeof Component.prototype.render === 'function') {
3624
+ var _componentName2 = getComponentName(Component) || 'Unknown';
3625
+
3626
+ if (!didWarnAboutBadClass[_componentName2]) {
3627
+ error("The <%s /> component appears to have a render method, but doesn't extend React.Component. " + 'This is likely to cause errors. Change %s to extend React.Component instead.', _componentName2, _componentName2);
3628
+
3629
+ didWarnAboutBadClass[_componentName2] = true;
3630
+ }
3631
+ }
3632
+ }
3633
+
3634
+ var componentIdentity = {};
3635
+ prepareToUseHooks(componentIdentity);
3636
+ inst = Component(element.props, publicContext, updater);
3637
+ inst = finishHooks(Component, element.props, inst, publicContext);
3638
+
3639
+ {
3640
+ // Support for module components is deprecated and is removed behind a flag.
3641
+ // Whether or not it would crash later, we want to show a good message in DEV first.
3642
+ if (inst != null && inst.render != null) {
3643
+ var _componentName3 = getComponentName(Component) || 'Unknown';
3644
+
3645
+ if (!didWarnAboutModulePatternComponent[_componentName3]) {
3646
+ error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + "If you can't use a class try assigning the prototype on the function as a workaround. " + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + 'cannot be called with `new` by React.', _componentName3, _componentName3, _componentName3);
3647
+
3648
+ didWarnAboutModulePatternComponent[_componentName3] = true;
3649
+ }
3650
+ }
3651
+ } // If the flag is on, everything is assumed to be a function component.
3652
+ // Otherwise, we also do the unfortunate dynamic checks.
3653
+
3654
+
3655
+ if ( inst == null || inst.render == null) {
3656
+ child = inst;
3657
+ validateRenderResult(child, Component);
3658
+ return;
3659
+ }
3660
+ }
3661
+
3662
+ inst.props = element.props;
3663
+ inst.context = publicContext;
3664
+ inst.updater = updater;
3665
+ var initialState = inst.state;
3666
+
3667
+ if (initialState === undefined) {
3668
+ inst.state = initialState = null;
3669
+ }
3670
+
3671
+ if (typeof inst.UNSAFE_componentWillMount === 'function' || typeof inst.componentWillMount === 'function') {
3672
+ if (typeof inst.componentWillMount === 'function') {
3673
+ {
3674
+ if ( inst.componentWillMount.__suppressDeprecationWarning !== true) {
3675
+ var _componentName4 = getComponentName(Component) || 'Unknown';
3676
+
3677
+ if (!didWarnAboutDeprecatedWillMount[_componentName4]) {
3678
+ warn( // keep this warning in sync with ReactStrictModeWarning.js
3679
+ 'componentWillMount has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move code from componentWillMount to componentDidMount (preferred in most cases) ' + 'or the constructor.\n' + '\nPlease update the following components: %s', _componentName4);
3680
+
3681
+ didWarnAboutDeprecatedWillMount[_componentName4] = true;
3682
+ }
3683
+ }
3684
+ } // In order to support react-lifecycles-compat polyfilled components,
3685
+ // Unsafe lifecycles should not be invoked for any component with the new gDSFP.
3686
+
3687
+
3688
+ if (typeof Component.getDerivedStateFromProps !== 'function') {
3689
+ inst.componentWillMount();
3690
+ }
3691
+ }
3692
+
3693
+ if (typeof inst.UNSAFE_componentWillMount === 'function' && typeof Component.getDerivedStateFromProps !== 'function') {
3694
+ // In order to support react-lifecycles-compat polyfilled components,
3695
+ // Unsafe lifecycles should not be invoked for any component with the new gDSFP.
3696
+ inst.UNSAFE_componentWillMount();
3697
+ }
3698
+
3699
+ if (queue.length) {
3700
+ var oldQueue = queue;
3701
+ var oldReplace = replace;
3702
+ queue = null;
3703
+ replace = false;
3704
+
3705
+ if (oldReplace && oldQueue.length === 1) {
3706
+ inst.state = oldQueue[0];
3707
+ } else {
3708
+ var nextState = oldReplace ? oldQueue[0] : inst.state;
3709
+ var dontMutate = true;
3710
+
3711
+ for (var i = oldReplace ? 1 : 0; i < oldQueue.length; i++) {
3712
+ var partial = oldQueue[i];
3713
+
3714
+ var _partialState = typeof partial === 'function' ? partial.call(inst, nextState, element.props, publicContext) : partial;
3715
+
3716
+ if (_partialState != null) {
3717
+ if (dontMutate) {
3718
+ dontMutate = false;
3719
+ nextState = _assign({}, nextState, _partialState);
3720
+ } else {
3721
+ _assign(nextState, _partialState);
3722
+ }
3723
+ }
3724
+ }
3725
+
3726
+ inst.state = nextState;
3727
+ }
3728
+ } else {
3729
+ queue = null;
3730
+ }
3731
+ }
3732
+
3733
+ child = inst.render();
3734
+
3735
+ {
3736
+ if (child === undefined && inst.render._isMockFunction) {
3737
+ // This is probably bad practice. Consider warning here and
3738
+ // deprecating this convenience.
3739
+ child = null;
3740
+ }
3741
+ }
3742
+
3743
+ validateRenderResult(child, Component);
3744
+ var childContext;
3745
+
3746
+ {
3747
+ if (typeof inst.getChildContext === 'function') {
3748
+ var _childContextTypes = Component.childContextTypes;
3749
+
3750
+ if (typeof _childContextTypes === 'object') {
3751
+ childContext = inst.getChildContext();
3752
+
3753
+ for (var contextKey in childContext) {
3754
+ if (!(contextKey in _childContextTypes)) {
3755
+ {
3756
+ throw Error( (getComponentName(Component) || 'Unknown') + ".getChildContext(): key \"" + contextKey + "\" is not defined in childContextTypes." );
3757
+ }
3758
+ }
3759
+ }
3760
+ } else {
3761
+ {
3762
+ error('%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', getComponentName(Component) || 'Unknown');
3763
+ }
3764
+ }
3765
+ }
3766
+
3767
+ if (childContext) {
3768
+ context = _assign({}, context, childContext);
3769
+ }
3770
+ }
3771
+ }
3772
+
3773
+ return {
3774
+ child: child,
3775
+ context: context
3776
+ };
3777
+ }
3778
+
3779
+ var ReactDOMServerRenderer = /*#__PURE__*/function () {
3780
+ // TODO: type this more strictly:
3781
+ // DEV-only
3782
+ function ReactDOMServerRenderer(children, makeStaticMarkup, options) {
3783
+ var flatChildren = flattenTopLevelChildren(children);
3784
+ var topFrame = {
3785
+ type: null,
3786
+ // Assume all trees start in the HTML namespace (not totally true, but
3787
+ // this is what we did historically)
3788
+ domNamespace: Namespaces.html,
3789
+ children: flatChildren,
3790
+ childIndex: 0,
3791
+ context: emptyObject,
3792
+ footer: ''
3793
+ };
3794
+
3795
+ {
3796
+ topFrame.debugElementStack = [];
3797
+ }
3798
+
3799
+ this.threadID = allocThreadID();
3800
+ this.stack = [topFrame];
3801
+ this.exhausted = false;
3802
+ this.currentSelectValue = null;
3803
+ this.previousWasTextNode = false;
3804
+ this.makeStaticMarkup = makeStaticMarkup;
3805
+ this.suspenseDepth = 0; // Context (new API)
3806
+
3807
+ this.contextIndex = -1;
3808
+ this.contextStack = [];
3809
+ this.contextValueStack = []; // useOpaqueIdentifier ID
3810
+
3811
+ this.uniqueID = 0;
3812
+ this.identifierPrefix = options && options.identifierPrefix || '';
3813
+
3814
+ {
3815
+ this.contextProviderStack = [];
3816
+ }
3817
+ }
3818
+
3819
+ var _proto = ReactDOMServerRenderer.prototype;
3820
+
3821
+ _proto.destroy = function destroy() {
3822
+ if (!this.exhausted) {
3823
+ this.exhausted = true;
3824
+ this.clearProviders();
3825
+ freeThreadID(this.threadID);
3826
+ }
3827
+ }
3828
+ /**
3829
+ * Note: We use just two stacks regardless of how many context providers you have.
3830
+ * Providers are always popped in the reverse order to how they were pushed
3831
+ * so we always know on the way down which provider you'll encounter next on the way up.
3832
+ * On the way down, we push the current provider, and its context value *before*
3833
+ * we mutated it, onto the stacks. Therefore, on the way up, we always know which
3834
+ * provider needs to be "restored" to which value.
3835
+ * https://github.com/facebook/react/pull/12985#issuecomment-396301248
3836
+ */
3837
+ ;
3838
+
3839
+ _proto.pushProvider = function pushProvider(provider) {
3840
+ var index = ++this.contextIndex;
3841
+ var context = provider.type._context;
3842
+ var threadID = this.threadID;
3843
+ validateContextBounds(context, threadID);
3844
+ var previousValue = context[threadID]; // Remember which value to restore this context to on our way up.
3845
+
3846
+ this.contextStack[index] = context;
3847
+ this.contextValueStack[index] = previousValue;
3848
+
3849
+ {
3850
+ // Only used for push/pop mismatch warnings.
3851
+ this.contextProviderStack[index] = provider;
3852
+ } // Mutate the current value.
3853
+
3854
+
3855
+ context[threadID] = provider.props.value;
3856
+ };
3857
+
3858
+ _proto.popProvider = function popProvider(provider) {
3859
+ var index = this.contextIndex;
3860
+
3861
+ {
3862
+ if (index < 0 || provider !== this.contextProviderStack[index]) {
3863
+ error('Unexpected pop.');
3864
+ }
3865
+ }
3866
+
3867
+ var context = this.contextStack[index];
3868
+ var previousValue = this.contextValueStack[index]; // "Hide" these null assignments from Flow by using `any`
3869
+ // because conceptually they are deletions--as long as we
3870
+ // promise to never access values beyond `this.contextIndex`.
3871
+
3872
+ this.contextStack[index] = null;
3873
+ this.contextValueStack[index] = null;
3874
+
3875
+ {
3876
+ this.contextProviderStack[index] = null;
3877
+ }
3878
+
3879
+ this.contextIndex--; // Restore to the previous value we stored as we were walking down.
3880
+ // We've already verified that this context has been expanded to accommodate
3881
+ // this thread id, so we don't need to do it again.
3882
+
3883
+ context[this.threadID] = previousValue;
3884
+ };
3885
+
3886
+ _proto.clearProviders = function clearProviders() {
3887
+ // Restore any remaining providers on the stack to previous values
3888
+ for (var index = this.contextIndex; index >= 0; index--) {
3889
+ var context = this.contextStack[index];
3890
+ var previousValue = this.contextValueStack[index];
3891
+ context[this.threadID] = previousValue;
3892
+ }
3893
+ };
3894
+
3895
+ _proto.read = function read(bytes) {
3896
+ if (this.exhausted) {
3897
+ return null;
3898
+ }
3899
+
3900
+ var prevPartialRenderer = currentPartialRenderer;
3901
+ setCurrentPartialRenderer(this);
3902
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
3903
+ ReactCurrentDispatcher$1.current = Dispatcher;
3904
+
3905
+ try {
3906
+ // Markup generated within <Suspense> ends up buffered until we know
3907
+ // nothing in that boundary suspended
3908
+ var out = [''];
3909
+ var suspended = false;
3910
+
3911
+ while (out[0].length < bytes) {
3912
+ if (this.stack.length === 0) {
3913
+ this.exhausted = true;
3914
+ freeThreadID(this.threadID);
3915
+ break;
3916
+ }
3917
+
3918
+ var frame = this.stack[this.stack.length - 1];
3919
+
3920
+ if (suspended || frame.childIndex >= frame.children.length) {
3921
+ var footer = frame.footer;
3922
+
3923
+ if (footer !== '') {
3924
+ this.previousWasTextNode = false;
3925
+ }
3926
+
3927
+ this.stack.pop();
3928
+
3929
+ if (frame.type === 'select') {
3930
+ this.currentSelectValue = null;
3931
+ } else if (frame.type != null && frame.type.type != null && frame.type.type.$$typeof === REACT_PROVIDER_TYPE) {
3932
+ var provider = frame.type;
3933
+ this.popProvider(provider);
3934
+ } else if (frame.type === REACT_SUSPENSE_TYPE) {
3935
+ this.suspenseDepth--;
3936
+ var buffered = out.pop();
3937
+
3938
+ if (suspended) {
3939
+ suspended = false; // If rendering was suspended at this boundary, render the fallbackFrame
3940
+
3941
+ var fallbackFrame = frame.fallbackFrame;
3942
+
3943
+ if (!fallbackFrame) {
3944
+ {
3945
+ throw Error(true ? "ReactDOMServer did not find an internal fallback frame for Suspense. This is a bug in React. Please file an issue." : formatProdErrorMessage(303));
3946
+ }
3947
+ }
3948
+
3949
+ this.stack.push(fallbackFrame);
3950
+ out[this.suspenseDepth] += '<!--$!-->'; // Skip flushing output since we're switching to the fallback
3951
+
3952
+ continue;
3953
+ } else {
3954
+ out[this.suspenseDepth] += buffered;
3955
+ }
3956
+ } // Flush output
3957
+
3958
+
3959
+ out[this.suspenseDepth] += footer;
3960
+ continue;
3961
+ }
3962
+
3963
+ var child = frame.children[frame.childIndex++];
3964
+ var outBuffer = '';
3965
+
3966
+ if (true) {
3967
+ pushCurrentDebugStack(this.stack); // We're starting work on this frame, so reset its inner stack.
3968
+
3969
+ frame.debugElementStack.length = 0;
3970
+ }
3971
+
3972
+ try {
3973
+ outBuffer += this.render(child, frame.context, frame.domNamespace);
3974
+ } catch (err) {
3975
+ if (err != null && typeof err.then === 'function') {
3976
+ if (enableSuspenseServerRenderer) ; else {
3977
+ if (!false) {
3978
+ {
3979
+ throw Error(true ? "ReactDOMServer does not yet support Suspense." : formatProdErrorMessage(294));
3980
+ }
3981
+ }
3982
+ }
3983
+ } else {
3984
+ throw err;
3985
+ }
3986
+ } finally {
3987
+ if (true) {
3988
+ popCurrentDebugStack();
3989
+ }
3990
+ }
3991
+
3992
+ if (out.length <= this.suspenseDepth) {
3993
+ out.push('');
3994
+ }
3995
+
3996
+ out[this.suspenseDepth] += outBuffer;
3997
+ }
3998
+
3999
+ return out[0];
4000
+ } finally {
4001
+ ReactCurrentDispatcher$1.current = prevDispatcher;
4002
+ setCurrentPartialRenderer(prevPartialRenderer);
4003
+ resetHooksState();
4004
+ }
4005
+ };
4006
+
4007
+ _proto.render = function render(child, context, parentNamespace) {
4008
+ if (typeof child === 'string' || typeof child === 'number') {
4009
+ var text = '' + child;
4010
+
4011
+ if (text === '') {
4012
+ return '';
4013
+ }
4014
+
4015
+ if (this.makeStaticMarkup) {
4016
+ return escapeTextForBrowser(text);
4017
+ }
4018
+
4019
+ if (this.previousWasTextNode) {
4020
+ return '<!-- -->' + escapeTextForBrowser(text);
4021
+ }
4022
+
4023
+ this.previousWasTextNode = true;
4024
+ return escapeTextForBrowser(text);
4025
+ } else {
4026
+ var nextChild;
4027
+
4028
+ var _resolve = resolve(child, context, this.threadID);
4029
+
4030
+ nextChild = _resolve.child;
4031
+ context = _resolve.context;
4032
+
4033
+ if (nextChild === null || nextChild === false) {
4034
+ return '';
4035
+ } else if (!React$1.isValidElement(nextChild)) {
4036
+ if (nextChild != null && nextChild.$$typeof != null) {
4037
+ // Catch unexpected special types early.
4038
+ var $$typeof = nextChild.$$typeof;
4039
+
4040
+ if (!($$typeof !== REACT_PORTAL_TYPE)) {
4041
+ {
4042
+ throw Error( "Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render." );
4043
+ }
4044
+ } // Catch-all to prevent an infinite loop if React.Children.toArray() supports some new type.
4045
+
4046
+
4047
+ {
4048
+ {
4049
+ throw Error( "Unknown element-like object type: " + $$typeof.toString() + ". This is likely a bug in React. Please file an issue." );
4050
+ }
4051
+ }
4052
+ }
4053
+
4054
+ var nextChildren = toArray(nextChild);
4055
+ var frame = {
4056
+ type: null,
4057
+ domNamespace: parentNamespace,
4058
+ children: nextChildren,
4059
+ childIndex: 0,
4060
+ context: context,
4061
+ footer: ''
4062
+ };
4063
+
4064
+ {
4065
+ frame.debugElementStack = [];
4066
+ }
4067
+
4068
+ this.stack.push(frame);
4069
+ return '';
4070
+ } // Safe because we just checked it's an element.
4071
+
4072
+
4073
+ var nextElement = nextChild;
4074
+ var elementType = nextElement.type;
4075
+
4076
+ if (typeof elementType === 'string') {
4077
+ return this.renderDOM(nextElement, context, parentNamespace);
4078
+ }
4079
+
4080
+ switch (elementType) {
4081
+ // TODO: LegacyHidden acts the same as a fragment. This only works
4082
+ // because we currently assume that every instance of LegacyHidden is
4083
+ // accompanied by a host component wrapper. In the hidden mode, the host
4084
+ // component is given a `hidden` attribute, which ensures that the
4085
+ // initial HTML is not visible. To support the use of LegacyHidden as a
4086
+ // true fragment, without an extra DOM node, we would have to hide the
4087
+ // initial HTML in some other way.
4088
+ case REACT_LEGACY_HIDDEN_TYPE:
4089
+ case REACT_DEBUG_TRACING_MODE_TYPE:
4090
+ case REACT_STRICT_MODE_TYPE:
4091
+ case REACT_PROFILER_TYPE:
4092
+ case REACT_SUSPENSE_LIST_TYPE:
4093
+ case REACT_FRAGMENT_TYPE:
4094
+ {
4095
+ var _nextChildren = toArray(nextChild.props.children);
4096
+
4097
+ var _frame = {
4098
+ type: null,
4099
+ domNamespace: parentNamespace,
4100
+ children: _nextChildren,
4101
+ childIndex: 0,
4102
+ context: context,
4103
+ footer: ''
4104
+ };
4105
+
4106
+ {
4107
+ _frame.debugElementStack = [];
4108
+ }
4109
+
4110
+ this.stack.push(_frame);
4111
+ return '';
4112
+ }
4113
+
4114
+ case REACT_SUSPENSE_TYPE:
4115
+ {
4116
+ {
4117
+ {
4118
+ {
4119
+ throw Error( "ReactDOMServer does not yet support Suspense." );
4120
+ }
4121
+ }
4122
+ }
4123
+ }
4124
+ // eslint-disable-next-line-no-fallthrough
4125
+
4126
+ case REACT_SCOPE_TYPE:
4127
+ {
4128
+
4129
+ {
4130
+ {
4131
+ throw Error( "ReactDOMServer does not yet support scope components." );
4132
+ }
4133
+ }
4134
+ }
4135
+ }
4136
+
4137
+ if (typeof elementType === 'object' && elementType !== null) {
4138
+ switch (elementType.$$typeof) {
4139
+ case REACT_FORWARD_REF_TYPE:
4140
+ {
4141
+ var element = nextChild;
4142
+
4143
+ var _nextChildren5;
4144
+
4145
+ var componentIdentity = {};
4146
+ prepareToUseHooks(componentIdentity);
4147
+ _nextChildren5 = elementType.render(element.props, element.ref);
4148
+ _nextChildren5 = finishHooks(elementType.render, element.props, _nextChildren5, element.ref);
4149
+ _nextChildren5 = toArray(_nextChildren5);
4150
+ var _frame5 = {
4151
+ type: null,
4152
+ domNamespace: parentNamespace,
4153
+ children: _nextChildren5,
4154
+ childIndex: 0,
4155
+ context: context,
4156
+ footer: ''
4157
+ };
4158
+
4159
+ {
4160
+ _frame5.debugElementStack = [];
4161
+ }
4162
+
4163
+ this.stack.push(_frame5);
4164
+ return '';
4165
+ }
4166
+
4167
+ case REACT_MEMO_TYPE:
4168
+ {
4169
+ var _element = nextChild;
4170
+ var _nextChildren6 = [React$1.createElement(elementType.type, _assign({
4171
+ ref: _element.ref
4172
+ }, _element.props))];
4173
+ var _frame6 = {
4174
+ type: null,
4175
+ domNamespace: parentNamespace,
4176
+ children: _nextChildren6,
4177
+ childIndex: 0,
4178
+ context: context,
4179
+ footer: ''
4180
+ };
4181
+
4182
+ {
4183
+ _frame6.debugElementStack = [];
4184
+ }
4185
+
4186
+ this.stack.push(_frame6);
4187
+ return '';
4188
+ }
4189
+
4190
+ case REACT_PROVIDER_TYPE:
4191
+ {
4192
+ var provider = nextChild;
4193
+ var nextProps = provider.props;
4194
+
4195
+ var _nextChildren7 = toArray(nextProps.children);
4196
+
4197
+ var _frame7 = {
4198
+ type: provider,
4199
+ domNamespace: parentNamespace,
4200
+ children: _nextChildren7,
4201
+ childIndex: 0,
4202
+ context: context,
4203
+ footer: ''
4204
+ };
4205
+
4206
+ {
4207
+ _frame7.debugElementStack = [];
4208
+ }
4209
+
4210
+ this.pushProvider(provider);
4211
+ this.stack.push(_frame7);
4212
+ return '';
4213
+ }
4214
+
4215
+ case REACT_CONTEXT_TYPE:
4216
+ {
4217
+ var reactContext = nextChild.type; // The logic below for Context differs depending on PROD or DEV mode. In
4218
+ // DEV mode, we create a separate object for Context.Consumer that acts
4219
+ // like a proxy to Context. This proxy object adds unnecessary code in PROD
4220
+ // so we use the old behaviour (Context.Consumer references Context) to
4221
+ // reduce size and overhead. The separate object references context via
4222
+ // a property called "_context", which also gives us the ability to check
4223
+ // in DEV mode if this property exists or not and warn if it does not.
4224
+
4225
+ {
4226
+ if (reactContext._context === undefined) {
4227
+ // This may be because it's a Context (rather than a Consumer).
4228
+ // Or it may be because it's older React where they're the same thing.
4229
+ // We only want to warn if we're sure it's a new React.
4230
+ if (reactContext !== reactContext.Consumer) {
4231
+ if (!hasWarnedAboutUsingContextAsConsumer) {
4232
+ hasWarnedAboutUsingContextAsConsumer = true;
4233
+
4234
+ error('Rendering <Context> directly is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
4235
+ }
4236
+ }
4237
+ } else {
4238
+ reactContext = reactContext._context;
4239
+ }
4240
+ }
4241
+
4242
+ var _nextProps = nextChild.props;
4243
+ var threadID = this.threadID;
4244
+ validateContextBounds(reactContext, threadID);
4245
+ var nextValue = reactContext[threadID];
4246
+
4247
+ var _nextChildren8 = toArray(_nextProps.children(nextValue));
4248
+
4249
+ var _frame8 = {
4250
+ type: nextChild,
4251
+ domNamespace: parentNamespace,
4252
+ children: _nextChildren8,
4253
+ childIndex: 0,
4254
+ context: context,
4255
+ footer: ''
4256
+ };
4257
+
4258
+ {
4259
+ _frame8.debugElementStack = [];
4260
+ }
4261
+
4262
+ this.stack.push(_frame8);
4263
+ return '';
4264
+ }
4265
+ // eslint-disable-next-line-no-fallthrough
4266
+
4267
+ case REACT_FUNDAMENTAL_TYPE:
4268
+ {
4269
+
4270
+ {
4271
+ {
4272
+ throw Error( "ReactDOMServer does not yet support the fundamental API." );
4273
+ }
4274
+ }
4275
+ }
4276
+ // eslint-disable-next-line-no-fallthrough
4277
+
4278
+ case REACT_LAZY_TYPE:
4279
+ {
4280
+ var _element2 = nextChild;
4281
+ var lazyComponent = nextChild.type; // Attempt to initialize lazy component regardless of whether the
4282
+ // suspense server-side renderer is enabled so synchronously
4283
+ // resolved constructors are supported.
4284
+
4285
+ var payload = lazyComponent._payload;
4286
+ var init = lazyComponent._init;
4287
+ var result = init(payload);
4288
+ var _nextChildren10 = [React$1.createElement(result, _assign({
4289
+ ref: _element2.ref
4290
+ }, _element2.props))];
4291
+ var _frame10 = {
4292
+ type: null,
4293
+ domNamespace: parentNamespace,
4294
+ children: _nextChildren10,
4295
+ childIndex: 0,
4296
+ context: context,
4297
+ footer: ''
4298
+ };
4299
+
4300
+ {
4301
+ _frame10.debugElementStack = [];
4302
+ }
4303
+
4304
+ this.stack.push(_frame10);
4305
+ return '';
4306
+ }
4307
+ }
4308
+ }
4309
+
4310
+ var info = '';
4311
+
4312
+ {
4313
+ var owner = nextElement._owner;
4314
+
4315
+ if (elementType === undefined || typeof elementType === 'object' && elementType !== null && Object.keys(elementType).length === 0) {
4316
+ info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and " + 'named imports.';
4317
+ }
4318
+
4319
+ var ownerName = owner ? getComponentName(owner) : null;
4320
+
4321
+ if (ownerName) {
4322
+ info += '\n\nCheck the render method of `' + ownerName + '`.';
4323
+ }
4324
+ }
4325
+
4326
+ {
4327
+ {
4328
+ throw Error( "Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " + (elementType == null ? elementType : typeof elementType) + "." + info );
4329
+ }
4330
+ }
4331
+ }
4332
+ };
4333
+
4334
+ _proto.renderDOM = function renderDOM(element, context, parentNamespace) {
4335
+ var tag = element.type.toLowerCase();
4336
+ var namespace = parentNamespace;
4337
+
4338
+ if (parentNamespace === Namespaces.html) {
4339
+ namespace = getIntrinsicNamespace(tag);
4340
+ }
4341
+
4342
+ {
4343
+ if (namespace === Namespaces.html) {
4344
+ // Should this check be gated by parent namespace? Not sure we want to
4345
+ // allow <SVG> or <mATH>.
4346
+ if (tag !== element.type) {
4347
+ error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', element.type);
4348
+ }
4349
+ }
4350
+ }
4351
+
4352
+ validateDangerousTag(tag);
4353
+ var props = element.props;
4354
+
4355
+ if (tag === 'input') {
4356
+ {
4357
+ checkControlledValueProps('input', props);
4358
+
4359
+ if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnDefaultChecked) {
4360
+ 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);
4361
+
4362
+ didWarnDefaultChecked = true;
4363
+ }
4364
+
4365
+ if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultInputValue) {
4366
+ 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);
4367
+
4368
+ didWarnDefaultInputValue = true;
4369
+ }
4370
+ }
4371
+
4372
+ props = _assign({
4373
+ type: undefined
4374
+ }, props, {
4375
+ defaultChecked: undefined,
4376
+ defaultValue: undefined,
4377
+ value: props.value != null ? props.value : props.defaultValue,
4378
+ checked: props.checked != null ? props.checked : props.defaultChecked
4379
+ });
4380
+ } else if (tag === 'textarea') {
4381
+ {
4382
+ checkControlledValueProps('textarea', props);
4383
+
4384
+ if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultTextareaValue) {
4385
+ 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');
4386
+
4387
+ didWarnDefaultTextareaValue = true;
4388
+ }
4389
+ }
4390
+
4391
+ var initialValue = props.value;
4392
+
4393
+ if (initialValue == null) {
4394
+ var defaultValue = props.defaultValue; // TODO (yungsters): Remove support for children content in <textarea>.
4395
+
4396
+ var textareaChildren = props.children;
4397
+
4398
+ if (textareaChildren != null) {
4399
+ {
4400
+ error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
4401
+ }
4402
+
4403
+ if (!(defaultValue == null)) {
4404
+ {
4405
+ throw Error( "If you supply `defaultValue` on a <textarea>, do not pass children." );
4406
+ }
4407
+ }
4408
+
4409
+ if (Array.isArray(textareaChildren)) {
4410
+ if (!(textareaChildren.length <= 1)) {
4411
+ {
4412
+ throw Error( "<textarea> can only have at most one child." );
4413
+ }
4414
+ }
4415
+
4416
+ textareaChildren = textareaChildren[0];
4417
+ }
4418
+
4419
+ defaultValue = '' + textareaChildren;
4420
+ }
4421
+
4422
+ if (defaultValue == null) {
4423
+ defaultValue = '';
4424
+ }
4425
+
4426
+ initialValue = defaultValue;
4427
+ }
4428
+
4429
+ props = _assign({}, props, {
4430
+ value: undefined,
4431
+ children: '' + initialValue
4432
+ });
4433
+ } else if (tag === 'select') {
4434
+ {
4435
+ checkControlledValueProps('select', props);
4436
+
4437
+ for (var i = 0; i < valuePropNames.length; i++) {
4438
+ var propName = valuePropNames[i];
4439
+
4440
+ if (props[propName] == null) {
4441
+ continue;
4442
+ }
4443
+
4444
+ var isArray = Array.isArray(props[propName]);
4445
+
4446
+ if (props.multiple && !isArray) {
4447
+ error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.', propName);
4448
+ } else if (!props.multiple && isArray) {
4449
+ error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.', propName);
4450
+ }
4451
+ }
4452
+
4453
+ if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultSelectValue) {
4454
+ 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');
4455
+
4456
+ didWarnDefaultSelectValue = true;
4457
+ }
4458
+ }
4459
+
4460
+ this.currentSelectValue = props.value != null ? props.value : props.defaultValue;
4461
+ props = _assign({}, props, {
4462
+ value: undefined
4463
+ });
4464
+ } else if (tag === 'option') {
4465
+ var selected = null;
4466
+ var selectValue = this.currentSelectValue;
4467
+ var optionChildren = flattenOptionChildren(props.children);
4468
+
4469
+ if (selectValue != null) {
4470
+ var value;
4471
+
4472
+ if (props.value != null) {
4473
+ value = props.value + '';
4474
+ } else {
4475
+ value = optionChildren;
4476
+ }
4477
+
4478
+ selected = false;
4479
+
4480
+ if (Array.isArray(selectValue)) {
4481
+ // multiple
4482
+ for (var j = 0; j < selectValue.length; j++) {
4483
+ if ('' + selectValue[j] === value) {
4484
+ selected = true;
4485
+ break;
4486
+ }
4487
+ }
4488
+ } else {
4489
+ selected = '' + selectValue === value;
4490
+ }
4491
+
4492
+ props = _assign({
4493
+ selected: undefined,
4494
+ children: undefined
4495
+ }, props, {
4496
+ selected: selected,
4497
+ children: optionChildren
4498
+ });
4499
+ }
4500
+ }
4501
+
4502
+ {
4503
+ validatePropertiesInDevelopment(tag, props);
4504
+ }
4505
+
4506
+ assertValidProps(tag, props);
4507
+ var out = createOpenTagMarkup(element.type, tag, props, namespace, this.makeStaticMarkup, this.stack.length === 1);
4508
+ var footer = '';
4509
+
4510
+ if (omittedCloseTags.hasOwnProperty(tag)) {
4511
+ out += '/>';
4512
+ } else {
4513
+ out += '>';
4514
+ footer = '</' + element.type + '>';
4515
+ }
4516
+
4517
+ var children;
4518
+ var innerMarkup = getNonChildrenInnerMarkup(props);
4519
+
4520
+ if (innerMarkup != null) {
4521
+ children = [];
4522
+
4523
+ if (newlineEatingTags.hasOwnProperty(tag) && innerMarkup.charAt(0) === '\n') {
4524
+ // text/html ignores the first character in these tags if it's a newline
4525
+ // Prefer to break application/xml over text/html (for now) by adding
4526
+ // a newline specifically to get eaten by the parser. (Alternately for
4527
+ // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first
4528
+ // \r is normalized out by HTMLTextAreaElement#value.)
4529
+ // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre>
4530
+ // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions>
4531
+ // See: <http://www.w3.org/TR/html5/syntax.html#newlines>
4532
+ // See: Parsing of "textarea" "listing" and "pre" elements
4533
+ // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody>
4534
+ out += '\n';
4535
+ }
4536
+
4537
+ out += innerMarkup;
4538
+ } else {
4539
+ children = toArray(props.children);
4540
+ }
4541
+
4542
+ var frame = {
4543
+ domNamespace: getChildNamespace(parentNamespace, element.type),
4544
+ type: tag,
4545
+ children: children,
4546
+ childIndex: 0,
4547
+ context: context,
4548
+ footer: footer
4549
+ };
4550
+
4551
+ {
4552
+ frame.debugElementStack = [];
4553
+ }
4554
+
4555
+ this.stack.push(frame);
4556
+ this.previousWasTextNode = false;
4557
+ return out;
4558
+ };
4559
+
4560
+ return ReactDOMServerRenderer;
4561
+ }();
4562
+
4563
+ /**
4564
+ * Render a ReactElement to its initial HTML. This should only be used on the
4565
+ * server.
4566
+ * See https://reactjs.org/docs/react-dom-server.html#rendertostring
4567
+ */
4568
+
4569
+ function renderToString(element, options) {
4570
+ var renderer = new ReactDOMServerRenderer(element, false, options);
4571
+
4572
+ try {
4573
+ var markup = renderer.read(Infinity);
4574
+ return markup;
4575
+ } finally {
4576
+ renderer.destroy();
4577
+ }
4578
+ }
4579
+ /**
4580
+ * Similar to renderToString, except this doesn't create extra DOM attributes
4581
+ * such as data-react-id that React uses internally.
4582
+ * See https://reactjs.org/docs/react-dom-server.html#rendertostaticmarkup
4583
+ */
4584
+
4585
+ function renderToStaticMarkup(element, options) {
4586
+ var renderer = new ReactDOMServerRenderer(element, true, options);
4587
+
4588
+ try {
4589
+ var markup = renderer.read(Infinity);
4590
+ return markup;
4591
+ } finally {
4592
+ renderer.destroy();
4593
+ }
4594
+ }
4595
+
4596
+ function renderToNodeStream() {
4597
+ {
4598
+ {
4599
+ throw Error( "ReactDOMServer.renderToNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToString() instead." );
4600
+ }
4601
+ }
4602
+ }
4603
+
4604
+ function renderToStaticNodeStream() {
4605
+ {
4606
+ {
4607
+ throw Error( "ReactDOMServer.renderToStaticNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToStaticMarkup() instead." );
4608
+ }
4609
+ }
4610
+ }
4611
+
4612
+ reactDomServer_browser_development.renderToNodeStream = renderToNodeStream;
4613
+ reactDomServer_browser_development.renderToStaticMarkup = renderToStaticMarkup;
4614
+ reactDomServer_browser_development.renderToStaticNodeStream = renderToStaticNodeStream;
4615
+ reactDomServer_browser_development.renderToString = renderToString;
4616
+ reactDomServer_browser_development.version = ReactVersion;
4617
+ })();
4618
+ }
4619
+ return reactDomServer_browser_development;
4620
+ }
4621
+
4622
+ var hasRequiredServer_browser;
4623
+
4624
+ function requireServer_browser () {
4625
+ if (hasRequiredServer_browser) return server_browser.exports;
4626
+ hasRequiredServer_browser = 1;
4627
+
4628
+ if (process.env.NODE_ENV === 'production') {
4629
+ server_browser.exports = requireReactDomServer_browser_production_min();
4630
+ } else {
4631
+ server_browser.exports = requireReactDomServer_browser_development();
4632
+ }
4633
+ return server_browser.exports;
4634
+ }
4635
+
4636
+ var server_browserExports = requireServer_browser();
4637
+ var ReactDOMServer = /*@__PURE__*/getDefaultExportFromCjs(server_browserExports);
4638
+
142
4639
  const defaultFetch = (url, options) => {
143
4640
  return fetch(url, {
144
4641
  credentials: "include",
@@ -356,7 +4853,7 @@
356
4853
  fill: fill
357
4854
  })));
358
4855
 
359
- var styles$b = {"announcement":"announcement-pI5tM","announcement--platform":"announcement--platform-EcUn2","announcement-icon":"announcement-icon-Ov39-","announcement-content":"announcement-content-q2ad6","dismiss":"dismiss-wUAoU"};
4856
+ var styles$b = {"announcement":"announcement-pI5tM","announcement--platform":"announcement--platform-EcUn2","announcement--promo":"announcement--promo-FarUk","announcement-icon":"announcement-icon-Ov39-","announcement-content":"announcement-content-q2ad6","dismiss":"dismiss-wUAoU","dismiss--promo":"dismiss--promo-7zvO4"};
360
4857
 
361
4858
  function AnnouncementIcon() {
362
4859
  return /*#__PURE__*/React.createElement("svg", {
@@ -375,6 +4872,63 @@
375
4872
  }));
376
4873
  }
377
4874
 
4875
+ function PromoBackground() {
4876
+ return /*#__PURE__*/React.createElement("svg", {
4877
+ width: "1724",
4878
+ height: "1080",
4879
+ viewBox: "0 0 1724 1080",
4880
+ fill: "none",
4881
+ xmlns: "http://www.w3.org/2000/svg"
4882
+ }, /*#__PURE__*/React.createElement("g", {
4883
+ filter: "url(#filter0_f_154_9174)"
4884
+ }, /*#__PURE__*/React.createElement("rect", {
4885
+ x: "606.744",
4886
+ y: "1062.82",
4887
+ width: "649.488",
4888
+ height: "964.695",
4889
+ rx: "324.744",
4890
+ transform: "rotate(-120 606.744 1062.82)",
4891
+ fill: "url(#paint0_linear_154_9174)",
4892
+ fillOpacity: "0.5"
4893
+ })), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("filter", {
4894
+ id: "filter0_f_154_9174",
4895
+ x: "0.810547",
4896
+ y: "-263.19",
4897
+ width: "1722.57",
4898
+ height: "1607.2",
4899
+ filterUnits: "userSpaceOnUse",
4900
+ colorInterpolationFilters: "sRGB"
4901
+ }, /*#__PURE__*/React.createElement("feFlood", {
4902
+ floodOpacity: "0",
4903
+ result: "BackgroundImageFix"
4904
+ }), /*#__PURE__*/React.createElement("feBlend", {
4905
+ mode: "normal",
4906
+ in: "SourceGraphic",
4907
+ in2: "BackgroundImageFix",
4908
+ result: "shape"
4909
+ }), /*#__PURE__*/React.createElement("feGaussianBlur", {
4910
+ stdDeviation: "200",
4911
+ result: "effect1_foregroundBlur_154_9174"
4912
+ })), /*#__PURE__*/React.createElement("linearGradient", {
4913
+ id: "paint0_linear_154_9174",
4914
+ x1: "1040.11",
4915
+ y1: "1031.29",
4916
+ x2: "1407.11",
4917
+ y2: "1806.85",
4918
+ gradientUnits: "userSpaceOnUse"
4919
+ }, /*#__PURE__*/React.createElement("stop", {
4920
+ offset: "0.21875",
4921
+ stopColor: "#FFD748"
4922
+ }), /*#__PURE__*/React.createElement("stop", {
4923
+ offset: "0.541667",
4924
+ stopColor: "#FF4242"
4925
+ }), /*#__PURE__*/React.createElement("stop", {
4926
+ offset: "0.84375",
4927
+ stopColor: "#657CF1"
4928
+ }))));
4929
+ }
4930
+
4931
+ const promoBackgroundUrl = `url("data:image/svg+xml,${encodeURIComponent(ReactDOMServer.renderToStaticMarkup(/*#__PURE__*/React.createElement(PromoBackground)))}")`;
378
4932
  const entries = function (obj) {
379
4933
  const ownProps = Object.keys(obj);
380
4934
  let i = ownProps.length;
@@ -424,11 +4978,20 @@
424
4978
  render() {
425
4979
  const {
426
4980
  style,
4981
+ variant,
427
4982
  ...platformProps
428
4983
  } = this.props;
4984
+ const isPromo = variant === "promo";
429
4985
  return /*#__PURE__*/React.createElement("div", {
430
- className: classnames(styles$b["announcement"], styles$b["announcement--platform"])
431
- }, /*#__PURE__*/React.createElement(AnnouncementIcon, null), /*#__PURE__*/React.createElement("div", {
4986
+ className: classnames(styles$b["announcement"], styles$b[`announcement--${variant !== null && variant !== void 0 ? variant : "platform"}`]),
4987
+ "data-announcement-variant": variant !== null && variant !== void 0 ? variant : "platform",
4988
+ style: isPromo ? {
4989
+ backgroundImage: promoBackgroundUrl,
4990
+ backgroundPosition: "center center",
4991
+ backgroundRepeat: "no-repeat",
4992
+ backgroundSize: "cover"
4993
+ } : undefined
4994
+ }, !isPromo && /*#__PURE__*/React.createElement(AnnouncementIcon, null), /*#__PURE__*/React.createElement("div", {
432
4995
  className: styles$b["announcement-content"],
433
4996
  style: style,
434
4997
  ...platformProps
@@ -451,10 +5014,12 @@
451
5014
  env: this.props.env,
452
5015
  initialAnnouncements: this.props.data,
453
5016
  configuredFetch: this.props.configuredFetch
454
- }, (data, actions) => Boolean(data.announcements.length > 0) ? (/*#__PURE__*/React.createElement("div", null, data.announcements.map(announcement => this.props.renderItem({
455
- actions,
456
- announcement
457
- })))) : null));
5017
+ }, (data, actions) => {
5018
+ return data.announcements.length > 0 ? (/*#__PURE__*/React.createElement("div", null, data.announcements.map(announcement => this.props.renderItem({
5019
+ actions,
5020
+ announcement
5021
+ })))) : null;
5022
+ }));
458
5023
  }
459
5024
  }
460
5025
  PlatformAnnouncements.defaultProps = {
@@ -462,33 +5027,39 @@
462
5027
  renderItem: ({
463
5028
  announcement,
464
5029
  actions
465
- }) => (/*#__PURE__*/React.createElement(DissmissibleAnnouncement, {
5030
+ }) => (/*#__PURE__*/React.createElement(DismissibleAnnouncement, {
466
5031
  key: announcement.id,
467
5032
  html: announcement.data.html,
5033
+ variant: announcement.data.style,
468
5034
  onClick: () => actions.dismissAnnouncements(announcement.id)
469
5035
  }))
470
5036
  };
471
5037
  function StyledDismissButton$1({
5038
+ variant,
472
5039
  ...props
473
5040
  }) {
5041
+ const isPromo = variant === "promo";
474
5042
  return /*#__PURE__*/React.createElement("button", {
475
5043
  type: "button",
476
- className: styles$b.dismiss,
5044
+ className: classnames(styles$b.dismiss, isPromo && styles$b["dismiss--promo"]),
477
5045
  ...props
478
5046
  }, /*#__PURE__*/React.createElement(X, {
479
- fill: "white",
5047
+ fill: isPromo ? "currentColor" : "white",
480
5048
  style: {
481
5049
  height: 20,
482
5050
  width: 20
483
5051
  }
484
5052
  }));
485
5053
  }
486
- function DissmissibleAnnouncement(props) {
487
- return /*#__PURE__*/React.createElement(StyledAnnouncement$1, null, /*#__PURE__*/React.createElement("span", {
5054
+ function DismissibleAnnouncement(props) {
5055
+ return /*#__PURE__*/React.createElement(StyledAnnouncement$1, {
5056
+ variant: props.variant
5057
+ }, /*#__PURE__*/React.createElement("span", {
488
5058
  dangerouslySetInnerHTML: {
489
5059
  __html: props.html
490
5060
  }
491
5061
  }), /*#__PURE__*/React.createElement(StyledDismissButton$1, {
5062
+ variant: props.variant,
492
5063
  onClick: props.onClick
493
5064
  }));
494
5065
  }
@@ -685,7 +5256,47 @@
685
5256
  }, [channelSubscription, callback]);
686
5257
  };
687
5258
 
5259
+ function useMediaQuery(query) {
5260
+ const getMatches = query => {
5261
+ // Prevents SSR issues
5262
+ if (typeof window !== "undefined") {
5263
+ return window.matchMedia(query).matches;
5264
+ }
5265
+ return false;
5266
+ };
5267
+ const [matches, setMatches] = React.useState(getMatches(query));
5268
+ function handleChange() {
5269
+ setMatches(getMatches(query));
5270
+ }
5271
+ React.useEffect(() => {
5272
+ const matchMedia = window.matchMedia(query);
5273
+ // Triggered at the first client-side load and if query changes
5274
+ handleChange();
5275
+ // Listen matchMedia
5276
+ if (matchMedia.addListener) {
5277
+ matchMedia.addListener(handleChange);
5278
+ } else {
5279
+ matchMedia.addEventListener("change", handleChange);
5280
+ }
5281
+ return () => {
5282
+ if (matchMedia.removeListener) {
5283
+ matchMedia.removeListener(handleChange);
5284
+ } else {
5285
+ matchMedia.removeEventListener("change", handleChange);
5286
+ }
5287
+ };
5288
+ }, [query]);
5289
+ return matches;
5290
+ }
5291
+
688
5292
  const capitalize = s => s.charAt(0).toUpperCase() + s.slice(1);
5293
+ const RESOLVED_COLOR_MODE_ATTRIBUTE = "data-resolved-color-mode";
5294
+ function resolveColorMode(colorMode) {
5295
+ if (colorMode === "system") {
5296
+ return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
5297
+ }
5298
+ return colorMode;
5299
+ }
689
5300
  const debounce = (func, wait) => {
690
5301
  let timeout;
691
5302
  return function (...args) {
@@ -766,6 +5377,25 @@
766
5377
  return storedValue;
767
5378
  };
768
5379
 
5380
+ function createStore(initialState) {
5381
+ let currentState = initialState;
5382
+ const listeners = new Set();
5383
+ return {
5384
+ getState: () => currentState,
5385
+ setState: newState => {
5386
+ currentState = newState;
5387
+ listeners.forEach(listener => listener(currentState));
5388
+ },
5389
+ subscribe: listener => {
5390
+ listeners.add(listener);
5391
+ return () => listeners.delete(listener);
5392
+ }
5393
+ };
5394
+ }
5395
+ const store$1 = createStore({});
5396
+
5397
+ const useStore = (selector = state => state) => shim.useSyncExternalStore(store$1.subscribe, () => selector(store$1.getState()));
5398
+
769
5399
  const useTopbarAPI = ({
770
5400
  configuredFetch,
771
5401
  env
@@ -792,23 +5422,6 @@
792
5422
  return resp;
793
5423
  };
794
5424
 
795
- function createStore(initialState) {
796
- let currentState = initialState;
797
- const listeners = new Set();
798
- return {
799
- getState: () => currentState,
800
- setState: newState => {
801
- currentState = newState;
802
- listeners.forEach(listener => listener(currentState));
803
- },
804
- subscribe: listener => {
805
- listeners.add(listener);
806
- return () => listeners.delete(listener);
807
- }
808
- };
809
- }
810
- const store$1 = createStore({});
811
-
812
5425
  const AppsProvider = ({
813
5426
  configuredFetch = defaultFetch,
814
5427
  enableJoltLogging,
@@ -828,6 +5441,10 @@
828
5441
  const hasConnectedPeople = (_b = (_a = topbarResponse === null || topbarResponse === void 0 ? void 0 : topbarResponse.data) === null || _a === void 0 ? void 0 : _a.attributes) === null || _b === void 0 ? void 0 : _b.has_connected_people;
829
5442
  const mfaConfigured = !!((_d = (_c = topbarResponse === null || topbarResponse === void 0 ? void 0 : topbarResponse.data) === null || _c === void 0 ? void 0 : _c.attributes) === null || _d === void 0 ? void 0 : _d.mfa_configured);
830
5443
  const colorMode = (_f = (_e = topbarResponse === null || topbarResponse === void 0 ? void 0 : topbarResponse.data) === null || _e === void 0 ? void 0 : _e.attributes) === null || _f === void 0 ? void 0 : _f.color_mode;
5444
+ const {
5445
+ colorMode: currentColorMode
5446
+ } = useStore();
5447
+ const prefersDark = useMediaQuery("(prefers-color-scheme: dark)");
831
5448
  const name = (_h = (_g = topbarResponse === null || topbarResponse === void 0 ? void 0 : topbarResponse.data) === null || _g === void 0 ? void 0 : _g.attributes) === null || _h === void 0 ? void 0 : _h.name;
832
5449
  const notificationsEnabled = !window.notificationsDisabled;
833
5450
  const organizationTimeZone = ((_k = (_j = topbarResponse === null || topbarResponse === void 0 ? void 0 : topbarResponse.data) === null || _j === void 0 ? void 0 : _j.attributes) === null || _k === void 0 ? void 0 : _k.org_time_zone) || "America/Los_Angeles";
@@ -879,6 +5496,16 @@
879
5496
  enabled: true,
880
5497
  joltChannel: notificationsJoltChannel
881
5498
  });
5499
+ React.useLayoutEffect(() => {
5500
+ if (colorMode) {
5501
+ document.documentElement.setAttribute(RESOLVED_COLOR_MODE_ATTRIBUTE, resolveColorMode(colorMode));
5502
+ }
5503
+ }, [colorMode]);
5504
+ React.useEffect(() => {
5505
+ if (currentColorMode === "system") {
5506
+ document.documentElement.setAttribute(RESOLVED_COLOR_MODE_ATTRIBUTE, prefersDark ? "dark" : "light");
5507
+ }
5508
+ }, [currentColorMode, prefersDark]);
882
5509
  React.useEffect(() => {
883
5510
  const state = store$1.getState();
884
5511
  store$1.setState({
@@ -2047,8 +6674,6 @@
2047
6674
  }, [routes, app]);
2048
6675
  };
2049
6676
 
2050
- const useStore = (selector = state => state) => shim.useSyncExternalStore(store$1.subscribe, () => selector(store$1.getState()));
2051
-
2052
6677
  const useUpdateStore = () => React.useCallback(updates => {
2053
6678
  const currentState = store$1.getState();
2054
6679
  store$1.setState({
@@ -2414,7 +7039,7 @@
2414
7039
  width: 24,
2415
7040
  xmlns: "http://www.w3.org/2000/svg"
2416
7041
  }, /*#__PURE__*/React.createElement(Accounts$1, {
2417
- color: "var(--t-icon-color-secondary",
7042
+ color: "var(--t-icon-color-secondary)",
2418
7043
  key: "key2"
2419
7044
  })), /*#__PURE__*/React.createElement("span", null, "Account settings"));
2420
7045
  }
@@ -2662,8 +7287,8 @@
2662
7287
  function onHashChange() {
2663
7288
  updateFragment(location.hash);
2664
7289
  }
2665
- window.addEventListener('hashchange', onHashChange);
2666
- return () => window.removeEventListener('hashchange', onHashChange);
7290
+ window.addEventListener("hashchange", onHashChange);
7291
+ return () => window.removeEventListener("hashchange", onHashChange);
2667
7292
  }, [updateFragment]);
2668
7293
  return [value, updateFragment];
2669
7294
  }
@@ -2677,9 +7302,9 @@
2677
7302
  }, [updateFragment]);
2678
7303
  const route = React.useMemo(() => {
2679
7304
  if (toolbarFragment) {
2680
- const [tool, ...rest] = toolbarFragment.split('/');
7305
+ const [tool, ...rest] = toolbarFragment.split("/");
2681
7306
  return {
2682
- path: rest.join('/'),
7307
+ path: rest.join("/"),
2683
7308
  tool
2684
7309
  };
2685
7310
  } else {
@@ -2956,6 +7581,7 @@
2956
7581
  colorMode
2957
7582
  });
2958
7583
  document.documentElement.setAttribute("data-color-mode", colorMode);
7584
+ document.documentElement.setAttribute(RESOLVED_COLOR_MODE_ATTRIBUTE, resolveColorMode(colorMode));
2959
7585
  updateColorMode(colorMode);
2960
7586
  }
2961
7587
  }), /*#__PURE__*/React.createElement(ColorModeIcon, {
@@ -4212,11 +8838,11 @@
4212
8838
  return iframeSrc;
4213
8839
  }
4214
8840
  function encodeQueryString(path) {
4215
- const [pathPart, queryPart] = path.split('?', 2);
8841
+ const [pathPart, queryPart] = path.split("?", 2);
4216
8842
  return queryPart ? `${pathPart}?${encodeURIComponent(queryPart)}` : pathPart;
4217
8843
  }
4218
8844
  function decodeQueryString(path) {
4219
- const [pathPart, queryPart] = path.split('?', 2);
8845
+ const [pathPart, queryPart] = path.split("?", 2);
4220
8846
  return queryPart ? `${pathPart}?${decodeURIComponent(queryPart)}` : pathPart;
4221
8847
  }
4222
8848
 
@@ -4390,7 +9016,7 @@
4390
9016
  document.body.style.overflow = "hidden";
4391
9017
  window.scrollTo(0, 0);
4392
9018
  } else {
4393
- document.body.style.overflow = "auto";
9019
+ document.body.style.overflow = "";
4394
9020
  }
4395
9021
  }, [open]);
4396
9022
  // Listen for external close requests from store