(ids.size());
+ for (String id : ids) {
+ try {
+ String jsonString = syncCommands.get("message:" + id);
+ ObjectMapper objectMapper = new ObjectMapper();
+ Message message = objectMapper.readValue(jsonString, Message.class);
+ messages.add(message);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ return messages;
+ }
+}
diff --git a/chapter-05/mvnw b/chapter-05/mvnw
new file mode 100755
index 0000000..5551fde
--- /dev/null
+++ b/chapter-05/mvnw
@@ -0,0 +1,286 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven2 Start Up Batch script
+#
+# Required ENV vars:
+# ------------------
+# JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+# M2_HOME - location of maven2's installed home dir
+# MAVEN_OPTS - parameters passed to the Java VM when running Maven
+# e.g. to debug Maven itself, use
+# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+# ----------------------------------------------------------------------------
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+ if [ -f /etc/mavenrc ] ; then
+ . /etc/mavenrc
+ fi
+
+ if [ -f "$HOME/.mavenrc" ] ; then
+ . "$HOME/.mavenrc"
+ fi
+
+fi
+
+# OS specific support. $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+ CYGWIN*) cygwin=true ;;
+ MINGW*) mingw=true;;
+ Darwin*) darwin=true
+ # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
+ # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+ if [ -z "$JAVA_HOME" ]; then
+ if [ -x "/usr/libexec/java_home" ]; then
+ export JAVA_HOME="`/usr/libexec/java_home`"
+ else
+ export JAVA_HOME="/Library/Java/Home"
+ fi
+ fi
+ ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+ if [ -r /etc/gentoo-release ] ; then
+ JAVA_HOME=`java-config --jre-home`
+ fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+ ## resolve links - $0 may be a link to maven's home
+ PRG="$0"
+
+ # need this for relative symlinks
+ while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG="`dirname "$PRG"`/$link"
+ fi
+ done
+
+ saveddir=`pwd`
+
+ M2_HOME=`dirname "$PRG"`/..
+
+ # make it fully qualified
+ M2_HOME=`cd "$M2_HOME" && pwd`
+
+ cd "$saveddir"
+ # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --unix "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Mingw, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME="`(cd "$M2_HOME"; pwd)`"
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+ # TODO classpath?
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+ javaExecutable="`which javac`"
+ if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
+ # readlink(1) is not available as standard on Solaris 10.
+ readLink=`which readlink`
+ if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
+ if $darwin ; then
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
+ else
+ javaExecutable="`readlink -f \"$javaExecutable\"`"
+ fi
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaHome=`expr "$javaHome" : '\(.*\)/bin'`
+ JAVA_HOME="$javaHome"
+ export JAVA_HOME
+ fi
+ fi
+fi
+
+if [ -z "$JAVACMD" ] ; then
+ if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ else
+ JAVACMD="`which java`"
+ fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+ echo "Error: JAVA_HOME is not defined correctly." >&2
+ echo " We cannot execute $JAVACMD" >&2
+ exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+ echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+
+# traverses directory structure from process work directory to filesystem root
+# first directory with .mvn subdirectory is considered project base directory
+find_maven_basedir() {
+
+ if [ -z "$1" ]
+ then
+ echo "Path not specified to find_maven_basedir"
+ return 1
+ fi
+
+ basedir="$1"
+ wdir="$1"
+ while [ "$wdir" != '/' ] ; do
+ if [ -d "$wdir"/.mvn ] ; then
+ basedir=$wdir
+ break
+ fi
+ # workaround for JBEAP-8937 (on Solaris 10/Sparc)
+ if [ -d "${wdir}" ]; then
+ wdir=`cd "$wdir/.."; pwd`
+ fi
+ # end of workaround
+ done
+ echo "${basedir}"
+}
+
+# concatenates all lines of a file
+concat_lines() {
+ if [ -f "$1" ]; then
+ echo "$(tr -s '\n' ' ' < "$1")"
+ fi
+}
+
+BASE_DIR=`find_maven_basedir "$(pwd)"`
+if [ -z "$BASE_DIR" ]; then
+ exit 1;
+fi
+
+##########################################################################################
+# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in binary data.
+##########################################################################################
+if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found .mvn/wrapper/maven-wrapper.jar"
+ fi
+else
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
+ fi
+ jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"
+ while IFS="=" read key value; do
+ case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
+ esac
+ done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Downloading from: $jarUrl"
+ fi
+ wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
+
+ if command -v wget > /dev/null; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found wget ... using wget"
+ fi
+ wget "$jarUrl" -O "$wrapperJarPath"
+ elif command -v curl > /dev/null; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found curl ... using curl"
+ fi
+ curl -o "$wrapperJarPath" "$jarUrl"
+ else
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Falling back to using Java to download"
+ fi
+ javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
+ if [ -e "$javaClass" ]; then
+ if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo " - Compiling MavenWrapperDownloader.java ..."
+ fi
+ # Compiling the Java class
+ ("$JAVA_HOME/bin/javac" "$javaClass")
+ fi
+ if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+ # Running the downloader
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo " - Running MavenWrapperDownloader.java ..."
+ fi
+ ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
+ fi
+ fi
+ fi
+fi
+##########################################################################################
+# End of extension
+##########################################################################################
+
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
+if [ "$MVNW_VERBOSE" = true ]; then
+ echo $MAVEN_PROJECTBASEDIR
+fi
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --path --windows "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+ [ -n "$MAVEN_PROJECTBASEDIR" ] &&
+ MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
+fi
+
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+exec "$JAVACMD" \
+ $MAVEN_OPTS \
+ -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+ "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+ ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
diff --git a/chapter-05/mvnw.cmd b/chapter-05/mvnw.cmd
new file mode 100755
index 0000000..48363fa
--- /dev/null
+++ b/chapter-05/mvnw.cmd
@@ -0,0 +1,161 @@
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements. See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership. The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License. You may obtain a copy of the License at
+@REM
+@REM http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied. See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@REM ----------------------------------------------------------------------------
+@REM Maven2 Start Up Batch script
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM M2_HOME - location of maven2's installed home dir
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+@REM ----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM set title of command window
+title %0
+@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+
+@REM Execute a user defined script before this one
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
+if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
+:skipRcPre
+
+@setlocal
+
+set ERROR_CODE=0
+
+@REM To isolate internal variables from possible post scripts, we use another setlocal
+@setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo Error: JAVA_HOME not found in your environment. >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto init
+
+echo.
+echo Error: JAVA_HOME is set to an invalid directory. >&2
+echo JAVA_HOME = "%JAVA_HOME%" >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+@REM ==== END VALIDATION ====
+
+:init
+
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
+@REM Fallback to current working directory if not found.
+
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
+
+set EXEC_DIR=%CD%
+set WDIR=%EXEC_DIR%
+:findBaseDir
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
+cd ..
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
+set WDIR=%CD%
+goto findBaseDir
+
+:baseDirFound
+set MAVEN_PROJECTBASEDIR=%WDIR%
+cd "%EXEC_DIR%"
+goto endDetectBaseDir
+
+:baseDirNotFound
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
+cd "%EXEC_DIR%"
+
+:endDetectBaseDir
+
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
+
+@setlocal EnableExtensions EnableDelayedExpansion
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
+
+:endReadAdditionalConfig
+
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"
+FOR /F "tokens=1,2 delims==" %%A IN (%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties) DO (
+ IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
+)
+
+@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
+if exist %WRAPPER_JAR% (
+ echo Found %WRAPPER_JAR%
+) else (
+ echo Couldn't find %WRAPPER_JAR%, downloading it ...
+ echo Downloading from: %DOWNLOAD_URL%
+ powershell -Command "(New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"
+ echo Finished downloading %WRAPPER_JAR%
+)
+@REM End of extension
+
+%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+set ERROR_CODE=1
+
+:end
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
+if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
+:skipRcPost
+
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%" == "on" pause
+
+if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
+
+exit /B %ERROR_CODE%
diff --git a/chapter-05/pom.xml b/chapter-05/pom.xml
new file mode 100644
index 0000000..798f14c
--- /dev/null
+++ b/chapter-05/pom.xml
@@ -0,0 +1,105 @@
+
+
+ 4.0.0
+
+ com.packt.distributed-tracing-chapter-05
+ parent
+ 0.0.1-SNAPSHOT
+ pom
+
+ Tracing Talk
+ Chapter 6 - Tracing Kafka
+
+
+ exercise1
+ lib
+
+
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 2.0.4.RELEASE
+
+
+
+
+
+ UTF-8
+ UTF-8
+ 1.8
+
+
+
+
+
+ ${project.groupId}
+ lib
+ ${project.version}
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+ 2.0.4.RELEASE
+
+
+ org.springframework.kafka
+ spring-kafka
+ 2.1.8.RELEASE
+
+
+ org.apache.kafka
+ kafka-clients
+ 2.0.0
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+ 2.9.4
+
+
+ io.opentracing
+ opentracing-api
+ 0.31.0
+
+
+ io.opentracing.contrib
+ opentracing-spring-cloud-starter
+ 0.1.13
+
+
+ io.opentracing.contrib
+ opentracing-spring-tracer-configuration-starter
+ 0.1.0
+
+
+ io.opentracing.contrib
+ opentracing-kafka-spring
+ 0.0.14
+
+
+ io.opentracing.contrib
+ opentracing-redis-lettuce
+ 0.0.5
+
+
+ io.jaegertracing
+ jaeger-client
+ 0.31.0
+
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+
+
+
diff --git a/chapter-05/webapp/.babelrc b/chapter-05/webapp/.babelrc
new file mode 100644
index 0000000..4c946e2
--- /dev/null
+++ b/chapter-05/webapp/.babelrc
@@ -0,0 +1,4 @@
+{
+ "plugins": ["transform-class-properties"],
+ "presets": ["react"]
+}
diff --git a/chapter-05/webapp/.gitignore b/chapter-05/webapp/.gitignore
new file mode 100644
index 0000000..1b29d9e
--- /dev/null
+++ b/chapter-05/webapp/.gitignore
@@ -0,0 +1,5 @@
+.cache/
+dist/
+node_modules/
+yarn-error.log
+
diff --git a/chapter-05/webapp/actions/Messages.js b/chapter-05/webapp/actions/Messages.js
new file mode 100644
index 0000000..ea4d666
--- /dev/null
+++ b/chapter-05/webapp/actions/Messages.js
@@ -0,0 +1,39 @@
+import dayjs from "dayjs"
+
+const chatApiUrl = "http://localhost:8080"
+// const chatApiUrl = "http://16f5b228.ngrok.io"
+
+export const postData = (url = "", data = {}) => {
+ // Default options are marked with *
+ return fetch(url, {
+ method: "POST", // *GET, POST, PUT, DELETE, etc.
+ mode: "cors", // no-cors, cors, *same-origin
+ // cache: "no-cache", // *default, no-cache, reload, force-cache, only-if-cached
+ // credentials: "same-origin", // include, same-origin, *omit
+ headers: {
+ "Content-Type": "application/json",
+ Accept: "application/json"
+ },
+ redirect: "follow", // manual, *follow, error
+ referrer: "no-referrer", // no-referrer, *client
+ body: JSON.stringify(data) // body data type must match "Content-Type" header
+ })
+ .then(response => {
+ if (response.status > 400) {
+ throw new Error("Failed status code: " + response.status)
+ }
+ return response
+ })
+ .then(response => response.json()) // parses response to JSON
+}
+
+export const sendMessage = (author, room, message) => {
+ return postData(`${chatApiUrl}/message`, {
+ author,
+ room,
+ message
+ })
+}
+
+export const getMessages = () =>
+ fetch(`${chatApiUrl}/message`).then(response => response.json())
diff --git a/chapter-05/webapp/app.js b/chapter-05/webapp/app.js
new file mode 100644
index 0000000..cb43299
--- /dev/null
+++ b/chapter-05/webapp/app.js
@@ -0,0 +1,95 @@
+import React, { Component } from "react"
+import ReactDOM from "react-dom"
+import ChatRoom from "./components/ChatRoom"
+import UserInput from "./components/UserInput"
+import { sendMessage, getMessages } from "./actions/Messages"
+import { Page, Header, HorizontalLayout } from "./components/Styled"
+import ErrorBoundary from "./components/ErrorBoundary"
+
+class App extends Component {
+ state = {
+ title: "Tracing Talk",
+ user: "guest-" + Math.floor(Math.random() * 1000),
+ room: {
+ name: "lobby",
+ messages: [
+ {
+ id: "a",
+ date: "2018-08-16T08:00:31-04:00",
+ author: "Ralph",
+ message: "👋 Hey, there!"
+ },
+ {
+ id: "b",
+ date: "2018-08-16T08:02:31-04:00",
+ author: "Johnny",
+ message: "Hello!",
+ image: "https://media.giphy.com/media/mIZ9rPeMKefm0/giphy.gif"
+ }
+ ]
+ }
+ }
+
+ componentDidMount() {
+ this.refreshMessages()
+ this.interval = setInterval(() => {
+ this.refreshMessages()
+ }, 3000)
+ }
+
+ componentWillUnmount() {
+ clearInterval(this.interval)
+ }
+
+ refreshMessages() {
+ return getMessages().then(messages =>
+ this.setState(state => {
+ state.room.messages = messages
+ return state
+ })
+ )
+ }
+
+ userInputChange(e) {
+ this.setState({ user: e.target.value })
+ }
+
+ send(message) {
+ if (message) {
+ sendMessage(this.state.user, this.state.room.name, message).then(
+ savedMessage => {
+ this.setState(state => {
+ state.room.messages.push(savedMessage)
+ return state
+ })
+ }
+ )
+ }
+ }
+
+ render() {
+ return (
+
+
+ {this.state.title}
+
+
+ this.userInputChange(e)}
+ />
+
+
+ this.send(message)}
+ />
+
+
+
+ )
+ }
+}
+
+ReactDOM.render(, document.getElementById("app"))
diff --git a/chapter-05/webapp/components/ChatInput.js b/chapter-05/webapp/components/ChatInput.js
new file mode 100644
index 0000000..734f9f8
--- /dev/null
+++ b/chapter-05/webapp/components/ChatInput.js
@@ -0,0 +1,38 @@
+import React, { Component } from "react"
+import { Button, MessageInput } from "./Styled"
+export default class ChatInput extends Component {
+ state = {
+ message: ""
+ }
+
+ buttonRef = React.createRef()
+ onChange(e) {
+ this.setState({ message: e.target.value })
+ }
+
+ sendMessage(e) {
+ e.preventDefault()
+ this.props.sendMessage(this.state.message)
+ this.setState({ message: "" })
+ }
+
+ componentDidUpdate() {
+ this.buttonRef.current.scrollIntoView({ behavior: "smooth" })
+ }
+
+ render() {
+ return (
+
+ )
+ }
+}
diff --git a/chapter-05/webapp/components/ChatRoom.js b/chapter-05/webapp/components/ChatRoom.js
new file mode 100644
index 0000000..eebb470
--- /dev/null
+++ b/chapter-05/webapp/components/ChatRoom.js
@@ -0,0 +1,24 @@
+import React, { Component } from "react"
+import { RoomName, MessageList, HorizontalLayout } from "./Styled"
+import ChatInput from "./ChatInput"
+import Message from "./Message"
+
+export default class ChatRoom extends Component {
+ render() {
+ return (
+
+ {/*{this.props.room.name}*/}
+
+
+ {this.props.room.messages.map(message => (
+
+ ))}
+
+
+
+
+
+
+ )
+ }
+}
diff --git a/chapter-05/webapp/components/ErrorBoundary.js b/chapter-05/webapp/components/ErrorBoundary.js
new file mode 100644
index 0000000..1b4721b
--- /dev/null
+++ b/chapter-05/webapp/components/ErrorBoundary.js
@@ -0,0 +1,21 @@
+import React, { Component } from "react"
+
+export default class ErrorBoundary extends Component {
+ constructor(props) {
+ super(props)
+ this.state = { hasError: false }
+ }
+
+ componentDidCatch(error, info) {
+ // Display fallback UI
+ this.setState({ hasError: true })
+ }
+
+ render() {
+ if (this.state.hasError) {
+ // You can render any custom fallback UI
+ return Something went wrong. Make sure chat-api server is running.
+ }
+ return this.props.children
+ }
+}
diff --git a/chapter-05/webapp/components/Message.js b/chapter-05/webapp/components/Message.js
new file mode 100644
index 0000000..942d6a5
--- /dev/null
+++ b/chapter-05/webapp/components/Message.js
@@ -0,0 +1,28 @@
+import React, { Component } from "react"
+import dayjs from "dayjs"
+import relativeTime from "dayjs/plugin/relativeTime"
+dayjs.extend(relativeTime)
+import {
+ TimeAgo,
+ Author,
+ MessageText,
+ HorizontalLayout,
+ MessageWrapper,
+ Image,
+ ImageWrapper
+} from "./Styled"
+
+export default ({ message }) => (
+
+
+
+ {message.author}{" "}
+ {message.message}
+
+ {dayjs(message.date).fromNow()}
+
+
+ {message.image ? : null}
+
+
+)
diff --git a/chapter-05/webapp/components/Styled.js b/chapter-05/webapp/components/Styled.js
new file mode 100644
index 0000000..352e1b2
--- /dev/null
+++ b/chapter-05/webapp/components/Styled.js
@@ -0,0 +1,120 @@
+import styled, { injectGlobal } from "styled-components"
+const mainColor = "#0a5"
+const secondaryColor = "white"
+const pageWidth = "40em"
+
+injectGlobal`
+ html {
+ background-color: white;
+ color: black;
+ font-size: 1.3vw;
+ font-family: 'Lato', sans-serif;
+ }
+`
+
+export const Space = styled.div`
+ width: ${({ marginLeft }) => marginLeft};
+ /* margin-left: ${({ marginLeft }) => marginLeft}; */
+`
+
+export const Page = styled.div`
+ display: flex;
+ justify-content: center;
+ flex-direction: column;
+`
+
+export const HorizontalLayout = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-items: flex-end;
+ justify-content: ${({ justifyContent = "space-between" }) => justifyContent};
+`
+
+export const Header = styled.div`
+ font-size: 5em;
+ font-weight: bolder;
+ color: ${mainColor};
+`
+
+export const RoomName = styled.h2`
+ color: ${mainColor};
+`
+
+export const MessageList = styled.ul`
+ width: ${pageWidth}
+ list-style-type: none;
+ padding-left: 0;
+`
+
+export const MessageWrapper = styled.li`
+ margin-bottom: 0.5em;
+ &:hover {
+ color: ${mainColor};
+ }
+`
+
+export const Image = styled.img`
+ height: 10em;
+`
+
+export const ImageWrapper = styled.div`
+ margin-top: 0.5em;
+`
+
+export const Author = styled.label`
+ color: ${mainColor};
+ /* font-size: 0.8em; */
+ height: 1.1em;
+ width: 6em;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ overflow: hidden;
+ line-height: 100%;
+ /* background: brown; */
+ /* text-transform: uppercase; */
+`
+
+export const MessageText = styled.label`
+ font-weight: bolder;
+ height: 1.1em;
+ line-height: 100%;
+`
+
+export const TimeAgo = styled.label`
+ font-size: 0.7em;
+ color: gray;
+ line-height: 100%;
+`
+
+export const NicknameInput = styled.input`
+ margin: 0;
+ width: 100;
+ height: 26;
+`
+
+export const MessageInput = styled.input`
+ margin-top: 0;
+ width: 46.8em;
+ height: 32px;
+ line-height: 32px;
+ padding-left: 8px;
+ border: 1px solid ${mainColor};
+ font-family: "Lato", sans-serif;
+ font-size: 0.8em;
+ font-weight: bold;
+ vertical-align: bottom;
+`
+
+export const Button = styled.button`
+ margin: 0;
+ width: 50px;
+ height: 32px;
+ line-height: 32px;
+ color: ${secondaryColor};
+ background-color: ${mainColor};
+ font-family: "Lato", sans-serif;
+ text-transform: uppercase;
+ letter-spacing: 0.2em;
+ border: 0;
+ padding: 0;
+`
diff --git a/chapter-05/webapp/components/UserInput.js b/chapter-05/webapp/components/UserInput.js
new file mode 100644
index 0000000..2f37c47
--- /dev/null
+++ b/chapter-05/webapp/components/UserInput.js
@@ -0,0 +1,52 @@
+import React, { Component } from "react"
+import styled from "styled-components"
+
+import {
+ NicknameInput,
+ Button,
+ Author,
+ HorizontalLayout,
+ Space
+} from "./Styled"
+
+export default class UserInput extends Component {
+ state = {
+ isEditing: false
+ }
+
+ userRef = React.createRef()
+
+ isEditing(e) {
+ e.preventDefault()
+ this.setState(state => {
+ if (this.props.user) return { isEditing: !state.isEditing }
+ else return state
+ })
+ }
+
+ render() {
+ return (
+
+ )
+ }
+}
diff --git a/chapter-05/webapp/favicon.ico b/chapter-05/webapp/favicon.ico
new file mode 100644
index 0000000..9a0dd01
Binary files /dev/null and b/chapter-05/webapp/favicon.ico differ
diff --git a/chapter-05/webapp/index.html b/chapter-05/webapp/index.html
new file mode 100644
index 0000000..61bd997
--- /dev/null
+++ b/chapter-05/webapp/index.html
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/chapter-05/webapp/package.json b/chapter-05/webapp/package.json
new file mode 100644
index 0000000..420ea8d
--- /dev/null
+++ b/chapter-05/webapp/package.json
@@ -0,0 +1,22 @@
+{
+ "name": "webapp",
+ "version": "1.0.0",
+ "main": "index.js",
+ "license": "MIT",
+ "scripts": {
+ "dev": "parcel index.html",
+ "build": "parcel build index.html"
+ },
+ "dependencies": {
+ "dayjs": "^1.7.5",
+ "formik": "^1.0.3",
+ "react": "^16.4.2",
+ "react-dom": "^16.4.2",
+ "styled-components": "^3.4.2"
+ },
+ "devDependencies": {
+ "babel-plugin-transform-class-properties": "^6.24.1",
+ "babel-preset-react": "^6.24.1",
+ "parcel-bundler": "^1.9.7"
+ }
+}
diff --git a/chapter-05/webapp/public/app.6b3e1769.js b/chapter-05/webapp/public/app.6b3e1769.js
new file mode 100644
index 0000000..b3defaa
--- /dev/null
+++ b/chapter-05/webapp/public/app.6b3e1769.js
@@ -0,0 +1,80 @@
+parcelRequire=function(e,r,n,t){var i="function"==typeof parcelRequire&&parcelRequire,o="function"==typeof require&&require;function u(n,t){if(!r[n]){if(!e[n]){var f="function"==typeof parcelRequire&&parcelRequire;if(!t&&f)return f(n,!0);if(i)return i(n,!0);if(o&&"string"==typeof n)return o(n);var c=new Error("Cannot find module '"+n+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[n][1][r]||r};var l=r[n]=new u.Module(n);e[n][0].call(l.exports,p,l,l.exports,this)}return r[n].exports;function p(e){return u(p.resolve(e))}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=r,u.parent=i,u.register=function(r,n){e[r]=[function(e,r){r.exports=n},{}]};for(var f=0;fR.length&&R.push(e)}function A(e,t,r,n){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var i=!1;if(null===e)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case u:case l:i=!0}}if(i)return r(n,e,""===t?"."+E(e,0):t),1;if(i=0,t=""===t?".":t+":",Array.isArray(e))for(var f=0;fthis.eventPool.length&&this.eventPool.push(e)}function xe(e){e.eventPool=[],e.getPooled=ke,e.release=we}r(be.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=a.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=a.thatReturnsTrue)},persist:function(){this.isPersistent=a.thatReturnsTrue},isPersistent:a.thatReturnsFalse,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;for(t=0;t=Se),Ue=String.fromCharCode(32),Fe={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},Ie=!1;function Me(e,t){switch(e){case"keyup":return-1!==Te.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function Re(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var ze=!1;function Oe(e,t){switch(e){case"compositionend":return Re(t);case"keypress":return 32!==t.which?null:(Ie=!0,Ue);case"textInput":return(e=t.data)===Ue&&Ie?null:e;default:return null}}function De(e,t){if(ze)return"compositionend"===e||!_e&&Me(e,t)?(e=he(),me._root=null,me._startText=null,me._fallbackText=null,ze=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1t}return!1}function Ut(e,t,n,r,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t}var Ft={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ft[e]=new Ut(e,0,!1,e,null)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ft[t]=new Ut(t,1,!1,e[1],null)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ft[e]=new Ut(e,2,!1,e.toLowerCase(),null)}),["autoReverse","externalResourcesRequired","preserveAlpha"].forEach(function(e){Ft[e]=new Ut(e,2,!1,e,null)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ft[e]=new Ut(e,3,!1,e.toLowerCase(),null)}),["checked","multiple","muted","selected"].forEach(function(e){Ft[e]=new Ut(e,3,!0,e.toLowerCase(),null)}),["capture","download"].forEach(function(e){Ft[e]=new Ut(e,4,!1,e.toLowerCase(),null)}),["cols","rows","size","span"].forEach(function(e){Ft[e]=new Ut(e,6,!1,e.toLowerCase(),null)}),["rowSpan","start"].forEach(function(e){Ft[e]=new Ut(e,5,!1,e.toLowerCase(),null)});var It=/[\-:]([a-z])/g;function Mt(e){return e[1].toUpperCase()}function Rt(e,t,n,r){var a=Ft.hasOwnProperty(t)?Ft[t]:null;(null!==a?0===a.type:!r&&(2Rn.length&&Rn.push(e)}}}var Bn={get _enabled(){return On},setEnabled:Dn,isEnabled:function(){return On},trapBubbledEvent:Ln,trapCapturedEvent:An,dispatchEvent:Wn},Vn={},Hn=0,Qn="_reactListenersID"+(""+Math.random()).slice(2);function qn(e){return Object.prototype.hasOwnProperty.call(e,Qn)||(e[Qn]=Hn++,Vn[e[Qn]]={}),Vn[e[Qn]]}function Kn(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function $n(e,t){var n,r=Kn(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Kn(r)}}function Yn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var Xn=n.canUseDOM&&"documentMode"in document&&11>=document.documentMode,Gn={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Zn=null,Jn=null,er=null,tr=!1;function nr(e,t){if(tr||null==Zn||Zn!==l())return null;var n=Zn;return"selectionStart"in n&&Yn(n)?n={start:n.selectionStart,end:n.selectionEnd}:window.getSelection?n={anchorNode:(n=window.getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}:n=void 0,er&&o(er,n)?null:(er=n,(e=be.getPooled(Gn.select,Jn,e,t)).type="select",e.target=Zn,J(e),e)}var rr={eventTypes:Gn,extractEvents:function(e,t,n,r){var a,l=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(a=!l)){e:{l=qn(l),a=k.onSelect;for(var o=0;ot)){e=-1;for(var n=[],r=pr;null!==r;){var a=r.timeoutTime;-1!==a&&a<=t?n.push(r):-1!==a&&(-1===e||at&&(t=8),kr=t
=t.length||c("93"),t=t[0]),n=""+t),null==n&&(n="")),e._wrapperState={initialValue:""+n}}function Ir(e,t){var n=t.value;null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&(e.defaultValue=n)),null!=t.defaultValue&&(e.defaultValue=t.defaultValue)}function Mr(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)}var Rr={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function zr(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Or(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?zr(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var Dr=void 0,Lr=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,a){MSApp.execUnsafeLocalFunction(function(){return e(t,n)})}:e}(function(e,t){if(e.namespaceURI!==Rr.svg||"innerHTML"in e)e.innerHTML=t;else{for((Dr=Dr||document.createElement("div")).innerHTML="",t=Dr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ar(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var jr={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Wr=["Webkit","ms","Moz","O"];function Br(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),a=n,l=t[n];a=null==l||"boolean"==typeof l||""===l?"":r||"number"!=typeof l||0===l||jr.hasOwnProperty(a)&&jr[a]?(""+l).trim():l+"px","float"===n&&(n="cssFloat"),r?e.setProperty(n,a):e[n]=a}}Object.keys(jr).forEach(function(e){Wr.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),jr[t]=jr[e]})});var Vr=r({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Hr(e,t,n){t&&(Vr[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&c("137",e,n()),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&c("60"),"object"==typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML||c("61")),null!=t.style&&"object"!=typeof t.style&&c("62",n()))}function Qr(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var qr=a.thatReturns("");function Kr(e,t){var n=qn(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=k[t];for(var r=0;r<\/script>",e=e.removeChild(e.firstChild)):e="string"==typeof t.is?n.createElement(e,{is:t.is}):n.createElement(e):e=n.createElementNS(r,e),e}function Yr(e,t){return(9===t.nodeType?t:t.ownerDocument).createTextNode(e)}function Xr(e,t,n,l){var o=Qr(t,n);switch(t){case"iframe":case"object":Ln("load",e);var i=n;break;case"video":case"audio":for(i=0;ida||(e.current=fa[da],fa[da]=null,da--)}function ha(e,t){fa[++da]=e.current,e.current=t}var va=pa(u),ga=pa(!1),ya=u;function ba(e){return wa(e)?ya:va.current}function ka(e,t){var n=e.type.contextTypes;if(!n)return u;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var a,l={};for(a in n)l[a]=t[a];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function wa(e){return 2===e.tag&&null!=e.type.childContextTypes}function xa(e){wa(e)&&(ma(ga,e),ma(va,e))}function Ca(e){ma(ga,e),ma(va,e)}function Ea(e,t,n){va.current!==u&&c("168"),ha(va,t,e),ha(ga,n,e)}function Ta(e,t){var n=e.stateNode,a=e.type.childContextTypes;if("function"!=typeof n.getChildContext)return t;for(var l in n=n.getChildContext())l in a||c("108",wt(e)||"Unknown",l);return r({},t,n)}function _a(e){if(!wa(e))return!1;var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||u,ya=va.current,ha(va,t,e),ha(ga,ga.current,e),!0}function Sa(e,t){var n=e.stateNode;if(n||c("169"),t){var r=Ta(e,ya);n.__reactInternalMemoizedMergedChildContext=r,ma(ga,e),ma(va,e),ha(va,r,e)}else ma(ga,e);ha(ga,t,e)}function Na(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=null,this.index=0,this.ref=null,this.pendingProps=t,this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.expirationTime=0,this.alternate=null}function Pa(e,t,n){var r=e.alternate;return null===r?((r=new Na(e.tag,t,e.key,e.mode)).type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.effectTag=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.expirationTime=n,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Ua(e,t,n){var r=e.type,a=e.key;if(e=e.props,"function"==typeof r)var l=r.prototype&&r.prototype.isReactComponent?2:0;else if("string"==typeof r)l=5;else switch(r){case ft:return Fa(e.children,t,n,a);case vt:l=11,t|=3;break;case dt:l=11,t|=2;break;case pt:return(r=new Na(15,e,a,4|t)).type=pt,r.expirationTime=n,r;case yt:l=16,t|=2;break;default:e:{switch("object"==typeof r&&null!==r?r.$$typeof:null){case mt:l=13;break e;case ht:l=12;break e;case gt:l=14;break e;default:c("130",null==r?r:typeof r,"")}l=void 0}}return(t=new Na(l,e,a,t)).type=r,t.expirationTime=n,t}function Fa(e,t,n,r){return(e=new Na(10,e,r,t)).expirationTime=n,e}function Ia(e,t,n){return(e=new Na(6,e,null,t)).expirationTime=n,e}function Ma(e,t,n){return(t=new Na(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ra(e,t,n){return e={current:t=new Na(3,null,null,t?3:0),containerInfo:e,pendingChildren:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,pendingCommitExpirationTime:0,finishedWork:null,context:null,pendingContext:null,hydrate:n,remainingExpirationTime:0,firstBatch:null,nextScheduledRoot:null},t.stateNode=e}var za=null,Oa=null;function Da(e){return function(t){try{return e(t)}catch(e){}}}function La(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);za=Da(function(e){return t.onCommitFiberRoot(n,e)}),Oa=Da(function(e){return t.onCommitFiberUnmount(n,e)})}catch(e){}return!0}function Aa(e){"function"==typeof za&&za(e)}function ja(e){"function"==typeof Oa&&Oa(e)}var Wa=!1;function Ba(e){return{expirationTime:0,baseState:e,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Va(e){return{expirationTime:e.expirationTime,baseState:e.baseState,firstUpdate:e.firstUpdate,lastUpdate:e.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Ha(e){return{expirationTime:e,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Qa(e,t,n){null===e.lastUpdate?e.firstUpdate=e.lastUpdate=t:(e.lastUpdate.next=t,e.lastUpdate=t),(0===e.expirationTime||e.expirationTime>n)&&(e.expirationTime=n)}function qa(e,t,n){var r=e.alternate;if(null===r){var a=e.updateQueue,l=null;null===a&&(a=e.updateQueue=Ba(e.memoizedState))}else a=e.updateQueue,l=r.updateQueue,null===a?null===l?(a=e.updateQueue=Ba(e.memoizedState),l=r.updateQueue=Ba(r.memoizedState)):a=e.updateQueue=Va(l):null===l&&(l=r.updateQueue=Va(a));null===l||a===l?Qa(a,t,n):null===a.lastUpdate||null===l.lastUpdate?(Qa(a,t,n),Qa(l,t,n)):(Qa(a,t,n),l.lastUpdate=t)}function Ka(e,t,n){var r=e.updateQueue;null===(r=null===r?e.updateQueue=Ba(e.memoizedState):$a(e,r)).lastCapturedUpdate?r.firstCapturedUpdate=r.lastCapturedUpdate=t:(r.lastCapturedUpdate.next=t,r.lastCapturedUpdate=t),(0===r.expirationTime||r.expirationTime>n)&&(r.expirationTime=n)}function $a(e,t){var n=e.alternate;return null!==n&&t===n.updateQueue&&(t=e.updateQueue=Va(t)),t}function Ya(e,t,n,a,l,o){switch(n.tag){case 1:return"function"==typeof(e=n.payload)?e.call(o,a,l):e;case 3:e.effectTag=-1025&e.effectTag|64;case 0:if(null==(l="function"==typeof(e=n.payload)?e.call(o,a,l):e))break;return r({},a,l);case 2:Wa=!0}return a}function Xa(e,t,n,r,a){if(Wa=!1,!(0===t.expirationTime||t.expirationTime>a)){for(var l=(t=$a(e,t)).baseState,o=null,i=0,u=t.firstUpdate,c=l;null!==u;){var s=u.expirationTime;s>a?(null===o&&(o=u,l=c),(0===i||i>s)&&(i=s)):(c=Ya(e,t,u,c,n,r),null!==u.callback&&(e.effectTag|=32,u.nextEffect=null,null===t.lastEffect?t.firstEffect=t.lastEffect=u:(t.lastEffect.nextEffect=u,t.lastEffect=u))),u=u.next}for(s=null,u=t.firstCapturedUpdate;null!==u;){var f=u.expirationTime;f>a?(null===s&&(s=u,null===o&&(l=c)),(0===i||i>f)&&(i=f)):(c=Ya(e,t,u,c,n,r),null!==u.callback&&(e.effectTag|=32,u.nextEffect=null,null===t.lastCapturedEffect?t.firstCapturedEffect=t.lastCapturedEffect=u:(t.lastCapturedEffect.nextEffect=u,t.lastCapturedEffect=u))),u=u.next}null===o&&(t.lastUpdate=null),null===s?t.lastCapturedUpdate=null:e.effectTag|=32,null===o&&null===s&&(l=c),t.baseState=l,t.firstUpdate=o,t.firstCapturedUpdate=s,t.expirationTime=i,e.memoizedState=c}}function Ga(e,t){"function"!=typeof e&&c("191",e),e.call(t)}function Za(e,t,n){for(null!==t.firstCapturedUpdate&&(null!==t.lastUpdate&&(t.lastUpdate.next=t.firstCapturedUpdate,t.lastUpdate=t.lastCapturedUpdate),t.firstCapturedUpdate=t.lastCapturedUpdate=null),e=t.firstEffect,t.firstEffect=t.lastEffect=null;null!==e;){var r=e.callback;null!==r&&(e.callback=null,Ga(r,n)),e=e.nextEffect}for(e=t.firstCapturedEffect,t.firstCapturedEffect=t.lastCapturedEffect=null;null!==e;)null!==(t=e.callback)&&(e.callback=null,Ga(t,n)),e=e.nextEffect}function Ja(e,t){return{value:e,source:t,stack:xt(t)}}var el=pa(null),tl=pa(null),nl=pa(0);function rl(e){var t=e.type._context;ha(nl,t._changedBits,e),ha(tl,t._currentValue,e),ha(el,e,e),t._currentValue=e.pendingProps.value,t._changedBits=e.stateNode}function al(e){var t=nl.current,n=tl.current;ma(el,e),ma(tl,e),ma(nl,e),(e=e.type._context)._currentValue=n,e._changedBits=t}var ll={},ol=pa(ll),il=pa(ll),ul=pa(ll);function cl(e){return e===ll&&c("174"),e}function sl(e,t){ha(ul,t,e),ha(il,e,e),ha(ol,ll,e);var n=t.nodeType;switch(n){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Or(null,"");break;default:t=Or(t=(n=8===n?t.parentNode:t).namespaceURI||null,n=n.tagName)}ma(ol,e),ha(ol,t,e)}function fl(e){ma(ol,e),ma(il,e),ma(ul,e)}function dl(e){il.current===e&&(ma(ol,e),ma(il,e))}function pl(e,t,n){var a=e.memoizedState;a=null==(t=t(n,a))?a:r({},a,t),e.memoizedState=a,null!==(e=e.updateQueue)&&0===e.expirationTime&&(e.baseState=a)}var ml={isMounted:function(e){return!!(e=e._reactInternalFiber)&&2===dn(e)},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=No(),a=Ha(r=_o(r,e));a.payload=t,null!=n&&(a.callback=n),qa(e,a,r),So(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=No(),a=Ha(r=_o(r,e));a.tag=1,a.payload=t,null!=n&&(a.callback=n),qa(e,a,r),So(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=No(),r=Ha(n=_o(n,e));r.tag=2,null!=t&&(r.callback=t),qa(e,r,n),So(e,n)}};function hl(e,t,n,r,a,l){var i=e.stateNode;return e=e.type,"function"==typeof i.shouldComponentUpdate?i.shouldComponentUpdate(n,a,l):!e.prototype||!e.prototype.isPureReactComponent||(!o(t,n)||!o(r,a))}function vl(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ml.enqueueReplaceState(t,t.state,null)}function gl(e,t){var n=e.type,r=e.stateNode,a=e.pendingProps,l=ba(e);r.props=a,r.state=e.memoizedState,r.refs=u,r.context=ka(e,l),null!==(l=e.updateQueue)&&(Xa(e,l,a,r,t),r.state=e.memoizedState),"function"==typeof(l=e.type.getDerivedStateFromProps)&&(pl(e,l,a),r.state=e.memoizedState),"function"==typeof n.getDerivedStateFromProps||"function"==typeof r.getSnapshotBeforeUpdate||"function"!=typeof r.UNSAFE_componentWillMount&&"function"!=typeof r.componentWillMount||(n=r.state,"function"==typeof r.componentWillMount&&r.componentWillMount(),"function"==typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount(),n!==r.state&&ml.enqueueReplaceState(r,r.state,null),null!==(l=e.updateQueue)&&(Xa(e,l,a,r,t),r.state=e.memoizedState)),"function"==typeof r.componentDidMount&&(e.effectTag|=4)}var yl=Array.isArray;function bl(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){n=n._owner;var r=void 0;n&&(2!==n.tag&&c("110"),r=n.stateNode),r||c("147",e);var a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:((t=function(e){var t=r.refs===u?r.refs={}:r.refs;null===e?delete t[a]:t[a]=e})._stringRef=a,t)}"string"!=typeof e&&c("148"),n._owner||c("254",e)}return e}function kl(e,t){"textarea"!==e.type&&c("31","[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,"")}function wl(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function a(e,t,n){return(e=Pa(e,t,n)).index=0,e.sibling=null,e}function l(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)h?(v=f,f=null):v=f.sibling;var g=p(a,f,i[h],u);if(null===g){null===f&&(f=v);break}e&&f&&null===g.alternate&&t(a,f),o=l(g,o,h),null===s?c=g:s.sibling=g,s=g,f=v}if(h===i.length)return n(a,f),c;if(null===f){for(;hv?(g=h,h=null):g=h.sibling;var b=p(a,h,y.value,u);if(null===b){h||(h=g);break}e&&h&&null===b.alternate&&t(a,h),o=l(b,o,v),null===f?s=b:f.sibling=b,f=b,h=g}if(y.done)return n(a,h),s;if(null===h){for(;!y.done;v++,y=i.next())null!==(y=d(a,y.value,u))&&(o=l(y,o,v),null===f?s=y:f.sibling=y,f=y);return s}for(h=r(a,h);!y.done;v++,y=i.next())null!==(y=m(h,a,v,y.value,u))&&(e&&null!==y.alternate&&h.delete(null===y.key?v:y.key),o=l(y,o,v),null===f?s=y:f.sibling=y,f=y);return e&&h.forEach(function(e){return t(a,e)}),s}return function(e,r,l,i){var u="object"==typeof l&&null!==l&&l.type===ft&&null===l.key;u&&(l=l.props.children);var s="object"==typeof l&&null!==l;if(s)switch(l.$$typeof){case ct:e:{for(s=l.key,u=r;null!==u;){if(u.key===s){if(10===u.tag?l.type===ft:u.type===l.type){n(e,u.sibling),(r=a(u,l.type===ft?l.props.children:l.props,i)).ref=bl(e,u,l),r.return=e,e=r;break e}n(e,u);break}t(e,u),u=u.sibling}l.type===ft?((r=Fa(l.props.children,e.mode,i,l.key)).return=e,e=r):((i=Ua(l,e.mode,i)).ref=bl(e,r,l),i.return=e,e=i)}return o(e);case st:e:{for(u=l.key;null!==r;){if(r.key===u){if(4===r.tag&&r.stateNode.containerInfo===l.containerInfo&&r.stateNode.implementation===l.implementation){n(e,r.sibling),(r=a(r,l.children||[],i)).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Ma(l,e.mode,i)).return=e,e=r}return o(e)}if("string"==typeof l||"number"==typeof l)return l=""+l,null!==r&&6===r.tag?(n(e,r.sibling),(r=a(r,l,i)).return=e,e=r):(n(e,r),(r=Ia(l,e.mode,i)).return=e,e=r),o(e);if(yl(l))return h(e,r,l,i);if(kt(l))return v(e,r,l,i);if(s&&kl(e,l),void 0===l&&!u)switch(e.tag){case 2:case 1:c("152",(i=e.type).displayName||i.name||"Component")}return n(e,r)}}var xl=wl(!0),Cl=wl(!1),El=null,Tl=null,_l=!1;function Sl(e,t){var n=new Na(5,null,null,0);n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Nl(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function Pl(e){if(_l){var t=Tl;if(t){var n=t;if(!Nl(e,t)){if(!(t=ca(n))||!Nl(e,t))return e.effectTag|=2,_l=!1,void(El=e);Sl(El,n)}El=e,Tl=sa(t)}else e.effectTag|=2,_l=!1,El=e}}function Ul(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag;)e=e.return;El=e}function Fl(e){if(e!==El)return!1;if(!_l)return Ul(e),_l=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!la(t,e.memoizedProps))for(t=Tl;t;)Sl(e,t),t=ca(t);return Ul(e),Tl=El?ca(e.stateNode):null,!0}function Il(){Tl=El=null,_l=!1}function Ml(e,t,n){Rl(e,t,n,t.expirationTime)}function Rl(e,t,n,r){t.child=null===e?Cl(t,null,n,r):xl(t,e.child,n,r)}function zl(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function Ol(e,t,n,r,a){zl(e,t);var l=0!=(64&t.effectTag);if(!n&&!l)return r&&Sa(t,!1),jl(e,t);n=t.stateNode,it.current=t;var o=l?null:n.render();return t.effectTag|=1,l&&(Rl(e,t,null,a),t.child=null),Rl(e,t,o,a),t.memoizedState=n.state,t.memoizedProps=n.props,r&&Sa(t,!0),t.child}function Dl(e){var t=e.stateNode;t.pendingContext?Ea(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ea(e,t.context,!1),sl(e,t.containerInfo)}function Ll(e,t,n,r){var a=e.child;for(null!==a&&(a.return=e);null!==a;){switch(a.tag){case 12:var l=0|a.stateNode;if(a.type===t&&0!=(l&n)){for(l=a;null!==l;){var o=l.alternate;if(0===l.expirationTime||l.expirationTime>r)l.expirationTime=r,null!==o&&(0===o.expirationTime||o.expirationTime>r)&&(o.expirationTime=r);else{if(null===o||!(0===o.expirationTime||o.expirationTime>r))break;o.expirationTime=r}l=l.return}l=null}else l=a.child;break;case 13:l=a.type===e.type?null:a.child;break;default:l=a.child}if(null!==l)l.return=a;else for(l=a;null!==l;){if(l===e){l=null;break}if(null!==(a=l.sibling)){a.return=l.return,l=a;break}l=l.return}a=l}}function Al(e,t,n){var r=t.type._context,a=t.pendingProps,l=t.memoizedProps,o=!0;if(ga.current)o=!1;else if(l===a)return t.stateNode=0,rl(t),jl(e,t);var i=a.value;if(t.memoizedProps=a,null===l)i=1073741823;else if(l.value===a.value){if(l.children===a.children&&o)return t.stateNode=0,rl(t),jl(e,t);i=0}else{var u=l.value;if(u===i&&(0!==u||1/u==1/i)||u!=u&&i!=i){if(l.children===a.children&&o)return t.stateNode=0,rl(t),jl(e,t);i=0}else if(i="function"==typeof r._calculateChangedBits?r._calculateChangedBits(u,i):1073741823,0===(i|=0)){if(l.children===a.children&&o)return t.stateNode=0,rl(t),jl(e,t)}else Ll(t,r,i,n)}return t.stateNode=i,rl(t),Ml(e,t,a.children),t.child}function jl(e,t){if(null!==e&&t.child!==e.child&&c("153"),null!==t.child){var n=Pa(e=t.child,e.pendingProps,e.expirationTime);for(t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Pa(e,e.pendingProps,e.expirationTime)).return=t;n.sibling=null}return t.child}function Wl(e,t,n){if(0===t.expirationTime||t.expirationTime>n){switch(t.tag){case 3:Dl(t);break;case 2:_a(t);break;case 4:sl(t,t.stateNode.containerInfo);break;case 13:rl(t)}return null}switch(t.tag){case 0:null!==e&&c("155");var r=t.type,a=t.pendingProps,l=ba(t);return r=r(a,l=ka(t,l)),t.effectTag|=1,"object"==typeof r&&null!==r&&"function"==typeof r.render&&void 0===r.$$typeof?(l=t.type,t.tag=2,t.memoizedState=null!==r.state&&void 0!==r.state?r.state:null,"function"==typeof(l=l.getDerivedStateFromProps)&&pl(t,l,a),a=_a(t),r.updater=ml,t.stateNode=r,r._reactInternalFiber=t,gl(t,n),e=Ol(e,t,!0,a,n)):(t.tag=1,Ml(e,t,r),t.memoizedProps=a,e=t.child),e;case 1:return a=t.type,n=t.pendingProps,ga.current||t.memoizedProps!==n?(a=a(n,r=ka(t,r=ba(t))),t.effectTag|=1,Ml(e,t,a),t.memoizedProps=n,e=t.child):e=jl(e,t),e;case 2:if(a=_a(t),null===e)if(null===t.stateNode){var o=t.pendingProps,i=t.type;r=ba(t);var s=2===t.tag&&null!=t.type.contextTypes;o=new i(o,l=s?ka(t,r):u),t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,o.updater=ml,t.stateNode=o,o._reactInternalFiber=t,s&&((s=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=r,s.__reactInternalMemoizedMaskedChildContext=l),gl(t,n),r=!0}else{i=t.type,r=t.stateNode,s=t.memoizedProps,l=t.pendingProps,r.props=s;var f=r.context;o=ka(t,o=ba(t));var d=i.getDerivedStateFromProps;(i="function"==typeof d||"function"==typeof r.getSnapshotBeforeUpdate)||"function"!=typeof r.UNSAFE_componentWillReceiveProps&&"function"!=typeof r.componentWillReceiveProps||(s!==l||f!==o)&&vl(t,r,l,o),Wa=!1;var p=t.memoizedState;f=r.state=p;var m=t.updateQueue;null!==m&&(Xa(t,m,l,r,n),f=t.memoizedState),s!==l||p!==f||ga.current||Wa?("function"==typeof d&&(pl(t,d,l),f=t.memoizedState),(s=Wa||hl(t,s,l,p,f,o))?(i||"function"!=typeof r.UNSAFE_componentWillMount&&"function"!=typeof r.componentWillMount||("function"==typeof r.componentWillMount&&r.componentWillMount(),"function"==typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount()),"function"==typeof r.componentDidMount&&(t.effectTag|=4)):("function"==typeof r.componentDidMount&&(t.effectTag|=4),t.memoizedProps=l,t.memoizedState=f),r.props=l,r.state=f,r.context=o,r=s):("function"==typeof r.componentDidMount&&(t.effectTag|=4),r=!1)}else i=t.type,r=t.stateNode,l=t.memoizedProps,s=t.pendingProps,r.props=l,f=r.context,o=ka(t,o=ba(t)),(i="function"==typeof(d=i.getDerivedStateFromProps)||"function"==typeof r.getSnapshotBeforeUpdate)||"function"!=typeof r.UNSAFE_componentWillReceiveProps&&"function"!=typeof r.componentWillReceiveProps||(l!==s||f!==o)&&vl(t,r,s,o),Wa=!1,f=t.memoizedState,p=r.state=f,null!==(m=t.updateQueue)&&(Xa(t,m,s,r,n),p=t.memoizedState),l!==s||f!==p||ga.current||Wa?("function"==typeof d&&(pl(t,d,s),p=t.memoizedState),(d=Wa||hl(t,l,s,f,p,o))?(i||"function"!=typeof r.UNSAFE_componentWillUpdate&&"function"!=typeof r.componentWillUpdate||("function"==typeof r.componentWillUpdate&&r.componentWillUpdate(s,p,o),"function"==typeof r.UNSAFE_componentWillUpdate&&r.UNSAFE_componentWillUpdate(s,p,o)),"function"==typeof r.componentDidUpdate&&(t.effectTag|=4),"function"==typeof r.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof r.componentDidUpdate||l===e.memoizedProps&&f===e.memoizedState||(t.effectTag|=4),"function"!=typeof r.getSnapshotBeforeUpdate||l===e.memoizedProps&&f===e.memoizedState||(t.effectTag|=256),t.memoizedProps=s,t.memoizedState=p),r.props=s,r.state=p,r.context=o,r=d):("function"!=typeof r.componentDidUpdate||l===e.memoizedProps&&f===e.memoizedState||(t.effectTag|=4),"function"!=typeof r.getSnapshotBeforeUpdate||l===e.memoizedProps&&f===e.memoizedState||(t.effectTag|=256),r=!1);return Ol(e,t,r,a,n);case 3:return Dl(t),null!==(a=t.updateQueue)?(r=null!==(r=t.memoizedState)?r.element:null,Xa(t,a,t.pendingProps,null,n),(a=t.memoizedState.element)===r?(Il(),e=jl(e,t)):(r=t.stateNode,(r=(null===e||null===e.child)&&r.hydrate)&&(Tl=sa(t.stateNode.containerInfo),El=t,r=_l=!0),r?(t.effectTag|=2,t.child=Cl(t,null,a,n)):(Il(),Ml(e,t,a)),e=t.child)):(Il(),e=jl(e,t)),e;case 5:return cl(ul.current),(a=cl(ol.current))!==(r=Or(a,t.type))&&(ha(il,t,t),ha(ol,r,t)),null===e&&Pl(t),a=t.type,s=t.memoizedProps,r=t.pendingProps,l=null!==e?e.memoizedProps:null,ga.current||s!==r||((s=1&t.mode&&!!r.hidden)&&(t.expirationTime=1073741823),s&&1073741823===n)?(s=r.children,la(a,r)?s=null:l&&la(a,l)&&(t.effectTag|=16),zl(e,t),1073741823!==n&&1&t.mode&&r.hidden?(t.expirationTime=1073741823,t.memoizedProps=r,e=null):(Ml(e,t,s),t.memoizedProps=r,e=t.child)):e=jl(e,t),e;case 6:return null===e&&Pl(t),t.memoizedProps=t.pendingProps,null;case 16:return null;case 4:return sl(t,t.stateNode.containerInfo),a=t.pendingProps,ga.current||t.memoizedProps!==a?(null===e?t.child=xl(t,null,a,n):Ml(e,t,a),t.memoizedProps=a,e=t.child):e=jl(e,t),e;case 14:return a=t.type.render,n=t.pendingProps,r=t.ref,ga.current||t.memoizedProps!==n||r!==(null!==e?e.ref:null)?(Ml(e,t,a=a(n,r)),t.memoizedProps=n,e=t.child):e=jl(e,t),e;case 10:return n=t.pendingProps,ga.current||t.memoizedProps!==n?(Ml(e,t,n),t.memoizedProps=n,e=t.child):e=jl(e,t),e;case 11:return n=t.pendingProps.children,ga.current||null!==n&&t.memoizedProps!==n?(Ml(e,t,n),t.memoizedProps=n,e=t.child):e=jl(e,t),e;case 15:return n=t.pendingProps,t.memoizedProps===n?e=jl(e,t):(Ml(e,t,n.children),t.memoizedProps=n,e=t.child),e;case 13:return Al(e,t,n);case 12:e:if(r=t.type,l=t.pendingProps,s=t.memoizedProps,a=r._currentValue,o=r._changedBits,ga.current||0!==o||s!==l){if(t.memoizedProps=l,null==(i=l.unstable_observedBits)&&(i=1073741823),t.stateNode=i,0!=(o&i))Ll(t,r,o,n);else if(s===l){e=jl(e,t);break e}n=(n=l.children)(a),t.effectTag|=1,Ml(e,t,n),e=t.child}else e=jl(e,t);return e;default:c("156")}}function Bl(e){e.effectTag|=4}var Vl=void 0,Hl=void 0,Ql=void 0;function ql(e,t){var n=t.pendingProps;switch(t.tag){case 1:return null;case 2:return xa(t),null;case 3:fl(t),Ca(t);var r=t.stateNode;return r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Fl(t),t.effectTag&=-3),Vl(t),null;case 5:dl(t),r=cl(ul.current);var a=t.type;if(null!==e&&null!=t.stateNode){var l=e.memoizedProps,o=t.stateNode,i=cl(ol.current);o=Gr(o,a,l,n,r),Hl(e,t,o,a,l,n,r,i),e.ref!==t.ref&&(t.effectTag|=128)}else{if(!n)return null===t.stateNode&&c("166"),null;if(e=cl(ol.current),Fl(t))n=t.stateNode,a=t.type,l=t.memoizedProps,n[j]=t,n[W]=l,r=Jr(n,a,l,e,r),t.updateQueue=r,null!==r&&Bl(t);else{(e=$r(a,n,r,e))[j]=t,e[W]=n;e:for(l=t.child;null!==l;){if(5===l.tag||6===l.tag)e.appendChild(l.stateNode);else if(4!==l.tag&&null!==l.child){l.child.return=l,l=l.child;continue}if(l===t)break;for(;null===l.sibling;){if(null===l.return||l.return===t)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}Xr(e,a,n,r),aa(a,n)&&Bl(t),t.stateNode=e}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)Ql(e,t,e.memoizedProps,n);else{if("string"!=typeof n)return null===t.stateNode&&c("166"),null;r=cl(ul.current),cl(ol.current),Fl(t)?(r=t.stateNode,n=t.memoizedProps,r[j]=t,ea(r,n)&&Bl(t)):((r=Yr(n,r))[j]=t,t.stateNode=r)}return null;case 14:case 16:case 10:case 11:case 15:return null;case 4:return fl(t),Vl(t),null;case 13:return al(t),null;case 12:return null;case 0:c("167");default:c("156")}}function Kl(e,t){var n=t.source;null===t.stack&&null!==n&&xt(n),null!==n&&wt(n),t=t.value,null!==e&&2===e.tag&&wt(e);try{t&&t.suppressReactErrorLogging||console.error(t)}catch(e){e&&e.suppressReactErrorLogging||console.error(e)}}function $l(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){Eo(e,t)}else t.current=null}function Yl(e){switch("function"==typeof ja&&ja(e),e.tag){case 2:$l(e);var t=e.stateNode;if("function"==typeof t.componentWillUnmount)try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){Eo(e,t)}break;case 5:$l(e);break;case 4:Zl(e)}}function Xl(e){return 5===e.tag||3===e.tag||4===e.tag}function Gl(e){e:{for(var t=e.return;null!==t;){if(Xl(t)){var n=t;break e}t=t.return}c("160"),n=void 0}var r=t=void 0;switch(n.tag){case 5:t=n.stateNode,r=!1;break;case 3:case 4:t=n.stateNode.containerInfo,r=!0;break;default:c("161")}16&n.effectTag&&(Ar(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||Xl(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}for(var a=e;;){if(5===a.tag||6===a.tag)if(n)if(r){var l=t,o=a.stateNode,i=n;8===l.nodeType?l.parentNode.insertBefore(o,i):l.insertBefore(o,i)}else t.insertBefore(a.stateNode,n);else r?(l=t,o=a.stateNode,8===l.nodeType?l.parentNode.insertBefore(o,l):l.appendChild(o)):t.appendChild(a.stateNode);else if(4!==a.tag&&null!==a.child){a.child.return=a,a=a.child;continue}if(a===e)break;for(;null===a.sibling;){if(null===a.return||a.return===e)return;a=a.return}a.sibling.return=a.return,a=a.sibling}}function Zl(e){for(var t=e,n=!1,r=void 0,a=void 0;;){if(!n){n=t.return;e:for(;;){switch(null===n&&c("160"),n.tag){case 5:r=n.stateNode,a=!1;break e;case 3:case 4:r=n.stateNode.containerInfo,a=!0;break e}n=n.return}n=!0}if(5===t.tag||6===t.tag){e:for(var l=t,o=l;;)if(Yl(o),null!==o.child&&4!==o.tag)o.child.return=o,o=o.child;else{if(o===l)break;for(;null===o.sibling;){if(null===o.return||o.return===l)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}a?(l=r,o=t.stateNode,8===l.nodeType?l.parentNode.removeChild(o):l.removeChild(o)):r.removeChild(t.stateNode)}else if(4===t.tag?r=t.stateNode.containerInfo:Yl(t),null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;4===(t=t.return).tag&&(n=!1)}t.sibling.return=t.return,t=t.sibling}}function Jl(e,t){switch(t.tag){case 2:break;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps;e=null!==e?e.memoizedProps:r;var a=t.type,l=t.updateQueue;t.updateQueue=null,null!==l&&(n[W]=r,Zr(n,l,a,e,r))}break;case 6:null===t.stateNode&&c("162"),t.stateNode.nodeValue=t.memoizedProps;break;case 3:case 15:case 16:break;default:c("163")}}function eo(e,t,n){(n=Ha(n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ii(r),Kl(e,t)},n}function to(e,t,n){(n=Ha(n)).tag=3;var r=e.stateNode;return null!==r&&"function"==typeof r.componentDidCatch&&(n.callback=function(){null===bo?bo=new Set([this]):bo.add(this);var n=t.value,r=t.stack;Kl(e,t),this.componentDidCatch(n,{componentStack:null!==r?r:""})}),n}function no(e,t,n,r,a,l){n.effectTag|=512,n.firstEffect=n.lastEffect=null,r=Ja(r,n),e=t;do{switch(e.tag){case 3:return e.effectTag|=1024,void Ka(e,r=eo(e,r,l),l);case 2:if(t=r,n=e.stateNode,0==(64&e.effectTag)&&null!==n&&"function"==typeof n.componentDidCatch&&(null===bo||!bo.has(n)))return e.effectTag|=1024,void Ka(e,r=to(e,t,l),l)}e=e.return}while(null!==e)}function ro(e){switch(e.tag){case 2:xa(e);var t=e.effectTag;return 1024&t?(e.effectTag=-1025&t|64,e):null;case 3:return fl(e),Ca(e),1024&(t=e.effectTag)?(e.effectTag=-1025&t|64,e):null;case 5:return dl(e),null;case 16:return 1024&(t=e.effectTag)?(e.effectTag=-1025&t|64,e):null;case 4:return fl(e),null;case 13:return al(e),null;default:return null}}Vl=function(){},Hl=function(e,t,n){(t.updateQueue=n)&&Bl(t)},Ql=function(e,t,n,r){n!==r&&Bl(t)};var ao=oa(),lo=2,oo=ao,io=0,uo=0,co=!1,so=null,fo=null,po=0,mo=-1,ho=!1,vo=null,go=!1,yo=!1,bo=null;function ko(){if(null!==so)for(var e=so.return;null!==e;){var t=e;switch(t.tag){case 2:xa(t);break;case 3:fl(t),Ca(t);break;case 5:dl(t);break;case 4:fl(t);break;case 13:al(t)}e=e.return}fo=null,po=0,mo=-1,ho=!1,so=null,yo=!1}function wo(e){for(;;){var t=e.alternate,n=e.return,r=e.sibling;if(0==(512&e.effectTag)){t=ql(t,e,po);var a=e;if(1073741823===po||1073741823!==a.expirationTime){var l=0;switch(a.tag){case 3:case 2:var o=a.updateQueue;null!==o&&(l=o.expirationTime)}for(o=a.child;null!==o;)0!==o.expirationTime&&(0===l||l>o.expirationTime)&&(l=o.expirationTime),o=o.sibling;a.expirationTime=l}if(null!==t)return t;if(null!==n&&0==(512&n.effectTag)&&(null===n.firstEffect&&(n.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=e.firstEffect),n.lastEffect=e.lastEffect),1Lo)&&(Lo=e),e}function So(e,t){for(;null!==e;){if((0===e.expirationTime||e.expirationTime>t)&&(e.expirationTime=t),null!==e.alternate&&(0===e.alternate.expirationTime||e.alternate.expirationTime>t)&&(e.alternate.expirationTime=t),null===e.return){if(3!==e.tag)break;var n=e.stateNode;!co&&0!==po&&tKo&&c("185")}e=e.return}}function No(){return oo=oa()-ao,lo=2+(oo/10|0)}function Po(e){var t=uo;uo=2+25*(1+((No()-2+500)/25|0));try{return e()}finally{uo=t}}function Uo(e,t,n,r,a){var l=uo;uo=1;try{return e(t,n,r,a)}finally{uo=l}}var Fo=null,Io=null,Mo=0,Ro=void 0,zo=!1,Oo=null,Do=0,Lo=0,Ao=!1,jo=!1,Wo=null,Bo=null,Vo=!1,Ho=!1,Qo=!1,qo=null,Ko=1e3,$o=0,Yo=1;function Xo(e){if(0!==Mo){if(e>Mo)return;null!==Ro&&ua(Ro)}var t=oa()-ao;Mo=e,Ro=ia(Jo,{timeout:10*(e-2)-t})}function Go(e,t){if(null===e.nextScheduledRoot)e.remainingExpirationTime=t,null===Io?(Fo=Io=e,e.nextScheduledRoot=e):(Io=Io.nextScheduledRoot=e).nextScheduledRoot=Fo;else{var n=e.remainingExpirationTime;(0===n||t=Do)&&(!Ao||No()>=Do);)No(),ai(Oo,Do,!Ao),Zo();else for(;null!==Oo&&0!==Do&&(0===e||e>=Do);)ai(Oo,Do,!1),Zo();null!==Bo&&(Mo=0,Ro=null),0!==Do&&Xo(Do),Bo=null,Ao=!1,ri()}function ni(e,t){zo&&c("253"),Oo=e,Do=t,ai(e,t,!1),ei(),ri()}function ri(){if($o=0,null!==qo){var e=qo;qo=null;for(var t=0;tw&&(x=w,w=N,N=x),x=$n(_,N),C=$n(_,w),x&&C&&(1!==S.rangeCount||S.anchorNode!==x.node||S.anchorOffset!==x.offset||S.focusNode!==C.node||S.focusOffset!==C.offset)&&((E=document.createRange()).setStart(x.node,x.offset),S.removeAllRanges(),N>w?(S.addRange(E),S.extend(C.node,C.offset)):(E.setEnd(C.node,C.offset),S.addRange(E))))),S=[];for(N=_;N=N.parentNode;)1===N.nodeType&&S.push({element:N,left:N.scrollLeft,top:N.scrollTop});for("function"==typeof _.focus&&_.focus(),_=0;_Yo)&&(Ao=!0)}function ii(e){null===Oo&&c("246"),Oo.remainingExpirationTime=0,jo||(jo=!0,Wo=e)}function ui(e){null===Oo&&c("246"),Oo.remainingExpirationTime=e}function ci(e,t){var n=Vo;Vo=!0;try{return e(t)}finally{(Vo=n)||zo||ei()}}function si(e,t){if(Vo&&!Ho){Ho=!0;try{return e(t)}finally{Ho=!1}}return e(t)}function fi(e,t){zo&&c("187");var n=Vo;Vo=!0;try{return Uo(e,t)}finally{Vo=n,ei()}}function di(e,t,n){if(Qo)return e(t,n);Vo||zo||0===Lo||(ti(Lo,!1,null),Lo=0);var r=Qo,a=Vo;Vo=Qo=!0;try{return e(t,n)}finally{Qo=r,(Vo=a)||zo||ei()}}function pi(e){var t=Vo;Vo=!0;try{Uo(e)}finally{(Vo=t)||zo||ti(1,!1,null)}}function mi(e,t,n,r,a){var l=t.current;if(n){var o;e:{for(2===dn(n=n._reactInternalFiber)&&2===n.tag||c("170"),o=n;3!==o.tag;){if(wa(o)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}(o=o.return)||c("171")}o=o.stateNode.context}n=wa(n)?Ta(n,o):o}else n=u;return null===t.context?t.context=n:t.pendingContext=n,t=a,(a=Ha(r)).payload={element:e},null!==(t=void 0===t?null:t)&&(a.callback=t),qa(l,a,r),So(l,r),r}function hi(e){var t=e._reactInternalFiber;return void 0===t&&("function"==typeof e.render?c("188"):c("268",Object.keys(e))),null===(e=hn(t))?null:e.stateNode}function vi(e,t,n,r){var a=t.current;return mi(e,t,n,a=_o(No(),a),r)}function gi(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function yi(e){var t=e.findFiberByHostInstance;return La(r({},e,{findHostInstanceByFiber:function(e){return null===(e=hn(e))?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null}}))}var bi={updateContainerAtExpirationTime:mi,createContainer:function(e,t,n){return Ra(e,t,n)},updateContainer:vi,flushRoot:ni,requestWork:Go,computeUniqueAsyncExpiration:To,batchedUpdates:ci,unbatchedUpdates:si,deferredUpdates:Po,syncUpdates:Uo,interactiveUpdates:di,flushInteractiveUpdates:function(){zo||0===Lo||(ti(Lo,!1,null),Lo=0)},flushControlled:pi,flushSync:fi,getPublicRootInstance:gi,findHostInstance:hi,findHostInstanceWithNoPortals:function(e){return null===(e=vn(e))?null:e.stateNode},injectIntoDevTools:yi};function ki(e,t,n){var r=3])/g,A=/([[}=:>])\s+/g,C=/(\{[^{]+?);(?=\})/g,w=/\s{2,}/g,v=/([^\(])(:+) */g,m=/[svh]\w+-[tblr]{2}/,x=/\(\s*(.*)\s*\)/g,$=/([\s\S]*?);/g,y=/-self|flex-/g,O=/[^]*?(:[rp][el]a[\w-]+)[^]*/,j=/stretch|:\s*\w+\-(?:conte|avail)/,z=/([^-])(image-set\()/,F="-webkit-",N="-moz-",S="-ms-",B=59,W=125,q=123,D=40,E=41,G=91,H=93,I=10,J=13,K=9,L=64,M=32,P=38,Q=45,R=95,T=42,U=44,V=58,X=39,Y=34,Z=47,_=62,ee=43,ae=126,ce=0,re=12,se=11,te=107,ie=109,ne=115,le=112,oe=111,fe=105,he=99,ue=100,de=112,be=1,ke=1,pe=0,ge=1,Ae=1,Ce=1,we=0,ve=0,me=0,xe=[],$e=[],ye=0,Oe=null,je=-2,ze=-1,Fe=0,Ne=1,Se=2,Be=3,We=0,qe=1,De="",Ee="",Ge="";function He(e,a,s,t,i){for(var n,l,f=0,h=0,u=0,d=0,g=0,A=0,C=0,w=0,m=0,$=0,y=0,O=0,j=0,z=0,R=0,we=0,$e=0,Oe=0,je=0,ze=s.length,Je=ze-1,Re="",Te="",Ue="",Ve="",Xe="",Ye="";R0&&(Te=Te.replace(r,"")),Te.trim().length>0)){switch(C){case M:case K:case B:case J:case I:break;default:Te+=s.charAt(R)}C=B}if(1===$e)switch(C){case q:case W:case B:case Y:case X:case D:case E:case U:$e=0;case K:case J:case I:case M:break;default:for($e=0,je=R,g=C,R--,C=B;je0&&(++R,C=g);case q:je=ze}}switch(C){case q:for(g=(Te=Te.trim()).charCodeAt(0),y=1,je=++R;R0&&(Te=Te.replace(r,"")),A=Te.charCodeAt(1)){case ue:case ie:case ne:case Q:n=a;break;default:n=xe}if(je=(Ue=He(a,n,Ue,A,i+1)).length,me>0&&0===je&&(je=Te.length),ye>0&&(n=Ie(xe,Te,Oe),l=Pe(Be,Ue,n,a,ke,be,je,A,i,t),Te=n.join(""),void 0!==l&&0===(je=(Ue=l.trim()).length)&&(A=0,Ue="")),je>0)switch(A){case ne:Te=Te.replace(x,Me);case ue:case ie:case Q:Ue=Te+"{"+Ue+"}";break;case te:Ue=(Te=Te.replace(b,"$1 $2"+(qe>0?De:"")))+"{"+Ue+"}",Ue=1===Ae||2===Ae&&Le("@"+Ue,3)?"@"+F+Ue+"@"+Ue:"@"+Ue;break;default:Ue=Te+Ue,t===de&&(Ve+=Ue,Ue="")}else Ue="";break;default:Ue=He(a,Ie(a,Te,Oe),Ue,t,i+1)}Xe+=Ue,O=0,$e=0,z=0,we=0,Oe=0,j=0,Te="",Ue="",C=s.charCodeAt(++R);break;case W:case B:if((je=(Te=(we>0?Te.replace(r,""):Te).trim()).length)>1)switch(0===z&&((g=Te.charCodeAt(0))===Q||g>96&&g<123)&&(je=(Te=Te.replace(" ",":")).length),ye>0&&void 0!==(l=Pe(Ne,Te,a,e,ke,be,Ve.length,t,i,t))&&0===(je=(Te=l.trim()).length)&&(Te="\0\0"),g=Te.charCodeAt(0),A=Te.charCodeAt(1),g){case ce:break;case L:if(A===fe||A===he){Ye+=Te+s.charAt(R);break}default:if(Te.charCodeAt(je-1)===V)break;Ve+=Ke(Te,g,A,Te.charCodeAt(2))}O=0,$e=0,z=0,we=0,Oe=0,Te="",C=s.charCodeAt(++R)}}switch(C){case J:case I:if(h+d+u+f+ve===0)switch($){case E:case X:case Y:case L:case ae:case _:case T:case ee:case Z:case Q:case V:case U:case B:case q:case W:break;default:z>0&&($e=1)}h===Z?h=0:ge+O===0&&t!==te&&Te.length>0&&(we=1,Te+="\0"),ye*We>0&&Pe(Fe,Te,a,e,ke,be,Ve.length,t,i,t),be=1,ke++;break;case B:case W:if(h+d+u+f===0){be++;break}default:switch(be++,Re=s.charAt(R),C){case K:case M:if(d+f+h===0)switch(w){case U:case V:case K:case M:Re="";break;default:C!==M&&(Re=" ")}break;case ce:Re="\\0";break;case re:Re="\\f";break;case se:Re="\\v";break;case P:d+h+f===0&&ge>0&&(Oe=1,we=1,Re="\f"+Re);break;case 108:if(d+h+f+pe===0&&z>0)switch(R-z){case 2:w===le&&s.charCodeAt(R-3)===V&&(pe=w);case 8:m===oe&&(pe=m)}break;case V:d+h+f===0&&(z=R);break;case U:h+u+d+f===0&&(we=1,Re+="\r");break;case Y:case X:0===h&&(d=d===C?0:0===d?C:d);break;case G:d+h+u===0&&f++;break;case H:d+h+u===0&&f--;break;case E:d+h+f===0&&u--;break;case D:if(d+h+f===0){if(0===O)switch(2*w+3*m){case 533:break;default:y=0,O=1}u++}break;case L:h+u+d+f+z+j===0&&(j=1);break;case T:case Z:if(d+f+u>0)break;switch(h){case 0:switch(2*C+3*s.charCodeAt(R+1)){case 235:h=Z;break;case 220:je=R,h=T}break;case T:C===Z&&w===T&&je+2!==R&&(33===s.charCodeAt(je+2)&&(Ve+=s.substring(je,R+1)),Re="",h=0)}}if(0===h){if(ge+d+f+j===0&&t!==te&&C!==B)switch(C){case U:case ae:case _:case ee:case E:case D:if(0===O){switch(w){case K:case M:case I:case J:Re+="\0";break;default:Re="\0"+Re+(C===U?"":"\0")}we=1}else switch(C){case D:z+7===R&&108===w&&(z=0),O=++y;break;case E:0==(O=--y)&&(we=1,Re+="\0")}break;case K:case M:switch(w){case ce:case q:case W:case B:case U:case re:case K:case M:case I:case J:break;default:0===O&&(we=1,Re+="\0")}}Te+=Re,C!==M&&C!==K&&($=C)}}m=w,w=C,R++}if(je=Ve.length,me>0&&0===je&&0===Xe.length&&0===a[0].length==!1&&(t!==ie||1===a.length&&(ge>0?Ee:Ge)===a[0])&&(je=a.join(",").length+2),je>0){if(n=0===ge&&t!==te?function(e){for(var a,c,s=0,t=e.length,i=Array(t);s1)){if(u=l.charCodeAt(l.length-1),d=c.charCodeAt(0),a="",0!==f)switch(u){case T:case ae:case _:case ee:case M:case D:break;default:a=" "}switch(d){case P:c=a+Ee;case ae:case _:case ee:case M:case E:case D:break;case G:c=a+c+Ee;break;case V:switch(2*c.charCodeAt(1)+3*c.charCodeAt(2)){case 530:if(Ce>0){c=a+c.substring(8,h-1);break}default:(f<1||n[f-1].length<1)&&(c=a+Ee+c)}break;case U:a="";default:c=h>1&&c.indexOf(":")>0?a+c.replace(v,"$1"+Ee+"$2"):a+c+Ee}l+=c}i[s]=l.replace(r,"").trim()}return i}(a):a,ye>0&&void 0!==(l=Pe(Se,Ve,n,e,ke,be,je,t,i,t))&&0===(Ve=l).length)return Ye+Ve+Xe;if(Ve=n.join(",")+"{"+Ve+"}",Ae*pe!=0){switch(2!==Ae||Le(Ve,2)||(pe=0),pe){case oe:Ve=Ve.replace(p,":"+N+"$1")+Ve;break;case le:Ve=Ve.replace(k,"::"+F+"input-$1")+Ve.replace(k,"::"+N+"$1")+Ve.replace(k,":"+S+"input-$1")+Ve}pe=0}}return Ye+Ve+Xe}function Ie(e,a,c){var r=a.trim().split(f),s=r,t=r.length,i=e.length;switch(i){case 0:case 1:for(var n=0,l=0===i?"":e[0]+" ";n0&&ge>0)return s.replace(u,"$1").replace(h,"$1"+Ge);break;default:return e.trim()+s.replace(h,"$1"+e.trim())}default:if(c*ge>0&&s.indexOf("\f")>0)return s.replace(h,(e.charCodeAt(0)===V?"":"$1")+e.trim())}return e+s}function Ke(e,a,c,r){var o,f=0,h=e+";",u=2*a+3*c+4*r;if(944===u)return function(e){var a=e.length,c=e.indexOf(":",9)+1,r=e.substring(0,c).trim(),s=e.substring(c,a-1).trim();switch(e.charCodeAt(9)*qe){case 0:break;case Q:if(110!==e.charCodeAt(10))break;default:for(var t=s.split((s="",n)),i=0,c=0,a=t.length;iL&&h<90||h>96&&h<123||h===R||h===Q&&o.charCodeAt(1)!==Q))switch(isNaN(parseFloat(o))+(-1!==o.indexOf("("))){case 1:switch(o){case"infinite":case"alternate":case"backwards":case"running":case"normal":case"forwards":case"both":case"none":case"linear":case"ease":case"ease-in":case"ease-out":case"ease-in-out":case"paused":case"reverse":case"alternate-reverse":case"inherit":case"initial":case"unset":case"step-start":case"step-end":break;default:o+=De}}f[c++]=o}s+=(0===i?"":",")+f.join(" ")}}return s=r+s+";",1===Ae||2===Ae&&Le(s,1)?F+s+s:s}(h);if(0===Ae||2===Ae&&!Le(h,1))return h;switch(u){case 1015:return 97===h.charCodeAt(10)?F+h+h:h;case 951:return 116===h.charCodeAt(3)?F+h+h:h;case 963:return 110===h.charCodeAt(5)?F+h+h:h;case 1009:if(100!==h.charCodeAt(4))break;case 969:case 942:return F+h+h;case 978:return F+h+N+h+h;case 1019:case 983:return F+h+N+h+S+h+h;case 883:return h.charCodeAt(8)===Q?F+h+h:h.indexOf("image-set(",11)>0?h.replace(z,"$1"+F+"$2")+h:h;case 932:if(h.charCodeAt(4)===Q)switch(h.charCodeAt(5)){case 103:return F+"box-"+h.replace("-grow","")+F+h+S+h.replace("grow","positive")+h;case 115:return F+h+S+h.replace("shrink","negative")+h;case 98:return F+h+S+h.replace("basis","preferred-size")+h}return F+h+S+h+h;case 964:return F+h+S+"flex-"+h+h;case 1023:if(99!==h.charCodeAt(8))break;return o=h.substring(h.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),F+"box-pack"+o+F+h+S+"flex-pack"+o+h;case 1005:return t.test(h)?h.replace(s,":"+F)+h.replace(s,":"+N)+h:h;case 1e3:switch(f=(o=h.substring(13).trim()).indexOf("-")+1,o.charCodeAt(0)+o.charCodeAt(f)){case 226:o=h.replace(m,"tb");break;case 232:o=h.replace(m,"tb-rl");break;case 220:o=h.replace(m,"lr");break;default:return h}return F+h+S+o+h;case 1017:if(-1===h.indexOf("sticky",9))return h;case 975:switch(f=(h=e).length-10,u=(o=(33===h.charCodeAt(f)?h.substring(0,f):h).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|o.charCodeAt(7))){case 203:if(o.charCodeAt(8)<111)break;case 115:h=h.replace(o,F+o)+";"+h;break;case 207:case 102:h=h.replace(o,F+(u>102?"inline-":"")+"box")+";"+h.replace(o,F+o)+";"+h.replace(o,S+o+"box")+";"+h}return h+";";case 938:if(h.charCodeAt(5)===Q)switch(h.charCodeAt(6)){case 105:return o=h.replace("-items",""),F+h+F+"box-"+o+S+"flex-"+o+h;case 115:return F+h+S+"flex-item-"+h.replace(y,"")+h;default:return F+h+S+"flex-line-pack"+h.replace("align-content","").replace(y,"")+h}break;case 973:case 989:if(h.charCodeAt(3)!==Q||122===h.charCodeAt(4))break;case 931:case 953:if(!0===j.test(e))return 115===(o=e.substring(e.indexOf(":")+1)).charCodeAt(0)?Ke(e.replace("stretch","fill-available"),a,c,r).replace(":fill-available",":stretch"):h.replace(o,F+o)+h.replace(o,N+o.replace("fill-",""))+h;break;case 962:if(h=F+h+(102===h.charCodeAt(5)?S+h:"")+h,c+r===211&&105===h.charCodeAt(13)&&h.indexOf("transform",10)>0)return h.substring(0,h.indexOf(";",27)+1).replace(i,"$1"+F+"$2")+h}return h}function Le(e,a){var c=e.indexOf(1===a?":":"{"),r=e.substring(0,3!==a?c:10),s=e.substring(c+1,e.length-1);return Oe(2!==a?r:r.replace(O,"$1"),s,a)}function Me(e,a){var c=Ke(a,a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2));return c!==a+";"?c.replace($," or ($1)").substring(4):"("+a+")"}function Pe(e,a,c,r,s,t,i,n,l,o){for(var f,h=0,u=a;h0&&(De=s.replace(d,t===G?"":"-")),t=1,1===ge?Ge=s:Ee=s;var i,n=[Ge];ye>0&&void 0!==(i=Pe(ze,c,n,n,ke,be,0,0,0,0))&&"string"==typeof i&&(c=i);var l=He(xe,n,c,0,0);return ye>0&&void 0!==(i=Pe(je,l,n,n,ke,be,l.length,0,0,0))&&"string"!=typeof(l=i)&&(t=0),De="",Ge="",Ee="",pe=0,ke=1,be=1,we*t==0?l:function(e){return e.replace(r,"").replace(g,"").replace(A,"$1").replace(C,"$1").replace(w," ")}(l)}return Te.use=function e(a){switch(a){case void 0:case null:ye=$e.length=0;break;default:switch(a.constructor){case Array:for(var c=0,r=a.length;c1)for(var n=1;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},x=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},C=function(e){return"object"===(void 0===e?"undefined":m(e))&&e.constructor===Object},T=function e(t,r){var o=Object.keys(t).filter(function(e){var n=t[e];return null!=n&&!1!==n&&""!==n}).map(function(r){return C(t[r])?e(t[r],r):(0,n.default)(r)+": "+t[r]+";"}).join(" ");return r?r+" {\n "+o+"\n}":o},I=function e(t,n){return t.reduce(function(t,r){return null==r||!1===r||""===r?t:Array.isArray(r)?(t.push.apply(t,e(r,n)),t):r.hasOwnProperty("styledComponentId")?(t.push("."+r.styledComponentId),t):"function"==typeof r?(n?t.push.apply(t,e([r(n)],n)):t.push(r),t):(t.push(C(r)?T(r):r.toString()),t)},[])},O=/^\s*\/\/.*$/gm,k=new o.default({global:!1,cascade:!0,keyframe:!1,prefix:!1,compress:!1,semicolon:!0}),w=new o.default({global:!1,cascade:!0,keyframe:!1,prefix:!0,compress:!1,semicolon:!1}),M=[],j=function(e){if(-2===e){var t=M;return M=[],t}},R=(0,a.default)(function(e){M.push(e)});w.use([R,j]),k.use([R,j]);var E=function(e,t,n){var r=e.join("").replace(O,"");return w(n||!t?"":t,t&&n?n+" "+t+" { "+r+" }":r)},P=function(e){return k("",e)};function A(e){return"function"==typeof e&&"string"==typeof e.styledComponentId}function N(){0}var _=52,F=function(e){return String.fromCharCode(e+(e>25?39:97))},D=function(e){var t="",n=void 0;for(n=e;n>_;n=Math.floor(n/_))t=F(n%_)+t;return F(n%_)+t},L=function(e,t){for(var n=[e[0]],r=0,o=t.length;r1?t-1:0),r=1;r1?r-1:0),i=1;ir;o-=1)e.deleteRule(o)},ue=function(e){return"\n/* sc-component-id: "+e+" */\n"},ce=function(e,t){for(var n=0,r=0;r<=t;r+=1)n+=e[r];return n},le=function(e,t,n){var r=document.createElement("style");r.setAttribute(H,"");var o=Z();if(o&&r.setAttribute("nonce",o),r.appendChild(document.createTextNode("")),e&&!t)e.appendChild(r);else{if(!t||!e||!t.parentNode)throw new X(6);t.parentNode.insertBefore(r,n?t:t.nextSibling)}return r},pe=function(e,t){return function(n){var r=Z();return""}},de=function(e,t){return function(){var n,r=((n={})[H]=re(t),n),o=Z();return o&&(r.nonce=o),u.default.createElement("style",g({},r,{dangerouslySetInnerHTML:{__html:e()}}))}},he=function(e){return function(){return Object.keys(e)}},fe=function(e,t){var n=Object.create(null),r=Object.create(null),o=[],i=void 0!==t,a=!1,s=function(e){var t=r[e];return void 0!==t?t:(r[e]=o.length,o.push(0),te(n,e),r[e])},u=function(){var t=ie(e).cssRules,n="";for(var i in r){n+=ue(i);for(var a=r[i],s=ce(o,a),u=s-o[a];u0&&(a=!0,t().insertRules(r+"-import",f)),o[l]+=h,ee(n,r,c)},removeRules:function(s){var u=r[s];if(void 0!==u){var c=o[u],l=ie(e),p=ce(o,u);se(l,p,c),o[u]=0,te(n,s),i&&a&&t().removeRules(s+"-import")}},css:u,toHTML:pe(u,n),toElement:de(u,n),clone:function(){throw new X(5)}}},me=function(e){return document.createTextNode(ue(e))},ve=function(e,t){var n=Object.create(null),r=Object.create(null),o=void 0!==t,i=!1,a=function(t){var o=r[t];return void 0!==o?o:(r[t]=me(t),e.appendChild(r[t]),n[t]=Object.create(null),r[t])},s=function(){var e="";for(var t in r)e+=r[t].data;return e};return{clone:function(){throw new X(5)},css:s,getIds:he(r),hasNameForId:ne(n),insertMarker:a,insertRules:function(e,r,s){for(var u=a(e),c=[],l=r.length,p=0;p0&&(i=!0,t().insertRules(e+"-import",c))},removeRules:function(a){var s=r[a];if(void 0!==s){var u=me(a);e.replaceChild(u,s),r[a]=u,te(n,a),o&&i&&t().removeRules(a+"-import")}},styleTag:e,toElement:de(s,n),toHTML:pe(s,n)}},ye=function e(t,n){var r=void 0===t?Object.create(null):t,o=void 0===n?Object.create(null):n,i=function(e){var t=o[e];return void 0!==t?t:o[e]=[""]},a=function(){var e="";for(var t in o){var n=o[t][0];n&&(e+=ue(t)+n)}return e};return{clone:function(){var t=oe(r),n=Object.create(null);for(var i in o)n[i]=[o[i][0]];return e(t,n)},css:a,getIds:he(o),hasNameForId:ne(r),insertMarker:i,insertRules:function(e,t,n){i(e)[0]+=t.join(" "),ee(r,e,n)},removeRules:function(e){var t=o[e];void 0!==t&&(t[0]="",te(r,e))},styleTag:null,toElement:de(a,r),toHTML:pe(a,r)}},ge=function(){return ye()},be=function(e,t,n,r,o){if(Y&&!n){var i=le(e,t,r);return G?ve(i,o):fe(i,o)}return ge()},Se=function(e,t,n,r){var o=Q(function(){for(var r=0,o=n.length;r0&&void 0!==arguments[0]?arguments[0]:Y?document.head:null,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];v(this,e),this.getImportRuleTag=function(){var e=t.importRuleTag;if(void 0!==e)return e;var n=t.tags[0];return t.importRuleTag=be(t.target,n?n.styleTag:null,t.forceServer,!0)},Ie+=1,this.id=Ie,this.sealed=!1,this.forceServer=r,this.target=r?null:n,this.tagMap={},this.deferred={},this.rehydratedNames={},this.ignoreRehydratedNames={},this.tags=[],this.capacity=1,this.clones=[]}return e.prototype.rehydrate=function(){if(!Y||this.forceServer)return this;var e=[],t=[],n=!1,r=document.querySelectorAll("style["+H+"]"),o=r.length;if(0===o)return this;for(var i=0;i0&&void 0!==arguments[0]&&arguments[0];Oe=new e(void 0,t).rehydrate()},e.prototype.clone=function(){var t=new e(this.target,this.forceServer);return this.clones.push(t),t.tags=this.tags.map(function(e){for(var n=e.getIds(),r=e.clone(),o=0;o=je&&(console.warn("Over "+je+" classes were generated for component "+e+". \nConsider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs({\n style: ({ background }) => ({\n background,\n }),\n })`width: 100%;`\n\n "),n=!0,t={}))}},Ee=function(e,t,n){var r=n&&e.theme===n.theme;return e.theme&&!r?e.theme:t},Pe=/[[\].#*$><+~=|^:(),"'`-]+/g,Ae=/(^-|-$)/g;function Ne(e){return e.replace(Pe,"-").replace(Ae,"")}function _e(e){return e.displayName||e.name||"Component"}function Fe(e){return"string"==typeof e}function De(e){return Fe(e)?"styled."+e:"Styled("+_e(e)+")"}var Le=/^((?:s(?:uppressContentEditableWarn|croll|pac)|(?:shape|image|text)Render|(?:letter|word)Spac|vHang|hang)ing|(?:on(?:AnimationIteration|C(?:o(?:mposition(?:Update|Start|End)|ntextMenu|py)|anPlayThrough|anPlay|hange|lick|ut)|(?:Animation|Touch|Load|Drag)Start|(?:(?:Duration|Volume|Rate)Chang|(?:MouseLea|(?:Touch|Mouse)Mo|DragLea)v|Paus)e|Loaded(?:Metad|D)ata|(?:(?:T(?:ransition|ouch)|Animation)E|Suspe)nd|DoubleClick|(?:TouchCanc|Whe)el|Lo(?:stPointer|ad)|TimeUpdate|(?:Mouse(?:Ent|Ov)e|Drag(?:Ent|Ov)e|Erro)r|GotPointer|MouseDown|(?:E(?:n(?:crypt|d)|mpti)|S(?:tall|eek))ed|KeyPress|(?:MouseOu|DragExi|S(?:elec|ubmi)|Rese|Inpu)t|P(?:rogress|laying)|DragEnd|Key(?:Down|Up)|(?:MouseU|Dro)p|(?:Wait|Seek)ing|Scroll|Focus|Paste|Abort|Drag|Play|Blur)Captur|alignmentBaselin|(?:limitingConeAng|xlink(?:(?:Arcr|R)o|Tit)|s(?:urfaceSca|ty|ca)|unselectab|baseProfi|fontSty|(?:focus|dragg)ab|multip|profi|tit)l|d(?:ominantBaselin|efaultValu)|onPointerLeav|a(?:uto(?:Capitaliz|Revers|Sav)|dditiv)|(?:(?:formNoValid|xlinkActu|noValid|accumul|rot)a|autoComple|decelera)t|(?:(?:attribute|item)T|datat)yp|onPointerMov|(?:attribute|glyph)Nam|playsInlin|(?:writing|input|edge)Mod|(?:formE|e)ncTyp|(?:amplitu|mo)d|(?:xlinkTy|itemSco|keyTy|slo)p|(?:xmlSpa|non)c|fillRul|(?:dateTi|na)m|r(?:esourc|ol)|xmlBas|wmod)e|(?:glyphOrientationHorizont|loc)al|(?:externalResourcesRequir|select|revers|mut)ed|c(?:o(?:lorInterpolationFilter|ord)s|o(?:lor(?:Interpolation)?|nt(?:rols|ent))|(?:ontentS(?:cript|tyle)Typ|o(?:ntentEditab|lorProfi)l|l(?:assNam|ipRul)|a(?:lcMod|ptur)|it)e|olorRendering|l(?:ipPathUnits|assID)|(?:ontrolsLis|apHeigh)t|h(?:eckedLink|a(?:llenge|rSet)|ildren|ecked)|ell(?:Spac|Padd)ing|o(?:ntextMenu|ls)|(?:rossOrigi|olSpa)n|l(?:ip(?:Path)?|ass)|ursor|[xy])|glyphOrientationVertical|d(?:angerouslySetInnerHTML|efaultChecked|ownload|isabled|isplay|[xy])|(?:s(?:trikethroughThickn|eaml)es|(?:und|ov)erlineThicknes|r(?:equiredExtension|adiu)|(?:requiredFeatur|tableValu|stitchTil|numOctav|filterR)e|key(?:(?:Splin|Tim)e|Param)|auto[Ff]ocu|header|bia)s|(?:(?:st(?:rikethroughPosi|dDevia)|(?:und|ov)erlinePosi|(?:textDecor|elev)a|orienta)tio|(?:strokeLinejo|orig)i|on(?:PointerDow|FocusI)|formActio|zoomAndPa|directio|(?:vers|act)io|rowSpa|begi|ico)n|o(?:n(?:AnimationIteration|C(?:o(?:mposition(?:Update|Start|End)|ntextMenu|py)|anPlayThrough|anPlay|hange|lick|ut)|(?:(?:Duration|Volume|Rate)Chang|(?:MouseLea|(?:Touch|Mouse)Mo|DragLea)v|Paus)e|Loaded(?:Metad|D)ata|(?:Animation|Touch|Load|Drag)Start|(?:(?:T(?:ransition|ouch)|Animation)E|Suspe)nd|DoubleClick|(?:TouchCanc|Whe)el|(?:Mouse(?:Ent|Ov)e|Drag(?:Ent|Ov)e|Erro)r|TimeUpdate|(?:E(?:n(?:crypt|d)|mpti)|S(?:tall|eek))ed|MouseDown|P(?:rogress|laying)|(?:MouseOu|DragExi|S(?:elec|ubmi)|Rese|Inpu)t|KeyPress|DragEnd|Key(?:Down|Up)|(?:Wait|Seek)ing|(?:MouseU|Dro)p|Scroll|Paste|Focus|Abort|Drag|Play|Load|Blur)|rient)|p(?:reserveA(?:spectRatio|lpha)|ointsAt[X-Z]|anose1)|(?:patternContent|ma(?:sk(?:Content)?|rker)|primitive|gradient|pattern|filter)Units|(?:(?:allowTranspar|baseFrequ)enc|re(?:ferrerPolic|adOnl)|(?:(?:st(?:roke|op)O|floodO|fillO|o)pac|integr|secur)it|visibilit|fontFamil|accessKe|propert|summar)y|(?:gradientT|patternT|t)ransform|(?:[xy]ChannelSelect|lightingCol|textAnch|floodCol|stopCol|operat|htmlF)or|(?:strokeMiterlimi|(?:specularConsta|repeatCou|fontVaria)n|(?:(?:specularE|e)xpon|renderingInt|asc)en|d(?:iffuseConsta|esce)n|(?:fontSizeAdju|lengthAdju|manife)s|baselineShif|onPointerOu|vectorEffec|(?:(?:mar(?:ker|gin)|x)H|accentH|fontW)eigh|markerStar|a(?:utoCorrec|bou)|onFocusOu|intercep|restar|forma|inlis|heigh|lis)t|(?:(?:st(?:rokeDasho|artO)|o)ffs|acceptChars|formTarg|viewTarg|srcS)et|k(?:ernel(?:UnitLength|Matrix)|[1-4])|(?:(?:enableBackgrou|markerE)n|s(?:p(?:readMetho|ee)|ee)|formMetho|(?:markerM|onInval)i|preloa|metho|kin)d|strokeDasharray|(?:onPointerCanc|lab)el|(?:allowFullScre|hidd)en|systemLanguage|(?:(?:o(?:nPointer(?:Ent|Ov)|rd)|allowReord|placehold|frameBord|paintOrd|post)e|repeatDu|d(?:efe|u))r|v(?:Mathematical|ert(?:Origin[XY]|AdvY)|alues|ocab)|(?:pointerEve|keyPoi)nts|(?:strokeLineca|onPointerU|itemPro|useMa|wra|loo)p|h(?:oriz(?:Origin|Adv)X|ttpEquiv)|(?:vI|i)deographic|unicodeRange|mathematical|vAlphabetic|u(?:nicodeBidi|[12])|(?:fontStretc|hig)h|(?:(?:mar(?:ker|gin)W|strokeW)id|azimu)th|(?:xmlnsXl|valueL)ink|mediaGroup|spellCheck|(?:text|m(?:in|ax))Length|(?:unitsPerE|optimu|fro)m|r(?:adioGroup|e(?:sults|f[XY]|l)|ows|[xy])|a(?:rabicForm|l(?:phabetic|t)|sync)|pathLength|innerHTML|xlinkShow|(?:xlinkHr|glyphR)ef|(?:tabInde|(?:sand|b)bo|viewBo)x|(?:(?:href|xml|src)La|kerni)ng|autoPlay|o(?:verflow|pen)|f(?:o(?:ntSize|rm?)|il(?:ter|l))|r(?:e(?:quired|sult|f))?|divisor|p(?:attern|oints)|unicode|d(?:efault|ata|ir)?|i(?:temRef|n2|s)|t(?:arget[XY]|o)|srcDoc|s(?:coped|te(?:m[hv]|p)|pan)|(?:width|size)s|prefix|typeof|itemID|s(?:t(?:roke|art)|hape|cope|rc)|t(?:arget|ype)|(?:stri|la)ng|a(?:ccept|s)|m(?:edia|a(?:sk|x)|in)|x(?:mlns)?|width|value|size|href|k(?:ey)?|end|low|by|i[dn]|y[12]|g[12]|x[12]|f[xy]|[yz])$/,We=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",Ue=We+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",qe=RegExp.prototype.test.bind(new RegExp("^(x|data|aria)-["+Ue+"]*$")),He=function(e){return Le.test(e)||qe(e.toLowerCase())};function Be(e,t){for(var n=e;n;)if((n=Object.getPrototypeOf(n))&&n===t)return!0;return!1}var ze,Ye,Ge=function(e){var t={},n=0,r=e;return{publish:function(e){for(var n in r=e,t){var o=t[n];void 0!==o&&o(r)}},subscribe:function(e){var o=n;return t[o]=e,n+=1,e(r),o},unsubscribe:function(e){t[e]=void 0}}},Ve="__styled-components__",Ke=Ve+"next__",Xe=l.default.shape({getTheme:l.default.func,subscribe:l.default.func,unsubscribe:l.default.func}),$e=((ze={})[Ve]=l.default.func,ze[Ke]=Xe,ze),Je=void 0;var Ze,Qe=function(e){return"function"==typeof e},et=function(e){function t(){v(this,t);var n=x(this,e.call(this));return n.unsubscribeToOuterId=-1,n.getTheme=n.getTheme.bind(n),n}return b(t,e),t.prototype.componentWillMount=function(){var e=this,t=this.context[Ke];void 0!==t&&(this.unsubscribeToOuterId=t.subscribe(function(t){e.outerTheme=t,void 0!==e.broadcast&&e.publish(e.props.theme)})),this.broadcast=Ge(this.getTheme())},t.prototype.getChildContext=function(){var e,t=this;return g({},this.context,((e={})[Ke]={getTheme:this.getTheme,subscribe:this.broadcast.subscribe,unsubscribe:this.broadcast.unsubscribe},e[Ve]=function(e){var n=t.broadcast.subscribe(e);return function(){return t.broadcast.unsubscribe(n)}},e))},t.prototype.componentWillReceiveProps=function(e){this.props.theme!==e.theme&&this.publish(e.theme)},t.prototype.componentWillUnmount=function(){-1!==this.unsubscribeToOuterId&&this.context[Ke].unsubscribe(this.unsubscribeToOuterId)},t.prototype.getTheme=function(e){var t=e||this.props.theme;if(Qe(t)){var n=t(this.outerTheme);return n}if(null===t||Array.isArray(t)||"object"!==(void 0===t?"undefined":m(t)))throw new X(8);return g({},this.outerTheme,t)},t.prototype.publish=function(e){this.broadcast.publish(this.getTheme(e))},t.prototype.render=function(){return this.props.children?u.default.Children.only(this.props.children):null},t}(s.Component);et.childContextTypes=$e,et.contextTypes=((Ye={})[Ke]=Xe,Ye);var tt={},nt=g({},$e,((Ze={})[z]=l.default.oneOfType([l.default.instanceOf(ke),l.default.instanceOf(Me)]),Ze)),rt={},ot=function(e,t,n){var r="string"!=typeof t?"sc":Ne(t),o=(rt[r]||0)+1;rt[r]=o;var i=r+"-"+e.generateName(r+o);return void 0!==n?n+"-"+i:i},it=function(e){function t(){var n,r;v(this,t);for(var o=arguments.length,i=Array(o),a=0;a=4;)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++o;switch(n){case 3:r^=(255&e.charCodeAt(o+2))<<16;case 2:r^=(255&e.charCodeAt(o+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(o)))+((1540483477*(r>>>16)&65535)<<16)}return r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16),(r^=r>>>15)>>>0}var ut=Y,ct=function e(t,n){for(var r=0,o=t.length;r2&&void 0!==arguments[2]?arguments[2]:U;if(!(0,h.isValidElementType)(r))throw new X(1,String(r));var i=function(){return n(r,o,e.apply(void 0,arguments))};return i.withConfig=function(e){return t(n,r,g({},o,e))},i.attrs=function(e){return t(n,r,g({},o,{attrs:g({},o.attrs||U,e)}))},i}},gt=function(e){var t="function"==typeof e&&!(e.prototype&&"isReactComponent"in e.prototype),n=A(e)||t,r=function(t){function r(){var e,n;v(this,r);for(var o=arguments.length,i=Array(o),a=0;a'.",autoComplete:"off",onChange:function(t){return e.onChange(t)}}),n.default.createElement(r.Button,{innerRef:this.buttonRef},"Send"))}}]),i}();exports.default=i;
+},{"react":"HdMw","./Styled":"R0fF"}],"M2pF":[function(require,module,exports) {
+var define;
+var t;!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof t&&t.amd?t(n):e.dayjs=n()}(this,function(){"use strict";var t="millisecond",e="second",n="minute",r="hour",s="day",i="week",a="month",u="year",c=/^(\d{4})-?(\d{1,2})-?(\d{0,2})(.*?(\d{1,2}):(\d{1,2}):(\d{1,2}))?.?(\d{1,3})?$/,o=/\[.*?\]|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,h={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},d=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},$={padStart:d,padZoneStr:function(t){var e=Math.abs(t),n=Math.floor(e/60),r=e%60;return(t<=0?"+":"-")+d(n,2,"0")+":"+d(r,2,"0")},monthDiff:function(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(n,"months"),s=e-r<0,i=t.clone().add(n+(s?-1:1),"months");return Number(-(n+(e-r)/(s?r-i:i-r)))},absFloor:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},prettyUnit:function(c){return{M:a,y:u,w:i,d:s,h:r,m:n,s:e,ms:t}[c]||String(c||"").toLowerCase().replace(/s$/,"")},isUndefined:function(t){return void 0===t}},f="en",l={};l[f]=h;var m=function(t){return t instanceof D},y=function(t,e,n){var r;if(!t)return null;if("string"==typeof t)l[t]&&(r=t),e&&(l[t]=e,r=t);else{var s=t.name;l[s]=t,r=s}return n||(f=r),r},M=function(t,e){if(m(t))return t.clone();var n=e||{};return n.date=t,new D(n)},S=function(t,e){return M(t,{locale:e.$L})},p=$;p.parseLocale=y,p.isDayjs=m,p.wrapper=S;var D=function(){function h(t){this.parse(t)}var d=h.prototype;return d.parse=function(t){var e,n;this.$d=null===(e=t.date)?new Date(NaN):p.isUndefined(e)?new Date:e instanceof Date?e:"string"==typeof e&&/.*[^Z]$/i.test(e)&&(n=e.match(c))?new Date(n[1],n[2]-1,n[3]||1,n[5]||0,n[6]||0,n[7]||0,n[8]||0):new Date(e),this.init(t)},d.init=function(t){this.$y=this.$d.getFullYear(),this.$M=this.$d.getMonth(),this.$D=this.$d.getDate(),this.$W=this.$d.getDay(),this.$H=this.$d.getHours(),this.$m=this.$d.getMinutes(),this.$s=this.$d.getSeconds(),this.$ms=this.$d.getMilliseconds(),this.$L=this.$L||y(t.locale,null,!0)||f},d.$utils=function(){return p},d.isValid=function(){return!("Invalid Date"===this.$d.toString())},d.$compare=function(t){return this.valueOf()-M(t).valueOf()},d.isSame=function(t){return 0===this.$compare(t)},d.isBefore=function(t){return this.$compare(t)<0},d.isAfter=function(t){return this.$compare(t)>0},d.year=function(){return this.$y},d.month=function(){return this.$M},d.day=function(){return this.$W},d.date=function(){return this.$D},d.hour=function(){return this.$H},d.minute=function(){return this.$m},d.second=function(){return this.$s},d.millisecond=function(){return this.$ms},d.unix=function(){return Math.floor(this.valueOf()/1e3)},d.valueOf=function(){return this.$d.getTime()},d.startOf=function(t,c){var o=this,h=!!p.isUndefined(c)||c,d=function(t,e){var n=S(new Date(o.$y,e,t),o);return h?n:n.endOf(s)},$=function(t,e){return S(o.toDate()[t].apply(o.toDate(),h?[0,0,0,0].slice(e):[23,59,59,999].slice(e)),o)};switch(p.prettyUnit(t)){case u:return h?d(1,0):d(31,11);case a:return h?d(1,this.$M):d(0,this.$M+1);case i:return d(h?this.$D-this.$W:this.$D+(6-this.$W),this.$M);case s:case"date":return $("setHours",0);case r:return $("setMinutes",1);case n:return $("setSeconds",2);case e:return $("setMilliseconds",3);default:return this.clone()}},d.endOf=function(t){return this.startOf(t,!1)},d.$set=function(i,c){switch(p.prettyUnit(i)){case s:this.$d.setDate(this.$D+(c-this.$W));break;case"date":this.$d.setDate(c);break;case a:this.$d.setMonth(c);break;case u:this.$d.setFullYear(c);break;case r:this.$d.setHours(c);break;case n:this.$d.setMinutes(c);break;case e:this.$d.setSeconds(c);break;case t:this.$d.setMilliseconds(c)}return this.init(),this},d.set=function(t,e){return this.clone().$set(t,e)},d.add=function(t,c){var o=this;t=Number(t);var h,d=p.prettyUnit(c),$=function(e,n){var r=o.set("date",1).set(e,n+t);return r.set("date",Math.min(o.$D,r.daysInMonth()))};if(d===a)return $(a,this.$M);if(d===u)return $(u,this.$y);switch(d){case n:h=6e4;break;case r:h=36e5;break;case s:h=864e5;break;case i:h=6048e5;break;case e:h=1e3;break;default:h=1}var f=this.valueOf()+t*h;return S(f,this)},d.subtract=function(t,e){return this.add(-1*t,e)},d.format=function(t){var e=this,n=t||"YYYY-MM-DDTHH:mm:ssZ",r=p.padZoneStr(this.$d.getTimezoneOffset()),s=this.$locale(),i=s.weekdays,a=s.months,u=function(t,e,n,r){return t&&t[e]||n[e].substr(0,r)};return n.replace(o,function(t){if(t.indexOf("[")>-1)return t.replace(/\[|\]/g,"");switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return String(e.$y);case"M":return String(e.$M+1);case"MM":return p.padStart(e.$M+1,2,"0");case"MMM":return u(s.monthsShort,e.$M,a,3);case"MMMM":return a[e.$M];case"D":return String(e.$D);case"DD":return p.padStart(e.$D,2,"0");case"d":return String(e.$W);case"dd":return u(s.weekdaysMin,e.$W,i,2);case"ddd":return u(s.weekdaysShort,e.$W,i,3);case"dddd":return i[e.$W];case"H":return String(e.$H);case"HH":return p.padStart(e.$H,2,"0");case"h":case"hh":return 0===e.$H?12:p.padStart(e.$H<13?e.$H:e.$H-12,"hh"===t?2:1,"0");case"a":return e.$H<12?"am":"pm";case"A":return e.$H<12?"AM":"PM";case"m":return String(e.$m);case"mm":return p.padStart(e.$m,2,"0");case"s":return String(e.$s);case"ss":return p.padStart(e.$s,2,"0");case"SSS":return p.padStart(e.$ms,3,"0");case"Z":return r;default:return r.replace(":","")}})},d.diff=function(t,c,o){var h=p.prettyUnit(c),d=M(t),$=this-d,f=p.monthDiff(this,d);switch(h){case u:f/=12;break;case a:break;case"quarter":f/=3;break;case i:f=$/6048e5;break;case s:f=$/864e5;break;case r:f=$/36e5;break;case n:f=$/6e4;break;case e:f=$/1e3;break;default:f=$}return o?f:p.absFloor(f)},d.daysInMonth=function(){return this.endOf(a).$D},d.$locale=function(){return l[this.$L]},d.locale=function(t,e){var n=this.clone();return n.$L=y(t,e,!0),n},d.clone=function(){return S(this.toDate(),this)},d.toDate=function(){return new Date(this.$d)},d.toArray=function(){return[this.$y,this.$M,this.$D,this.$H,this.$m,this.$s,this.$ms]},d.toJSON=function(){return this.toISOString()},d.toISOString=function(){return this.toDate().toISOString()},d.toObject=function(){return{years:this.$y,months:this.$M,date:this.$D,hours:this.$H,minutes:this.$m,seconds:this.$s,milliseconds:this.$ms}},d.toString=function(){return this.$d.toUTCString()},h}();return M.extend=function(t,e){return t(e,D,M),M},M.locale=y,M.isDayjs=m,M.en=l[f],M});
+},{}],"psKD":[function(require,module,exports) {
+var define;
+var r;!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof r&&r.amd?r(e):t.dayjs_plugin_relativeTime=e()}(this,function(){"use strict";return function(r,t,e){var n=t.prototype;e.en.relativeTime={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};var o=function(r,t,n,o){for(var d,a,i=n.$locale().relativeTime,u=[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],s=u.length,f=0;f0?i.future:i.past).replace("%s",a)};n.to=function(r,t){return o(r,t,this,!0)},n.from=function(r,t){return o(r,t,this)},n.toNow=function(r){return this.to(e(),r)},n.fromNow=function(r){return this.from(e(),r)}}});
+},{}],"Ri+r":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=d(e),a=require("dayjs"),l=d(a),r=require("dayjs/plugin/relativeTime"),u=d(r),n=require("./Styled");function d(e){return e&&e.__esModule?e:{default:e}}l.default.extend(u.default),exports.default=function(e){var a=e.message;return t.default.createElement(n.MessageWrapper,null,t.default.createElement(n.HorizontalLayout,null,t.default.createElement(n.HorizontalLayout,{justifyContent:"flex-start"},t.default.createElement(n.Author,null,a.author)," ",t.default.createElement(n.MessageText,null,a.message)),t.default.createElement(n.TimeAgo,null,(0,l.default)(a.date).fromNow())),t.default.createElement(n.ImageWrapper,null,a.image?t.default.createElement(n.Image,{src:a.image}):null))};
+},{"react":"HdMw","dayjs":"M2pF","dayjs/plugin/relativeTime":"psKD","./Styled":"R0fF"}],"RTd7":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return fetch(e,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Accept:"application/json"},redirect:"follow",referrer:"no-referrer",body:JSON.stringify(t)}).then(function(e){if(e.status>400)throw new Error("Failed status code: "+e.status);return e}).then(function(e){return e.json()})},n=exports.sendMessage=function(e,t,r){return o(s+"/message",{author:e,room:t,message:r})},a=exports.getMessages=function(){return fetch(s+"/message").then(function(e){return e.json()})};
+},{"dayjs":"M2pF"}],"Oy93":[function(require,module,exports) {
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=function(){function e(e,t){for(var r=0;r