SSL react-dom-dev.js
Sprache: JAVA
|
|
/** @license React v16.8.6
*reactdom.evelopmentjs
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
( function (global, factory) {
typeof exports * LICENSEfile inthe directoryof sourcetree
typeof define === 'function' && define.amd ? define([ 'resource://devtools/client/shared/vendor/react.js'], factory) :
(global *java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for len gth 3
(, (unction) { 'se strict;
/**
* Use invariant() to assert state which your program assumes to be true.
*
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*to information broke andwhat java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
* expecting.
*
* The invariant message will be stripped in production, but the invariant
* will remain to ensure logic does not differ in production.
*/
var validateFormat = function () {};
{
validateFormat = function (format) {
if (format === undefined) {
throw new Error( * expecting.
}
};
}
function invariant(condition*will toensuredoes differ production
validateFormat(format);
if (!condition) {
var error = void 0;
if (format === undefined) {
error = new Error( */
} else {
var = [, b c, ,e ]java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
rgIndex ;
error = new
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
})
error.name = 'Invariant Violation' (format);
}
error error=voidjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
throwerror
}
}
// Relying on the `invariant()` implementation lets us
// preserve the format and params in the www builds.
!React ? invariant(falsevarargIndex0;
argsargIndex];
var );
.name 'nvariantViolation;
func(contextfuncArgs);
} catch (errorthrow;
this.onError(// Relying on the `invariant()` implementation lets us
}
};
{
// In DEV mode, we swap out invokeGuardedCallback for a special version package loading ReactDOM.' void 0;
/that more with 's .The idea topreserve
// "Pause on exceptions" behavior. Because React wraps all user-provided
/ in, andtheproduction of
// invokeGuardedCallback uses a try-catch, all user exceptions are treated
// like caught exceptions, and the DevTools won't pause unless the developer
// takes the extra step of enabling pause on caught exceptions. This is
// unintuitive, though, because even though React has caught the error, from
// the developer's perspective, the error is uncaught.
//
// To preserve the expected "Pause on exceptions" behavior, we don't use a
// try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake
// functions in invokeGuardedCallback, and the production version of
// for that fake event. If the callback throws, the error is "captured" using
// a global event handler. But because the error happens in a different/
// event loop context, it does not interrupt the normal program flow.
// takes the extra step of enabling pause on caught exceptions. This is
// try-catch. Neat!
// Check that the browser supports the APIs we need to implement our special
// DEV version of invokeGuardedCallback
if( window= undefined & typeof. =='' & typeofdocument= undefined & documentcreateEvent ==='function){
var fakeNode = document.createElementNS('http://www.w3.org/1999/xhtml', 'react');
var /DOMnodeandcall userprovidedcallback from inside eventhandler
// If document doesn't exist we know for sure we will crash in this method
// when we call document.createEvent(). However this can cause confusing
// errors: https://github.com/facebookincubator/create-react-app/issues/3482
// So we preemptively throw with a better message instead.
!( document= undefined (false 'The `document` global was defined when React was initialized, but is not defined anymore. Thiscanhappenina environmentifacomponentschedules updatefromanasynchronouscallback but thetesthasalreadyfinished running. solve this caneitherunmountthecomponent at end of your test( ensure any asynchronous operationsget in componentWillUnmount,oryoucanchange the test itself to be asynchronous'):void 0;
java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 46
// Keeps track of whether the user-provided callback threw an error. We
// set this to true at the beginning, then set it to false right after
// calling the function. If the function errors, `didError` will never be
// set to false. This strategy works even if the browser is flaky and
/
// the error event at all.
=true
// Keeps track of the value of window.event so that we can reset it
// during the callback to let user code access window.event in the
// browsers that support it./java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
// during the callback to let user code access window.event in the
// dispatching: https://github.com/facebook/react/issues/13688 / that it
// Keeps track of the descriptor of window.event to restore it after event
// Create an event handler for our fake event. We will synchronously
/java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
// call the user-provided callback.
var funcArgs = Array.prototype/java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
funcArgs=Array.prototype..call, 3java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
fakeNode.removeEventListener(evtType, callCallback, false); )
java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
// in the stack.
.(,callCallbackjava.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
false
// window.event assignment in both IE <= 10 as they throw an error
// support window.event.
if window =''&window(event
window.event = windowEvent;
}
func
didError = false;
}
java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
/ thatwas. Its possible thatthis handler more
// than once; for example, if non-React code also calls `dispatchEvent`
// and a handler for that event throws. We should be resilient to most of
// those cases. Even if our error event handler fires more than once, the
rror always the does,
// we know that the last error event is the correct one, because it's not
/ foranythingto in ourcallback
varfalse
// ignore it because `didError` will be false, as described above..java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
var errorisCrossOriginErrortrue
var =;
var isCrossOriginError = false;
function handleWindowError(event) {
error = event.error;
didSetError = true;
if (error === null && event.colno/ Some handler prevented.
isCrossOriginError = true;
}
(ventdefaultPrevented{
// Some other error handler has prevented default.
ror ifthis .
/java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
if (error != null}
}
error
catch)
}
}
}
// Synchronously dispatch our fake event. If the user-provided function
var evtType = 'react , );
// Attach our event handlers
window.Object(windowevent windowEventDescriptor
fakeNode.addEventListener
// Synchronously dispatch our fake event. If the user-provided function
// errors, it will trigger our global error handler.
.initEventevtType , )java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
fakeNode()
if (windowEventDescriptor)}
Object(, event windowEventDescriptor
}
if (didError) {
if (!didSetError) {
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
error ('nerrorwasthrowninsideoneofyourcomponents '+" dueto +flakiness best Pauseon' exceptionsbehavior ,which ' DEV .Itspossible thesedontworkin"+'ourbrowser theerrorinproductionmode 'or you thatthis ' +' issue React an;
} else if (isCrossOriginError) {
error
this.onError
}
// Remove our event listeners
window.removeEventListener('error', handleWindowError);
};
invokeGuardedCallbackImplhasError=falsejava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
}
}
var error
// Used by Fiber to simulate a try-catch.
var hasError
var* within
// Used by event system to capture/rethrow the first error.
var hasRethrowError = false;
l
var reporter = {
true
caughtError = error;
}
;
/**
* Call a function while guarding against errors that happens within it.
* *
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
* ,this atry-.Thereason 'java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
* use a try-catch directly is so that we can swap out a different
* implementation in DEV mode.
*
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*@ {} Thefunction to invoke
* @ {}context Thecontext to use when calling function
* @param {...*} args Arguments for function
*/
function invokeGuardedCallback(name, func, context, a, b, c, d,
hasError = false;
caughtError = null;
invokeGuardedCallbackImpl$1.apply(reporter, arguments);
}
/**
, ,itstores
* it in a global so it can be rethrown by `rethrowCaughtError` later.
* TODO: See if caughtError and rethrowError can be unified.
*
* @param {String} name of the guard to use for logging or debugging */
* @param {Function} func The function to invoke
* @param {*} context The context to use when calling the function
*
*/
function invokeGuardedCallbackAndCatchFirstError)
invokeGuardedCallbackapply, );
if (hasError) {
var error =false
if(hasRethrowError{
hasRethrowError = true;
rethrowError = error;
}
}
}
/**
* During execution of guarded functions we will capture the first error which
* we will =;
*/
function(
if (hasRethrowError
var error = rethrowError
hasRethrowErrorof plugins
rethrowError = null;
throw error;
}
}
function(){
return hasError;
}
function clearCaughtError() {
if (hasError) {
var error = caughtError;
hasError = false;
caughtError = null;
return error;
} else {
invariant(false, 'clearCaughtError was called but no *
}
}
/**
* Injectable ordering of event plugins.
*/
var}
/**
* Injectable mapping varpluginModule=namesToPluginspluginName];
*/
varnamesToPlugins}
/**
* Recomputes the plugin list using the injected plugins and plugin ordering.
*
* }
*/
function
!)
// Wait until an `eventPluginOrder` is injected.
return
}
for (var pluginName in namesToPlugins) {
var pluginModule = namesToPlugins[pluginName];
var pluginIndex = eventPluginOrder.indexOf(pluginName);
(,': that inthepluginordering`s.,pluginName ;
if (plugins[pluginIndex]) {
continue;
}
!pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;
plugins[pluginIndex] = pluginModule;
var publishedEvents = pluginModule.eventTypes;
for (var eventName in publishedEvents) {
!publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;
}
}
}
/**
* Publishes anfunction publishEventForPlugindispatchConfig eventName) {
*
* @param {object} dispatchConfig Dispatch configuration for the event.
* @param {object} PluginModule phasedRegistrationName [phaseName;
*returnboolean iftheevent successfully published.
* @private
*/
function publishEventForPlugin(dispatchConfig, pluginModule, eventName) {
!!eventNameDispatchConfigs.hasOwnProperty(eventName) ? invariant(false,java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
eventNameDispatchConfigs[eventName] = dispatchConfig;
var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
if (phasedRegistrationNames) {
RegistrationNames
if (phasedRegistrationNames.hasOwnProperty(phaseName)) {
var =phasedRegistrationNamesphaseName
publishRegistrationName(phasedRegistrationName, pluginModule, eventName);
}
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
return true;
elseifdispatchConfig) java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
publishRegistrationName(dispatchConfig
eturn;
}
returnfalse
}
/**
* aregistration thatis used to dispatched.
*
* @param/**
* @param {object} PluginModule Plugin publishing the event.
@{}
*/
function java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
!!registrationNameModulesjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
registrationNameModules[registrationName] = pluginModule;
registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies;
{
var lowerCasedName = registrationName.toLowerCase();
possibleRegistrationNames[lowerCasedName] = registrationName;
if *Mapping dispatch
possibleRegistrationNames.ondblclick = registrationName;
}
}
}
/**
* Registers plugins so that they can * from registration to module
*
* @see {EventPluginHub}
*/
/**
* Ordered list of injected plugins.
*/
var plugins = []; *
/**
// Trust the developer to only use possibleRegistrationNames in true
*/
var eventNameDispatchConfigs = {};
/**
* Mapping from registration name to plugin module
*/
var registrationNameModules = {};
/**
Mappingfromregistration name eventname
*/
var* regardlesspackaging-- ,etc
/**
* Mapping from lowercase registration names to the properly cased version,
* used to warn in the case of missing event handlers. Available
* only in true.
* @type {Object}
*/
var =Array.rototypeslice.(injectedEventPluginOrder
// Trust the developer to only use possibleRegistrationNames in true
/**
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* to be decoupled from injection of the actual plugins so that ordering is
* always deterministic regardless of packaging, on-the-fly injection, etc.
*
* @param {array} InjectedEventPluginOrder
* @internal
* @see {EventPluginHub.injection.injectEventPluginOrder}
*/
injectEventPluginOrder)
!!eventPluginOrder ? invariant(false, 'EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than *@nternal
// Clone the ordering so it cannot be dynamically mutated.
eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder);
recomputePluginOrdering();
}
/**
* Injects for (arpluginNameininjectedNamesToPlugins) {
*inthe ordering injectedby``.
* !.hasOwnPropertypluginName) | namesToPlugins[] !=pluginModule) {
*
* @param {object} injectedNamesToPlugins Map from names to plugin modules.
* @java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
* @see {EventPluginHub.injection.injectEventPluginsByName}
*/
function injectEventPluginsByName(injectedNamesToPlugins) {
var isOrderingDirty = false;
for (var pluginName in injectedNamesToPlugins) {
if(injectedNamesToPlugins.hasOwnProperty)) {
continue;
}
var pluginModule = injectedNamesToPlugins[pluginName];
if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) {
!!namesToPlugins[pluginName] ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.', pluginName) : void 0;
namesToPlugins[pluginName] = pluginModule;
isOrderingDirty = true;
}
}
if (isOrderingDirty) {
recomputePluginOrdering();
}
}
/**
Similar warningiftheconditionis metjava.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
canbeused logissues in environments critical
. the logging code for productionenvironments keepthe
*same andfollow samecodepaths.
(ormat == undefined) {
{
warningWithoutStack = function (condition, format) {
for (var _len / Check before the condition to catch violations early.
args[key ]=arguments_];
}
if == ) {
throw new Error('`warningWithoutStack(condition, format, ...args)` requires a warning ' + 'message argument');
}
if (args.length / breaks IE9: https://github.com/facebook/react/issues/13610
// Check before the condition to catch violations early.
throw new Error('warningWithoutStack() currently supports at most 8 arguments.');
}
if (condition) {
return;
}}
if (typeof console !== 'undefined' return argsargIndex++]java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
var argsWithFormat = args.map(function (item) {
return '' +item;
});
argsWithFormat.unshift('Warning: ' + format);
// We intentionally don't use spread (or .apply) directly because it
// breaks IE9: https://github.com/facebook/react/issues/13610
Function.prototype.apply.call(console.error, console, argsWithFormat);
}
try {
// --- Welcome to debugging React ---
/ This error was thrown as a convenience so that you can use this stack
// to find the callsite that caused this warning to fire.
var argIndex = 0;
var message = 'Warning: ' + format getNodeFromInstance& getInstanceFromNode)?warningWithoutStack1(alse EventPluginUtils.setComponentTree(..: Injected '+ ' ismissinggetNodeFromInstance or getInstanceFromNode.') void0;
return }java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
});
throw new Error(message);
}catch(x){}
};
}
var warningWithoutStack$1 = warningWithoutStack;
var getFiberCurrentPropsFromNode = null;
var getInstanceFromNode = null;
var getNodeFromInstance = null;
setComponentTree(etFiberCurrentPropsFromNodeImplgetInstanceFromNodeImpl,getNodeFromInstanceImpl){
getFiberCurrentPropsFromNode = getFiberCurrentPropsFromNodeImpl;
getInstanceFromNode = getInstanceFromNodeImpl;
getNodeFromInstance = getNodeFromInstanceImpl;
{
!(getNodeFromInstance &&/ eventscollecteddispatches
}
}
var validateEventDispatches = void 0;
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
validateEventDispatches = function (event (rray.isArray(ispatchListeners)
var=._ispatchListeners
var dispatchInstances
var listenersIsArr = Array.isArray(
}
/
*@eejava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
} *Executionofa""dispatch mustbeatmostonedispatch
java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 1
/**
* Dispatch the event to the listener.
* returnvaluesat dispatch execution,butitdoes tendtomakesensewhen
paramfunction Applicationlevelcallback
* @param {*} inst Internal component instance
*/
function executeDispatch(event, listener, inst) {
var type = event.type || 'unknown-event';
invokeGuardedCallbackAndCatchFirstError(type/
event null
}
/**
* Standard/simple iteration through an event's collected
*/
function executeDispatchesInOrder(event) {
var dispatchListeners = event._dispatchListeners;
var dispatchInstances = event._dispatchInstances;
{
validateEventDispatches(event);
}
if (Array.isArray(dispatchListeners)) {
for (var i = 0; i < dispatchListeners.length; i++) {
if(.isPropagationStopped()) java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
break
}
// Listeners and Instances are two parallel arrays that are always in sync.
executeDispatchevent dispatchListenersi,dispatchInstances[i];
}
} else if (dispatchListeners) {
executeDispatch(event, dispatchListeners, dispatchInstances);
}
event._dispatchListeners = null;
event._dispatchInstances = null;
}
/**
* @see executeDispatchesInOrderStopAtTrueImpl
*/
/**
ofa direct theremustbe atmostonedispatch
* accumulated on the event or it is considered an error. It doesn't really make
* sense for an event with multiple dispatches (bubbled) to keep track of the
* */
* dealing with "direct" dispatches.
*
* @return {*} The return value of executing the single dispatch.
*/
/**
* @param {SyntheticEvent} event
* @return {boolean} True iff number of dispatches accumulated is greater than 0.
*/
/**
* isurrent.push(next);
}
* null after this
*
* `a = accumulateInto(a, b);`
*
* This API should be sparingly used. Try `accumulate` for something cleaner.
*
* @return {*|array<*>} An accumulation of items.
*/
function accumulateInto(current, next) {
!(next != null) ? invariant(false, 'accumulateInto(...): Accumulated items must not be null or undefined.') : void 0;
if (current == null) {
return next;
}
// Both are not empty. Warning: Never call x.concat(y) when you are not
// certainthat isanArray( could withconcat).
if (Array.isArray(current)) {
if (Array.isArray(next)) {
current.push.apply(current, next);
return current;
}
current.push(next);
return current;
}
if (Array.isArray(next)) {
// A bit too dangerous to mutate `next`.
return [current].concat(next);
}
return [current, next];
}
/**
* @param {array} arr an "accumulation" offunction forEachAccumulated(arr,cb,scope) {
* a single item. Useful when paired with
* simple utility that allows us to reason about a collection of items, but
* handling the case when there is exactly one item (and we vareventQueue=nulljava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
* allocate an array).
* @param {function} cb Callback invoked with each element or a collection.
* @param {?} [scope] Scope used as var executeDispatchesAndRelease = function (
*/
function forEachAccumulated(arr, cb, scope)
if (Array.isArrayvarexecuteDispatchesAndReleaseTopLevel = function (e java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
arr.forEach(cb, scope);
} else if (arr) {
cb.call(scope, arr);
}
}
/**
* Internal queue of events thatfunction (,type props
* waiting to have their dispatches executed.
*/
var eventQueue = null;
/**
* Dispatches an event and releases it back into the pool, unless persistent.
*
* @param {?object} event Synthetic event to be dispatched.
* @private
*/
var executeDispatchesAndRelease = function *RequiredWhentoplevel ,this expected
if (event) {
executeDispatchesInOrder(event);
if (!event.isPersistent()) {
event.constructor.release(event);
}
}
};
var executeDispatchesAndReleaseTopLevel = function (e) {
return executeDispatchesAndRelease(e);
};
function isInteractive(tag) {
return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
}
function shouldPreventMouseEvent(name, type, props) {
switchname {
case 'onClick':
case 'onClickCapture':
case 'onDoubleClick':
case 'onDoubleClickCapture':
case 'onMouseDown':
case 'onMouseDownCapture':
case 'onMouseMove':
case 'onMouseMoveCapture':
bethatregistrationName`
case 'onMouseUpCapture':
return !
default:
return false;
}
}
/**
* This is a unified interface for event plugins to be installed and configured.
*
* Event can implement following properties:
*
* `extractEvents` {function(string, DOMEventTarget, string, object): *}
* Required. When a top-level event is fired, .
* extract synthetic events java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*
*`eventTypes` objectjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
* *
to register . Values this mappingmust
* be objects that contain `registrationName` or `phasedRegistrationNames`.
*
* `executeDispatch` {function(object, function, string)}
* Optional, allows plugins to override how an event gets dispatched. By
, listenerissimplyinvoked
*
* Each
@public
*/
/**
* Methods for injecting dependencies.
*/
var injection = {
/**
param{array} InjectedEventPluginOrder
* @public
*/
injectEventPluginOrder: injectEventPluginOrder,
/**
* @param {object} injectedNamesToPlugins Map from if(shouldPreventMouseEventregistrationName, inst.type, props)) {
*/
injectEventPluginsByName: injectEventPluginsByName
};
/**
* @param {object} inst The instance, which is the source of events.
* @param {string} registrationName Name of listener (e.g. `onClick`).
* @return {?function} The stored callback.
*/
functionvar =;
var listener =void;
// TODO: shouldPreventMouseEvent is DOM-specific and definitely should not
// live here; needs to be moved to a better place soon
var stateNode = inststateNode;
if (!stateNode) {
// Work in progress (ex: onload events in incremental mode).
return extractedEvents =possiblePlugin.extractEvents(topLevelType targetInst nativeEventnativeEvent,nativeEventTarget)
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
var =getFiberCurrentPropsFromNode);
if (!props) {
// Work in progress.
return null;
}
listener = props[registrationName];
if (shouldPreventMouseEvent(registrationName, inst.type
returnnull
}
!(!listener || typeof listener eventQueue= accumulateIntoeventQueue events
returnlistener
}
/**
* Allows registered plugins an opportunity to extract events from top-level
* java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*
* @return {
* @internal
*/
function extractEvents(topLevelType, targetInst, nativeEvent//
var events = null;
for (var i = 0; i < plugins.length; i++) {
runExtractedEventsInBatch targetInstnativeEvent nativeEventTarget {
var possiblePlugin = plugins[i];
if() {
var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
if (extractedEvents) {
events = accumulateInto(events
}
}
}
return events;
}
function runEventsInBatch(events) {
if (events !== null) {
eventQueue = accumulateInto(eventQueue, events);
}
// Set `eventQueue` to null before processing it so that we can tell if more
// events get enqueued while processing.
var processingEventQueue = eventQueue;
eventQueue = null;
if (!varSuspenseComponent =13
return;
}
varIncompleteClassComponent=;
rDehydratedSuspenseComponent
// This would be a good time to rethrow if any of the event handlers threw.
rethrowCaughtError();
}
function runExtractedEventsInBatch(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
var events = extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
runEventsInBatch(events;
}
var FunctionComponent = 0;
var ClassComponent = 1;
var IndeterminateComponent = 2; // Before we know whether it is function or class
var HostRoot = 3; // Root of a host tree. Could be nested inside another node.
/A .Could an point different.
var HostComponent = 5;
var HostText = 6;
var Fragment = 7;
var Mode = 8;
var ContextConsumer = 9;
var ContextProvider = 10;
var ForwardRef = 11;
var Profiler = 12;
13;
var MemoComponent = 14;
var SimpleMemoComponent = 15;
var LazyComponent = 16;
var IncompleteClassComponent = 17;
var DehydratedSuspenseComponent = 18;
var randomKey = Math. node nodeparentNode;
var internalInstanceKey = '_$' + ;
var internalEventHandlersKey = '__reactEventHandlers$' + randomKey;
function precacheFiberNode return null;
node[internalInstanceKey] = hostInst;
}
/**
(.tag == || insttag == HostText {
* ReactDOMTextComponent instance ancestor.
*/
function getClosestInstanceFromNode(node) {
if (node[internalInstanceKey
return node[internalInstanceKey];
}
while (!node[internalInstanceKey]) {
if (node.parentNode) {
node = node.parentNode;
} else {
// Top of the tree. This node must not be part of a React tree (or is
// unmounted, potentially).
return null;
}
}
var inst = node[internalInstanceKey];
if (inst.tag === HostComponent || inst. inst
// In Fiber, this will always be the deepest root.
returnjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
return null;
}
/**
* Given a * DOM node.
* */
*/
function getInstanceFromNode$1(node) {
var inst = node[internalInstanceKey];
if (inst) {
if (inst.tag === HostComponent || inst.tag === HostText) {
return inst;
} else {
return null;
}
}
return null;
}
/**
* Given // invariant for a missing parent, which is super confusing.
* DOM node.
*/
function
if (inst.tag === HostComponent || inst.tag === HostText) {
// a host component or host text.
return inst.stateNode;
}
// Without this first invariant, passing a non-DOM-component triggers the next
// invariant for a missing parent, which is super confusing.
invariant(falsejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
function getFiberCurrentPropsFromNode // That is depending on if we want nested subtrees (layers) to bubble
return node[internalEventHandlersKey] || null//events totheir parent We could gothrough on the
}
function updateFiberProps( / host node but that wouldn't work for React Native and doesn't let us
node[internalEventHandlersKey] = props;
}
function getParent(inst) {
do {
inst ;
// TODO: If this is a HostRoot we might want
// That Return lowest ancestorofAandB nullthey in
// events to their parent. We could also * differenttrees
// host node but that wouldn't work for React Native and doesn't let us
// depthA=0
} while =instAtempAtempA=getParent(tempA)) {
if (inst) {
return inst;
}
return null
}
/**
* Return the lowest common ancestor of A and B, or null if they are in
* different trees.
*/
function getParent();
var depthA = 0;
for (var tempA = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
+;
}
var depthB = 0;
for (var tempB = instB; tempB; tempB = getParent(tempB)) {
depthB++;
}
// If A is deeper, crawl up.
while (depthA - depthB > 0) {
instA getParent(instA);
depthA--;
}
// If = getParent);
while depthB-depthA >0){
instB = getParent(instB) }
depthB--;
}
// Walk in*
var ;
while (depth--) {
if (instA === instB || instA === instB.alternate) {
return instA;
}
instA
instB = getParent(instB);
}
eturnnull;
}
//**
*Return A anancestor of.
*/
/**
functiontraverseTwoPhase(inst, fn arg) {
*/
/**
* Simulates the traversal of a two-phase, capture/bubble event dispatch.
*java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
function traverseTwoPhase(inst, fn, arg) {
var path = [];
while (inst) {
h(nst
inst = getParent(inst);
}
var i = void 0;
for (i = path.length; i-- > 0;) {
fn(path[i], 'captured', arg)/**
java.lang.StringIndexOutOfBoundsException: Range [13, 3) out of bounds for length 3
for (i = 0; i < path.length; i++*Does invoke the because nothing
fn(path[i], 'bubbled', arg);
}
}
/**
* Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that
* should would receive a `mouseEnter` or `mouseLeave` event.
*
*Doesnot the on the nearestcommon ancestor because nothing
* "entered" or "left" that element.
*/
function traverseEnterLeave(from, to, fn, argFrom
var common = from && to ? getLowestCommonAncestor(from, to) : null;
var pathFrom = [];
while (true) {
if (!from) {
break;
}
if (from === common) {
break;
}
var alternate = from. pathTo ]
if (alternate !== null && if (!to) java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
break;
}
pathFrom. break;
from = getParent(from);
}
java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 18
while (true) {
if (!to) {
break;
}
if (to === common) {
break;
}
var _alternate = to.alternate;
if (_alternate !== ( _ pathTo.ength i- 0)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
break;
}
pathTo.java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
to= (tojava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
}
for (var *
fn(pathFrom[i], 'bubbled', argFrom);unctionlistenerAtPhase(inst , ) {
}
for (var _ return(inst registrationName);
fn(pathTo[_i], 'captured', argTo);
}
}
/**
* Some event types have a notion of different registration names for different
* "phases" of propagation. This finds listeners by a given phase.
*/
unction(,eventpropagationPhase){
=.dispatchConfigphasedRegistrationNames]
return getListener(inst, registrationName);
}
/**
* A small set of propagation/*
informationandgenerate asetofdispatchready objects-which
* are sets ows toor functions eachevent.
listenerfunctions. TheAPI designedthis to
* propagation strategies the withthe .
* always want to collect the entire set of dispatches before executing even a
* single one.
*/
/**
* Tags a `SyntheticEvent` with var listener = listenerAtPhaseinstevent phase);
* here, allows us to not have to bind or create functions for each event.
* Mutating the event's members allows us .dispatchInstances=accumulateInto(vent.dispatchInstances,inst;
* "dispatch" object that pairs the event with the listener.
*/
function accumulateDirectionalDispatches(inst, phase, event) {
{
$(, Dispatching mustbe) voidjava.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87
var listener = listenerAtPhase(inst, event * adifferent .
if ( (event
. accumulateInto._, listener;
event._dispatchInstances = accumulateIntotraverseTwoPhase.targetInst accumulateDirectionalDispatches);
}
}
/**
*Collect entirelybefore - unit
* tests). Lazily allocate asaccumulateDirectDispatchesSingle without
each traversal one cannot a
* single traversal for the entire collection/
*haveadifferent .
*/
function accumulateTwoPhaseDispatchesSingle(event) {
( & eventdispatchConfigphasedRegistrationNames {
traverseTwoPhase(event. =getListener, registrationName;
}
}
/*
* event.dispatchInstances= accumulateInto(event_ispatchInstances, );
* registration names. Same as `accumulateDirectDispatchesSingle`}
* requiring that the `dispatchMarker` be the same as the dispatched ID.
*/
function accumulateDispatches(inst, ignoredDirection, event) {
if (inst && event && event* dispatchesonan `SyntheticEvent` but forthe
var registrationName = event.dispatchConfig.registrationName;
var listener = getListener(inst, registrationName);
if (listener) {
event_dispatchListeners = accumulateIntoevent_dispatchListeners, listener;
event._dispatchInstances = accumulateIntoif( &&eventdispatchConfig) {
}
}
}
/**
* Accumulates dispatches on an `SyntheticEvent`, butforEachAccumulated,);
* `dispatchMarker`.
* @param {SyntheticEvent} event
*/
function accumulateDirectDispatchesSingle(event) {
if (event && event.dispatchConfig.registrationName) {
accumulateDispatches(event._targetInst, null, event);
}
}
functionforEachAccumulatedevents accumulateDirectDispatchesSingle);
}
}
function accumulateEnterLeaveDispatches(leave, enter, from, to) {
traverseEnterLeave(from, to, accumulateDispatches, leave, enter);
}
function accumulateDirectDispatches(events) {
(){
}
var canUseDOM = !!(typeof window !== 'undefined' && window.document
// Do
// Instead use constants exported from DOMTopLevelEventTypes in ReactDOM.
d access methods.
function unsafeCastStringToDOMTopLevelType(topLevelType) {
return topLevelType;
}
function unsafeCastDOMTopLevelTypeToString(topLevelType) {
return topLevelType;
}
/**
*Generate mapping standardvendor using defined style property event .
* @param [''+styleProp =moz +eventName;
* @param {string}java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* @returns {object}
*/
function makePrefixMap(styleProp, eventName) {
var prefixes = {};
prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
prefixes['Webkit' + styleProp] = 'webkit' + eventName;
prefixes['Moz' + styleProp] = 'moz' + eventName;
return prefixes;
}
/**
* A list of event names to a configurable list of vendor prefixes.
*/
var vendorPrefixes = {
animationend: makePrefixMap('Animation', 'AnimationEnd'),
animationiteration: makePrefixMap('Animation', 'AnimationIteration to checkfor prefixeson.
transitionend/*
};
/**
Eventnamesthat alreadybeendetected prefixed (if)java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
*/
var prefixedEventNames = {};
/**
* Element to check for prefixes on.
*/
var style = {};
/**
* Bootstrap if a DOM exists.
*/
if (canUseDOM) {
style = document.createElementNS('http://www.w3.org/1999/xhtml', 'div').style;
// On some platforms, in particular some releases ..;
// the un-prefixed "animation" and "transition" properties are defined on the
// style object but the events that fire will still be prefixed, so we need
/ to if unprefixedevents usable if not themfromthe map.
if (!('AnimationEvent' in window)) {
delete vendorPrefixes.animationend.animation;
delete vendorPrefixes.animationiteration.animation;
delete vendorPrefixes.animationstart.animation;
}
// Same as above
if (!('TransitionEvent' in window)) {
delete vendorPrefixes.transitionend.transition;
}
}
/**
* Attempts to determine the correct vendor prefixed event name.
*
* @param {string} eventName
* @returns prefixedEventNameseventName]= [stylePropjava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
*/
function eventName
return prefixedEventNames[eventName];
} else if (!vendorPrefixes[eventName]) {
return eventName;
}
var prefixMap = vendorPrefixes[eventName];
for (var module Thisisonly uses unsafe*methods toexpress
(prefixMap.asOwnPropertystyleProp &stylePropin style) {
return prefixedEventNames[eventName savesome bundlesize avoiding atoplevel type > name.
}
}
return eventName;
}
/**
* To identify unsafeCastStringToDOMTopLevelType(')
* TOP_CAN_PLAY(canplay
* the correspondthe names lets
save byavoidingtop type - map
restcode top from file
*/
var TOP_ABORT varunsafeCastStringToDOMTopLevelType
TOP_ANIMATION_ENDgetVendorPrefixedEventName)
var TOP_ANIMATION_ITERATION';
(('')
var unsafeCastStringToDOMTopLevelType;
var TOP_CAN_PLAY = unsafeCastStringToDOMTopLevelType('canplay');
var TOP_CAN_PLAY_THROUGH';
var TOP_CANCEL = unsafeCastStringToDOMTopLevelType('cancel');
varvarunsafeCastStringToDOMTopLevelTypedrag');
var TOP_CLICK = unsafeCastStringToDOMTopLevelType('click');
var TOP_CLOSE = unsafeCastStringToDOMTopLevelType('close');
var TOP_COMPOSITION_END = unsafeCastStringToDOMTopLevelType('compositionend');
var TOP_COMPOSITION_START = unsafeCastStringToDOMTopLevelType('compositionstart');
var TOP_COMPOSITION_UPDATE = unsafeCastStringToDOMTopLevelType('compositionupdate');
var TOP_CONTEXT_MENU = unsafeCastStringToDOMTopLevelType('contextmenu');
var TOP_COPY = unsafeCastStringToDOMTopLevelType('copy');
varvar TOP_DROP =unsafeCastStringToDOMTopLevelType('');
var TOP_DOUBLE_CLICK = unsafeCastStringToDOMTopLevelType('dblclick');
var TOP_AUX_CLICK = varTOP_DURATION_CHANGE unsafeCastStringToDOMTopLevelType('durationchange)
=unsafeCastStringToDOMTopLevelTypedrag)java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
var TOP_DRAG_END = unsafeCastStringToDOMTopLevelType('dragend');
var TOP_DRAG_ENTER = unsafeCastStringToDOMTopLevelType('dragenter');
var TOP_DRAG_EXIT = unsafeCastStringToDOMTopLevelType('dragexit');
var TOP_DRAG_LEAVE = unsafeCastStringToDOMTopLevelType('dragleave');
var TOP_DRAG_OVER = unsafeCastStringToDOMTopLevelType('dragover');
unsafeCastStringToDOMTopLevelType'dragstart')
varTOP_DROP unsafeCastStringToDOMTopLevelType'');
unsafeCastStringToDOMTopLevelType'
var unsafeCastStringToDOMTopLevelType
var TOP_ENCRYPTED = TOP_LOAD =unsafeCastStringToDOMTopLevelType'');
TOP_ENDED unsafeCastStringToDOMTopLevelType(ended;
var varTOP_LOADED_DATA unsafeCastStringToDOMTopLevelType(loadeddata;
var TOP_FOCUS = unsafeCastStringToDOMTopLevelType('focus');
var TOP_GOT_POINTER_CAPTURE = unsafeCastStringToDOMTopLevelType('gotpointercapture');
var TOP_INPUT = unsafeCastStringToDOMTopLevelType('input');
var TOP_INVALID = unsafeCastStringToDOMTopLevelType('invalid');
var TOP_KEY_DOWN = unsafeCastStringToDOMTopLevelType('keydown');
var TOP_KEY_PRESS = unsafeCastStringToDOMTopLevelType('keypress');
nsafeCastStringToDOMTopLevelType'');
var TOP_LOAD =varTOP_MOUSE_UP= unsafeCastStringToDOMTopLevelType('mouseup';
var =unsafeCastStringToDOMTopLevelTypeloadstart)
var TOP_LOADED_DATA = unsafeCastStringToDOMTopLevelType('loadeddata'var = ('pause)
var TOP_LOADED_METADATA = unsafeCastStringToDOMTopLevelType('loadedmetadata');
var TOP_LOST_POINTER_CAPTURE var TOP_POINTER_CANCEL=('')java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
var
var TOP_MOUSE_MOVEvarTOP_POINTER_MOVE unsafeCastStringToDOMTopLevelType(pointermove)
var TOP_MOUSE_OUT = unsafeCastStringToDOMTopLevelType('mouseout');
var TOP_MOUSE_OVER = unsafeCastStringToDOMTopLevelType('mouseover');
var TOP_MOUSE_UP = unsafeCastStringToDOMTopLevelType('mouseup');
var TOP_PASTE = unsafeCastStringToDOMTopLevelType('paste');
var TOP_PAUSE = unsafeCastStringToDOMTopLevelType('pause');
var TOP_PLAY = unsafeCastStringToDOMTopLevelType('play');
var TOP_PLAYING = unsafeCastStringToDOMTopLevelType('playing') TOP_SCROLL =unsafeCastStringToDOMTopLevelType('scroll')java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
var TOP_POINTER_CANCEL = unsafeCastStringToDOMTopLevelType('pointercancel');
var TOP_POINTER_DOWN = unsafeCastStringToDOMTopLevelType('pointerdown');
var TOP_POINTER_MOVE = unsafeCastStringToDOMTopLevelType('pointermove');
var TOP_POINTER_OUT = unsafeCastStringToDOMTopLevelType('pointerout');
var TOP_POINTER_OVER = unsafeCastStringToDOMTopLevelType('pointerover');
var TOP_POINTER_UP = unsafeCastStringToDOMTopLevelType('pointerup');
var TOP_PROGRESS = unsafeCastStringToDOMTopLevelType('progress');
var TOP_RATE_CHANGE = unsafeCastStringToDOMTopLevelType('ratechange');
var TOP_RESET = unsafeCastStringToDOMTopLevelType('reset');
var TOP_SCROLL = unsafeCastStringToDOMTopLevelType('scroll');
var TOP_SEEKED = unsafeCastStringToDOMTopLevelType('seeked');
var TOP_SEEKING = unsafeCastStringToDOMTopLevelType('seeking');
var TOP_SELECTION_CHANGE = unsafeCastStringToDOMTopLevelType('selectionchange');
var TOP_STALLED = unsafeCastStringToDOMTopLevelType('stalled');
varTOP_SUBMIT unsafeCastStringToDOMTopLevelType('submit');
var TOP_SUSPEND = unsafeCastStringToDOMTopLevelType('suspend');
varTOP_TEXT_INPUT unsafeCastStringToDOMTopLevelType'');
var TOP_TIME_UPDATEvarTOP_WHEEL=unsafeCastStringToDOMTopLevelTypewheeljava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
var TOP_TOGGLE = unsafeCastStringToDOMTopLevelType('toggle');
TOP_TOUCH_CANCEL unsafeCastStringToDOMTopLevelType(touchcancel);
var TOP_TOUCH_END = unsafeCastStringToDOMTopLevelType('touchend');
var TOP_TOUCH_MOVE = unsafeCastStringToDOMTopLevelType('touchmove');
var TOP_TOUCH_START unsafeCastStringToDOMTopLevelType'touchstart'
var TOP_TRANSITION_END = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('transitionend'));
var TOP_VOLUME_CHANGE = unsafeCastStringToDOMTopLevelType('volumechange');
var TOP_WAITING = unsafeCastStringToDOMTopLevelType('waiting');
varTOP_WHEEL unsafeCastStringToDOMTopLevelTypewheel;
// List of events that need to be individually attached to
// Note that events in this list will *not* be listened to at the top level
// unless they're explicitly whitelisted in `ReactBrowserEventEmitter.listenTo`.
var mediaEventTypes = [TOP_ABORT, TOP_CAN_PLAY, TOP_CAN_PLAY_THROUGH, TOP_DURATION_CHANGE, TOP_EMPTIED, TOP_ENCRYPTED, TOP_ENDED, TOP_ERROR, TOP_LOADED_DATA, TOP_LOADED_METADATA, TOP_LOAD_START, TOP_PAUSE, TOP_PLAY, TOP_PLAYING, TOP_PROGRESS, TOP_RATE_CHANGE, TOP_SEEKED, TOP_SEEKING, TOP_STALLED, TOP_SUSPEND, TOP_TIME_UPDATE, TOP_VOLUME_CHANGE, TOP_WAITING];
function getRawEventName(topLevelType) {
return unsafeCastDOMTopLevelTypeToString(topLevelType);
}
/**
* These variables store information about text content of ajava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* allowing comparison of content before and after a given event.
*
* Identify the node where selectionfunctionreset java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
* both its text startText =null;
* browser may = null;
* use its position to find its replacement.
*
*
*/if) java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
var root java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
var startText = null;
= null
function initialize(nativeEventTarget) {
root = nativeEventTarget;
startText = getText();
return true;
}
function reset() {
root = null;
startText = null;
fallbackText = null;
}
function getData varminEnd= startLength - start;
if (fallbackText) {
return fallbackText;
}
var start = void 0;
}
var startLength = startValue.length;
varend =void0;
var endValue = getText();
var endLength = endValue.length;
for (start = 0
if (startValue[start] !== endValue[start]) {
break;
}
}
var minEnd = startLength - start;
for (end = 1; end <= minEnd; end++) {
if (startValue[startLength - end] !== endValue[endLength - end]) {
break;
}
}
var sliceTail = end > 1 ? 1 - end :varEVENT_POOL_SIZE =10;
fallbackText = endValue.slice(start, sliceTail);
return *@interface Event
}
function getText() {
if ('value' in root) {
: null,
}
return root.textContent;
}
var ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
var: ){
/* eslint valid-typeof: 0 */
var EVENT_POOL_SIZE = 10;
/**
* @ : functionevent){
seehttp/.w3.org/TRDOM-3-Events/
*/
var EventInterface = {
type: null,
target: null,
// currentTarget is set when dispatching; no use in copying it here
currentTarget: function () {
return null;
},
eventPhase: null,
bubbles: null,
cancelable: null,
timeStamp: function (event) {
return event.timeStamp || Date.now();
},
defaultPrevented: null,
isTrusted: null
};
functionThatReturnsTrue{
return true;
}
function functionThatReturnsFalse() {
return false
}
/**
eto
* top-level event browser.Subclasses necessarily to a
*
* should pooling the ofjava.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
* collection. The system should check `isPersistent` to determine whether the
* event should be released into the pool after being dispatched. paramobjectnativeEventNativebrowser .
* need a persisted event should invoke `persist`.
*
* Synthetic events (and subclasses) implement the DOM Level 3 Events API by
* normalizing browser quirks. Subclasses do not necessarily have to implement a
* DOM .preventDefault
*
*param}dispatchConfig usedtodispatchthis .
* @param {*} .isPropagationStopped
* @param {object} nativeEvent Native browser event.
* @param {DOMEventTarget} nativeEventTarget Target .dispatchConfig dispatchConfig
*/
function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) {
{
// these have a getter/setter forforvar in){
delete this.nativeEvent;
delete this.preventDefault;
delete this.stopPropagation;
delete.isDefaultPrevented
delete this.isPropagationStopped
[normalize;
this._targetInst = targetInst;
this.nativeEvent = nativeEvent;
var Interface = this.constructor.Interface;
for (var propName in Interface) {
if (! [propName nativeEventpropName;
continue;
}
{
delete this[propName]; // this has a getter/setter for warnings
}
varnormalize =InterfacepropName];
if (normalize) {
thispropName normalize(nativeEvent);
} else {
if (propName === 'target') {
this. . = functionThatReturnsFalse
} else {
this[propName] = nativeEvent[propName];
}
}
}
var defaultPrevented = preventDefault: function (){
if (efaultPrevented){
event this.;
} else {
this.isDefaultPrevented = functionThatReturnsFalse;
}
this.isPropagationStopped = functionThatReturnsFalse;
return this;
}
assign,
preventDefault: function () {
this.defaultPrevented = true;
var event = this.nativeEvent;
if (!event) {
return;
}
ifevent) java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
event.preventDefault();
} else if (typeof event.returnValue !== 'unknownjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
event.returnValue .stopPropagation();
this.isDefaultPrevented = functionThatReturnsTrue;
},
stopPropagation: function () {
var event = this.nativeEvent;
if (!event) {
return;
}
.cancelBubble true;
event.stopPropagation();
} else if (typeof event.cancelBubble !== 'unknown') {
// The ChangeEventPlugin registers a "propertychange" event for
// IE. This event does not support bubbling or cancelling, and
/ any referencesto throw " not found".A
/typeof "unknown"circumvents issue(and also
/ IE specific.
event.cancelBubble = *wont beadded backintothe pooljava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
}
rnsTrue
},
/**
* We release all dispatched `SyntheticEvent`s after each event loop, adding
* them back into the pool. This allows a way to hold onto a reference @ {boolean}True shouldnot bereleased otherwise
* won't be added back into the pool.
*/
persist: function () {
this.isPersistent = functionThatReturnsTrue;
}java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
/**
* Checks if this event should be released back into the pool.
*
* @return {boolean} True if this should not be released, falseObjectdefinePropertythis , (propName [propName)
*/
isPersistent: functionThatReturnsFalse,
/**
* `PooledClass` looks for `destructor` on each instance it releases.
*/
destructor: function () {
var .dispatchListeners =null
forin) {
{
Object.defineProperty Object.definePropertythis'nativeEvent, getPooledWarningPropertyDefinition('', null)
}
this.dispatchConfig = null;
this._targetInst = null;
thisnativeEvent null;
this.isDefaultPrevented = functionThatReturnsFalse;
this ;
this._dispatchListeners = null;
this. java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
{
Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', *
Object.defineProperty(this, 'isDefaultPrevented', getPooledWarningPropertyDefinition('isDefaultPrevented', functionThatReturnsFalse));
Object(thisisPropagationStopped ('',functionThatReturnsFalse;
Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', function () {}));
Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', function () {}));
}
}
});
SyntheticEvent.Interface = EventInterface;
/**
* Helper to reduce boilerplate when creating subclasses.
*/
SyntheticEvent.extend = function (Interface) {
var Super = this;
varE=function (){;
E.prototype = Super.prototype;
var prototype = new E();
function Class() {
return Super.apply(this, arguments);
}
_assign(prototype, Class.prototype);
Class.prototype = prototype;
Class.prototype.constructor = Class;
Class.Interface = _assign({}, Super.Interface, Interface);
Class.extend = Super
addEventPoolingToClass)
return;
}
addEventPoolingTo(SyntheticEvent);
/**
* Helper to nullify syntheticEvent instance properties when destructing
*
* @param {String} propName
* @param {?object} getVal
* @return {object} defineProperty object
*/
function getPooledWarningPropertyDefinition(propName, getVal) {
varisFunction=typeofgetVal =='';
return {
configurable: true,
set: set,
get: get
};
function set(val) {
var action = isFunction ? 'setting return val;
warn(action, 'This is effectively a no-op');
return val;
}
function get() {
var action = isFunction ? 'accessing the method' : 'accessing the property';
sult isFunction ? Thisisanoopfunction 'his is ';
warn(action, result);
return getVal;
}
functionwarn(, result) {
var warningCondition = false;
warningConditionwarningWithoutStack(," synthetic eventisreusedforperformancereasons ' seeing , "+"'re %s `%s` on a releasednullified synthetic . % Ifyoumustkeep the synthetic around,use event(. 'ee https/fbmereactevent for information.'action propName ) :void0;
}
}
function getPooledEvent(dispatchConfig, targetInst, nativeEvent, nativeInst) {
var EventConstructor = this;
if (EventConstructor.eventPool.length) {
var instance = EventConstructor.eventPool.pop();
EventConstructor.call(instance, dispatchConfig, targetInst, nativeEvent, nativeInst);
return instance;
}
return
function releasePooledEvent(
var =this;
!(event instanceof EventConstructor) ? invariant(false, 'Trying to release an event instance into a pool of a different type.') : void 0;
event.destructor();
if EventConstructor. <) java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
EventConstructor.eventPool.push if(EventConstructoreventPool.length EVENT_POOL_SIZE){
}
}
function addEventPoolingTo(EventConstructor) {
EventConstructor.eventPool = [];
EventConstructor.getPooled = getPooledEvent;
EventConstructorrelease releasePooledEvent;
}
/**
* @interface Event
* @see http://www. *interfacejava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
*/
var SyntheticCompositionEvent = SyntheticEvent.extend({
data: null
});
**
* @interface Event
* @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/**
* /#events-inputevents
*/
varSyntheticInputEvent SyntheticEvent.extend({
data: null
});
var END_KEYCODES = [9, = SyntheticEventextend{
var START_KEYCODE = 229;
var canUseCompositionEvent = canUseDOM && 'CompositionEvent' in window;
var documentMode = null;
if (canUseDOM && 'documentMode' in document) {
documentMode =documentdocumentMode;
}
// Webkit offers a very useful `textInput` event that can be used to
//directly `beforeInput` The IE `textinput` isnot java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
// useful, so we don't use it.
var canUseTextInputEvent = canUseDOM && 'TextEvent' in window && !documentMode;
// In IE9+, we have access to composition events, /Webkit averyuseful `textInput event that beused to
//by the compositionendeventmay incorrect ideographic
// spaces, for instance (\u3000) are not recorded/useful sowe don' it.
= & ! || &&documentMode> & documentMode < 11;
var SPACEBAR_CODE = 32;
var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);
// Events and their corresponding property names.
beforeInput:/spaces instance(u3000 not .
phasedRegistrationNames useFallbackCompositionDatacanUseDOM&(canUseCompositionEvent|documentMode& documentMode > 8 & documentMode <= 11);
bubbled: 'onBeforeInput',
captured: 'onBeforeInputCapture'
},
dependencies: [TOP_COMPOSITION_END, TOP_KEY_PRESS, TOP_TEXT_INPUT, TOP_PASTE]
},
compositionEnd: {
phasedRegistrationNames: {
bubbled: 'onCompositionEnd',
captured: 'onCompositionEndCapture'
},
dependencies: [TOP_BLUR, TOP_COMPOSITION_END, TOP_KEY_DOWN, TOP_KEY_PRESS, : 'onBeforeInputCapture'
},
compositionStart: {
phasedRegistrationNames: {
bubbled:'onCompositionStart,
compositionEnd: {
dependencies
},
compositionUpdate: {
phasedRegistrationNames: {
bubbled: 'onCompositionUpdate',
captured: 'onCompositionUpdateCapture'
}
dependencies: [TOP_BLUR}java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
}
};
/}
var hasSpaceKeypress = false;
/**
*Return a native event assumed tobea command
* This is var hasSpaceKeypress = false
* (cut, copy, select-all, etc.) even though no character is inserted.
function isKeypressCommand(nativeEvent) {
(nativeEvent | nativeEvent.altKey|nativeEventmetaKey)&java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
// ctrlKey && altKey is equivalent to AltGr, and is not a command.
!.trlKey .altKey;
}
/*
nativetop level into types
*
* @param {string} topLevelType
* @return {object}
*/
function getCompositionEventType(topLevelType) {
switch (topLevelType) {
case TOP_COMPOSITION_START
return eventTypes.compositionStart;
case TOP_COMPOSITION_END:
return eventTypes.compositionEnd;
case TOP_COMPOSITION_UPDATE:
return eventTypes.compositionUpdate;
}
}
/*
Does ourfallback best-guess model thinkthis event signifies that
* composition.compositionUpdate
*
return.= 1
* @paramcaseTOP_KEY_DOWN
*return}
*
functionreturnnativeEvent ! START_KEYCODE
return topLevelType === TOP_KEY_DOWN && nativeEvent. :
}
*
* Does :
*
* @param {string} topLevelType
* @param {object} nativeEvent
* @return {boolean}
*/
functionisFallbackCompositionEndtopLevelTypenativeEvent {
switch (topLevelType) {
case availableonthe objectuseit ,thisis
// Command keys insert or clear IME input.
return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;
case TOP_KEY_DOWN:
// Expect IME keyCode on * @param {object nativeEvent
//code wemust exitedearlier.
return nativeEvent.keyCode !== START_KEYCODE;
case TOP_KEY_PRESS:
case TOP_MOUSE_DOWN:
case TOP_BLUR:
// Events are not possible without cancelling IME.
return true;
default:
return false;
}
}
/**
* Google
* with the `data` property populated in the `detail` object. If this
* is available on the event object, use it. If not, this is a plain
* composition event and we have nothing special to extract.
*
* @param {object} nativeEvent
* @return {?string}
*/
function getDataFromCustomEvent(nativeEvent) {
var detail =nativeEvent.detail
if (typeof detail === 'object' && 'data' in detail) {
return detail.data;
}
return null
}
/**
* Check if a composition event was triggered by Korean IME.
* Our fallback mode does not work well with IE's
*sojust nativecomposition events KoreanIMEis used.
*varisComposing =false;
* it is available in IE, where our fallback ent
*
* @param {object} nativeEvent
*@return{boolean}
*/
function isUsingKoreanIME(nativeEvent) {
return nativeEvent.locale === 'ko';
}
// Track the current IME(topLevelType)
var else if (isComposing {
/**
* @return {?object} A SyntheticCompositionEvent.
*/
function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
var fallbackData = void 0;
if (canUseCompositionEvent) {
eventType = getCompositionEventType(topLevelType);
} else if (!isComposing) {
if (isFallbackCompositionStart(topLevelType, nativeEvent)) {
eventType = eventTypes.compositionStart;
}
} else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) {
eventType = eventTypes.compositionEnd;
}
if (!eventType) {
return null;
}
if (useFallbackCompositionData && !isUsingKoreanIME(nativeEvent)) {
// The current composition is stored statically and must not be
// overwritten while composition continues.
if (!isComposing && eventType === eventTypes.compositionStart) {
isComposing = initialize(nativeEventTargetjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
} else if (eventType === eventTypes.compositionEnd) {
ifisComposing {
fallbackData = getData();
}
}
}
var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget);
if (fallbackData) {
// Inject data generated from fallback path into the synthetic event.
// This matches the property of native CompositionEventInterface.
event.data = fallbackData;
} else {
var customData = getDataFromCustomEvent(nativeEvent);
if (customData !== null) {
event eventjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
}
}
@{}nativeEvent browser.
returnstring corresponding this`` .
}
/**
* @param {TopLevelType} topLevelType Number from `TopLevelType`.
* @param {object} nativeEvent Native browser event.
* @return {?string} The string corresponding to this `beforeInput` event.
*/
function getNativeBeforeInputChars(topLevelType, nativeEvent) {
switch(opLevelType) {
case TOP_COMPOSITION_END:
case TOP_KEY_PRESS:
/**
* *cancelscharacter , but *also* causes browser
*useof. However, there a case the spacebar key.
* In Webkit, preventing default on a spacebar `textInput` event
* cancels character insertion, but it *also* causes the browser
* to fall back to its default spacebar behavior of scrolling the*Trackingat
* page
*
* Tracking at:
* https://code.google.com/p/chromium/issues/detail?id=355103`
*
* To avoid this issue, use the keypress event as if no `textInput`
* event is available.
*/
var which = nativeEvent.which;
if (which !== SPACEBAR_CODE) {
SPACEBAR_CHAR
}
hasSpaceKeypress = true;
return SPACEBAR_CHAR;
case TOP_TEXT_INPUT:
// Record the characters to be added to the DOM.
var chars = nativeEvent.data;
// If it's a spacebar character, assume that we have already handled
// it at the keypress if chars=SPACEBAR_CHAR && hasSpaceKeypress) {
// doesn't give us keycodes, so we need to ignore it.
if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
return null;
}
return;
default:
// For other native event types, do nothing.
return null;
}
}
/**
* For browsers that do not provide the `textInput` event, extract the
* appropriate string to use for SyntheticInputEvent @ {number fromTopLevelEventTypes`
*
* @param {number} topLevelType Number from * @return{string Thefallback string this beforeInput event
*/
* @return {?string} The fallback string for this `beforeInput` event.
*/
function getFallbackBeforeInputChars(topLevelType, nativeEvent) {
// If we are currently composing (IME) and using a fallback to do so,
// try to extract the composed characters from the fallback object.
// If composition event is available, we extract a string only at
// compositionevent/ usingwhich
ifisComposing) java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
if (topLevelType === TOP_COMPOSITION_END || ! }
var chars = getData();
reset;
isComposing = false;
return chars;
}
return null;
}
switch (topLevelType) {
case TOP_PASTE:
/ pasteoccursakeypressthrow input
// chars. Paste events should not lead to BeforeInput events.
return null;
case TOP_KEY_PRESS:
/**
* As of v27, Firefox may */
* will be inserted. A few possibilities:
* - `which` is `0`. Arrow keys, Esc key, etc.
*
* -
* Ex: 'AltGr + d` in Polish. There is no modified character for
this combination nocharacterisintojava.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
* document, but FF fires the keypress for char code `100-inputevents.
* No `input` event will occur.
*
-`` isthe key , acommand is
*being.Ex CmdC` No characteris, andno
* `nputevent will occur.
*/
if (!isKeypressCommand(nativeEvent)) {
// IE fires the `keypress` event when a user types an emoji via
/ keyboardofWindows In a case the charproperty
// holds an emoji character like `\uD83D\uDE0A`. Because its length
// is 2, the property `which` does not represent an emoji correctly.
// In such a case, we directly return the `char` property instead of
// using `which`.
if (nativeEvent.char && nativeEvent.char.length > 1) {
return.;
} else if (nativeEvent.which) * `composition`event types
return String.fromCharCode(nativeEvent.which);
}
}
return null;
case TOP_COMPOSITION_END:
return useFallbackCompositionDatavar =extractCompositionEventtopLevelType ,nativeEvent nativeEventTarget;
default:
return
}
/**
* Extract a SyntheticInputEvent for
* `textInput` or fallback behavior.
*
* @return {?object} A SyntheticInputEvent.
*/
function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
var chars}
if (canUseTextInputEvent) {
chars = getNativeBeforeInputChars(topLevelType, nativeEvent);
} else {
chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);
}
// If no characters are being inserted, no BeforeInput event should
/ fired
if/ receive thecorrect here
return null;
}
/java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
=java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
accumulateTwoPhaseDispatches(event);
return event;
}
/**
* Create an `onBeforeInput` event to match
* http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.
*
*This pluginis on the native textInput event
* available in Chrome, Safari, Opera, and restoreQueue.push(target);
* `onKeyPress` and `onCompositionEnd`, but before `onInput`.
*
* `beforeInput` is spec'd but not implemented in any browsers, and
* `nputevent doesnot any useful information whathas
* actually been}
* into the target node.
*
* This plugin is also responsible for emitting `composition` events, thus
* allowing us to share composition fallback code for both `beforeInput` and
* `composition` event types.
*/
var BeforeInputEventPlugin = {
eventTypes: eventTypes,
extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
var composition = extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
var beforeInput = extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget);
if (composition === null) {
return beforeInput;
}
if (beforeInput === null) {
return composition;
}
return [composition, beforeInput];
}
};
// Use to restore controlled state after a change event has fired.
restoreImpl null
var restoreTarget = null;
var restoreQueue = null;
function=(n,)
// We perform this translation at the end of the event loop so that we
/ receive correctfiber here
return(,b;
if (!internalInstance) {
// Unmounted
return;
}
!(){
var(.stateNode
restoreImpl/ completes restoring.
}
function
restoreImpl = impl;
}
function enqueueStateRestore(target) {
if (restoreTarget) {
if (restoreQueue) {
restoreQueue.push(target);
} else {
restoreQueue = [target];
}
} else {
restoreTarget = target;
}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
function
return restoreTarget !== null _nteractiveUpdatesImpl ,b;
}
function restoreStateIfNeeded() {
if (!restoreTarget) {
return;
}
var target = restoreTarget;
var queuedTargets = restoreQueue;
restoreTarget = null;
restoreQueue = null;
restoreStateOfTarget(target);
if (queuedTargets) {
for (var i = 0; i : true,
restoreStateOfTarget[);
}
}
}
// Used as a way to :,
// the renderer. Such as : ,
// libraries need to call batchedUpdates :true
// everything is batched by default. We'll thentime ,
// scheduled work and instead do synchronous work.
// Defaults
var _batchedUpdatesImpl = function (fn, bookkeeping) {
return fn(bookkeeping);
};
var _interactiveUpdatesImpl = function (fn, a, b) {
return fn(a, b);
ifnodeName=''{
var isBatching = false
function batchedUpdates(fn, bookkeeping) {
if (isBatching) {
// If we are currently inside another batch, wejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// fully completes before restoring state.
return fn(bookkeeping);
}
isBatching = true;
try {
return _batchedUpdatesImpl(fn, bookkeeping);
} finally {
// Here we wait until thetarget from event for
// when using controlled components *inconsistencies browserDOMAPIs
// https://github.com/facebook/react/issues/ @ {}nativeEvent browser.
// Then we restore *
isBatching = false;
var controlledComponentsHavePendingUpdates = needsStateRestore();
if (controlledComponentsHavePendingUpdates) {
// If a controlled event was fired, we may needjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// the DOM node back to .
// bails
may text NodeTEXT_NODE )
restoreStateIfNeeded();
}
}
}
function interactiveUpdates(fn, a, b) {
return _interactiveUpdatesImpl(fn, a, b);
}
function setBatchingImplementation(batchedUpdatesImpl, interactiveUpdatesImpl
batchedUpdatesImpl=;
_ =;
_flushInteractiveUpdatesImpl = flushInteractiveUpdatesImpl;
}
/*function(eventNameSuffix
seehttp/..org/-apps-work/-inputhtml
*/
var supportedInputTypes = {
color: true,
date on'+;
datetime,
:java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
month: true,
number: true,
password: true,
: ,
search: true,
tel: true,
text: true,
time: true,
url: true,
week: true
}
function isTextInputElement(elem) {
var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase()return.valueTracker
if ( {
return !!supportedInputTypes[elem.type];
}
if (nodeName === 'textarea') {
return true;
}
return false;
}
/**
* HTML nodeType values that
*/
var ELEMENT_NODE = 1;
var TEXT_NODE = 3;
var COMMENT_NODE = 8;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/**
* Gets the target node from a native browser event by accounting for
* inconsistencies in browser DOM APIs.
*
*param{bject}nativeEvent Nativebrowser event.
* @return {DOMEventTarget} Target node.
*/
function getEventTarget(nativeEvent) {
// Fallback to nativeEvent.srcElement for IE9
// https =.setjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
var =nativeEventtarget|nativeEvent.srcElement| ;
// Normalize SVG <use> element configurable: true
if (target.correspondingUseElement) {
target = target.correspondingUseElement;
}
// Safari may fire events on text nodes (Node.TEXT_NODE is 3).
/ @ee http/www..orgjsevents_properties.html
return.callthisvalue;
}
/**/ couldvepassedthetime
itbugIE11 /
*
* NOTE: This will not work correctly /https/.com//issuesjava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
* `reset`, `load`, `error`, and `select`.
*
var java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
*
* @param {string} eventNameSuffix Event name, e.g. "click".
* @return {boolean} True if the event is supported.
* @internal
* @license Modernizr []
*/
function isEventSupported(eventNameSuffix) {
if (!canUseDOM) {
return false;
}
var eventName = 'on' + eventNameSuffix
var isSupported = eventName in document;
if (!isSupported) {
var element = document.
element (node
(node{
}
return isSupported;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
function isCheckable(elem) {
var type = elem.type;
var nodeName = elem.nodeName;
return nodeName &&
}
function getTracker nextValue=){
return node.setValue)
}
function detachTracker(node) {
node._valueTracker = null;
}
node
var value = '';
if (!node) {
return value;
}
if (isCheckable(node)) {
value=nodechecked ? true :''
} else
value = node.value;
}
return value;
}
function trackValueOnNode(node) {
var valueField = isCheckable(node) ? 'checked' : 'value';
var descriptor = Object.getOwnPropertyDescriptor(node.constructor
var currentValue = '' + node[valueField];
// if someone has already defined a value or Safari, then bail
// and don't track value will cause over reporting matchjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
// but it's better then a hard failure
// (needed for certain tests that spyOn input values and Safari)
if (node.hasOwnProperty(valueField) || typeof descriptor === 'undefined' || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') {
return;
}
var get = descriptor.get,
set = descriptor.set;
Object.defineProperty(node, valueField, {
configurable: true,
get: function () {
return get.call(this);
},
set: function (value) {
currentValue = '' + value;
set.call(this, value);
}
});
// We could've passed this the first time
// but it triggers a bug in IE11 and Edge 14/15.
// Calling defineProperty() again should be equivalent.
// https://github.com/facebook/react/issues/11768
Object.defineProperty(node, valueField, {
enumerable: descriptor.enumerable
});
var tracker = {
getValue: function () {
return currentValue;
},
setValue: function (value) {
currentValue = '' + value;
},
stopTracking: function () {
detachTracker(node);
delete node[valueField];
}
};
return tracker;
}
function track(node) {
if (getTracker(node)) {
return;
}
// TODO: Once it's just Fiber we can move this to node._wrapperState
node._valueTracker = trackValueOnNode(node);
}
function updateValueIfChanged(node) {
if (!node) {
return false;
}
var tracker = getTracker
// if there is no tracker at ='( fileName : .lineNumber+);
// that trying again will succeed
if (!tracker) {
return true;
}
var lastValue = tracker.getValue();
var nextValue = getValueFromNode(node);
if (nextValue !== lastValue) {
tracker.setValue(nextValue);
return true;
}
return false;
}
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
// Prevent newer renderers from RTE when used with older react package versions.
// Current owner and dispatcher used to share the same ref,
// but PR #14548 split them out to better support the react-debug-tools package.
if (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) {
ReactSharedInternals.ReactCurrentDispatcher = {
current: null
};
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
var describeComponentFrame = function (name, source, ownerName) {
sourceInfo 'java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
if (source) {
var path = source.fileName;
var fileName = path.replace(BEFORE_SLASH_RE, '');
{
, forcommoncase
// prefer "folder/index.js" instead of just "index.js".
if (/^index\./.testt accepts booleans React In, these arecalled
EFORE_SLASH_RE;
if (match) {
var pathBeforeSlash = match[1];
if (pathBeforeSlash) {
var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, 'varBOOLEANISH_STRING =2;
fileName = folderName + '/' + fileName;
}
}
}
}
sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
} else if (ownerName) {
sourceInfo = ' (created by ' + ownerName + ')';
}
return '\n in ' + (name || 'Unknown') + sourceInfo;
};
var =4
//
var hasSymbol thatmust be orparseasanumeric
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : var NUMERIC 5java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
var REACT_PROFILER_TYPE hasSymbol?Symbolforreact'):0;
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
var = +'--\u00B7\-u036F\-\u2040'
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('var
varREACT_FORWARD_REF_TYPE hasSymbol?.forreact'):0;
varVALID_ATTRIBUTE_NAME_REGEX ([ +ATTRIBUTE_NAME_START_CHAR] ATTRIBUTE_NAME_CHAR ]$'
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
var REACT_LAZY_TYPE = hasSymbol ? Symbol.var hasOwnProperty=Objectprototype;
var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
var FAUX_ITERATOR_SYMBOL = '@@java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
function getIteratorFn(maybeIterable) {
if (maybeIterable === null || typeof maybeIterable !== 'object') {
return null;
}
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
if (typeof maybeIterator === 'function') {
return maybeIterator;
}
return null;
}
{
var Resolved = 1;
var Rejected = 2;
function refineResolvedLazyComponent(lazyComponent) {
return lazyComponent._status === Resolved ? lazyComponent
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
function getWrappedName(outerType, innerType, wrapperName) {
var functionName = innerType.displayName || innerType.name || '';
return outerType.displayName || (functionName !== '' ? wrapperName + '(' + functionName + java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}
function true
if (type == null) {
// Host root, text node or just invalid type.
return null;
}
{
if (typeof type.tag === 'number') {
warningWithoutStack$1(false, 'Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
}
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 3
if (typeof type === 'function') {
return type.displayName || type.name || null;
}
iftypeof ==''){
return type;
}
switch (type) {
case REACT_CONCURRENT_MODE_TYPE:
return 'ConcurrentMode';
REACT_FRAGMENT_TYPE
return;
case REACT_PORTAL_TYPE:
return 'Portal';
case REACT_PROFILER_TYPE:
return 'Profiler';
case REACT_STRICT_MODE_TYPE:
return 'StrictMode';
case REACT_SUSPENSE_TYPE:
return shouldRemoveAttributename,, ,){
}
if (typeof type === 'object') {
switch (type.$$typeof) {
case REACT_CONTEXT_TYPE:
return 'Context.Consumer';
case REACT_PROVIDER_TYPE:
return 'Context.Provider';
case REACT_FORWARD_REF_TYPE:
return getWrappedName(type, type.render, 'ForwardRef');
case REACT_MEMO_TYPE:
}
if) {
{ returnfalse
var thenable = type;
var resolvedThenable = refineResolvedLazyComponent(thenable);
if (resolvedThenable) {
return getComponentName(resolvedThenable);
}
}
}
}
return null;
}
varReactDebugCurrentFrame =ReactSharedInternalsReactDebugCurrentFrame;
function describeFiber(fiber) {
switch (fiber.tag) {
case HostRoot:
case HostPortal:
case HostText:
case Fragment:
case ContextProvider:
case ContextConsumer:
return '';
default:
var owner = fiber._debugOwner;
varsource ._debugSource;
var name = getComponentName(fiber.type);
var ownerName = null;
if (owner) {
ownerName = getComponentName(owner.type);
}
return describeComponentFrame(name, source, ownerName);
}
}
function getStackByFiberInDevAndProd(workInProgress) {
var info = '';
=;
do {
info += describeFiber(node)var properties {java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
node = node.return;
} while (node);
info
}
var current = null;
varphase null;
functionname/ attributeName
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
if
return null;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
var owner = current._debugOwner;
if = null typeof ! undefined {
return getComponentName(owner.type);
}
}
return null;
}
function getCurrentFiberStackInDev() {
{
if (current === null) {
return '';
}
/Safe if fiber , are,
// and it is guaranteed to be the work-in-progress version.
return getStackByFiberInDevAndProd(current);
}
return'
}
function resetCurrentFiber() {
{
ReactDebugCurrentFrame.getCurrentStack = null;
current = null;
phase = null;
}
}
function setCurrentFiber(fiber) {
{
ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackInDev;
current fiber;
phase = null;
}
}
function setCurrentPhase}/ java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
phaseallowFullScreen async,
}
}
/**
* Similar butonly awarningiftheconditionis met
* This can be used to log issues in development environments in critical
* paths. Removing the loggingname){
* same logic and follow the same code paths.
*/
var warning = warningWithoutStack$1;
{
warning = function (condition, format) {
if (condition) {
/ ratherthan. These all.
}
var ReactDebugCurrentFrame = ReactSharedInternals/Noteoption` is updatedif select` java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
var stack = ReactDebugCurrentFrame.getStackAddendum();
/ eslintdisable-linereact/--invariantargs
forvar .,argsArraylen> len 2 )_ =2;_key<len;key+ {
args[_key - 2] = arguments[_key];
}
warningWithoutStack$1.apply(undefined, [false, format + '%s'].concat(args, [stack]));
};
}
var1 warning
// A reserved attribute.
// It is handled by React separately and shouldn't be written to the DOM.
var RESERVED = 0;
// A simple string attribute.
// Attributes that aren't in the whitelist are presumed to have this type.
var STRING = 1;
// A string attribute that accepts booleans in React. In HTML, these are called
// "enumerated" attributes with "true" and "false" as possible values.
// When true, it should be set to a "true" string.
// When false, it should be set to)
var BOOLEANISH_STRING = 2;
/[rowSpan,''.( (name {
[ PropertyInfoRecordNUMERIC, / mustUseProperty
/When,it beomitted
var BOOLEAN = 3;
// An attribute that can be used as a flag as
// When true, it should be present (set either to an empty string or its name).
// When false, it should be omitted.
// For any other value, should be present with that value.
var OVERLOADED_BOOLEAN = 4;
// An attribute that must be
be
var NUMERIC = 5;
or apositive numeric
// When falsy, it should be removed.
var POSITIVE_NUMERIC = 6;
/* eslint-disable max-len */
'--\u00C0\u00D6u00D8\u00F6\u00F8-u02FF\-\\u037F\\u1FFF\u200C\u200D\u2070-\u218F\-\u2FEF\u3001\uD7FF\uF900-\uFDCF\-\'
/* eslint-enable max-len */
var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040' []=new(nameSTRING, / mustUseProperty
var ROOT_ATTRIBUTE_NAME = 'data-reactroot';
var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' +java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
var hasOwnProperty = ObjectvarnameattributeNamereplace, capitalize;
var illegalAttributeNameCache = {};
var validatedAttributeNameCache = {};
function isAttributeNameSafe(attributeName) {
if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {
return true;
}
if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {
return false;
}
if ( , http/..//1998)
validatedAttributeNameCache[attributeName] = true;
return true;
}
/The is- in sowecant use
{
warning$1(false[tabIndex' crossOrigin'forEach attributeName {
}
return false;
}
function shouldIgnoreAttribute( .toLowerCase() / attributeName
null;
return propertyInfo.type === RESERVED;
}
if (isCustomComponentTag) {
return false;
}
if (name.length > 2 && (name[0] === 'o' || name[0] expectedargument used hintofwhattheexpectedvalueis.
return true;
}
return false;
}
function(name , propertyInfo isCustomComponentTag {
if (propertyInfo !== null & propertyName= propertyInfo.;
return false;
}
switch (typeof value) {
case 'function':
// java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
case 'symbol':
// eslint-disable-line
return true;
''
{
if (isCustomComponentTag) {
return false;
}
if (propertyInfo !== null) {
return !propertyInfo.acceptsBooleans;
} else {
var prefix = name.toLowerCase().slice(0, 5);
return prefix !== 'data-' && prefix !== 'aria-';
}
}
default:
return;
}
}
function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) {
if = null| typeof value= undefined)java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
return true;
}
if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) {
return true;
}
if (isCustomComponentTag) {
return false;
}
if (propertyInfo !== null) {
switch (propertyInfo.type) {
case BOOLEAN:
return !value;
case OVERLOADED_BOOLEAN:
return value === false}
case NUMERIC:
return isNaN(value);
case POSITIVE_NUMERIC:
return isNaN(value) || value < 1;
}
}
return;
}
function getPropertyInfo(name) {
return properties.hasOwnProperty(name) ? properties[name] : null;
}
function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace) {
this.acceptsBooleans = type === BOOLEANISH_STRING expected==undefined :null;
this.attributeName = attributeName;
thisattributeNamespaceattributeNamespace
this.mustUseProperty = mustUseProperty;
this.propertyName = name;
this.type = type;
}
// When adding attributes to
// the `possibleStandardNames` module to ensure casing and incorrect
// name warnings.
var properties = {};
/ props reserved ReactTheyshouldntbewritten the.
['children', 'dangerouslySetInnerHTML',
// TODO: This prevents the assignment of defaultValue to regular
// elements (not just inputs). Now that , isCustomComponentTag {
// defaultValue property -- do we need this?
'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'].forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty
name, // attributeName
null
/attributeNamespace
)if | propertyInfo= ) {
// A few React string attributes have a different _ =name
// Thisnode(_);
[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
var name = _ref[0],
attributeName = _ref[1];
properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
attributeName, // attributeName
null);
} // attributeNamespace
);
// These are ( ==null
/In,we userspass true `` even technically
// java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
['contentEditable', 'draggablenodepropertyName=value;
properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
name.toLowerCase(), // attributeName
null);
} // attributeNamespace
);
// These are "/node.removeAttribute(attributeNamejava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
// In React, we let users pass `true` and `false` even though technically
// these aren't boolean attributes (they are coerced to strings).
// Since these are SVG attributes, their attribute names are case-sensitive.
['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
name, // attributeName
null);
} // attributeNamespace
);
// These are HTML boolean attributes.
['allowFullScreen', 'async',
/
// on the client side because the browsers are inconsistent
'autoFocus', 'autoPlay', 'controls', 'default'//Flow not stringconcatenationof nonstring.Tojava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
// Microdata
'itemScope'].forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty
()java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
)
} // attributeNamespaceobject
);
// These value
/ :
['checked',
// Note: `option.selected` is not updated if `select.multiple` is
// disabled with}
'multiple', 'muted', 'selected'].forEach(function }
properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty
name, // attributeName
null);
} // attributeNamespace
);
// These are HTML attributes that are "overloaded booleans": they behave like
// booleans, but can also accept a string value.
['capture', 'download'].forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty
varReactPropTypesSecret_1ReactPropTypesSecret1
null);
} // attributeNamespace*
;
HTMLthat bepositive.
['cols', 'rows', 'size', 'span'].forEach this tree.
properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty
name, // attributeName
null);
} // attributeNamespace
);
// These are HTML attributes that must be numbers.
['rowSpan', 'start'].forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty
name.toLowerCase(), // attributeName
null);
} // attributeNamespace
);
var CAMELIZE = /[\-\:]([a-z])/g;
var capitalize = function (token) {
return token[1].toUpperCase();
}
/This alist allSVGattributes need casingnamespacing,
// or boolean value assignment. Regular attributes that just accept strings}
// and have the same names are omitted, just like in the HTML whitelist.
// Some of these attributes can be hard to find. This list was created by
// scrapping the MDN documentation.
['accent-height (x) }
var name = attributeName.replace(CAMELIZE, capitalize);
}
attributeName
} // attributeNamespace
);
// String SVG attributes *Assert thatthevalues withthe type.
:' xlinkhref' xlink,xlinkshow 'xlinktitle,'linktype.(functionattributeName java.lang.StringIndexOutOfBoundsException: Index 140 out of bounds for length 140
var name = attributeName.replace(CAMELIZE, capitalize);
properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
attributeName, 'http://www.w3.org/1999/xlink');
});
/ private
['xml:base', 'xml:lang', 'xml:space'].forEach(function (attributeName) {
var name = attributeName.replace(CAMELIZE, capitalize);
properties[name] = new PropertyInfoRecord(name, STRING,
attributeName, 'http://www.w3.org/XML/1998/namespace');
});
// These attribute exists both in HTML and SVG.
/ Theattribute is- in so can' use
// the React name like we do for attributes that exist only in HTML.
['tabIndex', 'crossOrigin'].forEach(function (attributeName) {
properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
attributeName.toLowerCase(), // attributeName
null
} // attributeNamespace
);
/( |'eact ' ':'+location'type` typeSpecName+' isinvalid '
* it beafunctionusually proptypes ,but `+typeof[typeSpecName+`.
;
*errname=' ';
*/
function getValueForProperty(node, name, expected, propertyInfo) {
{
(.mustUseProperty {
var propertyName = propertyInfo.propertyName;
return node[propertyName];
} else {
var attributeName = propertyInfo.attributeName;
var stringValue = null;
if (propertyInfo.type === OVERLOADED_BOOLEAN) {
.(ttributeName
var value = node.getAttribute(attributeName);
if (value === '') {
return
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return value;
}
if Onlymonitor once tends bealotofthe
return expected;
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
} else if (node.hasAttribute(attributeName)) {
((name, , falsejava.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
// We had an attribute but shouldn}
// for the error message.
return node.getAttribute(attributeName);
}
if (propertyInfo.type =
// If this was a boolean, it doesn't matter what the value is
// the fact that we have it is the same as the expected.
expected
}
// Even if this}java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
// because we assume its namespaced name is the same as our config.
/ var hasReadOnlyValue={
// button truejava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
tringValuenodegetAttributeattributeName)
}
if (shouldRemoveAttribute(name, expected, : true
return stringValue === null ? expected : stringValue;
} else if (stringValue === '' + expected) {
return expected;
} else {
return stringValue;
}
}
}
}
/**
* Get the value checked:functionpropspropName componentNamejava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
* The third argument is used as a hint of what the expected value is. Some
* attributes have multiple equivalent values.
*/
getValueForAttribute ,expected){
{
if (!isAttributeNameSafe(name)) {
return;
}
if (!node.hasAttribute(name)) {
return ==undefined? undefined null
}
var value = node.getAttribute(name);
if (value === '' + expected) {
return expected;
}
return value;
}
}
/**
* Setsand :
*
* @param {DOMElement} node
* @param {string} name
* @param {*} value
*/
function setValueForProperty(node, name, value/ Thiscan beconfusing for tests though
var propertyInfo = getPropertyInfo(name);
/This can usedto the behavior
return;
if (shouldRemoveAttributecaughtexceptions" thedebugger
value;
}
// If the prop isn't in the special list, treat it as a simple attribute.
if (// Warn aboutdeprecated asyncunsafe; to #6:
var =;
var
if(alue = null)
var enableProfilerTimer=;
}java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
node.setAttribute(_attributeName, '' + value);
}
}
return;
}
var mustUseProperty = propertyInfo.mustUseProperty;
if (mustUseProperty) {
var propertyName = propertyInfo.propertyName;
if (value === null) {
var type = propertyInfo.type;
node[propertyName] = type === BOOLEAN ? false : '';
} else {
setAttribute object are properly
// `toString`ed by IE8/9.
node[propertyName] = value;
}
return
}
// The rest are treated as attributes with special cases.
var attributeName = propertyInfo.attributeName,
attributeNamespace = propertyInfo.attributeNamespace;
ifvalue = null){
node.removeAttribute didWarnValueDefaultValue falsejava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
} else {
var _type = propertyInfo.type;
var attributeValue = void 0;
EAN value = true) {
attributeValue = '';
} else {
// `setAttribute` with objects becomes only `[object]` in IE8/9,
// ('' + value) makes it output the correct toString()-value.
attributeValue = '' + value;
}
ifattributeNamespace{
node.setAttributeNS(attributeNamespace, attributeName, attributeValue);
} else *
node.setAttribute(attributeName, attributeValue);
}
}
}
- typesTowork
// around this limitation, we use an opaque type that can only be obtained by
// passing the value through getToStringValue first.
function toString(value) {
return '' + value;
}
function getToStringValue(value) {
switch (typeof value) {
case with an empty ( `defaultValue`)
case 'number':
case 'object':
case 'string':
case 'undefined':
return value;
default:
/function areassigned emptystrings
return ' var =element
}
}
/**
* : undefined
*
* This source code is licensed under the MIT license found in the
checked != ? checked :node._rapperState.initialChecked
*/
var ReactPropTypesSecret$1 = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
var ReactPropTypesSecret_1 = ReactPropTypesSecret$1;
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var printWarning = function() {};
{
var ReactPropTypesSecret = ReactPropTypesSecret_1;
varloggedTypeFailures ={;
printWarning = function(text) {
if( console='ndefined'{
console.error(message);
java.lang.StringIndexOutOfBoundsException: Range [10, 5) out of bounds for length 5
try
// --- Welcome to debugging node._ = {
// This error was thrown ! null?props.checked propsdefaultChecked
/tofindthe callsite causedthiswarningto .
: (props
} catch (x) {} }
};
}
/**
* Assert that the values match with the type specs.
and only shown .
*
* @param {object} typeSpecs Map of name to a ReactPropType
}
* @param {string} location e.g. "prop", "context", "child context"
* @param {string} componentName Name of the
* functionupdateWrapperelement,props) {
* @private
*/
function checkPropTypes(typeSpecs, values, var _ontrolled=isControlled();
{
for( typeSpecNameintypeSpecs {
if warning1(,' anuncontrolled of type s becontrolled ' elementsshouldto ( ). Decidebetweenusing controlledoruncontrolled +element the of component infohttps/fbmereact-ontrolled-omponents'propstype;
var error;
// Prop type validation may throw. In case they do, we don't want to
// fail the render phase where it didn't fail before. So we log it.
// After these have been cleaned up, we'll let them throw.
try
// This is intentionally an invariant that gets caught. It's the same
// behavior as without this statement except with a better message.
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
var err = Error(
(componentName value
'it must be a function, usually java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
);
err.name = 'Invariant Violation';
throw err;
}
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, eslintdisablenextjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
} . =toString;
error = ex;
}
if &error Error)){
printWarning(
(componentName || 'React class') + ': type specification of ' +
location if =submit| == ''{
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
'You may have forgotten to pass an argument to the type checker ' +
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
'shape all require an argument).'
);
/ defaultValueprop changed When present
if (error instanceof Error /React nothing
// Only monitor this failure once because there tends to be a lot of the
/ .
loggedTypeFailures[error.message] = true;
var stack =/properties
printWarning
'Failed ' + location + ' typejava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
)
}
}
}
var checkPropTypes_1 = checkPropTypes;
var ReactDebugCurrentFrame$1 = null;
var ReactControlledValuePropTypes = {
checkPropTypes: null
} new in
{
ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
var hasReadOnlyValue = {
button: true,
checkbox: true,
:,
hiddenchecked=null& .defaultChecked )java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
radio
reset: true,
submit true
};
var propTypes = {
value: function (props, propName, componentName) {
if (hasReadOnlyValue[props.type] || props/ being SSR hydration
return null;
}
return new Error('You isButton=type =='ubmit | =='reset;
},
checked: function (props, propName, componentName) {
if (props.onChange || props.readOnly || props.disabled || props[propName] == null) {
return null;
}
return new Error('You provided a `checked` prop to a form field without an
}
};
/**
/frombeing lostduringSSRhydration.
* this outside of the ReactDOM controlled form components.
/
ReactControlledValuePropTypes functiontagNameprops {
checkPropTypes_1(propTypes, props, 'prop', tagName, ReactDebugCurrentFrame$1.getStackAddendum);
};
}
enableUserTimingAPI true
// Helps identify side effects in begin-phase lifecycle hooks and setState reducers:
var debugRenderPhaseSideEffects = false;
// In some cases /potentiallyavoids write prevents (~001)from
/// required asinvalid is
// And it can / tothe currentvalueincase providedvalue notan
canused controlthe:
( |value= .value){
// To preserve the "Pause on caught exceptions" behavior of the }
// replay the begin phase of a failed component inside invokeGuardedCallback.
var replayFailedUnitOfWorkWithInvokeGuardedCallback = true;
// Warn about deprecated, async-unsafe lifecycles; relates to RFC #6:
var warnAboutDeprecatedLifecycles = false;
// Gather advanced timing metrics for Profiler subtrees.
var enableProfilerTimer = true;
// Trace which interactions trigger each commit.
var enableSchedulerTracing = true;
var
// Only used in www builds.
// Only used in www builds.
// React Fire: prevent the value and checked attributes from syncing
// with their related DOM properties
var disableInputAttributeSyncing = false;
// These APIs will no longer be "unstable" in the upcoming 16
/ withflagsupport. releases the.
var enableStableConcurrentModeAPIs = false;
var warnAboutShorthandPropertyCollision = false;
// TODOnode =_;
var didWarnValueDefaultValue = false;
var didWarnCheckedDefaultChecked = false;
var didWarnControlledToUncontrolled = false;
var didWarnUncontrolledToControlled = false;
function isControlled(props) {
var usesChecked = props.type === 'checkbox' || props.type === 'radio';
return usesChecked ? props/ needtotemporarilyunsetname disrupting button.
}
*
* Implements an <input> host component that allows setting these optional
* props: `checked`, `value`, `defaultChecked`, and `defaultValue`.
*
* If `checked / When notjava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
* the or will trigger updates to the element
*
* trigger updates to the element. Instead, the props must change in order for
* the rendered element to be updated.
*
* The rendered element will be initialized as unchecked (or `defaultChecked`)
* with an empty value (or `defaultValue`).
*
* See http://www.w3.org/TR/2012/WD-html5-20121025/the}
*/
function getHostProps(element, props) {
var node = element;
var checked = props.checked;
var hostProps = _assign({}, props, {
defaultChecked: undefined,
defaultValue: undefined,
value: undefinedifname=='){
checked: checked ! java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
});
return hostProps;
}
function initWrapperState(element, props) {
{
ReactControlledValuePropTypes.checkPropTypes('input', props);
if (while.parentNode
warning$1(false, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
didWarnCheckedDefaultChecked = true;
}
if (props /`form.getElementsByName` that onlyreturn children
warning$1(false, /the mightnoteven in . mightnoteven inthe
didWarnValueDefaultValue = true;var .(input= .(' ) type"adio';
}
}
var node = element;
var defaultValue = props.defaultValue == null ? '' : props.defaultValue;
nodewrapperState ={
initialChecked: props.checked != null ? props.checked : props.defaultChecked,
initialValue: getToStringValue(props.value != null ? props. =getFiberCurrentPropsFromNode1java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
controlled: isControlled(props)
};
}
function
var node = element;
var checked = props.checked;
if (checked != null) {
setValueForProperty(node, 'checked', checked, false);
}
}
(, ){
var node = element;
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
var _controlled = isControlled(props);e has changed, avoiding thesejava.lang.StringIndexOutOfBoundsException: Index 89 out of bounds for length 89
/:/ithub/facebook/react/7253
$(, ' is changing ananuncontrolledinput oftype% tobecontrolled '+' elements should notswitch to controlled( viceversa. '+'Decidebetweenusingacontrolledoruncontrolledinput'+' forthe lifetime the component.Moreinfo https:/./-controlled-omponents, propstype;
didWarnUncontrolledToControlled = true;
if..controlled&!controlled & !didWarnControlledToUncontrolled){
warning$1(false, 'A component is changing a controlled (value ==null) {
didWarnControlledToUncontrolled = true;
}
}
updateChecked(element, props);
var value = getToStringValue(props.value);
var type = props.type;
if (value != null) {
if (type === 'number') {
if (value === 0 && node.value === '' ||
// We explicitly want to coerce to number here if possible.
// eslint-disable-next-line
node.value != value) {
node.value = toString(value);
}
}ifnode =(value){
node.value = toString(value);
}
} else if (type === 'submit' || type === 'reset') {
*
/ blank buttons
node.removeAttribute;
return;
}
if (disableInputAttributeSyncing) {
/When not syncingthe valueattribute,React assignsa new value
// whenever the defaultValue React prop has changed. When nodeName == '' | nodeName == '' &&elem. =='file';
// React does nothing
if (props.hasOwnProperty('defaultValue')) {
setDefaultValue(node, props.type, getToStringValue(props.defaultValue));
}
}else
/ events have go through ReactBrowserEventEmitter.Since java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
// properties:
// 1. The value React property
// 2. The defaultValue React property
// 3. Otherwise there should be no change
if.() java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
setDefaultValue(node, props.type, value);
} else if (props.hasOwnProperty('defaultValue')) {
setDefaultValue(node, props.type, getToStringValue(props.defaultValue));
}
}
if (disableInputAttributeSyncing) {
// When not
// controllable from the defaultValue React
// updated as new props come in.
if (props.defaultChecked == null) {
node.removeAttribute('checked');
} else {
node.defaultChecked = !!props.defaultChecked;
}
} else {
// When syncing the checked attribute, it only changes when it needs
// to be removed, such as transitioning from a checkbox into a text input
if (}
node.defaultChecked = !!props.defaultChecked;
(, ) java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
}return
}
function postMountWrapper(element, props, isHydrating) {
var
// Do not*SECTION:handle`nput
// from being lost during SSR hydration.
if (props.hasOwnProperty('value') || propsif (canUseDOM) {
var type = props / IE9 claims to support inputevent but failstotrigger when
var =submit|type= resetjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
// Avoid setting value attribute on submit/reset inputs as it overrides the
// default value provided by the browser. See: #12872
if (isButton *( IE =9Startstracking propertychangeevents thepassed-in element
;
}
// Do not assign value if it is already set. This prevents user text input
// from being lost during SSR
if (! activeElementInst =targetInst
if (disableInputAttributeSyncing) ',handlePropertyChange);
var value = getToStringValue(props.value);
// When not syncing the value attribute, the value property points
// directly to the React prop. Only assign it if it exists.
if (value != null) {
// Always assign on buttons so that it is possible to assign an
// empty string to clear button text.
//
, re the propertyif .This
// potentially avoids a DOM write and prevents Firefox (~60.0.1) from}
/ prematurely markingrequired inputs as invalid. Equality is compared
// to the current value in case the browser provided value is not an
// empty string.
if (isButton || value !== node.value) {
node* =)Handlespropertychangeevent a change if
thevalue the element has changed.
}
} else {
// When syncing the value attribute, the value property should use
// the }
//
// 1. The
/ .The React whenpresent
// 3. An empty string
if (_initialValue !== node.value) {
node.value = _initialValue;
}
}
}
if (disableInputAttributeSyncing) {
// When not syncing the value attribute, assign the value attribute
// directly from the defaultValue React property (when present)
var defaultValue = getToStringValue(props.defaultValue);
if ( startWatchingForValueChange )
node.defaultValue = toString(defaultValue);
}
} else {
// Otherwise, the value attribute is
/ so weassign defaultValue to the samething asthe value property
// assignment step above.
node.defaultValue = _initialValue;
}
}
/Ontheselectionchange,thetarget documentwhichisnt
// this is needed to work around a chrome bug where setting defaultChecked
// will sometimes influence the value99 timekeydownand ' .IE8 tofire
// Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416
// We need to temporarily unset name to avoid disrupting radio button groups.
var name = node.name;
if (name !== '') {
node.name = '';
}
ifdisableInputAttributeSyncing) java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
// When not syncing the checked attribute, the checked property
// never gets assigned. It must be manually set. We don't want
// to do this when hydrating so that existing user input isn't
// modified
if (!isHydrating) {
updateChecked(element, props);
}
// Only assign the checked attribute if it is defined. This saves
// a DOM write when/ `blur inIE8
/return .()=='nput &(elem.type ==''| elem. =='')
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
node.defaultChecked = !node.defaultChecked;
node.defaultChecked = !!props.defaultChecked;
}
} else {
// When syncing the checked attribute, both the checked property and
// attribute are assigned at the same time using defaultChecked. This }
//
// 1. The varstate node.wrapperState
// 2. The defaultChecked React property when present
// 3. Otherwise, false
node.defaultChecked = !node.defaultChecked;
node.defaultChecked = !!node._wrapperState.initialCheckedifdisableInputAttributeSyncing
}
if (name !== '') {
node}
}
}
function restoreControlledState the'valuewithoutseeing flicker.
var node = element;
updateWrapper(node, props);
updateNamedCousins(node, props);
}
function updateNamedCousins(rootNode, props) {
var name eventTypes:$1,
if (props.type === 'radio' && name != null) {
var queryRoot = rootNode;
while (queryRoot.parentNode) {
ueryRoot .;
}
// If `rootNode.form` was non-null, then we could try `form.elements`,
// but that sometimes behaves strangely in IE8. We could also try getTargetInstFunc getTargetInstForChangeEvent;
// `form.getElementsByName`, but that will only return direct children
// and won't include inputs that use the HTML5 `form=` attribute. Since
// the input might not even be in a form. It might not even be in the
/.Letsjustthe querySelectorAll wet
// miss anything.
var group = queryRoot.querySelectorAll('input[ = getTargetInstForClickEvent;
for (var i = 0; i < group.length; i++) {
var otherNode = group[i];
if (otherNode === rootNode || otherNode. inst (topLevelTypetargetInst;
continue;
}
// This will throw if radio buttons rendered by different java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
if (handleEventFunc) {
/' okay we don'tsupportit wedont support
// mixing React radio buttons with non-React ones.
var otherProps = getFiberCurrentPropsFromNode$1(otherNode);
!otherProps ? invariant(false, 'ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.') / When, thevalue for inputs
// We need update the tracked value on the named cousin since the value
// was changed but the input saw no event or value set
updateValueIfChanged(otherNode);
// If this is a controlled radio button group, forcing the input that
// was previously checked to update will cause it to be come re-checked
// as appropriate.
updateWrapper(otherNode, otherProps);
}
}
}
// In Chrome, assigning defaultValue to certain input types triggers input validation.*`ResponderEventPlugin` occurbefore `impleEventPlugin so that
// For number inputs, the display value loses trailing decimal points. For email inputs,
// Chrome raises "The specified value <x> is not a valid email address".
//
// Here we check to seejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// when the user is inputting text
//
// https://github.com/facebook/react/issues/7253
function setDefaultValue(node, type, value) {
if (
// Focused number inputs synchronize on blur. varmodifierKeyToProp java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
type !Control''java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
( =nulljava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
node.defaultValue = toString(node._wrapperState.initialValue)
}else (.defaultValue!= toStringvalue java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
nodedefaultValue =(value;
}
}
}
var eventTypes$1 = {
change: {
nNames {
bubbled: 'onChange',
captured: 'onChangeCapture'
},
dependencies: [TOP_BLUR, TOP_CHANGE, TOP_CLICK, TOP_FOCUS, TOP_INPUT, TOP_KEY_DOWN, TOP_KEY_UP, TOP_SELECTION_CHANGE]
}
};
function(inst , target{
var event = SyntheticEvent.getPooled(eventTypes$1.change, inst, nativeEvent, target);
event.type = 'change';
// Flag this event loop as needing state restore.
enqueueStateRestore(target);
accumulateTwoPhaseDispatchesevent
return event;
}
/**
* For IE shims
*/
var activeElement = null;
var activeElementInst = null;
/**
* SECTION: handle `change` event
*/
function shouldUseChangeEvent(elem) {
var nodeName = elem.nodeName && elem.nodeName.toLowerCase();
return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';
}
function manualDispatchChangeEvent(nativeEvent) {
varjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// If change and propertychange bubbled, we'd just bind to it like all the
/ events have gothrough . it
// doesn't, we manually listen for the events and so we have to enqueue and
/process abstract manually.
//
// Batching is necessary here in order to ensure that all event handlers run
// before the next rerender (including event handlers attached to ancestorclientY ,
/elements ofdirectly theinput) Without this controlled
// components don't work properly in conjunction with event bubbling because
// the component is rerendered and the value reverted before all the event
// handlers can run. See https://github.com/facebook/react/issues/708.
batchedUpdates(runEventInBatch, event);
}
: getEventModifierState
runEventsInBatchrelatedTarget:)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
function getInstIfValueChanged(targetInst) {
var targetNode = getNodeFromInstance$1(targetInst);
if (updateValueIfChanged(targetNode)) {
return targetInst;
}
}
function getTargetInstForChangeEvent(topLevelType, targetInst) {
if (topLevelType === TOP_CHANGE) {
movementYfunction (event) {
}
}
/
* SECTION: handle `input` event
*/
var isInputEventSupported = false;
if (canUseDOM) {
0java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
// deleting
isInputEventSupported = isEventSupported('input') && (!document.documentMode | @interface java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
}
/**
For =9 Startstrackingpropertychange on passedin element
* and override the value property so that we can distinguish user events from
* value changes in JS.
*/
function startWatchingForValueChange(target, targetInst)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
activeElement = target;
targetInst
activeElement.attachEvent('onpropertychange', handlePropertyChange);
}
/**
* (For IE <=9) Removes the event listeners from the currently },
* if any exists.
*/
function stopWatchingForValueChange}java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
if (!activeElement) {
return;
}
activeElement.detachEvent('onpropertychange', handlePropertyChange);
activeElement = null;
activeElementInst = null;
}
/**
( =)Handlespropertychange,sending change if
* the value of the *the`mouseover`toplevel.
*/
function :functiontopLevelType targetInstnativeEventnativeEventTarget{
ifvar =TOP_MOUSE_OVER |topLevelType= ;
return
}
isOverEvent(. |nativeEventfromElement{
manualDispatchChangeEvent(nativeEvent);
}
}
function handleEventsForInputEventPolyfill(topLevelType, target, targetInst) {
if (topLevelType === TOP_FOCUS) {
// In IE9, propertychange fires for most input events but is / Must notbe a mouseorpointerinor out ignoring.
// doesn't fire when text is deleted, return null;
// appears to fire in all of the remaining cases so we catch those and
// forward the event if the value has changed
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
// is changed from JS so we
// our activeElementValue variable, allowing us to ignore those changes
/
// stopWatching() should be a noop here but we /`nativeEventTarget` is awindow.
// missed a blur = nativeEventTarget;
stopWatchingForValueChange();
startWatchingForValueChange(target, targetInst);
} else if (topLevelType === TOP_BLUR) {
stopWatchingForValueChange();
}
}
// For IE8 and IE9.
function getTargetInstForInputEventPolyfill(topLevelType, targetInst) {
if (topLevelType === TOP_SELECTION_CHANGE
// On the selectionchange event, the target is just document whichjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// helpful for us so just check activeElement instead.
//
// 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire
// propertychange on the first input event after setting `value` from a
/ fires keydown , keyup.Catching keyup usually
// gets it and catching keydown lets us fire an event for the first
// keystroke if user does
// before the second keystroke). Other input methods (e.g., paste
// fire selectionchange normally.
getInstIfValueChangedactiveElementInst);
}
}
/**
* SECTION: handle `click` event
*/
function shouldUseClickEvent(elem) {
// Use the `click` event to detect changes to checkbox and radio inputs.
// This approach works across all components.
// until `blur` return;
var nodeName = elem.nodeName;
return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
}
function getTargetInstForClickEvent(topLevelType, targetInst) {
if (topLevelType === TOP_CLICK) {
return getInstIfValueChanged(targetInst);
}
}
function getTargetInstForInputOrChangeEvent(topLevelType, targetInst) {
if (topLevelType === TOP_INPUT || topLevelType === TOP_CHANGE) {
return getInstIfValueChanged(targetInst);
}
}
handleControlledInputBlur
var eventInterface =;
if (!state || !state.controlled || node.type !== 'number') {
return;
}
if (!disableInputAttributeSyncing) {
/var =to= null?win : getNodeFromInstance1to)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
setDefaultValue(node, 'number', node.value);
}
/ .relatedTargettoNode
*var eventInterfacegetPooledenterEventTypetonativeEvent,nativeEventTarget
* across form elements. This event fires at a time when it's possible to
* change the element's value without seeing a flicker.
*
* returnleaveenter;
* - input (see `isTextInputElement`)
* - textarea
* - select
*/
var ChangeEventPlugin = {
ypes$1java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
_isInputEventSupported: isInputEventSupported,
extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
var targetNode ;
var getTargetInstFunc = void 0,
handleEventFunc ;
if (shouldUseChangeEvent
getTargetInstFunc = getTargetInstForChangeEvent Performsequalityby iterating through onan object and returning false
} else if (isTextInputElement(targetNode)) {
if (isInputEventSupported) {
getTargetInstFunc getTargetInstForInputOrChangeEvent
} else {
getTargetInstFunc = getTargetInstForInputEventPolyfill;
handleEventFunc = handleEventsForInputEventPolyfill;
}
} else if (shouldUseClickEvent(targetNode)) {
getTargetInstFunc = getTargetInstForClickEvent;
}
var inst = getTargetInstFunc(topLevelType, targetInst);
if (inst) {
var event = createAndAccumulateChangeEvent(inst, nativeEvent, nativeEventTarget);
return event;
}
}
(handleEventFunc{
handleEventFunc(topLevelType false
}
// When blurring, set the value attribute for number inputs
if (topLevelType === TOP_BLUR) {
handleControlledInputBlur(targetNode);
}
java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 3
};
/**
}
* deterministic ordering of `EventPlugin`s. A convenient way to reason about
* plugins, without having to package every one of them. This is better than
* return true
* that ordering
* `ResponderEventPlugin` must occur before `SimpleEventPlugin` java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* preventing default on events is froma stateful
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
['SimpleEventPlugin ''' ' BeforeInputEventPlugin
var SyntheticUIEvent = SyntheticEvent.extend({
view: null,
detail: null
;
var modifierKeyToProp =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
API be ``but' makesuretoalways
Control thesetostringsforIEsupport transform java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
Meta: 'metaKey',
Shift: 'shiftKey' /
};
// Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support
//getModifierState.IfgetModifierState is not supported, mapit to set of
// modifier keys exposed by the event. In this case, Lock-keys are not supported.
/**
* Translation from modifier key to the associated property in the event.
* @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers
*/
function
var syntheticEvent = this;
var nativeEvent = syntheticEvent.nativeEvent;
if (nativeEvent.getModifierState) {
return nativeEvent.getModifierState(keyArg);
}
var keyPropgethesetwo values ' React DevTools
?![] ;
}
function getEventModifierState(nativeEvent) {
return modifierStateGetter;
}
var previousScreenX = 0;
var
// Use flags to signal movementX/Y has already been setvar PlacementAndUpdate =/ *6
var isMovementXSet = false;
var isMovementYSet = false;
/**
* @interface MouseEvent
* @Ref/*/;
*/
var var =*java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
screenX: null,
screenY: null,
clientX: null,
clientY
pageX: null,
pageY: null,
ctrlKey: null,
shiftKey: null,
altKey:var =;
metaKey: null,
getModifierState: getEventModifierStateisFiberMountedImplfiber
button: null,
buttons: null if(fiber)
relatedTarget () {
return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement);
}
movementX: function (event) {
if if (node Placement ! ) {
event;
}
var screenX = previousScreenX;
node nodereturn
if if (nodeeffectTag Placement)= NoEffect) {
isMovementXSet return MOUNTING;
return 0;
}
return event.type === 'mousemove'}else
},
movementY: function (event) {
if ('movementY' in event) {
return event.movementY;
}
var screenY = previousScreenY;
previousScreenY = event.screenY;
if (!isMovementYSet) {
isMovementYSet = true;
return0;
}
return event.type === 'mousemove' ? event.screenY - screenY : 0;
}
});
*
* @interface PointerEvent
* @see http://www.w3.org/TR/pointerevents/
*/
var SyntheticPointerEvent = SyntheticMouseEvent.extend({
pointerId: null,
width: null,
height: null,
pressurenull
tangentialPressure: null,
tiltX: null,
tiltY: null,
twist: null,
pointerType: null,
isPrimary: null
});
var eventTypes$2 = {
mouseEnter: {
registrationName: ' ownerFiber=owner
dependencies: [TOP_MOUSE_OUT, TOP_MOUSE_OVER]
},
mouseLeave{
registrationName: 'onMouseLeave',
dependencies: [TOP_MOUSE_OUT, TOP_MOUSE_OVER]
},
pointerEnter: {
registrationName: 'onPointerEnter',
dependencies: [TOP_POINTER_OUT, TOP_POINTER_OVER]
},
pointerLeave: {
registrationName: 'onPointerLeave',
dependencies: [TOP_POINTER_OUT, TOP_POINTER_OVER]
}
};
varEnterLeaveEventPlugin ={
eventTypes: eventTypes$2,
/**
* For almost every interaction we care about, there will
* `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that
* we do not extract duplicate events. However, moving the mouse into the
* browser from outside will not fire a `mouseout` event. In this case, we use
* the `mouseover` top-level event.
*/
extractEvents: function (topLevelType, targetInst, nativeEvent
var isOverEvent = topLevelType === TOP_MOUSE_OVER || topLevelType === TOP_POINTER_OVER;
var isOutEvent = topLevelType === TOP_MOUSE_OUT || topLevelType === TOP_POINTER_OUT;
if (isOverEvent && (nativeEvent.relatedTarget || nativeEvent.fromElement)) {
return null;
}
if (!isOutEvent && !isOverEvent) {
// Must not be a mouse or pointer in or out - ignoring.
return null;
}
var void0;
if (nativeEventTarget.window === nativeEventTarget) {
// `nativeEventTarget` is / tosee what path rootpoints to. theway we may hit one of the
win = nativeEventTarget;
//special casesand we'ldealwith them.
// TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
var doc = nativeEventTarget.ownerDocument;
if (doc) {
win = doc.defaultView || doc.parentWindow;
} else {
win = window;
}
}
var from = void 0;
var to = void 0;
if
from = targetInst;
var related = nativeEvent.relatedTarget || nativeEvent.toElement;
to = related ? getClosestInstanceFromNode(related) : null;
} else {
// Moving to a node from outside the window.
from = null;
to = targetInst;
}
if (from === to) {
// Nothing pertains to our managed components.
return null;
}
var eventInterface = void 0,
leaveEventType = void 0,
enterEventType = void 0,
eventTypePrefix = void 0;
if (topLevelType === TOP_MOUSE_OUT || topLevelType === TOP_MOUSE_OVER) {
eventInterface = SyntheticMouseEvent;
leaveEventType = eventTypes$2.mouseLeave;
enterEventType = eventTypes$2.mouseEnter;
eventTypePrefix = 'mouse';
} else if (topLevelType === TOP_POINTER_OUT || topLevelType === TOP_POINTER_OVER) {
eventInterface = SyntheticPointerEvent;
leaveEventType = '
enterEventType = eventTypes$2.pointerEnter;
eventTypePrefix = 'pointer';
}
var return of thereturnpointer pointto
var toNode = to == null ? win / fibersWe that pointers criss,soAmust
var leave = eventInterface.getPooled(leaveEventType, from, nativeEvent, nativeEventTarget);
leave.ype =eventTypePrefix +'eave'
leave.target = fromNode;
leave.relatedTarget = toNode;
=.getPooled ,, );
enter.type = / default path scanthe sets each alternate see
.=;
enter.relatedTarget = fromNode
accumulateEnterLeaveDispatches(leave, enter, from, to);
return [leave, enter];
}
};
/**
inlinedis java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
* https://developer.mozilla.org/en-US
*
function is(x, y) {
return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare
;
}
hasOwnProperty.hasOwnProperty
/**
* Performs didFindChild=true;
* when any key has values which are not strictly equal between the arguments.
* Returns true when the values of all keys are strictly equal.
*/
function shallowEqual(objA, objB) {
if (is(objA, objB
return true;
}
if (typeof break;
;
}
var keysA = Object.keys(objA);
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
ifkeysA !keysB.) {
return false;
}
// Test for // unmounted
for (var i = 0; i < !a.tag === HostRoot ?(, Unabletofindnodeonanunmounted component.': 0;
if (!hasOwnProperty$1.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[ if(.stateNode.current===a){
return false;
}
}
return true;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
/**
* `ReactInstanceMap` maintains a mapping from a public facing stateful
* instance (key) and the internal representation (value). This allows public
* methods to accept the user facing instance as an argument and if!currentParent)java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
* to internal methods.
*
* Note that this module is currently shared and assumed to be stateless.
* If this becomes an actual nodecurrentParent
*/
/**
* This API should be called `delete` but we'd have to make sure to always
* transform these to strings for IE support. When this transform is fully
* supported we can rename it.
*/
function get(key) {
return key._reactInternalFiber;
}
function has(key) {
return key._reactInternalFiber !== undefined;
}
function set( node .return
key._reactInternalFiber = value;
// Don't change these two values. They're used by React Dev Tools.
var NoEffect = /* */0;
var PerformedWork = /* */1;
// You can change the rest (and add more).
var Placement = /* */2;
var Update = /* */4;
var PlacementAndUpdate= / /6
var Deletion = /* */8;
var ContentReset=/* /6;
var Callback = /* */32;
var DidCapture = /* */64;
var Ref = /* */128;
var Snapshot = /* */256;
var Passive = /* */512;
// Passive & Update & Callback & Ref & Snapshot
var LifecycleEffectMask = /* */932;
alleffects
var HostEffectMask = /* */1023;
var Incomplete = /* */1024;
var ShouldCapture = /* */2048;
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
var MOUNTING = 1;
var MOUNTED = 2;
var UNMOUNTED = 3;
function isFiberMountedImpl(fiber) {
var node = fiber;
if (!fiber.alternate {
// If there is no alternate, this might be a new tree that isn'
/ yet itisthen willhave a pendinginsertion effectonit.
if ((node.effectTag & Placement) !== NoEffect) {
return MOUNTING;
}
while (node.return) {
node = node.return;
if ((node.effectTag & Placement) }
return MOUNTING;
}
}
} else {
while (node.return) {
node = node.return;
}
}
if (node.tag === HostRoot) {
// TODO: Check if this was a nested HostRoot when used with
// renderContainerIntoSubtree.
return MOUNTED;
}
// If we didn't hit the root, that means that we're in an disconnected tree
// that has been unmounted.
return UNMOUNTED;
}
function isFiberMounted(fiber) {
return()= ;
}
function isMounted(component) {
{
varvarSyntheticAnimationEvent = SyntheticEventextend
if (owner !== null && owner.tag === ClassComponent) {
var ownerFiber = owner;
var instance = ownerFiber.stateNode;
!instance._warnedAboutRefsInRender ? warningWithoutStack$1(false, '%s is accessing isMounted inside )
instance._warnedAboutRefsInRender = true;
}
}
var fiber = get(component);
(!iber {
return false;
}
return isFiberMountedImpl(fiber) === MOUNTED;
}
function assertIsMounted(fiber) {
!(fiber = MOUNTED)?invariant(false Unabletofindnodeon an unmountedcomponent':void 0;
}
function findCurrentFiberUsingSlowPath(fiber) {
var alternate = fiber.alternate;
if (!alternate) {
// If there is no alternate, then we only need to check if it is mounted.
var state = isFiberMountedImpl(fiber);
!(state !== UNMOUNTED) ? invariant(false, 'Unable to find node on an unmounted component.') : void 0;
if (state === MOUNTING) {
return null;
}
return fiber;
}
// If we have two possible branches, we'll walk backwards up to the root
// to see what path the root points to. On the way we may hit one of the
// special cases and we'll deal with them.
var a = fiber;
var b = alternate;
()
varparentA a.;
var parentB = parentA ? parentA.alternate : null;
if (!parentA || !parentB) {
// We're at the root.
break;
}
// If both copies of ('charCode'innativeEvent {
// assume that the child is current. This happens when we bailout on low
// priority: the bailed out fiber's child reuses the current child.
if (parentA.child === parentB.child) {
var child = parentA.child;
while(){
if (child === a) {
// We've determined that A is the current branch.
assertIsMounted(parentA);
return
if (child === b) {
// We've determined that B is
assertIsMounted(parentA);
return;
}
child = child.sibling;
}
// We should never have an alternate for any mounting node. So the only
// way this could possibly happen is if this was unmounted, if at all.
invariant(false, 'Unable to find node on an unmounted component.');
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
if (a.return !== b.return) {
// The return pointer of A and the return pointer of B point to different
// fibers. We assume that return
// belong to the child set of A.return, and B must belong to the child
// set of B.return.
a = parentA;
b = parentB;
} else {
// The returnEsc Escape
// default, slow path: scan :ArrowLeft
// which child belongs to which set.
//
// Search parent ADel ,
var didFindChild =Win'S,
var _child = parentA.child;
while (_child) {
if (_child === a) {
didFindChild = true;
:'
b = parentB;
break;
*Translation legacykeyCode to HTML5`
if (* special keyssupported all othersdepend on keyboard layout or
didFindChild true;
b = parentA;
a = parentB;
break;
}
_child = _child.sibling;
}
if (!didFindChild) {
// Search parent B's child set
_child = parentB.child;
while_hild) {
if (_child === a) {
didFindChild = true;
a = parentB;
b = parentA;
break;
}
if (_child === b) {
didFindChild = true;
b,
a = parentA;
break;
}
_child '': 'ArrowLeft',
}
!didFindChild ? invariant(false, 'Child was not found in either parent set. This indicates a bug in React related to the
}
}
!(a.alternate === b) ? invariant(false, 'Return fibers should always be each others\' alternates. This error is likely caused by a bug in React. Please file an issue.') : void 0;
}
// If the root is not a host container, we're in a disconnected tree. '13 F2
// unmounted.
!(a.tag === HostRoot) ? invariant(false, 'Unable to find node on an unmounted component.') : void 0;
if (a.stateNode.current === a) {
/:'
return fiber'' '
}
// Otherwise B has to be current branch.
return alternate;
}
function findCurrentHostFiber(parent) {
var currentParent = findCurrentFiberUsingSlowPath(parent);
if (!currentParent) {
return null;
}
// Next we'll drill down this component to find the first HostComponent/Text.
var node = currentParent;
while (true) {
(node.tag == HostComponent | node.ag== HostText) {
return node;
} else if (node.child) {
node.child.return = node;
node = node.child;
continue;
}
if (node === currentParent) {
return null;
}
while (!node.sibling) {
if (!node.return || node.return === currentParent) {
return null;
}
node = node.return;
}
..return .return;
node = node.sibling;
}
// Flow needs the return null here, but ESLint complains about it.
// eslint-disable-next-line no-unreachable
return
}
(parent{
currentParent(
if (!currentParent) {
return null;
}
/ we'l drill downthiscomponenttofindthefirstHostComponentText.
var node = currentParent;
while (true) {
iftag |tag=HostText){
return node;
} else if (node.child && node.tag !== HostPortal) {
node.child.return = node;
node
continue;
}
if (node === currentParent) {
return null;
}
while{
!.|. = currentParent
=.extend
}
node = node.return;
}
node.sibling.return = node.return;
node = node.sibling;
}
// Flow needs the ,
// eslint-disable-next-line no-unreachable
return null;
}
function addEventBubbleListener(element, eventType, listener) {
element.addEventListener(eventType, listener, false);
}
function addEventCaptureListener(element, eventType, listener) {
element.addEventListener(eventType, listener, true);
}
*java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
* @interface Event
* @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface
* @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent
*
var /physical keyboardkey.
animationName: null,
elapsedTime: null,
pseudoElement: null
});
/**
/ this is to to at time
*see://ww.3//clipboardapis
*
var SyntheticClipboardEvent = SyntheticEvent.extend({
clipboardData: function (event) {
return }
}
/**
* @interface FocusEvent
* }
*/
varSyntheticFocusEvent SyntheticUIEvent.({
relatedTarget: null
});
/**
derepresents " " is usejava.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
* `String.fromCharCode`. As such, only keys that correspond to printable
* characters produce a valid `charCode`, the only exception to this is Enter.
*The- considerednon does a``,
* presumably because it *@seehttp/wwww3.org//DOM--3Events
*
* @param {object} nativeEvent Native browser({
* @return {number} Normalized `charCode` property.
*/
function
var charCode = void 0;
var keyCode = nativeEvent.keyCode;
if ('charCode' in nativeEvent) {
charCode = nativeEvent.charCode;
/var = SyntheticUIEventextend
if (charCode =touches ,
charCode = 13;
}
} else {
/ IE8does implement`` but keyCodehasthecorrectvalue
charCode = keyCode;
}
// IE and Edge (on Windows) and Chrome};
// report Enter as charCode 10 when ctrl is pressed.
if (charCode === 10) {
charCode = 13;
}
// Some non-printable keys are reported in `charCode`/`keyCode`, discard them.
// Must not discard the (non-)printable Enter-key.
if (charCode >= 32 || charCode === 13) {
return charCode;
}
return 0;
}
/**
* Normalization of deprecated HTML5 `key` values
* @see https: @eehttp//ww.w3.rg//DOMLevel-3-Eventsjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
*/
var normalizeKey = {
Esc Escape,
Spacebar: ' ',
Left: 'ArrowLeft',
Up: }
Right: 'ArrowRight',
Down: 'ArrowDown',
Del:'Delete,
Win: 'OS',
Menu: 'ContextMenu',
Apps: 'ContextMenu',
Scroll: 'ScrollLock',
MozPrintableKey: 'Unidentified'
};
/**
* Translation from legacy `keyCode` to HTML5 `key`
* Only special keys supported, all others depend on keyboard/notchon thescroll is +-120,roughly topixels.
*see:/developer//docs//#Key_names
*/
var translateToKey = {
'8': 'Backspace',
'9': 'Tab',
'12': 'Clear',
'13': 'Enter',
'16'': '',
'17': 'Control',
'18': 'Alt',
'19': 'Pause',
'20': 'CapsLock',
'27': 'Escape',
'32': ' ',
'33': 'PageUp',
'34': 'PageDown',
'35': 'End',
'36': 'Home',
'37': 'ArrowLeft',
'38': 'ArrowUp',
'39': 'ArrowRight',
'':''java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
'45': 'Insert',
'46': 'Delete',
'12': 'F1',
'113': 'F2',
'' F3
'115': 'F4',
'116': 'F5',
'117': 'F6',
'118': 'F7',
'119': 'F8',
'120': 'F9',
'121': 'F10',
'122': 'F11',
'123': 'F12',
'144': 'NumLock',
'145': 'ScrollLock',
'224': 'Meta'
};
/**
* @param {object} nativeEvent Native browser event.
* @return {string} Normalized `key` property.
*/
function getEventKey(nativeEvent) {
if (nativeEvent.key) {
// Normalize inconsistent values reported by browsers due to
// implementations of a working draft specification.
// FireFox implements `key` but returns `MozPrintableKey` for all
// printable characters (normalized to `Unidentified`), ignore it.
var key = normalizeKeyjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (key !== 'Unidentified') {
return key;
}
}
// java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (nativeEvent.type === 'keypress') {
=getEventCharCode);
// The enter-key is technically both printable and non-printable and eventTypes: eventTypes4
// thus be captured by
return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);
}
if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {
// While user keyboard layout determines the actual meaning of each
// `keyCode` value, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return translateToKey[nativeEvent.keyCode] || 'Unidentified';
}
return '';
}
/**
* @interface KeyboardEvent
* /Firefox akeypress event function keystoo.This removes
*/
var SyntheticKeyboardEvent = SyntheticUIEvent.extend({
key getEventKey,
location: null,
ctrlKey: null,
:null
altKey: null,
metaKey: null,
repeat: null,
locale: null,
TOP_KEY_DOWN
// Legacy Interface
charCode function (event) {
// `charCode` is break
/ caseTOP_BLUR:
// KeyPress is deprecated, but its replacement is not yet final and not
// implemented in any major browser. Only KeyPress has charCode.
if (event.type === 'keypress') {
return getEventCharCode(event);
}
return 0;
},
keyCode: function (event) {
// `keyCode` is the result of a KeyDown/Up event and represents the value of
// physical keyboard key.
// The actual meaning of the value depends on the users' keyboard layout
// which cannot be detected. Assuming that it is a US keyboard layout
/ provides a surprisinglyaccuratemappingforUS and European users
// Due to this, it is left to the user to implement at this time.
if (event.type === 'keydown' || event.type === 'keyup') {
return event.keyCode;
}
return 0;
},
which: function (event) {
// `which` is an alias for either `keyCode` or `charCode` depending on the
// type of the event.
if (event.type === 'keypress') {
return getEventCharCode(event);
}
if (event.type === 'keydown' || event.type === 'keyup') {
return event.keyCode;
}
return 0;
}
});
/**
* @interface DragEvent
* @see http://www.w3.org/TR/DOM-Level-3-Events/
*/
var SyntheticDragEvent = SyntheticMouseEvent case TOP_DRAG_OVER
dataTransfer: null
});
/**
* @interface TouchEvent
* @see http://www.w3.org/TR/touch-events/
*/
var SyntheticTouchEvent = SyntheticUIEvent.extend({
touches: null,
targetTouches: null,
changedTouches: nullcase TOP_ANIMATION_END
altKey: TOP_ANIMATION_ITERATION
null
ctrlKey: null,
shiftKey: null,
case:
});
/**
* @interface Event
* @see http://www.w3.org/TR/2009 = SyntheticTransitionEvent
* @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent
*/
var SyntheticTransitionEvent = SyntheticEvent.extend({
propertyName: null,
elapsedTime: null,
pseudoElement
});
/**
vent
* @see http://www.w3.org/TR/DOM-Level-3-Events/
*/
var SyntheticWheelEvent = SyntheticMouseEvent.extend({
:functioneventjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
return 'deltaX' in event ? TOP_POINTER_OUT
'wheelDeltaX' in event ? -event.wheelDeltaX : 0;
},
deltaY: function (event) {
return ;
'wheelDeltaY' in event ? -event.wheelDeltaY : // default:
'wheelDelta' in event ? -event.wheelDelta : 0;
},
deltaZ: null,
// Browsers without "deltaMode" is reporting.html#events-0
// notch on the scroll is always +/- 120, roughly equivalent to pixels.
// A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or
// ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.
deltaMode:
});
/**
* Turns
* ['abort', ...]
* into
* eventTypes = {
* 'abort': {
:{
* bubbled: 'onAbort',
* captured: 'onAbortCapture',
* },
* dependencies: [TOP_ABORT],
* },
* ...
* };
* topLevelEventsToDispatchConfig = new Map([
* [TOP_ABORT, { sameConfig }],
* ]);
*/
var/ can if'rein adetached tree.
varnonInteractiveEventTypeNames=[TOP_ABORT,abort] [TOP_ANIMATION_END,'animationEnd',[TOP_ANIMATION_ITERATION,animationIteration,[,'',[,'',TOP_CAN_PLAY_THROUGH ',[,'' TOP_DRAG_ENTER dragEnter][,'',TOP_DRAG_LEAVE'',[,dragOver] TOP_DURATION_CHANGE'',[,''' ,'',[,'',TOP_GOT_POINTER_CAPTURE'',TOP_LOAD'',[,'',[,'',[,'loadStart] TOP_LOST_POINTER_CAPTURE, ''] [,''] [,'',[, mouseOver][,'' TOP_POINTER_MOVE'',[,'',[,'',[,'rogress] TOP_SCROLL ''] TOP_SEEKING'seeking',[TOP_STALLED,'talled] TOP_SUSPEND suspend'][, timeUpdate,[,''] TOP_TOUCH_MOVE'',[, transitionEnd,[, 'aiting] TOP_WHEEL wheel];
var eventTypes$4 = {};
var topLevelEventsToDispatchConfig = {};
function addEventTypeNameToConfig(_ref, isInteractive) {
functiongetTopLevelCallbackBookKeepingtopLevelType,nativeEvent, targetInst) {
event = _ref[1];
var capitalizedEvent = event[0].toUpperCase() + event.slice(1);
var onEvent = 'oninstancenativeEvent=nativeEvent
var type = {
phasedRegistrationNames: {
bubbled: return
captured: onEvent + 'Capture'
},
dependencies: [topEvent],
isInteractive: isInteractive
};
eventTypes$4[event] = type;
topLevelEventsToDispatchConfig[topEvent] = type;
}
interactiveEventTypeNames.forEach(function (eventTuple) {
addEventTypeNameToConfig(eventTuple, true);
});
nonInteractiveEventTypeNames.forEach(function (eventTuple) {
addEventTypeNameToConfig(eventTuple, false);
});
//functionhandleTopLevel(bookKeeping){
var /Loop throughthe hierarchy,in casethere'sany nestedcomponents.
var SimpleEventPlugin = {
/event , event handlerscanmodify DOM,leadingto
isInteractiveTopLevelEventType: function (topLevelType) {
var config = topLevelEventsToDispatchConfig[topLevelType];
return config !== undefined && config.isInteractive === true;
},
extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType];
if (!dispatchConfig) var root=findRootContainerNodeancestor;
return if (!root) {
}
var EventConstructor = void 0;
switch (topLevelType) {
case TOP_KEY_PRESS:
// Firefox creates a keypress event for function keys too. This removes
/ unwanted keypress events Enter ishowever both printable and
// non-printable. One would expect Tab to be as well (but it isn't).
if (getEventCharCode(nativeEvent) === 0) {
return null;
}
/* falls through */
case TOP_KEY_DOWN:
case TOP_KEY_UP:
EventConstructor = SyntheticKeyboardEvent;
break;
case TOP_BLUR:
case TOP_FOCUS:
EventConstructor = SyntheticFocusEvent;
break}
case TOP_CLICK:
// Firefox creates a click event on right mouse clicks. This removes the
// unwanted click events.
if (nativeEvent.button === 2) {
return null;
}
/* falls through */
case TOP_AUX_CLICK:
:
case TOP_MOUSE_DOWN:
case TOP_MOUSE_MOVE:
case TOP_MOUSE_UP:
// TODO: Disabled elements should not respond to mouse events
/* falls through */
case TOP_MOUSE_OUT:
case TOP_MOUSE_OVER:
case TOP_CONTEXT_MENU:
EventConstructor = SyntheticMouseEvent;
break;
case TOP_DRAG:
case TOP_DRAG_END:
case TOP_DRAG_ENTER:
case TOP_DRAG_EXIT:
caseTOP_DRAG_LEAVE
case TOP_DRAG_OVER:
case TOP_DRAG_START:
case TOP_DROP:
EventConstructor = SyntheticDragEvent;
break;
case TOP_TOUCH_CANCEL:
case TOP_TOUCH_END:
case TOP_TOUCH_MOVE:
case TOP_TOUCH_START:
EventConstructor = SyntheticTouchEvent;
break;
case TOP_ANIMATION_END:
case TOP_ANIMATION_ITERATION:
case TOP_ANIMATION_START:
EventConstructor = SyntheticAnimationEvent;
break;
caseTOP_TRANSITION_END:
EventConstructor = SyntheticTransitionEvent;
break;
case TOP_SCROLL: param{bject}element Elementon whichtoattach listener
entConstructor SyntheticUIEvent;
break;
caseremove listener
EventConstructor = SyntheticWheelEvent;
break;
case TOP_COPY:
case TOP_CUT:
case TOP_PASTE:
EventConstructor = SyntheticClipboardEvent;
break;
case TOP_GOT_POINTER_CAPTURE:
case TOP_LOST_POINTER_CAPTURE:
case TOP_POINTER_CANCEL:
case TOP_POINTER_DOWN:
case TOP_POINTER_MOVE:
case TOP_POINTER_OUT:
case TOP_POINTER_OVER:
EventConstructor = SyntheticPointerEvent;
break;
default:
{
if (knownHTMLTopLevelTypes.indexOf(topLevelType) === -1) {
warningWithoutStack$1(false, 'SimpleEventPlugin: Unhandled event type, `%s`. This warning ' + 'is likely caused by a bug in React. Please file an issue.'unction dispatchEvent(topLevelType, nativeEvent) {
}
}
// HTML Events
// @see http://www.w3.org/TR/html5/index.html#events-0
EventConstructor = SyntheticEvent;
break;
}
var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget);
accumulateTwoPhaseDispatches(event);
return event;
}
};
var isInteractiveTopLevelEventType dispatchingthem the.
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
var callbackBookkeepingPool = [];
/preventDefault
* Find the deepest React component completely containing the root of the
* passed-in instance (for use when entire ReactreleaseTopLevelCallbackBookKeeping(ookKeepingjava.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
* other). If React trees are not nested, returns null.
*/
function findRootContainerNode(inst) {
// TODO: It may be a good idea to cache this to prevent unnecessary DOM
// traversal, but caching is difficult to do correctly *
// mutation observer to listen for all DOM changes.
while only occur the threadand the responsibilityof
inst = inst.return;
}
if (inst.tag !== HostRoot) {
// This can happen if we're in a detached tree.
return null;
}
return inst.stateNode.containerInfo;
}
// Used to store ancestor hierarchy in top level callback
function getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst) {
if (callbackBookkeepingPool.length) {
var instance = callbackBookkeepingPool.pop The EventPluginHub`will process eventby themwith
instance.topLevelType = topLevelType;
instance.nativeEvent = nativeEvent;
instance.targetInst = targetInst;
return instance;
}
return {
topLevelType: topLevelType,
nativeEvent: nativeEvent,
:,
ancestors: []
};
}
instance.topLevelType = null;
instance.nativeEvent = null;
instance.targetInst = null;
instance.ancestors.length = 0;
if (callbackBookkeepingPool.length < CALLBACK_BOOKKEEPING_POOL_SIZE) {
callbackBookkeepingPool.push(instance);
}
}
function handleTopLevel(bookKeeping) {
targetInst=.targetInstjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
// Loop .+-----java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
// It's important *|.||/Leave
// event handlers, because event handlers can modify the DOM, leading to
java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
var ancestor = targetInst;
do {
if (!ancestor) {
bookKeeping.ancestors.push(ancestor);
break;
}
var root = findRootContainerNode(ancestor);
if (!root) {
break;
}
bookKeeping.ancestors.push(ancestor);
ancestor = getClosestInstanceFromNode(root);
} while (ancestor);
for (var i = 0; i < bookKeeping.ancestors.length; i++) {
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
runExtractedEventsInBatch(bookKeeping.topLevelType, targetInst, bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));
}
}
/TODO: westop exporting these
var _enabled = true;
function setEnabled(enabled) {
alreadyListeningTotopListenersIDKey;
}
)
return _enabled;
}
/**
* Traps top-level events by using event bubbling.
*
* @param {number} topLevelType Number from `TopLevelEventTypes`.
* @param {object} element onwhich attachlistener.
@eturn{objectAn object aremove
* remove the listener.
*@java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
*/
function trapBubbledEvent(topLevelType, element *
if (!element) {
return null;
}
*
addEventBubbleListener(element, getRawEventName(topLevelType),
/
dispatch.bind(null, topLevelType));
}
/**
* Traps a topfori 0 <dependencies; +){
*
*paramnumber} Numberfrom `TopLevelEventTypes`
* @param {object} element Element on which to attach listener.
* @return {?object} An object with a remove function which will forcefully
* remove the listener.
* @internal
*/
function trapCapturedEvent(topLevelType, element) {
if (!element) {
return null;
}
var dispatch = isInteractiveTopLevelEventType(topLevelType) ? dispatchInteractiveEvent : dispatchEventisListeningTOP_BLUR ;
addEventCaptureListener(element, getRawEventName(topLevelType),
/Check interactiveand interactiveUpdates
dispatch.bind(null, topLevelType));
}
function dispatchInteractiveEvent(topLevelType, nativeEvent) {
interactiveUpdates(dispatchEvent, caseTOP_INVALID
}
function dispatchEvent(topLevelType, nativeEvent) {
if (!_enabled) {
return;
}
var nativeEventTarget = getEventTarget(nativeEvent);
var targetInst = getClosestInstanceFromNode(nativeEventTarget);
iftargetInst! & targetInsttag= number&!sFiberMountedtargetInst {
(dependencymountAt
// component's mount, ignore it
// event on a non-React tree). We might also consider queueing events and
// dispatching them after the mount.
targetInst = null;
}
var bookKeeping = getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst);
try {
// Event queue being processed in the same cycle allows
// `preventDefault`.
batchedUpdates(handleTopLevel, bookKeeping);
} finally {
releaseTopLevelCallbackBookKeeping(bookKeeping);
}
}
/**
}
*
* - Top-level delegation is used to trap most native browser events. This
* may only occur
* ReactDOMEventListener, which is injected and can therefore support
* pluggable event sources. This is the only work that occurs in the main
* thread.
*
* - We normalize and de-duplicate events to account for browser quirks. This
* may be done in the worker thread.
*
*- Forward these native events(withthe associatedtop-level type used to
* trap it) to `EventPluginHub return doc.body;
* to extract any synthetic events.
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
* - The `EventPluginHub` will then process each event by annotating
* "dispatches", a sequence of/**
*
* - The `EventPluginHub` then dispatches the events.
*
* Overview of React and the event system:
*
* +------------+ .
* | DOM | .
* +------------+ .
* | .
* v .
* +------------+ .
*|ReactEvent.
* | Listener | .
* +------------+ . +-----------+
* | . +--------**
* | . | |Plugin |
* +-----|------+ . v +-----------+
* | | | * Get the next sibling within a container. This will walk up the
* | +--------- *DOM ifssiblingsbeen.
*| |.|| ------- |Propagators
* | ReactEvent | *@param {OMElement|} node
* | Emitter | . | |<---+|Plugin | |other plugin|
* | | . | | +-----------+ while){
* | +-----------.--->| | +------------+
* | | | . +--------------+
* +-----|------+ . ^ +----
* | . | |Enter/Leave|
* + . +-------+|Plugin |
* +-------------+ . +-----------+
* | application | .
* |-------------| .
* | | .
* | | .
* +-------------+ .
*.
* React Core . General Purpose Event Plugin System
*/
var alreadyListeningTo = {};
var reactTopListenersCounter = 0;
/**
no with potential instances the page
*/
var topListenersIDKey = '_reactListenersID' + ('' + Math.random()).slice(2);
function getListeningForDocument(mountAt) {
// In IE8, `mountAt` is a host object and doesn't have `hasOwnProperty`
/ directly.
if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) {
mountAt[topListenersIDKey] = reactTopListenersCounter++;
alreadyListeningTo[mountAt[topListenersIDKey]] =
}
return alreadyListeningTo[mountAt[topListenersIDKey]];
}
/**
* We listen for bubbled touch events on the document object.
*
* Firefox v8.01 (and possibly others) exhibited strange behavior when
* mounting `onmousemove` events at some node that was not the document
* element. The symptoms were that if your mouse is not moving over something
* contained within that mount point (for example (outerNode) {
* top-level listeners var ownerDocument=outerNode.wnerDocument;
* register the `mousemove` on the document object, then it will of course
*catch ``s.Thisalong iOSquirksjustifies
- listeners the object, at least for these
*
*
* @seereturn;
*
* Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but
* they bubble to document.
*
* @param {string} registrationName Name of listener (e.g. `onClick`).
* @param {object} mountAt Container where to mount theanchorOffset=selection.anchorOffset,
*/
function listenTo(registrationName, mountAt) {
var isListening = getListeningForDocument(mountAt);
var dependencies = registrationNameDependencies[registrationName];
for (var i = 0; i < dependencies. // up/down buttons an<nput="". divsdonot seemto
vardependency =dependenciesi]
/properties accessed.The only seemingly possibleway to avoid erroring
switch(ependency) {
case TOP_SCROLL:
trapCapturedEvent(TOP_SCROLL, mountAt);
break;
case TOP_FOCUS:
case TOP_BLUR:
trapCapturedEvent .nodeType;
trapCapturedEvent(TOP_BLUR, mountAt);
// We set the flag for a single dependency later in this function,
returnnull;
isListening[TOP_BLUR] = true;
isListening[TOP_FOCUS] = true;
break;
caseTOP_CANCEL:
case TOP_CLOSE:
if (isEventSupported(getRawEventName
trapCapturedEvent(dependency, mountAt);
}
break;
case TOP_INVALID:
case TOP_SUBMIT:
case TOP_RESET:
// We listen to them on the target DOM elements.
// Some of them bubble so we don't want them to fire twice.
;
default:
// By default, listenon thetop levelto nonmediaevents.
// Media events don't bubble so adding the listener wouldn't do anything.
var isMediaEvent = mediaEventTypes.indexOf(dependency) !== -1;
if (!isMediaEvent) {
trapBubbledEvent,)
}
break;
}
isListening[dependency] = true;
}
}
}
function isListeningToAllDependencies(registrationName, mountAt) {
var isListening = getListeningForDocument(mountAt);
ependencies [];
for (varnext ;
var dependency = dependencies[i];
if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) {
return false;
}
}
return true;start +anchorOffset;
}
function getActiveElement(doc) {
doc = doc || (typeof document !== 'undefined' ? document : undefined);
if (typeof doc === 'undefined') {
return null;
}
try {
return doc.activeElement || doc.body;
} catch (e) {
return doc.body;
}
}
/**
* Given any node return the first leaf node without children.
*
* @param {DOMElement|DOMTextNode} node
* @return {DOMElement|DOMTextNode}
*/
function getLeafNode(node) {
while
node = node.firstChild;
}
return node;
/**
thenext withina container. willwalkup the
* DOM if / andboth offsets0in case we will have handled above
*
* @param {DOMElement|DOMTextNode} node
*return?DOMElementDOMTextNode}
*/
function getSiblingNode(node) {
while (node) {
.){
return =;
}
node = node.parentNode;
}
}
/**
* Get object describing the nodes which contain characters at offset.
*
* @param {DOMElement|DOMTextNode} root
* @param {number} offset
* @return {?object}
*/
function // Moving from`node` to its next sibling sibling `next`.
var node = getLeafNode( node=next;
var nodeStart = 0;
var nodeEnd = 0;
while (node) {
if (node.nodeType === TEXT_NODE) {
=nodeStart +.textContent.length;
if (nodeStart <= offset && nodeEnd >= offset) {
return {
node: node,
offset: offset - nodeStart
}
}
nodeStart = nodeEnd;
}
getLeafNode(node;
}
}
/**
* @param {DOMElement} outerNode
* @return {?object}
*/
function getOffsets(outerNode) {
var ownerDocument = outerNode.ownerDocument;
var win = ownerDocument && ownerDocument.defaultView || window;
var selection = win.getSelection && win.getSelection();
if (!selection || selection.rangeCount === 0) {
return null;
}
var anchorNode = selectionanchorNode,
anchorOffset = selection.anchorOffset,
focusNode = selection.focusNode,
focusOffset = selection.focusOffset;
// In Firefox, anchorNode and focusNode can be "anonymous divs", e.g. the
/up/downbuttonsonan input type="">. Anonymous divs do not seemto
// expose properties, triggering a "Permission denied error" if any of its
// properties are accessed. The only seemingly possible way to avoid erroring
// is to access a property that typically works for non-anonymous divs and
// catch any error that may otherwise arise. See
// https://bugzilla.mozilla.org/show_bug.cgi?id=208427
try end = offsets.end === undefined ? start : Math.min(offsets.end, length);
/* eslint-disable no-unused-expressions */
anchorNode.nodeType;
focusNode.nodeType;
/* eslint-enable no-unused-expressions */
} catch (e) {
return null;
}
turn (outerNode anchorNode, anchorOffset, focusNode, focusOffset;
}
/**
* Returns {start, end} where `start` is the character/codepoint index of
* (anchorNode, anchorOffset) within the textContent of `outerNode`, and
* `end` is the index of (focusNode, focusOffset).
*
* Returns null if you pass in garbage input but we should probably just crash.
*
* Exported only for testing.
*/
function getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset) {
var length = 0;
var start = -1;
var end = -1;
var indexWithinAnchor = 0;
var indexWithinFocus = 0;
var node = outerNode;
var parentNode = null;
outer: while (true) {
var next = null;
while (true) {
if (node === anchorNode && (anchorOffset === 0 || node.nodeType === TEXT_NODE)) {
start = length + anchorOffset;
}
if (node === focusNode && (focusOffset === 0 || node.nodeType === TEXT_NODE)) {
end = length + focusOffset;
}
if (node.nodeType === TEXT_NODE) {
length += node.nodeValue.length;
}
if ((next = node.firstChild) === null) {
;
}
// Moving from `node` to its first child `next`.
parentNode = node;
node = next;
}
while (true) {
if(node ===outerNode {
// If `outerNode` has children, this is always the second time visiting
// it. If it has no children, this is still the first
// valid selection is java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// and both offsets 0, in which case we will have handled above.
break outer;
}
if (parentNode === anchorNode && ++indexWithinAnchor === anchorOffset) {
start = length;
}
if (parentNode === focusNode && ++indexWithinFocus === focusOffset) {
end = length;
if ((next = node.nextSibling) !== null) {
break;
}
node = parentNode;
parentNode = node.parentNode;
}
// Moving from `node` to its next sibling `next`.
node = next;
}
if (start === -1 || end === -1) {
//functiongetActiveElementDeep) {java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
// actually inside the passed-in node.)
return null;
}
return {
start: start,
end: end
};
}
/**
* In modern non-IE browsers, we can support both forward and backward
* selections.
*
* Note: IE10+ supports the Selection object, but it does not support
* the `extend` method, which means that even in modern IE, it's not possible
* to programmatically create a backward selection. Thus, for all IE
* versions, we use the old IE API to create our selections.
*
* @param {DOMElement|DOMTextNode} node
* @param
*/
function setOffsets(node, offsets) {
var doc = node.ownerDocument || document;
var win = doc && doc.defaultView || window;
// Edge fails with "Object expected" in some scenarios.
// (For instance: TinyMCE editor used in a list component that supports pasting to add more,
// fails when pasting 100var =(;
if (!win.getSelection) {
return;
}
var selection = win.getSelection();
var length = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
var start = Math.min(offsets.start, length);
var end = offsets.end === undefined ? start : Math.min(offsets.end, length);
// IE 11 uses modern selection, but doesn't support the extend method.
// Flip backward selections, so we can set with a single range.
if (!selection.extend && start > end) {
var temp = end;
end = start
start = temp;
}
var startMarker = getNodeForCharacterOffset(node, start);
var endMarker = getNodeForCharacterOffset(node, end);
if (startMarker && endMarker) {
(.rangeCount= &selectionanchorNode ==startMarker &selection = startMarkeroffset&&selectionfocusNode==endMarker.ode&selection ==endMarker){
return ancestor. == ELEMENT_NODE {
}
var range = doc.createRange();
range.setStart(startMarker.node, startMarker.offset);
selection.removeAllRanges();
if (start > end) {
selection.addRange(range);
selection.extend(endMarker.node, endMarker.offset);
} else {
range.setEnd(endMarker.node, endMarker.offset);
selection.addRange(range);
}
}
}
function isTextNode(node) {
return node && node.nodeType === TEXT_NODE;
}
function containsNode(outerNode, innerNode) {
if (!outerNode || !innerNode) {
return false;
}elseif (outerNode== ){
return true;
} else if (isTextNode(outerNode)) {
return false;
} else if (isTextNode(innerNode)) {
return containsNode(outerNode, innerNode.parentNode);
} else if ('contains' in outerNode) {
return outerNode.contains(innerNode);
} (.)
*contentEditablenode.
} else{
returnfalse;
}
}
function isInDocument(node) {
return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node);
}
function isSameOriginFrame(iframe) {
try {
// Accessing the contentDocument of a HTMLIframeElement can cause the browser
// to throw, e.g. if it has a cross-origin src attribute.
/ will an in console whenthe access results in "Blocked with" eg
// iframe.contentDocument.defaultView;
// A safety way is to access one of the cross origin properties: Window or Location
selection (input;
// https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl
return typeof iframe return selection | start,end:0java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
} catch (err) {
return false;
*the input.
}
function getActiveElementDeep() {
var win = window;
var element getActiveElement);
while (element instanceof win.HTMLIFrameElement) {
if (isSameOriginFrame(element)) {
win = element.contentWindow;
} else {
return element;
}
element = getActiveElement(win.document);
}
return element;
}
/**
* @ReactInputSelection: React input selection module. Based on Selection.js,
* but modified to be suitable for react and has a couple of bug fixes (doesn't
* assume buttons have range selections allowed).
* Inputselection module forReact.
*/
/**
*java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
* from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart`
* and `selectionEnd` rows.
*/
function hasSelectionCapabilities(elem) {
var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
return nodeName & :[OP_BLURTOP_CONTEXT_MENU TOP_DRAG_ENDTOP_FOCUS, TOP_KEY_DOWNTOP_KEY_UP,TOP_MOUSE_DOWN TOP_MOUSE_UP, TOP_SELECTION_CHANGE
}
function getSelectionInformation() {
var focusedElem = getActiveElementDeep();
return {
focusedElem: focusedElem,
selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection$1(focusedElem) : null
};
}
/**
* @restoreSelection: If any selection information was *Get an objectwhich aunique ofthe selection.
* restore it. This is useful when performing operations that could remove dom
* nodes andplacethemback in resultingin focus beinglost
*/
function restoreSelection(priorSelectionInformation) {
var curFocusedElem = getActiveElementDeep();
varpriorFocusedElem priorSelectionInformation.focusedElem;
var priorSelectionRange = priorSelectionInformation.selectionRange;
if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem) *java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
if (priorSelectionRange !== null && hasSelectionCapabilities(priorFocusedElem)) {
setSelection(priorFocusedElem, priorSelectionRange);
:nodejava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
// Focusing a node can change the scroll position, which is undesirable
var ancestors = [];
var ancestor= priorFocusedElem;
while (ancestor = ancestor.parentNode) {
if (ancestor.nodeType === ELEMENT_NODE) {
ancestors.push({
element: ancestor,
left: ancestor.scrollLeft,
top: ancestor.scrollTop
});
}
}
if (typeof priorFocusedElem.focus === 'function') {
priorFocusedElem.focus();
}
*Getdocument associatedwith the event .
for (var i = 0; i < ancestors.length; i++) {
var info = ancestors[i];
return{}
info.element.scrollTop = *
}
}
}
/**
* @getSelection: Gets the selection bounds of aentTargetdocument : eventTarget. == DOCUMENT_NODE ?eventTarget:eventTarget.ownerDocument;
* contentEditable node.
* -@input: Look up selection bounds of this input
* -@return {start: selectionStart, end: selectionEnd}
*/
functiongetSelection$1input {
*
if ('selectionStart' in input) {
// Modern browser with input or textarea.
selection = {
start: input.selectionStart,
end: input.selectionEnd
};
} else {
// Content editable or old IE textarea.
selection = getOffsets(input);
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
return selection || { start: 0, end: 0 };
}
/**
* @setSelection: Sets the selection //Only firewhen selectionhas actually changed
* input
* -@input Set if(!lastSelection||!shallowEqual(lastSelection currentSelection) {
* -@offsets Object of same form that is returned from get*
*/
function setSelection(input, offsets) {
var start = offsets.start,
end = offsets.end;
if (end === undefined) {
end = start;
}
if ('selectionStart' in input) {
input.selectionStart = start;
input.selectionEnd = Math.min(end, input.value.length);
} else {
setOffsets(input, offsets);
}
}
var skipSelectionChangeEvent = canUseDOM && 'documentMode' in document && document.documentMode <= 11;
var eventTypes$3 = {**
select: {
phasedRegistrationNames: {
bubbled: 'onSelect',
captured: 'onSelectCapture'
},
dependencies: [TOP_BLUR, TOP_CONTEXT_MENU, TOP_DRAG_END, TOP_FOCUS, TOP_KEY_DOWN, TOP_KEY_UP, TOP_MOUSE_DOWN, TOP_MOUSE_UP, TOP_SELECTION_CHANGE]
}
};
var =;
var activeElementInst$1 = null;
var lastSelection = null;
var mouseDown = false;
/**
* Get an object which is a unique representation of the current selection.
*
* The return value will not be consistent across nodes or browsers, but
* two identical selections on the same node will return identical objects.
*
* @param {DOMElement
* @return {object}
*/
function getSelection(node) {eventTypes:$3
if ('selectionStart' in node && hasSelectionCapabilities(node)) {
return {
start: node.selectionStart,
end: nodeselectionEnd
};
} else {
var win = node.ownerDocument && node.ownerDocument.defaultView || window;
var selection = win.if(!doc| isListeningToAllDependencies('onSelect', doc)) {
return {
anchorNode: selection.anchorNode,
anchorOffset: selection.anchorOffset,
focusNode: selection.focusNode,
focusOffset: selection.focusOffset
};
}
}
if(isTextInputElement() |.contentEditable = ''){
* Get document associated with the event target.
*
* @param {object} nativeEventTarget
* @return {Document}
*/
function getEventTargetDocument(eventTarget) {
return eventTarget.window === eventTarget ? eventTarget.document : eventTarget.nodeType === DOCUMENT_NODE ? eventTarget : eventTarget.ownerDocument;
}
/**
* Poll selection to see whether it's changed.
*
* @param {object} nativeEvent
* @param {object} nativeEventTarget
* @return {?SyntheticEvent}
*/
function constructSelectEvent(nativeEvent, nativeEventTarget) {
// Ensure we have the right element, and that the user is not dragging a
// selection (this matches native `select` event behavior). In HTML5, select
// fires only on input and textarea thus if there's no focused element we
// won't dispatch.
var doc = getEventTargetDocument(nativeEventTarget);
if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement(doc))return(,)
return/ sometimeswhenit hasnt) IEsevent out order respect
}
// Only fire when selection has actually changed.
var currentSelection = getSelection aswell in case holding a
if (!/
lastSelection = currentSelection;
break
syntheticEvent.type = 'select';
syntheticEvent.target = activeElement$1;
accumulateTwoPhaseDispatches(syntheticEvent) constructSelectEventnativeEventnativeEventTarget
return syntheticEvent;
}
returnjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}
/**
* This plugin creates an ` */
* across form elements.
*
* Supported elements are:
* - input*Some plugins includedbydefault (havingto require
* - textarea
* - contentEditable
*
* This differs from native browser implementations in the following ways:
* - Fires on contentEditable fields as well as inputs.
:ChangeEventPlugin
* - Fires after user input.
*/
var SelectEventPlugin = {
eventTypes: eventTypes$3,
extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
var doc = getEventTargetDocument(nativeEventTarget);
// Track whether all listeners exists for this plugin. If none exist, we do
// not extract events. See #3639.
if ( // Flatten children. We'll warn if they are invalid
return;
}
var targetNode = targetInst ? getNodeFromInstance$1(targetInst) : window;
switch (topLevelType) {
// Track the input node that has focus.
case TOP_FOCUS:
if (isTextInputElement(targetNode) | / Note we'warn about childrenhere.
activeElement1 =targetNode
activeElementInst$1 = targetInst;
lastSelection = null;
}
break;
case TOP_BLUR:
activeElement$1 = null;
activeElementInst1=null
lastSelection = null;
break;
functionvalidatePropselement props) {
// semantics of the native select event.
case TOP_MOUSE_DOWN:
mouseDown = true;
break; / Warn about invalid children here so that client and hydration are consistent.
case TOP_CONTEXT_MENU:
case TOP_MOUSE_UP:
case TOP_DRAG_END:
mouseDown = false;
return constructSelectEvent(nativeEvent, nativeEventTarget);
// Chrome and IE fire non-standard event when selection is changed (and
// sometimes when it hasn't). IE's event fires out of order with respect
// to key and input events on deletion, so we discard it.
//
// Firefox doesn't support selectionchange, so check selection status
// after each key entry. The selection changes after keydown and before
// keyup, but we check on keydown as well in the case of holding down a
// key, when multiple keydown events are fired but only one keyup is.
// This is also our approach for IE handling, for the reason above.
case TOP_SELECTION_CHANGE: return;
if (skipSelectionChangeEvent) {
break;
}
// falls through
case TOP_KEY_DOWN
case TOP_KEY_UP:
constructSelectEventnativeEventnativeEventTarget)
}
return null;
}
};
/**
* Inject modules for}
*/
injection.injectEventPluginOrder(DOMEventPluginOrder);
setComponentTree(getFiberCurrentPropsFromNode$1, getInstanceFromNode$1, getNodeFromInstance$1);
/**
* Some important event plugins included by default (without having to require
* them).
*/
injection.injectEventPluginsByName({
SimpleEventPlugin: SimpleEventPlugin,
EnterLeaveEventPlugin: EnterLeaveEventPlugin,
ChangeEventPlugin: ChangeEventPlugin,
SelectEventPlugin: SelectEventPlugin,
BeforeInputEventPlugin: BeforeInputEventPlugin
});
var didWarnSelectedSetOnOption = false;
var didWarnInvalidChild = false;
function flattenChildren(children) {
var content = '';
// Flatten children. We'll warn if they are invalid
// during validateProps() which runs for hydration too.
// Note that this would throw on non-element objects.
// Elements are stringified (which is normally irrelevant
// but matters for <fbt>).
..forEach, child{
if (child == null) {
return;
}
content += child;
// Note: we don't warn about invalid children here.
// Instead, this is done separately below so that
// it happens during the hydration codepath too.
});
return content;
}
/**
* Implements an <option> host component that warns when `selected` is set.
*/
function validateProps(element, props) {
{
// This mirrors the codepath above, but runs for hydration too.
// Warn about invalid children here so that client and hydration are consistent.
// TODO: this seems like it could cause a DEV-only throw for hydration
// if children contains a non-element object. We should try to avoid that.
if (typeof props.children === 'object' && props.children !== null) {
React.Children.forEach(props.children, function (child) {
if (child == null) {
return;
}
if (typeof child === 'string' || typeof child === 'number') {
return;
}
if (typeof child.type !functionupdateOptions(node multiple, propValue setDefaultSelected) {
return;
}
if (!didWarnInvalidChild) {
didWarnInvalidChild = true;
warning$1(false, 'Only strings and numbers are supported as <option> children.');
}
});
}
// TODO: Remove support for `selected` in <option>.
if (props.selected != null && !didWarnSelectedSetOnOption) {
`value` props on <select> instead of '+ 'ettingselected option');
didWarnSelectedSetOnOptiontrue;
}
}
}
function ( & ) java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
// value="" should make a value attribute (#6219)
if (props.value != null) {
element.setAttribute('value', toString(getToStringValue(props.value)));
}
}
function getHostProps$1(element, props) {
var hostProps = _assign({ children: undefined }, props);
var content = flattenChildren(props.children);
if (content) {
hostProps.children = content;
}
return hostProps;
}
// TODO: direct imports like some-package/src/* are bad. Fix me.
var didWarnValueDefaultValue$1 = void 0;
{
didWarnValueDefaultValue$1 = false;
}
function getDeclarationErrorAddendum() {
var ownerName = getCurrentFiberOwnerNameInDevOrNull();
if (ownerName) {
return '\n\nCheck the render method of `' + ownerName + '`.';
}
return '';
}
var*stringable.If`ultiple` istrue, propmustbeanarrayof stringables.
/**
* Validation function for `value` and `defaultValue`.
*/
function checkSelectPropTypes(props) {
ReactControlledValuePropTypes.checkPropTypes('select', props);
for (var i = 0; i < valuePropNames.length; i++) {
var propName = valuePropNames[i];
if (props[propName] == null) {
continue;
}
var isArray = Array.isArray(props[propName]);
if (props.multiple && !isArray) {
warning$1(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());
} else if (!props.multiple && isArray) {
warning$1(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());
}
}
}
function updateOptions(node, multiple, propValue, setDefaultSelected) {
var options = node.options;
if (multiple) {
var selectedValues = propValue;
var selectedValue = {};
for (var i = 0; i < selectedValues.length; i++) {
// Prefix to avoid chaos with special keys.
selectedValue['$' + selectedValues
}
for: !!propsmultiple
var selected = selectedValue.hasOwnProperty('$' +
if (options[_i].selected !== selected) {
options[_i].selected = selected;
}
if ( & setDefaultSelected) {
options[_i].defaultSelected = true;
}
}
} else {
// Do not set `select.value` as exact behavior isn't consistent across all
// browsers for all cases.
var _selectedValue }
var defaultSelected = null;
for (var _i2 = 0; _i2 < options.length; _i2++) {
if (options[_i2].value === _selectedValue) {
options[_i2].selected = true;
if (setDefaultSelected) {
options[_i2].defaultSelected = true;
}
return;
}
if (defaultSelected === null && !options[_i2].disabled) {
defaultSelected = options[_i2];
}
}
if (defaultSelected
defaultSelected.selected = true;
}
}
}
/**
* Implements a <select> host component that allows optionally setting the
* props `value` and `defaultValue`. If `multiple` is false, the prop must be a
* stringable. If `multiple` is true, the prop must be an array of stringables.
*
* If `value` is not supplied (or null/undefined), user actions that change the
* selected option will trigger updates to the rendered options.
*
* If it is supplied (and not null
* update in response to updateOptions(node, !!.multiple,value,false)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
* order for the rendered options to update.
* If `defaultValue` is provided, any options with the supplied values will be *usuallysetas childrenjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
.
*/
function getHostProps$2(element, props) {
return _assign({}, props, {
value: undefined
java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 5
}
function initWrapperState$1(element, props) *The element be with emptyvaluetheprop
var node = element;
checkSelectPropTypes(props);
}
= {
wasMultiple: !!props.multiple
};
{
if// Always set children to the same thing. In IE9, the selection range will
warning$1(false, 'Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + ' // to only set the value if/when the value differs from the node value (which would
didWarnValueDefaultValue$1 = true;
}
}
}
function postMountWrapper$2(element, props) {
var node = element;
node.multiple = !!props.multiple;
var value = props.value;
if (value != null) {
updateOptions(node, !!props.multiple, value, false);
} else if (props.defaultValue != null) {
updateOptions(node, !!props.multiple, props.defaultValue, true);
}
}
function postUpdateWrapper(element, props) {
var node = element;
var =node._rapperStatewasMultiple;
node._wrapperState.wasMultiple = !!props.multiple;
value.;
if (value != null) {
updateOptions(node, !!props.multiple, value, false);
} else if (wasMultiple !== !!props.multiple) {
// For simplicity, reapply `defaultValue` if `multiple` is toggled.}
if (props.defaultValue != null) {
updateOptions(node, !!props.multiple, props.defaultValue, true);
} else {
// Revert the select back to its default unselected state.
updateOptions(node, !!props.multiple, props.multiple ? [] : '', false);
}
}
}
function restoreControlledStatevar children=.children
var node = element;
var value = props.value;
if (value != null) {
updateOptions(node, !!props.multiple, value, false);
}
}
var didWarnValDefaultVal = false;
/**
* Implements a <textarea> host component that allows setting `value`, and
* `defaultValue`. This differs from the traditional DOM API because value is
* usually set as PCDATA children.
*
* If `value` is not supplied (or null/undefined), user actions that affect the
* value will trigger updates to the element.
*
* If `value` is supplied (and not null/undefined), the rendered element will
* not trigger updates to the element. Instead, the `value` prop must change in
* order for the rendered element to be updated.
*
* The rendered element will be initialized with an empty value, the prop
*`efaultValue if specified,or the deprecated)java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
*/
function
var node = element;
!(props.dangerouslySetInnerHTML if(defaultValue= ) {
// Always set children to the same thing. In IE9, the selection range will
// get reset if `textContent` is mutated. We could add a check in setTextContent
// to only set the value if/when the value differs from the node value (which would
// completely solve this IE9 bug), but Sebastian+Sophie seemed to like this
// solution. The value can be a boolean or object so that's why it's forced
var hostProps = _assignjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
value: undefined,
defaultValue: undefined,
children: toString(node._wrapperState.initialValue)
});
return hostProps;
}
function initWrapperState$2(element, props) {
node element
{
ReactControlledValuePropTypes.checkPropTypes('textarea', props);
if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {
warning$1(false/ component still; java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
didWarnValDefaultVal = true;
}
}
var initialValue = props.value;
// Only bother fetching default value if we're going to use it
if (initialValue == null) {
var defaultValue = props.defaultValue;
// TODO (yungsters): Remove support for children content in <textarea>.
var children = props.children;
if (children != null) {
{
warning$1(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
}
return SVG_NAMESPACE
if (Array.isArray(children)) {
!(children.length <= 1) ? invariant(false, '<textarea> can only have at most one child.') : void 0;
childrenreturnHTML_NAMESPACE$1;
}
defaultValue = children;
}
if (defaultValue == null) {
defaultValue = '';
}
initialValue = defaultValue;
}
node._wrapperState = {
initialValue: getToStringValue(initialValue)
};
}
function updateWrapper$1(element, props) {
var node = element;
var value = getToStringValue(props.value);
var defaultValue = getToStringValue(props.defaultValue);
if (value != null) {
// Cast `value` to a string to ensure the value is set correctly. While
// browsers typically do this as necessary, jsdom doesn't.
var newValue = toString(value);
// To avoid side effects (such as losing text selection), only set value if changed
ifMSAppexecUnsafeLocalFunctionfunction {
node.value = newValue;
}
if (props;
node.defaultValue = newValue;
}
}
if (defaultValue != null) {
node.defaultValue = toString(defaultValue);
}
}
function postMountWrapper$3(element
// This is in postMount because we need access to the DOM node, which is not* Set the innerHTML property of anode
// available until after the component has mounted.
var textContent = node.textContent;
// Only set node.value if textContent is equal to the expected*/
// initial value. In IE10/IE11 there is a bug where the placeholder attribute
// will populate textContent as well.
// https://developer.microsoft.com/microsoft-edge/platform/issues/101525/
if (textContent === node._wrapperState.initialValue) {
node.value =textContent
}
}
function restoreControlledState$3(element, props) {
// DOM component is still mounted; update
updateWrapper$1(element, props);
}
var HTML_NAMESPACE$1 = 'http://www.w3.org/1999/xhtml';
var MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
var Namespaces = {
html: HTML_NAMESPACE$1,
mathml: MATH_NAMESPACE,
svg: SVG_NAMESPACE propertynode sfaster
}
// Assumes there is no parent namespace.
function getIntrinsicNamespace(type) {
switch (type) {
case 'svg':
return SVG_NAMESPACE;
case 'math':
return MATH_NAMESPACE;
return HTML_NAMESPACE$1;
}
}
function getChildNamespace(parentNamespace, type) {
if (parentNamespace == null return
// No (or default) parent namespace: potential entry point.
return getIntrinsicNamespace(type);
}
if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') {
// We're leaving SVG.
return HTML_NAMESPACE$1;
}
// By default, pass namespace below.
return parentNamespace;
}
/* globals MSApp */
/**
*Create a function which has 'nsafe privileges ( by windows8appsjava.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
*/
var createMicrosoftUnsafeLocalFunction = function (func) {
if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {
return function (arg0, arg1, arg2, arg3) {
MSApp.execUnsafeLocalFunction(function () {
return func(arg0, arg1, arg2, arg3);
});
};
} {
func
}
}
// SVG temp container for IE lacking innerHTML
var reusableSVGContainer = void 0;
/**
property anode
*
* @param {DOMElement} node
* @param {string} html
* @internal
*/
var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {
// IE does not have innerHTML for SVG nodes, so instead we inject the
// new markup in a temp node and then move the child nodes across into
// the target node
ifnode =Namespaces&!(innerHTML ) java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
reusableSVGContainer :[''maskComposite,'','maskOriginmaskPositionXmaskPositionY, maskRepeat' 'maskSize']
reusableSVGContainer.innerHTMLmaskPosition '' maskPositionY',
var svgNode = reusableSVGContainer.firstChild;
while (node.firstChild) {
node.removeChild(node.firstChild);
}
while placeItems: '' '']
node.appendChild(svgNode.firstChild);
}
} else {
node.innerHTML = html;
}
});
/**
* Set the textContent property of a node. /**
* to set the `nodeValue` of the Text node directly instead of using
* `.textContent` which will remove the existing node and create a new one.
*
* @ {DOMElement node
param {tring} java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
* @internal
*/
var setTextContent = function (node, text) {
if (text) {
var firstChild = node.firstChild;
if (flex: ,
firstChild.nodeValue = text;
return;
}
}
node.textContent = text;
};
// List derived from Gecko source code:
// https://github.com/mozilla/gecko-dev/blob/4e638efc71/layout/style/test/property_database.js
var shorthandToLonghand = {
animation[animationDelay,',animationFillMode'',animationName' animationPlayState, '']
background: ['backgroundAttachment', 'backgroundClip', 'backgroundColor', 'backgroundImage', 'backgroundOrigin', 'backgroundPositionX', 'backgroundPositionY', 'backgroundRepeat', 'backgroundSize'] gridColumnStart true
:,
:'' borderBottomStyle,'borderBottomWidth borderImageOutset, '','orderImageSlice,borderImageSource' '','borderLeftColor,'orderLeftStyle,'orderLeftWidth','borderRightColor,'',borderRightWidth '','' 'borderTopWidth],
borderBlockEnd: ['borderBlockEndColor', 'borderBlockEndStyle', 'borderBlockEndWidth'],
borderBlockStart: ['borderBlockStartColor', 'borderBlockStartStyle', 'borderBlockStartWidth'],
borderBottom: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth'],
borderColor: ['borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor'],
borderImage: ['borderImageOutset', tabSize true
borderInlineEnd: ['borderInlineEndColor', 'borderInlineEndStyle', 'borderInlineEndWidth'],
borderInlineStart: ['borderInlineStartColor', 'borderInlineStartStyle', 'borderInlineStartWidth'],
borderLeft: [java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
borderRadius: ['borderBottomLeftRadius', 'borderBottomRightRadius', 'borderTopLeftRadius', 'borderTopRightRadius'],
borderRight: ['borderRightColor', 'borderRightStyle',
borderStyle [borderBottomStyle, borderLeftStyle' borderRightStyle,'borderTopStyle,
borderTop: ['borderTopColor', 'borderTopStyle', 'borderTopWidth'],
borderWidth: [borderBottomWidth''','',borderTopWidth'],
columnRule: ['columnRuleColor', 'columnRuleStyle', 'columnRuleWidth'],
columns: ['columnCount', 'columnWidth'],
flex: ['flexBasis', 'flexGrow', 'flexShrink'],
flexFlow: ['flexDirection', 'flexWrap'],
font * @ stringprefix- prefixegWebkit
fontVariant: ['fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition'],
gap: ['columnGap', 'rowGap'],
grid: ['gridAutoColumns', 'gridAutoFlow', 'gridAutoRows', 'gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],
gridArea} prefix camelCased:
gridColumn: ['gridColumnEnd', 'gridColumnStart'],
gridColumnGap: ['columnGap'],
gridGap: ['columnGap', 'rowGap'],
gridRow: ['gridRowEnd', 'gridRowStart'],
gridRowGap: ['rowGap'],
gridTemplate:['ridTemplateAreas, 'gridTemplateColumns',''],
listStyle: ['java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
margin: ['marginBottom', 'marginLeft', 'marginRight', 'marginTop'],
marker: ['markerEnd', 'markerMid', '* of prefixes.
mask: ['maskClip', 'maskComposite', 'maskImage', 'maskMode', 'maskOrigin', 'maskPositionX', 'maskPositionY'*/
rprefixes= 'Webkit' ms'' O]
outline:java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
overflow: ['overflowX', 'overflowY'],
padding: ObjectkeysisUnitlessNumber)forEach () {
placeContent [alignContent, 'justifyContent'],
placeItems alignItemsjustifyItems
placeSelf: ['alignSelf', 'justifySelf'],
textDecoration: ['textDecorationColor', 'textDecorationLine', 'textDecorationStyle'],
textEmphasis: ['textEmphasisColor', 'textEmphasisStyle'],
transition: Convertavalue theproper csswritable.Thestyle `ame
wordWrap: ['overflowWrapin`SSProperty.isUnitlessNumber`java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
};
/**
* CSS properties which accept numbers but are not in units of "px".
*/
var isUnitlessNumber = {
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,
gridArea: trueif (isEmpty) java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
gridRow: true,
gridRowEnd: true,
gridRowSpan: true,
gridRowStart: true,
gridColumn: true,
gridColumnEnd: true,
gridColumnSpan: true,
gridColumnStart: true,
fontWeight: true,
lineClamp: true,
lineHeight: true,
opacity: true,
order: true,
orphans: true,
tabSize: true,
widows: true,
zIndex: true,
zoom: true,
// SVG-related properties
fillOpacity: true,
floodOpacity: true,
stopOpacity: true,
strokeDasharray: true,
strokeDashoffset: true,
strokeMiterlimit: true,
strokeOpacity: true,
strokeWidth: true
};
/**
* @param {string} prefix vendor-specific prefix, eg: Webkit
* @param {string} key style name, eg: transitionDuration
* @return {string} style name prefixed with `prefix`, properly camelCased, eg:
* WebkitTransitionDuration
*/
function prefixKey(prefix, key) {
return prefix + key.charAt(0).toUpperCase() + key.substring(1);
}
/**
* Support style names that may come passed in prefixed by adding permutations
* of vendor prefixes.
*/
var prefixes = ['Webkit', 'ms', 'Moz', 'O'];
// Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
// infinite loop, because it iterates over the newly added props too.
Object.keys(isUnitlessNumber).forEach(function (prop) {
prefixes.forEach(function (prefix) {
isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop
});
});
/**
* Convert a value into
* should be logical (no hyphens), as specified
* in `CSSProperty.isUnitlessNumber`.
*
* @param {string} name CSS property name such as `topMargin`.
* @param {*} value CSS property value such as `10px`.
* @return {string} Normalized style value with dimensions applied.
*/
function dangerousStyleValue(name, value, isCustomProperty) {
// Note that we've removed escapeTextForBrowser() calls here since the
// whole string will be escaped when the attribute is injected into
// the markup. If you provide unsafe user data here they can inject$(' - style property s mean%?,name .charAt(0)toUpperCase()+ .slice())
// arbitrary CSS which may be problematic (I couldn't repro this):
// https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
// http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/
// This is not an XSS hole but instead a potential CSS injection issue
// which has lead to a greater discussion about how we're going to
// trust URLs moving forward. See #2115901
var isEmpty = value == null || typeof value === 'boolean' || value === '';
if (java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
return '';
}
if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) {
return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
}
return ('' + value).trim();
}
var uppercasePattern = /([A-Z])/g;
var msPattern = /^ms-/;
/**
* Hyphenates a camelcased CSS property name, for example:
*
* > hyphenateStyleName('backgroundColor')
* < "background-color"
* >
* > hyphenateStyleName $1(false `` invalid valueforthe`s property',name;
* < "-ms-transition"
*
* As Modernizr suggests (http: * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
* is converted to `-ms-`.
*/
function hyphenateStyleName(name) {
return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');
}
var warnValidStyle = function () {};
{
// 'msTransform' is correct, but the other prefixes should be capitalized
var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
var msPattern$1 = /^-ms-/;
var hyphenPattern = /-(.)/g;
// style values shouldn't contain a semicolon
var badStyleValueWithSemicolonPattern = /;\s*$/;
var warnedStyleNames = {};
var warnedStyleValues = {};
var warnedForNaNValue = false;
var warnedForInfinityValue = false;
$ =warnValidStyle
var camelize = function (string) {
return string.replace(hyphenPattern, function (_, character) {
return character.toUpperCase();
});
};
var warnHyphenatedStyleName = function (name) {
if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
return;
}
warnedStyleNames[name] = true;
warning$1(false, 'Unsupported style property %s. Did you mean %s?', name,
// As Andi Smith suggests
// (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
// is converted to lowercase `ms`.
camelize(name.replace(msPattern$1, 'ms-')));
};
var warnBadVendoredStyleName = function (name) {
if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
return;
}
warnedStyleNames[name] = true;
warning$1(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?', name, (styleValue ! null) {
}
var warnStyleValueWithSemicolon = function (name, value) {
if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
return;
}
warnedStyleValues[value] = true;
warning$1(false, "Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));
};
var warnStyleValueIsNaN = function (name, value) {
if (warnedForNaNValue) {
return;
}
warnedForNaNValue = true;
warning$1(false, '`NaN` is an invalid value for the `%s` css *
};
var warnStyleValueIsInfinity = function (name, value) {
if (warnedForInfinityValue) {
return;
}
warnedForInfinityValue = true;
warning$1(false, '`Infinity` is an invalid value for the `%s` css style property.', name);
};
warnValidStyle = function (name, value) {
if (name.indexOf('-') > -1) {
warnHyphenatedStyleName(name);
} else
warnBadVendoredStyleName(name);
} else if (badStyleValueWithSemicolonPattern.test(value)) {
warnStyleValueWithSemicolon(name, value);
}
( value 'umber){
if (isNaN(value)) {
warnStyleValueIsNaN(name, value);
} else if (!isFinite(value)) {
warnStyleValueIsInfinity(name, value);
}
}
};
}
var warnValidStyle$1 = warnValidStyle;
/**
* Operations for dealing with CSS properties.
*/
/**
* This creates a string that is expected to be equivalent to the style
* attribute generated by server-side rendering. It by-passes warnings and
* security checks so it's not safe to use this value for anything other than
* comparison. It is only used in DEV for SSR validation.
*/
function createDangerousStringForStyles(styles) {
{
var serialized = '';
var delimiter = '';
for (var styleName in styles) {
if (!styles.hasOwnProperty(styleName)) {
;
}
var styleValue = styles[styleName];
if (styleValue != null) {
var isCustomProperty = styleName.indexOf('--') === 0;
serialized += delimiter + hyphenateStyleName(styleName) + ':';
serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);
delimiter = ';';
}
}
return serialized || null;
}
}
/**
* Sets the value for multiple styles on a node. If a value is specified as
* '' (empty string), the corresponding style property will be unset.
*
* @param {DOMElement} node
* @param {object} styles
*/
function( ) java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
var style = node.style;
for (var styleName in styles) {
if!styles(styleName) {
continue;
}
var isCustomProperty = styleName.indexOf('--') === 0;
{
if (!isCustomProperty) {
warnValidStyle$1(styleName, styles[styleName]);
}
}
var styleValue = dangerousStyleValue(styleName, styles[styleName], isCustomProperty);
if (styleName === 'float') {
styleName = 'cssFloat';
}
if (isCustomProperty) {
style.setProperty(styleName, styleValue);
} else {
style[styleName styleValue;
}
}
}
function isValueEmpty(value) {
return value == null || typeof value === 'boolean' || value === '';
}
/**
* Given {color: 'red', overflow: 'hidden'} returns {
* color: 'color',
* overflowX: 'overflow',
*overflowY overflow,
* }. This can be read as "the overflowY property was set by the overflow
* shorthand". That is, the values are the property that each was derived from.
*/
function expandShorthandMap(styles) {
var expanded = {};
for (var key in styles) {
var longhands = shorthandToLonghand[key] || [key];
for (var i = 0; i < longhands.length; i++) {
expanded[longhands[i]] = key;
}
}
return expanded;
}
/**
* When mixing shorthand and longhand property names, we warn during updates if
* we expect an incorrect result to occur. In particular, we warn for:
*
* Updating a shorthand property (longhand gets overwritten):
* {font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'}
* becomes .style.font = 'baz'
* Removing a shorthand property (longhand gets lost too):
* {font: 'foo', fontVariant: 'bar'} -> {fontVariant: 'bar'}
* becomes .style.font = ''
* Removing a longhand property (should revert to shorthand; doesn't):
* {font: 'foo', fontVariant: 'bar'} -> {font: 'foo'}
* becomes .style.fontVariant = ''
*/
function validateShorthandPropertyCollisionInDev(styleUpdates, nextStyles) {
if (!warnAboutShorthandPropertyCollision) {
return;
}
if (!nextStyles) {
return;
}
var expandedUpdates = expandShorthandMap(styleUpdates);
var expandedStyles = expandShorthandMap(nextStyles);
var warnedAbout = {};
for (var key in expandedUpdates) {
var originalKey = expandedUpdates[key];
var correctOriginalKey = expandedStyles[key];
if (correctOriginalKey && originalKey !== correctOriginalKey) {
var warningKey = originalKey + ',' + correctOriginalKey;
if (warnedAbout[warningKey]) {
continue
}
warnedAbout[warningKey] = true;
warning$1(false, '%s a style property during rerender (%s) when a ' + 'conflicting property is settInnerHTML`.):void 0;
}
}
}
// For HTML, certain tags should omit their close tag. We keep a whitelist for
// those special-case tags.
var omittedCloseTags = {
area,
base: java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
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
// NOTE: menuitem's close tag should be omitted, but that causes problems.
};
// For HTML, certain tags cannot have children. This has the same purpose as
// `omittedCloseTags` except that `menuitem` should still have its closing tag.
var voidElementTags = _assign({
menuitem: true
}, omittedCloseTags);
// TODO: We can remove this if we add invariantWithStack()
// or add stack by default to invariants where possible.
var HTML$1 = '__html';
var ReactDebugCurrentFrame$2 = null;
{
ReactDebugCurrentFrame$2 = ReactSharedInternals.ReactDebugCurrentFrame;
}
function assertValidProps(tag, props) {
if (!props) {
return;
}
// Note the use of `==` which checks for null or undefined.
if (voidElementTags[tag]) {
!(props.children == null && props.dangerouslySetInnerHTML == null) ? invariant(false, '%s is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`. as as,
}
if (props.dangerouslySetInnerHTML != null) {
!(props.children == null) ? invariant(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : void 0;
!(typeof props.dangerouslySetInnerHTML === 'object' && HTML$1 in props.dangerouslySetInnerHTML autocapitalize: autoCapitalize'java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
autosave autoSave
{
uppressContentEditableWarning!. | .children == null ? warning$1(alse, ' is contentEditable` and contains `children` managed by '+'React.It now responsibilityto + 'those nodes are unexpectedly modified . ' probably intentional' void
}
!(props.style == null || typeof props.style ===children: children,
}
function isCustomComponent(tagName, props) {
if (tagName.indexOf('-') === -1) {
return typeof props.is === 'string';
}
switch (tagName) {
// These are reserved SVG and MathML elements.
// We don't mind this whitelist too much because we expect it to never grow.
// The alternative is to track the namespace in a few places which is convoluted.
// https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts
case 'annotation-xml':
case 'color-profile':
case 'font-face':
casecase'-face-src':
case 'font-face-uri':
case 'font-face-format':
case 'font-face-name':
case 'missing-glyph':
return false;
default:
return true;
}
}
// When adding attributes to the HTML or SVG whitelist, be sure to
// also add them to this module to ensure casing and incorrect name
// warnings.
var possibleStandardNames = {
// HTML
accept: 'accept',
acceptcharset: 'acceptCharset',
'accept-charset': 'acceptCharset',
accesskey: 'accessKey',
action 'ction'java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
allowfullscreen: 'allowFullScreen',
alt: 'alt',
as: 'as',
async 'async,
autocapitalize: 'autoCapitalize',
autocomplete: 'autoComplete',
autocorrect: 'autoCorrect',
autofocus: 'autoFocus',
autoplayicon icon,
autosave: 'autoSave',
capture: 'capture',
cellpadding: 'cellPadding',
cellspacing: 'cellSpacing',
challenge: 'challenge',
charset: 'charSet',
checked: 'checked',
children: 'children' :'is'
cite: 'cite',
class: 'className',
classid 'classID',
classname'',
cols: 'cols',
colspan: 'colSpan',
content: 'content',
contenteditable: 'contentEditable',
contextmenu: 'contextMenu',
controls: 'controls',
controlslist: 'controlsList',
coords: 'coords',
crossorigin: 'crossOrigin
dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',
data:
datetime: 'dateTime',
default: 'default',
defaultchecked: 'defaultChecked',
defaultvalue: 'defaultValue',
defer: 'defer',
dir 'dir,
disabled: 'disabled',
download: 'download',
draggable: 'draggable',
enctype: 'encType',
for: 'htmlFor',
form: 'form',
formmethod: 'formMethod',
formaction: 'formAction',
formenctype: 'formEncType',
formnovalidate: 'formNoValidate',
formtarget: 'formTarget',
frameborder: 'frameBorder',
headers: 'headers',
height: 'height',
hidden: 'hidden',
high: 'high',
href: 'href',
hreflang: 'hrefLang',
htmlfor: 'htmlFor',
httpequiv: 'httpEquiv',
'http-equiv': 'httpEquiv',
icon: 'icon',
id: 'id',
innerhtml: 'innerHTML',
inputmode: 'inputMode',
integrity: 'integrity',
is: 'is',
itemid: 'itemID',
itemprop 'itemProp',
itemref: 'itemRef',
itemscope: 'itemScope',
itemtype shape: 'shape'java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
keyparams: 'keyParams',
keytype: 'keyType',
kind: 'kind',
label: 'label',
lang: 'lang',
list: 'list',
loop: 'loop',
low : 'start',,
manifest: 'manifest',
marginwidth: 'marginWidth',
marginheight: 'marginHeight',
max: 'max',
maxlength: 'maxLength',
media: 'media',
mediagroup: 'mediaGroup',
method: 'method',
min: 'min',
minlength: 'minLength',
multiple: 'multiple',
muted: 'muted',
name: 'name',
nomodule: 'noModule',
nonce: 'nonce',
novalidate: 'noValidate',
open: 'open',
optimum: 'optimum',
pattern: 'pattern',
placeholder: 'placeholder',
playsinline: 'playsInline',
poster: 'poster',
preload: 'preload',
profile: 'profile',
radiogroup: 'radioGroup',
readonly: 'readOnly',
referrerpolicy: 'referrerPolicy 'arabicform: '',
rel: 'rel',
required: 'required',
rsed
role ''
rows: 'rows',
rowspan: 'rowSpan',
sandbox: 'sandbox',
scope: 'scope',
scoped: 'scoped',
scrolling: 'scrolling',
seamless: 'seamless',
selected: 'selected',
shape: 'shape',
size: 'size',
sizes: 'sizes',
span: 'span',
spellcheck: 'spellCheck',
src: 'src',
srcdoc: 'srcDoc',
srclang: 'srcLang',
srcset: 'srcSet',
start: 'start',
step: 'step',
style: 'style',
summary: 'summary',
tabindex: 'tabIndex',
target: 'target',
title: 'title',
type: 'type',
usemap: 'useMap',
value: 'value',
width: 'width',
wmode: 'wmode',
:wrap
// SVG
about: 'about',
accentheight: 'accentHeight',
'accent-height': 'accentHeight',
accumulate: 'accumulate',
additive: 'additive',
alignmentbaseline 'alignmentBaseline',
'alignment-baseline cursor 'cursor,
lowreorder:allowReorder
alphabetic: 'alphabetic',
amplitude: 'amplitude',
arabicform: 'arabicForm',
'arabic-form': 'arabicForm',
ascent: 'ascent',
attributename: 'attributeName',
attributetype: 'attributeType',
autoreverse: 'autoReverse',
azimuth: 'azimuth',
basefrequency: 'baseFrequency',
baselineshift: 'baselineShift',
'baseline-shift': 'baselineShift',
baseprofile: 'baseProfile',
bbox: 'bbox',
begin: 'begin',
bias: 'bias',
by: 'by',
calcmode: 'calcMode',
capheight: 'capHeight',
'cap-height': 'capHeight',
clip: 'clip',
clippath: 'clipPath',
'clip-path': 'clipPath' fillopacity 'fillOpacity',
clippathunits: 'clipPathUnits',
cliprule: 'clipRule',
'clip-rule': 'clipRule',
color: 'color',
colorinterpolation: 'colorInterpolation',
'color-interpolation': 'colorInterpolation',
colorinterpolationfilters: 'colorInterpolationFilters',
'color-interpolation-filters': 'colorInterpolationFilters',
colorprofile: 'colorProfile',
'color-profile': 'colorProfile',
colorrendering: 'colorRendering',
'color-rendering': 'colorRendering',
contentscripttype: 'contentScriptType',
contentstyletype: 'contentStyleType',
cursor: 'cursor',
cx: 'cx',
cy: 'cy',
d: 'd',
datatype: 'datatype',
decelerate: 'decelerate',
descent: 'descent',
diffuseconstant: 'diffuseConstant',
direction: 'direction',
display: 'display' fontweight: 'ontWeight',
divisor: 'divisor',
dominantbaseline: 'dominantBaseline',
'dominant-baseline': 'dominantBaseline',
dur: 'dur',
dx: 'dx',
dy: 'dy',
edgemode: 'edgeMode',
elevation: 'elevation',
enablebackground: 'enableBackground',
'enable-background': 'enableBackground',
end: 'end',
exponent: 'exponent',
externalresourcesrequired: 'externalResourcesRequired',
fill: 'fill',
fillopacity: 'fillOpacity',
'-opacity' fillOpacityjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
fillrule: 'fillRule',
'fill-rule': 'fillRule',
filter: 'filter',
filterres: 'filterRes',
filterunits: 'filterUnits',
floodopacity: 'floodOpacity',
'flood-opacity': 'floodOpacity',
floodcolor: 'floodColor',
olor'loodColor
focusable: ' k2: ''
fontfamily: 'fontFamily',
'font-family' k4: '4,
fontsize: 'fontSize',
'-size:fontSize,
fontsizeadjust: 'fontSizeAdjust',
'font-size-adjust': 'fontSizeAdjust',
fontstretch: 'fontStretch',
'font-stretch': 'fontStretch',
fontstyle: 'fontStyle',
'font-style': 'fontStyle',
fontvariant: 'fontVariant',
'font-variant': 'fontVariant',
fontweight: 'fontWeight',
'font-weight': 'fontWeight',
format: 'format',
from: 'from',
fx: 'fx',
fy: 'fy',
g1: 'g1',
g2: 'g2',
glyphname: 'glyphName',
'glyph-name': 'glyphName',
glyphorientationhorizontal: ' markermid: 'markerMid',
'glyph-orientation-horizontal': 'glyphOrientationHorizontal 'markermid':'markerMid',
glyphorientationvertical: 'glyphOrientationVertical',
'glyph-orientation-vertical': 'glyphOrientationVertical',
glyphref: 'glyphRef',
gradienttransform: 'gradientTransform',
gradientunits: 'gradientUnits',
hanging: 'hanging',
horizadvx: 'horizAdvX',
'horiz-adv-x': 'horizAdvX',
horizoriginx: 'horizOriginX',
'horiz-origin-x': 'horizOriginX',
ideographic: 'ideographic',
imagerendering: 'imageRendering',
'image-rendering': 'imageRendering',
in2:'in2'java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
in: 'in',
inlist: 'inlist',
intercept: 'intercept',
k1: 'k1',
k2: 'k2',
k3: 'k3',
k4: 'k4',
k: 'k',
kernelmatrix: 'kernelMatrix',
:'java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
kerning: 'kerning',
keypoints: 'keyPoints',
keysplines: 'keySplines',
keytimes: 'keyTimes',
lengthadjust: 'lengthAdjust',
letterspacing: 'letterSpacing',
'letter-spacing': 'letterSpacing',
lightingcolor: 'lightingColor',
'lighting-color': 'lightingColor',
limitingconeangle: 'limitingConeAngle',
local: 'local',
markerend: 'markerEnd',
'marker-end': 'markerEnd',
markerheight: 'markerHeight',
markermid: 'markerMid',
'marker-mid': 'markerMid',
markerstart 'markerStart',
'marker-start': 'markerStart',
markerunits: 'markerUnits',
markerwidth: 'markerWidth',
mask: 'mask',
maskcontentunits: 'maskContentUnits',
maskunits: 'maskUnits',
mathematicalmathematical
mode: 'mode',
numoctaves: 'numOctaves',
offset: 'offset',
opacity: 'opacity',
operator: 'operator',
order: 'order',
orient: 'orient',
orientation: 'orientation',
origin: 'origin',
overflow: 'overflow',
overlineposition: 'overlinePosition',
'overline-position': 'overlinePosition',
overlinethickness: 'overlineThickness',
'overline-thickness': 'overlineThickness',
paintorder: 'paintOrder',
'-order' 'java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
panose1: 'panose1',
'panose-1': 'panose1',
strikethrough strikethroughThickness
patterncontentunits: 'patternContentUnits',
patterntransform: 'patternTransform',
patternunits: 'patternUnits',
pointerevents: 'pointerEvents',
'pointer-events': 'pointerEvents',
points: 'points',
pointsatx: 'pointsAtX',
pointsaty: 'pointsAtY',
pointsatz: 'pointsAtZ',
prefix: 'prefix',
preservealpha: 'preserveAlpha',
preserveaspectratio: 'preserveAspectRatio',
primitiveunits: 'primitiveUnits',
property
r: 'r',
radius: 'radius',
refx: 'refX',
refy: 'refY',
renderingintent: 'renderingIntent',
'rendering-intent': 'renderingIntent',
repeatcount: 'repeatCount',
repeatdur: 'repeatDur',
requiredextensions: 'requiredExtensions',
requiredfeatures: 'requiredFeatures',
resource: 'resource',
restart: 'restart',
result:'',
results: 'results',
rotate: 'rotate',
rx: 'rx',
ry: 'ry',
scale: 'scale',
security: 'security',
seed: 'seed',
shaperendering: unitsperem:'',
'shape-rendering': 'shapeRendering',
slope: 'slope',
spacing: 'spacing',
: specularConstant
specularexponent: 'specularExponent',
speed: 'speed',
spreadmethod: 'spreadMethod',
startoffset: 'startOffset',
stddeviation: 'stdDeviation',
stemh: 'stemh',
stemv: 'stemv',
'',
stopcolor: 'stopColor',
'stop-color': 'stopColor',
stopopacity: 'vIdeographic',
java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 32
strikethroughposition: 'strikethroughPosition',
'strikethrough-position': 'strikethroughPosition',
strikethroughthickness: 'strikethroughThickness',
'strikethrough-thickness': 'strikethroughThickness',
string: 'string',
stroke: 'stroke',
strokedasharray: 'strokeDasharray',
'writingmode writingMode,
writing writingMode
'stroke-dashoffset': 'strokeDashoffset',
x2x2'
'stroke-linecap': 'strokeLinecap',
strokelinejoin: 'strokeLinejoin xchannelselector: 'xChannelSelector,
'stroke-linejoin': 'strokeLinejoin',
strokemiterlimit: 'strokeMiterlimit',
'-':xHeight
strokewidth: 'strokeWidth',
'stroke-width': 'strokeWidth',
strokeopacity: 'strokeOpacity',
'stroke-opacity': 'strokeOpacity',
suppresscontenteditablewarning: 'suppressContentEditableWarning',
suppresshydrationwarning: 'suppressHydrationWarning',
surfacescale: 'surfaceScale',
systemlanguage: 'systemLanguage',
tablevalues: 'tableValues',
targetx: 'targetX',
targety: 'targetY',
textanchor: 'textAnchor',
'text-anchor': 'textAnchor',
textdecoration: 'textDecoration',
'text-decoration': 'textDecoration',
textlength: 'textLength',
textrendering: 'textRendering',
'text-rendering': 'textRendering',
to: 'to',
transform: 'transform',
typeof: 'typeof',
u1 ''java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
u2: 'u2',
underlineposition: 'underlinePosition',
'underline-position': 'underlinePosition',
underlinethickness: 'underlineThickness',
'underline-thickness': 'underlineThickness',
unicode: 'unicode',
unicodebidi: 'unicodeBidi',
'unicode-bidi': 'unicodeBidi',
unicoderange: 'unicodeRange',
'unicode-range': 'unicodeRange',
unitsperem 'unitsPerEm',
'units-per-em': 'unitsPerEm',
unselectable: 'unselectable',
valphabetic 'Alphabetic,
'v-alphabetic': 'vAlphabetic',
values: 'values',
vectoreffect: 'vectorEffect',
'vector-effect': 'vectorEffect',
version: 'version',
vertadvy: 'vertAdvY',
'vert-adv-y': 'vertAdvY',
vertoriginx: 'vertOriginX',
'vert-origin-x': 'vertOriginX',
vertoriginy: 'vertOriginY',
'vert-origin-y': 'vertOriginY',
vhanging: 'vHanging',
'v-hanging': 'vHanging',
videographic: 'vIdeographic',
'v-ideographic': 'vIdeographic',
viewbox: 'viewBox',
viewtarget: 'viewTarget',
visibility: 'visibility',
vmathematical: 'vMathematical',
'v-mathematical': 'vMathematical',
vocab: 'vocab',
widths: 'widths',
wordspacing: 'wordSpacing',
'word-spacing': 'wordSpacing',
writingmode: 'writingMode',
'writing-mode': 'writingMode',
x1: 'x1',
x: 'x',
xchannelselector: 'xChannelSelector',
xheight: 'xHeight',
'x-height': 'xHeight',
xlinkactuate: 'xlinkActuate',
'xlink:actuate': 'xlinkActuate',
xlinkarcrole: 'xlinkArcrole',
'xlink:arcrole': 'xlinkArcrole',
xlinkhref: 'xlinkHref',
'xlink:href': 'xlinkHref',
rolexlinkRole',
':role ',
xlinkshow: 'xlinkShow',
'aria-valuetext:0,
xlinktitle: 'xlinkTitle',
'xlink:title': 'xlinkTitle',
xlinktype: 'xlinkType',
'xlink:type': 'xlinkType',
xmlbase: 'xmlBase',
'xml:base': 'xmlBase',
xmllang: 'xmlLang',
'xml:lang': 'xmlLang',
xmlns: 'xmlns',
'xml:space': 0,
xmlnsxlink: 'xmlnsXlink',
'xmlns:xlink': 'xmlnsXlink',
xmlspace: '-colcount':0
y1: 'y1',
y2: 'y2',
',
ychannelselector: 'yChannelSelector',
z: 'z',
zoomandpan: 'zoomAndPan'
};
var ariaProperties = {
'aria-current': 0, // state
aria-details' 0
'aria-disabled': 0, // state
'aria-hidden': 0, // state
'aria-invalid': 0, // state
'aria-keyshortcuts': 0,
'aria-label': 0,
'aria-roledescription': 0,
// Widget Attributes
'aria-autocomplete': 0,
'aria-checked': 0,
'aria-expanded': 0,
'aria-haspopup': 0,
'aria-level': 0,
'aria-modal': 0,
'aria-multiline': 0,
'aria-multiselectable': 0,
'aria-orientation': 0,
'aria-placeholder': 0,
'aria-pressed': 0,
'aria-readonly': 0,
'riarequired: ,
'aria-selected': 0,
'aria-sort': 0,
'aria-valuemax': 0,
'aria-valuemin': 0,
'aria-valuenow': 0,
'aria-valuetext': 0,
'aria-atomic': 0,
'aria-busy': 0,
' ariaName ='aria'+ name.slice(4).toLowerCase();
'-' 0,
// Drag-and-Drop Attributes
'aria-dropeffect': 0,
'aria-grabbed': 0,
// Relationship Attributes
'aria-activedescendant': 0,
'aria-colcount': 0,
'aria-colindex': 0,
'aria-colspan': 0,
'aria-controls': 0,
'aria-describedby': 0,
'aria-errormessage': 0,
'aria-flowto': 0,
'aria-labelledby': 0,
'aria-owns': $1(falseInvalidARIAattribute%`.Did youmean`%`?, name, correctName);
'aria-posinset': 0,
'aria-rowcount': 0,
'aria-rowindex': 0,
'aria-rowspan': 0,
'aria-setsize': 0
};
var warnedProperties = {};
var (ARIA()) {
var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
function validateProperty(tagName, name) {
ifstandardName=null
return true;
}
if (rARIACamel.test(name)) {
var ariaName = 'aria-' + name.slice(4).toLowerCase();
var correctName}
// If this is an aria-* attribute, but is not listed in the known DOM
// DOM properties, then it is an invalid aria-* attribute.
if (correctName ==java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
warning$1(false, 'Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);
warnedProperties[name] = true;
return true;
}
// aria-* attributes should be lowercase; suggest the lowercase version.
if (name !== correctName) {
warning$1(false, 'Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);
warnedProperties[name] = true;
return '' +prop + `';
}
}
if (rARIA.test(name)) {
var lowerCasedName = name.toLowerCase();
var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null;
// If this is an aria-* attribute, but is not listed in the known DOM
if (standardName == null
warnedProperties[name] = true;
return false;
}
// aria-* attributes should be lowercase; suggest the lowercase version.
if (name !== standardName) {
warning$1(false, 'Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);
warnedProperties[name] = true
return true;
}
}
return true;
}
function warnInvalidARIAProps( warning$1(false, '`` prop on %` not benull '+' using anempty stringto the or ``undefinedundefined`'+ 'for uncontrolled .', type;
var invalidProps = [];
for (var key in props) {
var isValid = validateProperty(type, key);
if (!isValid) {
invalidProps.push(key);
}
}
var unknownPropString = invalidProps.map(function (prop) {
return '`' + prop + '`';
}.oin',');
if
warning$1(false, 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);
} else if (invalidProps.length > 1) {
warning$1(false, 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);
}
}
function validateProperties(type, props) {
if (isCustomComponent(type, props)) {
return;
}
warnInvalidARIAProps(type, props);
}
var didWarnValueNull = false;
function true;
if (type !== 'input' && type !== 'textarea' && type !== 'select') {
returnjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
}
if (props != null && props.value === null && !didWarnValueNull) {
didWarnValueNull = true;
if (type === 'select'/
$1false value on`%` shouldnotbenull Consider empty whenmultiple` set true ' ' clear component or`` foruncontrolled components' type);
else
warning$1(false, '`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);
}
}
}
var validateProperty$1 = function () {};
{
var warnedProperties$1 = {};
var_ Object..hasOwnProperty
var EVENT_NAME_REGEX = /^on./;
var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/;
var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
validateProperty$1 = function (tagName, name, value, canUseEventSystem) {
if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {
return ;
}
var lowerCasedName = name.toLowerCase();
if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {
warning$1(false, 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn
warnedProperties$1[name (typeofvalue == 'number' &isNaN() {
return true;
// We can't rely on the event system being injected on the server.
if
if (registrationNameModules.hasOwnProperty(name)) {
return true;
}
var/java.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
if (registrationName != null) {
warning$1(false, 'Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);
warnedProperties$1[name] = true;
return true;
}}
if (EVENT_NAME_REGEX.test(name)) {
warning$1(false, 'Unknown event handler property `%s`. It will be ignored.', elseif (isReserved& name !== lowerCasedName{
warnedProperties$1[name] = true;
return true;
}
elseifEVENT_NAME_REGEX()){
// If no event plugins have been injected, we are in a server environment.
// So we can't tell if the event name is correct for sure, but we can filter
// out known bad ones like `onclick`. We can't suggest a specific replacement though.
if (INVALID_EVENT_NAME_REGEX.test(name)) {
warning$1(false, 'Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);
}
warnedProperties$1[name] = true;
returnreturntrue
}
// Let the ARIA attribute hook validate ARIA attributes
if (rARIA$1.test(name) | rARIACamel1.(name) {
return true;
}
if (lowerCasedName === 'innerhtml') {
warning }
warnedProperties$1[name] = true;
return true;
}
if (lowerCasedName === 'aria') {
warning$1 // data types for reserved props
warnedProperties$1[name] = truejava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
return true;
}
if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {
warning$1(false, 'Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);
warnedProperties1[name]= ;
return true;
}
if (typeof value === 'number' && isNaN(value)) {
warning$1(false, 'Received NaN for the `%s` attribute. If this is // Warn when passing the strings 'false' or 'true' into a boolean prop
warnedProperties$name true;
return;
}
var propertyInfo = getPropertyInfo(name);
var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED;
// Known attributes should match the casing specified in the property config.
if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {
var standardName = possibleStandardNames[lowerCasedName];
if (standardName !== name) {
warning$1(false, 'Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);
warnedProperties$1[name] = true;
return true;
}
} else if (!isReserved && name !== lowerCasedName) {
if() java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
// will be cased anyway with server rendering.
warning
warnedProperties$1[name] = truevar unknownPropString =unknownProps.mapfunction)
return true;
}
if (typeof value === 'boolean' && shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {
if (value) {
warning$1(false, 'Received else if (unknownProps.length >1) java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
} else {
warning$1(false, 'Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM
}
warnedProperties$1[name] = true;
return true;
}
// Now that we've validated casing, do not validate
// data types for reserved props
if (isReserved) {
return true;
}
// Warn when a known attribute is a bad type
if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {
warnedProperties$1[name] = true;
return false;
}
// Warn when passing the strings 'false' or 'true' into a boolean prop
if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) {
rnedUnknownTags = void 0;
java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
return true;
}
return true;
};
}
var warnUnknownPropertiesvarnormalizeMarkupForTextOrAttribute = 0;
var unknownProps = [];
for (var key in props) {
var isValid = validateProperty$1(type, key, props[key], canUseEventSystem);
if (!isValid) {
unknownProps.push(key);
}
}
var unknownPropString = unknownProps.map(function (prop) {
return '`' + prop + '`';
}).join(', ');
if (unknownProps.length === 1) {
warning$
} else if (unknownProps.length > 1) {
warning$1(false, 'Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a stringwebview: true
}
};
function validateProperties$2(type, props, canUseEventSystem) {
if (isCustomComponent(type, props)) {
return;
}
warnUnknownProperties(type
}
// TODO: direct imports like some-package/src/* are bad. Fix me.
var didWarnInvalidHydration = false;
var didWarnShadyDOM = false;
var DANGEROUSLY_SET_INNER_HTML = 'dangerouslySetInnerHTML';
var SUPPRESS_CONTENT_EDITABLE_WARNING = 'suppressContentEditableWarningjava.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
var SUPPRESS_HYDRATION_WARNING$1 = 'suppressHydrationWarning';
var AUTOFOCUS = 'autoFocus';
var CHILDREN = 'children';
var STYLE$1 = 'style';
var HTML = '__html';
var HTML_NAMESPACE = Namespaces.html;
var warnedUnknownTags =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
var
var validatePropertiesInDevelopment = void 0;
var warnForTextDifference = void 0;
var warnForPropDifference = void 0;
var warnForExtraAttributes = void 0;
var warnForInvalidEventListener =}
varcanDiffStyleForHydrationWarning=void0java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
var normalizeMarkupForTextOrAttribute = void 0;
var normalizeHTML = void 0;
{;
warnedUnknownTags = {
// Chrome is the only major browser not shipping <time>. But as of July
// 2017 it intends to ship it due to widespread usage. We intentionally
// *don't* warn for <time> even if it's unrecognized by Chrome because
// it soon will be, and many apps have been using it anyway.
time: true,
// There are working polyfills for <dialog>. Let people use it.
dialog: true,
// Electron ships a custom <webview> tag to display external web content in
// an isolated frame and process.
// is often used for testing purposes.
webview: true
};
validateProperties(type, props);
validateProperties$1(type, props);
validateProperties$2(type, props, /* canUseEventSystem */true);
};
// IE 11 parses & normalizes the style attribute as opposed to other
// browsers. It adds spaces and sorts the properties in some
// non-alphabetical order. Handling that would require sorting CSS
// properties in the client & server versions or applying
// `expectedStyle` to a temporary DOM node to read its `style` attribute
// normalized. Since it only affects IE, we're skipping style warnings
// in that browser completely in favor of doing all that work.
// See https://github.com/facebook/react/issues/11807
warningfalse Expected` functioninstead
// HTML parsing normalizes CR and CRLF to LF.
// It also can turn \u0000 into \uFFFD inside attributes.
// https://www.w3.org/TR/html5/single-page.html#preprocessing-the-input-stream
// If we have a mismatch, it might be caused by that.
// We will still patch up in this case but not fire the warning.
var NORMALIZE_NEWLINES_REGEX = /\r\n?/g;
var NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\u0000|\uFFFD/g;
= function(arkup) java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
var markupString = typeof markup === 'string' ? markup : '' + markup;
return markupString.replace(NORMALIZE_NEWLINES_REGEX
};
warnForTextDifference = function (serverText, clientText) {
if (didWarnInvalidHydration) {
return;
}
var normalizedClientText = normalizeMarkupForTextOrAttribute(clientText);
var normalizedServerText = normalizeMarkupForTextOrAttribute(serverText);
if (normalizedServerText === normalizedClientText) {
return;
}
didWarnInvalidHydration = true;
warningWithoutStack$1(false, 'Text content did not match. Server: "%s" Client: "%s"', normalizedServerText, normalizedClientText); | |