From 317b204faa03b0c599706de0176a247c17784c70 Mon Sep 17 00:00:00 2001 From: James Manning Date: Sun, 27 Dec 2015 03:01:27 -0500 Subject: [PATCH 01/17] use the regexp the emotes package exposes instead of defining our own --- src/scripts/utils.jsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/scripts/utils.jsx b/src/scripts/utils.jsx index 5b90b4e..a739917 100644 --- a/src/scripts/utils.jsx +++ b/src/scripts/utils.jsx @@ -1,4 +1,5 @@ let Emote = require("./emote.jsx") +let {EmoteParser} = require("emotes") let mapAlternate = function(array, fn1, fn2, thisArg) { var fn = fn1, output = [] @@ -11,12 +12,10 @@ let mapAlternate = function(array, fn1, fn2, thisArg) { return output } -let emoteRegex = /(\[\]\(\/[\w:!#\/]+[-\w!]*[^)]*\))/gi - let Utils = { mapAlternate: mapAlternate, componentizeString: function(s) { - let ret = mapAlternate(s.split(emoteRegex), function(s) { + let ret = mapAlternate(s.split(EmoteParser.emoteParseRegexp), function(s) { return s }, function(s,i) { return From 59b26177195206966a8b856b25512e2eb534b18e Mon Sep 17 00:00:00 2001 From: James Manning Date: Sun, 27 Dec 2015 03:06:59 -0500 Subject: [PATCH 02/17] expose the map as a property so Emote component can use it --- src/scripts/berrymotes.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/scripts/berrymotes.jsx b/src/scripts/berrymotes.jsx index e2c7065..eba3b00 100644 --- a/src/scripts/berrymotes.jsx +++ b/src/scripts/berrymotes.jsx @@ -22,6 +22,7 @@ let Bem = ee({ this.emit("update") }) }, + map, applyEmotesToStr: function(str){ return str}, findEmote: function(emoteId){ return map && map.findEmote(emoteId) From d0436dd43b320a9c3e19ce5557238a10d6797367 Mon Sep 17 00:00:00 2001 From: James Manning Date: Sun, 27 Dec 2015 03:18:09 -0500 Subject: [PATCH 03/17] leverage the structured data for the css and wrapping --- src/scripts/emote.jsx | 89 +++++++++++++++++++++++++++---------------- 1 file changed, 57 insertions(+), 32 deletions(-) diff --git a/src/scripts/emote.jsx b/src/scripts/emote.jsx index 13ebd50..70826f1 100644 --- a/src/scripts/emote.jsx +++ b/src/scripts/emote.jsx @@ -5,25 +5,30 @@ let _APNG = require("apng-canvas") let APNG = window.APNG let Bem = require("./berrymotes.jsx") -let {EmoteParser} = require("emotes") +let {EmoteParser, EmoteHtml} = require("emotes") let parser = new EmoteParser() +let html = new EmoteHtml(Bem.map) const MAX_HEIGHT = 200 module.exports = class Emote extends React.Component { constructor(props) { super(props) - var emoteIdentifier, originalString + var emoteIdentifier, originalString, htmlOutputData + // emoteId will be set when this is used via search results if(props.emoteId) { emoteIdentifier = props.emoteId originalString = props.emoteId + htmlOutputData = html.getEmoteHtmlMetadataForEmoteName(props.emoteId) } else { let emoteObject = parser.parse(props.emote) emoteIdentifier = emoteObject.emoteIdentifier originalString = emoteObject.originalString + htmlOutputData = html.getEmoteHtmlMetadataForObject(emoteObject) } this.state = { originalString, emoteIdentifier, + htmlOutputData, emoteData: Bem.findEmote(emoteIdentifier) } Bem.on("update", this.onEmoteUpdate.bind(this)) @@ -31,7 +36,8 @@ module.exports = class Emote extends React.Component { onEmoteUpdate() { this.setState({ - emoteData: Bem.findEmote(this.state.emoteIdentifier) + emoteData: Bem.findEmote(this.state.emoteIdentifier), + htmlOutputData: html.getEmoteHtmlMetadataForEmoteName(this.state.emoteIdentifier) }) } @@ -63,55 +69,74 @@ module.exports = class Emote extends React.Component { render() { let emoteData = this.state.emoteData - if(!emoteData) { + let htmlOutputData = this.state.htmlOutputData + + if(!htmlOutputData) { return {this.state.originalString} } else { - let title = `${(emoteData.names||[]).join(",")} from /r/${emoteData.sr}` - let className = { - "berrymotes": true, - "nsfw": emoteData.nsfw - } + // emotes have berryemote class set automatically, but we need berrymotes set as well + let className = htmlOutputData.cssClassesForEmoteNode + className['berrymotes'] = true + + // workaround for the emotes package not currently just setting the properties directly + let emoteNodeStyle = {} + htmlOutputData.cssStylesForEmoteNode.forEach((st) => { + emoteNodeStyle[st.propertyName] = st.propertyValue + }) - let scale = emoteData.height > MAX_HEIGHT ? MAX_HEIGHT/emoteData.height : 1 + let emoteNode = ( + + ) - let outerStyle = { - transform: `scale(${scale})`, - transformOrigin: "left top 0px", - position: "absolute", - top: 0, - left: 0 - } + // provide a wrapper node if necessary to apply the styles/classes from the 'parent node' info + if (htmlOutputData.cssClassesForParentNode.length > 0 || htmlOutputData.cssStylesForParentNode.length > 0) { + // workaround for the emotes package not currently just setting the properties directly + let parentNodeStyle = {} + htmlOutputData.cssStylesForParentNode.forEach((st) => { + parentNodeStyle[st.propertyName] = st.propertyValue + }) - let style = { - height: `${emoteData.height}px`, - width: `${emoteData.width}px`, - display: "inline-block", - position: "relative", - overflow: "hidden", - backgroundPosition: (emoteData["background-position"] || ["0px", "0px"]).join(" "), - backgroundImage: `url(${emoteData["background-image"]})` + emoteNode = ( + + {emoteNode} + + ) } - let emoteNode = - if(scale < 1) { - var outerWrapperStyle = { + // provide wrapping to implement scaling down to meet MAX_HEIGHT requirement + if (emoteData.height > MAX_HEIGHT) { + let scale = MAX_HEIGHT/emoteData.height + + let outerWrapperStyle = { height: MAX_HEIGHT, width: emoteData.width * scale, position: "relative", display: "inline-block" } - return ( + let innerWrapperStyle = { + transform: `scale(${scale})`, + transformOrigin: "left top 0px", + position: "absolute", + top: 0, + left: 0 + } + + emoteNode = ( - + {emoteNode} ) - } else { - return emoteNode } + + return emoteNode } } } From 7900a1b47b4a87c651882f6aedd7d376ba281814 Mon Sep 17 00:00:00 2001 From: James Manning Date: Mon, 28 Dec 2015 05:36:39 -0500 Subject: [PATCH 04/17] version updates required to work on Windows - sass-loader had to bump up to 1.0 - pre-1.0 versions would fail with "ERROR in `libsass` bindings not found. Try reinstalling `node-sass`?" - the upgrade of sass-loader to 1.0 required node-sass upgrading to v3 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 6e3536c..c150fae 100644 --- a/package.json +++ b/package.json @@ -29,12 +29,12 @@ "jquery": "^2.1.4", "map-stream": "0.0.5", "node-libs-browser": "~0.5.2", - "node-sass": "^2.0.1", + "node-sass": "^3.0.0", "react": "^0.14.1", "react-dom": "^0.14.1", "react-hot-loader": "^1.3.0", "react-timeago": "^2.2.1", - "sass-loader": "^0.4.2", + "sass-loader": "^1.0.0", "socket.io-client": "~0.9.10", "spellchecker": "^3.1.3", "striptags": "^2.0.4", From 87b13c5f213618930f329d9c3f52f2fb620f7bf7 Mon Sep 17 00:00:00 2001 From: James Manning Date: Tue, 29 Dec 2015 22:18:23 -0500 Subject: [PATCH 05/17] go back to using a regex defined in utils.jsx, just modify it as necessary --- src/scripts/utils.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/scripts/utils.jsx b/src/scripts/utils.jsx index a739917..311357b 100644 --- a/src/scripts/utils.jsx +++ b/src/scripts/utils.jsx @@ -1,5 +1,4 @@ let Emote = require("./emote.jsx") -let {EmoteParser} = require("emotes") let mapAlternate = function(array, fn1, fn2, thisArg) { var fn = fn1, output = [] @@ -12,10 +11,12 @@ let mapAlternate = function(array, fn1, fn2, thisArg) { return output } +let emoteRegex = /(\[[^\]]*\]\(\/[\w:!#\/]+[-\w!]*[^)]*\))/gi + let Utils = { mapAlternate: mapAlternate, componentizeString: function(s) { - let ret = mapAlternate(s.split(EmoteParser.emoteParseRegexp), function(s) { + let ret = mapAlternate(s.split(emoteRegex), function(s) { return s }, function(s,i) { return From a1a5eaef54e9b2325115c5a4a19b4202e1241bc4 Mon Sep 17 00:00:00 2001 From: James Manning Date: Wed, 30 Dec 2015 13:07:34 -0500 Subject: [PATCH 06/17] change devtool so source mapping to original ES6 source works --- webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 0f79b04..50654d3 100755 --- a/webpack.config.js +++ b/webpack.config.js @@ -8,7 +8,7 @@ module.exports = { 'webpack/hot/only-dev-server', './src/scripts/router' ], - devtool: "eval", + devtool: "eval-source-map", debug: true, output: { path: path.join(__dirname, "public"), From 9180015f670781ca64bae8c033d794ea6a15f65f Mon Sep 17 00:00:00 2001 From: James Manning Date: Thu, 31 Dec 2015 01:46:16 -0500 Subject: [PATCH 07/17] get emote effects working - invert and hue-rotate needed the appropriate berrymotes invert js (snippet copied from berrymotes.berrytube.js - all the animation effects (brody, vibrate, zspin, etc) needed inclusion of http://berrymotes.com/assets/berrymotes.core.css --- src/scripts/berrymotes.jsx | 21 ++++++ src/scripts/emote.jsx | 144 ++++++++++++++++++------------------- 2 files changed, 92 insertions(+), 73 deletions(-) diff --git a/src/scripts/berrymotes.jsx b/src/scripts/berrymotes.jsx index eba3b00..266216f 100644 --- a/src/scripts/berrymotes.jsx +++ b/src/scripts/berrymotes.jsx @@ -19,6 +19,7 @@ let Bem = ee({ } }) map = new EmoteMap(rawEmotes) + this.map = map this.emit("update") }) }, @@ -158,4 +159,24 @@ let Bem = ee({ Bem.dataRefresh() +// copied from http://berrymotes.com/berrymotes.berrytube.js?_=1451435285149 +// included to support -invert and -i emote flags +if (document.body.style.webkitFilter !== undefined) { + const invertScript = document.createElement('script'); + invertScript.type = 'text/javascript'; + invertScript.src = 'http://berrymotes.com/assets/berrymotes.webkit.invert.js'; + document.body.appendChild(invertScript); +} else { + const invertScript = document.createElement('script'); + invertScript.type = 'text/javascript'; + invertScript.src = 'http://berrymotes.com/assets/berrymotes.invertfilter.js'; + document.body.appendChild(invertScript); +} + +const berrymoteCoreCss = document.createElement('link') +berrymoteCoreCss.setAttribute('rel', 'stylesheet') +berrymoteCoreCss.setAttribute('type', 'text/css') +berrymoteCoreCss.setAttribute('href', 'http://berrymotes.com/assets/berrymotes.core.css') +document.getElementsByTagName("head")[0].appendChild(berrymoteCoreCss) + module.exports = Bem diff --git a/src/scripts/emote.jsx b/src/scripts/emote.jsx index 70826f1..ed59552 100644 --- a/src/scripts/emote.jsx +++ b/src/scripts/emote.jsx @@ -7,38 +7,36 @@ let APNG = window.APNG let Bem = require("./berrymotes.jsx") let {EmoteParser, EmoteHtml} = require("emotes") let parser = new EmoteParser() -let html = new EmoteHtml(Bem.map) +let html = Bem.map && new EmoteHtml(Bem.map) const MAX_HEIGHT = 200 module.exports = class Emote extends React.Component { constructor(props) { super(props) - var emoteIdentifier, originalString, htmlOutputData + html = Bem.map && new EmoteHtml(Bem.map) // emoteId will be set when this is used via search results - if(props.emoteId) { - emoteIdentifier = props.emoteId - originalString = props.emoteId - htmlOutputData = html.getEmoteHtmlMetadataForEmoteName(props.emoteId) - } else { - let emoteObject = parser.parse(props.emote) - emoteIdentifier = emoteObject.emoteIdentifier - originalString = emoteObject.originalString - htmlOutputData = html.getEmoteHtmlMetadataForObject(emoteObject) - } + + var emoteToParse = props.emote || `[](/${props.emoteId})` + this.setStateFromEmoteString(emoteToParse) + Bem.on("update", this.onEmoteUpdate.bind(this)) + } + + setStateFromEmoteString(emoteString) { + var emoteIdentifier, originalString, htmlOutputData + let emoteObject = parser.parse(emoteString) + emoteIdentifier = emoteObject.emoteIdentifier + originalString = emoteObject.originalString + htmlOutputData = html && html.getEmoteHtmlMetadataForObject(emoteObject) this.state = { originalString, emoteIdentifier, - htmlOutputData, - emoteData: Bem.findEmote(emoteIdentifier) + htmlOutputData } - Bem.on("update", this.onEmoteUpdate.bind(this)) } onEmoteUpdate() { - this.setState({ - emoteData: Bem.findEmote(this.state.emoteIdentifier), - htmlOutputData: html.getEmoteHtmlMetadataForEmoteName(this.state.emoteIdentifier) - }) + html = html || new EmoteHtml(Bem.map) + setStateFromEmoteString(this.state.originalString) } componentDidMount() { @@ -68,75 +66,75 @@ module.exports = class Emote extends React.Component { } render() { - let emoteData = this.state.emoteData let htmlOutputData = this.state.htmlOutputData - if(!htmlOutputData) { return {this.state.originalString} - } else { + } + + let emoteData = this.state.htmlOutputData.emoteData - // emotes have berryemote class set automatically, but we need berrymotes set as well - let className = htmlOutputData.cssClassesForEmoteNode - className['berrymotes'] = true + // emotes have berryemote class set automatically, but we need berrymotes set as well + let className = htmlOutputData.cssClassesForEmoteNode + className['berrymotes'] = true + + // workaround for the emotes package not currently just setting the properties directly + let emoteNodeStyle = {} + htmlOutputData.cssStylesForEmoteNode.forEach((st) => { + emoteNodeStyle[st.propertyName] = st.propertyValue + }) + + let emoteNode = ( + + ) + + // provide a wrapper node if necessary to apply the styles/classes from the 'parent node' info + if (htmlOutputData.cssClassesForParentNode.length > 0 || htmlOutputData.cssStylesForParentNode.length > 0) { // workaround for the emotes package not currently just setting the properties directly - let emoteNodeStyle = {} - htmlOutputData.cssStylesForEmoteNode.forEach((st) => { - emoteNodeStyle[st.propertyName] = st.propertyValue + let parentNodeStyle = {} + htmlOutputData.cssStylesForParentNode.forEach((st) => { + parentNodeStyle[st.propertyName] = st.propertyValue }) - let emoteNode = ( - + emoteNode = ( + + {emoteNode} + ) + } - // provide a wrapper node if necessary to apply the styles/classes from the 'parent node' info - if (htmlOutputData.cssClassesForParentNode.length > 0 || htmlOutputData.cssStylesForParentNode.length > 0) { - // workaround for the emotes package not currently just setting the properties directly - let parentNodeStyle = {} - htmlOutputData.cssStylesForParentNode.forEach((st) => { - parentNodeStyle[st.propertyName] = st.propertyValue - }) + // provide wrapping to implement scaling down to meet MAX_HEIGHT requirement + if (emoteData.height > MAX_HEIGHT) { + let scale = MAX_HEIGHT/emoteData.height - emoteNode = ( - - {emoteNode} - - ) + let outerWrapperStyle = { + height: MAX_HEIGHT, + width: emoteData.width * scale, + position: "relative", + display: "inline-block" } - // provide wrapping to implement scaling down to meet MAX_HEIGHT requirement - if (emoteData.height > MAX_HEIGHT) { - let scale = MAX_HEIGHT/emoteData.height - - let outerWrapperStyle = { - height: MAX_HEIGHT, - width: emoteData.width * scale, - position: "relative", - display: "inline-block" - } - - let innerWrapperStyle = { - transform: `scale(${scale})`, - transformOrigin: "left top 0px", - position: "absolute", - top: 0, - left: 0 - } - - emoteNode = ( - - - {emoteNode} - - - ) + let innerWrapperStyle = { + transform: `scale(${scale})`, + transformOrigin: "left top 0px", + position: "absolute", + top: 0, + left: 0 } - return emoteNode + emoteNode = ( + + + {emoteNode} + + + ) } + + return emoteNode } } From ef82b51f4592610221414a853f9c5763dea3f7bb Mon Sep 17 00:00:00 2001 From: James Manning Date: Sat, 2 Jan 2016 18:26:39 -0500 Subject: [PATCH 08/17] simplify style declaration now that emotes package uses properties --- src/scripts/emote.jsx | 263 ++++++++++++++++++++---------------------- 1 file changed, 123 insertions(+), 140 deletions(-) diff --git a/src/scripts/emote.jsx b/src/scripts/emote.jsx index ed59552..55fbf25 100644 --- a/src/scripts/emote.jsx +++ b/src/scripts/emote.jsx @@ -1,140 +1,123 @@ -let React = require("react") -let cx = require("classnames") -// APNG is bad and just creates a global -let _APNG = require("apng-canvas") -let APNG = window.APNG - -let Bem = require("./berrymotes.jsx") -let {EmoteParser, EmoteHtml} = require("emotes") -let parser = new EmoteParser() -let html = Bem.map && new EmoteHtml(Bem.map) -const MAX_HEIGHT = 200 - -module.exports = class Emote extends React.Component { - constructor(props) { - super(props) - html = Bem.map && new EmoteHtml(Bem.map) - // emoteId will be set when this is used via search results - - var emoteToParse = props.emote || `[](/${props.emoteId})` - this.setStateFromEmoteString(emoteToParse) - Bem.on("update", this.onEmoteUpdate.bind(this)) - } - - setStateFromEmoteString(emoteString) { - var emoteIdentifier, originalString, htmlOutputData - let emoteObject = parser.parse(emoteString) - emoteIdentifier = emoteObject.emoteIdentifier - originalString = emoteObject.originalString - htmlOutputData = html && html.getEmoteHtmlMetadataForObject(emoteObject) - this.state = { - originalString, - emoteIdentifier, - htmlOutputData - } - } - - onEmoteUpdate() { - html = html || new EmoteHtml(Bem.map) - setStateFromEmoteString(this.state.originalString) - } - - componentDidMount() { - let node = this.refs.emote - - // @TODO only apply this if we actually dont have native apng support - // also allow animate only on hover for emote search - if(this.state.emoteData && this.state.emoteData.apng_url) { - APNG.parseURL(this.state.emoteData.apng_url).then((anim) => { - let canvas = document.createElement("canvas") - canvas.width = anim.width - canvas.height = anim.height - - let position = (this.state.emoteData["background-position"] || ["0px", "0px"]) - node.appendChild(canvas) - - node.style.backgroundImage = null - canvas.style.position = "absolute" - canvas.style.left = position[0] - canvas.style.top = position[1] - anim.addContext(canvas.getContext("2d")) - anim.numPlays = Math.floor(60000/anim.playTime) // only run animations for 1min - anim.rewind() - anim.play() - }) - } - } - - render() { - let htmlOutputData = this.state.htmlOutputData - if(!htmlOutputData) { - return {this.state.originalString} - } - - let emoteData = this.state.htmlOutputData.emoteData - - - // emotes have berryemote class set automatically, but we need berrymotes set as well - let className = htmlOutputData.cssClassesForEmoteNode - className['berrymotes'] = true - - // workaround for the emotes package not currently just setting the properties directly - let emoteNodeStyle = {} - htmlOutputData.cssStylesForEmoteNode.forEach((st) => { - emoteNodeStyle[st.propertyName] = st.propertyValue - }) - - let emoteNode = ( - - ) - - // provide a wrapper node if necessary to apply the styles/classes from the 'parent node' info - if (htmlOutputData.cssClassesForParentNode.length > 0 || htmlOutputData.cssStylesForParentNode.length > 0) { - // workaround for the emotes package not currently just setting the properties directly - let parentNodeStyle = {} - htmlOutputData.cssStylesForParentNode.forEach((st) => { - parentNodeStyle[st.propertyName] = st.propertyValue - }) - - emoteNode = ( - - {emoteNode} - - ) - } - - // provide wrapping to implement scaling down to meet MAX_HEIGHT requirement - if (emoteData.height > MAX_HEIGHT) { - let scale = MAX_HEIGHT/emoteData.height - - let outerWrapperStyle = { - height: MAX_HEIGHT, - width: emoteData.width * scale, - position: "relative", - display: "inline-block" - } - - let innerWrapperStyle = { - transform: `scale(${scale})`, - transformOrigin: "left top 0px", - position: "absolute", - top: 0, - left: 0 - } - - emoteNode = ( - - - {emoteNode} - - - ) - } - - return emoteNode - } -} +let React = require("react") +let cx = require("classnames") +// APNG is bad and just creates a global +let _APNG = require("apng-canvas") +let APNG = window.APNG + +let Bem = require("./berrymotes.jsx") +let {EmoteParser, EmoteHtml} = require("emotes") +let parser = new EmoteParser() +let html = Bem.map && new EmoteHtml(Bem.map) +const MAX_HEIGHT = 200 + +module.exports = class Emote extends React.Component { + constructor(props) { + super(props) + html = Bem.map && new EmoteHtml(Bem.map) + + // emoteId will be set when this is used via search results + var emoteToParse = props.emote || `[](/${props.emoteId})` + this.setStateFromEmoteString(emoteToParse) + Bem.on("update", this.onEmoteUpdate.bind(this)) + } + + setStateFromEmoteString(emoteString) { + var emoteIdentifier, originalString, htmlOutputData + let emoteObject = parser.parse(emoteString) + emoteIdentifier = emoteObject.emoteIdentifier + originalString = emoteObject.originalString + htmlOutputData = html && html.getEmoteHtmlMetadataForObject(emoteObject) + this.state = { + originalString, + emoteIdentifier, + htmlOutputData + } + } + + onEmoteUpdate() { + html = html || new EmoteHtml(Bem.map) + setStateFromEmoteString(this.state.originalString) + } + + componentDidMount() { + let node = this.refs.emote + + // @TODO only apply this if we actually dont have native apng support + // also allow animate only on hover for emote search + if(this.state.emoteData && this.state.emoteData.apng_url) { + APNG.parseURL(this.state.emoteData.apng_url).then((anim) => { + let canvas = document.createElement("canvas") + canvas.width = anim.width + canvas.height = anim.height + + let position = (this.state.emoteData["background-position"] || ["0px", "0px"]) + node.appendChild(canvas) + + node.style.backgroundImage = null + canvas.style.position = "absolute" + canvas.style.left = position[0] + canvas.style.top = position[1] + anim.addContext(canvas.getContext("2d")) + anim.numPlays = Math.floor(60000/anim.playTime) // only run animations for 1min + anim.rewind() + anim.play() + }) + } + } + + render() { + let htmlOutputData = this.state.htmlOutputData + if(!htmlOutputData) { + return {this.state.originalString} + } + + let emoteData = this.state.htmlOutputData.emoteData + + let emoteNode = ( + + ) + + // provide a wrapper node if necessary to apply the styles/classes from the 'parent node' info + if (htmlOutputData.cssClassesForParentNode.length > 0 || htmlOutputData.cssStylesForParentNode) { + emoteNode = ( + + {emoteNode} + + ) + } + + // provide wrapping to implement scaling down to meet MAX_HEIGHT requirement + if (emoteData.height > MAX_HEIGHT) { + let scale = MAX_HEIGHT/emoteData.height + + let outerWrapperStyle = { + height: MAX_HEIGHT, + width: emoteData.width * scale, + position: "relative", + display: "inline-block" + } + + let innerWrapperStyle = { + transform: `scale(${scale})`, + transformOrigin: "left top 0px", + position: "absolute", + top: 0, + left: 0 + } + + emoteNode = ( + + + {emoteNode} + + + ) + } + + return emoteNode + } +} From aa3d43e17893618647fd5fc1116644986b5787f7 Mon Sep 17 00:00:00 2001 From: James Manning Date: Tue, 5 Jan 2016 19:09:13 -0500 Subject: [PATCH 09/17] support the new emotes package version, gets rid of dangerous innerhtml --- src/scripts/emote.jsx | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/src/scripts/emote.jsx b/src/scripts/emote.jsx index 55fbf25..46b9409 100644 --- a/src/scripts/emote.jsx +++ b/src/scripts/emote.jsx @@ -17,17 +17,17 @@ module.exports = class Emote extends React.Component { // emoteId will be set when this is used via search results var emoteToParse = props.emote || `[](/${props.emoteId})` - this.setStateFromEmoteString(emoteToParse) + this.state = this.getStateFromEmoteString(emoteToParse) Bem.on("update", this.onEmoteUpdate.bind(this)) } - setStateFromEmoteString(emoteString) { + getStateFromEmoteString(emoteString) { var emoteIdentifier, originalString, htmlOutputData let emoteObject = parser.parse(emoteString) emoteIdentifier = emoteObject.emoteIdentifier originalString = emoteObject.originalString htmlOutputData = html && html.getEmoteHtmlMetadataForObject(emoteObject) - this.state = { + return { originalString, emoteIdentifier, htmlOutputData @@ -36,7 +36,8 @@ module.exports = class Emote extends React.Component { onEmoteUpdate() { html = html || new EmoteHtml(Bem.map) - setStateFromEmoteString(this.state.originalString) + let state = this.getStateFromEmoteString(this.state.originalString) + this.setState(state) } componentDidMount() { @@ -73,12 +74,26 @@ module.exports = class Emote extends React.Component { let emoteData = this.state.htmlOutputData.emoteData + let textNodes = [] + + if (htmlOutputData.emText) { + textNodes.push({htmlOutputData.emText}) + } + if (htmlOutputData.strongText) { + textNodes.push({htmlOutputData.strongText}) + } + if (htmlOutputData.altText) { + textNodes.push(htmlOutputData.altText) + } + let emoteNode = ( + style={htmlOutputData.cssStylesForEmoteNode}> + {textNodes} + ) // provide a wrapper node if necessary to apply the styles/classes from the 'parent node' info From 135f568a8dbef7d9724defd4333a4ec9df326cb9 Mon Sep 17 00:00:00 2001 From: James Manning Date: Sun, 22 Jan 2017 18:25:14 -0500 Subject: [PATCH 10/17] add published files to docs dir --- docs/app-bundle.js | 35 +++ docs/app-bundle.js.map | 1 + docs/bootstrap-theme.min.css | 5 + docs/bootstrap.min.css | 5 + docs/favicon.png | Bin 0 -> 16328 bytes docs/fonts/glyphicons-halflings-regular.eot | Bin 0 -> 20290 bytes docs/fonts/glyphicons-halflings-regular.svg | 229 +++++++++++++++++++ docs/fonts/glyphicons-halflings-regular.ttf | Bin 0 -> 41236 bytes docs/fonts/glyphicons-halflings-regular.woff | Bin 0 -> 23292 bytes docs/index.html | 16 ++ docs/main.js | 196 ++++++++++++++++ docs/native.js | 25 ++ docs/package.json | 71 ++++++ docs/sounds/drink.wav | Bin 0 -> 124460 bytes docs/sounds/notify.wav | Bin 0 -> 124460 bytes docs/sounds/ohmy.wav | Bin 0 -> 145196 bytes docs/squeezychat-bundle.js | 33 +++ docs/squeezychat-bundle.js.map | 1 + 18 files changed, 617 insertions(+) create mode 100644 docs/app-bundle.js create mode 100644 docs/app-bundle.js.map create mode 100644 docs/bootstrap-theme.min.css create mode 100644 docs/bootstrap.min.css create mode 100644 docs/favicon.png create mode 100644 docs/fonts/glyphicons-halflings-regular.eot create mode 100644 docs/fonts/glyphicons-halflings-regular.svg create mode 100644 docs/fonts/glyphicons-halflings-regular.ttf create mode 100644 docs/fonts/glyphicons-halflings-regular.woff create mode 100755 docs/index.html create mode 100644 docs/main.js create mode 100644 docs/native.js create mode 100644 docs/package.json create mode 100644 docs/sounds/drink.wav create mode 100644 docs/sounds/notify.wav create mode 100644 docs/sounds/ohmy.wav create mode 100644 docs/squeezychat-bundle.js create mode 100644 docs/squeezychat-bundle.js.map diff --git a/docs/app-bundle.js b/docs/app-bundle.js new file mode 100644 index 0000000..c9ed0af --- /dev/null +++ b/docs/app-bundle.js @@ -0,0 +1,35 @@ +!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){var r,o,i;n(2),o=n(6),i=n(158),window.React=o,r=n(159),i.render(o.createElement(r,null),document.getElementById("app"))},function(e,t,n){var r=n(3);"string"==typeof r&&(r=[[e.id,r,""]]);n(5)(r,{})},function(e,t,n){t=e.exports=n(4)(),t.push([e.id,'*,*:before,*:after{box-sizing:border-box}.hidden{display:none}html,body{padding:0}html,body,#main-container,#app{height:100%;width:100%;color:#262626;margin:0;font-size:14px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;line-height:1.42857143;background-color:#fff}#app{padding:0}#main-container{padding:50px 0 0}#title-bar{top:0;position:absolute;height:50px;width:100%;line-height:50px;padding:0 1em;-webkit-app-region:drag;-webkit-user-select:none;cursor:move;z-index:10000}#title-bar .tooltip.bottom .tooltip-arrow{border-bottom-color:#eee}#title-bar .tooltip-inner{max-width:400px;width:400px;font-weight:400;background-color:#eee;color:#000}#title-bar .tooltip-inner tr{border:1px solid #aaa;text-align:left}#title-bar .icon{width:16px;height:16px;top:17px;left:15px;position:absolute}#title-bar .title{font-weight:700;font-size:1em;top:15px;left:36px;position:absolute;display:block;line-height:20px;color:#444;padding-right:205px;height:20px;overflow:hidden}#title-bar .notify,#title-bar .notify a{color:#b419a2}#title-bar .now-playing{font-weight:400;color:#888}#title-bar .drink-count{font-weight:700}#title-bar .menu{-webkit-app-region:no-drag;position:absolute;top:15px;right:15px;color:#aaa}#title-bar .menu a{color:#aaa}#title-bar .menu>span{font-size:1em;cursor:pointer;display:block;float:left;margin-left:15px;height:20px;line-height:20px}#title-bar .dropdown-menu{right:0;left:auto;min-width:100px;position:absolute;background:#fff;list-style:none;padding:0 10px;box-shadow:0 0 3px;top:10px}#title-bar .dropdown-menu a{color:#262626;vertical-align:middle;line-height:14px;margin-bottom:5px}#title-bar .dropdown-menu .material-icons{vertical-align:middle;font-size:18px;margin-right:5px;line-height:14px}#title-bar .dropdown-menu li{margin:10px 0;font-size:14px;vertical-align:middle}#title-bar .dropdown-menu li.divider{height:1px;background:#eee;margin:0 -10px}.polls .panel.inactive{background-color:#ddd;color:#aaa}.polls .panel.inactive .votes{border-color:#aaa}.polls .disable .votes{cursor:default}.polls ul{padding-left:0;margin-bottom:0}.polls ul li{list-style:none;margin-bottom:5px}.polls ul .votes{border:2px solid #444;padding:5px;min-width:40px;display:inline-block;text-align:center;cursor:pointer;margin-right:10px}.polls ul .votes.voted{border-width:4px}.chat{height:100%;padding-bottom:50px;position:relative;overflow:hidden}.chat .embed{max-width:300px;padding:5px;border:1px solid #e5e5e5;width:auto}.chat .embed img,.chat .embed iframe{width:100%}.chat .user-list,.chat .playlist,.chat .poll-list,.chat .squee-inbox{max-width:85%;right:0;top:0;height:100%;position:absolute;background-color:#fff;z-index:100;overflow:auto;border-left:1px solid #eaeaea;box-shadow:0 0 5px 0 rgba(0,0,0,.2);border-top:1px solid #eee}.chat .user-list ul{padding-left:1em;margin:0}.chat .playlist ul{margin:0}.chat .poll-list ul,.chat .squee-inbox ul{padding-left:1em;margin:0}.chat .user-list li,.chat .playlist li,.chat .poll-list li,.chat .squee-inbox li{list-style:none}.chat .user-list{width:200px}.chat .user-list .type2{color:green!important}.chat .user-list .type1{color:red!important}.chat .playlist{width:400px}.chat .playlist ul{padding:3px}.chat .playlist li{padding:3px;margin-bottom:3px;border:1px solid #B191B5;height:28px;overflow:hidden}.chat .playlist li.active{background:0 0 #FFF0B5;border-color:#C39C00;color:#C39C00}.chat .playlist li.volatile{background:0 0 #FFA6A6;color:#a82e2e;border-color:#a82e2e}.chat .playlist li.volatile.active{background:0 0 #FFF0B5;border-color:#a82e2e}.chat .poll-list{width:450px;padding:10px}.chat .squee-inbox{width:450px;padding:25px 10px 10px}.chat .squee-inbox .msg-row{padding-left:10px}.chat .squee-inbox .msg-row.squee{background:#fff}.chat .squee-inbox .clear-all{position:absolute;top:10px;right:10px;color:#aaa;z-index:1000;cursor:pointer}.chat .login-box{height:50px;position:relative;background:#fafafa;border-top:1px solid #eaeaea;padding:8px}.chat .login-box .alert-danger{position:absolute;top:-29px;color:#a94442;background-color:#f2dede;border-color:#ebccd1;width:100%;left:0;padding:0 12px}.chat .form-inline .form-control,.chat .form-inline .form-group{display:inline-block;vertical-align:middle}.chat .form-inline .form-group{margin-bottom:0;max-width:38%}.chat .input-box{height:50px;position:relative;background:#fafafa;border-top:1px solid #eaeaea}.chat .input-box .emote-search{position:absolute;width:100%;bottom:50px;padding:1em;max-height:400px;overflow-x:hidden;overflow-y:auto;background-color:#fff;border-top:1px solid #eaeaea;-webkit-box-shadow:0 0 3px}.chat .input-box .emote-search>span{display:inline-block!important;margin-right:2px}.chat .input-box input{width:100%;font-size:1.2em;padding:0 1em;height:50px;border:none;-webkit-text-smoothing:antialiased;-webkit-transition:height 150ms;outline:none}.chat .input-box input::-webkit-input-placeholder{-webkit-text-smoothing:antialiased}.chat .scroll-container{height:100%;padding:1em 36px 36px}.chat .scroller{height:100%;overflow-y:scroll;overflow-x:hidden;padding-right:1em}.msg-row{position:relative;border-bottom:1px solid #eee;padding:11px 90px 11px 0}.msg-row .thumbnail{height:150px;width:auto;display:inline-block;vertical-align:bottom;margin-bottom:0;border:1px solid #eee;padding:4px;position:relative;box-shadow:0 0 4px #eee;background:#fff}.msg-row .thumbnail.yt{border-color:red}.msg-row .thumbnail img{height:100%;display:inline-block;max-width:initial}.msg-row.request{color:#00f}.msg-row.act{color:#999}.msg-row.drink{color:purple;text-align:center;font-weight:700}.msg-row .user{font-weight:700;cursor:pointer}.msg-row.squee{background-color:#FFFED3}.msg-row.highlighted{background-color:#D3FFDE}.msg-row.seoncdaryHighlighted{background-color:#B3F1BD}.msg-row.self{background-color:#f9f9f9}.msg-row.ask{color:#888}.msg-row.system{color:#888;background-color:#D3FFDE}.msg-row.sweetiebot{font-family:fixed-width}.msg-row.rcv{color:red;font-size:1.2em}.msg-row.tabout{text-align:center;background-color:#FDFCDD;padding:0}.msg-row.quote{color:green}.msg-row .spoiler{background-color:#262626;color:#262626!important;padding:0 5px}.msg-row .spoiler:hover{color:#fff!important}.msg-row .timestamp{position:absolute;top:11px;right:11px;color:#ccc}@media only screen and (max-width:480px){.chat .user-list,.chat .playlist,.chat .poll-list{box-shadow:rgba(0,0,0,.5)0 0 4px 0}.chat .scroll-container{padding:0}.chat .scroller{padding:none}.chat .scroller .msg-row{padding:12px}.chat .scroller .msg-row .timestamp{display:none}#title-bar{box-shadow:rgba(0,0,0,.5)0 0 4px 0}#title-bar .now-playing{display:none}#title-bar .menu{right:0}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}a:focus,a:hover{color:#23527c;text-decoration:underline}a:active,a:hover{outline:0}a{color:#337ab7;text-decoration:none;background-color:transparent}button,select,textarea{line-height:inherit}input{line-height:normal}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}.pull-right{float:right!important}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.panel{border:1px solid #eee;box-shadow:0 0 5px #ddd}.panel .panel-heading{padding:10px 20px;background:#fafafa;border-bottom:1px solid #eee}.panel .panel-body{padding:15px 0}::-webkit-scrollbar-track{background-color:#fff}::-webkit-scrollbar{width:1px}::-webkit-scrollbar-thumb{background-color:#ddd}',""])},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t>"+t+" **/","/** "+t+"<< **/"],o=e.lastIndexOf(r[0]),i=n?r[0]+n+r[1]:"";if(e.lastIndexOf(r[0])>=0){var a=e.lastIndexOf(r[1])+r[1].length;return e.slice(0,o)+i+e.slice(a)}return e+i}function u(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=s(e.styleSheet.cssText,t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function l(e,t){var n=t.css,r=t.media,o=t.sourceMap;if(o&&"function"==typeof btoa)try{n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(JSON.stringify(o))+" */",n='@import url("data:text/css;base64,'+btoa(n)+'")'}catch(i){}if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var c={},p=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},d=p(function(){return/msie 9\b/.test(window.navigator.userAgent.toLowerCase())}),f=p(function(){return document.head||document.getElementsByTagName("head")[0]}),h=null,m=0;e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=d());var n=o(e);return r(n,t),function(e){for(var i=[],a=0;a"+s+""},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var o=a.getNode(this._rootNodeID);r.updateTextContent(o,n)}}},unmountComponent:function(){i.unmountIDFromEnvironment(this._rootNodeID)}}),e.exports=c},function(e,t){"use strict";function n(e,t){if(null==e)throw new TypeError("Object.assign target cannot be null or undefined");for(var n=Object(e),r=Object.prototype.hasOwnProperty,o=1;o=e.childNodes.length?null:e.childNodes.item(n);e.insertBefore(t,r)}var o=n(19),i=n(25),a=n(27),s=n(17),u=n(28),l=n(12),c={dangerouslyReplaceNodeWithMarkup:o.dangerouslyReplaceNodeWithMarkup,updateTextContent:u,processUpdates:function(e,t){for(var n,a=null,c=null,p=0;p]/,a=function(e,t){e.innerHTML=t};if("undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction&&(a=function(e,t){MSApp.execUnsafeLocalFunction(function(){e.innerHTML=t})}),r.canUseDOM){var s=document.createElement("div");s.innerHTML=" ",""===s.innerHTML&&(a=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),o.test(t)||"<"===t[0]&&i.test(t)){e.innerHTML=String.fromCharCode(65279)+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t})}e.exports=a},function(e,t){"use strict";var n=!("undefined"==typeof window||!window.document||!window.document.createElement),r={canUseDOM:n,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:n&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:n&&!!window.screen,isInWorker:!n};e.exports=r},function(e,t,n){"use strict";function r(e){return e.substring(1,e.indexOf(" "))}var o=n(18),i=n(20),a=n(24),s=n(23),u=n(12),l=/^(<[^ \/>]+)/,c="data-danger-index",p={dangerouslyRenderMarkup:function(e){o.canUseDOM?void 0:u(!1);for(var t,n={},p=0;pi;i++)r[i]=e[i];return r}var o=n(12);e.exports=r},function(e,t,n){"use strict";function r(e){return a?void 0:i(!1),d.hasOwnProperty(e)||(e="*"),s.hasOwnProperty(e)||("*"===e?a.innerHTML="":a.innerHTML="<"+e+">",s[e]=!a.firstChild),s[e]?d[e]:null}var o=n(18),i=n(12),a=o.canUseDOM?document.createElement("div"):null,s={},u=[1,'"],l=[1,"","
"],c=[3,"","
"],p=[1,'',""],d={"*":[1,"?
","
"],area:[1,"",""],col:[2,"","
"],legend:[1,"
","
"],param:[1,"",""],tr:[2,"","
"],optgroup:u,option:u,caption:l,colgroup:l,tbody:l,tfoot:l,thead:l,td:c,th:c},f=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];f.forEach(function(e){d[e]=p,s[e]=!0}),e.exports=r},function(e,t){"use strict";function n(e){return function(){return e}}function r(){}r.thatReturns=n,r.thatReturnsFalse=n(!1),r.thatReturnsTrue=n(!0),r.thatReturnsNull=n(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,n){"use strict";var r=n(26),o=r({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,SET_MARKUP:null,TEXT_CONTENT:null});e.exports=o},function(e,t,n){"use strict";var r=n(12),o=function(e){var t,n={};e instanceof Object&&!Array.isArray(e)?void 0:r(!1);for(t in e)e.hasOwnProperty(t)&&(n[t]=t);return n};e.exports=o},function(e,t,n){"use strict";function r(e,t,n){return n}var o={enableMeasure:!1,storedMeasure:r,measureMethods:function(e,t,n){},measure:function(e,t,n){return n},injection:{injectMeasure:function(e){o.storedMeasure=e}}};e.exports=o},function(e,t,n){"use strict";var r=n(18),o=n(29),i=n(17),a=function(e,t){e.textContent=t};r.canUseDOM&&("textContent"in document.documentElement||(a=function(e,t){i(e,o(t))})),e.exports=a},function(e,t){"use strict";function n(e){return o[e]}function r(e){return(""+e).replace(i,n)}var o={"&":"&",">":">","<":"<",'"':""","'":"'"},i=/[&><"']/g;e.exports=r},function(e,t,n){"use strict";function r(e){return c.hasOwnProperty(e)?!0:l.hasOwnProperty(e)?!1:u.test(e)?(c[e]=!0,!0):(l[e]=!0,!1)}function o(e,t){return null==t||e.hasBooleanValue&&!t||e.hasNumericValue&&isNaN(t)||e.hasPositiveNumericValue&&1>t||e.hasOverloadedBooleanValue&&t===!1}var i=n(32),a=n(27),s=n(33),u=(n(31),/^[a-zA-Z_][\w\.\-]*$/),l={},c={},p={createMarkupForID:function(e){return i.ID_ATTRIBUTE_NAME+"="+s(e)},setAttributeForID:function(e,t){e.setAttribute(i.ID_ATTRIBUTE_NAME,t)},createMarkupForProperty:function(e,t){var n=i.properties.hasOwnProperty(e)?i.properties[e]:null;if(n){if(o(n,t))return"";var r=n.attributeName;return n.hasBooleanValue||n.hasOverloadedBooleanValue&&t===!0?r+'=""':r+"="+s(t)}return i.isCustomAttribute(e)?null==t?"":e+"="+s(t):null},createMarkupForCustomAttribute:function(e,t){return r(e)&&null!=t?e+"="+s(t):""},setValueForProperty:function(e,t,n){var r=i.properties.hasOwnProperty(t)?i.properties[t]:null;if(r){var a=r.mutationMethod;if(a)a(e,n);else if(o(r,n))this.deleteValueForProperty(e,t);else if(r.mustUseAttribute){var s=r.attributeName,u=r.attributeNamespace;u?e.setAttributeNS(u,s,""+n):r.hasBooleanValue||r.hasOverloadedBooleanValue&&n===!0?e.setAttribute(s,""):e.setAttribute(s,""+n)}else{var l=r.propertyName;r.hasSideEffects&&""+e[l]==""+n||(e[l]=n)}}else i.isCustomAttribute(t)&&p.setValueForAttribute(e,t,n)},setValueForAttribute:function(e,t,n){r(t)&&(null==n?e.removeAttribute(t):e.setAttribute(t,""+n))},deleteValueForProperty:function(e,t){var n=i.properties.hasOwnProperty(t)?i.properties[t]:null;if(n){var r=n.mutationMethod;if(r)r(e,void 0);else if(n.mustUseAttribute)e.removeAttribute(n.attributeName);else{var o=n.propertyName,a=i.getDefaultValueForProperty(e.nodeName,o);n.hasSideEffects&&""+e[o]===a||(e[o]=a)}}else i.isCustomAttribute(t)&&e.removeAttribute(t)}};a.measureMethods(p,"DOMPropertyOperations",{setValueForProperty:"setValueForProperty",setValueForAttribute:"setValueForAttribute",deleteValueForProperty:"deleteValueForProperty"}),e.exports=p},function(e,t,n){"use strict";var r=n(24),o=r;e.exports=o},function(e,t,n){"use strict";function r(e,t){return(e&t)===t}var o=n(12),i={MUST_USE_ATTRIBUTE:1,MUST_USE_PROPERTY:2,HAS_SIDE_EFFECTS:4,HAS_BOOLEAN_VALUE:8,HAS_NUMERIC_VALUE:16,HAS_POSITIVE_NUMERIC_VALUE:48,HAS_OVERLOADED_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(e){var t=i,n=e.Properties||{},a=e.DOMAttributeNamespaces||{},u=e.DOMAttributeNames||{},l=e.DOMPropertyNames||{},c=e.DOMMutationMethods||{};e.isCustomAttribute&&s._isCustomAttributeFunctions.push(e.isCustomAttribute);for(var p in n){s.properties.hasOwnProperty(p)?o(!1):void 0;var d=p.toLowerCase(),f=n[p],h={attributeName:d,attributeNamespace:null,propertyName:p,mutationMethod:null,mustUseAttribute:r(f,t.MUST_USE_ATTRIBUTE),mustUseProperty:r(f,t.MUST_USE_PROPERTY),hasSideEffects:r(f,t.HAS_SIDE_EFFECTS),hasBooleanValue:r(f,t.HAS_BOOLEAN_VALUE),hasNumericValue:r(f,t.HAS_NUMERIC_VALUE),hasPositiveNumericValue:r(f,t.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:r(f,t.HAS_OVERLOADED_BOOLEAN_VALUE)};if(h.mustUseAttribute&&h.mustUseProperty?o(!1):void 0,!h.mustUseProperty&&h.hasSideEffects?o(!1):void 0,h.hasBooleanValue+h.hasNumericValue+h.hasOverloadedBooleanValue<=1?void 0:o(!1),u.hasOwnProperty(p)){var m=u[p];h.attributeName=m}a.hasOwnProperty(p)&&(h.attributeNamespace=a[p]),l.hasOwnProperty(p)&&(h.propertyName=l[p]),c.hasOwnProperty(p)&&(h.mutationMethod=c[p]),s.properties[p]=h}}},a={},s={ID_ATTRIBUTE_NAME:"data-reactid",properties:{},getPossibleStandardName:null,_isCustomAttributeFunctions:[],isCustomAttribute:function(e){for(var t=0;tr;r++)if(e.charAt(r)!==t.charAt(r))return r;return e.length===t.length?-1:n}function o(e){return e?e.nodeType===q?e.documentElement:e.firstChild:null}function i(e){var t=o(e);return t&&Y.getID(t)}function a(e){var t=s(e);if(t)if(B.hasOwnProperty(t)){var n=B[t];n!==e&&(p(n,t)?L(!1):void 0,B[t]=e)}else B[t]=e;return t}function s(e){return e&&e.getAttribute&&e.getAttribute(U)||""}function u(e,t){var n=s(e);n!==t&&delete B[n],e.setAttribute(U,t),B[t]=e}function l(e){return B.hasOwnProperty(e)&&p(B[e],e)||(B[e]=Y.findReactNodeByID(e)),B[e]}function c(e){var t=S.get(e)._rootNodeID;return C.isNullComponentID(t)?null:(B.hasOwnProperty(t)&&p(B[t],t)||(B[t]=Y.findReactNodeByID(t)),B[t])}function p(e,t){if(e){s(e)!==t?L(!1):void 0;var n=Y.findReactContainerForID(t);if(n&&M(n,e))return!0}return!1}function d(e){delete B[e]}function f(e){var t=B[e];return t&&p(t,e)?void(X=t):!1}function h(e){X=null,k.traverseAncestors(e,f);var t=X;return X=null,t}function m(e,t,n,r,o,i){E.useCreateElement&&(i=A({},i),n.nodeType===q?i[H]=n:i[H]=n.ownerDocument);var a=O.mountComponent(e,t,r,i);e._renderedComponent._topLevelWrapper=e,Y._mountImageIntoNode(a,n,o,r)}function v(e,t,n,r,o){var i=D.ReactReconcileTransaction.getPooled(r);i.perform(m,null,e,t,n,i,r,o),D.ReactReconcileTransaction.release(i)}function g(e,t){for(O.unmountComponent(e),t.nodeType===q&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)}function y(e){var t=i(e);return t?t!==k.getReactRootIDFromNodeID(t):!1}function b(e){for(;e&&e.parentNode!==e;e=e.parentNode)if(1===e.nodeType){var t=s(e);if(t){var n,r=k.getReactRootIDFromNodeID(t),o=e;do if(n=s(o),o=o.parentNode,null==o)return null;while(n!==r);if(o===K[r])return e}}return null}var _=n(32),w=n(37),E=(n(13),n(48)),x=n(49),C=n(51),k=n(52),S=n(54),T=n(55),N=n(27),O=n(9),P=n(57),D=n(58),A=n(15),R=n(62),M=n(63),I=n(66),L=n(12),j=n(17),F=n(71),U=(n(74),n(31),_.ID_ATTRIBUTE_NAME),B={},W=1,q=9,V=11,H="__ReactMount_ownerDocument$"+Math.random().toString(36).slice(2),z={},K={},$=[],X=null,G=function(){};G.prototype.isReactComponent={},G.prototype.render=function(){return this.props};var Y={TopLevelWrapper:G,_instancesByReactRootID:z,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,n,r){return Y.scrollMonitor(n,function(){P.enqueueElementInternal(e,t),r&&P.enqueueCallbackInternal(e,r)}),e},_registerComponent:function(e,t){!t||t.nodeType!==W&&t.nodeType!==q&&t.nodeType!==V?L(!1):void 0,w.ensureScrollValueMonitoring();var n=Y.registerContainer(t);return z[n]=e,n},_renderNewRootComponent:function(e,t,n,r){var o=I(e,null),i=Y._registerComponent(o,t);return D.batchedUpdates(v,o,i,t,n,r),o},renderSubtreeIntoContainer:function(e,t,n,r){return null==e||null==e._reactInternalInstance?L(!1):void 0,Y._renderSubtreeIntoContainer(e,t,n,r)},_renderSubtreeIntoContainer:function(e,t,n,r){x.isValidElement(t)?void 0:L(!1);var a=new x(G,null,null,null,null,null,t),u=z[i(n)];if(u){var l=u._currentElement,c=l.props;if(F(c,t)){var p=u._renderedComponent.getPublicInstance(),d=r&&function(){r.call(p)};return Y._updateRootComponent(u,a,n,d),p}Y.unmountComponentAtNode(n)}var f=o(n),h=f&&!!s(f),m=y(n),v=h&&!u&&!m,g=Y._renderNewRootComponent(a,n,v,null!=e?e._reactInternalInstance._processChildContext(e._reactInternalInstance._context):R)._renderedComponent.getPublicInstance();return r&&r.call(g),g},render:function(e,t,n){return Y._renderSubtreeIntoContainer(null,e,t,n)},registerContainer:function(e){var t=i(e);return t&&(t=k.getReactRootIDFromNodeID(t)),t||(t=k.createReactRootID()),K[t]=e,t},unmountComponentAtNode:function(e){!e||e.nodeType!==W&&e.nodeType!==q&&e.nodeType!==V?L(!1):void 0;var t=i(e),n=z[t];if(!n){var r=(y(e),s(e));r&&r===k.getReactRootIDFromNodeID(r);return!1}return D.batchedUpdates(g,n,e),delete z[t],delete K[t],!0},findReactContainerForID:function(e){var t=k.getReactRootIDFromNodeID(e),n=K[t];return n},findReactNodeByID:function(e){var t=Y.findReactContainerForID(e);return Y.findComponentRoot(t,e)},getFirstReactDOM:function(e){return b(e)},findComponentRoot:function(e,t){var n=$,r=0,o=h(t)||e;for(n[0]=o.firstChild,n.length=1;r-1?void 0:a(!1),!l.plugins[n]){t.extractEvents?void 0:a(!1),l.plugins[n]=t;var r=t.eventTypes;for(var i in r)o(r[i],t,i)?void 0:a(!1)}}}function o(e,t,n){l.eventNameDispatchConfigs.hasOwnProperty(n)?a(!1):void 0,l.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var o in r)if(r.hasOwnProperty(o)){var s=r[o];i(s,t,n)}return!0}return e.registrationName?(i(e.registrationName,t,n),!0):!1}function i(e,t,n){l.registrationNameModules[e]?a(!1):void 0,l.registrationNameModules[e]=t,l.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var a=n(12),s=null,u={},l={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(e){s?a(!1):void 0,s=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];u.hasOwnProperty(n)&&u[n]===o||(u[n]?a(!1):void 0,u[n]=o,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return l.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=l.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){s=null;for(var e in u)u.hasOwnProperty(e)&&delete u[e];l.plugins.length=0;var t=l.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=l.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};e.exports=l},function(e,t,n){"use strict";function r(e){return e===v.topMouseUp||e===v.topTouchEnd||e===v.topTouchCancel}function o(e){return e===v.topMouseMove||e===v.topTouchMove}function i(e){return e===v.topMouseDown||e===v.topTouchStart}function a(e,t,n,r){var o=e.type||"unknown-event";e.currentTarget=m.Mount.getNode(r),t?f.invokeGuardedCallbackWithCatch(o,n,e,r):f.invokeGuardedCallback(o,n,e,r),e.currentTarget=null}function s(e,t){var n=e._dispatchListeners,r=e._dispatchIDs;if(Array.isArray(n))for(var o=0;o1){for(var f=Array(d),h=0;d>h;h++)f[h]=arguments[h+2];i.children=f}if(e&&e.defaultProps){var m=e.defaultProps;for(o in m)"undefined"==typeof i[o]&&(i[o]=m[o])}return s(e,u,l,c,p,r.current,i)},s.createFactory=function(e){var t=s.createElement.bind(null,e);return t.type=e,t},s.cloneAndReplaceKey=function(e,t){var n=s(e.type,t,e.ref,e._self,e._source,e._owner,e.props);return n},s.cloneAndReplaceProps=function(e,t){var n=s(e.type,e.key,e.ref,e._self,e._source,e._owner,t);return n},s.cloneElement=function(e,t,n){var i,u=o({},e.props),l=e.key,c=e.ref,p=e._self,d=e._source,f=e._owner;if(null!=t){void 0!==t.ref&&(c=t.ref,f=r.current),void 0!==t.key&&(l=""+t.key);for(i in t)t.hasOwnProperty(i)&&!a.hasOwnProperty(i)&&(u[i]=t[i])}var h=arguments.length-2;if(1===h)u.children=n;else if(h>1){for(var m=Array(h),v=0;h>v;v++)m[v]=arguments[v+2];u.children=m}return s(e.type,l,c,p,d,f,u)},s.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},e.exports=s},function(e,t,n){"use strict";var r=!1;e.exports=r},function(e,t){"use strict";function n(e){return!!i[e]}function r(e){i[e]=!0}function o(e){delete i[e]}var i={},a={isNullComponentID:n,registerNullComponentID:r,deregisterNullComponentID:o};e.exports=a},function(e,t,n){"use strict";function r(e){return f+e.toString(36)}function o(e,t){return e.charAt(t)===f||t===e.length}function i(e){return""===e||e.charAt(0)===f&&e.charAt(e.length-1)!==f}function a(e,t){return 0===t.indexOf(e)&&o(t,e.length)}function s(e){return e?e.substr(0,e.lastIndexOf(f)):""}function u(e,t){if(i(e)&&i(t)?void 0:d(!1),a(e,t)?void 0:d(!1),e===t)return e;var n,r=e.length+h;for(n=r;n=a;a++)if(o(e,a)&&o(t,a))r=a;else if(e.charAt(a)!==t.charAt(a))break;var s=e.substr(0,r);return i(s)?void 0:d(!1),s}function c(e,t,n,r,o,i){e=e||"",t=t||"",e===t?d(!1):void 0;var l=a(t,e);l||a(e,t)?void 0:d(!1);for(var c=0,p=l?s:u,f=e;;f=p(f,t)){var h;if(o&&f===e||i&&f===t||(h=n(f,l,r)),h===!1||f===t)break;c++1){var t=e.indexOf(f,1);return t>-1?e.substr(0,t):e}return null},traverseEnterLeave:function(e,t,n,r,o){var i=l(e,t);i!==e&&c(e,i,n,r,!1,!0),i!==t&&c(i,t,n,o,!0,!1)},traverseTwoPhase:function(e,t,n){e&&(c("",e,t,n,!0,!1),c(e,"",t,n,!1,!0))},traverseTwoPhaseSkipTarget:function(e,t,n){e&&(c("",e,t,n,!0,!0),c(e,"",t,n,!0,!0))},traverseAncestors:function(e,t,n){c("",e,t,n,!0,!1)},getFirstCommonAncestorID:l,_getNextDescendantID:u,isAncestorIDOf:a,SEPARATOR:f};e.exports=v},function(e,t){"use strict";var n={injectCreateReactRootIndex:function(e){r.createReactRootIndex=e}},r={createReactRootIndex:null,injection:n};e.exports=r},function(e,t){"use strict";var n={remove:function(e){e._reactInternalInstance=void 0},get:function(e){return e._reactInternalInstance},has:function(e){return void 0!==e._reactInternalInstance},set:function(e,t){e._reactInternalInstance=t}};e.exports=n},function(e,t,n){"use strict";var r=n(56),o=/\/?>/,i={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return e.replace(o," "+i.CHECKSUM_ATTR_NAME+'="'+t+'"$&')},canReuseMarkup:function(e,t){var n=t.getAttribute(i.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var o=r(e);return o===n}};e.exports=i},function(e,t){"use strict";function n(e){for(var t=1,n=0,o=0,i=e.length,a=-4&i;a>o;){for(;oo;o++)n+=t+=e.charCodeAt(o);return t%=r,n%=r,t|n<<16}var r=65521;e.exports=n},function(e,t,n){"use strict";function r(e){s.enqueueUpdate(e)}function o(e,t){var n=a.get(e);return n?n:null}var i=(n(13),n(49)),a=n(54),s=n(58),u=n(15),l=n(12),c=(n(31),{isMounted:function(e){var t=a.get(e);return t?!!t._renderedComponent:!1},enqueueCallback:function(e,t){"function"!=typeof t?l(!1):void 0;var n=o(e);return n?(n._pendingCallbacks?n._pendingCallbacks.push(t):n._pendingCallbacks=[t],void r(n)):null},enqueueCallbackInternal:function(e,t){"function"!=typeof t?l(!1):void 0,e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],r(e)},enqueueForceUpdate:function(e){var t=o(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,r(t))},enqueueReplaceState:function(e,t){var n=o(e,"replaceState");n&&(n._pendingStateQueue=[t],n._pendingReplaceState=!0,r(n))},enqueueSetState:function(e,t){var n=o(e,"setState");if(n){var i=n._pendingStateQueue||(n._pendingStateQueue=[]);i.push(t),r(n)}},enqueueSetProps:function(e,t){var n=o(e,"setProps");n&&c.enqueueSetPropsInternal(n,t)},enqueueSetPropsInternal:function(e,t){var n=e._topLevelWrapper;n?void 0:l(!1);var o=n._pendingElement||n._currentElement,a=o.props,s=u({},a.props,t);n._pendingElement=i.cloneAndReplaceProps(o,i.cloneAndReplaceProps(a,s)),r(n)},enqueueReplaceProps:function(e,t){var n=o(e,"replaceProps");n&&c.enqueueReplacePropsInternal(n,t)},enqueueReplacePropsInternal:function(e,t){var n=e._topLevelWrapper;n?void 0:l(!1);var o=n._pendingElement||n._currentElement,a=o.props;n._pendingElement=i.cloneAndReplaceProps(o,i.cloneAndReplaceProps(a,t)),r(n)},enqueueElementInternal:function(e,t){e._pendingElement=t,r(e)}});e.exports=c},function(e,t,n){"use strict";function r(){S.ReactReconcileTransaction&&_?void 0:v(!1)}function o(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=c.getPooled(),this.reconcileTransaction=S.ReactReconcileTransaction.getPooled(!1)}function i(e,t,n,o,i,a){r(),_.batchedUpdates(e,t,n,o,i,a)}function a(e,t){return e._mountOrder-t._mountOrder}function s(e){var t=e.dirtyComponentsLength;t!==g.length?v(!1):void 0,g.sort(a);for(var n=0;t>n;n++){var r=g[n],o=r._pendingCallbacks;if(r._pendingCallbacks=null,f.performUpdateIfNecessary(r,e.reconcileTransaction),o)for(var i=0;i8&&11>=x),S=32,T=String.fromCharCode(S),N=f.topLevelTypes,O={beforeInput:{phasedRegistrationNames:{bubbled:b({onBeforeInput:null}),captured:b({onBeforeInputCapture:null})},dependencies:[N.topCompositionEnd,N.topKeyPress,N.topTextInput,N.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:b({onCompositionEnd:null}),captured:b({onCompositionEndCapture:null})},dependencies:[N.topBlur,N.topCompositionEnd,N.topKeyDown,N.topKeyPress,N.topKeyUp,N.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:b({onCompositionStart:null}),captured:b({onCompositionStartCapture:null})},dependencies:[N.topBlur,N.topCompositionStart,N.topKeyDown,N.topKeyPress,N.topKeyUp,N.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:b({onCompositionUpdate:null}),captured:b({onCompositionUpdateCapture:null})},dependencies:[N.topBlur,N.topCompositionUpdate,N.topKeyDown,N.topKeyPress,N.topKeyUp,N.topMouseDown]}},P=!1,D=null,A={eventTypes:O,extractEvents:function(e,t,n,r,o){return[l(e,t,n,r,o),d(e,t,n,r,o)]}};e.exports=A},function(e,t,n){"use strict";function r(e,t,n){var r=t.dispatchConfig.phasedRegistrationNames[n];return y(e,r)}function o(e,t,n){var o=t?g.bubbled:g.captured,i=r(e,n,o);i&&(n._dispatchListeners=m(n._dispatchListeners,i),n._dispatchIDs=m(n._dispatchIDs,e))}function i(e){e&&e.dispatchConfig.phasedRegistrationNames&&h.injection.getInstanceHandle().traverseTwoPhase(e.dispatchMarker,o,e)}function a(e){e&&e.dispatchConfig.phasedRegistrationNames&&h.injection.getInstanceHandle().traverseTwoPhaseSkipTarget(e.dispatchMarker,o,e)}function s(e,t,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispatchConfig.registrationName,o=y(e,r);o&&(n._dispatchListeners=m(n._dispatchListeners,o),n._dispatchIDs=m(n._dispatchIDs,e))}}function u(e){e&&e.dispatchConfig.registrationName&&s(e.dispatchMarker,null,e)}function l(e){v(e,i)}function c(e){v(e,a)}function p(e,t,n,r){h.injection.getInstanceHandle().traverseEnterLeave(n,r,s,e,t)}function d(e){v(e,u)}var f=n(38),h=n(39),m=(n(31),n(43)),v=n(44),g=f.PropagationPhases,y=h.getListener,b={accumulateTwoPhaseDispatches:l,accumulateTwoPhaseDispatchesSkipTarget:c,accumulateDirectDispatches:d,accumulateEnterLeaveDispatches:p};e.exports=b},function(e,t,n){"use strict";function r(e){this._root=e,this._startText=this.getText(),this._fallbackText=null}var o=n(60),i=n(15),a=n(79);i(r.prototype,{destructor:function(){this._root=null,this._startText=null,this._fallbackText=null},getText:function(){return"value"in this._root?this._root.value:this._root[a()]},getData:function(){if(this._fallbackText)return this._fallbackText;var e,t,n=this._startText,r=n.length,o=this.getText(),i=o.length;for(e=0;r>e&&n[e]===o[e];e++);var a=r-e;for(t=1;a>=t&&n[r-t]===o[i-t];t++);var s=t>1?1-t:void 0;return this._fallbackText=o.slice(e,s),this._fallbackText}}),o.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";function r(){return!i&&o.canUseDOM&&(i="textContent"in document.documentElement?"textContent":"innerText"),i}var o=n(18),i=null;e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=n(81),i={data:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){this.dispatchConfig=e,this.dispatchMarker=t,this.nativeEvent=n;var o=this.constructor.Interface;for(var i in o)if(o.hasOwnProperty(i)){var s=o[i];s?this[i]=s(n):"target"===i?this.target=r:this[i]=n[i]}var u=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1;u?this.isDefaultPrevented=a.thatReturnsTrue:this.isDefaultPrevented=a.thatReturnsFalse,this.isPropagationStopped=a.thatReturnsFalse}var o=n(60),i=n(15),a=n(24),s=(n(31),{type:null,target:null,currentTarget:a.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null});i(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():e.returnValue=!1,this.isDefaultPrevented=a.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,this.isPropagationStopped=a.thatReturnsTrue)},persist:function(){this.isPersistent=a.thatReturnsTrue},isPersistent:a.thatReturnsFalse,destructor:function(){var e=this.constructor.Interface;for(var t in e)this[t]=null;this.dispatchConfig=null,this.dispatchMarker=null,this.nativeEvent=null}}),r.Interface=s,r.augmentClass=function(e,t){var n=this,r=Object.create(n.prototype);i(r,e.prototype),e.prototype=r,e.prototype.constructor=e,e.Interface=i({},n.Interface,t),e.augmentClass=n.augmentClass,o.addPoolingTo(e,o.fourArgumentPooler)},o.addPoolingTo(r,o.fourArgumentPooler),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=n(81),i={data:null};o.augmentClass(r,i),e.exports=r},function(e,t){"use strict";var n=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};e.exports=n},function(e,t,n){"use strict";function r(e){var t=e.nodeName&&e.nodeName.toLowerCase();return"select"===t||"input"===t&&"file"===e.type}function o(e){var t=x.getPooled(O.change,D,e,C(e));_.accumulateTwoPhaseDispatches(t),E.batchedUpdates(i,t)}function i(e){b.enqueueEvents(e),b.processEventQueue(!1)}function a(e,t){P=e,D=t,P.attachEvent("onchange",o)}function s(){P&&(P.detachEvent("onchange",o),P=null,D=null)}function u(e,t,n){return e===N.topChange?n:void 0}function l(e,t,n){e===N.topFocus?(s(),a(t,n)):e===N.topBlur&&s()}function c(e,t){P=e,D=t,A=e.value,R=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),Object.defineProperty(P,"value",L),P.attachEvent("onpropertychange",d)}function p(){P&&(delete P.value,P.detachEvent("onpropertychange",d),P=null,D=null,A=null,R=null)}function d(e){if("value"===e.propertyName){var t=e.srcElement.value;t!==A&&(A=t,o(e))}}function f(e,t,n){return e===N.topInput?n:void 0}function h(e,t,n){e===N.topFocus?(p(),c(t,n)):e===N.topBlur&&p()}function m(e,t,n){return e!==N.topSelectionChange&&e!==N.topKeyUp&&e!==N.topKeyDown||!P||P.value===A?void 0:(A=P.value,D)}function v(e){return e.nodeName&&"input"===e.nodeName.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)}function g(e,t,n){return e===N.topClick?n:void 0}var y=n(38),b=n(39),_=n(77),w=n(18),E=n(58),x=n(81),C=n(85),k=n(47),S=n(86),T=n(83),N=y.topLevelTypes,O={change:{phasedRegistrationNames:{bubbled:T({onChange:null}),captured:T({onChangeCapture:null})},dependencies:[N.topBlur,N.topChange,N.topClick,N.topFocus,N.topInput,N.topKeyDown,N.topKeyUp,N.topSelectionChange]}},P=null,D=null,A=null,R=null,M=!1;w.canUseDOM&&(M=k("change")&&(!("documentMode"in document)||document.documentMode>8));var I=!1;w.canUseDOM&&(I=k("input")&&(!("documentMode"in document)||document.documentMode>9));var L={get:function(){return R.get.call(this)},set:function(e){A=""+e,R.set.call(this,e)}},j={eventTypes:O,extractEvents:function(e,t,n,o,i){var a,s;if(r(t)?M?a=u:s=l:S(t)?I?a=f:(a=m,s=h):v(t)&&(a=g),a){var c=a(e,t,n);if(c){var p=x.getPooled(O.change,c,o,i);return p.type="change",_.accumulateTwoPhaseDispatches(p),p}}s&&s(e,t,n)}};e.exports=j},function(e,t){"use strict";function n(e){var t=e.target||e.srcElement||window;return 3===t.nodeType?t.parentNode:t}e.exports=n},function(e,t){"use strict";function n(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&r[e.type]||"textarea"===t)}var r={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};e.exports=n},function(e,t){"use strict";var n=0,r={createReactRootIndex:function(){return n++}};e.exports=r},function(e,t,n){"use strict";var r=n(83),o=[r({ResponderEventPlugin:null}),r({SimpleEventPlugin:null}),r({TapEventPlugin:null}),r({EnterLeaveEventPlugin:null}),r({ChangeEventPlugin:null}),r({SelectEventPlugin:null}),r({BeforeInputEventPlugin:null +})];e.exports=o},function(e,t,n){"use strict";var r=n(38),o=n(77),i=n(90),a=n(36),s=n(83),u=r.topLevelTypes,l=a.getFirstReactDOM,c={mouseEnter:{registrationName:s({onMouseEnter:null}),dependencies:[u.topMouseOut,u.topMouseOver]},mouseLeave:{registrationName:s({onMouseLeave:null}),dependencies:[u.topMouseOut,u.topMouseOver]}},p=[null,null],d={eventTypes:c,extractEvents:function(e,t,n,r,s){if(e===u.topMouseOver&&(r.relatedTarget||r.fromElement))return null;if(e!==u.topMouseOut&&e!==u.topMouseOver)return null;var d;if(t.window===t)d=t;else{var f=t.ownerDocument;d=f?f.defaultView||f.parentWindow:window}var h,m,v="",g="";if(e===u.topMouseOut?(h=t,v=n,m=l(r.relatedTarget||r.toElement),m?g=a.getID(m):m=d,m=m||d):(h=d,m=t,g=n),h===m)return null;var y=i.getPooled(c.mouseLeave,v,r,s);y.type="mouseleave",y.target=h,y.relatedTarget=m;var b=i.getPooled(c.mouseEnter,g,r,s);return b.type="mouseenter",b.target=m,b.relatedTarget=h,o.accumulateEnterLeaveDispatches(y,b,v,g),p[0]=y,p[1]=b,p}};e.exports=d},function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=n(91),i=n(46),a=n(92),s={screenX:null,screenY:null,clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:a,button:function(e){var t=e.button;return"which"in e?t:2===t?2:4===t?1:0},buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},pageX:function(e){return"pageX"in e?e.pageX:e.clientX+i.currentScrollLeft},pageY:function(e){return"pageY"in e?e.pageY:e.clientY+i.currentScrollTop}};o.augmentClass(r,s),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=n(81),i=n(85),a={view:function(e){if(e.view)return e.view;var t=i(e);if(null!=t&&t.window===t)return t;var n=t.ownerDocument;return n?n.defaultView||n.parentWindow:window},detail:function(e){return e.detail||0}};o.augmentClass(r,a),e.exports=r},function(e,t){"use strict";function n(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=o[e];return r?!!n[r]:!1}function r(e){return n}var o={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};e.exports=r},function(e,t,n){"use strict";var r,o=n(32),i=n(18),a=o.injection.MUST_USE_ATTRIBUTE,s=o.injection.MUST_USE_PROPERTY,u=o.injection.HAS_BOOLEAN_VALUE,l=o.injection.HAS_SIDE_EFFECTS,c=o.injection.HAS_NUMERIC_VALUE,p=o.injection.HAS_POSITIVE_NUMERIC_VALUE,d=o.injection.HAS_OVERLOADED_BOOLEAN_VALUE;if(i.canUseDOM){var f=document.implementation;r=f&&f.hasFeature&&f.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}var h={isCustomAttribute:RegExp.prototype.test.bind(/^(data|aria)-[a-z_][a-z\d_.\-]*$/),Properties:{accept:null,acceptCharset:null,accessKey:null,action:null,allowFullScreen:a|u,allowTransparency:a,alt:null,async:u,autoComplete:null,autoPlay:u,capture:a|u,cellPadding:null,cellSpacing:null,charSet:a,challenge:a,checked:s|u,classID:a,className:r?a:s,cols:a|p,colSpan:null,content:null,contentEditable:null,contextMenu:a,controls:s|u,coords:null,crossOrigin:null,data:null,dateTime:a,"default":u,defer:u,dir:null,disabled:a|u,download:d,draggable:null,encType:null,form:a,formAction:a,formEncType:a,formMethod:a,formNoValidate:u,formTarget:a,frameBorder:a,headers:null,height:a,hidden:a|u,high:null,href:null,hrefLang:null,htmlFor:null,httpEquiv:null,icon:null,id:s,inputMode:a,integrity:null,is:a,keyParams:a,keyType:a,kind:null,label:null,lang:null,list:a,loop:s|u,low:null,manifest:a,marginHeight:null,marginWidth:null,max:null,maxLength:a,media:a,mediaGroup:null,method:null,min:null,minLength:a,multiple:s|u,muted:s|u,name:null,nonce:a,noValidate:u,open:u,optimum:null,pattern:null,placeholder:null,poster:null,preload:null,radioGroup:null,readOnly:s|u,rel:null,required:u,reversed:u,role:a,rows:a|p,rowSpan:null,sandbox:null,scope:null,scoped:u,scrolling:null,seamless:a|u,selected:s|u,shape:null,size:a|p,sizes:a,span:p,spellCheck:null,src:null,srcDoc:s,srcLang:null,srcSet:a,start:c,step:null,style:null,summary:null,tabIndex:null,target:null,title:null,type:null,useMap:null,value:s|l,width:a,wmode:a,wrap:null,about:a,datatype:a,inlist:a,prefix:a,property:a,resource:a,"typeof":a,vocab:a,autoCapitalize:a,autoCorrect:a,autoSave:null,color:null,itemProp:a,itemScope:a|u,itemType:a,itemID:a,itemRef:a,results:null,security:a,unselectable:a},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{autoComplete:"autocomplete",autoFocus:"autofocus",autoPlay:"autoplay",autoSave:"autosave",encType:"encoding",hrefLang:"hreflang",radioGroup:"radiogroup",spellCheck:"spellcheck",srcDoc:"srcdoc",srcSet:"srcset"}};e.exports=h},function(e,t,n){"use strict";var r=(n(54),n(95)),o=(n(31),"_getDOMNodeDidWarn"),i={getDOMNode:function(){return this.constructor[o]=!0,r(this)}};e.exports=i},function(e,t,n){"use strict";function r(e){return null==e?null:1===e.nodeType?e:o.has(e)?i.getNodeFromInstance(e):(null!=e.render&&"function"==typeof e.render?a(!1):void 0,void a(!1))}var o=(n(13),n(54)),i=n(36),a=n(12);n(31);e.exports=r},function(e,t,n){"use strict";function r(){this.reinitializeTransaction()}var o=n(58),i=n(61),a=n(15),s=n(24),u={initialize:s,close:function(){d.isBatchingUpdates=!1}},l={initialize:s,close:o.flushBatchedUpdates.bind(o)},c=[l,u];a(r.prototype,i.Mixin,{getTransactionWrappers:function(){return c}});var p=new r,d={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,o,i){var a=d.isBatchingUpdates;d.isBatchingUpdates=!0,a?e(t,n,r,o,i):p.perform(e,null,t,n,r,o,i)}};e.exports=d},function(e,t,n){"use strict";function r(){return this}function o(){var e=this._reactInternalComponent;return!!e}function i(){}function a(e,t){var n=this._reactInternalComponent;n&&(A.enqueueSetPropsInternal(n,e),t&&A.enqueueCallbackInternal(n,t))}function s(e,t){var n=this._reactInternalComponent;n&&(A.enqueueReplacePropsInternal(n,e),t&&A.enqueueCallbackInternal(n,t))}function u(e,t){t&&(null!=t.dangerouslySetInnerHTML&&(null!=t.children?L(!1):void 0,"object"==typeof t.dangerouslySetInnerHTML&&K in t.dangerouslySetInnerHTML?void 0:L(!1)),null!=t.style&&"object"!=typeof t.style?L(!1):void 0)}function l(e,t,n,r){var o=O.findReactContainerForID(e);if(o){var i=o.nodeType===$?o.ownerDocument:o;W(t,i)}r.getReactMountReady().enqueue(c,{id:e,registrationName:t,listener:n})}function c(){var e=this;E.putListener(e.id,e.registrationName,e.listener)}function p(){var e=this;e._rootNodeID?void 0:L(!1);var t=O.getNode(e._rootNodeID);switch(t?void 0:L(!1),e._tag){case"iframe":e._wrapperState.listeners=[E.trapBubbledEvent(w.topLevelTypes.topLoad,"load",t)];break;case"video":case"audio":e._wrapperState.listeners=[];for(var n in X)X.hasOwnProperty(n)&&e._wrapperState.listeners.push(E.trapBubbledEvent(w.topLevelTypes[n],X[n],t));break;case"img":e._wrapperState.listeners=[E.trapBubbledEvent(w.topLevelTypes.topError,"error",t),E.trapBubbledEvent(w.topLevelTypes.topLoad,"load",t)];break;case"form":e._wrapperState.listeners=[E.trapBubbledEvent(w.topLevelTypes.topReset,"reset",t),E.trapBubbledEvent(w.topLevelTypes.topSubmit,"submit",t)]}}function d(){k.mountReadyWrapper(this)}function f(){T.postUpdateWrapper(this)}function h(e){Z.call(Q,e)||(J.test(e)?void 0:L(!1),Q[e]=!0)}function m(e,t){return e.indexOf("-")>=0||null!=t.is}function v(e){h(e),this._tag=e.toLowerCase(),this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._rootNodeID=null,this._wrapperState=null,this._topLevelWrapper=null,this._nodeWithLegacyProperties=null}var g=n(98),y=n(100),b=n(32),_=n(30),w=n(38),E=n(37),x=n(34),C=n(108),k=n(109),S=n(113),T=n(116),N=n(117),O=n(36),P=n(118),D=n(27),A=n(57),R=n(15),M=n(50),I=n(29),L=n(12),j=(n(47),n(83)),F=n(17),U=n(28),B=(n(121),n(74),n(31),E.deleteListener),W=E.listenTo,q=E.registrationNameModules,V={string:!0,number:!0},H=j({children:null}),z=j({style:null}),K=j({__html:null}),$=1,X={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},G={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},Y={listing:!0,pre:!0,textarea:!0},J=(R({menuitem:!0},G),/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/),Q={},Z={}.hasOwnProperty;v.displayName="ReactDOMComponent",v.Mixin={construct:function(e){this._currentElement=e},mountComponent:function(e,t,n){this._rootNodeID=e;var r=this._currentElement.props;switch(this._tag){case"iframe":case"img":case"form":case"video":case"audio":this._wrapperState={listeners:null},t.getReactMountReady().enqueue(p,this);break;case"button":r=C.getNativeProps(this,r,n);break;case"input":k.mountWrapper(this,r,n),r=k.getNativeProps(this,r,n);break;case"option":S.mountWrapper(this,r,n),r=S.getNativeProps(this,r,n);break;case"select":T.mountWrapper(this,r,n),r=T.getNativeProps(this,r,n),n=T.processChildContext(this,r,n);break;case"textarea":N.mountWrapper(this,r,n),r=N.getNativeProps(this,r,n)}u(this,r);var o;if(t.useCreateElement){var i=n[O.ownerDocumentContextKey],a=i.createElement(this._currentElement.type);_.setAttributeForID(a,this._rootNodeID),O.getID(a),this._updateDOMProperties({},r,t,a),this._createInitialChildren(t,r,n,a),o=a}else{var s=this._createOpenTagMarkupAndPutListeners(t,r),l=this._createContentMarkup(t,r,n);o=!l&&G[this._tag]?s+"/>":s+">"+l+""}switch(this._tag){case"input":t.getReactMountReady().enqueue(d,this);case"button":case"select":case"textarea":r.autoFocus&&t.getReactMountReady().enqueue(g.focusDOMComponent,this)}return o},_createOpenTagMarkupAndPutListeners:function(e,t){var n="<"+this._currentElement.type;for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];if(null!=o)if(q.hasOwnProperty(r))o&&l(this._rootNodeID,r,o,e);else{r===z&&(o&&(o=this._previousStyleCopy=R({},t.style)),o=y.createMarkupForStyles(o));var i=null;null!=this._tag&&m(this._tag,t)?r!==H&&(i=_.createMarkupForCustomAttribute(r,o)):i=_.createMarkupForProperty(r,o),i&&(n+=" "+i)}}if(e.renderToStaticMarkup)return n;var a=_.createMarkupForID(this._rootNodeID);return n+" "+a},_createContentMarkup:function(e,t,n){var r="",o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&(r=o.__html);else{var i=V[typeof t.children]?t.children:null,a=null!=i?null:t.children;if(null!=i)r=I(i);else if(null!=a){var s=this.mountChildren(a,e,n);r=s.join("")}}return Y[this._tag]&&"\n"===r.charAt(0)?"\n"+r:r},_createInitialChildren:function(e,t,n,r){var o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&F(r,o.__html);else{var i=V[typeof t.children]?t.children:null,a=null!=i?null:t.children;if(null!=i)U(r,i);else if(null!=a)for(var s=this.mountChildren(a,e,n),u=0;u>"}var y=n(49),b=n(70),_=n(24),w=n(112),E="<>",x={array:o("array"),bool:o("boolean"),func:o("function"),number:o("number"),object:o("object"),string:o("string"),any:i(),arrayOf:a,element:s(),instanceOf:u,node:d(),objectOf:c,oneOf:l,oneOfType:p,shape:f};e.exports=x},function(e,t){"use strict";function n(e){var t=e&&(r&&e[r]||e[o]);return"function"==typeof t?t:void 0}var r="function"==typeof Symbol&&Symbol.iterator,o="@@iterator";e.exports=n},function(e,t,n){"use strict";var r=n(114),o=n(116),i=n(15),a=(n(31),o.valueContextKey),s={mountWrapper:function(e,t,n){var r=n[a],o=null;if(null!=r)if(o=!1,Array.isArray(r)){for(var i=0;it.end?(n=t.end,r=t.start):(n=t.start,r=t.end),o.moveToElementText(e),o.moveStart("character",n),o.setEndPoint("EndToStart",o),o.moveEnd("character",r-n),o.select()}function s(e,t){if(window.getSelection){var n=window.getSelection(),r=e[c()].length,o=Math.min(t.start,r),i="undefined"==typeof t.end?o:Math.min(t.end,r);if(!n.extend&&o>i){var a=i;i=o,o=a}var s=l(e,o),u=l(e,i);if(s&&u){var p=document.createRange();p.setStart(s.node,s.offset),n.removeAllRanges(),o>i?(n.addRange(p),n.extend(u.node,u.offset)):(p.setEnd(u.node,u.offset),n.addRange(p))}}}var u=n(18),l=n(132),c=n(79),p=u.canUseDOM&&"selection"in document&&!("getSelection"in window),d={getOffsets:p?o:i,setOffsets:p?a:s};e.exports=d},function(e,t){"use strict";function n(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function r(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function o(e,t){for(var o=n(e),i=0,a=0;o;){if(3===o.nodeType){if(a=i+o.textContent.length,t>=i&&a>=t)return{node:o,offset:t-i};i=a}o=n(r(o))}}e.exports=o},function(e,t){"use strict";function n(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(e){return document.body}}e.exports=n},function(e,t,n){"use strict";function r(e){if("selectionStart"in e&&u.hasSelectionCapabilities(e))return{start:e.selectionStart,end:e.selectionEnd};if(window.getSelection){var t=window.getSelection();return{anchorNode:t.anchorNode,anchorOffset:t.anchorOffset,focusNode:t.focusNode,focusOffset:t.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}function o(e,t){if(_||null==g||g!==c())return null;var n=r(g);if(!b||!f(b,n)){b=n;var o=l.getPooled(v.select,y,e,t);return o.type="select",o.target=g,a.accumulateTwoPhaseDispatches(o),o}return null}var i=n(38),a=n(77),s=n(18),u=n(130),l=n(81),c=n(133),p=n(86),d=n(83),f=n(121),h=i.topLevelTypes,m=s.canUseDOM&&"documentMode"in document&&document.documentMode<=11,v={select:{phasedRegistrationNames:{bubbled:d({onSelect:null}),captured:d({onSelectCapture:null})},dependencies:[h.topBlur,h.topContextMenu,h.topFocus,h.topKeyDown,h.topMouseDown,h.topMouseUp,h.topSelectionChange]}},g=null,y=null,b=null,_=!1,w=!1,E=d({onSelect:null}),x={eventTypes:v,extractEvents:function(e,t,n,r,i){if(!w)return null;switch(e){case h.topFocus:(p(t)||"true"===t.contentEditable)&&(g=t,y=n,b=null);break;case h.topBlur:g=null,y=null,b=null;break;case h.topMouseDown:_=!0;break;case h.topContextMenu:case h.topMouseUp:return _=!1,o(r,i);case h.topSelectionChange:if(m)break;case h.topKeyDown:case h.topKeyUp:return o(r,i)}return null},didPutListener:function(e,t,n){t===E&&(w=!0)}};e.exports=x},function(e,t){"use strict";var n=Math.pow(2,53),r={createReactRootIndex:function(){return Math.ceil(Math.random()*n)}};e.exports=r},function(e,t,n){"use strict";var r=n(38),o=n(123),i=n(77),a=n(36),s=n(137),u=n(81),l=n(138),c=n(139),p=n(90),d=n(142),f=n(143),h=n(91),m=n(144),v=n(24),g=n(140),y=n(12),b=n(83),_=r.topLevelTypes,w={abort:{phasedRegistrationNames:{bubbled:b({onAbort:!0}),captured:b({onAbortCapture:!0})}},blur:{phasedRegistrationNames:{bubbled:b({onBlur:!0}),captured:b({onBlurCapture:!0})}},canPlay:{phasedRegistrationNames:{bubbled:b({onCanPlay:!0}),captured:b({onCanPlayCapture:!0})}},canPlayThrough:{phasedRegistrationNames:{bubbled:b({onCanPlayThrough:!0}),captured:b({onCanPlayThroughCapture:!0})}},click:{phasedRegistrationNames:{bubbled:b({onClick:!0}),captured:b({onClickCapture:!0})}},contextMenu:{phasedRegistrationNames:{bubbled:b({onContextMenu:!0}),captured:b({onContextMenuCapture:!0})}},copy:{phasedRegistrationNames:{bubbled:b({onCopy:!0}),captured:b({onCopyCapture:!0})}},cut:{phasedRegistrationNames:{bubbled:b({onCut:!0}),captured:b({onCutCapture:!0})}},doubleClick:{phasedRegistrationNames:{bubbled:b({onDoubleClick:!0}),captured:b({onDoubleClickCapture:!0})}},drag:{phasedRegistrationNames:{bubbled:b({onDrag:!0}),captured:b({onDragCapture:!0})}},dragEnd:{phasedRegistrationNames:{bubbled:b({onDragEnd:!0}),captured:b({onDragEndCapture:!0})}},dragEnter:{phasedRegistrationNames:{bubbled:b({onDragEnter:!0}),captured:b({onDragEnterCapture:!0})}},dragExit:{phasedRegistrationNames:{bubbled:b({onDragExit:!0}),captured:b({onDragExitCapture:!0})}},dragLeave:{phasedRegistrationNames:{bubbled:b({onDragLeave:!0}),captured:b({onDragLeaveCapture:!0})}},dragOver:{phasedRegistrationNames:{bubbled:b({onDragOver:!0}),captured:b({onDragOverCapture:!0})}},dragStart:{phasedRegistrationNames:{bubbled:b({onDragStart:!0}),captured:b({onDragStartCapture:!0})}},drop:{phasedRegistrationNames:{bubbled:b({onDrop:!0}),captured:b({onDropCapture:!0})}},durationChange:{phasedRegistrationNames:{bubbled:b({onDurationChange:!0}),captured:b({onDurationChangeCapture:!0})}},emptied:{phasedRegistrationNames:{bubbled:b({onEmptied:!0}),captured:b({onEmptiedCapture:!0})}},encrypted:{phasedRegistrationNames:{bubbled:b({onEncrypted:!0}),captured:b({onEncryptedCapture:!0})}},ended:{phasedRegistrationNames:{bubbled:b({onEnded:!0}),captured:b({onEndedCapture:!0})}},error:{phasedRegistrationNames:{bubbled:b({onError:!0}),captured:b({onErrorCapture:!0})}},focus:{phasedRegistrationNames:{bubbled:b({onFocus:!0}),captured:b({onFocusCapture:!0})}},input:{phasedRegistrationNames:{bubbled:b({onInput:!0}),captured:b({onInputCapture:!0})}},keyDown:{phasedRegistrationNames:{bubbled:b({onKeyDown:!0}),captured:b({onKeyDownCapture:!0})}},keyPress:{phasedRegistrationNames:{bubbled:b({onKeyPress:!0}),captured:b({onKeyPressCapture:!0})}},keyUp:{phasedRegistrationNames:{bubbled:b({onKeyUp:!0}),captured:b({onKeyUpCapture:!0})}},load:{phasedRegistrationNames:{bubbled:b({onLoad:!0}),captured:b({onLoadCapture:!0})}},loadedData:{phasedRegistrationNames:{bubbled:b({onLoadedData:!0}),captured:b({onLoadedDataCapture:!0})}},loadedMetadata:{phasedRegistrationNames:{bubbled:b({onLoadedMetadata:!0}),captured:b({onLoadedMetadataCapture:!0})}},loadStart:{phasedRegistrationNames:{bubbled:b({onLoadStart:!0}),captured:b({onLoadStartCapture:!0})}},mouseDown:{phasedRegistrationNames:{bubbled:b({onMouseDown:!0}),captured:b({onMouseDownCapture:!0})}},mouseMove:{phasedRegistrationNames:{bubbled:b({onMouseMove:!0}),captured:b({onMouseMoveCapture:!0})}},mouseOut:{phasedRegistrationNames:{bubbled:b({onMouseOut:!0}),captured:b({onMouseOutCapture:!0})}},mouseOver:{phasedRegistrationNames:{bubbled:b({onMouseOver:!0}),captured:b({onMouseOverCapture:!0})}},mouseUp:{phasedRegistrationNames:{bubbled:b({onMouseUp:!0}),captured:b({onMouseUpCapture:!0})}},paste:{phasedRegistrationNames:{bubbled:b({onPaste:!0}),captured:b({onPasteCapture:!0})}},pause:{phasedRegistrationNames:{bubbled:b({onPause:!0}),captured:b({onPauseCapture:!0})}},play:{phasedRegistrationNames:{bubbled:b({onPlay:!0}),captured:b({onPlayCapture:!0})}},playing:{phasedRegistrationNames:{bubbled:b({onPlaying:!0}),captured:b({onPlayingCapture:!0})}},progress:{phasedRegistrationNames:{bubbled:b({onProgress:!0}),captured:b({onProgressCapture:!0})}},rateChange:{phasedRegistrationNames:{bubbled:b({onRateChange:!0}),captured:b({onRateChangeCapture:!0})}},reset:{phasedRegistrationNames:{bubbled:b({onReset:!0}),captured:b({onResetCapture:!0})}},scroll:{phasedRegistrationNames:{bubbled:b({onScroll:!0}),captured:b({onScrollCapture:!0})}},seeked:{phasedRegistrationNames:{bubbled:b({onSeeked:!0}),captured:b({onSeekedCapture:!0})}},seeking:{phasedRegistrationNames:{bubbled:b({onSeeking:!0}),captured:b({onSeekingCapture:!0})}},stalled:{phasedRegistrationNames:{bubbled:b({onStalled:!0}),captured:b({onStalledCapture:!0})}},submit:{phasedRegistrationNames:{bubbled:b({onSubmit:!0}),captured:b({onSubmitCapture:!0})}},suspend:{phasedRegistrationNames:{bubbled:b({onSuspend:!0}),captured:b({onSuspendCapture:!0})}},timeUpdate:{phasedRegistrationNames:{bubbled:b({onTimeUpdate:!0}),captured:b({onTimeUpdateCapture:!0})}},touchCancel:{phasedRegistrationNames:{bubbled:b({onTouchCancel:!0}),captured:b({onTouchCancelCapture:!0})}},touchEnd:{phasedRegistrationNames:{bubbled:b({onTouchEnd:!0}),captured:b({onTouchEndCapture:!0})}},touchMove:{phasedRegistrationNames:{bubbled:b({onTouchMove:!0}),captured:b({onTouchMoveCapture:!0})}},touchStart:{phasedRegistrationNames:{bubbled:b({onTouchStart:!0}),captured:b({onTouchStartCapture:!0})}},volumeChange:{phasedRegistrationNames:{bubbled:b({onVolumeChange:!0}),captured:b({onVolumeChangeCapture:!0})}},waiting:{phasedRegistrationNames:{bubbled:b({onWaiting:!0}),captured:b({onWaitingCapture:!0})}},wheel:{phasedRegistrationNames:{bubbled:b({onWheel:!0}),captured:b({onWheelCapture:!0})}}},E={topAbort:w.abort,topBlur:w.blur,topCanPlay:w.canPlay,topCanPlayThrough:w.canPlayThrough,topClick:w.click,topContextMenu:w.contextMenu,topCopy:w.copy,topCut:w.cut,topDoubleClick:w.doubleClick,topDrag:w.drag,topDragEnd:w.dragEnd,topDragEnter:w.dragEnter,topDragExit:w.dragExit,topDragLeave:w.dragLeave,topDragOver:w.dragOver,topDragStart:w.dragStart,topDrop:w.drop,topDurationChange:w.durationChange,topEmptied:w.emptied,topEncrypted:w.encrypted,topEnded:w.ended,topError:w.error,topFocus:w.focus,topInput:w.input,topKeyDown:w.keyDown,topKeyPress:w.keyPress,topKeyUp:w.keyUp,topLoad:w.load,topLoadedData:w.loadedData,topLoadedMetadata:w.loadedMetadata,topLoadStart:w.loadStart,topMouseDown:w.mouseDown,topMouseMove:w.mouseMove,topMouseOut:w.mouseOut,topMouseOver:w.mouseOver,topMouseUp:w.mouseUp,topPaste:w.paste,topPause:w.pause,topPlay:w.play,topPlaying:w.playing,topProgress:w.progress,topRateChange:w.rateChange,topReset:w.reset,topScroll:w.scroll,topSeeked:w.seeked,topSeeking:w.seeking,topStalled:w.stalled,topSubmit:w.submit,topSuspend:w.suspend,topTimeUpdate:w.timeUpdate,topTouchCancel:w.touchCancel,topTouchEnd:w.touchEnd,topTouchMove:w.touchMove,topTouchStart:w.touchStart,topVolumeChange:w.volumeChange,topWaiting:w.waiting,topWheel:w.wheel};for(var x in E)E[x].dependencies=[x];var C=b({onClick:null}),k={},S={eventTypes:w,extractEvents:function(e,t,n,r,o){var a=E[e];if(!a)return null;var v;switch(e){case _.topAbort:case _.topCanPlay:case _.topCanPlayThrough:case _.topDurationChange:case _.topEmptied:case _.topEncrypted:case _.topEnded:case _.topError:case _.topInput:case _.topLoad:case _.topLoadedData:case _.topLoadedMetadata:case _.topLoadStart:case _.topPause:case _.topPlay:case _.topPlaying:case _.topProgress:case _.topRateChange:case _.topReset:case _.topSeeked:case _.topSeeking:case _.topStalled:case _.topSubmit:case _.topSuspend:case _.topTimeUpdate:case _.topVolumeChange:case _.topWaiting:v=u;break;case _.topKeyPress:if(0===g(r))return null;case _.topKeyDown:case _.topKeyUp:v=c;break;case _.topBlur:case _.topFocus:v=l;break;case _.topClick:if(2===r.button)return null;case _.topContextMenu:case _.topDoubleClick:case _.topMouseDown:case _.topMouseMove:case _.topMouseOut:case _.topMouseOver:case _.topMouseUp:v=p;break;case _.topDrag:case _.topDragEnd:case _.topDragEnter:case _.topDragExit:case _.topDragLeave:case _.topDragOver:case _.topDragStart:case _.topDrop:v=d;break;case _.topTouchCancel:case _.topTouchEnd:case _.topTouchMove:case _.topTouchStart:v=f;break;case _.topScroll:v=h;break;case _.topWheel:v=m;break;case _.topCopy:case _.topCut:case _.topPaste:v=s}v?void 0:y(!1);var b=v.getPooled(a,n,r,o);return i.accumulateTwoPhaseDispatches(b),b},didPutListener:function(e,t,n){if(t===C){var r=a.getNode(e);k[e]||(k[e]=o.listen(r,"click",v))}},willDeleteListener:function(e,t){t===C&&(k[e].remove(),delete k[e])}};e.exports=S},function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=n(81),i={clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=n(91),i={relatedTarget:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=n(91),i=n(140),a=n(141),s=n(92),u={key:a,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:s,charCode:function(e){return"keypress"===e.type?i(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?i(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}};o.augmentClass(r,u),e.exports=r},function(e,t){"use strict";function n(e){var t,n=e.keyCode;return"charCode"in e?(t=e.charCode,0===t&&13===n&&(t=13)):t=n,t>=32||13===t?t:0}e.exports=n},function(e,t,n){"use strict";function r(e){if(e.key){var t=i[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=o(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?a[e.keyCode]||"Unidentified":""}var o=n(140),i={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},a={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=n(90),i={dataTransfer:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=n(91),i=n(92),a={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:i};o.augmentClass(r,a),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=n(90),i={deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";var r=n(32),o=r.injection.MUST_USE_ATTRIBUTE,i={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},a={Properties:{clipPath:o,cx:o,cy:o,d:o,dx:o,dy:o,fill:o,fillOpacity:o,fontFamily:o,fontSize:o,fx:o,fy:o,gradientTransform:o,gradientUnits:o,markerEnd:o,markerMid:o,markerStart:o,offset:o,opacity:o,patternContentUnits:o,patternUnits:o,points:o,preserveAspectRatio:o,r:o,rx:o,ry:o,spreadMethod:o,stopColor:o,stopOpacity:o,stroke:o,strokeDasharray:o,strokeLinecap:o,strokeOpacity:o,strokeWidth:o,textAnchor:o,transform:o,version:o,viewBox:o,x1:o,x2:o,x:o,xlinkActuate:o,xlinkArcrole:o,xlinkHref:o,xlinkRole:o,xlinkShow:o,xlinkTitle:o,xlinkType:o,xmlBase:o,xmlLang:o,xmlSpace:o,y1:o,y2:o,y:o},DOMAttributeNamespaces:{xlinkActuate:i.xlink,xlinkArcrole:i.xlink,xlinkHref:i.xlink,xlinkRole:i.xlink,xlinkShow:i.xlink,xlinkTitle:i.xlink,xlinkType:i.xlink,xmlBase:i.xml,xmlLang:i.xml,xmlSpace:i.xml},DOMAttributeNames:{clipPath:"clip-path",fillOpacity:"fill-opacity",fontFamily:"font-family",fontSize:"font-size",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",patternContentUnits:"patternContentUnits",patternUnits:"patternUnits",preserveAspectRatio:"preserveAspectRatio",spreadMethod:"spreadMethod",stopColor:"stop-color",stopOpacity:"stop-opacity",strokeDasharray:"stroke-dasharray",strokeLinecap:"stroke-linecap",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",viewBox:"viewBox",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlLang:"xml:lang",xmlSpace:"xml:space"}};e.exports=a},function(e,t){"use strict";e.exports="0.14.8"},function(e,t,n){"use strict";var r=n(36);e.exports=r.renderSubtreeIntoContainer},function(e,t,n){"use strict";var r=n(75),o=n(149),i=n(146);r.inject();var a={renderToString:o.renderToString,renderToStaticMarkup:o.renderToStaticMarkup,version:i};e.exports=a},function(e,t,n){"use strict";function r(e){a.isValidElement(e)?void 0:h(!1);var t;try{p.injection.injectBatchingStrategy(l);var n=s.createReactRootID();return t=c.getPooled(!1),t.perform(function(){var r=f(e,null),o=r.mountComponent(n,t,d);return u.addChecksumToMarkup(o)},null)}finally{c.release(t),p.injection.injectBatchingStrategy(i)}}function o(e){a.isValidElement(e)?void 0:h(!1);var t;try{p.injection.injectBatchingStrategy(l);var n=s.createReactRootID();return t=c.getPooled(!0),t.perform(function(){var r=f(e,null);return r.mountComponent(n,t,d)},null)}finally{c.release(t),p.injection.injectBatchingStrategy(i)}}var i=n(96),a=n(49),s=n(52),u=n(55),l=n(150),c=n(151),p=n(58),d=n(62),f=n(66),h=n(12);e.exports={renderToString:r,renderToStaticMarkup:o}},function(e,t){"use strict";var n={isBatchingUpdates:!1,batchedUpdates:function(e){}};e.exports=n},function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=e,this.reactMountReady=i.getPooled(null),this.useCreateElement=!1}var o=n(60),i=n(59),a=n(61),s=n(15),u=n(24),l={initialize:function(){this.reactMountReady.reset()},close:u},c=[l],p={getTransactionWrappers:function(){return c},getReactMountReady:function(){return this.reactMountReady},destructor:function(){i.release(this.reactMountReady),this.reactMountReady=null}};s(r.prototype,a.Mixin,p),o.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";var r=n(114),o=n(127),i=n(126),a=n(154),s=n(49),u=(n(153),n(111)),l=n(146),c=n(15),p=n(156),d=s.createElement,f=s.createFactory,h=s.cloneElement,m={Children:{map:r.map,forEach:r.forEach,count:r.count,toArray:r.toArray,only:p},Component:o,createElement:d,cloneElement:h,isValidElement:s.isValidElement,PropTypes:u,createClass:i.createClass,createFactory:f,createMixin:function(e){return e},DOM:a,version:l,__spread:c};e.exports=m},function(e,t,n){"use strict";function r(){if(p.current){var e=p.current.getName();if(e)return" Check the render method of `"+e+"`."}return""}function o(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;i("uniqueKey",e,t)}}function i(e,t,n){var o=r();if(!o){var i="string"==typeof n?n:n.displayName||n.name;i&&(o=" Check the top-level render call using <"+i+">.")}var a=h[e]||(h[e]={});if(a[o])return null;a[o]=!0;var s={parentOrOwner:o,url:" See https://fb.me/react-warning-keys for more information.",childOwner:null};return t&&t._owner&&t._owner!==p.current&&(s.childOwner=" It was passed a child from "+t._owner.getName()+"."),s}function a(e,t){if("object"==typeof e)if(Array.isArray(e))for(var n=0;nn;n++)a=o[n],i.push(e.addVideo(a));return i}}(this)),v.on("newPoll",this.newPoll),v.on("clearPoll",this.clearPoll),v.on("updatePoll",this.updatePoll),v.on("connect",this.login),v.on("reconnecting",this.reconnecting),v.on("reconnect",this.login),v.on("loginError",this.loginError),v.on("setNick",this.setNick),v.on("kicked",this.kicked)},togglePlaylist:function(){return appState.playlistOpen=!appState.playlistOpen,this.setState({playlistOpen:appState.playlistOpen})},updateCurrentVideo:function(e){return appState.currentVideo=e.video,this.setState({currentVideo:appState.currentVideo})},newPlaylist:function(e){var t;return console.log("newPlaylist",e),t=!!appState.playlist.length,appState.playlist=e,this.setState({playlist:appState.playlist}),t?v.emit("renewPos"):void 0},addVideo:function(e){var t,n;return console.log("addVideo",e),n=function(e){return p.indexOf(appState.playlist,p.find(appState.playlist,function(t){return t.videoid===e.videoid}))},t=n(appState.currentVideo),appState.currentVideo.videoid!==e.sanityid||-1===t?(console.log("Sanity check failed, index: "+t),void v.emit("refreshMyPlaylist")):(e.queue?(t++,appState.playlist.splice(t,0,e.video)):(t=appState.playlist.length,appState.playlist.push(e.video)),console.log("Adding video at "+t),this.setState({playlist:appState.playlist}))},deleteVideo:function(e){return console.log("deleteVideo",e),appState.currentVideo.videoid!==e.sanityid?void v.emit("refreshMyPlaylist"):(appState.playlist.splice(e.position,1),this.setState({playlist:appState.playlist}))},newMessage:function(e){var t;return appState.chatMessages.push(e.msg),!e.msg.ghost&&e.msg.nick!==(null!=(t=appState.viewer)?t.nick:void 0)&&h(e.msg.msg)?(e.msg.isSquee=!0,appState.squees.unshift(e.msg),this.onSquee(e.msg)):e.msg.nick===appState.viewer.nick&&(e.msg.isSelf=!0),this.setState({squees:appState.squees,chatMessages:appState.chatMessages})},onSquee:function(e){return"undefined"!=typeof nativeApp&&null!==nativeApp&&nativeApp.dock.setBadge(""+this.state.squees.length),"undefined"!=typeof nativeApp&&null!==nativeApp&&nativeApp.dock.bounce("critical"),g.play(),new Notification(e.nick,{body:e.msg})},toggleSqueeList:function(){return"undefined"!=typeof nativeApp&&null!==nativeApp&&nativeApp.dock.setBadge(""),appState.squeeInboxOpen=!appState.squeeInboxOpen,this.setState({squeeInboxOpen:appState.squeeInboxOpen})},toggleEmotes:function(){return appState.emotesEnabled=!appState.emotesEnabled,this.setState({emotesEnabled:appState.emotesEnabled})},clearSquees:function(){return appState.squees=[],appState.squeeInboxOpen=!1,this.setState({squees:appState.squees,squeeInboxOpen:appState.squeeInboxOpen})},sendMessage:function(e){return v.emit("chat",{msg:e,metadata:{channel:"main",flair:0}})},drunkCount:function(e){return appState.drinkCount=e,this.setState({drinkCount:appState.drinks})},togglePollList:function(){return appState.pollListOpen=!appState.pollListOpen,this.setState({pollListOpen:appState.pollListOpen})},newPoll:function(e){return console.log(e),e.index=appState.polls.length,appState.polls.length&&(appState.polls[appState.polls.length-1].inactive=!0),appState.polls.push(e),e.ghost||m.play(),this.setState({polls:appState.polls})},clearPoll:function(e){return appState.polls[appState.polls.length-1].votes=e.votes||e,appState.polls[appState.polls.length-1].inactive=!0,this.setState({polls:appState.polls})},updatePoll:function(e){return appState.polls[appState.polls.length-1].votes=e.votes,this.setState({polls:appState.polls})},vote:function(e){return null==appState.polls[appState.polls.length-1].voted?(appState.polls[appState.polls.length-1].voted=e,v.emit("votePoll",{op:e}),this.setState({polls:appState.polls})):void 0},reconnecting:function(){return console.log("Reconnecting..."),this.newMessage({msg:{emote:"system",msg:"Connection lost, attempting to reconnect...",timestamp:(new Date).getTime()}})},onLoginSubmit:function(e){return this.setState({viewer:e},this.login)},loginError:function(e){return this.setState({viewer:!1,loginError:e.message})},login:function(){return localStorage.getItem("nick")&&localStorage.getItem("pass")?(v.emit("setNick",{nick:localStorage.getItem("nick")||"",pass:localStorage.getItem("pass")||""}),v.emit("myPlaylistIsInited")):void 0},setNick:function(e){return appState.viewer={nick:e,pass:localStorage.getItem("pass")||""},appState.loginError=!1,this.setState({viewer:appState.viewer,loginError:appState.loginError})},kicked:function(e){var t;return t="You have been kicked",e&&(t+=": "+e),alert(t)},toggleUserList:function(){return appState.userlistOpen=!appState.userlistOpen,this.setState({userlistOpen:appState.userlistOpen})},newUserlist:function(e){return appState.users=e,this.setState({users:appState.users})},userJoin:function(e){return appState.users.push(e),this.setState({users:appState.users})},userPart:function(e){var t;return t=p.indexOf(appState.users,p.find(appState.users,function(t){return t.nick===e.nick})),-1!==t?(appState.users.splice(t,1),this.setState({users:appState.users})):void 0},render:function(){return React.createElement("div",{id:"main-container",className:"container"},React.createElement(l,{polls:this.state.polls,squees:this.state.squees,currentVideo:this.state.currentVideo,drinkCount:this.state.drinkCount,emotesEnabled:this.state.emotesEnabled,onClickSquees:this.toggleSqueeList,onClickPollsBtn:this.togglePollList,onClickUserBtn:this.toggleUserList,onClickPlaylistBtn:this.togglePlaylist,onClickEmotes:this.toggleEmotes}),React.createElement("div",{className:"chat"},this.state.userlistOpen?React.createElement(c,{users:this.state.users}):void 0,this.state.playlistOpen?React.createElement(a,{currentVideo:this.state.currentVideo,playlist:this.state.playlist}):void 0,this.state.pollListOpen?React.createElement(s,{polls:this.state.polls,onVote:this.vote}):void 0,this.state.squeeInboxOpen?React.createElement(u,{squees:this.state.squees,onClear:this.clearSquees}):void 0,React.createElement(r,{emotesEnabled:this.state.emotesEnabled,messages:this.state.chatMessages}),this.state.viewer&&!this.state.loginError?React.createElement(o,{users:this.state.users,onSubmit:this.sendMessage}):React.createElement(i,{onSubmit:this.onLoginSubmit,error:this.state.loginError})))}})},function(e,t){e.exports=React.createClass({displayName:"LoginForm",getInitialState:function(){return{nick:localStorage.getItem("nick")||"",pass:localStorage.getItem("pass")||""}},handleLogin:function(e){var t,n;return e.preventDefault(),(null!=(t=this.state.nick)?t.length:void 0)&&(null!=(n=this.state.pass)?n.length:void 0)?(localStorage.setItem("nick",this.state.nick),localStorage.setItem("pass",this.state.pass),this.props.onSubmit({nick:this.state.nick,pass:this.state.pass})):void 0},handleChange:function(e){return e.target===this.refs.nick?this.setState({nick:e.target.value}):this.setState({pass:e.target.value})},render:function(){return React.createElement("form",{className:"form-inline login-box",onSubmit:this.handleLogin},React.createElement("div",{className:"pull-right"},this.props.error?React.createElement("span",{className:"alert-danger"},this.props.error):void 0,React.createElement("div",{className:"form-group"},React.createElement("label",{className:"sr-only",htmlFor:"userInput"},"Username"),React.createElement("input",{ref:"nick",onChange:this.handleChange,type:"text",className:"form-control",id:"userInput",placeholder:"Username",value:this.state.nick})),React.createElement("div",{className:"form-group"},React.createElement("label",{className:"sr-only",htmlFor:"passwordInput"},"Password"),React.createElement("input",{ref:"pass",onChange:this.handleChange,type:"password",className:"form-control",id:"passwordInput",placeholder:"Password",value:this.state.pass})),React.createElement("button",{type:"submit",className:"btn btn-default"},"Sign in")))}})},function(e,t,n){var r,o;o=n(162),r=n(163),e.exports=React.createClass({displayName:"TitleBar",getInitialState:function(){return{menuOpen:!1}},showBMSettings:function(){},toggleMenu:function(){return this.setState({menuOpen:!this.state.menuOpen})},render:function(){var e,t,n;return t={notify:this.props.polls.length&&!this.props.polls[this.props.polls.length-1].inactive&&null==this.props.polls[this.props.polls.length-1].voted},n={notify:this.props.squees.length},e=React.createElement("ul",{className:"dropdown-menu"},React.createElement("li",null,React.createElement("a",{onClick:this.props.onClickEmotes},React.createElement("i",{className:"material-icons"},"favorite")," ",this.props.emotesEnabled?"Disable":"Enable"," Emotes")),React.createElement("li",null,React.createElement("a",{onClick:r.dataRefresh},React.createElement("i",{className:"material-icons"},"refresh")," Refresh Emotes")),window.nativeApp?React.createElement("li",{className:"divider"}):void 0,window.nativeApp?React.createElement("li",null,React.createElement("a",{onClick:this.showDevTools},React.createElement("i",{className:"material-icons"},"build")," Show Devtools")):void 0,React.createElement("li",{className:"divider"}),React.createElement("li",{"ng-show":"User"},React.createElement("a",{"ng-click":"logout()"},React.createElement("i",{className:"material-icons"},"exit_to_app")," Logout"))),React.createElement("div",{id:"title-bar","ng-controller":"TitleBarCtrl"},React.createElement("img",{className:"icon",src:"favicon.png"}),React.createElement("span",{className:"title"}," BerryTube ",this.props.currentVideo?React.createElement("span",{className:"now-playing"},"Now playing: ",decodeURIComponent(this.props.currentVideo.videotitle)," ",React.createElement("span",{className:"drink-count "+(this.props.drinkCount?void 0:"hidden")},"(",this.props.drinkCount," Drinks)")," "):void 0),React.createElement("div",{className:"menu"},React.createElement("span",{className:o(n),title:"Toggle Squees",onClick:this.props.onClickSquees},React.createElement("i",{className:"material-icons"},"mail")),React.createElement("span",{className:o(t),title:"Toggle Polls",onClick:this.props.onClickPollsBtn},React.createElement("i",{className:"material-icons"},"check_box")),React.createElement("span",{title:"Toggle user list",onClick:this.props.onClickUserBtn},React.createElement("i",{className:"material-icons"},"people")),React.createElement("span",{title:"Toggle playlist",onClick:this.props.onClickPlaylistBtn},React.createElement("i",{className:"material-icons"},"video_library")),React.createElement("span",{className:"mdl-button mdl-button--icon",onClick:this.toggleMenu},React.createElement("i",{className:"material-icons"},"more_vert"),this.state.menuOpen?e:void 0)))}})},function(e,t,n){var r,o;/*! + Copyright (c) 2016 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames + */ +!function(){"use strict";function n(){for(var e=[],t=0;th;++h){var b=o[h];if(r(b)){for(var _=!1,w=0;w0&&(t.altText=e)},e.prototype.setFlagsOnObject=function(e,t){for(var n=e.split("-"),r=0;r=n&&(t.xAxisTranspose=n)}else if(e.match(/^!x\d+$/)){var o=-1*+e.replace("!x","");o>=-150&&(t.xAxisTranspose=o)}else if(e.match(/^z\d+$/)){var i=+e.replace("z","");10>=i&&(t.zAxisTranspose=i)}else console.log("failed to parse flag",e)},e.emoteParseRegexp=/\[([^\]]*)\]\(\/([\w:!#\/]+)([-\w!]*)([^)]*)\)/,e}();Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=o},function(e,t){"use strict";var n=function(){function e(){}return e.invertHashMapOfStrings=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t},e.getSpeedForDescription=function(t){return e.berryEmoteAnimationDescriptionToSpeedMap[t]||t},e.getDescriptionForSpeed=function(t){return e.berryEmoteAnimationSpeedToDescriptionMap[t]||t},e.berryEmoteSpinAnimations=["spin","zspin","xspin","yspin","!spin","!zspin","!xspin","!yspin"],e.berryEmoteAnimationDescriptionToSpeedMap={slowest:"14s",slower:"12s",slow:"10s",fast:"6s",faster:"4s",fastest:"2s"},e.berryEmoteAnimationSpeedToDescriptionMap=e.invertHashMapOfStrings(e.berryEmoteAnimationDescriptionToSpeedMap),e}();Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n},function(e,t){"use strict";var n=function(){function e(e){this.emoteMap=this.buildEmoteMap(e)}return e.prototype.findEmote=function(e){return this.emoteMap[e]},e.prototype.buildEmoteMap=function(e){var t={};return e.forEach(function(e){e.names.forEach(function(n){t[n]=e})}),t},e}();Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n},function(e,t,n){"use strict";var r=n(170),o=n(171),i=n(172),a=n(173),s=function(){function e(e,t){void 0===t&&(t=new r["default"]),this.emoteMap=e,this.emoteExpansionOptions=t,this.effectsModifier=new o["default"],this.textSerializer=new i["default"]}return e.prototype.getBaseHtmlDataForEmote=function(e){var t={emoteData:e,titleForEmoteNode:e.names.join(",")+" from /r/"+e.sr,cssClassesForEmoteNode:["berryemote"],cssStylesForEmoteNode:{height:e.height+"px",width:e.width+"px",display:"inline-block",position:"relative",overflow:"hidden",backgroundPosition:(e["background-position"]||["0px","0px"]).join(" "),backgroundImage:"url("+e["background-image"]+")"},cssClassesForParentNode:[],cssStylesForParentNode:{}};return e.nsfw&&t.cssClassesForEmoteNode.push("nsfw"),t},e.prototype.getEmoteHtmlMetadataForObject=function(e){var t=this.emoteMap.findEmote(e.emoteIdentifier);if("undefined"==typeof t)return null;var n=this.getBaseHtmlDataForEmote(t);return this.effectsModifier.applyFlagsFromObjectToHtmlOutputData(t,e,n),this.textSerializer.serializeFromObjectToHtmlOutputData(t,e,n),n},e.prototype.getEmoteHtmlForObject=function(e){var t=this.getEmoteHtmlMetadataForObject(e),n=this.serializeHtmlOutputData(t);return n},e.prototype.serializeHtmlOutputData=function(e){var t=a["default"].createMarkupForStyles(e.cssStylesForEmoteNode),n=a["default"].createMarkupForStyles(e.cssStylesForParentNode),r=a["default"].createInnerHtml(e)||"",o=''+r+"";return(e.cssClassesForParentNode.length>0||n)&&(o=''+o+""),o},e}();Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=s},function(e,t){"use strict";var n=function(){function e(){this.berryEmoteEnabled=!0,this.berryEmotesEffects=!0,this.showNsfwEmotes=!0,this.berryDrunkMode=!1,this.berryEnableSlide=!0,this.berryEnableSpin=!0,this.berryEnableVibrate=!0,this.berryEnableTranspose=!0,this.berryEnableReverse=!0,this.berryEnableRotate=!0,this.berryEnableBrody=!0,this.berryEmoteBlacklist=[]}return e}();Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n},function(e,t,n){"use strict";var r=n(167),o=function(){function e(){}return e.prototype.applyFlagsFromObjectToHtmlOutputData=function(e,t,n){var o,i=[],a=[],s=[];if(t.flagsString&&(n.titleForEmoteNode+=" effects: "+t.flagsString),t.spin&&(i.push(t.spin+" 2s linear infinite"),"zspin"==t.spin||"spin"==t.spin||"!zspin"==t.spin||"!spin"==t.spin)){var u=Math.sqrt(e.width*e.width+e.height*e.height);o=Math.max(u,o)}if(t.slide){var l=[],c=r["default"].getSpeedForDescription(t.speed)||"8s";l.push("slideleft "+c+" infinite ease"),t.brody||t.spin||(t.reverse?l.push("!slideflip "+c+" infinite ease"):l.push("slideflip "+c+" infinite ease")),"spin"===t.spin||"zspin"===t.spin||t.rotateDegrees||t.brody?a.push.apply(a,l):i.push.apply(i,l)}if(t.rotateDegrees){s.push("rotate("+t.rotateDegrees+"deg)");var p=e.width*Math.abs(Math.sin(t.rotateDegrees*Math.PI/180))+e.height*Math.abs(Math.cos(t.rotateDegrees*Math.PI/180));o=p}if(t.xAxisTranspose&&(n.cssStylesForEmoteNode.left=t.xAxisTranspose.toString()),t.zAxisTranspose&&(n.cssStylesForEmoteNode.zIndex=t.zAxisTranspose.toString()),t.vibrate&&i.unshift("vibrate 0.05s linear infinite"),t.brody){i.push("brody 1.27659s infinite ease");var d=1.01*(e.width*Math.sin(10*Math.PI/180)+e.height*Math.cos(10*Math.PI/180));o=d}if(t.reverse&&s.push("scaleX(-1)"),t.hueRotate&&n.cssClassesForEmoteNode.push("bem-hue-rotate"),t.invertColors&&n.cssClassesForEmoteNode.push("bem-invert"),o){n.cssClassesForParentNode.push("rotation-wrapper");var f=Math.floor((o-e.height)/2);n.cssStylesForParentNode.height=Math.ceil(o-f)+"px",n.cssStylesForParentNode.display="inline-block",n.cssStylesForParentNode.marginTop=f+"px",n.cssStylesForParentNode.position="relative"}i.length>0&&(n.cssStylesForEmoteNode.animation=i.join(",").replace("!","-")),a.length>0&&(n.cssStylesForParentNode.animation=a.join(",").replace("!","-")),s.length>0&&(n.cssStylesForEmoteNode.transform=s.join(" "))},e}();Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=o},function(e,t,n){"use strict";var r=n(173),o=function(){function e(){}return e.prototype.serializeFromObjectToHtmlOutputData=function(e,t,n){t.firstLineText&&(n.emText=t.firstLineText,n.emStyles=this.getStylesFromEntry("em-",e)),t.secondLineText&&(n.strongText=t.secondLineText,n.strongStyles=this.getStylesFromEntry("strong-",e)),t.altText&&(n.altText=t.altText);var r=this.getStylesFromEntry("text-",e);if(r)for(var o in r)n.cssStylesForEmoteNode[o]=r[o]},e.prototype.getStylesFromEntry=function(e,t){var n={};for(var o in t)if(o.startsWith(e)){var i=o.slice(e.length),a=r["default"].convertHyphenatedToCamelCase(i);n[a]=t[o]}return n},e}();Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=o},function(e,t){"use strict";var n=function(){function e(){}return e.convertCamelCaseToHyphenated=function(e){return e.replace(this.uppercasePattern,"-$1").toLowerCase()},e.convertHyphenatedToCamelCase=function(e){return e.replace(this.hyphenPattern,function(e,t){return t.toUpperCase()})},e.createMarkupForStyles=function(t){var n="";for(var r in t){var o=t[r];if(null!=o){var i=e.convertCamelCaseToHyphenated(r);n+=i+": "+o+";"}}return n||null},e.createHtmlString=function(e,t,n){if(!t)return"";var r=this.createMarkupForStyles(n);return"<"+e+' style="'+r+'">'+t+""},e.createInnerHtml=function(e){var t="";return t+=this.createHtmlString("em",e.emText,e.emStyles)||"",t+=this.createHtmlString("strong",e.strongText,e.strongStyles)||"",t+=e.altText||""},e.uppercasePattern=/([A-Z])/g,e.hyphenPattern=/-(.)/g,e}();Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n},function(e,t){"use strict";var n=function(){function e(){}return e}();Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n},function(e,t){"use strict";var n=function(){function e(){}return e.prototype.serialize=function(e){return"["+this.serializeTextParts(e)+"](/"+e.emoteIdentifier+this.serializeFlags(e)+")"},e.prototype.serializeTextParts=function(e){var t=[];e.firstLineText&&t.push("*"+e.firstLineText+"*"),e.secondLineText&&t.push("**"+e.secondLineText+"**"),e.altText&&t.push(""+e.altText);var n=t.join(" ");return n},e.prototype.serializeFlags=function(e){var t="";return e.vibrate&&(t+="-v"),e.reverse&&(t+="-r"),e.brody&&(t+="-brody"),e.slide&&(t+="-slide"),e.speed&&(t+="-"+e.speed),e.spin&&(t+="-"+e.spin),e.hueRotate&&(t+="-i"),e.invertColors&&(t+="-invert"),e.rotateDegrees>0&&(t+="-"+e.rotateDegrees),e.xAxisTranspose>0&&(t+="-x"+e.xAxisTranspose),e.xAxisTranspose<0&&(t+="-!x"+Math.abs(e.xAxisTranspose)),e.zAxisTranspose>0&&(t+="-z"+e.zAxisTranspose),t},e}();Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n},function(e,t){"use strict";var n=function(){function e(){this.cssClassesForEmoteNode=[],this.cssStylesForEmoteNode={},this.cssClassesForParentNode=[],this.cssStylesForParentNode={}}return e}();Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n},function(e,t,n){function r(){}function o(e){var t={}.toString.call(e);switch(t){case"[object File]":case"[object Blob]":case"[object FormData]":return!0;default:return!1}}function i(e){if(!b(e))return e;var t=[];for(var n in e)null!=e[n]&&a(t,n,e[n]);return t.join("&")}function a(e,t,n){return Array.isArray(n)?n.forEach(function(n){a(e,t,n)}):void e.push(encodeURIComponent(t)+"="+encodeURIComponent(n))}function s(e){for(var t,n,r={},o=e.split("&"),i=0,a=o.length;a>i;++i)n=o[i],t=n.split("="),r[decodeURIComponent(t[0])]=decodeURIComponent(t[1]);return r}function u(e){var t,n,r,o,i=e.split(/\r?\n/),a={};i.pop();for(var s=0,u=i.length;u>s;++s)n=i[s],t=n.indexOf(":"),r=n.slice(0,t).toLowerCase(),o=w(n.slice(t+1)),a[r]=o;return a}function l(e){return/[\/+]json\b/.test(e)}function c(e){return e.split(/ *; */).shift()}function p(e){return g(e.split(/ *; */),function(e,t){var n=t.split(/ *= */),r=n.shift(),o=n.shift();return r&&o&&(e[r]=o),e},{})}function d(e,t){t=t||{},this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!=this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||"undefined"==typeof this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText,this.setStatusProperties(this.xhr.status),this.header=this.headers=u(this.xhr.getAllResponseHeaders()),this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this.setHeaderProperties(this.header),this.body="HEAD"!=this.req.method?this.parseBody(this.text?this.text:this.xhr.response):null}function f(e,t){var n=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",function(){var e=null,t=null;try{t=new d(n)}catch(r){return e=new Error("Parser is unable to parse the response"),e.parse=!0,e.original=r,e.rawResponse=n.xhr&&n.xhr.responseText?n.xhr.responseText:null,e.statusCode=n.xhr&&n.xhr.status?n.xhr.status:null,n.callback(e)}if(n.emit("response",t),e)return n.callback(e,t);if(t.status>=200&&t.status<300)return n.callback(e,t);var o=new Error(t.statusText||"Unsuccessful HTTP response");o.original=e,o.response=t,o.status=t.status,n.callback(o,t)})}function h(e,t){var n=_("DELETE",e);return t&&n.end(t),n}var m,v=n(178),g=n(179),y=n(180),b=n(181);m="undefined"!=typeof window?window:"undefined"!=typeof self?self:this;var _=e.exports=n(182).bind(null,f);_.getXHR=function(){if(!(!m.XMLHttpRequest||m.location&&"file:"==m.location.protocol&&m.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}return!1};var w="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};_.serializeObject=i,_.parseString=s,_.types={html:"text/html",json:"application/json",xml:"application/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},_.serialize={"application/x-www-form-urlencoded":i,"application/json":JSON.stringify},_.parse={"application/x-www-form-urlencoded":s,"application/json":JSON.parse},d.prototype.get=function(e){return this.header[e.toLowerCase()]},d.prototype.setHeaderProperties=function(e){var t=this.header["content-type"]||"";this.type=c(t);var n=p(t);for(var r in n)this[r]=n[r]},d.prototype.parseBody=function(e){var t=_.parse[this.type];return!t&&l(this.type)&&(t=_.parse["application/json"]),t&&e&&(e.length||e instanceof Object)?t(e):null},d.prototype.setStatusProperties=function(e){1223===e&&(e=204);var t=e/100|0;this.status=this.statusCode=e,this.statusType=t,this.info=1==t,this.ok=2==t,this.clientError=4==t,this.serverError=5==t,this.error=4==t||5==t?this.toError():!1,this.accepted=202==e,this.noContent=204==e,this.badRequest=400==e,this.unauthorized=401==e,this.notAcceptable=406==e,this.notFound=404==e,this.forbidden=403==e},d.prototype.toError=function(){var e=this.req,t=e.method,n=e.url,r="cannot "+t+" "+n+" ("+this.status+")",o=new Error(r);return o.status=this.status,o.method=t,o.url=n,o},_.Response=d,v(f.prototype);for(var E in y)f.prototype[E]=y[E];f.prototype.abort=function(){return this.aborted?void 0:(this.aborted=!0,this.xhr&&this.xhr.abort(),this.clearTimeout(),this.emit("abort"),this)},f.prototype.type=function(e){return this.set("Content-Type",_.types[e]||e),this},f.prototype.responseType=function(e){return this._responseType=e,this},f.prototype.accept=function(e){return this.set("Accept",_.types[e]||e),this},f.prototype.auth=function(e,t,n){switch(n||(n={type:"basic"}),n.type){case"basic":var r=btoa(e+":"+t);this.set("Authorization","Basic "+r);break;case"auto":this.username=e,this.password=t}return this},f.prototype.query=function(e){return"string"!=typeof e&&(e=i(e)),e&&this._query.push(e),this},f.prototype.attach=function(e,t,n){return this._getFormData().append(e,t,n||t.name),this},f.prototype._getFormData=function(){return this._formData||(this._formData=new m.FormData),this._formData},f.prototype.send=function(e){var t=b(e),n=this._header["content-type"];if(t&&b(this._data))for(var r in e)this._data[r]=e[r];else"string"==typeof e?(n||this.type("form"),n=this._header["content-type"],"application/x-www-form-urlencoded"==n?this._data=this._data?this._data+"&"+e:e:this._data=(this._data||"")+e):this._data=e;return!t||o(e)?this:(n||this.type("json"),this)},d.prototype.parse=function(e){return m.console&&console.warn("Client-side parse() method has been renamed to serialize(). This method is not compatible with superagent v2.0"),this.serialize(e),this},d.prototype.serialize=function(e){return this._parser=e,this},f.prototype.callback=function(e,t){var n=this._callback;this.clearTimeout(),n(e,t)},f.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},f.prototype.timeoutError=function(){var e=this._timeout,t=new Error("timeout of "+e+"ms exceeded");t.timeout=e,this.callback(t)},f.prototype.withCredentials=function(){return this._withCredentials=!0,this},f.prototype.end=function(e){var t=this,n=this.xhr=_.getXHR(),i=this._query.join("&"),a=this._timeout,s=this._formData||this._data;this._callback=e||r,n.onreadystatechange=function(){if(4==n.readyState){var e;try{e=n.status}catch(r){e=0}if(0==e){if(t.timedout)return t.timeoutError();if(t.aborted)return;return t.crossDomainError()}t.emit("end")}};var u=function(e){e.total>0&&(e.percent=e.loaded/e.total*100),e.direction="download",t.emit("progress",e)};this.hasListeners("progress")&&(n.onprogress=u);try{n.upload&&this.hasListeners("progress")&&(n.upload.onprogress=u)}catch(c){}if(a&&!this._timer&&(this._timer=setTimeout(function(){t.timedout=!0,t.abort()},a)),i&&(i=_.serializeObject(i),this.url+=~this.url.indexOf("?")?"&"+i:"?"+i),this.username&&this.password?n.open(this.method,this.url,!0,this.username,this.password):n.open(this.method,this.url,!0),this._withCredentials&&(n.withCredentials=!0),"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof s&&!o(s)){var p=this._header["content-type"],d=this._parser||_.serialize[p?p.split(";")[0]:""];!d&&l(p)&&(d=_.serialize["application/json"]),d&&(s=d(s))}for(var f in this.header)null!=this.header[f]&&n.setRequestHeader(f,this.header[f]);return this._responseType&&(n.responseType=this._responseType),this.emit("request",this),n.send("undefined"!=typeof s?s:null),this},_.Request=f,_.get=function(e,t,n){var r=_("GET",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},_.head=function(e,t,n){var r=_("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},_.del=h,_["delete"]=h,_.patch=function(e,t,n){var r=_("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},_.post=function(e,t,n){var r=_("POST",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},_.put=function(e,t,n){var r=_("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}},function(e,t,n){function r(e){return e?o(e):void 0}function o(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var r,o=0;or;++r)n[r].apply(this,t)}return this},r.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},r.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t){e.exports=function(e,t,n){for(var r=0,o=e.length,i=3==arguments.length?n:e[r++];o>r;)i=t.call(null,i,e[r],++r,e);return i}},function(e,t,n){var r=n(181);t.clearTimeout=function(){return this._timeout=0,clearTimeout(this._timer),this},t.parse=function(e){return this._parser=e,this},t.timeout=function(e){return this._timeout=e,this},t.then=function(e,t){return this.end(function(n,r){n?t(n):e(r)})},t.use=function(e){return e(this),this},t.get=function(e){return this._header[e.toLowerCase()]},t.getHeader=t.get,t.set=function(e,t){if(r(e)){for(var n in e)this.set(n,e[n]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},t.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},t.field=function(e,t){return this._getFormData().append(e,t),this}},function(e,t){function n(e){return null!=e&&"object"==typeof e}e.exports=n},function(e,t){function n(e,t,n){return"function"==typeof n?new e("GET",t).end(n):2==arguments.length?new e("GET",t):new e(t,n)}e.exports=n},function(e,t,n){"use strict";var r,o,i,a,s,u,l,c=n(184),p=n(197),d=Function.prototype.apply,f=Function.prototype.call,h=Object.create,m=Object.defineProperty,v=Object.defineProperties,g=Object.prototype.hasOwnProperty,y={configurable:!0,enumerable:!1,writable:!0};r=function(e,t){var n;return p(t),g.call(this,"__ee__")?n=this.__ee__:(n=y.value=h(null),m(this,"__ee__",y),y.value=null),n[e]?"object"==typeof n[e]?n[e].push(t):n[e]=[n[e],t]:n[e]=t,this},o=function(e,t){var n,o;return p(t),o=this,r.call(this,e,n=function(){i.call(o,e,n),d.call(t,this,arguments)}),n.__eeOnceListener__=t,this},i=function(e,t){var n,r,o,i;if(p(t),!g.call(this,"__ee__"))return this;if(n=this.__ee__,!n[e])return this;if(r=n[e],"object"==typeof r)for(i=0;o=r[i];++i)(o===t||o.__eeOnceListener__===t)&&(2===r.length?n[e]=r[i?0:1]:r.splice(i,1));else(r===t||r.__eeOnceListener__===t)&&delete n[e];return this},a=function(e){var t,n,r,o,i;if(g.call(this,"__ee__")&&(o=this.__ee__[e]))if("object"==typeof o){for(n=arguments.length,i=new Array(n-1),t=1;n>t;++t)i[t-1]=arguments[t];for(o=o.slice(),t=0;r=o[t];++t)d.call(r,this,i)}else switch(arguments.length){case 1:f.call(o,this);break;case 2:f.call(o,this,arguments[1]);break;case 3:f.call(o,this,arguments[1],arguments[2]);break;default:for(n=arguments.length,i=new Array(n-1),t=1;n>t;++t)i[t-1]=arguments[t];d.call(o,this,i)}},s={on:r,once:o,off:i,emit:a},u={on:c(r),once:c(o),off:c(i),emit:c(a)},l=v({},u),e.exports=t=function(e){return null==e?h(l):v(Object(e),u)},t.methods=s},function(e,t,n){"use strict";var r,o=n(185),i=n(192),a=n(193),s=n(194);r=e.exports=function(e,t){var n,r,a,u,l;return arguments.length<2||"string"!=typeof e?(u=t,t=e,e=null):u=arguments[2],null==e?(n=a=!0,r=!1):(n=s.call(e,"c"),r=s.call(e,"e"),a=s.call(e,"w")),l={value:t,configurable:n,enumerable:r,writable:a},u?o(i(u),l):l},r.gs=function(e,t,n){var r,u,l,c;return"string"!=typeof e?(l=n,n=t,t=e,e=null):l=arguments[3],null==t?t=void 0:a(t)?null==n?n=void 0:a(n)||(l=n,n=void 0):(l=t,t=n=void 0),null==e?(r=!0,u=!1):(r=s.call(e,"c"),u=s.call(e,"e")),c={get:t,set:n,configurable:r,enumerable:u},l?o(i(l),c):c}},function(e,t,n){"use strict";e.exports=n(186)()?Object.assign:n(187)},function(e,t){"use strict";e.exports=function(){var e,t=Object.assign;return"function"!=typeof t?!1:(e={foo:"raz"},t(e,{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},function(e,t,n){"use strict";var r=n(188),o=n(191),i=Math.max;e.exports=function(e,t){var n,a,s,u=i(arguments.length,2);for(e=Object(o(e)),s=function(r){try{e[r]=t[r]}catch(o){n||(n=o)}},a=1;u>a;++a)t=arguments[a],r(t).forEach(s);if(void 0!==n)throw n;return e}},function(e,t,n){"use strict";e.exports=n(189)()?Object.keys:n(190)},function(e,t){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},function(e,t){"use strict";var n=Object.keys;e.exports=function(e){return n(null==e?e:Object(e))}},function(e,t){"use strict";e.exports=function(e){if(null==e)throw new TypeError("Cannot use null or undefined");return e}},function(e,t){"use strict";var n=Array.prototype.forEach,r=Object.create,o=function(e,t){var n;for(n in e)t[n]=e[n]};e.exports=function(e){var t=r(null);return n.call(arguments,function(e){null!=e&&o(Object(e),t)}),t}},function(e,t){"use strict";e.exports=function(e){return"function"==typeof e}},function(e,t,n){"use strict";e.exports=n(195)()?String.prototype.contains:n(196)},function(e,t){"use strict";var n="razdwatrzy";e.exports=function(){return"function"!=typeof n.contains?!1:n.contains("dwa")===!0&&n.contains("foo")===!1}},function(e,t){"use strict";var n=String.prototype.indexOf;e.exports=function(e){return n.call(this,e,arguments[1])>-1}},function(e,t){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var n=0;ne,onSelectNick:this.selectNick.bind(this),msg:t,key:t.timestamp+t.nick+n})}.bind(this));if(this.state.lastSeenIndex&&this.state.lastSeenIndex!=this.props.messages.length){var n=u.createElement(s,{msg:{emote:"tabout",msg:"▽ "+(this.props.messages.length-this.state.lastSeenIndex)+" New messages since you tabbed out ▽"},key:"tabout"});t.splice(this.state.lastSeenIndex,0,n)}return u.createElement("div",{className:"scroll-container"},u.createElement("div",{id:"scroller",ref:"scroller",className:"scroller",onScroll:this.handleScroll.bind(this)},t))}}]),t}(u.Component)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t); +e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var n=0;n]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi;e.exports=function(e){function t(){r(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return o(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e,t){return e.renderEmotes!=this.props.renderEmotes||e.highlighted!=this.props.highlighted||e.seoncdaryHighlighted!=this.props.seoncdaryHighlighted||e.msg!=this.props.msg}},{key:"linkifyAndEmote",value:function(e,t){var n=d(e);return e!=n&&console.log(e),e=p.unescape(n),h.mapAlternate(e.split(m),function(e){return h.componentizeString(e)},function(e,n){return c.createElement(f,{key:"embed"+n,url:e,embedImages:t})})}},{key:"render",value:function(){var e=this.props.msg,t=e.msg,n=!0;switch(e.emote){case"request":t="request "+t;break;case"drink":t="drink "+t;break;case"spoiler":n=!1;break;case"poll":t="has created a new poll: "+t}var r=this.linkifyAndEmote(t,n),o=e.nick&&l.getUserColor(e.nick),i={"msg-row":!0,squee:e.isSquee,self:e.isSelf,highlighted:this.props.highlighted,seoncdaryHighlighted:this.props.seoncdaryHighlighted,quote:0===t.indexOf(">")};return e.emote&&(i[e.emote]=!0),("spoiler"==e.emote||-1!=t.indexOf(''))&&(r=c.createElement("span",{className:"spoiler"},r)),c.createElement("div",{className:u(i)},e.nick?c.createElement("span",{className:"user",title:"click to highlight all messages by "+e.nick,onClick:this.props.onSelectNick&&this.props.onSelectNick.bind(this,e.nick),style:{color:o}},e.nick," "):null,r,e.timestamp?c.createElement(s,{className:"timestamp",date:new Date(e.timestamp).getTime()}):null)}}]),t}(c.Component)},function(e,t,n){var r,o;(function(){var n=this,i=n._,a=Array.prototype,s=Object.prototype,u=Function.prototype,l=a.push,c=a.slice,p=a.concat,d=s.toString,f=s.hasOwnProperty,h=Array.isArray,m=Object.keys,v=u.bind,g=function(e){return e instanceof g?e:this instanceof g?void(this._wrapped=e):new g(e)};"undefined"!=typeof e&&e.exports&&(t=e.exports=g),t._=g,g.VERSION="1.7.0";var y=function(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)};case 4:return function(n,r,o,i){return e.call(t,n,r,o,i)}}return function(){return e.apply(t,arguments)}};g.iteratee=function(e,t,n){return null==e?g.identity:g.isFunction(e)?y(e,t,n):g.isObject(e)?g.matches(e):g.property(e)},g.each=g.forEach=function(e,t,n){if(null==e)return e;t=y(t,n);var r,o=e.length;if(o===+o)for(r=0;o>r;r++)t(e[r],r,e);else{var i=g.keys(e);for(r=0,o=i.length;o>r;r++)t(e[i[r]],i[r],e)}return e},g.map=g.collect=function(e,t,n){if(null==e)return[];t=g.iteratee(t,n);for(var r,o=e.length!==+e.length&&g.keys(e),i=(o||e).length,a=Array(i),s=0;i>s;s++)r=o?o[s]:s,a[s]=t(e[r],r,e);return a};var b="Reduce of empty array with no initial value";g.reduce=g.foldl=g.inject=function(e,t,n,r){null==e&&(e=[]),t=y(t,r,4);var o,i=e.length!==+e.length&&g.keys(e),a=(i||e).length,s=0;if(arguments.length<3){if(!a)throw new TypeError(b);n=e[i?i[s++]:s++]}for(;a>s;s++)o=i?i[s]:s,n=t(n,e[o],o,e);return n},g.reduceRight=g.foldr=function(e,t,n,r){null==e&&(e=[]),t=y(t,r,4);var o,i=e.length!==+e.length&&g.keys(e),a=(i||e).length;if(arguments.length<3){if(!a)throw new TypeError(b);n=e[i?i[--a]:--a]}for(;a--;)o=i?i[a]:a,n=t(n,e[o],o,e);return n},g.find=g.detect=function(e,t,n){var r;return t=g.iteratee(t,n),g.some(e,function(e,n,o){return t(e,n,o)?(r=e,!0):void 0}),r},g.filter=g.select=function(e,t,n){var r=[];return null==e?r:(t=g.iteratee(t,n),g.each(e,function(e,n,o){t(e,n,o)&&r.push(e)}),r)},g.reject=function(e,t,n){return g.filter(e,g.negate(g.iteratee(t)),n)},g.every=g.all=function(e,t,n){if(null==e)return!0;t=g.iteratee(t,n);var r,o,i=e.length!==+e.length&&g.keys(e),a=(i||e).length;for(r=0;a>r;r++)if(o=i?i[r]:r,!t(e[o],o,e))return!1;return!0},g.some=g.any=function(e,t,n){if(null==e)return!1;t=g.iteratee(t,n);var r,o,i=e.length!==+e.length&&g.keys(e),a=(i||e).length;for(r=0;a>r;r++)if(o=i?i[r]:r,t(e[o],o,e))return!0;return!1},g.contains=g.include=function(e,t){return null==e?!1:(e.length!==+e.length&&(e=g.values(e)),g.indexOf(e,t)>=0)},g.invoke=function(e,t){var n=c.call(arguments,2),r=g.isFunction(t);return g.map(e,function(e){return(r?t:e[t]).apply(e,n)})},g.pluck=function(e,t){return g.map(e,g.property(t))},g.where=function(e,t){return g.filter(e,g.matches(t))},g.findWhere=function(e,t){return g.find(e,g.matches(t))},g.max=function(e,t,n){var r,o,i=-(1/0),a=-(1/0);if(null==t&&null!=e){e=e.length===+e.length?e:g.values(e);for(var s=0,u=e.length;u>s;s++)r=e[s],r>i&&(i=r)}else t=g.iteratee(t,n),g.each(e,function(e,n,r){o=t(e,n,r),(o>a||o===-(1/0)&&i===-(1/0))&&(i=e,a=o)});return i},g.min=function(e,t,n){var r,o,i=1/0,a=1/0;if(null==t&&null!=e){e=e.length===+e.length?e:g.values(e);for(var s=0,u=e.length;u>s;s++)r=e[s],i>r&&(i=r)}else t=g.iteratee(t,n),g.each(e,function(e,n,r){o=t(e,n,r),(a>o||o===1/0&&i===1/0)&&(i=e,a=o)});return i},g.shuffle=function(e){for(var t,n=e&&e.length===+e.length?e:g.values(e),r=n.length,o=Array(r),i=0;r>i;i++)t=g.random(0,i),t!==i&&(o[i]=o[t]),o[t]=n[i];return o},g.sample=function(e,t,n){return null==t||n?(e.length!==+e.length&&(e=g.values(e)),e[g.random(e.length-1)]):g.shuffle(e).slice(0,Math.max(0,t))},g.sortBy=function(e,t,n){return t=g.iteratee(t,n),g.pluck(g.map(e,function(e,n,r){return{value:e,index:n,criteria:t(e,n,r)}}).sort(function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(r>n||void 0===r)return-1}return e.index-t.index}),"value")};var _=function(e){return function(t,n,r){var o={};return n=g.iteratee(n,r),g.each(t,function(r,i){var a=n(r,i,t);e(o,r,a)}),o}};g.groupBy=_(function(e,t,n){g.has(e,n)?e[n].push(t):e[n]=[t]}),g.indexBy=_(function(e,t,n){e[n]=t}),g.countBy=_(function(e,t,n){g.has(e,n)?e[n]++:e[n]=1}),g.sortedIndex=function(e,t,n,r){n=g.iteratee(n,r,1);for(var o=n(t),i=0,a=e.length;a>i;){var s=i+a>>>1;n(e[s])t?[]:c.call(e,0,t)},g.initial=function(e,t,n){return c.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))},g.last=function(e,t,n){return null==e?void 0:null==t||n?e[e.length-1]:c.call(e,Math.max(e.length-t,0))},g.rest=g.tail=g.drop=function(e,t,n){return c.call(e,null==t||n?1:t)},g.compact=function(e){return g.filter(e,g.identity)};var w=function(e,t,n,r){if(t&&g.every(e,g.isArray))return p.apply(r,e);for(var o=0,i=e.length;i>o;o++){var a=e[o];g.isArray(a)||g.isArguments(a)?t?l.apply(r,a):w(a,t,n,r):n||r.push(a)}return r};g.flatten=function(e,t){return w(e,t,!1,[])},g.without=function(e){return g.difference(e,c.call(arguments,1))},g.uniq=g.unique=function(e,t,n,r){if(null==e)return[];g.isBoolean(t)||(r=n,n=t,t=!1),null!=n&&(n=g.iteratee(n,r));for(var o=[],i=[],a=0,s=e.length;s>a;a++){var u=e[a];if(t)a&&i===u||o.push(u),i=u;else if(n){var l=n(u,a,e);g.indexOf(i,l)<0&&(i.push(l),o.push(u))}else g.indexOf(o,u)<0&&o.push(u)}return o},g.union=function(){return g.uniq(w(arguments,!0,!0,[]))},g.intersection=function(e){if(null==e)return[];for(var t=[],n=arguments.length,r=0,o=e.length;o>r;r++){var i=e[r];if(!g.contains(t,i)){for(var a=1;n>a&&g.contains(arguments[a],i);a++);a===n&&t.push(i)}}return t},g.difference=function(e){var t=w(c.call(arguments,1),!0,!0,[]);return g.filter(e,function(e){return!g.contains(t,e)})},g.zip=function(e){if(null==e)return[];for(var t=g.max(arguments,"length").length,n=Array(t),r=0;t>r;r++)n[r]=g.pluck(arguments,r);return n},g.object=function(e,t){if(null==e)return{};for(var n={},r=0,o=e.length;o>r;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n},g.indexOf=function(e,t,n){if(null==e)return-1;var r=0,o=e.length;if(n){if("number"!=typeof n)return r=g.sortedIndex(e,t),e[r]===t?r:-1;r=0>n?Math.max(0,o+n):n}for(;o>r;r++)if(e[r]===t)return r;return-1},g.lastIndexOf=function(e,t,n){if(null==e)return-1;var r=e.length;for("number"==typeof n&&(r=0>n?r+n+1:Math.min(r,n+1));--r>=0;)if(e[r]===t)return r;return-1},g.range=function(e,t,n){arguments.length<=1&&(t=e||0,e=0),n=n||1;for(var r=Math.max(Math.ceil((t-e)/n),0),o=Array(r),i=0;r>i;i++,e+=n)o[i]=e;return o};var E=function(){};g.bind=function(e,t){var n,r;if(v&&e.bind===v)return v.apply(e,c.call(arguments,1));if(!g.isFunction(e))throw new TypeError("Bind must be called on a function");return n=c.call(arguments,2),r=function(){if(!(this instanceof r))return e.apply(t,n.concat(c.call(arguments)));E.prototype=e.prototype;var o=new E;E.prototype=null;var i=e.apply(o,n.concat(c.call(arguments)));return g.isObject(i)?i:o}},g.partial=function(e){var t=c.call(arguments,1);return function(){for(var n=0,r=t.slice(),o=0,i=r.length;i>o;o++)r[o]===g&&(r[o]=arguments[n++]);for(;n=r)throw new Error("bindAll must be passed function names");for(t=1;r>t;t++)n=arguments[t],e[n]=g.bind(e[n],e);return e},g.memoize=function(e,t){var n=function(r){var o=n.cache,i=t?t.apply(this,arguments):r;return g.has(o,i)||(o[i]=e.apply(this,arguments)),o[i]};return n.cache={},n},g.delay=function(e,t){var n=c.call(arguments,2);return setTimeout(function(){return e.apply(null,n)},t)},g.defer=function(e){return g.delay.apply(g,[e,1].concat(c.call(arguments,1)))},g.throttle=function(e,t,n){var r,o,i,a=null,s=0;n||(n={});var u=function(){s=n.leading===!1?0:g.now(),a=null,i=e.apply(r,o),a||(r=o=null)};return function(){var l=g.now();s||n.leading!==!1||(s=l);var c=t-(l-s);return r=this,o=arguments,0>=c||c>t?(clearTimeout(a),a=null,s=l,i=e.apply(r,o),a||(r=o=null)):a||n.trailing===!1||(a=setTimeout(u,c)),i}},g.debounce=function(e,t,n){var r,o,i,a,s,u=function(){var l=g.now()-a;t>l&&l>0?r=setTimeout(u,t-l):(r=null,n||(s=e.apply(i,o),r||(i=o=null)))};return function(){i=this,o=arguments,a=g.now();var l=n&&!r;return r||(r=setTimeout(u,t)),l&&(s=e.apply(i,o),i=o=null),s}},g.wrap=function(e,t){return g.partial(t,e)},g.negate=function(e){return function(){return!e.apply(this,arguments)}},g.compose=function(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}},g.after=function(e,t){return function(){return--e<1?t.apply(this,arguments):void 0}},g.before=function(e,t){var n;return function(){return--e>0?n=t.apply(this,arguments):t=null,n}},g.once=g.partial(g.before,2),g.keys=function(e){if(!g.isObject(e))return[];if(m)return m(e);var t=[];for(var n in e)g.has(e,n)&&t.push(n);return t},g.values=function(e){for(var t=g.keys(e),n=t.length,r=Array(n),o=0;n>o;o++)r[o]=e[t[o]];return r},g.pairs=function(e){for(var t=g.keys(e),n=t.length,r=Array(n),o=0;n>o;o++)r[o]=[t[o],e[t[o]]];return r},g.invert=function(e){for(var t={},n=g.keys(e),r=0,o=n.length;o>r;r++)t[e[n[r]]]=n[r];return t},g.functions=g.methods=function(e){var t=[];for(var n in e)g.isFunction(e[n])&&t.push(n);return t.sort()},g.extend=function(e){if(!g.isObject(e))return e;for(var t,n,r=1,o=arguments.length;o>r;r++){t=arguments[r];for(n in t)f.call(t,n)&&(e[n]=t[n])}return e},g.pick=function(e,t,n){var r,o={};if(null==e)return o;if(g.isFunction(t)){t=y(t,n);for(r in e){var i=e[r];t(i,r,e)&&(o[r]=i)}}else{var a=p.apply([],c.call(arguments,1));e=new Object(e);for(var s=0,u=a.length;u>s;s++)r=a[s],r in e&&(o[r]=e[r])}return o},g.omit=function(e,t,n){if(g.isFunction(t))t=g.negate(t);else{var r=g.map(p.apply([],c.call(arguments,1)),String);t=function(e,t){return!g.contains(r,t)}}return g.pick(e,t,n)},g.defaults=function(e){if(!g.isObject(e))return e;for(var t=1,n=arguments.length;n>t;t++){var r=arguments[t];for(var o in r)void 0===e[o]&&(e[o]=r[o])}return e},g.clone=function(e){return g.isObject(e)?g.isArray(e)?e.slice():g.extend({},e):e},g.tap=function(e,t){return t(e),e};var x=function(e,t,n,r){if(e===t)return 0!==e||1/e===1/t;if(null==e||null==t)return e===t;e instanceof g&&(e=e._wrapped),t instanceof g&&(t=t._wrapped);var o=d.call(e);if(o!==d.call(t))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!==+e?+t!==+t:0===+e?1/+e===1/t:+e===+t;case"[object Date]":case"[object Boolean]":return+e===+t}if("object"!=typeof e||"object"!=typeof t)return!1;for(var i=n.length;i--;)if(n[i]===e)return r[i]===t;var a=e.constructor,s=t.constructor;if(a!==s&&"constructor"in e&&"constructor"in t&&!(g.isFunction(a)&&a instanceof a&&g.isFunction(s)&&s instanceof s))return!1;n.push(e),r.push(t);var u,l;if("[object Array]"===o){if(u=e.length,l=u===t.length)for(;u--&&(l=x(e[u],t[u],n,r)););}else{var c,p=g.keys(e);if(u=p.length,l=g.keys(t).length===u)for(;u--&&(c=p[u],l=g.has(t,c)&&x(e[c],t[c],n,r)););}return n.pop(),r.pop(),l};g.isEqual=function(e,t){return x(e,t,[],[])},g.isEmpty=function(e){if(null==e)return!0;if(g.isArray(e)||g.isString(e)||g.isArguments(e))return 0===e.length;for(var t in e)if(g.has(e,t))return!1;return!0},g.isElement=function(e){return!(!e||1!==e.nodeType)},g.isArray=h||function(e){return"[object Array]"===d.call(e)},g.isObject=function(e){var t=typeof e;return"function"===t||"object"===t&&!!e},g.each(["Arguments","Function","String","Number","Date","RegExp"],function(e){g["is"+e]=function(t){return d.call(t)==="[object "+e+"]"}}),g.isArguments(arguments)||(g.isArguments=function(e){return g.has(e,"callee")}),g.isFunction=function(e){return"function"==typeof e||!1},g.isFinite=function(e){return isFinite(e)&&!isNaN(parseFloat(e))},g.isNaN=function(e){return g.isNumber(e)&&e!==+e},g.isBoolean=function(e){return e===!0||e===!1||"[object Boolean]"===d.call(e)},g.isNull=function(e){return null===e},g.isUndefined=function(e){return void 0===e},g.has=function(e,t){return null!=e&&f.call(e,t)},g.noConflict=function(){return n._=i,this},g.identity=function(e){return e},g.constant=function(e){return function(){return e}},g.noop=function(){},g.property=function(e){return function(t){return t[e]}},g.matches=function(e){var t=g.pairs(e),n=t.length;return function(e){if(null==e)return!n;e=new Object(e);for(var r=0;n>r;r++){var o=t[r],i=o[0];if(o[1]!==e[i]||!(i in e))return!1}return!0}},g.times=function(e,t,n){var r=Array(Math.max(0,e));t=y(t,n,1);for(var o=0;e>o;o++)r[o]=t(o);return r},g.random=function(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))},g.now=Date.now||function(){return(new Date).getTime()};var C={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},k=g.invert(C),S=function(e){var t=function(t){return e[t]},n="(?:"+g.keys(e).join("|")+")",r=RegExp(n),o=RegExp(n,"g");return function(e){return e=null==e?"":""+e,r.test(e)?e.replace(o,t):e}};g.escape=S(C),g.unescape=S(k),g.result=function(e,t){if(null==e)return void 0;var n=e[t];return g.isFunction(n)?e[t]():n};var T=0;g.uniqueId=function(e){var t=++T+"";return e?e+t:t},g.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var N=/(.)^/,O={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},P=/\\|'|\r|\n|\u2028|\u2029/g,D=function(e){return"\\"+O[e]};g.template=function(e,t,n){!t&&n&&(t=n),t=g.defaults({},t,g.templateSettings);var r=RegExp([(t.escape||N).source,(t.interpolate||N).source,(t.evaluate||N).source].join("|")+"|$","g"),o=0,i="__p+='";e.replace(r,function(t,n,r,a,s){return i+=e.slice(o,s).replace(P,D),o=s+t.length,n?i+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?i+="'+\n((__t=("+r+"))==null?'':__t)+\n'":a&&(i+="';\n"+a+"\n__p+='"),t}),i+="';\n",t.variable||(i="with(obj||{}){\n"+i+"}\n"),i="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+i+"return __p;\n";try{var a=new Function(t.variable||"obj","_",i)}catch(s){throw s.source=i,s}var u=function(e){return a.call(this,e,g)},l=t.variable||"obj";return u.source="function("+l+"){\n"+i+"}",u},g.chain=function(e){var t=g(e);return t._chain=!0,t};var A=function(e){return this._chain?g(e).chain():e};g.mixin=function(e){g.each(g.functions(e),function(t){var n=g[t]=e[t];g.prototype[t]=function(){var e=[this._wrapped];return l.apply(e,arguments),A.call(this,n.apply(g,e))}})},g.mixin(g),g.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=a[e];g.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0],A.call(this,n)}}),g.each(["concat","join","slice"],function(e){var t=a[e];g.prototype[e]=function(){return A.call(this,t.apply(this._wrapped,arguments))}}),g.prototype.value=function(){return this._wrapped},r=[],o=function(){return g}.apply(t,r),!(void 0!==o&&(e.exports=o))}).call(this)},function(e,t){e.exports=React.createClass({displayName:"Time-Ago",getDefaultProps:function(){return{live:!0}},componentDidMount:function(){return this.props.live?this.tick(!0):void 0},tick:function(e){var t,n,r,o;if(this.isMounted())return n=1e3,o=new Date(this.props.date).valueOf(),t=Date.now(),r=Math.round(Math.abs(t-o)/1e3),n=3600>r?6e4:86400>r?36e5:0,n&&setTimeout(this.tick,n),e?void 0:this.forceUpdate()},render:function(){var e,t,n,r,o,i;return o=new Date(this.props.date).valueOf(),t=Date.now(),n=Math.round(Math.abs(t-o)/1e3),r=t>o?"ago":"from now",3600>n?(e=Math.round(n/60),i="m"):86400>n?(e=Math.round(n/3600),i="h"):604800>n?(e=Math.round(n/86400),i="d"):2592e3>n?(e=Math.round(n/604800),i="w"):31536e3>n?(e=Math.round(n/2592e3),i="month"):(e=Math.round(n/31536e3),i="yr"),React.createElement("span",{className:this.props.className,style:this.props.style,id:this.props.id},60>n?"now":""+e+i+" "+r)}})},function(e,t){var n,r;n=function(e){var t,n,r;for(n=0,r=0;re;e++)switch(n=g[e].toLowerCase()){case"<":break;case">":break e;case"/":o=!0;break;default:if(n.match(a)){if(o)break e}else o=!0,r+=n}-1!==s.indexOf(r)?v+=g:u&&(v+=u),g=""}var p,d,f,e=e||"",h=n,m=0,v="",g="",y=!1;for("string"==typeof s?s=t(s):Array.isArray(s)||(s=null),p=0,d=e.length;d>p;p++)switch(f=e[p]){case"<":if(y)break;if(" "==e[p+1]){l(f);break}if(h==n){h=r,l(f);break}if(h==r){m++;break}l(f);break;case">":if(m){m--;break}if(y)break;if(h==r){y=h=0,s&&(g+=">",c());break}if(h==o){y=h=0,g="";break}if(h==i&&"-"==e[p-1]&&"-"==e[p-2]){y=h=0,g="";break}l(f);break;case'"':case"'":h==r&&(y==f?y=!1:y||(y=f)),l(f);break;case"!":if(h==r&&"<"==e[p-1]){h=o;break}l(f);break;case"-":if(h==o&&"-"==e[p-1]&&"!"==e[p-2]){h=i;break}l(f);break;case"E":case"e":if(h==o&&"doctype"==e.substr(p-6,7).toLowerCase()){h=r;break}l(f);break;default:l(f)}return v}function t(e){for(var t,n=[];null!==(t=s.exec(e));)n.push(t[1]);return 0!==n.length?n:null}var n=0,r=1,o=2,i=3,a=/\s/,s=/<(\w*)>/g;return e})},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var n=0;n-1?"&":"?",u=this.url+s+o;a.src=u,document.getElementsByTagName("head")[0].appendChild(a)};"undefined"!=typeof e&&"undefined"!=typeof e.exports?e.exports=o:"undefined"!=typeof window&&(window.superagentJSONP=o)},function(e,t,n){"use strict";var r=n(207),o=function(e,t,n,r){for(var o=t,i=[],a=0;a0||e.cssStylesForParentNode)&&(r=s.createElement("span",{className:u(e.cssClassesForParentNode),style:e.cssStylesForParentNode},r)),t.height>v){var o=v/t.height,i={height:v,width:t.width*o,position:"relative",display:"inline-block"},a={transform:"scale("+o+")",transformOrigin:"left top 0px",position:"absolute",top:0,left:0};r=s.createElement("span",{className:"berrymotes-wrapper-outer",style:i},s.createElement("span",{className:"berrymotes-wrapper",style:a},r))}return r}}]),t}(s.Component)},function(e,t,n){(function(e){"use strict";var t=t||n(209).Promise,r=n(211),o=n(212),i=n(215),a=e.APNG={};a.checkNativeFeatures=r.checkNativeFeatures,a.ifNeeded=r.ifNeeded,a.parseBuffer=function(e){return o(new Uint8Array(e))};var s={};a.parseURL=function(e){return e in s||(s[e]=i(e).then(o)),s[e]},a.animateContext=function(e,t){return a.parseURL(e).then(function(e){return e.addContext(t),e.play(),e})},a.animateImage=function(e){return e.setAttribute("data-is-apng","progress"),a.parseURL(e.src).then(function(t){e.setAttribute("data-is-apng","yes");var n=document.createElement("canvas");n.width=t.width,n.height=t.height,Array.prototype.slice.call(e.attributes).forEach(function(e){-1==["alt","src","usemap","ismap","data-is-apng","width","height"].indexOf(e.nodeName)&&n.setAttributeNode(e.cloneNode())}),n.setAttribute("data-apng-src",e.src),""!=e.alt&&n.appendChild(document.createTextNode(e.alt));var r="",o="",i=0,a="";""!=e.style.width&&"auto"!=e.style.width?r=e.style.width:e.hasAttribute("width")&&(r=e.getAttribute("width")+"px"),""!=e.style.height&&"auto"!=e.style.height?o=e.style.height:e.hasAttribute("height")&&(o=e.getAttribute("height")+"px"),""!=r&&""==o&&(i=parseFloat(r),a=r.match(/\D+$/)[0],o=Math.round(n.height*i/n.width)+a),""!=o&&""==r&&(i=parseFloat(o),a=o.match(/\D+$/)[0],r=Math.round(n.width*i/n.height)+a),n.style.width=r,n.style.height=o;var s=e.parentNode;s.insertBefore(n,e),s.removeChild(e),t.addContext(n.getContext("2d")),t.play()},function(){e.setAttribute("data-is-apng","no")})},a.releaseCanvas=function(e){var t=e.getContext("2d");"_apng_animation"in t&&t._apng_animation.removeContext(t)}}).call(t,function(){return this}())},function(e,t,n){(function(t,r){/*! + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE + * @version 4.0.5 + */ +!function(t,n){e.exports=n()}(this,function(){"use strict";function e(e){return"function"==typeof e||"object"==typeof e&&null!==e}function o(e){return"function"==typeof e}function i(e){G=e}function a(e){Y=e}function s(){return function(){return t.nextTick(d)}}function u(){return"undefined"!=typeof X?function(){X(d)}:p()}function l(){var e=0,t=new Z(d),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function c(){var e=new MessageChannel;return e.port1.onmessage=d,function(){return e.port2.postMessage(0)}}function p(){var e=setTimeout;return function(){return e(d,1)}}function d(){for(var e=0;$>e;e+=2){var t=ne[e],n=ne[e+1];t(n),ne[e]=void 0,ne[e+1]=void 0}$=0}function f(){try{var e=n(!function(){var e=new Error('Cannot find module "vertx"');throw e.code="MODULE_NOT_FOUND",e}());return X=e.runOnLoop||e.runOnContext,u()}catch(t){return p()}}function h(e,t){var n=arguments,r=this,o=new this.constructor(v);void 0===o[oe]&&I(o);var i=r._state;return i?!function(){var e=n[i-1];Y(function(){return A(i,o,e,r._result)})}():N(r,o,e,t),o}function m(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var n=new t(v);return C(n,e),n}function v(){}function g(){return new TypeError("You cannot resolve a promise with itself")}function y(){return new TypeError("A promises callback cannot return that same promise.")}function b(e){try{return e.then}catch(t){return ue.error=t,ue}}function _(e,t,n,r){try{e.call(t,n,r)}catch(o){return o}}function w(e,t,n){Y(function(e){var r=!1,o=_(n,t,function(n){r||(r=!0,t!==n?C(e,n):S(e,n))},function(t){r||(r=!0,T(e,t))},"Settle: "+(e._label||" unknown promise"));!r&&o&&(r=!0,T(e,o))},e)}function E(e,t){t._state===ae?S(e,t._result):t._state===se?T(e,t._result):N(t,void 0,function(t){return C(e,t)},function(t){return T(e,t)})}function x(e,t,n){t.constructor===e.constructor&&n===h&&t.constructor.resolve===m?E(e,t):n===ue?T(e,ue.error):void 0===n?S(e,t):o(n)?w(e,t,n):S(e,t)}function C(t,n){t===n?T(t,g()):e(n)?x(t,n,b(n)):S(t,n)}function k(e){e._onerror&&e._onerror(e._result),O(e)}function S(e,t){e._state===ie&&(e._result=t,e._state=ae,0!==e._subscribers.length&&Y(O,e))}function T(e,t){e._state===ie&&(e._state=se,e._result=t,Y(k,e))}function N(e,t,n,r){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+ae]=n,o[i+se]=r,0===i&&e._state&&Y(O,e)}function O(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,o=void 0,i=e._result,a=0;ai;i++)t.resolve(e[i]).then(n,r)}:function(e,t){return t(new TypeError("You must pass an array to race."))})}function B(e){var t=this,n=new t(v);return T(n,e),n}function W(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function q(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function V(e){this[oe]=M(),this._result=this._state=void 0,this._subscribers=[],v!==e&&("function"!=typeof e&&W(),this instanceof V?R(this,e):q())}function H(){var e=void 0;if("undefined"!=typeof r)e=r;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=e.Promise;if(n){var o=null;try{o=Object.prototype.toString.call(n.resolve())}catch(t){}if("[object Promise]"===o&&!n.cast)return}e.Promise=V}var z=void 0;z=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var K=z,$=0,X=void 0,G=void 0,Y=function(e,t){ne[$]=e,ne[$+1]=t,$+=2,2===$&&(G?G(d):re())},J="undefined"!=typeof window?window:void 0,Q=J||{},Z=Q.MutationObserver||Q.WebKitMutationObserver,ee="undefined"==typeof self&&"undefined"!=typeof t&&"[object process]"==={}.toString.call(t),te="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,ne=new Array(1e3),re=void 0;re=ee?s():Z?l():te?c():void 0===J?f():p();var oe=Math.random().toString(36).substring(16),ie=void 0,ae=1,se=2,ue=new P,le=new P,ce=0;return L.prototype._enumerate=function(){for(var e=this.length,t=this._input,n=0;this._state===ie&&e>n;n++)this._eachEntry(t[n],n)},L.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===m){var o=b(e);if(o===h&&e._state!==ie)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(n===V){var i=new n(v);x(i,e,o),this._willSettleAt(i,t)}else this._willSettleAt(new n(function(t){return t(e)}),t)}else this._willSettleAt(r(e),t)},L.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===ie&&(this._remaining--,e===se?T(r,n):this._result[t]=n),0===this._remaining&&S(r,this._result)},L.prototype._willSettleAt=function(e,t){var n=this;N(e,void 0,function(e){return n._settledAt(ae,t,e)},function(e){return n._settledAt(se,t,e)})},V.all=F,V.race=U,V.resolve=m,V.reject=B,V._setScheduler=i,V._setAsap=a,V._asap=Y,V.prototype={constructor:V,then:h,"catch":function(e){return this.then(null,e)}},V.polyfill=H,V.Promise=V,V})}).call(t,n(210),function(){return this}())},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(c===setTimeout)return setTimeout(e,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function i(e){if(p===clearTimeout)return clearTimeout(e);if((p===r||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function a(){m&&f&&(m=!1,f.length?h=f.concat(h):v=-1,h.length&&s())}function s(){if(!m){var e=o(a);m=!0;for(var t=h.length;t;){for(f=h,h=[];++v1)for(var n=1;n>>0;for(var r=1;4>r;r++)n+=e[r+t]<<8*(3-r);return n},l=function(e,t){for(var n=0,r=0;2>r;r++)n+=e[r+t]<<8*(1-r);return n},c=function(e,t){return e[t]},p=function(e,t,n){var r=new Uint8Array(n);return r.set(e.subarray(t,t+n)),r},d=function(e,t,n){var r=Array.prototype.slice.call(e.subarray(t,t+n));return String.fromCharCode.apply(String,r)},f=function(e){return[e>>>24&255,e>>>16&255,e>>>8&255,255&e]},h=function(e){for(var t=[],n=0;n0){var t=a[0].getImageData(0,0,this.width,this.height);e.putImageData(t,0,0)}a.push(e),e._apng_animation=this},this.removeContext=function(e){var t=a.indexOf(e);-1!==t&&(a.splice(t,1),0===a.length&&this.rewind(),"_apng_animation"in e&&delete e._apng_animation)},this.isPlayed=function(){return o},this.isFinished=function(){return i};var e=this,t=0,n=0,r=null,o=!1,i=!1,a=[],s=function(e){for(;o&&e>=t;)u(e);o&&requestAnimationFrame(s)},u=function(s){var u=n++%e.frames.length,l=e.frames[u];if(0==u&&(a.forEach(function(t){t.clearRect(0,0,e.width,e.height)}),r=null,2==l.disposeOp&&(l.disposeOp=1)),r&&1==r.disposeOp?a.forEach(function(e){e.clearRect(r.left,r.top,r.width,r.height)}):r&&2==r.disposeOp&&a.forEach(function(e){e.putImageData(r.iData,r.left,r.top)}),r=l,r.iData=null,2==r.disposeOp&&(r.iData=a[0].getImageData(l.left,l.top,l.width,l.height)),0==l.blendOp&&a.forEach(function(e){e.clearRect(l.left,l.top,l.width,l.height)}),a.forEach(function(e){e.drawImage(l.img,l.left,l.top)}),0==e.numPlays||n/e.frames.lengtht+e.playTime;)t+=e.playTime;t+=l.delay}else o=!1,i=!1}};e.exports=n},function(e,t){"use strict";for(var n=new Uint32Array(256),r=0;256>r;r++){for(var o=r,i=0;8>i;i++)o=1&o?3988292384^o>>>1:o>>>1;n[r]=o}e.exports=function(e,t,r){t=t||0,r=r||e.length-t;for(var o=-1,i=t,a=t+r;a>i;i++)o=o>>>8^n[255&(o^e[i])];return-1^o}},function(e,t,n){"use strict";var r=r||n(209).Promise;e.exports=function(e){return new r(function(t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="arraybuffer",r.onload=function(){200==this.status?t(this.response):n(this)},r.send()})}},function(e,t,n){var r,o,i,a;i=n(200),o=n(217),r=n(163),a=function(e){return e.replace("[","\\[").replace("(","\\(").replace("/","\\/")},e.exports=React.createClass({displayName:"ChatInput",getInitialState:function(){return{message:"",searchEmoteString:!1}},handleSubmit:function(e){var t;return e.preventDefault(),"function"==typeof(t=this.props).onSubmit&&t.onSubmit(this.state.message),this.tabbed=!1,this.setState({message:"",searchEmoteString:!1})},handleKeyUp:function(e){var t,n,r,o,s;return t=e.keyCode||e.which,13===t?void this.handleSubmit(e):(o=this.state.message)?(s=o.split(/[\s]/).pop().toLowerCase(),this.tabbed&&s.length&&("/"===s[0]&&this.setState({searchEmoteString:s.replace(/^\//g,"")}),n=i.find(this.props.users,function(e){return 0===e.nick.toLowerCase().indexOf(s)}),n&&(r=new RegExp(s+"$","gi"),this.setState({message:o.replace(r,n.nick+": ")}))),this.state.searchEmoteString&&27===t&&(r=new RegExp(a(s)+"$","gi"),this.setState({message:o.replace(r,""),searchEmoteString:!1})),void(this.tabbed=!1)):void(this.tabbed=!1)},handleKeyDown:function(e){var t;t=e.keyCode||e.which,9===t&&(e.preventDefault(),this.tabbed=!0)},onChange:function(e){return this.setState({message:e.target.value})},handleEmoteSelected:function(e){var t;return t=new RegExp("/"+this.state.searchEmoteString+"$","gi"),this.setState({message:this.state.message.replace(t,"[](/"+e+") "),searchEmoteString:!1}),this.refs.input.focus()},render:function(){return React.createElement("div",{className:"input-box"},this.state.searchEmoteString?React.createElement(o,{emoteSelected:this.handleEmoteSelected,search:this.state.searchEmoteString}):void 0,React.createElement("input",{id:"chat-input",type:"text",ref:"input",autoComplete:"off",placeholder:"Message",value:this.state.message,onChange:this.onChange,onKeyUp:this.handleKeyUp,onKeyDown:this.handleKeyDown}))}})},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var n=0;n=t-i/2&&t+i/2>=n?o.scrollTop=n:void 0},render:function(){var e,t;return e=0,t=this.props.playlist.map(function(t){return function(n,r){var i;return i={active:t.props.currentVideo&&n.videoid===t.props.currentVideo.videoid,"volatile":n.volat},i.active&&(e=r),React.createElement("li",{className:o(i),key:n.videoid},decodeURIComponent(n.videotitle.replace(/&/gi,"&")))}}(this)),this.activeRow=e,React.createElement("div",{ref:"scroller",className:"playlist"},React.createElement("ul",null,t))}})},function(e,t,n){var r,o,i,a;a=n(162),o=n(158),i=n(206),r=React.createClass({displayName:"Poll",render:function(){var e;return e=this.props.poll,React.createElement("div",{className:"panel panel-default polls"},React.createElement("div",{className:"panel-heading"},i.componentizeString(e.title)," ~ ",e.creator),React.createElement("div",{className:"panel-body"},React.createElement("ul",null,e.options.map(function(t){return function(n,r){var o;return o={votes:!0,voted:e.voted===r},React.createElement("li",null,React.createElement("span",{className:a(o),onClick:t.props.onVote.bind(null,r)},e.votes[r]),i.componentizeString(n))}}(this)))))}}),e.exports=React.createClass({displayName:"PollsModal",render:function(){"{'inactive':poll.inactive, 'disable':poll.voted != undefined}";return React.createElement("div",{className:"poll-list"},this.props.polls.map(function(e){return function(t){return React.createElement(r,{poll:t,onVote:e.props.onVote})}}(this)).reverse())}})},function(e,t,n){var r,o;o=n(162),r=n(199),e.exports=React.createClass({displayName:"SqueeInbox",renderMessage:function(e){return React.createElement(r,{renderEmotes:this.props.emotesEnabled,msg:e,key:e.timestamp+e.nick})},render:function(){return React.createElement("div",{className:"squee-inbox"},React.createElement("i",{onClick:this.props.onClear,title:"Clear Squees",className:"material-icons clear-all"},"clear_all"),this.props.squees.map(this.renderMessage))}})},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(module){/*! Socket.IO.js build:0.9.17, development. Copyright(c) 2011 LearnBoost MIT Licensed */ +var io=module.exports;!function(){if(function(e,t){var n=e;n.version="0.9.17",n.protocol=1,n.transports=[],n.j=[],n.sockets={},n.connect=function(e,r){var o,i,a=n.util.parseUri(e);t&&t.location&&(a.protocol=a.protocol||t.location.protocol.slice(0,-1),a.host=a.host||(t.document?t.document.domain:t.location.hostname),a.port=a.port||t.location.port),o=n.util.uniqueUri(a);var s={host:a.host,secure:"https"==a.protocol,port:a.port||("https"==a.protocol?443:80),query:a.query||""};return n.util.merge(s,r),(s["force new connection"]||!n.sockets[o])&&(i=new n.Socket(s)),!s["force new connection"]&&i&&(n.sockets[o]=i),i=i||n.sockets[o],i.of(a.path.length>1?a.path:"")}}(module.exports,this),function(e,t){var n=e.util={},r=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,o=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];n.parseUri=function(e){for(var t=r.exec(e||""),n={},i=14;i--;)n[o[i]]=t[i]||"";return n},n.uniqueUri=function(e){var n=e.protocol,r=e.host,o=e.port;return"document"in t?(r=r||document.domain,o=o||("https"==n&&"https:"!==document.location.protocol?443:document.location.port)):(r=r||"localhost",o||"https"!=n||(o=443)),(n||"http")+"://"+r+":"+(o||80)},n.query=function(e,t){var r=n.chunkQuery(e||""),o=[];n.merge(r,n.chunkQuery(t||""));for(var i in r)r.hasOwnProperty(i)&&o.push(i+"="+r[i]);return o.length?"?"+o.join("&"):""},n.chunkQuery=function(e){for(var t,n={},r=e.split("&"),o=0,i=r.length;i>o;++o)t=r[o].split("="),t[0]&&(n[t[0]]=t[1]);return n};var i=!1;n.load=function(e){return"document"in t&&"complete"===document.readyState||i?e():void n.on(t,"load",e,!1)},n.on=function(e,t,n,r){e.attachEvent?e.attachEvent("on"+t,n):e.addEventListener&&e.addEventListener(t,n,r)},n.request=function(e){if(e&&"undefined"!=typeof XDomainRequest&&!n.ua.hasCORS)return new XDomainRequest;if("undefined"!=typeof XMLHttpRequest&&(!e||n.ua.hasCORS))return new XMLHttpRequest;if(!e)try{return new(window[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}return null},"undefined"!=typeof window&&n.load(function(){i=!0}),n.defer=function(e){return n.ua.webkit&&"undefined"==typeof importScripts?void n.load(function(){setTimeout(e,100)}):e()},n.merge=function(e,t,r,o){var i,a=o||[],s="undefined"==typeof r?2:r;for(i in t)t.hasOwnProperty(i)&&n.indexOf(a,i)<0&&("object"==typeof e[i]&&s?n.merge(e[i],t[i],s-1,a):(e[i]=t[i],a.push(t[i])));return e},n.mixin=function(e,t){n.merge(e.prototype,t.prototype)},n.inherit=function(e,t){function n(){}n.prototype=t.prototype,e.prototype=new n},n.isArray=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},n.intersect=function(e,t){for(var r=[],o=e.length>t.length?e:t,i=e.length>t.length?t:e,a=0,s=i.length;s>a;a++)~n.indexOf(o,i[a])&&r.push(i[a]);return r},n.indexOf=function(e,t,n){for(var r=e.length,n=0>n?0>n+r?0:n+r:n||0;r>n&&e[n]!==t;n++);return n>=r?-1:n},n.toArray=function(e){for(var t=[],n=0,r=e.length;r>n;n++)t.push(e[n]);return t},n.ua={},n.ua.hasCORS="undefined"!=typeof XMLHttpRequest&&function(){try{var e=new XMLHttpRequest}catch(t){return!1}return void 0!=e.withCredentials}(),n.ua.webkit="undefined"!=typeof navigator&&/webkit/i.test(navigator.userAgent),n.ua.iDevice="undefined"!=typeof navigator&&/iPad|iPhone|iPod/i.test(navigator.userAgent)}("undefined"!=typeof io?io:module.exports,this),function(e,t){function n(){}e.EventEmitter=n,n.prototype.on=function(e,n){return this.$events||(this.$events={}),this.$events[e]?t.util.isArray(this.$events[e])?this.$events[e].push(n):this.$events[e]=[this.$events[e],n]:this.$events[e]=n,this},n.prototype.addListener=n.prototype.on,n.prototype.once=function(e,t){function n(){r.removeListener(e,n),t.apply(this,arguments)}var r=this;return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,n){if(this.$events&&this.$events[e]){var r=this.$events[e];if(t.util.isArray(r)){for(var o=-1,i=0,a=r.length;a>i;i++)if(r[i]===n||r[i].listener&&r[i].listener===n){o=i;break}if(0>o)return this;r.splice(o,1),r.length||delete this.$events[e]}else(r===n||r.listener&&r.listener===n)&&delete this.$events[e]}return this},n.prototype.removeAllListeners=function(e){return void 0===e?(this.$events={},this):(this.$events&&this.$events[e]&&(this.$events[e]=null),this)},n.prototype.listeners=function(e){return this.$events||(this.$events={}),this.$events[e]||(this.$events[e]=[]),t.util.isArray(this.$events[e])||(this.$events[e]=[this.$events[e]]),this.$events[e]},n.prototype.emit=function(e){if(!this.$events)return!1;var n=this.$events[e];if(!n)return!1;var r=Array.prototype.slice.call(arguments,1);if("function"==typeof n)n.apply(this,r);else{if(!t.util.isArray(n))return!1;for(var o=n.slice(),i=0,a=o.length;a>i;i++)o[i].apply(this,r)}return!0}}("undefined"!=typeof io?io:module.exports,"undefined"!=typeof io?io:module.parent.exports),function(exports,nativeJSON){"use strict";function f(e){return 10>e?"0"+e:e}function date(e,t){return isFinite(e.valueOf())?e.getUTCFullYear()+"-"+f(e.getUTCMonth()+1)+"-"+f(e.getUTCDate())+"T"+f(e.getUTCHours())+":"+f(e.getUTCMinutes())+":"+f(e.getUTCSeconds())+"Z":null}function quote(e){return escapable.lastIndex=0,escapable.test(e)?'"'+e.replace(escapable,function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var n,r,o,i,a,s=gap,u=t[e];switch(u instanceof Date&&(u=date(e)),"function"==typeof rep&&(u=rep.call(t,e,u)),typeof u){case"string":return quote(u);case"number":return isFinite(u)?String(u):"null";case"boolean":case"null":return String(u);case"object":if(!u)return"null";if(gap+=indent,a=[],"[object Array]"===Object.prototype.toString.apply(u)){for(i=u.length,n=0;i>n;n+=1)a[n]=str(n,u)||"null";return o=0===a.length?"[]":gap?"[\n"+gap+a.join(",\n"+gap)+"\n"+s+"]":"["+a.join(",")+"]",gap=s,o}if(rep&&"object"==typeof rep)for(i=rep.length,n=0;i>n;n+=1)"string"==typeof rep[n]&&(r=rep[n],o=str(r,u),o&&a.push(quote(r)+(gap?": ":":")+o));else for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(o=str(r,u),o&&a.push(quote(r)+(gap?": ":":")+o));return o=0===a.length?"{}":gap?"{\n"+gap+a.join(",\n"+gap)+"\n"+s+"}":"{"+a.join(",")+"}",gap=s,o}}if(nativeJSON&&nativeJSON.parse)return exports.JSON={parse:nativeJSON.parse,stringify:nativeJSON.stringify};var JSON=exports.JSON={},cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;JSON.stringify=function(e,t,n){var r;if(gap="",indent="","number"==typeof n)for(r=0;n>r;r+=1)indent+=" ";else"string"==typeof n&&(indent=n);if(rep=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return str("",{"":e})},JSON.parse=function(text,reviver){function walk(e,t){var n,r,o=e[t];if(o&&"object"==typeof o)for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(r=walk(o,n),void 0!==r?o[n]=r:delete o[n]);return reviver.call(e,t,o)}var j;if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")}}("undefined"!=typeof io?io:module.exports,"undefined"!=typeof JSON?JSON:void 0),function(e,t){var n=e.parser={},r=n.packets=["disconnect","connect","heartbeat","message","json","event","ack","error","noop"],o=n.reasons=["transport not supported","client not handshaken","unauthorized"],i=n.advice=["reconnect"],a=t.JSON,s=t.util.indexOf;n.encodePacket=function(e){var t=s(r,e.type),n=e.id||"",u=e.endpoint||"",l=e.ack,c=null;switch(e.type){case"error":var p=e.reason?s(o,e.reason):"",d=e.advice?s(i,e.advice):"";(""!==p||""!==d)&&(c=p+(""!==d?"+"+d:""));break;case"message":""!==e.data&&(c=e.data);break;case"event":var f={name:e.name};e.args&&e.args.length&&(f.args=e.args),c=a.stringify(f);break;case"json":c=a.stringify(e.data);break;case"connect":e.qs&&(c=e.qs);break;case"ack":c=e.ackId+(e.args&&e.args.length?"+"+a.stringify(e.args):"")}var h=[t,n+("data"==l?"+":""),u];return null!==c&&void 0!==c&&h.push(c),h.join(":")},n.encodePayload=function(e){var t="";if(1==e.length)return e[0];for(var n=0,r=e.length;r>n;n++){var o=e[n];t+="�"+o.length+"�"+e[n]}return t};var u=/([^:]+):([0-9]+)?(\+)?:([^:]+)?:?([\s\S]*)?/;n.decodePacket=function(e){var t=e.match(u);if(!t)return{};var n=t[2]||"",e=t[5]||"",s={type:r[t[1]],endpoint:t[4]||""};switch(n&&(s.id=n,t[3]?s.ack="data":s.ack=!0),s.type){case"error":var t=e.split("+");s.reason=o[t[0]]||"",s.advice=i[t[1]]||"";break;case"message":s.data=e||"";break;case"event":try{var l=a.parse(e);s.name=l.name,s.args=l.args}catch(c){}s.args=s.args||[];break;case"json":try{s.data=a.parse(e)}catch(c){}break;case"connect":s.qs=e||"";break;case"ack":var t=e.match(/^([0-9]+)(\+)?(.*)/);if(t&&(s.ackId=t[1],s.args=[],t[3]))try{s.args=t[3]?a.parse(t[3]):[]}catch(c){}break;case"disconnect":case"heartbeat":}return s},n.decodePayload=function(e){if("�"==e.charAt(0)){for(var t=[],r=1,o="";rr;r++)this.onPacket(n[r])}return this},n.prototype.onPacket=function(e){return this.socket.setHeartbeatTimeout(),"heartbeat"==e.type?this.onHeartbeat():("connect"==e.type&&""==e.endpoint&&this.onConnect(),"error"==e.type&&"reconnect"==e.advice&&(this.isOpen=!1),this.socket.onPacket(e),this)},n.prototype.setCloseTimeout=function(){if(!this.closeTimeout){var e=this;this.closeTimeout=setTimeout(function(){e.onDisconnect()},this.socket.closeTimeout)}},n.prototype.onDisconnect=function(){return this.isOpen&&this.close(),this.clearTimeouts(),this.socket.onDisconnect(),this},n.prototype.onConnect=function(){return this.socket.onConnect(),this},n.prototype.clearCloseTimeout=function(){this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null)},n.prototype.clearTimeouts=function(){this.clearCloseTimeout(),this.reopenTimeout&&clearTimeout(this.reopenTimeout)},n.prototype.packet=function(e){this.send(t.parser.encodePacket(e))},n.prototype.onHeartbeat=function(e){this.packet({type:"heartbeat"})},n.prototype.onOpen=function(){this.isOpen=!0,this.clearCloseTimeout(),this.socket.onOpen()},n.prototype.onClose=function(){this.isOpen=!1,this.socket.onClose(),this.onDisconnect()},n.prototype.prepareUrl=function(){var e=this.socket.options;return this.scheme()+"://"+e.host+":"+e.port+"/"+e.resource+"/"+t.protocol+"/"+this.name+"/"+this.sessid},n.prototype.ready=function(e,t){t.call(this)}}("undefined"!=typeof io?io:module.exports,"undefined"!=typeof io?io:module.parent.exports),function(e,t,n){function r(e){if(this.options={port:80,secure:!1,document:"document"in n?document:!1,resource:"socket.io",transports:t.transports,"connect timeout":1e4,"try multiple transports":!0,reconnect:!0,"reconnection delay":500,"reconnection limit":1/0,"reopen delay":3e3,"max reconnection attempts":10,"sync disconnect on unload":!1,"auto connect":!0,"flash policy port":10843,manualFlush:!1},t.util.merge(this.options,e),this.connected=!1,this.open=!1,this.connecting=!1,this.reconnecting=!1,this.namespaces={},this.buffer=[],this.doBuffer=!1,this.options["sync disconnect on unload"]&&(!this.isXDomain()||t.util.ua.hasCORS)){var r=this;t.util.on(n,"beforeunload",function(){r.disconnectSync()},!1)}this.options["auto connect"]&&this.connect()}function o(){}e.Socket=r,t.util.mixin(r,t.EventEmitter),r.prototype.of=function(e){return this.namespaces[e]||(this.namespaces[e]=new t.SocketNamespace(this,e),""!==e&&this.namespaces[e].packet({type:"connect"})),this.namespaces[e]},r.prototype.publish=function(){this.emit.apply(this,arguments);var e;for(var t in this.namespaces)this.namespaces.hasOwnProperty(t)&&(e=this.of(t),e.$emit.apply(e,arguments))},r.prototype.handshake=function(e){function n(t){t instanceof Error?(r.connecting=!1,r.onError(t.message)):e.apply(null,t.split(":"))}var r=this,i=this.options,a=["http"+(i.secure?"s":"")+":/",i.host+":"+i.port,i.resource,t.protocol,t.util.query(this.options.query,"t="+ +new Date)].join("/");if(this.isXDomain()&&!t.util.ua.hasCORS){var s=document.getElementsByTagName("script")[0],u=document.createElement("script");u.src=a+"&jsonp="+t.j.length,s.parentNode.insertBefore(u,s),t.j.push(function(e){n(e),u.parentNode.removeChild(u)})}else{var l=t.util.request();l.open("GET",a,!0),this.isXDomain()&&(l.withCredentials=!0),l.onreadystatechange=function(){4==l.readyState&&(l.onreadystatechange=o,200==l.status?n(l.responseText):403==l.status?r.onError(l.responseText):(r.connecting=!1,!r.reconnecting&&r.onError(l.responseText)))},l.send(null)}},r.prototype.getTransport=function(e){for(var n,r=e||this.transports,o=0;n=r[o];o++)if(t.Transport[n]&&t.Transport[n].check(this)&&(!this.isXDomain()||t.Transport[n].xdomainCheck(this)))return new t.Transport[n](this,this.sessionid);return null},r.prototype.connect=function(e){if(this.connecting)return this;var n=this;return n.connecting=!0,this.handshake(function(r,o,i,a){function s(e){return n.transport&&n.transport.clearTimeouts(),n.transport=n.getTransport(e),n.transport?void n.transport.ready(n,function(){n.connecting=!0,n.publish("connecting",n.transport.name),n.transport.open(),n.options["connect timeout"]&&(n.connectTimeoutTimer=setTimeout(function(){if(!n.connected&&(n.connecting=!1,n.options["try multiple transports"])){for(var e=n.transports;e.length>0&&e.splice(0,1)[0]!=n.transport.name;);e.length?s(e):n.publish("connect_failed")}},n.options["connect timeout"]))}):n.publish("connect_failed")}n.sessionid=r,n.closeTimeout=1e3*i,n.heartbeatTimeout=1e3*o,n.transports||(n.transports=n.origTransports=a?t.util.intersect(a.split(","),n.options.transports):n.options.transports),n.setHeartbeatTimeout(),s(n.transports),n.once("connect",function(){clearTimeout(n.connectTimeoutTimer),e&&"function"==typeof e&&e()})}),this},r.prototype.setHeartbeatTimeout=function(){if(clearTimeout(this.heartbeatTimeoutTimer),!this.transport||this.transport.heartbeats()){var e=this;this.heartbeatTimeoutTimer=setTimeout(function(){e.transport.onClose()},this.heartbeatTimeout)}},r.prototype.packet=function(e){return this.connected&&!this.doBuffer?this.transport.packet(e):this.buffer.push(e),this},r.prototype.setBuffer=function(e){this.doBuffer=e,!e&&this.connected&&this.buffer.length&&(this.options.manualFlush||this.flushBuffer())},r.prototype.flushBuffer=function(){this.transport.payload(this.buffer),this.buffer=[]},r.prototype.disconnect=function(){return(this.connected||this.connecting)&&(this.open&&this.of("").packet({type:"disconnect"}),this.onDisconnect("booted")),this},r.prototype.disconnectSync=function(){var e=t.util.request(),n=["http"+(this.options.secure?"s":"")+":/",this.options.host+":"+this.options.port,this.options.resource,t.protocol,"",this.sessionid].join("/")+"/?disconnect=1";e.open("GET",n,!1),e.send(null),this.onDisconnect("booted")},r.prototype.isXDomain=function(){var e=n.location.port||("https:"==n.location.protocol?443:80);return this.options.host!==n.location.hostname||this.options.port!=e},r.prototype.onConnect=function(){this.connected||(this.connected=!0,this.connecting=!1,this.doBuffer||this.setBuffer(!1),this.emit("connect"))},r.prototype.onOpen=function(){this.open=!0},r.prototype.onClose=function(){this.open=!1,clearTimeout(this.heartbeatTimeoutTimer)},r.prototype.onPacket=function(e){this.of(e.endpoint).onPacket(e)},r.prototype.onError=function(e){e&&e.advice&&"reconnect"===e.advice&&(this.connected||this.connecting)&&(this.disconnect(),this.options.reconnect&&this.reconnect()),this.publish("error",e&&e.reason?e.reason:e)},r.prototype.onDisconnect=function(e){var t=this.connected,n=this.connecting;this.connected=!1,this.connecting=!1,this.open=!1,(t||n)&&(this.transport.close(),this.transport.clearTimeouts(),t&&(this.publish("disconnect",e),"booted"!=e&&this.options.reconnect&&!this.reconnecting&&this.reconnect()))},r.prototype.reconnect=function(){function e(){if(n.connected){for(var e in n.namespaces)n.namespaces.hasOwnProperty(e)&&""!==e&&n.namespaces[e].packet({type:"connect"});n.publish("reconnect",n.transport.name,n.reconnectionAttempts)}clearTimeout(n.reconnectionTimer),n.removeListener("connect_failed",t),n.removeListener("connect",t),n.reconnecting=!1,delete n.reconnectionAttempts,delete n.reconnectionDelay,delete n.reconnectionTimer,delete n.redoTransports,n.options["try multiple transports"]=o}function t(){return n.reconnecting?n.connected?e():n.connecting&&n.reconnecting?n.reconnectionTimer=setTimeout(t,1e3):void(n.reconnectionAttempts++>=r?n.redoTransports?(n.publish("reconnect_failed"),e()):(n.on("connect_failed",t),n.options["try multiple transports"]=!0,n.transports=n.origTransports,n.transport=n.getTransport(),n.redoTransports=!0,n.connect()):(n.reconnectionDelayt;t++)this.packet(e[t]);return this},r.prototype.close=function(){return this.websocket.close(),this},r.prototype.onError=function(e){this.socket.onError(e)},r.prototype.scheme=function(){return this.socket.options.secure?"wss":"ws"},r.check=function(){return"WebSocket"in n&&!("__addTask"in WebSocket)||"MozWebSocket"in n},r.xdomainCheck=function(){return!0},t.transports.push("websocket")}("undefined"!=typeof io?io.Transport:module.exports,"undefined"!=typeof io?io:module.parent.exports,this),function(e,t){function n(){t.Transport.websocket.apply(this,arguments)}e.flashsocket=n,t.util.inherit(n,t.Transport.websocket),n.prototype.name="flashsocket",n.prototype.open=function(){var e=this,n=arguments;return WebSocket.__addTask(function(){t.Transport.websocket.prototype.open.apply(e,n)}),this},n.prototype.send=function(){var e=this,n=arguments;return WebSocket.__addTask(function(){t.Transport.websocket.prototype.send.apply(e,n)}),this},n.prototype.close=function(){return WebSocket.__tasks.length=0,t.Transport.websocket.prototype.close.call(this),this},n.prototype.ready=function(e,r){function o(){var t=e.options,o=t["flash policy port"],a=["http"+(t.secure?"s":"")+":/",t.host+":"+t.port,t.resource,"static/flashsocket","WebSocketMain"+(e.isXDomain()?"Insecure":"")+".swf"];n.loaded||("undefined"==typeof WEB_SOCKET_SWF_LOCATION&&(WEB_SOCKET_SWF_LOCATION=a.join("/")),843!==o&&WebSocket.loadFlashPolicyFile("xmlsocket://"+t.host+":"+o),WebSocket.__initialize(),n.loaded=!0),r.call(i)}var i=this;return document.body?o():void t.util.load(o)},n.check=function(){return"undefined"!=typeof WebSocket&&"__initialize"in WebSocket&&swfobject?swfobject.getFlashPlayerVersion().major>=10:!1},n.xdomainCheck=function(){return!0},"undefined"!=typeof window&&(WEB_SOCKET_DISABLE_AUTO_INITIALIZATION=!0),t.transports.push("flashsocket")}("undefined"!=typeof io?io.Transport:module.exports,"undefined"!=typeof io?io:module.parent.exports),"undefined"!=typeof window)var swfobject=function(){function e(){if(!V){try{var e=L.getElementsByTagName("body")[0].appendChild(v("span"));e.parentNode.removeChild(e)}catch(t){return}V=!0;for(var n=U.length,r=0;n>r;r++)U[r]()}}function t(e){V?e():U[U.length]=e}function n(e){if(typeof I.addEventListener!=N)I.addEventListener("load",e,!1);else if(typeof L.addEventListener!=N)L.addEventListener("load",e,!1);else if(typeof I.attachEvent!=N)g(I,"onload",e);else if("function"==typeof I.onload){var t=I.onload;I.onload=function(){t(),e()}}else I.onload=e}function r(){F?o():i()}function o(){var e=L.getElementsByTagName("body")[0],t=v(O);t.setAttribute("type",A);var n=e.appendChild(t);if(n){var r=0;!function(){if(typeof n.GetVariable!=N){var o=n.GetVariable("$version");o&&(o=o.split(" ")[1].split(","),K.pv=[parseInt(o[0],10),parseInt(o[1],10),parseInt(o[2],10)])}else if(10>r)return r++,void setTimeout(arguments.callee,10);e.removeChild(t),n=null,i()}()}else i()}function i(){var e=B.length;if(e>0)for(var t=0;e>t;t++){var n=B[t].id,r=B[t].callbackFn,o={success:!1,id:n};if(K.pv[0]>0){var i=m(n);if(i)if(!y(B[t].swfVersion)||K.wk&&K.wk<312)if(B[t].expressInstall&&s()){var c={};c.data=B[t].expressInstall,c.width=i.getAttribute("width")||"0",c.height=i.getAttribute("height")||"0",i.getAttribute("class")&&(c.styleclass=i.getAttribute("class")),i.getAttribute("align")&&(c.align=i.getAttribute("align"));for(var p={},d=i.getElementsByTagName("param"),f=d.length,h=0;f>h;h++)"movie"!=d[h].getAttribute("name").toLowerCase()&&(p[d[h].getAttribute("name")]=d[h].getAttribute("value"));u(c,p,n,r)}else l(i),r&&r(o);else _(n,!0),r&&(o.success=!0,o.ref=a(n),r(o))}else if(_(n,!0),r){var v=a(n);v&&typeof v.SetVariable!=N&&(o.success=!0,o.ref=v),r(o)}}}function a(e){var t=null,n=m(e);if(n&&"OBJECT"==n.nodeName)if(typeof n.SetVariable!=N)t=n;else{var r=n.getElementsByTagName(O)[0];r&&(t=r)}return t}function s(){return!H&&y("6.0.65")&&(K.win||K.mac)&&!(K.wk&&K.wk<312)}function u(e,t,n,r){H=!0,C=r||null,k={success:!1,id:n};var o=m(n);if(o){"OBJECT"==o.nodeName?(E=c(o),x=null):(E=o,x=n),e.id=R,(typeof e.width==N||!/%$/.test(e.width)&&parseInt(e.width,10)<310)&&(e.width="310"),(typeof e.height==N||!/%$/.test(e.height)&&parseInt(e.height,10)<137)&&(e.height="137"),L.title=L.title.slice(0,47)+" - Flash Player Installation";var i=K.ie&&K.win?["Active"].concat("").join("X"):"PlugIn",a="MMredirectURL="+I.location.toString().replace(/&/g,"%26")+"&MMplayerType="+i+"&MMdoctitle="+L.title;if(typeof t.flashvars!=N?t.flashvars+="&"+a:t.flashvars=a,K.ie&&K.win&&4!=o.readyState){var s=v("div");n+="SWFObjectNew",s.setAttribute("id",n),o.parentNode.insertBefore(s,o),o.style.display="none",function(){4==o.readyState?o.parentNode.removeChild(o):setTimeout(arguments.callee,10)}()}p(e,t,n)}}function l(e){if(K.ie&&K.win&&4!=e.readyState){var t=v("div");e.parentNode.insertBefore(t,e),t.parentNode.replaceChild(c(e),t),e.style.display="none",function(){4==e.readyState?e.parentNode.removeChild(e):setTimeout(arguments.callee,10)}()}else e.parentNode.replaceChild(c(e),e)}function c(e){var t=v("div");if(K.win&&K.ie)t.innerHTML=e.innerHTML;else{var n=e.getElementsByTagName(O)[0];if(n){var r=n.childNodes;if(r)for(var o=r.length,i=0;o>i;i++)1==r[i].nodeType&&"PARAM"==r[i].nodeName||8==r[i].nodeType||t.appendChild(r[i].cloneNode(!0))}}return t}function p(e,t,n){var r,o=m(n);if(K.wk&&K.wk<312)return r;if(o)if(typeof e.id==N&&(e.id=n),K.ie&&K.win){var i="";for(var a in e)e[a]!=Object.prototype[a]&&("data"==a.toLowerCase()?t.movie=e[a]:"styleclass"==a.toLowerCase()?i+=' class="'+e[a]+'"':"classid"!=a.toLowerCase()&&(i+=" "+a+'="'+e[a]+'"'));var s="";for(var u in t)t[u]!=Object.prototype[u]&&(s+='');o.outerHTML='"+s+"",W[W.length]=e.id,r=m(e.id)}else{var l=v(O);l.setAttribute("type",A);for(var c in e)e[c]!=Object.prototype[c]&&("styleclass"==c.toLowerCase()?l.setAttribute("class",e[c]):"classid"!=c.toLowerCase()&&l.setAttribute(c,e[c]));for(var p in t)t[p]!=Object.prototype[p]&&"movie"!=p.toLowerCase()&&d(l,p,t[p]);o.parentNode.replaceChild(l,o),r=l}return r}function d(e,t,n){var r=v("param");r.setAttribute("name",t),r.setAttribute("value",n),e.appendChild(r)}function f(e){var t=m(e);t&&"OBJECT"==t.nodeName&&(K.ie&&K.win?(t.style.display="none",function(){4==t.readyState?h(e):setTimeout(arguments.callee,10)}()):t.parentNode.removeChild(t))}function h(e){var t=m(e);if(t){for(var n in t)"function"==typeof t[n]&&(t[n]=null);t.parentNode.removeChild(t)}}function m(e){var t=null;try{t=L.getElementById(e)}catch(n){}return t}function v(e){return L.createElement(e)}function g(e,t,n){e.attachEvent(t,n),q[q.length]=[e,t,n]}function y(e){var t=K.pv,n=e.split(".");return n[0]=parseInt(n[0],10),n[1]=parseInt(n[1],10)||0,n[2]=parseInt(n[2],10)||0,t[0]>n[0]||t[0]==n[0]&&t[1]>n[1]||t[0]==n[0]&&t[1]==n[1]&&t[2]>=n[2]?!0:!1}function b(e,t,n,r){if(!K.ie||!K.mac){var o=L.getElementsByTagName("head")[0];if(o){var i=n&&"string"==typeof n?n:"screen";if(r&&(S=null,T=null),!S||T!=i){var a=v("style");a.setAttribute("type","text/css"),a.setAttribute("media",i),S=o.appendChild(a),K.ie&&K.win&&typeof L.styleSheets!=N&&L.styleSheets.length>0&&(S=L.styleSheets[L.styleSheets.length-1]),T=i}K.ie&&K.win?S&&typeof S.addRule==O&&S.addRule(e,t):S&&typeof L.createTextNode!=N&&S.appendChild(L.createTextNode(e+" {"+t+"}"))}}}function _(e,t){if(z){var n=t?"visible":"hidden";V&&m(e)?m(e).style.visibility=n:b("#"+e,"visibility:"+n)}}function w(e){var t=/[\\\"<>\.;]/,n=null!=t.exec(e);return n&&typeof encodeURIComponent!=N?encodeURIComponent(e):e}var E,x,C,k,S,T,N="undefined",O="object",P="Shockwave Flash",D="ShockwaveFlash.ShockwaveFlash",A="application/x-shockwave-flash",R="SWFObjectExprInst",M="onreadystatechange",I=window,L=document,j=navigator,F=!1,U=[r],B=[],W=[],q=[],V=!1,H=!1,z=!0,K=function(){var e=typeof L.getElementById!=N&&typeof L.getElementsByTagName!=N&&typeof L.createElement!=N,t=j.userAgent.toLowerCase(),n=j.platform.toLowerCase(),r=n?/win/.test(n):/win/.test(t),o=n?/mac/.test(n):/mac/.test(t),i=/webkit/.test(t)?parseFloat(t.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):!1,a=!1,s=[0,0,0],u=null;if(typeof j.plugins!=N&&typeof j.plugins[P]==O)u=j.plugins[P].description,!u||typeof j.mimeTypes!=N&&j.mimeTypes[A]&&!j.mimeTypes[A].enabledPlugin||(F=!0,a=!1,u=u.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),s[0]=parseInt(u.replace(/^(.*)\..*$/,"$1"),10),s[1]=parseInt(u.replace(/^.*\.(.*)\s.*$/,"$1"),10),s[2]=/[a-zA-Z]/.test(u)?parseInt(u.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0);else if(typeof I[["Active"].concat("Object").join("X")]!=N)try{var l=new(window[["Active"].concat("Object").join("X")])(D);l&&(u=l.GetVariable("$version"),u&&(a=!0,u=u.split(" ")[1].split(","),s=[parseInt(u[0],10),parseInt(u[1],10),parseInt(u[2],10)]))}catch(c){}return{w3:e,pv:s,wk:i,ie:a,win:r,mac:o}}();(function(){K.w3&&((typeof L.readyState!=N&&"complete"==L.readyState||typeof L.readyState==N&&(L.getElementsByTagName("body")[0]||L.body))&&e(),V||(typeof L.addEventListener!=N&&L.addEventListener("DOMContentLoaded",e,!1),K.ie&&K.win&&(L.attachEvent(M,function(){"complete"==L.readyState&&(L.detachEvent(M,arguments.callee),e())}),I==top&&!function(){if(!V){try{L.documentElement.doScroll("left")}catch(t){return void setTimeout(arguments.callee,0)}e()}}()),K.wk&&!function(){return V?void 0:/loaded|complete/.test(L.readyState)?void e():void setTimeout(arguments.callee,0)}(),n(e)))})(),function(){K.ie&&K.win&&window.attachEvent("onunload",function(){for(var e=q.length,t=0;e>t;t++)q[t][0].detachEvent(q[t][1],q[t][2]);for(var n=W.length,r=0;n>r;r++)f(W[r]);for(var o in K)K[o]=null;K=null;for(var i in swfobject)swfobject[i]=null;swfobject=null})}();return{registerObject:function(e,t,n,r){if(K.w3&&e&&t){var o={};o.id=e,o.swfVersion=t,o.expressInstall=n,o.callbackFn=r,B[B.length]=o,_(e,!1)}else r&&r({success:!1,id:e})},getObjectById:function(e){return K.w3?a(e):void 0},embedSWF:function(e,n,r,o,i,a,l,c,d,f){var h={success:!1,id:n};K.w3&&!(K.wk&&K.wk<312)&&e&&n&&r&&o&&i?(_(n,!1),t(function(){r+="",o+="";var t={};if(d&&typeof d===O)for(var m in d)t[m]=d[m];t.data=e,t.width=r,t.height=o;var v={};if(c&&typeof c===O)for(var g in c)v[g]=c[g];if(l&&typeof l===O)for(var b in l)typeof v.flashvars!=N?v.flashvars+="&"+b+"="+l[b]:v.flashvars=b+"="+l[b];if(y(i)){var w=p(t,v,n);t.id==n&&_(n,!0),h.success=!0,h.ref=w}else{if(a&&s())return t.data=a,void u(t,v,n,f);_(n,!0)}f&&f(h)})):f&&f(h)},switchOffAutoHideShow:function(){z=!1},ua:K,getFlashPlayerVersion:function(){ +return{major:K.pv[0],minor:K.pv[1],release:K.pv[2]}},hasFlashPlayerVersion:y,createSWF:function(e,t,n){return K.w3?p(e,t,n):void 0},showExpressInstall:function(e,t,n,r){K.w3&&s()&&u(e,t,n,r)},removeSWF:function(e){K.w3&&f(e)},createCSS:function(e,t,n,r){K.w3&&b(e,t,n,r)},addDomLoadEvent:t,addLoadEvent:n,getQueryParamValue:function(e){var t=L.location.search||L.location.hash;if(t){if(/\?/.test(t)&&(t=t.split("?")[1]),null==e)return w(t);for(var n=t.split("&"),r=0;r= 10.0.0 is required.");"file:"==location.protocol&&e.error("WARNING: web-socket-js doesn't work in file:///... URL unless you set Flash Security Settings properly. Open the page via Web server i.e. http://..."),WebSocket=function(e,t,n,r,o){var i=this;i.__id=WebSocket.__nextId++,WebSocket.__instances[i.__id]=i,i.readyState=WebSocket.CONNECTING,i.bufferedAmount=0,i.__events={},t?"string"==typeof t&&(t=[t]):t=[],setTimeout(function(){WebSocket.__addTask(function(){WebSocket.__flash.create(i.__id,e,t,n||null,r||0,o||null)})},0)},WebSocket.prototype.send=function(e){if(this.readyState==WebSocket.CONNECTING)throw"INVALID_STATE_ERR: Web Socket connection has not been established";var t=WebSocket.__flash.send(this.__id,encodeURIComponent(e));return 0>t?!0:(this.bufferedAmount+=t,!1)},WebSocket.prototype.close=function(){this.readyState!=WebSocket.CLOSED&&this.readyState!=WebSocket.CLOSING&&(this.readyState=WebSocket.CLOSING,WebSocket.__flash.close(this.__id))},WebSocket.prototype.addEventListener=function(e,t,n){e in this.__events||(this.__events[e]=[]),this.__events[e].push(t)},WebSocket.prototype.removeEventListener=function(e,t,n){if(e in this.__events)for(var r=this.__events[e],o=r.length-1;o>=0;--o)if(r[o]===t){r.splice(o,1);break}},WebSocket.prototype.dispatchEvent=function(e){for(var t=this.__events[e.type]||[],n=0;nr;r++)n.push(t.parser.encodePacket(e[r]));this.send(t.parser.encodePayload(n))},r.prototype.send=function(e){return this.post(e),this},r.prototype.post=function(e){function t(){4==this.readyState&&(this.onreadystatechange=o,i.posting=!1,200==this.status?i.socket.setBuffer(!1):i.onClose())}function r(){this.onload=o,i.socket.setBuffer(!1)}var i=this;this.socket.setBuffer(!0),this.sendXHR=this.request("POST"),n.XDomainRequest&&this.sendXHR instanceof XDomainRequest?this.sendXHR.onload=this.sendXHR.onerror=r:this.sendXHR.onreadystatechange=t,this.sendXHR.send(e)},r.prototype.close=function(){return this.onClose(),this},r.prototype.request=function(e){var n=t.util.request(this.socket.isXDomain()),r=t.util.query(this.socket.options.query,"t="+ +new Date);if(n.open(e||"GET",this.prepareUrl()+r,!0),"POST"==e)try{n.setRequestHeader?n.setRequestHeader("Content-type","text/plain;charset=UTF-8"):n.contentType="text/plain"}catch(o){}return n},r.prototype.scheme=function(){return this.socket.options.secure?"https":"http"},r.check=function(e,r){try{var o=t.util.request(r),i=n.XDomainRequest&&o instanceof XDomainRequest,a=e&&e.options&&e.options.secure?"https:":"http:",s=n.location&&a!=n.location.protocol;if(o&&(!i||!s))return!0}catch(u){}return!1},r.xdomainCheck=function(e){return r.check(e,!0)}}("undefined"!=typeof io?io.Transport:module.exports,"undefined"!=typeof io?io:module.parent.exports,this),function(e,t){function n(e){t.Transport.XHR.apply(this,arguments)}e.htmlfile=n,t.util.inherit(n,t.Transport.XHR),n.prototype.name="htmlfile",n.prototype.get=function(){this.doc=new(window[["Active"].concat("Object").join("X")])("htmlfile"),this.doc.open(),this.doc.write(""),this.doc.close(),this.doc.parentWindow.s=this;var e=this.doc.createElement("div");e.className="socketio",this.doc.body.appendChild(e),this.iframe=this.doc.createElement("iframe"),e.appendChild(this.iframe);var n=this,r=t.util.query(this.socket.options.query,"t="+ +new Date);this.iframe.src=this.prepareUrl()+r,t.util.on(window,"unload",function(){n.destroy()})},n.prototype._=function(e,t){e=e.replace(/\\\//g,"/"),this.onData(e);try{var n=t.getElementsByTagName("script")[0];n.parentNode.removeChild(n)}catch(r){}},n.prototype.destroy=function(){if(this.iframe){try{this.iframe.src="about:blank"}catch(e){}this.doc=null,this.iframe.parentNode.removeChild(this.iframe),this.iframe=null,CollectGarbage()}},n.prototype.close=function(){return this.destroy(),t.Transport.XHR.prototype.close.call(this)},n.check=function(e){if("undefined"!=typeof window&&["Active"].concat("Object").join("X")in window)try{var n=new(window[["Active"].concat("Object").join("X")])("htmlfile");return n&&t.Transport.XHR.check(e)}catch(r){}return!1},n.xdomainCheck=function(){return!1},t.transports.push("htmlfile")}("undefined"!=typeof io?io.Transport:module.exports,"undefined"!=typeof io?io:module.parent.exports),function(e,t,n){function r(){t.Transport.XHR.apply(this,arguments)}function o(){}e["xhr-polling"]=r,t.util.inherit(r,t.Transport.XHR),t.util.merge(r,t.Transport.XHR),r.prototype.name="xhr-polling",r.prototype.heartbeats=function(){return!1},r.prototype.open=function(){var e=this;return t.Transport.XHR.prototype.open.call(e),!1},r.prototype.get=function(){function e(){4==this.readyState&&(this.onreadystatechange=o,200==this.status?(i.onData(this.responseText),i.get()):i.onClose())}function t(){this.onload=o,this.onerror=o,i.retryCounter=1,i.onData(this.responseText),i.get()}function r(){i.retryCounter++,!i.retryCounter||i.retryCounter>3?i.onClose():i.get()}if(this.isOpen){var i=this;this.xhr=this.request(),n.XDomainRequest&&this.xhr instanceof XDomainRequest?(this.xhr.onload=t,this.xhr.onerror=r):this.xhr.onreadystatechange=e,this.xhr.send(null)}},r.prototype.onClose=function(){if(t.Transport.XHR.prototype.onClose.call(this),this.xhr){this.xhr.onreadystatechange=this.xhr.onload=this.xhr.onerror=o;try{this.xhr.abort()}catch(e){}this.xhr=null}},r.prototype.ready=function(e,n){var r=this;t.util.defer(function(){n.call(r)})},t.transports.push("xhr-polling")}("undefined"!=typeof io?io.Transport:module.exports,"undefined"!=typeof io?io:module.parent.exports,this),function(e,t,n){function r(e){t.Transport["xhr-polling"].apply(this,arguments),this.index=t.j.length;var n=this;t.j.push(function(e){n._(e)})}var o=n.document&&"MozAppearance"in n.document.documentElement.style;e["jsonp-polling"]=r,t.util.inherit(r,t.Transport["xhr-polling"]),r.prototype.name="jsonp-polling",r.prototype.post=function(e){function n(){r(),o.socket.setBuffer(!1)}function r(){o.iframe&&o.form.removeChild(o.iframe);try{a=document.createElement('