UNPKG

17.4 kBJavaScriptView Raw
1/** @license React v16.7.0
2 * react-dom-server.browser.production.min.js
3 *
4 * Copyright (c) Facebook, Inc. and its affiliates.
5 *
6 * This source code is licensed under the MIT license found in the
7 * LICENSE file in the root directory of this source tree.
8 */
9'use strict';(function(u,C){"object"===typeof exports&&"undefined"!==typeof module?module.exports=C(require("react")):"function"===typeof define&&define.amd?define(["react"],C):u.ReactDOMServer=C(u.React)})(this,function(u){function C(a,b,f,c,g,d,h,e){if(!a){a=void 0;if(void 0===b)a=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var k=[f,c,g,d,h,e],ja=0;a=Error(b.replace(/%s/g,function(){return k[ja++]}));
10a.name="Invariant Violation"}a.framesToPop=1;throw a;}}function v(a){for(var b=arguments.length-1,f="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=0;c<b;c++)f+="&args[]="+encodeURIComponent(arguments[c+1]);C(!1,"Minified React error #"+a+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",f)}function E(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;
11switch(a){case O:return"ConcurrentMode";case H:return"Fragment";case P:return"Portal";case Q:return"Profiler";case R:return"StrictMode";case I:return"Suspense"}if("object"===typeof a)switch(a.$$typeof){case S:return"Context.Consumer";case J:return"Context.Provider";case T:var b=a.render;b=b.displayName||b.name||"";return a.displayName||(""!==b?"ForwardRef("+b+")":"ForwardRef");case U:return E(a.type);case V:if(a=1===a._status?a._result:null)return E(a)}return null}function F(a,b){for(var f=a._threadCount|
120;f<=b;f++)a[f]=a._currentValue2,a._threadCount=f+1}function ka(a,b,f){var c=a.contextType;if("object"===typeof c&&null!==c)return F(c,f),c[f];if(a=a.contextTypes){f={};for(var g in a)f[g]=b[g];b=f}else b=W;return b}function X(a){if(Y.call(Z,a))return!0;if(Y.call(aa,a))return!1;if(la.test(a))return Z[a]=!0;aa[a]=!0;return!1}function ma(a,b,f,c){if(null!==f&&0===f.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(c)return!1;if(null!==f)return!f.acceptsBooleans;
13a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}function na(a,b,f,c){if(null===b||"undefined"===typeof b||ma(a,b,f,c))return!0;if(c)return!1;if(null!==f)switch(f.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function t(a,b,f,c,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=c;this.attributeNamespace=g;this.mustUseProperty=f;this.propertyName=a;this.type=b}function B(a){if("boolean"===typeof a||"number"===
14typeof a)return""+a;a=""+a;var b=oa.exec(a);if(b){var f="",c,g=0;for(c=b.index;c<a.length;c++){switch(a.charCodeAt(c)){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}g!==c&&(f+=a.substring(g,c));g=c+1;f+=b}a=g!==c?f+a.substring(g,c):f}return a}function ba(a,b,f,c){for(;ca;)ca=!1,f=a(b,c);return f}function da(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";
15default:return"http://www.w3.org/1999/xhtml"}}function pa(a){if(void 0===a||null===a)return a;var b="";u.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}function ea(a,b){void 0===a&&v("152",E(b)||"Component")}function qa(a,b,f){function c(g,c){var d=ka(c,b,f),e=[],h=!1,m={isMounted:function(a){return!1},enqueueForceUpdate:function(a){if(null===e)return null},enqueueReplaceState:function(a,b){h=!0;e=[b]},enqueueSetState:function(a,b){if(null===e)return null;e.push(b)}},l=void 0;if(c.prototype&&
16c.prototype.isReactComponent){if(l=new c(g.props,d,m),"function"===typeof c.getDerivedStateFromProps){var k=c.getDerivedStateFromProps.call(null,g.props,l.state);null!=k&&(l.state=y({},l.state,k))}}else if(l=c(g.props,d,m),l=ba(c,g.props,l,d),null==l||null==l.render){a=l;ea(a,c);return}l.props=g.props;l.context=d;l.updater=m;m=l.state;void 0===m&&(l.state=m=null);if("function"===typeof l.UNSAFE_componentWillMount||"function"===typeof l.componentWillMount)if("function"===typeof l.componentWillMount&&
17"function"!==typeof c.getDerivedStateFromProps&&l.componentWillMount(),"function"===typeof l.UNSAFE_componentWillMount&&"function"!==typeof c.getDerivedStateFromProps&&l.UNSAFE_componentWillMount(),e.length){m=e;var n=h;e=null;h=!1;if(n&&1===m.length)l.state=m[0];else{k=n?m[0]:l.state;var q=!0;for(n=n?1:0;n<m.length;n++){var r=m[n];r="function"===typeof r?r.call(l,k,g.props,d):r;null!=r&&(q?(q=!1,k=y({},k,r)):y(k,r))}l.state=k}}else e=null;a=l.render();ea(a,c);g=void 0;if("function"===typeof l.getChildContext&&
18(d=c.childContextTypes,"object"===typeof d)){g=l.getChildContext();for(var t in g)t in d?void 0:v("108",E(c)||"Unknown",t)}g&&(b=y({},b,g))}for(;u.isValidElement(a);){var g=a,d=g.type;if("function"!==typeof d)break;c(g,d)}return{child:a,context:b}}var y=u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.assign,k="function"===typeof Symbol&&Symbol.for,P=k?Symbol.for("react.portal"):60106,H=k?Symbol.for("react.fragment"):60107,R=k?Symbol.for("react.strict_mode"):60108,Q=k?Symbol.for("react.profiler"):
1960114,J=k?Symbol.for("react.provider"):60109,S=k?Symbol.for("react.context"):60110,O=k?Symbol.for("react.concurrent_mode"):60111,T=k?Symbol.for("react.forward_ref"):60112,I=k?Symbol.for("react.suspense"):60113,U=k?Symbol.for("react.memo"):60115,V=k?Symbol.for("react.lazy"):60116;k=u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;for(var W={},q=new Uint16Array(16),z=0;15>z;z++)q[z]=z+1;q[15]=0;var la=/^[: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]*$/,
20Y=Object.prototype.hasOwnProperty,aa={},Z={},r={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){r[a]=new t(a,0,!1,a,null)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];r[b]=new t(b,1,!1,a[1],null)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){r[a]=new t(a,2,!1,
21a.toLowerCase(),null)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){r[a]=new t(a,2,!1,a,null)});"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){r[a]=new t(a,3,!1,a.toLowerCase(),null)});["checked","multiple","muted","selected"].forEach(function(a){r[a]=new t(a,3,!0,a,null)});["capture",
22"download"].forEach(function(a){r[a]=new t(a,4,!1,a,null)});["cols","rows","size","span"].forEach(function(a){r[a]=new t(a,6,!1,a,null)});["rowSpan","start"].forEach(function(a){r[a]=new t(a,5,!1,a.toLowerCase(),null)});var K=/[\-:]([a-z])/g,L=function(a){return a[1].toUpperCase()};"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering 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=
23a.replace(K,L);r[b]=new t(b,1,!1,a,null)});"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(K,L);r[b]=new t(b,1,!1,a,"http://www.w3.org/1999/xlink")});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(K,L);r[b]=new t(b,1,!1,a,"http://www.w3.org/XML/1998/namespace")});r.tabIndex=new t("tabIndex",1,!1,"tabindex",null);var oa=/["'&<>]/,ca=!1,G=0,sa={readContext:function(a,b){b=G;F(a,b);return a[b]}},
24fa={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},ta=y({menuitem:!0},fa),D={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,
25gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ua=["Webkit","ms","Moz","O"];Object.keys(D).forEach(function(a){ua.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);D[b]=D[a]})});var va=/([A-Z])/g,wa=/^ms-/,A=u.Children.toArray,M=k.ReactCurrentOwner,xa={listing:!0,pre:!0,
26textarea:!0},ya=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,ha={},N={},za=Object.prototype.hasOwnProperty,Aa={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null},ia=function(){function a(b,f){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");u.isValidElement(b)?b.type!==H?b=[b]:(b=b.props.children,b=u.isValidElement(b)?[b]:A(b)):b=A(b);b={type:null,domNamespace:"http://www.w3.org/1999/xhtml",children:b,childIndex:0,context:W,
27footer:""};var c=q[0];if(0===c){var g=q;c=g.length;var d=2*c;65536>=d?void 0:v("304");var h=new Uint16Array(d);h.set(g);q=h;q[0]=c+1;for(g=c;g<d-1;g++)q[g]=g+1;q[d-1]=0}else q[0]=q[c];this.threadID=c;this.stack=[b];this.exhausted=!1;this.currentSelectValue=null;this.previousWasTextNode=!1;this.makeStaticMarkup=f;this.suspenseDepth=0;this.contextIndex=-1;this.contextStack=[];this.contextValueStack=[]}a.prototype.destroy=function(){if(!this.exhausted){this.exhausted=!0;var a=this.threadID;q[a]=q[0];
28q[0]=a}};a.prototype.pushProvider=function(a){var b=++this.contextIndex,c=a.type._context,g=this.threadID;F(c,g);var d=c[g];this.contextStack[b]=c;this.contextValueStack[b]=d;c[g]=a.props.value};a.prototype.popProvider=function(a){a=this.contextIndex;var b=this.contextStack[a],c=this.contextValueStack[a];this.contextStack[a]=null;this.contextValueStack[a]=null;this.contextIndex--;b[this.threadID]=c};a.prototype.read=function(a){if(this.exhausted)return null;var b=G;G=this.threadID;var c=M.currentDispatcher;
29M.currentDispatcher=sa;try{for(var g=[""],d=!1;g[0].length<a;){if(0===this.stack.length){this.exhausted=!0;var h=this.threadID;q[h]=q[0];q[0]=h;break}var e=this.stack[this.stack.length-1];if(d||e.childIndex>=e.children.length){var k=e.footer;""!==k&&(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===J)this.popProvider(e.type);else if(e.type===I){this.suspenseDepth--;var r=g.pop();if(d){d=
30!1;var p=e.fallbackFrame;p?void 0:v("303");this.stack.push(p);continue}else g[this.suspenseDepth]+=r}g[this.suspenseDepth]+=k}else{var m=e.children[e.childIndex++],l="";try{l+=this.render(m,e.context,e.domNamespace)}catch(ra){throw ra;}finally{}g.length<=this.suspenseDepth&&g.push("");g[this.suspenseDepth]+=l}}return g[0]}finally{M.currentDispatcher=c,G=b}};a.prototype.render=function(a,f,c){if("string"===typeof a||"number"===typeof a){c=""+a;if(""===c)return"";if(this.makeStaticMarkup)return B(c);
31if(this.previousWasTextNode)return"\x3c!-- --\x3e"+B(c);this.previousWasTextNode=!0;return B(c)}f=qa(a,f,this.threadID);a=f.child;f=f.context;if(null===a||!1===a)return"";if(!u.isValidElement(a)){if(null!=a&&null!=a.$$typeof){var b=a.$$typeof;b===P?v("257"):void 0;v("258",b.toString())}a=A(a);this.stack.push({type:null,domNamespace:c,children:a,childIndex:0,context:f,footer:""});return""}b=a.type;if("string"===typeof b)return this.renderDOM(a,f,c);switch(b){case R:case O:case Q:case H:return a=A(a.props.children),
32this.stack.push({type:null,domNamespace:c,children:a,childIndex:0,context:f,footer:""}),"";case I:v("294")}if("object"===typeof b&&null!==b)switch(b.$$typeof){case T:var d=b.render(a.props,a.ref);d=ba(b.render,a.props,d,a.ref);d=A(d);this.stack.push({type:null,domNamespace:c,children:d,childIndex:0,context:f,footer:""});return"";case U:return a=[u.createElement(b.type,y({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:c,children:a,childIndex:0,context:f,footer:""}),"";case J:return b=
33A(a.props.children),c={type:a,domNamespace:c,children:b,childIndex:0,context:f,footer:""},this.pushProvider(a),this.stack.push(c),"";case S:b=a.type;d=a.props;var h=this.threadID;F(b,h);b=A(d.children(b[h]));this.stack.push({type:a,domNamespace:c,children:b,childIndex:0,context:f,footer:""});return"";case V:v("295")}v("130",null==b?b:typeof b,"")};a.prototype.renderDOM=function(a,f,c){var b=a.type.toLowerCase();"http://www.w3.org/1999/xhtml"===c&&da(b);ha.hasOwnProperty(b)||(ya.test(b)?void 0:v("65",
34b),ha[b]=!0);var d=a.props;if("input"===b)d=y({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"===b){var h=d.value;if(null==h){h=d.defaultValue;var e=d.children;null!=e&&(null!=h?v("92"):void 0,Array.isArray(e)&&(1>=e.length?void 0:v("93"),e=e[0]),h=""+e);null==h&&(h="")}d=y({},d,{value:void 0,children:""+h})}else if("select"===b)this.currentSelectValue=null!=d.value?d.value:
35d.defaultValue,d=y({},d,{value:void 0});else if("option"===b){e=this.currentSelectValue;var k=pa(d.children);if(null!=e){var q=null!=d.value?d.value+"":k;h=!1;if(Array.isArray(e))for(var p=0;p<e.length;p++){if(""+e[p]===q){h=!0;break}}else h=""+e===q;d=y({selected:void 0,children:void 0},d,{selected:h,children:k})}}if(h=d)ta[b]&&(null!=h.children||null!=h.dangerouslySetInnerHTML?v("137",b,""):void 0),null!=h.dangerouslySetInnerHTML&&(null!=h.children?v("60"):void 0,"object"===typeof h.dangerouslySetInnerHTML&&
36"__html"in h.dangerouslySetInnerHTML?void 0:v("61")),null!=h.style&&"object"!==typeof h.style?v("62",""):void 0;h=d;e=this.makeStaticMarkup;k=1===this.stack.length;q="<"+a.type;for(x in h)if(za.call(h,x)){var m=h[x];if(null!=m){if("style"===x){p=void 0;var l="",t="";for(p in m)if(m.hasOwnProperty(p)){var n=0===p.indexOf("--"),w=m[p];if(null!=w){var u=p;if(N.hasOwnProperty(u))u=N[u];else{var z=u.replace(va,"-$1").toLowerCase().replace(wa,"-ms-");u=N[u]=z}l+=t+u+":";t=p;n=null==w||"boolean"===typeof w||
37""===w?"":n||"number"!==typeof w||0===w||D.hasOwnProperty(t)&&D[t]?(""+w).trim():w+"px";l+=n;t=";"}}m=l||null}p=null;b:if(n=b,w=h,-1===n.indexOf("-"))n="string"===typeof w.is;else switch(n){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":n=!1;break b;default:n=!0}if(n)Aa.hasOwnProperty(x)||(p=x,p=X(p)&&null!=m?p+"="+('"'+B(m)+'"'):"");else{n=x;p=m;m=r.hasOwnProperty(n)?r[n]:null;
38if(w="style"!==n)w=null!==m?0===m.type:!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1]?!1:!0;w||na(n,p,m,!1)?p="":null!==m?(n=m.attributeName,m=m.type,p=3===m||4===m&&!0===p?n+'=""':n+"="+('"'+B(p)+'"')):p=X(n)?n+"="+('"'+B(p)+'"'):""}p&&(q+=" "+p)}}e||k&&(q+=' data-reactroot=""');var x=q;h="";fa.hasOwnProperty(b)?x+="/>":(x+=">",h="</"+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=
39B(e);break a}e=null}null!=e?(d=[],xa[b]&&"\n"===e.charAt(0)&&(x+="\n"),x+=e):d=A(d.children);a=a.type;c=null==c||"http://www.w3.org/1999/xhtml"===c?da(a):"http://www.w3.org/2000/svg"===c&&"foreignObject"===a?"http://www.w3.org/1999/xhtml":c;this.stack.push({domNamespace:c,type:b,children:d,childIndex:0,context:f,footer:h});this.previousWasTextNode=!1;return x};return a}();k={renderToString:function(a){a=new ia(a,!1);try{return a.read(Infinity)}finally{a.destroy()}},renderToStaticMarkup:function(a){a=
40new ia(a,!0);try{return a.read(Infinity)}finally{a.destroy()}},renderToNodeStream:function(){v("207")},renderToStaticNodeStream:function(){v("208")},version:"16.7.0"};k=(z={default:k},k)||z;return k.default||k});