UNPKG

2.76 kBJavaScriptView Raw
1/** @license React v0.20.4
2 * react-reconciler-reflection.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
10'use strict';Object.defineProperty(exports,"__esModule",{value:!0});function k(b,a,c,d,e,h,f,g){if(!b){b=void 0;if(void 0===a)b=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var r=[c,d,e,h,f,g],t=0;b=Error(a.replace(/%s/g,function(){return r[t++]}));b.name="Invariant Violation"}b.framesToPop=1;throw b;}}
11function l(b){for(var a=arguments.length-1,c="https://reactjs.org/docs/error-decoder.html?invariant="+b,d=0;d<a;d++)c+="&args[]="+encodeURIComponent(arguments[d+1]);k(!1,"Minified React error #"+b+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",c)}var m=require("react").__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;m.hasOwnProperty("ReactCurrentDispatcher")||(m.ReactCurrentDispatcher={current:null});
12function n(b){var a=b;if(b.alternate)for(;a.return;)a=a.return;else{if(0!==(a.effectTag&2))return 1;for(;a.return;)if(a=a.return,0!==(a.effectTag&2))return 1}return 3===a.tag?2:3}function p(b){2!==n(b)?l("188"):void 0}
13function q(b){var a=b.alternate;if(!a)return a=n(b),3===a?l("188"):void 0,1===a?null:b;for(var c=b,d=a;;){var e=c.return,h=e?e.alternate:null;if(!e||!h)break;if(e.child===h.child){for(var f=e.child;f;){if(f===c)return p(e),b;if(f===d)return p(e),a;f=f.sibling}l("188")}if(c.return!==d.return)c=e,d=h;else{f=!1;for(var g=e.child;g;){if(g===c){f=!0;c=e;d=h;break}if(g===d){f=!0;d=e;c=h;break}g=g.sibling}if(!f){for(g=h.child;g;){if(g===c){f=!0;c=h;d=e;break}if(g===d){f=!0;d=h;c=e;break}g=g.sibling}f?void 0:
14l("189")}}c.alternate!==d?l("190"):void 0}3!==c.tag?l("188"):void 0;return c.stateNode.current===c?b:a}exports.isFiberMounted=function(b){return 2===n(b)};exports.isMounted=function(b){return(b=b._reactInternalFiber)?2===n(b):!1};exports.findCurrentFiberUsingSlowPath=q;
15exports.findCurrentHostFiber=function(b){b=q(b);if(!b)return null;for(var a=b;;){if(5===a.tag||6===a.tag)return a;if(a.child)a.child.return=a,a=a.child;else{if(a===b)break;for(;!a.sibling;){if(!a.return||a.return===b)return null;a=a.return}a.sibling.return=a.return;a=a.sibling}}return null};
16exports.findCurrentHostFiberWithNoPortals=function(b){b=q(b);if(!b)return null;for(var a=b;;){if(5===a.tag||6===a.tag)return a;if(a.child&&4!==a.tag)a.child.return=a,a=a.child;else{if(a===b)break;for(;!a.sibling;){if(!a.return||a.return===b)return null;a=a.return}a.sibling.return=a.return;a=a.sibling}}return null};