module.exports = function(modules) {
function __webpack_require__(moduleId) {
if (installedModules[moduleId]) return installedModules[moduleId].exports;
var module = installedModules[moduleId] = {
exports: {},
id: moduleId,
loaded: !1
};
return modules[moduleId].call(module.exports, module, module.exports, __webpack_require__),
module.loaded = !0, module.exports;
}
var installedModules = {};
return __webpack_require__.m = modules, __webpack_require__.c = installedModules,
__webpack_require__.p = "", __webpack_require__(0);
}([ function(module, exports, __webpack_require__) {
"use strict";
function reload() {
ReactDOM.unmountComponentAtNode(node), node.innerHTML = "", setTimeout(function() {
panel = ReactDOM.render(React.createElement(Panel, config), node);
}, 100);
}
function onDisconnected() {
panel = null, ReactDOM.unmountComponentAtNode(node), node.innerHTML = '
Waiting for React to connect…
';
}
function onError(e) {
panel = null, ReactDOM.unmountComponentAtNode(node);
var message;
message = "EADDRINUSE" === e.code ? "Another instance of DevTools is running" : "Unknown error (" + e.message + ")",
node.innerHTML = '' + message + "
";
}
function initialize(socket) {
var listeners = [];
socket.onmessage = function(evt) {
var data = JSON.parse(evt.data);
listeners.forEach(function(fn) {
return fn(data);
});
}, wall = {
listen: function(fn) {
listeners.push(fn);
},
send: function(data) {
socket.readyState === socket.OPEN && socket.send(JSON.stringify(data));
},
disconnect: function() {
socket.close();
}
}, log("Connected"), reload();
}
function connectToSocket(socket) {
return socket.onerror = function(err) {
onDisconnected(), log.error("Error with websocket connection", err);
}, socket.onclose = function() {
onDisconnected(), log("Connection to RN closed");
}, initialize(socket), {
close: function() {
onDisconnected();
}
};
}
function startServer() {
var port = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 8097, httpServer = __webpack_require__(513).createServer(), server = new ws.Server({
server: httpServer
}), connected = !1;
return server.on("connection", function(socket) {
connected && (connected.close(), log.warn("Only one connection allowed at a time.", "Closing the previous connection")),
connected = socket, socket.onerror = function(err) {
connected = !1, onDisconnected(), log.error("Error with websocket connection", err);
}, socket.onclose = function() {
connected = !1, onDisconnected(), log("Connection to RN closed");
}, initialize(socket);
}), server.on("error", function(e) {
onError(e), log.error("Failed to start the DevTools server", e), restartTimeout = setTimeout(function() {
return startServer(port);
}, 1e3);
}), httpServer.on("request", function(req, res) {
var backendFile = fs.readFileSync(path.join(__dirname, "../build/backend.js"));
res.end(backendFile + "\n;ReactDevToolsBackend.connectToDevTools();");
}), httpServer.on("error", function(e) {
onError(e), onStatusChange("Failed to start the server."), restartTimeout = setTimeout(function() {
return startServer(port);
}, 1e3);
}), httpServer.listen(port, function() {
onStatusChange("The server is listening on the port " + port + ".");
}), {
close: function() {
connected = !1, onDisconnected(), clearTimeout(restartTimeout), server.close(),
httpServer.close();
}
};
}
var ws = __webpack_require__(1), fs = __webpack_require__(2), path = __webpack_require__(3), installGlobalHook = __webpack_require__(4);
installGlobalHook(window);
var Panel = __webpack_require__(5), launchEditor = __webpack_require__(504), React = __webpack_require__(6), ReactDOM = __webpack_require__(44), node = null, onStatusChange = function() {}, projectRoots = [], wall = null, panel = null, config = {
reload: reload,
alreadyFoundReact: !0,
showInspectButton: !1,
showHiddenThemes: !0,
inject: function(done) {
done(wall);
},
showElementSource: function(source) {
launchEditor(source.fileName, source.lineNumber, projectRoots);
}
}, log = function() {
for (var _console, _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
return (_console = console).log.apply(_console, [ "[React DevTools]" ].concat(args));
};
log.warn = function() {
for (var _console2, _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) args[_key2] = arguments[_key2];
return (_console2 = console).warn.apply(_console2, [ "[React DevTools]" ].concat(args));
}, log.error = function() {
for (var _console3, _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) args[_key3] = arguments[_key3];
return (_console3 = console).error.apply(_console3, [ "[React DevTools]" ].concat(args));
};
var restartTimeout = null, DevtoolsUI = {
setContentDOMNode: function(_node) {
return node = _node, DevtoolsUI;
},
setProjectRoots: function(_projectRoots) {
projectRoots = _projectRoots;
},
setStatusListener: function(_listener) {
return onStatusChange = _listener, DevtoolsUI;
},
setDefaultThemeName: function(themeName) {
if (config.themeName = themeName, panel) {
var _panel$getChildContex = panel.getChildContext(), store = _panel$getChildContex.store;
store.changeDefaultTheme(themeName);
}
return DevtoolsUI;
},
setBrowserName: function(name) {
return config.browserName = name, DevtoolsUI;
},
startServer: startServer,
connectToSocket: connectToSocket
};
module.exports = DevtoolsUI;
}, function(module, exports) {
module.exports = require("ws");
}, function(module, exports) {
module.exports = require("fs");
}, function(module, exports) {
module.exports = require("path");
}, function(module, exports) {
"use strict";
function installGlobalHook(window) {
function detectReactBuildType(renderer) {
try {
if ("string" == typeof renderer.version) return renderer.bundleType > 0 ? "development" : "production";
var toString = Function.prototype.toString;
if (renderer.Mount && renderer.Mount._renderNewRootComponent) {
var renderRootCode = toString.call(renderer.Mount._renderNewRootComponent);
return 0 !== renderRootCode.indexOf("function") ? "production" : renderRootCode.indexOf("storedMeasure") !== -1 ? "development" : renderRootCode.indexOf("should be a pure function") !== -1 ? renderRootCode.indexOf("NODE_ENV") !== -1 ? "development" : renderRootCode.indexOf("development") !== -1 ? "development" : renderRootCode.indexOf("true") !== -1 ? "development" : renderRootCode.indexOf("nextElement") !== -1 || renderRootCode.indexOf("nextComponent") !== -1 ? "unminified" : "development" : renderRootCode.indexOf("nextElement") !== -1 || renderRootCode.indexOf("nextComponent") !== -1 ? "unminified" : renderRootCode.indexOf("._registerComponent") !== -1 ? "outdated" : "production";
}
} catch (err) {}
return "production";
}
if (!window.__REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hasDetectedBadDCE = !1, hook = {
_renderers: {},
helpers: {},
checkDCE: function(fn) {
try {
var toString = Function.prototype.toString, code = toString.call(fn);
code.indexOf("^_^") > -1 && (hasDetectedBadDCE = !0, setTimeout(function() {
throw new Error("React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://fb.me/react-perf-use-the-production-build");
}));
} catch (err) {}
},
inject: function(renderer) {
var id = Math.random().toString(16).slice(2);
hook._renderers[id] = renderer;
var reactBuildType = hasDetectedBadDCE ? "deadcode" : detectReactBuildType(renderer);
return hook.emit("renderer", {
id: id,
renderer: renderer,
reactBuildType: reactBuildType
}), id;
},
_listeners: {},
sub: function(evt, fn) {
return hook.on(evt, fn), function() {
return hook.off(evt, fn);
};
},
on: function(evt, fn) {
hook._listeners[evt] || (hook._listeners[evt] = []), hook._listeners[evt].push(fn);
},
off: function(evt, fn) {
if (hook._listeners[evt]) {
var ix = hook._listeners[evt].indexOf(fn);
ix !== -1 && hook._listeners[evt].splice(ix, 1), hook._listeners[evt].length || (hook._listeners[evt] = null);
}
},
emit: function(evt, data) {
hook._listeners[evt] && hook._listeners[evt].map(function(fn) {
return fn(data);
});
},
supportsFiber: !0,
_fiberRoots: {},
getFiberRoots: function(rendererID) {
var roots = hook._fiberRoots;
return roots[rendererID] || (roots[rendererID] = new Set()), roots[rendererID];
},
onCommitFiberUnmount: function(rendererID, fiber) {
hook.helpers[rendererID] && hook.helpers[rendererID].handleCommitFiberUnmount(fiber);
},
onCommitFiberRoot: function(rendererID, root) {
var mountedRoots = hook.getFiberRoots(rendererID), current = root.current, isKnownRoot = mountedRoots.has(root), isUnmounting = null == current.memoizedState || null == current.memoizedState.element;
isKnownRoot || isUnmounting ? isKnownRoot && isUnmounting && mountedRoots["delete"](root) : mountedRoots.add(root),
hook.helpers[rendererID] && hook.helpers[rendererID].handleCommitFiberRoot(root);
}
};
Object.defineProperty(window, "__REACT_DEVTOOLS_GLOBAL_HOOK__", {
value: hook
});
}
}
module.exports = installGlobalHook;
}, function(module, exports, __webpack_require__) {
"use strict";
function _toConsumableArray(arr) {
if (Array.isArray(arr)) {
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
return arr2;
}
return Array.from(arr);
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), React = __webpack_require__(6), Container = __webpack_require__(33), Store = __webpack_require__(477), keyboardNav = __webpack_require__(482), invariant = __webpack_require__(213), assign = __webpack_require__(37), Bridge = __webpack_require__(484), _require = __webpack_require__(35), sansSerif = _require.sansSerif, NativeStyler = __webpack_require__(491), RelayPlugin = __webpack_require__(495), Themes = __webpack_require__(471), ThemeStore = __webpack_require__(481), consts = __webpack_require__(187), Panel = function(_React$Component) {
function Panel(props) {
_classCallCheck(this, Panel);
var _this = _possibleConstructorReturn(this, (Panel.__proto__ || Object.getPrototypeOf(Panel)).call(this, props));
return _this.state = {
loading: !0,
preferencesPanelShown: !1,
isReact: props.alreadyFoundReact,
themeKey: 0,
themeName: props.themeName
}, _this._unMounted = !1, window.panel = _this, _this.plugins = [], _this;
}
return _inherits(Panel, _React$Component), _createClass(Panel, [ {
key: "getChildContext",
value: function() {
return {
browserName: this.props.browserName || "",
defaultThemeName: this._themeStore && this._themeStore.defaultThemeName || "",
showHiddenThemes: !!this.props.showHiddenThemes,
showInspectButton: this.props.showInspectButton !== !1,
store: this._store,
theme: this._themeStore && this._themeStore.theme || Themes.ChromeDefault,
themeName: this._themeStore && this._themeStore.themeName || "",
themes: this._themeStore && this._themeStore.themes || {}
};
}
}, {
key: "componentDidMount",
value: function() {
var _this2 = this;
this.props.alreadyFoundReact ? this.inject() : this.lookForReact(), this.props.reloadSubscribe && (this._unsub = this.props.reloadSubscribe(function() {
return _this2.reload();
}));
}
}, {
key: "componentWillUnmount",
value: function() {
this._unMounted = !0, this._unsub && this._unsub(), this.teardown();
}
}, {
key: "pauseTransfer",
value: function() {
this._bridge && this._bridge.pause();
}
}, {
key: "resumeTransfer",
value: function() {
this._bridge && this._bridge.resume();
}
}, {
key: "reload",
value: function() {
this._unsub && this._unsub(), this.teardown(), this._unMounted || this.setState({
loading: !0
}, this.props.reload);
}
}, {
key: "getNewSelection",
value: function() {
this._bridge && this.props.getNewSelection && this.props.getNewSelection(this._bridge);
}
}, {
key: "hideHighlight",
value: function() {
this._store.hideHighlight();
}
}, {
key: "sendSelection",
value: function(id) {
this._bridge && (id || this._store.selected) && (invariant(this.props.selectElement, "cannot send selection if props.selectElement is not defined"),
this.props.selectElement(id || this._store.selected, this._bridge));
}
}, {
key: "viewComponentSource",
value: function(id) {
var _this3 = this;
this._bridge && (this._bridge.send("putSelectedInstance", id), setTimeout(function() {
invariant(_this3.props.showComponentSource, "cannot view source if props.showComponentSource is not supplied"),
_this3.props.showComponentSource("__REACT_DEVTOOLS_GLOBAL_HOOK__.$inst", "__REACT_DEVTOOLS_GLOBAL_HOOK__.$type");
}, 100));
}
}, {
key: "viewElementSource",
value: function(id, source) {
var _this4 = this;
this._bridge && (this._bridge.send("putSelectedInstance", id), setTimeout(function() {
invariant(_this4.props.showElementSource, "cannot view source if props.showElementSource is not supplied"),
_this4.props.showElementSource(source);
}, 100));
}
}, {
key: "teardown",
value: function() {
this.plugins.forEach(function(p) {
return p.teardown();
}), this.plugins = [], this._keyListener && (window.removeEventListener("keydown", this._keyListener),
this._keyListener = null), this._bridge && this._bridge.send("shutdown"), this._teardownWall && (this._teardownWall(),
this._teardownWall = null);
}
}, {
key: "inject",
value: function() {
var _this5 = this;
this.props.inject(function(wall, teardown) {
_this5._teardownWall = teardown, _this5._bridge = new Bridge(wall), _this5._themeStore = new ThemeStore(_this5.state.themeName),
_this5._store = new Store(_this5._bridge, _this5._themeStore);
var refresh = function() {
return _this5.forceUpdate();
};
_this5.plugins = [ new RelayPlugin(_this5._store, _this5._bridge, refresh) ], _this5._keyListener = keyboardNav(_this5._store, window),
window.addEventListener("keydown", _this5._keyListener), _this5._store.on("connected", function() {
_this5.setState({
loading: !1,
themeName: _this5._themeStore.themeName
}), _this5.getNewSelection();
}), _this5._store.on("preferencesPanelShown", function() {
_this5.setState({
preferencesPanelShown: _this5._store.preferencesPanelShown
});
}), _this5._store.on("theme", function() {
_this5.setState(function(state) {
return {
themeKey: state.themeKey + 1,
themeName: _this5._themeStore.theme.displayName
};
});
});
});
}
}, {
key: "componentDidUpdate",
value: function() {
var _this6 = this;
this.state.isReact || this._checkTimeout || (this._checkTimeout = setTimeout(function() {
_this6._checkTimeout = null, _this6.lookForReact();
}, 200));
}
}, {
key: "lookForReact",
value: function() {
var _this7 = this;
"function" == typeof this.props.checkForReact && this.props.checkForReact(function(isReact) {
isReact ? (_this7.setState({
isReact: !0,
loading: !0
}), _this7.inject()) : (console.log("still looking..."), _this7.setState({
isReact: !1,
loading: !1
}));
});
}
}, {
key: "render",
value: function() {
var _ref, _this8 = this, theme = this._store ? this._themeStore.theme : Themes.ChromeDefault;
if (this.state.loading) return React.createElement("div", {
style: loadingStyle(theme)
}, React.createElement("h2", null, "Connecting to React…"));
if (!this.state.isReact) return React.createElement("div", {
style: loadingStyle(theme)
}, React.createElement("h2", null, "Looking for React…"));
var extraTabs = assign.apply(null, [ {} ].concat(this.plugins.map(function(p) {
return p.tabs();
}))), extraPanes = (_ref = []).concat.apply(_ref, _toConsumableArray(this.plugins.map(function(p) {
return p.panes();
})));
return this._store.capabilities.rnStyle && extraPanes.push(panelRNStyle(this._bridge, this._store.capabilities.rnStyleMeasure, theme)),
React.createElement(Container, {
key: this.state.themeKey,
reload: this.props.reload && this.reload.bind(this),
menuItems: {
attr: function(id, node, val, path) {
if (val && "Composite" === node.get("nodeType") && "function" === val[consts.type]) return [ _this8.props.showAttrSource && {
key: "showSource",
title: "Show function source",
action: function() {
return _this8.props.showAttrSource(path);
}
}, _this8.props.executeFn && {
key: "executeFunction",
title: "Execute function",
action: function() {
return _this8.props.executeFn(path);
}
} ];
},
tree: function(id, node) {
return [ _this8.props.selectElement && _this8._store.capabilities.dom && {
key: "findDOMNode",
title: "Find the DOM node",
action: function() {
return _this8.sendSelection(id);
}
}, _this8.props.showComponentSource && "Composite" === node.get("nodeType") && {
key: "showComponentSource",
title: "Show " + node.get("name") + " source",
action: function() {
return _this8.viewComponentSource(id);
}
}, _this8.props.showElementSource && node.get("source") && {
key: "showElementSource",
title: "Show <" + node.get("name") + " /> in source",
action: function() {
return _this8.viewElementSource(id, node.get("source"));
}
} ];
}
},
extraPanes: extraPanes,
extraTabs: extraTabs,
preferencesPanelShown: this.state.preferencesPanelShown,
theme: theme,
onViewElementSource: this.props.showElementSource ? this.viewElementSource.bind(this) : null
});
}
} ]), Panel;
}(React.Component);
Panel.childContextTypes = {
browserName: React.PropTypes.string.isRequired,
defaultThemeName: React.PropTypes.string.isRequired,
showHiddenThemes: React.PropTypes.bool.isRequired,
showInspectButton: React.PropTypes.bool.isRequired,
store: React.PropTypes.object,
theme: React.PropTypes.object.isRequired,
themeName: React.PropTypes.string.isRequired,
themes: React.PropTypes.object.isRequired
};
var panelRNStyle = function(bridge, supportsMeasure, theme) {
return function(node, id) {
var props = node.get("props");
return props && props.style ? React.createElement("div", {
key: "rnstyle",
style: containerStyle(theme)
}, React.createElement("strong", null, "React Native Style Editor"), React.createElement(NativeStyler, {
id: id,
bridge: bridge,
supportsMeasure: supportsMeasure
})) : React.createElement("div", {
key: "rnstyle",
style: containerStyle(theme)
}, React.createElement("strong", null, "No style"));
};
}, containerStyle = function(theme) {
return {
borderTop: "1px solid " + theme.base01,
padding: "0.25rem",
marginBottom: "0.25rem",
flexShrink: 0
};
}, loadingStyle = function(theme) {
return {
fontFamily: sansSerif.family,
fontSize: sansSerif.sizes.large,
textAlign: "center",
padding: 30,
flex: 1,
color: "#aaa"
};
};
module.exports = Panel;
}, function(module, exports, __webpack_require__) {
"use strict";
module.exports = __webpack_require__(7);
}, function(module, exports, __webpack_require__) {
"use strict";
var _assign = __webpack_require__(8), ReactChildren = __webpack_require__(9), ReactComponent = __webpack_require__(22), ReactPureComponent = __webpack_require__(25), ReactClass = __webpack_require__(26), ReactDOMFactories = __webpack_require__(28), ReactElement = __webpack_require__(13), ReactPropTypes = __webpack_require__(29), ReactVersion = __webpack_require__(31), onlyChild = __webpack_require__(32), createElement = (__webpack_require__(15),
ReactElement.createElement), createFactory = ReactElement.createFactory, cloneElement = ReactElement.cloneElement, __spread = _assign, React = {
Children: {
map: ReactChildren.map,
forEach: ReactChildren.forEach,
count: ReactChildren.count,
toArray: ReactChildren.toArray,
only: onlyChild
},
Component: ReactComponent,
PureComponent: ReactPureComponent,
createElement: createElement,
cloneElement: cloneElement,
isValidElement: ReactElement.isValidElement,
PropTypes: ReactPropTypes,
createClass: ReactClass.createClass,
createFactory: createFactory,
createMixin: function(mixin) {
return mixin;
},
DOM: ReactDOMFactories,
version: ReactVersion,
__spread: __spread
};
module.exports = React;
}, function(module, exports) {
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
"use strict";
function toObject(val) {
if (null === val || void 0 === val) throw new TypeError("Object.assign cannot be called with null or undefined");
return Object(val);
}
function shouldUseNative() {
try {
if (!Object.assign) return !1;
var test1 = new String("abc");
if (test1[5] = "de", "5" === Object.getOwnPropertyNames(test1)[0]) return !1;
for (var test2 = {}, i = 0; i < 10; i++) test2["_" + String.fromCharCode(i)] = i;
var order2 = Object.getOwnPropertyNames(test2).map(function(n) {
return test2[n];
});
if ("0123456789" !== order2.join("")) return !1;
var test3 = {};
return "abcdefghijklmnopqrst".split("").forEach(function(letter) {
test3[letter] = letter;
}), "abcdefghijklmnopqrst" === Object.keys(Object.assign({}, test3)).join("");
} catch (err) {
return !1;
}
}
var getOwnPropertySymbols = Object.getOwnPropertySymbols, hasOwnProperty = Object.prototype.hasOwnProperty, propIsEnumerable = Object.prototype.propertyIsEnumerable;
module.exports = shouldUseNative() ? Object.assign : function(target, source) {
for (var from, symbols, to = toObject(target), s = 1; s < arguments.length; s++) {
from = Object(arguments[s]);
for (var key in from) hasOwnProperty.call(from, key) && (to[key] = from[key]);
if (getOwnPropertySymbols) {
symbols = getOwnPropertySymbols(from);
for (var i = 0; i < symbols.length; i++) propIsEnumerable.call(from, symbols[i]) && (to[symbols[i]] = from[symbols[i]]);
}
}
return to;
};
}, function(module, exports, __webpack_require__) {
"use strict";
function escapeUserProvidedKey(text) {
return ("" + text).replace(userProvidedKeyEscapeRegex, "$&/");
}
function ForEachBookKeeping(forEachFunction, forEachContext) {
this.func = forEachFunction, this.context = forEachContext, this.count = 0;
}
function forEachSingleChild(bookKeeping, child, name) {
var func = bookKeeping.func, context = bookKeeping.context;
func.call(context, child, bookKeeping.count++);
}
function forEachChildren(children, forEachFunc, forEachContext) {
if (null == children) return children;
var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext);
traverseAllChildren(children, forEachSingleChild, traverseContext), ForEachBookKeeping.release(traverseContext);
}
function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) {
this.result = mapResult, this.keyPrefix = keyPrefix, this.func = mapFunction, this.context = mapContext,
this.count = 0;
}
function mapSingleChildIntoContext(bookKeeping, child, childKey) {
var result = bookKeeping.result, keyPrefix = bookKeeping.keyPrefix, func = bookKeeping.func, context = bookKeeping.context, mappedChild = func.call(context, child, bookKeeping.count++);
Array.isArray(mappedChild) ? mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument) : null != mappedChild && (ReactElement.isValidElement(mappedChild) && (mappedChild = ReactElement.cloneAndReplaceKey(mappedChild, keyPrefix + (!mappedChild.key || child && child.key === mappedChild.key ? "" : escapeUserProvidedKey(mappedChild.key) + "/") + childKey)),
result.push(mappedChild));
}
function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
var escapedPrefix = "";
null != prefix && (escapedPrefix = escapeUserProvidedKey(prefix) + "/");
var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context);
traverseAllChildren(children, mapSingleChildIntoContext, traverseContext), MapBookKeeping.release(traverseContext);
}
function mapChildren(children, func, context) {
if (null == children) return children;
var result = [];
return mapIntoWithKeyPrefixInternal(children, result, null, func, context), result;
}
function forEachSingleChildDummy(traverseContext, child, name) {
return null;
}
function countChildren(children, context) {
return traverseAllChildren(children, forEachSingleChildDummy, null);
}
function toArray(children) {
var result = [];
return mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument),
result;
}
var PooledClass = __webpack_require__(10), ReactElement = __webpack_require__(13), emptyFunction = __webpack_require__(16), traverseAllChildren = __webpack_require__(19), twoArgumentPooler = PooledClass.twoArgumentPooler, fourArgumentPooler = PooledClass.fourArgumentPooler, userProvidedKeyEscapeRegex = /\/+/g;
ForEachBookKeeping.prototype.destructor = function() {
this.func = null, this.context = null, this.count = 0;
}, PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler), MapBookKeeping.prototype.destructor = function() {
this.result = null, this.keyPrefix = null, this.func = null, this.context = null,
this.count = 0;
}, PooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler);
var ReactChildren = {
forEach: forEachChildren,
map: mapChildren,
mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal,
count: countChildren,
toArray: toArray
};
module.exports = ReactChildren;
}, function(module, exports, __webpack_require__) {
"use strict";
var _prodInvariant = __webpack_require__(11), oneArgumentPooler = (__webpack_require__(12),
function(copyFieldsFrom) {
var Klass = this;
if (Klass.instancePool.length) {
var instance = Klass.instancePool.pop();
return Klass.call(instance, copyFieldsFrom), instance;
}
return new Klass(copyFieldsFrom);
}), twoArgumentPooler = function(a1, a2) {
var Klass = this;
if (Klass.instancePool.length) {
var instance = Klass.instancePool.pop();
return Klass.call(instance, a1, a2), instance;
}
return new Klass(a1, a2);
}, threeArgumentPooler = function(a1, a2, a3) {
var Klass = this;
if (Klass.instancePool.length) {
var instance = Klass.instancePool.pop();
return Klass.call(instance, a1, a2, a3), instance;
}
return new Klass(a1, a2, a3);
}, fourArgumentPooler = function(a1, a2, a3, a4) {
var Klass = this;
if (Klass.instancePool.length) {
var instance = Klass.instancePool.pop();
return Klass.call(instance, a1, a2, a3, a4), instance;
}
return new Klass(a1, a2, a3, a4);
}, standardReleaser = function(instance) {
var Klass = this;
instance instanceof Klass ? void 0 : _prodInvariant("25"), instance.destructor(),
Klass.instancePool.length < Klass.poolSize && Klass.instancePool.push(instance);
}, DEFAULT_POOL_SIZE = 10, DEFAULT_POOLER = oneArgumentPooler, addPoolingTo = function(CopyConstructor, pooler) {
var NewKlass = CopyConstructor;
return NewKlass.instancePool = [], NewKlass.getPooled = pooler || DEFAULT_POOLER,
NewKlass.poolSize || (NewKlass.poolSize = DEFAULT_POOL_SIZE), NewKlass.release = standardReleaser,
NewKlass;
}, PooledClass = {
addPoolingTo: addPoolingTo,
oneArgumentPooler: oneArgumentPooler,
twoArgumentPooler: twoArgumentPooler,
threeArgumentPooler: threeArgumentPooler,
fourArgumentPooler: fourArgumentPooler
};
module.exports = PooledClass;
}, function(module, exports) {
"use strict";
function reactProdInvariant(code) {
for (var argCount = arguments.length - 1, message = "Minified React error #" + code + "; visit http://facebook.github.io/react/docs/error-decoder.html?invariant=" + code, argIdx = 0; argIdx < argCount; argIdx++) message += "&args[]=" + encodeURIComponent(arguments[argIdx + 1]);
message += " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
var error = new Error(message);
throw error.name = "Invariant Violation", error.framesToPop = 1, error;
}
module.exports = reactProdInvariant;
}, function(module, exports, __webpack_require__) {
"use strict";
function invariant(condition, format, a, b, c, d, e, f) {
if (validateFormat(format), !condition) {
var error;
if (void 0 === format) error = new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."); else {
var args = [ a, b, c, d, e, f ], argIndex = 0;
error = new Error(format.replace(/%s/g, function() {
return args[argIndex++];
})), error.name = "Invariant Violation";
}
throw error.framesToPop = 1, error;
}
}
var validateFormat = function(format) {};
module.exports = invariant;
}, function(module, exports, __webpack_require__) {
"use strict";
function hasValidRef(config) {
return void 0 !== config.ref;
}
function hasValidKey(config) {
return void 0 !== config.key;
}
var _assign = __webpack_require__(8), ReactCurrentOwner = __webpack_require__(14), hasOwnProperty = (__webpack_require__(15),
__webpack_require__(17), Object.prototype.hasOwnProperty), REACT_ELEMENT_TYPE = __webpack_require__(18), RESERVED_PROPS = {
key: !0,
ref: !0,
__self: !0,
__source: !0
}, ReactElement = function(type, key, ref, self, source, owner, props) {
var element = {
$$typeof: REACT_ELEMENT_TYPE,
type: type,
key: key,
ref: ref,
props: props,
_owner: owner
};
return element;
};
ReactElement.createElement = function(type, config, children) {
var propName, props = {}, key = null, ref = null, self = null, source = null;
if (null != config) {
hasValidRef(config) && (ref = config.ref), hasValidKey(config) && (key = "" + config.key),
self = void 0 === config.__self ? null : config.__self, source = void 0 === config.__source ? null : config.__source;
for (propName in config) hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName) && (props[propName] = config[propName]);
}
var childrenLength = arguments.length - 2;
if (1 === childrenLength) props.children = children; else if (childrenLength > 1) {
for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++) childArray[i] = arguments[i + 2];
props.children = childArray;
}
if (type && type.defaultProps) {
var defaultProps = type.defaultProps;
for (propName in defaultProps) void 0 === props[propName] && (props[propName] = defaultProps[propName]);
}
return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
}, ReactElement.createFactory = function(type) {
var factory = ReactElement.createElement.bind(null, type);
return factory.type = type, factory;
}, ReactElement.cloneAndReplaceKey = function(oldElement, newKey) {
var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
return newElement;
}, ReactElement.cloneElement = function(element, config, children) {
var propName, props = _assign({}, element.props), key = element.key, ref = element.ref, self = element._self, source = element._source, owner = element._owner;
if (null != config) {
hasValidRef(config) && (ref = config.ref, owner = ReactCurrentOwner.current), hasValidKey(config) && (key = "" + config.key);
var defaultProps;
element.type && element.type.defaultProps && (defaultProps = element.type.defaultProps);
for (propName in config) hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName) && (void 0 === config[propName] && void 0 !== defaultProps ? props[propName] = defaultProps[propName] : props[propName] = config[propName]);
}
var childrenLength = arguments.length - 2;
if (1 === childrenLength) props.children = children; else if (childrenLength > 1) {
for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++) childArray[i] = arguments[i + 2];
props.children = childArray;
}
return ReactElement(element.type, key, ref, self, source, owner, props);
}, ReactElement.isValidElement = function(object) {
return "object" == typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
}, module.exports = ReactElement;
}, function(module, exports) {
"use strict";
var ReactCurrentOwner = {
current: null
};
module.exports = ReactCurrentOwner;
}, function(module, exports, __webpack_require__) {
"use strict";
var emptyFunction = __webpack_require__(16), warning = emptyFunction;
module.exports = warning;
}, function(module, exports) {
"use strict";
function makeEmptyFunction(arg) {
return function() {
return arg;
};
}
var emptyFunction = function() {};
emptyFunction.thatReturns = makeEmptyFunction, emptyFunction.thatReturnsFalse = makeEmptyFunction(!1),
emptyFunction.thatReturnsTrue = makeEmptyFunction(!0), emptyFunction.thatReturnsNull = makeEmptyFunction(null),
emptyFunction.thatReturnsThis = function() {
return this;
}, emptyFunction.thatReturnsArgument = function(arg) {
return arg;
}, module.exports = emptyFunction;
}, function(module, exports, __webpack_require__) {
"use strict";
var canDefineProperty = !1;
module.exports = canDefineProperty;
}, function(module, exports) {
"use strict";
var REACT_ELEMENT_TYPE = "function" == typeof Symbol && Symbol["for"] && Symbol["for"]("react.element") || 60103;
module.exports = REACT_ELEMENT_TYPE;
}, function(module, exports, __webpack_require__) {
"use strict";
function getComponentKey(component, index) {
return component && "object" == typeof component && null != component.key ? KeyEscapeUtils.escape(component.key) : index.toString(36);
}
function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
var type = typeof children;
if ("undefined" !== type && "boolean" !== type || (children = null), null === children || "string" === type || "number" === type || "object" === type && children.$$typeof === REACT_ELEMENT_TYPE) return callback(traverseContext, children, "" === nameSoFar ? SEPARATOR + getComponentKey(children, 0) : nameSoFar),
1;
var child, nextName, subtreeCount = 0, nextNamePrefix = "" === nameSoFar ? SEPARATOR : nameSoFar + SUBSEPARATOR;
if (Array.isArray(children)) for (var i = 0; i < children.length; i++) child = children[i],
nextName = nextNamePrefix + getComponentKey(child, i), subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); else {
var iteratorFn = getIteratorFn(children);
if (iteratorFn) {
var step, iterator = iteratorFn.call(children);
if (iteratorFn !== children.entries) for (var ii = 0; !(step = iterator.next()).done; ) child = step.value,
nextName = nextNamePrefix + getComponentKey(child, ii++), subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); else for (;!(step = iterator.next()).done; ) {
var entry = step.value;
entry && (child = entry[1], nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0),
subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext));
}
} else if ("object" === type) {
var addendum = "", childrenString = String(children);
_prodInvariant("31", "[object Object]" === childrenString ? "object with keys {" + Object.keys(children).join(", ") + "}" : childrenString, addendum);
}
}
return subtreeCount;
}
function traverseAllChildren(children, callback, traverseContext) {
return null == children ? 0 : traverseAllChildrenImpl(children, "", callback, traverseContext);
}
var _prodInvariant = __webpack_require__(11), REACT_ELEMENT_TYPE = (__webpack_require__(14),
__webpack_require__(18)), getIteratorFn = __webpack_require__(20), KeyEscapeUtils = (__webpack_require__(12),
__webpack_require__(21)), SEPARATOR = (__webpack_require__(15), "."), SUBSEPARATOR = ":";
module.exports = traverseAllChildren;
}, function(module, exports) {
"use strict";
function getIteratorFn(maybeIterable) {
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
if ("function" == typeof iteratorFn) return iteratorFn;
}
var ITERATOR_SYMBOL = "function" == typeof Symbol && Symbol.iterator, FAUX_ITERATOR_SYMBOL = "@@iterator";
module.exports = getIteratorFn;
}, function(module, exports) {
"use strict";
function escape(key) {
var escapeRegex = /[=:]/g, escaperLookup = {
"=": "=0",
":": "=2"
}, escapedString = ("" + key).replace(escapeRegex, function(match) {
return escaperLookup[match];
});
return "$" + escapedString;
}
function unescape(key) {
var unescapeRegex = /(=0|=2)/g, unescaperLookup = {
"=0": "=",
"=2": ":"
}, keySubstring = "." === key[0] && "$" === key[1] ? key.substring(2) : key.substring(1);
return ("" + keySubstring).replace(unescapeRegex, function(match) {
return unescaperLookup[match];
});
}
var KeyEscapeUtils = {
escape: escape,
unescape: unescape
};
module.exports = KeyEscapeUtils;
}, function(module, exports, __webpack_require__) {
"use strict";
function ReactComponent(props, context, updater) {
this.props = props, this.context = context, this.refs = emptyObject, this.updater = updater || ReactNoopUpdateQueue;
}
var _prodInvariant = __webpack_require__(11), ReactNoopUpdateQueue = __webpack_require__(23), emptyObject = (__webpack_require__(17),
__webpack_require__(24));
__webpack_require__(12), __webpack_require__(15);
ReactComponent.prototype.isReactComponent = {}, ReactComponent.prototype.setState = function(partialState, callback) {
"object" != typeof partialState && "function" != typeof partialState && null != partialState ? _prodInvariant("85") : void 0,
this.updater.enqueueSetState(this, partialState), callback && this.updater.enqueueCallback(this, callback, "setState");
}, ReactComponent.prototype.forceUpdate = function(callback) {
this.updater.enqueueForceUpdate(this), callback && this.updater.enqueueCallback(this, callback, "forceUpdate");
};
module.exports = ReactComponent;
}, function(module, exports, __webpack_require__) {
"use strict";
function warnNoop(publicInstance, callerName) {
}
var ReactNoopUpdateQueue = (__webpack_require__(15), {
isMounted: function(publicInstance) {
return !1;
},
enqueueCallback: function(publicInstance, callback) {},
enqueueForceUpdate: function(publicInstance) {
warnNoop(publicInstance, "forceUpdate");
},
enqueueReplaceState: function(publicInstance, completeState) {
warnNoop(publicInstance, "replaceState");
},
enqueueSetState: function(publicInstance, partialState) {
warnNoop(publicInstance, "setState");
}
});
module.exports = ReactNoopUpdateQueue;
}, function(module, exports, __webpack_require__) {
"use strict";
var emptyObject = {};
module.exports = emptyObject;
}, function(module, exports, __webpack_require__) {
"use strict";
function ReactPureComponent(props, context, updater) {
this.props = props, this.context = context, this.refs = emptyObject, this.updater = updater || ReactNoopUpdateQueue;
}
function ComponentDummy() {}
var _assign = __webpack_require__(8), ReactComponent = __webpack_require__(22), ReactNoopUpdateQueue = __webpack_require__(23), emptyObject = __webpack_require__(24);
ComponentDummy.prototype = ReactComponent.prototype, ReactPureComponent.prototype = new ComponentDummy(),
ReactPureComponent.prototype.constructor = ReactPureComponent, _assign(ReactPureComponent.prototype, ReactComponent.prototype),
ReactPureComponent.prototype.isPureReactComponent = !0, module.exports = ReactPureComponent;
}, function(module, exports, __webpack_require__) {
"use strict";
function identity(fn) {
return fn;
}
function validateMethodOverride(isAlreadyDefined, name) {
var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null;
ReactClassMixin.hasOwnProperty(name) && ("OVERRIDE_BASE" !== specPolicy ? _prodInvariant("73", name) : void 0),
isAlreadyDefined && ("DEFINE_MANY" !== specPolicy && "DEFINE_MANY_MERGED" !== specPolicy ? _prodInvariant("74", name) : void 0);
}
function mixSpecIntoComponent(Constructor, spec) {
if (spec) {
"function" == typeof spec ? _prodInvariant("75") : void 0, ReactElement.isValidElement(spec) ? _prodInvariant("76") : void 0;
var proto = Constructor.prototype, autoBindPairs = proto.__reactAutoBindPairs;
spec.hasOwnProperty(MIXINS_KEY) && RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);
for (var name in spec) if (spec.hasOwnProperty(name) && name !== MIXINS_KEY) {
var property = spec[name], isAlreadyDefined = proto.hasOwnProperty(name);
if (validateMethodOverride(isAlreadyDefined, name), RESERVED_SPEC_KEYS.hasOwnProperty(name)) RESERVED_SPEC_KEYS[name](Constructor, property); else {
var isReactClassMethod = ReactClassInterface.hasOwnProperty(name), isFunction = "function" == typeof property, shouldAutoBind = isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== !1;
if (shouldAutoBind) autoBindPairs.push(name, property), proto[name] = property; else if (isAlreadyDefined) {
var specPolicy = ReactClassInterface[name];
!isReactClassMethod || "DEFINE_MANY_MERGED" !== specPolicy && "DEFINE_MANY" !== specPolicy ? _prodInvariant("77", specPolicy, name) : void 0,
"DEFINE_MANY_MERGED" === specPolicy ? proto[name] = createMergedResultFunction(proto[name], property) : "DEFINE_MANY" === specPolicy && (proto[name] = createChainedFunction(proto[name], property));
} else proto[name] = property;
}
}
} else ;
}
function mixStaticSpecIntoComponent(Constructor, statics) {
if (statics) for (var name in statics) {
var property = statics[name];
if (statics.hasOwnProperty(name)) {
var isReserved = name in RESERVED_SPEC_KEYS;
isReserved ? _prodInvariant("78", name) : void 0;
var isInherited = name in Constructor;
isInherited ? _prodInvariant("79", name) : void 0, Constructor[name] = property;
}
}
}
function mergeIntoWithNoDuplicateKeys(one, two) {
one && two && "object" == typeof one && "object" == typeof two ? void 0 : _prodInvariant("80");
for (var key in two) two.hasOwnProperty(key) && (void 0 !== one[key] ? _prodInvariant("81", key) : void 0,
one[key] = two[key]);
return one;
}
function createMergedResultFunction(one, two) {
return function() {
var a = one.apply(this, arguments), b = two.apply(this, arguments);
if (null == a) return b;
if (null == b) return a;
var c = {};
return mergeIntoWithNoDuplicateKeys(c, a), mergeIntoWithNoDuplicateKeys(c, b), c;
};
}
function createChainedFunction(one, two) {
return function() {
one.apply(this, arguments), two.apply(this, arguments);
};
}
function bindAutoBindMethod(component, method) {
var boundMethod = method.bind(component);
return boundMethod;
}
function bindAutoBindMethods(component) {
for (var pairs = component.__reactAutoBindPairs, i = 0; i < pairs.length; i += 2) {
var autoBindKey = pairs[i], method = pairs[i + 1];
component[autoBindKey] = bindAutoBindMethod(component, method);
}
}
var _prodInvariant = __webpack_require__(11), _assign = __webpack_require__(8), ReactComponent = __webpack_require__(22), ReactElement = __webpack_require__(13), ReactNoopUpdateQueue = (__webpack_require__(27),
__webpack_require__(23)), emptyObject = __webpack_require__(24), MIXINS_KEY = (__webpack_require__(12),
__webpack_require__(15), "mixins"), injectedMixins = [], ReactClassInterface = {
mixins: "DEFINE_MANY",
statics: "DEFINE_MANY",
propTypes: "DEFINE_MANY",
contextTypes: "DEFINE_MANY",
childContextTypes: "DEFINE_MANY",
getDefaultProps: "DEFINE_MANY_MERGED",
getInitialState: "DEFINE_MANY_MERGED",
getChildContext: "DEFINE_MANY_MERGED",
render: "DEFINE_ONCE",
componentWillMount: "DEFINE_MANY",
componentDidMount: "DEFINE_MANY",
componentWillReceiveProps: "DEFINE_MANY",
shouldComponentUpdate: "DEFINE_ONCE",
componentWillUpdate: "DEFINE_MANY",
componentDidUpdate: "DEFINE_MANY",
componentWillUnmount: "DEFINE_MANY",
updateComponent: "OVERRIDE_BASE"
}, RESERVED_SPEC_KEYS = {
displayName: function(Constructor, displayName) {
Constructor.displayName = displayName;
},
mixins: function(Constructor, mixins) {
if (mixins) for (var i = 0; i < mixins.length; i++) mixSpecIntoComponent(Constructor, mixins[i]);
},
childContextTypes: function(Constructor, childContextTypes) {
Constructor.childContextTypes = _assign({}, Constructor.childContextTypes, childContextTypes);
},
contextTypes: function(Constructor, contextTypes) {
Constructor.contextTypes = _assign({}, Constructor.contextTypes, contextTypes);
},
getDefaultProps: function(Constructor, getDefaultProps) {
Constructor.getDefaultProps ? Constructor.getDefaultProps = createMergedResultFunction(Constructor.getDefaultProps, getDefaultProps) : Constructor.getDefaultProps = getDefaultProps;
},
propTypes: function(Constructor, propTypes) {
Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);
},
statics: function(Constructor, statics) {
mixStaticSpecIntoComponent(Constructor, statics);
},
autobind: function() {}
}, ReactClassMixin = {
replaceState: function(newState, callback) {
this.updater.enqueueReplaceState(this, newState), callback && this.updater.enqueueCallback(this, callback, "replaceState");
},
isMounted: function() {
return this.updater.isMounted(this);
}
}, ReactClassComponent = function() {};
_assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin);
var ReactClass = {
createClass: function(spec) {
var Constructor = identity(function(props, context, updater) {
this.__reactAutoBindPairs.length && bindAutoBindMethods(this), this.props = props,
this.context = context, this.refs = emptyObject, this.updater = updater || ReactNoopUpdateQueue,
this.state = null;
var initialState = this.getInitialState ? this.getInitialState() : null;
"object" != typeof initialState || Array.isArray(initialState) ? _prodInvariant("82", Constructor.displayName || "ReactCompositeComponent") : void 0,
this.state = initialState;
});
Constructor.prototype = new ReactClassComponent(), Constructor.prototype.constructor = Constructor,
Constructor.prototype.__reactAutoBindPairs = [], injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor)),
mixSpecIntoComponent(Constructor, spec), Constructor.getDefaultProps && (Constructor.defaultProps = Constructor.getDefaultProps()),
Constructor.prototype.render ? void 0 : _prodInvariant("83");
for (var methodName in ReactClassInterface) Constructor.prototype[methodName] || (Constructor.prototype[methodName] = null);
return Constructor;
},
injection: {
injectMixin: function(mixin) {
injectedMixins.push(mixin);
}
}
};
module.exports = ReactClass;
}, function(module, exports, __webpack_require__) {
"use strict";
var ReactPropTypeLocationNames = {};
module.exports = ReactPropTypeLocationNames;
}, function(module, exports, __webpack_require__) {
"use strict";
var ReactElement = __webpack_require__(13), createDOMFactory = ReactElement.createFactory, ReactDOMFactories = {
a: createDOMFactory("a"),
abbr: createDOMFactory("abbr"),
address: createDOMFactory("address"),
area: createDOMFactory("area"),
article: createDOMFactory("article"),
aside: createDOMFactory("aside"),
audio: createDOMFactory("audio"),
b: createDOMFactory("b"),
base: createDOMFactory("base"),
bdi: createDOMFactory("bdi"),
bdo: createDOMFactory("bdo"),
big: createDOMFactory("big"),
blockquote: createDOMFactory("blockquote"),
body: createDOMFactory("body"),
br: createDOMFactory("br"),
button: createDOMFactory("button"),
canvas: createDOMFactory("canvas"),
caption: createDOMFactory("caption"),
cite: createDOMFactory("cite"),
code: createDOMFactory("code"),
col: createDOMFactory("col"),
colgroup: createDOMFactory("colgroup"),
data: createDOMFactory("data"),
datalist: createDOMFactory("datalist"),
dd: createDOMFactory("dd"),
del: createDOMFactory("del"),
details: createDOMFactory("details"),
dfn: createDOMFactory("dfn"),
dialog: createDOMFactory("dialog"),
div: createDOMFactory("div"),
dl: createDOMFactory("dl"),
dt: createDOMFactory("dt"),
em: createDOMFactory("em"),
embed: createDOMFactory("embed"),
fieldset: createDOMFactory("fieldset"),
figcaption: createDOMFactory("figcaption"),
figure: createDOMFactory("figure"),
footer: createDOMFactory("footer"),
form: createDOMFactory("form"),
h1: createDOMFactory("h1"),
h2: createDOMFactory("h2"),
h3: createDOMFactory("h3"),
h4: createDOMFactory("h4"),
h5: createDOMFactory("h5"),
h6: createDOMFactory("h6"),
head: createDOMFactory("head"),
header: createDOMFactory("header"),
hgroup: createDOMFactory("hgroup"),
hr: createDOMFactory("hr"),
html: createDOMFactory("html"),
i: createDOMFactory("i"),
iframe: createDOMFactory("iframe"),
img: createDOMFactory("img"),
input: createDOMFactory("input"),
ins: createDOMFactory("ins"),
kbd: createDOMFactory("kbd"),
keygen: createDOMFactory("keygen"),
label: createDOMFactory("label"),
legend: createDOMFactory("legend"),
li: createDOMFactory("li"),
link: createDOMFactory("link"),
main: createDOMFactory("main"),
map: createDOMFactory("map"),
mark: createDOMFactory("mark"),
menu: createDOMFactory("menu"),
menuitem: createDOMFactory("menuitem"),
meta: createDOMFactory("meta"),
meter: createDOMFactory("meter"),
nav: createDOMFactory("nav"),
noscript: createDOMFactory("noscript"),
object: createDOMFactory("object"),
ol: createDOMFactory("ol"),
optgroup: createDOMFactory("optgroup"),
option: createDOMFactory("option"),
output: createDOMFactory("output"),
p: createDOMFactory("p"),
param: createDOMFactory("param"),
picture: createDOMFactory("picture"),
pre: createDOMFactory("pre"),
progress: createDOMFactory("progress"),
q: createDOMFactory("q"),
rp: createDOMFactory("rp"),
rt: createDOMFactory("rt"),
ruby: createDOMFactory("ruby"),
s: createDOMFactory("s"),
samp: createDOMFactory("samp"),
script: createDOMFactory("script"),
section: createDOMFactory("section"),
select: createDOMFactory("select"),
small: createDOMFactory("small"),
source: createDOMFactory("source"),
span: createDOMFactory("span"),
strong: createDOMFactory("strong"),
style: createDOMFactory("style"),
sub: createDOMFactory("sub"),
summary: createDOMFactory("summary"),
sup: createDOMFactory("sup"),
table: createDOMFactory("table"),
tbody: createDOMFactory("tbody"),
td: createDOMFactory("td"),
textarea: createDOMFactory("textarea"),
tfoot: createDOMFactory("tfoot"),
th: createDOMFactory("th"),
thead: createDOMFactory("thead"),
time: createDOMFactory("time"),
title: createDOMFactory("title"),
tr: createDOMFactory("tr"),
track: createDOMFactory("track"),
u: createDOMFactory("u"),
ul: createDOMFactory("ul"),
"var": createDOMFactory("var"),
video: createDOMFactory("video"),
wbr: createDOMFactory("wbr"),
circle: createDOMFactory("circle"),
clipPath: createDOMFactory("clipPath"),
defs: createDOMFactory("defs"),
ellipse: createDOMFactory("ellipse"),
g: createDOMFactory("g"),
image: createDOMFactory("image"),
line: createDOMFactory("line"),
linearGradient: createDOMFactory("linearGradient"),
mask: createDOMFactory("mask"),
path: createDOMFactory("path"),
pattern: createDOMFactory("pattern"),
polygon: createDOMFactory("polygon"),
polyline: createDOMFactory("polyline"),
radialGradient: createDOMFactory("radialGradient"),
rect: createDOMFactory("rect"),
stop: createDOMFactory("stop"),
svg: createDOMFactory("svg"),
text: createDOMFactory("text"),
tspan: createDOMFactory("tspan")
};
module.exports = ReactDOMFactories;
}, function(module, exports, __webpack_require__) {
"use strict";
function is(x, y) {
return x === y ? 0 !== x || 1 / x === 1 / y : x !== x && y !== y;
}
function PropTypeError(message) {
this.message = message, this.stack = "";
}
function createChainableTypeChecker(validate) {
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
componentName = componentName || ANONYMOUS, propFullName = propFullName || propName;
if (null == props[propName]) {
var locationName = ReactPropTypeLocationNames[location];
return isRequired ? new PropTypeError(null === props[propName] ? "The " + locationName + " `" + propFullName + "` is marked as required " + ("in `" + componentName + "`, but its value is `null`.") : "The " + locationName + " `" + propFullName + "` is marked as required in " + ("`" + componentName + "`, but its value is `undefined`.")) : null;
}
return validate(props, propName, componentName, location, propFullName);
}
var chainedCheckType = checkType.bind(null, !1);
return chainedCheckType.isRequired = checkType.bind(null, !0), chainedCheckType;
}
function createPrimitiveTypeChecker(expectedType) {
function validate(props, propName, componentName, location, propFullName, secret) {
var propValue = props[propName], propType = getPropType(propValue);
if (propType !== expectedType) {
var locationName = ReactPropTypeLocationNames[location], preciseType = getPreciseType(propValue);
return new PropTypeError("Invalid " + locationName + " `" + propFullName + "` of type " + ("`" + preciseType + "` supplied to `" + componentName + "`, expected ") + ("`" + expectedType + "`."));
}
return null;
}
return createChainableTypeChecker(validate);
}
function createAnyTypeChecker() {
return createChainableTypeChecker(emptyFunction.thatReturns(null));
}
function createArrayOfTypeChecker(typeChecker) {
function validate(props, propName, componentName, location, propFullName) {
if ("function" != typeof typeChecker) return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside arrayOf.");
var propValue = props[propName];
if (!Array.isArray(propValue)) {
var locationName = ReactPropTypeLocationNames[location], propType = getPropType(propValue);
return new PropTypeError("Invalid " + locationName + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an array."));
}
for (var i = 0; i < propValue.length; i++) {
var error = typeChecker(propValue, i, componentName, location, propFullName + "[" + i + "]", ReactPropTypesSecret);
if (error instanceof Error) return error;
}
return null;
}
return createChainableTypeChecker(validate);
}
function createElementTypeChecker() {
function validate(props, propName, componentName, location, propFullName) {
var propValue = props[propName];
if (!ReactElement.isValidElement(propValue)) {
var locationName = ReactPropTypeLocationNames[location], propType = getPropType(propValue);
return new PropTypeError("Invalid " + locationName + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement."));
}
return null;
}
return createChainableTypeChecker(validate);
}
function createInstanceTypeChecker(expectedClass) {
function validate(props, propName, componentName, location, propFullName) {
if (!(props[propName] instanceof expectedClass)) {
var locationName = ReactPropTypeLocationNames[location], expectedClassName = expectedClass.name || ANONYMOUS, actualClassName = getClassName(props[propName]);
return new PropTypeError("Invalid " + locationName + " `" + propFullName + "` of type " + ("`" + actualClassName + "` supplied to `" + componentName + "`, expected ") + ("instance of `" + expectedClassName + "`."));
}
return null;
}
return createChainableTypeChecker(validate);
}
function createEnumTypeChecker(expectedValues) {
function validate(props, propName, componentName, location, propFullName) {
for (var propValue = props[propName], i = 0; i < expectedValues.length; i++) if (is(propValue, expectedValues[i])) return null;
var locationName = ReactPropTypeLocationNames[location], valuesString = JSON.stringify(expectedValues);
return new PropTypeError("Invalid " + locationName + " `" + propFullName + "` of value `" + propValue + "` " + ("supplied to `" + componentName + "`, expected one of " + valuesString + "."));
}
return Array.isArray(expectedValues) ? createChainableTypeChecker(validate) : emptyFunction.thatReturnsNull;
}
function createObjectOfTypeChecker(typeChecker) {
function validate(props, propName, componentName, location, propFullName) {
if ("function" != typeof typeChecker) return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside objectOf.");
var propValue = props[propName], propType = getPropType(propValue);
if ("object" !== propType) {
var locationName = ReactPropTypeLocationNames[location];
return new PropTypeError("Invalid " + locationName + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an object."));
}
for (var key in propValue) if (propValue.hasOwnProperty(key)) {
var error = typeChecker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
if (error instanceof Error) return error;
}
return null;
}
return createChainableTypeChecker(validate);
}
function createUnionTypeChecker(arrayOfTypeCheckers) {
function validate(props, propName, componentName, location, propFullName) {
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
var checker = arrayOfTypeCheckers[i];
if (null == checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret)) return null;
}
var locationName = ReactPropTypeLocationNames[location];
return new PropTypeError("Invalid " + locationName + " `" + propFullName + "` supplied to " + ("`" + componentName + "`."));
}
return Array.isArray(arrayOfTypeCheckers) ? createChainableTypeChecker(validate) : emptyFunction.thatReturnsNull;
}
function createNodeChecker() {
function validate(props, propName, componentName, location, propFullName) {
if (!isNode(props[propName])) {
var locationName = ReactPropTypeLocationNames[location];
return new PropTypeError("Invalid " + locationName + " `" + propFullName + "` supplied to " + ("`" + componentName + "`, expected a ReactNode."));
}
return null;
}
return createChainableTypeChecker(validate);
}
function createShapeTypeChecker(shapeTypes) {
function validate(props, propName, componentName, location, propFullName) {
var propValue = props[propName], propType = getPropType(propValue);
if ("object" !== propType) {
var locationName = ReactPropTypeLocationNames[location];
return new PropTypeError("Invalid " + locationName + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
}
for (var key in shapeTypes) {
var checker = shapeTypes[key];
if (checker) {
var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
if (error) return error;
}
}
return null;
}
return createChainableTypeChecker(validate);
}
function isNode(propValue) {
switch (typeof propValue) {
case "number":
case "string":
case "undefined":
return !0;
case "boolean":
return !propValue;
case "object":
if (Array.isArray(propValue)) return propValue.every(isNode);
if (null === propValue || ReactElement.isValidElement(propValue)) return !0;
var iteratorFn = getIteratorFn(propValue);
if (!iteratorFn) return !1;
var step, iterator = iteratorFn.call(propValue);
if (iteratorFn !== propValue.entries) {
for (;!(step = iterator.next()).done; ) if (!isNode(step.value)) return !1;
} else for (;!(step = iterator.next()).done; ) {
var entry = step.value;
if (entry && !isNode(entry[1])) return !1;
}
return !0;
default:
return !1;
}
}
function isSymbol(propType, propValue) {
return "symbol" === propType || ("Symbol" === propValue["@@toStringTag"] || "function" == typeof Symbol && propValue instanceof Symbol);
}
function getPropType(propValue) {
var propType = typeof propValue;
return Array.isArray(propValue) ? "array" : propValue instanceof RegExp ? "object" : isSymbol(propType, propValue) ? "symbol" : propType;
}
function getPreciseType(propValue) {
var propType = getPropType(propValue);
if ("object" === propType) {
if (propValue instanceof Date) return "date";
if (propValue instanceof RegExp) return "regexp";
}
return propType;
}
function getClassName(propValue) {
return propValue.constructor && propValue.constructor.name ? propValue.constructor.name : ANONYMOUS;
}
var ReactElement = __webpack_require__(13), ReactPropTypeLocationNames = __webpack_require__(27), ReactPropTypesSecret = __webpack_require__(30), emptyFunction = __webpack_require__(16), getIteratorFn = __webpack_require__(20), ANONYMOUS = (__webpack_require__(15),
"<>"), ReactPropTypes = {
array: createPrimitiveTypeChecker("array"),
bool: createPrimitiveTypeChecker("boolean"),
func: createPrimitiveTypeChecker("function"),
number: createPrimitiveTypeChecker("number"),
object: createPrimitiveTypeChecker("object"),
string: createPrimitiveTypeChecker("string"),
symbol: createPrimitiveTypeChecker("symbol"),
any: createAnyTypeChecker(),
arrayOf: createArrayOfTypeChecker,
element: createElementTypeChecker(),
instanceOf: createInstanceTypeChecker,
node: createNodeChecker(),
objectOf: createObjectOfTypeChecker,
oneOf: createEnumTypeChecker,
oneOfType: createUnionTypeChecker,
shape: createShapeTypeChecker
};
PropTypeError.prototype = Error.prototype, module.exports = ReactPropTypes;
}, function(module, exports) {
"use strict";
var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
module.exports = ReactPropTypesSecret;
}, function(module, exports) {
"use strict";
module.exports = "15.4.2";
}, function(module, exports, __webpack_require__) {
"use strict";
function onlyChild(children) {
return ReactElement.isValidElement(children) ? void 0 : _prodInvariant("143"), children;
}
var _prodInvariant = __webpack_require__(11), ReactElement = __webpack_require__(13);
__webpack_require__(12);
module.exports = onlyChild;
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
function shouldUseVerticalLayout(window) {
return window.innerWidth < IS_VERTICAL_BREAKPOINT;
}
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
}
return target;
}, _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), ContextMenu = __webpack_require__(34), PropState = __webpack_require__(39), React = __webpack_require__(6), LeftPane = __webpack_require__(214), PreferencesPanel = __webpack_require__(228), SplitPane = __webpack_require__(474), TabbedPane = __webpack_require__(476), IS_VERTICAL_BREAKPOINT = 500, Container = function(_React$Component) {
function Container(props) {
_classCallCheck(this, Container);
var _this = _possibleConstructorReturn(this, (Container.__proto__ || Object.getPrototypeOf(Container)).call(this, props));
return _this.handleResize = function(e) {
_this.resizeTimeout || (_this.resizeTimeout = setTimeout(_this.handleResizeTimeout, 50));
}, _this.handleResizeTimeout = function() {
_this.resizeTimeout = null, _this.setState({
isVertical: shouldUseVerticalLayout(window)
});
}, _this.state = {
isVertical: shouldUseVerticalLayout(window)
}, _this;
}
return _inherits(Container, _React$Component), _createClass(Container, [ {
key: "componentDidMount",
value: function() {
window.addEventListener("resize", this.handleResize, !1), this.setState({
isVertical: shouldUseVerticalLayout(window)
});
}
}, {
key: "componentWillUnmount",
value: function() {
window.removeEventListener("resize", this.handleResize), clearTimeout(this.resizeTimeout);
}
}, {
key: "render",
value: function() {
var _this2 = this, _props = this.props, preferencesPanelShown = _props.preferencesPanelShown, theme = _props.theme, tabs = _extends({
Elements: function() {
return React.createElement(SplitPane, {
initialWidth: 10,
initialHeight: 10,
left: function() {
return React.createElement(LeftPane, {
reload: _this2.props.reload
});
},
right: function() {
return React.createElement(PropState, {
onViewElementSource: _this2.props.onViewElementSource,
extraPanes: _this2.props.extraPanes
});
},
isVertical: _this2.state.isVertical
});
}
}, this.props.extraTabs);
return React.createElement("div", {
style: containerStyle(preferencesPanelShown, theme)
}, React.createElement(TabbedPane, {
tabs: tabs
}), React.createElement(PreferencesPanel, null), React.createElement(ContextMenu, {
itemSources: [ DEFAULT_MENU_ITEMS, this.props.menuItems ]
}));
}
} ]), Container;
}(React.Component), DEFAULT_MENU_ITEMS = {
tree: function(id, node, store) {
var items = [];
node.get("name") && items.push({
key: "showNodesOfType",
title: "Show all " + node.get("name"),
action: function() {
return store.changeSearch(node.get("name"));
}
}), store.capabilities.scroll && items.push({
key: "scrollToNode",
title: "Scroll to node",
action: function() {
return store.scrollToNode(id);
}
}), "Composite" === node.get("nodeType") && node.get("name") && items.push({
key: "copyNodeName",
title: "Copy element name",
action: function() {
return store.copyNodeName(node.get("name"));
}
});
var props = node.get("props");
if (props) {
var numKeys = Object.keys(props).filter(function(key) {
return "children" !== key;
}).length;
numKeys > 0 && items.push({
key: "copyNodeProps",
title: "Copy element props",
action: function() {
return store.copyNodeProps(props);
}
});
}
return items;
},
attr: function(id, node, val, path, name, store) {
return [ {
key: "storeAsGlobal",
title: "Store as global variable",
action: function() {
return store.makeGlobal(id, path);
}
} ];
}
}, containerStyle = function(preferencesPanelShown, theme) {
return {
backgroundColor: theme.base00,
color: theme.base05,
flex: 1,
display: "flex",
minWidth: 0,
position: preferencesPanelShown ? "relative" : null
};
};
module.exports = Container;
}, function(module, exports, __webpack_require__) {
"use strict";
function _toConsumableArray(arr) {
if (Array.isArray(arr)) {
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
return arr2;
}
return Array.from(arr);
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), React = __webpack_require__(6), _require = __webpack_require__(35), sansSerif = _require.sansSerif, HighlightHover = __webpack_require__(36), decorate = __webpack_require__(38), ContextMenu = function(_React$Component) {
function ContextMenu(props) {
_classCallCheck(this, ContextMenu);
var _this = _possibleConstructorReturn(this, (ContextMenu.__proto__ || Object.getPrototypeOf(ContextMenu)).call(this, props));
return _this.state = {
elementHeight: 0,
windowHeight: 0
}, _this._setRef = function(element) {
if (element) {
var elementHeight = element.querySelector("ul").clientHeight, windowHeight = window.innerHeight;
_this.state.elementHeight === elementHeight && _this.state.windowHeight === windowHeight || _this.setState({
elementHeight: elementHeight,
windowHeight: windowHeight
});
}
}, _this.handleBackdropClick = _this.handleBackdropClick.bind(_this), _this;
}
return _inherits(ContextMenu, _React$Component), _createClass(ContextMenu, [ {
key: "onClick",
value: function(i, evt) {
this.props.items[i].action();
}
}, {
key: "handleBackdropClick",
value: function(evt) {
evt.preventDefault(), this.props.hideContextMenu();
}
}, {
key: "render",
value: function() {
var _this2 = this, theme = this.context.theme, _props = this.props, items = _props.items, open = _props.open, pos = _props.pos, _state = this.state, elementHeight = _state.elementHeight, windowHeight = _state.windowHeight;
return pos && pos.y + elementHeight > windowHeight && (pos.y -= elementHeight),
open ? React.createElement("div", {
style: styles.backdrop,
onClick: this.handleBackdropClick,
ref: this._setRef
}, React.createElement("ul", {
style: containerStyle(pos.x, pos.y, theme)
}, !items.length && React.createElement("li", {
style: emptyStyle(theme)
}, "No actions"), items.map(function(item, i) {
return item && React.createElement("li", {
style: listItemStyle(theme),
key: item.key,
onClick: function(evt) {
return _this2.onClick(i, evt);
}
}, React.createElement(HighlightHover, {
style: styles.highlightHoverItem
}, item.title));
}))) : React.createElement("div", {
style: styles.hidden
});
}
} ]), ContextMenu;
}(React.Component);
ContextMenu.contextTypes = {
theme: React.PropTypes.object.isRequired
};
var Wrapped = decorate({
listeners: function() {
return [ "contextMenu" ];
},
props: function(store, _props2) {
if (!store.contextMenu) return {
open: !1
};
var _store$contextMenu = store.contextMenu, x = _store$contextMenu.x, y = _store$contextMenu.y, type = _store$contextMenu.type, args = _store$contextMenu.args, items = [];
return args.push(store), _props2.itemSources.forEach(function(source) {
if (source && source[type]) {
var newItems = source[type].apply(source, _toConsumableArray(args));
newItems && (items = items.concat(newItems.filter(function(v) {
return !!v;
})));
}
}), {
open: !0,
pos: {
x: x,
y: y
},
hideContextMenu: function() {
return store.hideContextMenu();
},
items: items
};
}
}, ContextMenu), containerStyle = function(xPos, yPos, theme) {
return {
top: yPos + "px",
left: xPos + "px",
position: "fixed",
listStyle: "none",
margin: 0,
padding: "0.25rem 0",
fontSize: sansSerif.sizes.large,
fontFamily: sansSerif.family,
borderRadius: "0.25rem",
overflow: "hidden",
zIndex: 1,
backgroundColor: theme.base01
};
}, emptyStyle = function(theme) {
return {
padding: "0.25rem 0.5rem",
color: theme.base03
};
}, listItemStyle = function(theme) {
return {
color: theme.base05
};
}, styles = {
hidden: {
display: "none"
},
backdrop: {
position: "fixed",
left: 0,
right: 0,
top: 0,
bottom: 0,
zIndex: 1
},
highlightHoverItem: {
padding: "0.25rem 0.5rem",
cursor: "default",
WebkitUserSelect: "none",
MozUserSelect: "none",
userSelect: "none"
}
};
module.exports = Wrapped;
}, function(module, exports) {
"use strict";
module.exports = {
monospace: {
family: "Menlo, Consolas, monospace",
sizes: {
normal: 11,
large: 14
}
},
sansSerif: {
family: '"Helvetica Neue", "Lucida Grande", -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, sans-serif',
sizes: {
small: 10,
normal: 12,
large: 14
}
}
};
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), React = __webpack_require__(6), assign = __webpack_require__(37), HighlightHover = function(_React$Component) {
function HighlightHover(props) {
_classCallCheck(this, HighlightHover);
var _this = _possibleConstructorReturn(this, (HighlightHover.__proto__ || Object.getPrototypeOf(HighlightHover)).call(this, props));
return _this.state = {
hover: !1
}, _this;
}
return _inherits(HighlightHover, _React$Component), _createClass(HighlightHover, [ {
key: "render",
value: function() {
var _this2 = this, theme = this.context.theme;
return React.createElement("div", {
onMouseOver: function() {
return !_this2.state.hover && _this2.setState({
hover: !0
});
},
onMouseOut: function() {
return _this2.state.hover && _this2.setState({
hover: !1
});
},
style: assign({}, this.props.style, {
backgroundColor: this.state.hover ? theme.base02 : "transparent"
})
}, this.props.children);
}
} ]), HighlightHover;
}(React.Component);
HighlightHover.contextTypes = {
theme: React.PropTypes.object.isRequired
}, module.exports = HighlightHover;
}, function(module, exports) {
"use strict";
function toObject(val) {
if (null === val || void 0 === val) throw new TypeError("Object.assign cannot be called with null or undefined");
return Object(val);
}
var hasOwnProperty = Object.prototype.hasOwnProperty, propIsEnumerable = Object.prototype.propertyIsEnumerable;
module.exports = Object.assign || function(target, source) {
for (var from, symbols, to = toObject(target), s = 1; s < arguments.length; s++) {
from = Object(arguments[s]);
for (var key in from) hasOwnProperty.call(from, key) && (to[key] = from[key]);
if (Object.getOwnPropertySymbols) {
symbols = Object.getOwnPropertySymbols(from);
for (var i = 0; i < symbols.length; i++) propIsEnumerable.call(from, symbols[i]) && (to[symbols[i]] = from[symbols[i]]);
}
}
return to;
};
}, function(module, exports, __webpack_require__) {
"use strict";
function _defineProperty(obj, key, value) {
return key in obj ? Object.defineProperty(obj, key, {
value: value,
enumerable: !0,
configurable: !0,
writable: !0
}) : obj[key] = value, obj;
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
function arrayDiff(array, oldArray) {
for (var names = new Set(), missing = [], i = 0; i < array.length; i++) names.add(array[i]);
for (var j = 0; j < oldArray.length; j++) names.has(oldArray[j]) ? names["delete"](oldArray[j]) : missing.push(oldArray[j]);
return {
missing: missing,
newItems: setToArray(names)
};
}
function setToArray(set) {
var res = [], _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
try {
for (var _step, _iterator = set[Symbol.iterator](); !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
var val = _step.value;
res.push(val);
}
} catch (err) {
_didIteratorError = !0, _iteratorError = err;
} finally {
try {
!_iteratorNormalCompletion && _iterator["return"] && _iterator["return"]();
} finally {
if (_didIteratorError) throw _iteratorError;
}
}
return res;
}
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
}
return target;
}, _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), React = __webpack_require__(6);
module.exports = function(options, Component) {
var storeKey = options.store || "store", Wrapper = function(_React$Component) {
function Wrapper(props) {
_classCallCheck(this, Wrapper);
var _this = _possibleConstructorReturn(this, (Wrapper.__proto__ || Object.getPrototypeOf(Wrapper)).call(this, props));
return _this.state = {}, _this;
}
return _inherits(Wrapper, _React$Component), _createClass(Wrapper, [ {
key: "componentWillMount",
value: function() {
var _this2 = this;
return this.context[storeKey] ? (this._update = function() {
return _this2.forceUpdate();
}, void (options.listeners && (this._listeners = options.listeners(this.props, this.context[storeKey]),
this._listeners.forEach(function(evt) {
_this2.context[storeKey].on(evt, _this2._update);
})))) : void console.warn("no store on context...");
}
}, {
key: "componentWillUnmount",
value: function() {
var _this3 = this;
return this.context[storeKey] ? void this._listeners.forEach(function(evt) {
_this3.context[storeKey].off(evt, _this3._update);
}) : void console.warn("no store on context...");
}
}, {
key: "shouldComponentUpdate",
value: function(nextProps, nextState) {
return nextState !== this.state || !!options.shouldUpdate && options.shouldUpdate(nextProps, this.props);
}
}, {
key: "componentWillUpdate",
value: function(nextProps, nextState) {
var _this4 = this;
if (!this.context[storeKey]) return void console.warn("no store on context...");
if (options.listeners) {
var listeners = options.listeners(this.props, this.context[storeKey]), diff = arrayDiff(listeners, this._listeners);
diff.missing.forEach(function(name) {
_this4.context[storeKey].off(name, _this4._update);
}), diff.newItems.forEach(function(name) {
_this4.context[storeKey].on(name, _this4._update);
}), this._listeners = listeners;
}
}
}, {
key: "render",
value: function() {
var store = this.context[storeKey], props = store && options.props(store, this.props);
return React.createElement(Component, _extends({}, props, this.props));
}
} ]), Wrapper;
}(React.Component);
return Wrapper.contextTypes = _defineProperty({}, storeKey, React.PropTypes.object),
Wrapper.displayName = "Wrapper(" + Component.name + ")", Wrapper;
};
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), BlurInput = __webpack_require__(40), DataView = __webpack_require__(42), DetailPane = __webpack_require__(207), DetailPaneSection = __webpack_require__(208), _require = __webpack_require__(35), sansSerif = _require.sansSerif, PropVal = __webpack_require__(209), React = __webpack_require__(6), decorate = __webpack_require__(38), invariant = __webpack_require__(213), PropState = function(_React$Component) {
function PropState() {
return _classCallCheck(this, PropState), _possibleConstructorReturn(this, (PropState.__proto__ || Object.getPrototypeOf(PropState)).apply(this, arguments));
}
return _inherits(PropState, _React$Component), _createClass(PropState, [ {
key: "getChildContext",
value: function() {
var _this2 = this;
return {
onChange: function(path, val) {
_this2.props.onChange(path, val);
}
};
}
}, {
key: "renderSource",
value: function() {
var theme = this.context.theme, _props = this.props, id = _props.id, node = _props.node, onViewElementSource = _props.onViewElementSource, source = node.get("source");
if (!source) return null;
var onClick = void 0;
return onViewElementSource && (onClick = function() {
return onViewElementSource(id, source);
}), React.createElement("div", {
style: sourceStyle(!!onViewElementSource, theme),
onClick: onClick
}, source.fileName, React.createElement("span", {
style: sourcePosStyle(theme)
}, ":", source.lineNumber));
}
}, {
key: "render",
value: function() {
var _this3 = this, theme = this.context.theme;
if (!this.props.node) return React.createElement("span", {
style: emptyStyle(theme)
}, "No selection");
var nodeType = this.props.node.get("nodeType");
if ("Text" === nodeType) return this.props.canEditTextContent ? React.createElement(DetailPane, null, React.createElement(BlurInput, {
value: this.props.node.get("text"),
onChange: this.props.onChangeText
})) : React.createElement(DetailPane, {
header: "Text Node"
}, React.createElement("span", {
style: noPropsStateStyle(theme)
}, "No props/state."));
if ("Empty" === nodeType) return React.createElement(DetailPane, {
header: "Empty Node"
}, React.createElement("span", {
style: noPropsStateStyle(theme)
}, "No props/state."));
var editTextContent = null;
this.props.canEditTextContent && "string" == typeof this.props.node.get("children") && (editTextContent = React.createElement(BlurInput, {
value: this.props.node.get("children"),
onChange: this.props.onChangeText
}));
var key = this.props.node.get("key"), ref = this.props.node.get("ref"), state = this.props.node.get("state"), context = this.props.node.get("context"), propsReadOnly = !this.props.node.get("canUpdate");
return React.createElement(DetailPane, {
theme: theme
}, key && React.createElement(DetailPaneSection, {
title: "Key",
key: this.props.id + "-key"
}, React.createElement(PropVal, {
val: key
})), ref && React.createElement(DetailPaneSection, {
title: "Ref",
key: this.props.id + "-ref"
}, React.createElement(PropVal, {
val: ref
})), editTextContent, React.createElement(DetailPaneSection, {
hint: propsReadOnly ? "read-only" : null,
title: "Props"
}, React.createElement(DataView, {
path: [ "props" ],
readOnly: propsReadOnly,
inspect: this.props.inspect,
showMenu: this.props.showMenu,
key: this.props.id + "-props",
data: this.props.node.get("props")
})), state && React.createElement(DetailPaneSection, {
title: "State"
}, React.createElement(DataView, {
data: state,
path: [ "state" ],
inspect: this.props.inspect,
showMenu: this.props.showMenu,
key: this.props.id + "-state"
})), context && React.createElement(DetailPaneSection, {
title: "Context"
}, React.createElement(DataView, {
data: context,
path: [ "context" ],
inspect: this.props.inspect,
showMenu: this.props.showMenu,
key: this.props.id + "-context"
})), this.props.extraPanes && this.props.extraPanes.map(function(fn) {
return fn && fn(_this3.props.node, _this3.props.id);
}), React.createElement("div", {
style: {
flex: 1
}
}), this.renderSource());
}
} ]), PropState;
}(React.Component);
PropState.contextTypes = {
theme: React.PropTypes.object.isRequired
}, PropState.childContextTypes = {
onChange: React.PropTypes.func
};
var WrappedPropState = decorate({
listeners: function(props, store) {
return [ "selected", store.selected ];
},
props: function(store) {
var node = store.selected ? store.get(store.selected) : null;
return {
id: store.selected,
node: node,
canEditTextContent: store.capabilities.editTextContent,
onChangeText: function(text) {
store.changeTextContent(store.selected, text);
},
onChange: function(path, val) {
"props" === path[0] ? store.setProps(store.selected, path.slice(1), val) : "state" === path[0] ? store.setState(store.selected, path.slice(1), val) : "context" === path[0] ? store.setContext(store.selected, path.slice(1), val) : invariant(!1, "the path to change() must start wth props, state, or context");
},
showMenu: function(e, val, path, name) {
store.showContextMenu("attr", e, store.selected, node, val, path, name);
},
inspect: store.inspect.bind(store, store.selected)
};
}
}, PropState), emptyStyle = function(theme) {
return {
fontFamily: sansSerif.family,
fontSize: sansSerif.sizes.large,
fontStyle: "italic",
margin: "auto",
color: theme.base04
};
}, sourceStyle = function(hasViewElementSource, theme) {
return {
padding: "0.25rem 0.5rem",
color: theme.base05,
overflowWrap: "break-word",
cursor: hasViewElementSource ? "pointer" : "default"
};
}, sourcePosStyle = function(theme) {
return {
color: theme.base03
};
}, noPropsStateStyle = function(theme) {
return {
fontFamily: sansSerif.family,
fontSize: sansSerif.sizes.normal,
color: theme.base03,
textAlign: "center",
fontStyle: "italic",
padding: "0.5rem"
};
};
module.exports = WrappedPropState;
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), React = __webpack_require__(6), Input = __webpack_require__(41), BlurInput = function(_React$Component) {
function BlurInput(props) {
_classCallCheck(this, BlurInput);
var _this = _possibleConstructorReturn(this, (BlurInput.__proto__ || Object.getPrototypeOf(BlurInput)).call(this, props));
return _this.state = {
text: _this.props.value || ""
}, _this;
}
return _inherits(BlurInput, _React$Component), _createClass(BlurInput, [ {
key: "componentWillReceiveProps",
value: function(nextProps) {
nextProps.value !== this.props.value && this.setState({
text: "" + nextProps.value
});
}
}, {
key: "done",
value: function() {
this.state.text !== (this.props.value || "") && this.props.onChange(this.state.text);
}
}, {
key: "onKeyDown",
value: function(e) {
"Enter" === e.key && this.done();
}
}, {
key: "render",
value: function() {
var _this2 = this;
return React.createElement(Input, {
value: this.state.text,
innerRef: function(i) {
return _this2.node = i;
},
onChange: function(e) {
return _this2.setState({
text: e.target.value
});
},
onBlur: this.done.bind(this),
onKeyDown: function(e) {
return _this2.onKeyDown(e);
}
});
}
} ]), BlurInput;
}(React.Component);
module.exports = BlurInput;
}, function(module, exports, __webpack_require__) {
"use strict";
function _objectWithoutProperties(obj, keys) {
var target = {};
for (var i in obj) keys.indexOf(i) >= 0 || Object.prototype.hasOwnProperty.call(obj, i) && (target[i] = obj[i]);
return target;
}
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
}
return target;
}, React = __webpack_require__(6), Input = function(props, context) {
var _props$style = props.style, style = void 0 === _props$style ? {} : _props$style, theme = props.theme, innerRef = props.innerRef, rest = _objectWithoutProperties(props, [ "style", "theme", "innerRef" ]), chosenTheme = theme ? theme : context.theme;
return React.createElement("input", _extends({
style: _extends({}, inputStyle(chosenTheme), style),
ref: innerRef
}, rest));
};
Input.contextTypes = {
theme: React.PropTypes.object.isRequired
};
var inputStyle = function(theme) {
return {
backgroundColor: theme.base00,
color: theme.base05
};
};
module.exports = Input;
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
function alphanumericSort(a, b) {
return "" + +a === a ? "" + +b !== b ? -1 : +a < +b ? -1 : 1 : a < b ? -1 : 1;
}
var _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj) {
return typeof obj;
} : function(obj) {
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
}, _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), _require = __webpack_require__(35), sansSerif = _require.sansSerif, React = __webpack_require__(6), Simple = __webpack_require__(43), consts = __webpack_require__(187), previewComplex = __webpack_require__(206), DataView = function(_React$Component) {
function DataView() {
return _classCallCheck(this, DataView), _possibleConstructorReturn(this, (DataView.__proto__ || Object.getPrototypeOf(DataView)).apply(this, arguments));
}
return _inherits(DataView, _React$Component), _createClass(DataView, [ {
key: "renderSparseArrayHole",
value: function(count, key) {
var theme = this.context.theme;
return React.createElement("li", {
key: key
}, React.createElement("div", {
style: styles.head
}, React.createElement("div", {
style: sparseArrayHoleStyle(theme)
}, "undefined × ", count)));
}
}, {
key: "renderItem",
value: function(name, key) {
return React.createElement(DataItem, {
key: key,
name: name,
path: this.props.path.concat([ name ]),
startOpen: this.props.startOpen,
inspect: this.props.inspect,
showMenu: this.props.showMenu,
readOnly: this.props.readOnly,
value: this.props.data[name]
});
}
}, {
key: "render",
value: function() {
var _this2 = this, theme = this.context.theme, data = this.props.data;
if (!data) return React.createElement("div", {
style: missingStyle(theme)
}, "null");
var isArray = Array.isArray(data), elements = [];
if (isArray) {
var lastIndex = -1;
if (data.forEach(function(item, i) {
if (lastIndex < i - 1) {
var holeCount = i - 1 - lastIndex;
elements.push(_this2.renderSparseArrayHole(holeCount, i + "-hole"));
}
elements.push(_this2.renderItem(i, i)), lastIndex = i;
}), lastIndex < data.length - 1) {
var holeCount = data.length - 1 - lastIndex;
elements.push(this.renderSparseArrayHole(holeCount, lastIndex + "-hole"));
}
} else {
var names = Object.keys(data);
this.props.noSort || names.sort(alphanumericSort), names.forEach(function(name, i) {
elements.push(_this2.renderItem(name, name));
});
}
return elements.length ? React.createElement("ul", {
style: styles.container
}, data[consts.proto] && React.createElement(DataItem, {
key: "__proto__",
name: "__proto__",
path: this.props.path.concat([ "__proto__" ]),
startOpen: this.props.startOpen,
inspect: this.props.inspect,
showMenu: this.props.showMenu,
readOnly: this.props.readOnly,
value: this.props.data[consts.proto]
}), elements) : React.createElement("div", {
style: emptyStyle(theme)
}, isArray ? "Empty array" : "Empty object");
}
} ]), DataView;
}(React.Component);
DataView.contextTypes = {
theme: React.PropTypes.object.isRequired
};
var DataItem = function(_React$Component2) {
function DataItem(props) {
_classCallCheck(this, DataItem);
var _this3 = _possibleConstructorReturn(this, (DataItem.__proto__ || Object.getPrototypeOf(DataItem)).call(this, props));
return _this3.state = {
open: !!_this3.props.startOpen,
loading: !1
}, _this3;
}
return _inherits(DataItem, _React$Component2), _createClass(DataItem, [ {
key: "componentDidMount",
value: function() {
this.state.open && this.props.value && this.props.value[consts.inspected] === !1 && this.inspect();
}
}, {
key: "componentWillReceiveProps",
value: function(nextProps) {
this.state.open && nextProps.value && nextProps.value[consts.inspected] === !1 && this.inspect();
}
}, {
key: "inspect",
value: function() {
var _this4 = this;
this.setState({
loading: !0,
open: !0
}), this.props.inspect(this.props.path, function() {
_this4.setState({
loading: !1
});
});
}
}, {
key: "toggleOpen",
value: function() {
if (!this.state.loading) return this.props.value && this.props.value[consts.inspected] === !1 ? void this.inspect() : void this.setState({
open: !this.state.open
});
}
}, {
key: "toggleBooleanValue",
value: function(e) {
this.context.onChange(this.props.path, e.target.checked);
}
}, {
key: "render",
value: function() {
var preview, _this5 = this, theme = this.context.theme, data = this.props.value, otype = "undefined" == typeof data ? "undefined" : _typeof(data), complex = !0;
"number" === otype || "string" === otype || null == data || "boolean" === otype ? (preview = React.createElement(Simple, {
readOnly: this.props.readOnly,
path: this.props.path,
data: data
}), complex = !1) : preview = previewComplex(data, theme);
var inspectable = !data || !data[consts.meta] || !data[consts.meta].uninspectable, open = inspectable && this.state.open && (!data || data[consts.inspected] !== !1), opener = null;
complex && inspectable ? opener = React.createElement("div", {
onClick: this.toggleOpen.bind(this),
style: styles.opener
}, open ? React.createElement("span", {
style: expandedArrowStyle(theme)
}) : React.createElement("span", {
style: collapsedArrowStyle(theme)
})) : "boolean" !== otype || this.props.readOnly || (opener = React.createElement("input", {
checked: data,
onChange: this.toggleBooleanValue.bind(this),
style: styles.toggler,
type: "checkbox"
}));
var children = null;
if (complex && open) {
var readOnly = this.props.readOnly || data[consts.meta] && data[consts.meta].readOnly;
children = React.createElement("div", {
style: styles.children
}, React.createElement(DataView, {
data: data,
path: this.props.path,
inspect: this.props.inspect,
showMenu: this.props.showMenu,
readOnly: readOnly
}));
}
var name = this.props.name;
return name.length > 50 && (name = name.slice(0, 50) + "…"), React.createElement("li", null, React.createElement("div", {
style: styles.head
}, opener, React.createElement("div", {
style: nameStyle(complex, theme),
onClick: inspectable && this.toggleOpen.bind(this)
}, name, ":"), React.createElement("div", {
onContextMenu: function(e) {
"function" == typeof _this5.props.showMenu && _this5.props.showMenu(e, _this5.props.value, _this5.props.path, name);
},
style: previewStyle(theme)
}, preview)), children);
}
} ]), DataItem;
}(React.Component);
DataItem.contextTypes = {
onChange: React.PropTypes.func,
theme: React.PropTypes.object.isRequired
};
var nameStyle = function(isComplex, theme) {
return {
cursor: isComplex ? "pointer" : "default",
color: theme.special03,
margin: "2px 3px"
};
}, previewStyle = function(theme) {
return {
display: "flex",
margin: "2px 3px",
whiteSpace: "pre",
wordBreak: "break-word",
flex: 1,
color: theme.special01
};
}, emptyStyle = function(theme) {
return {
marginLeft: "0.75rem",
padding: "0 5px",
color: theme.base04,
fontFamily: sansSerif.family,
fontSize: sansSerif.sizes.normal,
fontStyle: "italic"
};
}, missingStyle = function(theme) {
return {
fontSize: sansSerif.sizes.normal,
fontWeight: "bold",
marginLeft: "0.75rem",
padding: "2px 5px",
color: theme.base03
};
}, collapsedArrowStyle = function(theme) {
return {
borderColor: "transparent transparent transparent " + theme.base03,
borderStyle: "solid",
borderWidth: "4px 0 4px 7px",
display: "inline-block",
marginLeft: 1,
verticalAlign: "top"
};
}, expandedArrowStyle = function(theme) {
return {
borderColor: theme.base03 + " transparent transparent transparent",
borderStyle: "solid",
borderWidth: "7px 4px 0 4px",
display: "inline-block",
marginTop: 1,
verticalAlign: "top"
};
}, sparseArrayHoleStyle = function(theme) {
return {
fontStyle: "italic",
color: theme.base03,
margin: "2px 3px"
};
}, styles = {
container: {
listStyle: "none",
margin: 0,
padding: 0,
marginLeft: "0.75rem"
},
children: {},
opener: {
cursor: "pointer",
marginLeft: -10,
paddingRight: 3,
position: "absolute",
top: 4
},
toggler: {
left: -15,
position: "absolute",
top: -1
},
head: {
display: "flex",
position: "relative"
},
value: {}
};
module.exports = DataView;
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
function textToValue(txt) {
if (!txt.length) return BAD_INPUT;
if ("undefined" !== txt) try {
return JSON.parse(txt);
} catch (e) {
return BAD_INPUT;
}
}
function valueToText(value) {
return void 0 === value ? "undefined" : "number" == typeof value ? value.toString() : JSON.stringify(value);
}
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), React = __webpack_require__(6), ReactDOM = __webpack_require__(44), Input = __webpack_require__(41), flash = __webpack_require__(186), _require = __webpack_require__(35), monospace = _require.monospace, Simple = function(_React$Component) {
function Simple(props) {
_classCallCheck(this, Simple);
var _this = _possibleConstructorReturn(this, (Simple.__proto__ || Object.getPrototypeOf(Simple)).call(this, props));
return _this.state = {
text: "",
editing: !1
}, _this;
}
return _inherits(Simple, _React$Component), _createClass(Simple, [ {
key: "onChange",
value: function(e) {
this.setState({
text: e.target.value
});
}
}, {
key: "onKeyDown",
value: function(e) {
"Enter" === e.key && (this.onSubmit(!0), this.setState({
editing: !1
})), "Escape" === e.key && this.setState({
editing: !1
});
}
}, {
key: "onSubmit",
value: function(editing) {
if (this.state.text === valueToText(this.props.data)) return void this.setState({
editing: editing
});
var value = textToValue(this.state.text);
return value === BAD_INPUT ? void this.setState({
text: valueToText(this.props.data),
editing: editing
}) : (this.context.onChange(this.props.path, value), void this.setState({
editing: editing
}));
}
}, {
key: "startEditing",
value: function() {
this.props.readOnly || this.setState({
editing: !0,
text: valueToText(this.props.data)
});
}
}, {
key: "selectAll",
value: function() {
var input = this.input;
input.selectionStart = 0, input.selectionEnd = input.value.length;
}
}, {
key: "componentDidUpdate",
value: function(prevProps, prevState) {
this.state.editing && !prevState.editing && this.selectAll(), this.state.editing || this.props.data === prevProps.data || flash(ReactDOM.findDOMNode(this), this.context.theme.state04, "transparent", 1);
}
}, {
key: "render",
value: function() {
var _this2 = this, theme = this.context.theme, readOnly = this.props.readOnly, _state = this.state, editing = _state.editing, text = _state.text;
if (editing) return React.createElement(Input, {
autoFocus: !0,
innerRef: function(i) {
return _this2.input = i;
},
style: inputStyle(theme),
onChange: function(e) {
return _this2.onChange(e);
},
onBlur: function() {
return _this2.onSubmit(!1);
},
onKeyDown: this.onKeyDown.bind(this),
value: text
});
var data = this.props.data;
return "string" == typeof data && data.length > 200 && (data = data.slice(0, 200) + "…"),
React.createElement("div", {
onClick: this.startEditing.bind(this),
style: simpleStyle(readOnly, theme)
}, valueToText(data));
}
} ]), Simple;
}(React.Component);
Simple.propTypes = {
data: React.PropTypes.any,
path: React.PropTypes.array,
readOnly: React.PropTypes.bool
}, Simple.contextTypes = {
onChange: React.PropTypes.func,
theme: React.PropTypes.object.isRequired
};
var inputStyle = function(theme) {
return {
flex: 1,
minWidth: 50,
boxSizing: "border-box",
border: "none",
padding: 0,
outline: "none",
boxShadow: "0 0 3px " + theme.base02,
fontFamily: monospace.family,
fontSize: "inherit"
};
}, simpleStyle = function(readOnly, theme) {
return {
display: "flex",
flex: 1,
whiteSpace: "pre-wrap",
cursor: readOnly ? "default" : "pointer"
};
}, BAD_INPUT = Symbol("bad input");
module.exports = Simple;
}, function(module, exports, __webpack_require__) {
"use strict";
module.exports = __webpack_require__(45);
}, function(module, exports, __webpack_require__) {
"use strict";
var ReactDOMComponentTree = __webpack_require__(46), ReactDefaultInjection = __webpack_require__(51), ReactMount = __webpack_require__(177), ReactReconciler = __webpack_require__(75), ReactUpdates = __webpack_require__(72), ReactVersion = __webpack_require__(182), findDOMNode = __webpack_require__(183), getHostComponentFromComposite = __webpack_require__(184), renderSubtreeIntoContainer = __webpack_require__(185);
__webpack_require__(59);
ReactDefaultInjection.inject();
var ReactDOM = {
findDOMNode: findDOMNode,
render: ReactMount.render,
unmountComponentAtNode: ReactMount.unmountComponentAtNode,
version: ReactVersion,
unstable_batchedUpdates: ReactUpdates.batchedUpdates,
unstable_renderSubtreeIntoContainer: renderSubtreeIntoContainer
};
"undefined" != typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" == typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject && __REACT_DEVTOOLS_GLOBAL_HOOK__.inject({
ComponentTree: {
getClosestInstanceFromNode: ReactDOMComponentTree.getClosestInstanceFromNode,
getNodeFromInstance: function(inst) {
return inst._renderedComponent && (inst = getHostComponentFromComposite(inst)),
inst ? ReactDOMComponentTree.getNodeFromInstance(inst) : null;
}
},
Mount: ReactMount,
Reconciler: ReactReconciler
});
module.exports = ReactDOM;
}, function(module, exports, __webpack_require__) {
"use strict";
function shouldPrecacheNode(node, nodeID) {
return 1 === node.nodeType && node.getAttribute(ATTR_NAME) === String(nodeID) || 8 === node.nodeType && node.nodeValue === " react-text: " + nodeID + " " || 8 === node.nodeType && node.nodeValue === " react-empty: " + nodeID + " ";
}
function getRenderedHostOrTextFromComponent(component) {
for (var rendered; rendered = component._renderedComponent; ) component = rendered;
return component;
}
function precacheNode(inst, node) {
var hostInst = getRenderedHostOrTextFromComponent(inst);
hostInst._hostNode = node, node[internalInstanceKey] = hostInst;
}
function uncacheNode(inst) {
var node = inst._hostNode;
node && (delete node[internalInstanceKey], inst._hostNode = null);
}
function precacheChildNodes(inst, node) {
if (!(inst._flags & Flags.hasCachedChildNodes)) {
var children = inst._renderedChildren, childNode = node.firstChild;
outer: for (var name in children) if (children.hasOwnProperty(name)) {
var childInst = children[name], childID = getRenderedHostOrTextFromComponent(childInst)._domID;
if (0 !== childID) {
for (;null !== childNode; childNode = childNode.nextSibling) if (shouldPrecacheNode(childNode, childID)) {
precacheNode(childInst, childNode);
continue outer;
}
_prodInvariant("32", childID);
}
}
inst._flags |= Flags.hasCachedChildNodes;
}
}
function getClosestInstanceFromNode(node) {
if (node[internalInstanceKey]) return node[internalInstanceKey];
for (var parents = []; !node[internalInstanceKey]; ) {
if (parents.push(node), !node.parentNode) return null;
node = node.parentNode;
}
for (var closest, inst; node && (inst = node[internalInstanceKey]); node = parents.pop()) closest = inst,
parents.length && precacheChildNodes(inst, node);
return closest;
}
function getInstanceFromNode(node) {
var inst = getClosestInstanceFromNode(node);
return null != inst && inst._hostNode === node ? inst : null;
}
function getNodeFromInstance(inst) {
if (void 0 === inst._hostNode ? _prodInvariant("33") : void 0, inst._hostNode) return inst._hostNode;
for (var parents = []; !inst._hostNode; ) parents.push(inst), inst._hostParent ? void 0 : _prodInvariant("34"),
inst = inst._hostParent;
for (;parents.length; inst = parents.pop()) precacheChildNodes(inst, inst._hostNode);
return inst._hostNode;
}
var _prodInvariant = __webpack_require__(47), DOMProperty = __webpack_require__(48), ReactDOMComponentFlags = __webpack_require__(50), ATTR_NAME = (__webpack_require__(49),
DOMProperty.ID_ATTRIBUTE_NAME), Flags = ReactDOMComponentFlags, internalInstanceKey = "__reactInternalInstance$" + Math.random().toString(36).slice(2), ReactDOMComponentTree = {
getClosestInstanceFromNode: getClosestInstanceFromNode,
getInstanceFromNode: getInstanceFromNode,
getNodeFromInstance: getNodeFromInstance,
precacheChildNodes: precacheChildNodes,
precacheNode: precacheNode,
uncacheNode: uncacheNode
};
module.exports = ReactDOMComponentTree;
}, function(module, exports) {
"use strict";
function reactProdInvariant(code) {
for (var argCount = arguments.length - 1, message = "Minified React error #" + code + "; visit http://facebook.github.io/react/docs/error-decoder.html?invariant=" + code, argIdx = 0; argIdx < argCount; argIdx++) message += "&args[]=" + encodeURIComponent(arguments[argIdx + 1]);
message += " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
var error = new Error(message);
throw error.name = "Invariant Violation", error.framesToPop = 1, error;
}
module.exports = reactProdInvariant;
}, function(module, exports, __webpack_require__) {
"use strict";
function checkMask(value, bitmask) {
return (value & bitmask) === bitmask;
}
var _prodInvariant = __webpack_require__(47), DOMPropertyInjection = (__webpack_require__(49),
{
MUST_USE_PROPERTY: 1,
HAS_BOOLEAN_VALUE: 4,
HAS_NUMERIC_VALUE: 8,
HAS_POSITIVE_NUMERIC_VALUE: 24,
HAS_OVERLOADED_BOOLEAN_VALUE: 32,
injectDOMPropertyConfig: function(domPropertyConfig) {
var Injection = DOMPropertyInjection, Properties = domPropertyConfig.Properties || {}, DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {}, DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {}, DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {}, DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {};
domPropertyConfig.isCustomAttribute && DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute);
for (var propName in Properties) {
DOMProperty.properties.hasOwnProperty(propName) ? _prodInvariant("48", propName) : void 0;
var lowerCased = propName.toLowerCase(), propConfig = Properties[propName], propertyInfo = {
attributeName: lowerCased,
attributeNamespace: null,
propertyName: propName,
mutationMethod: null,
mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY),
hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE),
hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE),
hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE),
hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE)
};
if (propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1 ? void 0 : _prodInvariant("50", propName),
DOMAttributeNames.hasOwnProperty(propName)) {
var attributeName = DOMAttributeNames[propName];
propertyInfo.attributeName = attributeName;
}
DOMAttributeNamespaces.hasOwnProperty(propName) && (propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName]),
DOMPropertyNames.hasOwnProperty(propName) && (propertyInfo.propertyName = DOMPropertyNames[propName]),
DOMMutationMethods.hasOwnProperty(propName) && (propertyInfo.mutationMethod = DOMMutationMethods[propName]),
DOMProperty.properties[propName] = propertyInfo;
}
}
}), ATTRIBUTE_NAME_START_CHAR = ":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD", DOMProperty = {
ID_ATTRIBUTE_NAME: "data-reactid",
ROOT_ATTRIBUTE_NAME: "data-reactroot",
ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR,
ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",
properties: {},
getPossibleStandardName: null,
_isCustomAttributeFunctions: [],
isCustomAttribute: function(attributeName) {
for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) {
var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i];
if (isCustomAttributeFn(attributeName)) return !0;
}
return !1;
},
injection: DOMPropertyInjection
};
module.exports = DOMProperty;
}, function(module, exports, __webpack_require__) {
"use strict";
function invariant(condition, format, a, b, c, d, e, f) {
if (validateFormat(format), !condition) {
var error;
if (void 0 === format) error = new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."); else {
var args = [ a, b, c, d, e, f ], argIndex = 0;
error = new Error(format.replace(/%s/g, function() {
return args[argIndex++];
})), error.name = "Invariant Violation";
}
throw error.framesToPop = 1, error;
}
}
var validateFormat = function(format) {};
module.exports = invariant;
}, function(module, exports) {
"use strict";
var ReactDOMComponentFlags = {
hasCachedChildNodes: 1
};
module.exports = ReactDOMComponentFlags;
}, function(module, exports, __webpack_require__) {
"use strict";
function inject() {
alreadyInjected || (alreadyInjected = !0, ReactInjection.EventEmitter.injectReactEventListener(ReactEventListener),
ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder), ReactInjection.EventPluginUtils.injectComponentTree(ReactDOMComponentTree),
ReactInjection.EventPluginUtils.injectTreeTraversal(ReactDOMTreeTraversal), ReactInjection.EventPluginHub.injectEventPluginsByName({
SimpleEventPlugin: SimpleEventPlugin,
EnterLeaveEventPlugin: EnterLeaveEventPlugin,
ChangeEventPlugin: ChangeEventPlugin,
SelectEventPlugin: SelectEventPlugin,
BeforeInputEventPlugin: BeforeInputEventPlugin
}), ReactInjection.HostComponent.injectGenericComponentClass(ReactDOMComponent),
ReactInjection.HostComponent.injectTextComponentClass(ReactDOMTextComponent), ReactInjection.DOMProperty.injectDOMPropertyConfig(ARIADOMPropertyConfig),
ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig), ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig),
ReactInjection.EmptyComponent.injectEmptyComponentFactory(function(instantiate) {
return new ReactDOMEmptyComponent(instantiate);
}), ReactInjection.Updates.injectReconcileTransaction(ReactReconcileTransaction),
ReactInjection.Updates.injectBatchingStrategy(ReactDefaultBatchingStrategy), ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment));
}
var ARIADOMPropertyConfig = __webpack_require__(52), BeforeInputEventPlugin = __webpack_require__(53), ChangeEventPlugin = __webpack_require__(71), DefaultEventPluginOrder = __webpack_require__(83), EnterLeaveEventPlugin = __webpack_require__(84), HTMLDOMPropertyConfig = __webpack_require__(89), ReactComponentBrowserEnvironment = __webpack_require__(90), ReactDOMComponent = __webpack_require__(103), ReactDOMComponentTree = __webpack_require__(46), ReactDOMEmptyComponent = __webpack_require__(148), ReactDOMTreeTraversal = __webpack_require__(149), ReactDOMTextComponent = __webpack_require__(150), ReactDefaultBatchingStrategy = __webpack_require__(151), ReactEventListener = __webpack_require__(152), ReactInjection = __webpack_require__(155), ReactReconcileTransaction = __webpack_require__(156), SVGDOMPropertyConfig = __webpack_require__(164), SelectEventPlugin = __webpack_require__(165), SimpleEventPlugin = __webpack_require__(166), alreadyInjected = !1;
module.exports = {
inject: inject
};
}, function(module, exports) {
"use strict";
var ARIADOMPropertyConfig = {
Properties: {
"aria-current": 0,
"aria-details": 0,
"aria-disabled": 0,
"aria-hidden": 0,
"aria-invalid": 0,
"aria-keyshortcuts": 0,
"aria-label": 0,
"aria-roledescription": 0,
"aria-autocomplete": 0,
"aria-checked": 0,
"aria-expanded": 0,
"aria-haspopup": 0,
"aria-level": 0,
"aria-modal": 0,
"aria-multiline": 0,
"aria-multiselectable": 0,
"aria-orientation": 0,
"aria-placeholder": 0,
"aria-pressed": 0,
"aria-readonly": 0,
"aria-required": 0,
"aria-selected": 0,
"aria-sort": 0,
"aria-valuemax": 0,
"aria-valuemin": 0,
"aria-valuenow": 0,
"aria-valuetext": 0,
"aria-atomic": 0,
"aria-busy": 0,
"aria-live": 0,
"aria-relevant": 0,
"aria-dropeffect": 0,
"aria-grabbed": 0,
"aria-activedescendant": 0,
"aria-colcount": 0,
"aria-colindex": 0,
"aria-colspan": 0,
"aria-controls": 0,
"aria-describedby": 0,
"aria-errormessage": 0,
"aria-flowto": 0,
"aria-labelledby": 0,
"aria-owns": 0,
"aria-posinset": 0,
"aria-rowcount": 0,
"aria-rowindex": 0,
"aria-rowspan": 0,
"aria-setsize": 0
},
DOMAttributeNames: {},
DOMPropertyNames: {}
};
module.exports = ARIADOMPropertyConfig;
}, function(module, exports, __webpack_require__) {
"use strict";
function isPresto() {
var opera = window.opera;
return "object" == typeof opera && "function" == typeof opera.version && parseInt(opera.version(), 10) <= 12;
}
function isKeypressCommand(nativeEvent) {
return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && !(nativeEvent.ctrlKey && nativeEvent.altKey);
}
function getCompositionEventType(topLevelType) {
switch (topLevelType) {
case "topCompositionStart":
return eventTypes.compositionStart;
case "topCompositionEnd":
return eventTypes.compositionEnd;
case "topCompositionUpdate":
return eventTypes.compositionUpdate;
}
}
function isFallbackCompositionStart(topLevelType, nativeEvent) {
return "topKeyDown" === topLevelType && nativeEvent.keyCode === START_KEYCODE;
}
function isFallbackCompositionEnd(topLevelType, nativeEvent) {
switch (topLevelType) {
case "topKeyUp":
return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;
case "topKeyDown":
return nativeEvent.keyCode !== START_KEYCODE;
case "topKeyPress":
case "topMouseDown":
case "topBlur":
return !0;
default:
return !1;
}
}
function getDataFromCustomEvent(nativeEvent) {
var detail = nativeEvent.detail;
return "object" == typeof detail && "data" in detail ? detail.data : null;
}
function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
var eventType, fallbackData;
if (canUseCompositionEvent ? eventType = getCompositionEventType(topLevelType) : currentComposition ? isFallbackCompositionEnd(topLevelType, nativeEvent) && (eventType = eventTypes.compositionEnd) : isFallbackCompositionStart(topLevelType, nativeEvent) && (eventType = eventTypes.compositionStart),
!eventType) return null;
useFallbackCompositionData && (currentComposition || eventType !== eventTypes.compositionStart ? eventType === eventTypes.compositionEnd && currentComposition && (fallbackData = currentComposition.getData()) : currentComposition = FallbackCompositionState.getPooled(nativeEventTarget));
var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget);
if (fallbackData) event.data = fallbackData; else {
var customData = getDataFromCustomEvent(nativeEvent);
null !== customData && (event.data = customData);
}
return EventPropagators.accumulateTwoPhaseDispatches(event), event;
}
function getNativeBeforeInputChars(topLevelType, nativeEvent) {
switch (topLevelType) {
case "topCompositionEnd":
return getDataFromCustomEvent(nativeEvent);
case "topKeyPress":
var which = nativeEvent.which;
return which !== SPACEBAR_CODE ? null : (hasSpaceKeypress = !0, SPACEBAR_CHAR);
case "topTextInput":
var chars = nativeEvent.data;
return chars === SPACEBAR_CHAR && hasSpaceKeypress ? null : chars;
default:
return null;
}
}
function getFallbackBeforeInputChars(topLevelType, nativeEvent) {
if (currentComposition) {
if ("topCompositionEnd" === topLevelType || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) {
var chars = currentComposition.getData();
return FallbackCompositionState.release(currentComposition), currentComposition = null,
chars;
}
return null;
}
switch (topLevelType) {
case "topPaste":
return null;
case "topKeyPress":
return nativeEvent.which && !isKeypressCommand(nativeEvent) ? String.fromCharCode(nativeEvent.which) : null;
case "topCompositionEnd":
return useFallbackCompositionData ? null : nativeEvent.data;
default:
return null;
}
}
function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
var chars;
if (chars = canUseTextInputEvent ? getNativeBeforeInputChars(topLevelType, nativeEvent) : getFallbackBeforeInputChars(topLevelType, nativeEvent),
!chars) return null;
var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget);
return event.data = chars, EventPropagators.accumulateTwoPhaseDispatches(event),
event;
}
var EventPropagators = __webpack_require__(54), ExecutionEnvironment = __webpack_require__(63), FallbackCompositionState = __webpack_require__(64), SyntheticCompositionEvent = __webpack_require__(68), SyntheticInputEvent = __webpack_require__(70), END_KEYCODES = [ 9, 13, 27, 32 ], START_KEYCODE = 229, canUseCompositionEvent = ExecutionEnvironment.canUseDOM && "CompositionEvent" in window, documentMode = null;
ExecutionEnvironment.canUseDOM && "documentMode" in document && (documentMode = document.documentMode);
var canUseTextInputEvent = ExecutionEnvironment.canUseDOM && "TextEvent" in window && !documentMode && !isPresto(), useFallbackCompositionData = ExecutionEnvironment.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11), SPACEBAR_CODE = 32, SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE), eventTypes = {
beforeInput: {
phasedRegistrationNames: {
bubbled: "onBeforeInput",
captured: "onBeforeInputCapture"
},
dependencies: [ "topCompositionEnd", "topKeyPress", "topTextInput", "topPaste" ]
},
compositionEnd: {
phasedRegistrationNames: {
bubbled: "onCompositionEnd",
captured: "onCompositionEndCapture"
},
dependencies: [ "topBlur", "topCompositionEnd", "topKeyDown", "topKeyPress", "topKeyUp", "topMouseDown" ]
},
compositionStart: {
phasedRegistrationNames: {
bubbled: "onCompositionStart",
captured: "onCompositionStartCapture"
},
dependencies: [ "topBlur", "topCompositionStart", "topKeyDown", "topKeyPress", "topKeyUp", "topMouseDown" ]
},
compositionUpdate: {
phasedRegistrationNames: {
bubbled: "onCompositionUpdate",
captured: "onCompositionUpdateCapture"
},
dependencies: [ "topBlur", "topCompositionUpdate", "topKeyDown", "topKeyPress", "topKeyUp", "topMouseDown" ]
}
}, hasSpaceKeypress = !1, currentComposition = null, BeforeInputEventPlugin = {
eventTypes: eventTypes,
extractEvents: function(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
return [ extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget), extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) ];
}
};
module.exports = BeforeInputEventPlugin;
}, function(module, exports, __webpack_require__) {
"use strict";
function listenerAtPhase(inst, event, propagationPhase) {
var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];
return getListener(inst, registrationName);
}
function accumulateDirectionalDispatches(inst, phase, event) {
var listener = listenerAtPhase(inst, event, phase);
listener && (event._dispatchListeners = accumulateInto(event._dispatchListeners, listener),
event._dispatchInstances = accumulateInto(event._dispatchInstances, inst));
}
function accumulateTwoPhaseDispatchesSingle(event) {
event && event.dispatchConfig.phasedRegistrationNames && EventPluginUtils.traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
}
function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {
if (event && event.dispatchConfig.phasedRegistrationNames) {
var targetInst = event._targetInst, parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;
EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);
}
}
function accumulateDispatches(inst, ignoredDirection, event) {
if (event && event.dispatchConfig.registrationName) {
var registrationName = event.dispatchConfig.registrationName, listener = getListener(inst, registrationName);
listener && (event._dispatchListeners = accumulateInto(event._dispatchListeners, listener),
event._dispatchInstances = accumulateInto(event._dispatchInstances, inst));
}
}
function accumulateDirectDispatchesSingle(event) {
event && event.dispatchConfig.registrationName && accumulateDispatches(event._targetInst, null, event);
}
function accumulateTwoPhaseDispatches(events) {
forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);
}
function accumulateTwoPhaseDispatchesSkipTarget(events) {
forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget);
}
function accumulateEnterLeaveDispatches(leave, enter, from, to) {
EventPluginUtils.traverseEnterLeave(from, to, accumulateDispatches, leave, enter);
}
function accumulateDirectDispatches(events) {
forEachAccumulated(events, accumulateDirectDispatchesSingle);
}
var EventPluginHub = __webpack_require__(55), EventPluginUtils = __webpack_require__(57), accumulateInto = __webpack_require__(61), forEachAccumulated = __webpack_require__(62), getListener = (__webpack_require__(59),
EventPluginHub.getListener), EventPropagators = {
accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches,
accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget,
accumulateDirectDispatches: accumulateDirectDispatches,
accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches
};
module.exports = EventPropagators;
}, function(module, exports, __webpack_require__) {
"use strict";
function isInteractive(tag) {
return "button" === tag || "input" === tag || "select" === tag || "textarea" === tag;
}
function shouldPreventMouseEvent(name, type, props) {
switch (name) {
case "onClick":
case "onClickCapture":
case "onDoubleClick":
case "onDoubleClickCapture":
case "onMouseDown":
case "onMouseDownCapture":
case "onMouseMove":
case "onMouseMoveCapture":
case "onMouseUp":
case "onMouseUpCapture":
return !(!props.disabled || !isInteractive(type));
default:
return !1;
}
}
var _prodInvariant = __webpack_require__(47), EventPluginRegistry = __webpack_require__(56), EventPluginUtils = __webpack_require__(57), ReactErrorUtils = __webpack_require__(58), accumulateInto = __webpack_require__(61), forEachAccumulated = __webpack_require__(62), listenerBank = (__webpack_require__(49),
{}), eventQueue = null, executeDispatchesAndRelease = function(event, simulated) {
event && (EventPluginUtils.executeDispatchesInOrder(event, simulated), event.isPersistent() || event.constructor.release(event));
}, executeDispatchesAndReleaseSimulated = function(e) {
return executeDispatchesAndRelease(e, !0);
}, executeDispatchesAndReleaseTopLevel = function(e) {
return executeDispatchesAndRelease(e, !1);
}, getDictionaryKey = function(inst) {
return "." + inst._rootNodeID;
}, EventPluginHub = {
injection: {
injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder,
injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName
},
putListener: function(inst, registrationName, listener) {
"function" != typeof listener ? _prodInvariant("94", registrationName, typeof listener) : void 0;
var key = getDictionaryKey(inst), bankForRegistrationName = listenerBank[registrationName] || (listenerBank[registrationName] = {});
bankForRegistrationName[key] = listener;
var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
PluginModule && PluginModule.didPutListener && PluginModule.didPutListener(inst, registrationName, listener);
},
getListener: function(inst, registrationName) {
var bankForRegistrationName = listenerBank[registrationName];
if (shouldPreventMouseEvent(registrationName, inst._currentElement.type, inst._currentElement.props)) return null;
var key = getDictionaryKey(inst);
return bankForRegistrationName && bankForRegistrationName[key];
},
deleteListener: function(inst, registrationName) {
var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
PluginModule && PluginModule.willDeleteListener && PluginModule.willDeleteListener(inst, registrationName);
var bankForRegistrationName = listenerBank[registrationName];
if (bankForRegistrationName) {
var key = getDictionaryKey(inst);
delete bankForRegistrationName[key];
}
},
deleteAllListeners: function(inst) {
var key = getDictionaryKey(inst);
for (var registrationName in listenerBank) if (listenerBank.hasOwnProperty(registrationName) && listenerBank[registrationName][key]) {
var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
PluginModule && PluginModule.willDeleteListener && PluginModule.willDeleteListener(inst, registrationName),
delete listenerBank[registrationName][key];
}
},
extractEvents: function(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
for (var events, plugins = EventPluginRegistry.plugins, i = 0; i < plugins.length; i++) {
var possiblePlugin = plugins[i];
if (possiblePlugin) {
var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
extractedEvents && (events = accumulateInto(events, extractedEvents));
}
}
return events;
},
enqueueEvents: function(events) {
events && (eventQueue = accumulateInto(eventQueue, events));
},
processEventQueue: function(simulated) {
var processingEventQueue = eventQueue;
eventQueue = null, simulated ? forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated) : forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel),
eventQueue ? _prodInvariant("95") : void 0, ReactErrorUtils.rethrowCaughtError();
},
__purge: function() {
listenerBank = {};
},
__getListenerBank: function() {
return listenerBank;
}
};
module.exports = EventPluginHub;
}, function(module, exports, __webpack_require__) {
"use strict";
function recomputePluginOrdering() {
if (eventPluginOrder) for (var pluginName in namesToPlugins) {
var pluginModule = namesToPlugins[pluginName], pluginIndex = eventPluginOrder.indexOf(pluginName);
if (pluginIndex > -1 ? void 0 : _prodInvariant("96", pluginName), !EventPluginRegistry.plugins[pluginIndex]) {
pluginModule.extractEvents ? void 0 : _prodInvariant("97", pluginName), EventPluginRegistry.plugins[pluginIndex] = pluginModule;
var publishedEvents = pluginModule.eventTypes;
for (var eventName in publishedEvents) publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? void 0 : _prodInvariant("98", eventName, pluginName);
}
}
}
function publishEventForPlugin(dispatchConfig, pluginModule, eventName) {
EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName) ? _prodInvariant("99", eventName) : void 0,
EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig;
var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
if (phasedRegistrationNames) {
for (var phaseName in phasedRegistrationNames) if (phasedRegistrationNames.hasOwnProperty(phaseName)) {
var phasedRegistrationName = phasedRegistrationNames[phaseName];
publishRegistrationName(phasedRegistrationName, pluginModule, eventName);
}
return !0;
}
return !!dispatchConfig.registrationName && (publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName),
!0);
}
function publishRegistrationName(registrationName, pluginModule, eventName) {
EventPluginRegistry.registrationNameModules[registrationName] ? _prodInvariant("100", registrationName) : void 0,
EventPluginRegistry.registrationNameModules[registrationName] = pluginModule, EventPluginRegistry.registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies;
}
var _prodInvariant = __webpack_require__(47), eventPluginOrder = (__webpack_require__(49),
null), namesToPlugins = {}, EventPluginRegistry = {
plugins: [],
eventNameDispatchConfigs: {},
registrationNameModules: {},
registrationNameDependencies: {},
possibleRegistrationNames: null,
injectEventPluginOrder: function(injectedEventPluginOrder) {
eventPluginOrder ? _prodInvariant("101") : void 0, eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder),
recomputePluginOrdering();
},
injectEventPluginsByName: function(injectedNamesToPlugins) {
var isOrderingDirty = !1;
for (var pluginName in injectedNamesToPlugins) if (injectedNamesToPlugins.hasOwnProperty(pluginName)) {
var pluginModule = injectedNamesToPlugins[pluginName];
namesToPlugins.hasOwnProperty(pluginName) && namesToPlugins[pluginName] === pluginModule || (namesToPlugins[pluginName] ? _prodInvariant("102", pluginName) : void 0,
namesToPlugins[pluginName] = pluginModule, isOrderingDirty = !0);
}
isOrderingDirty && recomputePluginOrdering();
},
getPluginModuleForEvent: function(event) {
var dispatchConfig = event.dispatchConfig;
if (dispatchConfig.registrationName) return EventPluginRegistry.registrationNameModules[dispatchConfig.registrationName] || null;
if (void 0 !== dispatchConfig.phasedRegistrationNames) {
var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
for (var phase in phasedRegistrationNames) if (phasedRegistrationNames.hasOwnProperty(phase)) {
var pluginModule = EventPluginRegistry.registrationNameModules[phasedRegistrationNames[phase]];
if (pluginModule) return pluginModule;
}
}
return null;
},
_resetEventPlugins: function() {
eventPluginOrder = null;
for (var pluginName in namesToPlugins) namesToPlugins.hasOwnProperty(pluginName) && delete namesToPlugins[pluginName];
EventPluginRegistry.plugins.length = 0;
var eventNameDispatchConfigs = EventPluginRegistry.eventNameDispatchConfigs;
for (var eventName in eventNameDispatchConfigs) eventNameDispatchConfigs.hasOwnProperty(eventName) && delete eventNameDispatchConfigs[eventName];
var registrationNameModules = EventPluginRegistry.registrationNameModules;
for (var registrationName in registrationNameModules) registrationNameModules.hasOwnProperty(registrationName) && delete registrationNameModules[registrationName];
}
};
module.exports = EventPluginRegistry;
}, function(module, exports, __webpack_require__) {
"use strict";
function isEndish(topLevelType) {
return "topMouseUp" === topLevelType || "topTouchEnd" === topLevelType || "topTouchCancel" === topLevelType;
}
function isMoveish(topLevelType) {
return "topMouseMove" === topLevelType || "topTouchMove" === topLevelType;
}
function isStartish(topLevelType) {
return "topMouseDown" === topLevelType || "topTouchStart" === topLevelType;
}
function executeDispatch(event, simulated, listener, inst) {
var type = event.type || "unknown-event";
event.currentTarget = EventPluginUtils.getNodeFromInstance(inst), simulated ? ReactErrorUtils.invokeGuardedCallbackWithCatch(type, listener, event) : ReactErrorUtils.invokeGuardedCallback(type, listener, event),
event.currentTarget = null;
}
function executeDispatchesInOrder(event, simulated) {
var dispatchListeners = event._dispatchListeners, dispatchInstances = event._dispatchInstances;
if (Array.isArray(dispatchListeners)) for (var i = 0; i < dispatchListeners.length && !event.isPropagationStopped(); i++) executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]); else dispatchListeners && executeDispatch(event, simulated, dispatchListeners, dispatchInstances);
event._dispatchListeners = null, event._dispatchInstances = null;
}
function executeDispatchesInOrderStopAtTrueImpl(event) {
var dispatchListeners = event._dispatchListeners, dispatchInstances = event._dispatchInstances;
if (Array.isArray(dispatchListeners)) {
for (var i = 0; i < dispatchListeners.length && !event.isPropagationStopped(); i++) if (dispatchListeners[i](event, dispatchInstances[i])) return dispatchInstances[i];
} else if (dispatchListeners && dispatchListeners(event, dispatchInstances)) return dispatchInstances;
return null;
}
function executeDispatchesInOrderStopAtTrue(event) {
var ret = executeDispatchesInOrderStopAtTrueImpl(event);
return event._dispatchInstances = null, event._dispatchListeners = null, ret;
}
function executeDirectDispatch(event) {
var dispatchListener = event._dispatchListeners, dispatchInstance = event._dispatchInstances;
Array.isArray(dispatchListener) ? _prodInvariant("103") : void 0, event.currentTarget = dispatchListener ? EventPluginUtils.getNodeFromInstance(dispatchInstance) : null;
var res = dispatchListener ? dispatchListener(event) : null;
return event.currentTarget = null, event._dispatchListeners = null, event._dispatchInstances = null,
res;
}
function hasDispatches(event) {
return !!event._dispatchListeners;
}
var ComponentTree, TreeTraversal, _prodInvariant = __webpack_require__(47), ReactErrorUtils = __webpack_require__(58), injection = (__webpack_require__(49),
__webpack_require__(59), {
injectComponentTree: function(Injected) {
ComponentTree = Injected;
},
injectTreeTraversal: function(Injected) {
TreeTraversal = Injected;
}
}), EventPluginUtils = {
isEndish: isEndish,
isMoveish: isMoveish,
isStartish: isStartish,
executeDirectDispatch: executeDirectDispatch,
executeDispatchesInOrder: executeDispatchesInOrder,
executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue,
hasDispatches: hasDispatches,
getInstanceFromNode: function(node) {
return ComponentTree.getInstanceFromNode(node);
},
getNodeFromInstance: function(node) {
return ComponentTree.getNodeFromInstance(node);
},
isAncestor: function(a, b) {
return TreeTraversal.isAncestor(a, b);
},
getLowestCommonAncestor: function(a, b) {
return TreeTraversal.getLowestCommonAncestor(a, b);
},
getParentInstance: function(inst) {
return TreeTraversal.getParentInstance(inst);
},
traverseTwoPhase: function(target, fn, arg) {
return TreeTraversal.traverseTwoPhase(target, fn, arg);
},
traverseEnterLeave: function(from, to, fn, argFrom, argTo) {
return TreeTraversal.traverseEnterLeave(from, to, fn, argFrom, argTo);
},
injection: injection
};
module.exports = EventPluginUtils;
}, function(module, exports, __webpack_require__) {
"use strict";
function invokeGuardedCallback(name, func, a) {
try {
func(a);
} catch (x) {
null === caughtError && (caughtError = x);
}
}
var caughtError = null, ReactErrorUtils = {
invokeGuardedCallback: invokeGuardedCallback,
invokeGuardedCallbackWithCatch: invokeGuardedCallback,
rethrowCaughtError: function() {
if (caughtError) {
var error = caughtError;
throw caughtError = null, error;
}
}
};
module.exports = ReactErrorUtils;
}, function(module, exports, __webpack_require__) {
"use strict";
var emptyFunction = __webpack_require__(60), warning = emptyFunction;
module.exports = warning;
}, function(module, exports) {
"use strict";
function makeEmptyFunction(arg) {
return function() {
return arg;
};
}
var emptyFunction = function() {};
emptyFunction.thatReturns = makeEmptyFunction, emptyFunction.thatReturnsFalse = makeEmptyFunction(!1),
emptyFunction.thatReturnsTrue = makeEmptyFunction(!0), emptyFunction.thatReturnsNull = makeEmptyFunction(null),
emptyFunction.thatReturnsThis = function() {
return this;
}, emptyFunction.thatReturnsArgument = function(arg) {
return arg;
}, module.exports = emptyFunction;
}, function(module, exports, __webpack_require__) {
"use strict";
function accumulateInto(current, next) {
return null == next ? _prodInvariant("30") : void 0, null == current ? next : Array.isArray(current) ? Array.isArray(next) ? (current.push.apply(current, next),
current) : (current.push(next), current) : Array.isArray(next) ? [ current ].concat(next) : [ current, next ];
}
var _prodInvariant = __webpack_require__(47);
__webpack_require__(49);
module.exports = accumulateInto;
}, function(module, exports) {
"use strict";
function forEachAccumulated(arr, cb, scope) {
Array.isArray(arr) ? arr.forEach(cb, scope) : arr && cb.call(scope, arr);
}
module.exports = forEachAccumulated;
}, function(module, exports) {
"use strict";
var canUseDOM = !("undefined" == typeof window || !window.document || !window.document.createElement), ExecutionEnvironment = {
canUseDOM: canUseDOM,
canUseWorkers: "undefined" != typeof Worker,
canUseEventListeners: canUseDOM && !(!window.addEventListener && !window.attachEvent),
canUseViewport: canUseDOM && !!window.screen,
isInWorker: !canUseDOM
};
module.exports = ExecutionEnvironment;
}, function(module, exports, __webpack_require__) {
"use strict";
function FallbackCompositionState(root) {
this._root = root, this._startText = this.getText(), this._fallbackText = null;
}
var _assign = __webpack_require__(65), PooledClass = __webpack_require__(66), getTextContentAccessor = __webpack_require__(67);
_assign(FallbackCompositionState.prototype, {
destructor: function() {
this._root = null, this._startText = null, this._fallbackText = null;
},
getText: function() {
return "value" in this._root ? this._root.value : this._root[getTextContentAccessor()];
},
getData: function() {
if (this._fallbackText) return this._fallbackText;
var start, end, startValue = this._startText, startLength = startValue.length, endValue = this.getText(), endLength = endValue.length;
for (start = 0; start < startLength && startValue[start] === endValue[start]; start++) ;
var minEnd = startLength - start;
for (end = 1; end <= minEnd && startValue[startLength - end] === endValue[endLength - end]; end++) ;
var sliceTail = end > 1 ? 1 - end : void 0;
return this._fallbackText = endValue.slice(start, sliceTail), this._fallbackText;
}
}), PooledClass.addPoolingTo(FallbackCompositionState), module.exports = FallbackCompositionState;
}, function(module, exports) {
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
"use strict";
function toObject(val) {
if (null === val || void 0 === val) throw new TypeError("Object.assign cannot be called with null or undefined");
return Object(val);
}
function shouldUseNative() {
try {
if (!Object.assign) return !1;
var test1 = new String("abc");
if (test1[5] = "de", "5" === Object.getOwnPropertyNames(test1)[0]) return !1;
for (var test2 = {}, i = 0; i < 10; i++) test2["_" + String.fromCharCode(i)] = i;
var order2 = Object.getOwnPropertyNames(test2).map(function(n) {
return test2[n];
});
if ("0123456789" !== order2.join("")) return !1;
var test3 = {};
return "abcdefghijklmnopqrst".split("").forEach(function(letter) {
test3[letter] = letter;
}), "abcdefghijklmnopqrst" === Object.keys(Object.assign({}, test3)).join("");
} catch (err) {
return !1;
}
}
var getOwnPropertySymbols = Object.getOwnPropertySymbols, hasOwnProperty = Object.prototype.hasOwnProperty, propIsEnumerable = Object.prototype.propertyIsEnumerable;
module.exports = shouldUseNative() ? Object.assign : function(target, source) {
for (var from, symbols, to = toObject(target), s = 1; s < arguments.length; s++) {
from = Object(arguments[s]);
for (var key in from) hasOwnProperty.call(from, key) && (to[key] = from[key]);
if (getOwnPropertySymbols) {
symbols = getOwnPropertySymbols(from);
for (var i = 0; i < symbols.length; i++) propIsEnumerable.call(from, symbols[i]) && (to[symbols[i]] = from[symbols[i]]);
}
}
return to;
};
}, function(module, exports, __webpack_require__) {
"use strict";
var _prodInvariant = __webpack_require__(47), oneArgumentPooler = (__webpack_require__(49),
function(copyFieldsFrom) {
var Klass = this;
if (Klass.instancePool.length) {
var instance = Klass.instancePool.pop();
return Klass.call(instance, copyFieldsFrom), instance;
}
return new Klass(copyFieldsFrom);
}), twoArgumentPooler = function(a1, a2) {
var Klass = this;
if (Klass.instancePool.length) {
var instance = Klass.instancePool.pop();
return Klass.call(instance, a1, a2), instance;
}
return new Klass(a1, a2);
}, threeArgumentPooler = function(a1, a2, a3) {
var Klass = this;
if (Klass.instancePool.length) {
var instance = Klass.instancePool.pop();
return Klass.call(instance, a1, a2, a3), instance;
}
return new Klass(a1, a2, a3);
}, fourArgumentPooler = function(a1, a2, a3, a4) {
var Klass = this;
if (Klass.instancePool.length) {
var instance = Klass.instancePool.pop();
return Klass.call(instance, a1, a2, a3, a4), instance;
}
return new Klass(a1, a2, a3, a4);
}, standardReleaser = function(instance) {
var Klass = this;
instance instanceof Klass ? void 0 : _prodInvariant("25"), instance.destructor(),
Klass.instancePool.length < Klass.poolSize && Klass.instancePool.push(instance);
}, DEFAULT_POOL_SIZE = 10, DEFAULT_POOLER = oneArgumentPooler, addPoolingTo = function(CopyConstructor, pooler) {
var NewKlass = CopyConstructor;
return NewKlass.instancePool = [], NewKlass.getPooled = pooler || DEFAULT_POOLER,
NewKlass.poolSize || (NewKlass.poolSize = DEFAULT_POOL_SIZE), NewKlass.release = standardReleaser,
NewKlass;
}, PooledClass = {
addPoolingTo: addPoolingTo,
oneArgumentPooler: oneArgumentPooler,
twoArgumentPooler: twoArgumentPooler,
threeArgumentPooler: threeArgumentPooler,
fourArgumentPooler: fourArgumentPooler
};
module.exports = PooledClass;
}, function(module, exports, __webpack_require__) {
"use strict";
function getTextContentAccessor() {
return !contentKey && ExecutionEnvironment.canUseDOM && (contentKey = "textContent" in document.documentElement ? "textContent" : "innerText"),
contentKey;
}
var ExecutionEnvironment = __webpack_require__(63), contentKey = null;
module.exports = getTextContentAccessor;
}, function(module, exports, __webpack_require__) {
"use strict";
function SyntheticCompositionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
}
var SyntheticEvent = __webpack_require__(69), CompositionEventInterface = {
data: null
};
SyntheticEvent.augmentClass(SyntheticCompositionEvent, CompositionEventInterface),
module.exports = SyntheticCompositionEvent;
}, function(module, exports, __webpack_require__) {
"use strict";
function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) {
this.dispatchConfig = dispatchConfig, this._targetInst = targetInst, this.nativeEvent = nativeEvent;
var Interface = this.constructor.Interface;
for (var propName in Interface) if (Interface.hasOwnProperty(propName)) {
var normalize = Interface[propName];
normalize ? this[propName] = normalize(nativeEvent) : "target" === propName ? this.target = nativeEventTarget : this[propName] = nativeEvent[propName];
}
var defaultPrevented = null != nativeEvent.defaultPrevented ? nativeEvent.defaultPrevented : nativeEvent.returnValue === !1;
return defaultPrevented ? this.isDefaultPrevented = emptyFunction.thatReturnsTrue : this.isDefaultPrevented = emptyFunction.thatReturnsFalse,
this.isPropagationStopped = emptyFunction.thatReturnsFalse, this;
}
var _assign = __webpack_require__(65), PooledClass = __webpack_require__(66), emptyFunction = __webpack_require__(60), shouldBeReleasedProperties = (__webpack_require__(59),
"function" == typeof Proxy, [ "dispatchConfig", "_targetInst", "nativeEvent", "isDefaultPrevented", "isPropagationStopped", "_dispatchListeners", "_dispatchInstances" ]), EventInterface = {
type: null,
target: null,
currentTarget: emptyFunction.thatReturnsNull,
eventPhase: null,
bubbles: null,
cancelable: null,
timeStamp: function(event) {
return event.timeStamp || Date.now();
},
defaultPrevented: null,
isTrusted: null
};
_assign(SyntheticEvent.prototype, {
preventDefault: function() {
this.defaultPrevented = !0;
var event = this.nativeEvent;
event && (event.preventDefault ? event.preventDefault() : "unknown" != typeof event.returnValue && (event.returnValue = !1),
this.isDefaultPrevented = emptyFunction.thatReturnsTrue);
},
stopPropagation: function() {
var event = this.nativeEvent;
event && (event.stopPropagation ? event.stopPropagation() : "unknown" != typeof event.cancelBubble && (event.cancelBubble = !0),
this.isPropagationStopped = emptyFunction.thatReturnsTrue);
},
persist: function() {
this.isPersistent = emptyFunction.thatReturnsTrue;
},
isPersistent: emptyFunction.thatReturnsFalse,
destructor: function() {
var Interface = this.constructor.Interface;
for (var propName in Interface) this[propName] = null;
for (var i = 0; i < shouldBeReleasedProperties.length; i++) this[shouldBeReleasedProperties[i]] = null;
}
}), SyntheticEvent.Interface = EventInterface, SyntheticEvent.augmentClass = function(Class, Interface) {
var Super = this, E = function() {};
E.prototype = Super.prototype;
var prototype = new E();
_assign(prototype, Class.prototype), Class.prototype = prototype, Class.prototype.constructor = Class,
Class.Interface = _assign({}, Super.Interface, Interface), Class.augmentClass = Super.augmentClass,
PooledClass.addPoolingTo(Class, PooledClass.fourArgumentPooler);
}, PooledClass.addPoolingTo(SyntheticEvent, PooledClass.fourArgumentPooler), module.exports = SyntheticEvent;
}, function(module, exports, __webpack_require__) {
"use strict";
function SyntheticInputEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
}
var SyntheticEvent = __webpack_require__(69), InputEventInterface = {
data: null
};
SyntheticEvent.augmentClass(SyntheticInputEvent, InputEventInterface), module.exports = SyntheticInputEvent;
}, function(module, exports, __webpack_require__) {
"use strict";
function shouldUseChangeEvent(elem) {
var nodeName = elem.nodeName && elem.nodeName.toLowerCase();
return "select" === nodeName || "input" === nodeName && "file" === elem.type;
}
function manualDispatchChangeEvent(nativeEvent) {
var event = SyntheticEvent.getPooled(eventTypes.change, activeElementInst, nativeEvent, getEventTarget(nativeEvent));
EventPropagators.accumulateTwoPhaseDispatches(event), ReactUpdates.batchedUpdates(runEventInBatch, event);
}
function runEventInBatch(event) {
EventPluginHub.enqueueEvents(event), EventPluginHub.processEventQueue(!1);
}
function startWatchingForChangeEventIE8(target, targetInst) {
activeElement = target, activeElementInst = targetInst, activeElement.attachEvent("onchange", manualDispatchChangeEvent);
}
function stopWatchingForChangeEventIE8() {
activeElement && (activeElement.detachEvent("onchange", manualDispatchChangeEvent),
activeElement = null, activeElementInst = null);
}
function getTargetInstForChangeEvent(topLevelType, targetInst) {
if ("topChange" === topLevelType) return targetInst;
}
function handleEventsForChangeEventIE8(topLevelType, target, targetInst) {
"topFocus" === topLevelType ? (stopWatchingForChangeEventIE8(), startWatchingForChangeEventIE8(target, targetInst)) : "topBlur" === topLevelType && stopWatchingForChangeEventIE8();
}
function startWatchingForValueChange(target, targetInst) {
activeElement = target, activeElementInst = targetInst, activeElementValue = target.value,
activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, "value"),
Object.defineProperty(activeElement, "value", newValueProp), activeElement.attachEvent ? activeElement.attachEvent("onpropertychange", handlePropertyChange) : activeElement.addEventListener("propertychange", handlePropertyChange, !1);
}
function stopWatchingForValueChange() {
activeElement && (delete activeElement.value, activeElement.detachEvent ? activeElement.detachEvent("onpropertychange", handlePropertyChange) : activeElement.removeEventListener("propertychange", handlePropertyChange, !1),
activeElement = null, activeElementInst = null, activeElementValue = null, activeElementValueProp = null);
}
function handlePropertyChange(nativeEvent) {
if ("value" === nativeEvent.propertyName) {
var value = nativeEvent.srcElement.value;
value !== activeElementValue && (activeElementValue = value, manualDispatchChangeEvent(nativeEvent));
}
}
function getTargetInstForInputEvent(topLevelType, targetInst) {
if ("topInput" === topLevelType) return targetInst;
}
function handleEventsForInputEventIE(topLevelType, target, targetInst) {
"topFocus" === topLevelType ? (stopWatchingForValueChange(), startWatchingForValueChange(target, targetInst)) : "topBlur" === topLevelType && stopWatchingForValueChange();
}
function getTargetInstForInputEventIE(topLevelType, targetInst) {
if (("topSelectionChange" === topLevelType || "topKeyUp" === topLevelType || "topKeyDown" === topLevelType) && activeElement && activeElement.value !== activeElementValue) return activeElementValue = activeElement.value,
activeElementInst;
}
function shouldUseClickEvent(elem) {
return elem.nodeName && "input" === elem.nodeName.toLowerCase() && ("checkbox" === elem.type || "radio" === elem.type);
}
function getTargetInstForClickEvent(topLevelType, targetInst) {
if ("topClick" === topLevelType) return targetInst;
}
var EventPluginHub = __webpack_require__(55), EventPropagators = __webpack_require__(54), ExecutionEnvironment = __webpack_require__(63), ReactDOMComponentTree = __webpack_require__(46), ReactUpdates = __webpack_require__(72), SyntheticEvent = __webpack_require__(69), getEventTarget = __webpack_require__(80), isEventSupported = __webpack_require__(81), isTextInputElement = __webpack_require__(82), eventTypes = {
change: {
phasedRegistrationNames: {
bubbled: "onChange",
captured: "onChangeCapture"
},
dependencies: [ "topBlur", "topChange", "topClick", "topFocus", "topInput", "topKeyDown", "topKeyUp", "topSelectionChange" ]
}
}, activeElement = null, activeElementInst = null, activeElementValue = null, activeElementValueProp = null, doesChangeEventBubble = !1;
ExecutionEnvironment.canUseDOM && (doesChangeEventBubble = isEventSupported("change") && (!document.documentMode || document.documentMode > 8));
var isInputEventSupported = !1;
ExecutionEnvironment.canUseDOM && (isInputEventSupported = isEventSupported("input") && (!document.documentMode || document.documentMode > 11));
var newValueProp = {
get: function() {
return activeElementValueProp.get.call(this);
},
set: function(val) {
activeElementValue = "" + val, activeElementValueProp.set.call(this, val);
}
}, ChangeEventPlugin = {
eventTypes: eventTypes,
extractEvents: function(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
var getTargetInstFunc, handleEventFunc, targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window;
if (shouldUseChangeEvent(targetNode) ? doesChangeEventBubble ? getTargetInstFunc = getTargetInstForChangeEvent : handleEventFunc = handleEventsForChangeEventIE8 : isTextInputElement(targetNode) ? isInputEventSupported ? getTargetInstFunc = getTargetInstForInputEvent : (getTargetInstFunc = getTargetInstForInputEventIE,
handleEventFunc = handleEventsForInputEventIE) : shouldUseClickEvent(targetNode) && (getTargetInstFunc = getTargetInstForClickEvent),
getTargetInstFunc) {
var inst = getTargetInstFunc(topLevelType, targetInst);
if (inst) {
var event = SyntheticEvent.getPooled(eventTypes.change, inst, nativeEvent, nativeEventTarget);
return event.type = "change", EventPropagators.accumulateTwoPhaseDispatches(event),
event;
}
}
handleEventFunc && handleEventFunc(topLevelType, targetNode, targetInst);
}
};
module.exports = ChangeEventPlugin;
}, function(module, exports, __webpack_require__) {
"use strict";
function ensureInjected() {
ReactUpdates.ReactReconcileTransaction && batchingStrategy ? void 0 : _prodInvariant("123");
}
function ReactUpdatesFlushTransaction() {
this.reinitializeTransaction(), this.dirtyComponentsLength = null, this.callbackQueue = CallbackQueue.getPooled(),
this.reconcileTransaction = ReactUpdates.ReactReconcileTransaction.getPooled(!0);
}
function batchedUpdates(callback, a, b, c, d, e) {
return ensureInjected(), batchingStrategy.batchedUpdates(callback, a, b, c, d, e);
}
function mountOrderComparator(c1, c2) {
return c1._mountOrder - c2._mountOrder;
}
function runBatchedUpdates(transaction) {
var len = transaction.dirtyComponentsLength;
len !== dirtyComponents.length ? _prodInvariant("124", len, dirtyComponents.length) : void 0,
dirtyComponents.sort(mountOrderComparator), updateBatchNumber++;
for (var i = 0; i < len; i++) {
var component = dirtyComponents[i], callbacks = component._pendingCallbacks;
component._pendingCallbacks = null;
var markerName;
if (ReactFeatureFlags.logTopLevelRenders) {
var namedComponent = component;
component._currentElement.type.isReactTopLevelWrapper && (namedComponent = component._renderedComponent),
markerName = "React update: " + namedComponent.getName(), console.time(markerName);
}
if (ReactReconciler.performUpdateIfNecessary(component, transaction.reconcileTransaction, updateBatchNumber),
markerName && console.timeEnd(markerName), callbacks) for (var j = 0; j < callbacks.length; j++) transaction.callbackQueue.enqueue(callbacks[j], component.getPublicInstance());
}
}
function enqueueUpdate(component) {
return ensureInjected(), batchingStrategy.isBatchingUpdates ? (dirtyComponents.push(component),
void (null == component._updateBatchNumber && (component._updateBatchNumber = updateBatchNumber + 1))) : void batchingStrategy.batchedUpdates(enqueueUpdate, component);
}
function asap(callback, context) {
batchingStrategy.isBatchingUpdates ? void 0 : _prodInvariant("125"), asapCallbackQueue.enqueue(callback, context),
asapEnqueued = !0;
}
var _prodInvariant = __webpack_require__(47), _assign = __webpack_require__(65), CallbackQueue = __webpack_require__(73), PooledClass = __webpack_require__(66), ReactFeatureFlags = __webpack_require__(74), ReactReconciler = __webpack_require__(75), Transaction = __webpack_require__(79), dirtyComponents = (__webpack_require__(49),
[]), updateBatchNumber = 0, asapCallbackQueue = CallbackQueue.getPooled(), asapEnqueued = !1, batchingStrategy = null, NESTED_UPDATES = {
initialize: function() {
this.dirtyComponentsLength = dirtyComponents.length;
},
close: function() {
this.dirtyComponentsLength !== dirtyComponents.length ? (dirtyComponents.splice(0, this.dirtyComponentsLength),
flushBatchedUpdates()) : dirtyComponents.length = 0;
}
}, UPDATE_QUEUEING = {
initialize: function() {
this.callbackQueue.reset();
},
close: function() {
this.callbackQueue.notifyAll();
}
}, TRANSACTION_WRAPPERS = [ NESTED_UPDATES, UPDATE_QUEUEING ];
_assign(ReactUpdatesFlushTransaction.prototype, Transaction, {
getTransactionWrappers: function() {
return TRANSACTION_WRAPPERS;
},
destructor: function() {
this.dirtyComponentsLength = null, CallbackQueue.release(this.callbackQueue), this.callbackQueue = null,
ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction), this.reconcileTransaction = null;
},
perform: function(method, scope, a) {
return Transaction.perform.call(this, this.reconcileTransaction.perform, this.reconcileTransaction, method, scope, a);
}
}), PooledClass.addPoolingTo(ReactUpdatesFlushTransaction);
var flushBatchedUpdates = function() {
for (;dirtyComponents.length || asapEnqueued; ) {
if (dirtyComponents.length) {
var transaction = ReactUpdatesFlushTransaction.getPooled();
transaction.perform(runBatchedUpdates, null, transaction), ReactUpdatesFlushTransaction.release(transaction);
}
if (asapEnqueued) {
asapEnqueued = !1;
var queue = asapCallbackQueue;
asapCallbackQueue = CallbackQueue.getPooled(), queue.notifyAll(), CallbackQueue.release(queue);
}
}
}, ReactUpdatesInjection = {
injectReconcileTransaction: function(ReconcileTransaction) {
ReconcileTransaction ? void 0 : _prodInvariant("126"), ReactUpdates.ReactReconcileTransaction = ReconcileTransaction;
},
injectBatchingStrategy: function(_batchingStrategy) {
_batchingStrategy ? void 0 : _prodInvariant("127"), "function" != typeof _batchingStrategy.batchedUpdates ? _prodInvariant("128") : void 0,
"boolean" != typeof _batchingStrategy.isBatchingUpdates ? _prodInvariant("129") : void 0,
batchingStrategy = _batchingStrategy;
}
}, ReactUpdates = {
ReactReconcileTransaction: null,
batchedUpdates: batchedUpdates,
enqueueUpdate: enqueueUpdate,
flushBatchedUpdates: flushBatchedUpdates,
injection: ReactUpdatesInjection,
asap: asap
};
module.exports = ReactUpdates;
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
var _prodInvariant = __webpack_require__(47), PooledClass = __webpack_require__(66), CallbackQueue = (__webpack_require__(49),
function() {
function CallbackQueue(arg) {
_classCallCheck(this, CallbackQueue), this._callbacks = null, this._contexts = null,
this._arg = arg;
}
return CallbackQueue.prototype.enqueue = function(callback, context) {
this._callbacks = this._callbacks || [], this._callbacks.push(callback), this._contexts = this._contexts || [],
this._contexts.push(context);
}, CallbackQueue.prototype.notifyAll = function() {
var callbacks = this._callbacks, contexts = this._contexts, arg = this._arg;
if (callbacks && contexts) {
callbacks.length !== contexts.length ? _prodInvariant("24") : void 0, this._callbacks = null,
this._contexts = null;
for (var i = 0; i < callbacks.length; i++) callbacks[i].call(contexts[i], arg);
callbacks.length = 0, contexts.length = 0;
}
}, CallbackQueue.prototype.checkpoint = function() {
return this._callbacks ? this._callbacks.length : 0;
}, CallbackQueue.prototype.rollback = function(len) {
this._callbacks && this._contexts && (this._callbacks.length = len, this._contexts.length = len);
}, CallbackQueue.prototype.reset = function() {
this._callbacks = null, this._contexts = null;
}, CallbackQueue.prototype.destructor = function() {
this.reset();
}, CallbackQueue;
}());
module.exports = PooledClass.addPoolingTo(CallbackQueue);
}, function(module, exports) {
"use strict";
var ReactFeatureFlags = {
logTopLevelRenders: !1
};
module.exports = ReactFeatureFlags;
}, function(module, exports, __webpack_require__) {
"use strict";
function attachRefs() {
ReactRef.attachRefs(this, this._currentElement);
}
var ReactRef = __webpack_require__(76), ReactReconciler = (__webpack_require__(78),
__webpack_require__(59), {
mountComponent: function(internalInstance, transaction, hostParent, hostContainerInfo, context, parentDebugID) {
var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context, parentDebugID);
return internalInstance._currentElement && null != internalInstance._currentElement.ref && transaction.getReactMountReady().enqueue(attachRefs, internalInstance),
markup;
},
getHostNode: function(internalInstance) {
return internalInstance.getHostNode();
},
unmountComponent: function(internalInstance, safely) {
ReactRef.detachRefs(internalInstance, internalInstance._currentElement), internalInstance.unmountComponent(safely);
},
receiveComponent: function(internalInstance, nextElement, transaction, context) {
var prevElement = internalInstance._currentElement;
if (nextElement !== prevElement || context !== internalInstance._context) {
var refsChanged = ReactRef.shouldUpdateRefs(prevElement, nextElement);
refsChanged && ReactRef.detachRefs(internalInstance, prevElement), internalInstance.receiveComponent(nextElement, transaction, context),
refsChanged && internalInstance._currentElement && null != internalInstance._currentElement.ref && transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
}
},
performUpdateIfNecessary: function(internalInstance, transaction, updateBatchNumber) {
internalInstance._updateBatchNumber === updateBatchNumber && internalInstance.performUpdateIfNecessary(transaction);
}
});
module.exports = ReactReconciler;
}, function(module, exports, __webpack_require__) {
"use strict";
function attachRef(ref, component, owner) {
"function" == typeof ref ? ref(component.getPublicInstance()) : ReactOwner.addComponentAsRefTo(component, ref, owner);
}
function detachRef(ref, component, owner) {
"function" == typeof ref ? ref(null) : ReactOwner.removeComponentAsRefFrom(component, ref, owner);
}
var ReactOwner = __webpack_require__(77), ReactRef = {};
ReactRef.attachRefs = function(instance, element) {
if (null !== element && "object" == typeof element) {
var ref = element.ref;
null != ref && attachRef(ref, instance, element._owner);
}
}, ReactRef.shouldUpdateRefs = function(prevElement, nextElement) {
var prevRef = null, prevOwner = null;
null !== prevElement && "object" == typeof prevElement && (prevRef = prevElement.ref,
prevOwner = prevElement._owner);
var nextRef = null, nextOwner = null;
return null !== nextElement && "object" == typeof nextElement && (nextRef = nextElement.ref,
nextOwner = nextElement._owner), prevRef !== nextRef || "string" == typeof nextRef && nextOwner !== prevOwner;
}, ReactRef.detachRefs = function(instance, element) {
if (null !== element && "object" == typeof element) {
var ref = element.ref;
null != ref && detachRef(ref, instance, element._owner);
}
}, module.exports = ReactRef;
}, function(module, exports, __webpack_require__) {
"use strict";
function isValidOwner(object) {
return !(!object || "function" != typeof object.attachRef || "function" != typeof object.detachRef);
}
var _prodInvariant = __webpack_require__(47), ReactOwner = (__webpack_require__(49),
{
addComponentAsRefTo: function(component, ref, owner) {
isValidOwner(owner) ? void 0 : _prodInvariant("119"), owner.attachRef(ref, component);
},
removeComponentAsRefFrom: function(component, ref, owner) {
isValidOwner(owner) ? void 0 : _prodInvariant("120");
var ownerPublicInstance = owner.getPublicInstance();
ownerPublicInstance && ownerPublicInstance.refs[ref] === component.getPublicInstance() && owner.detachRef(ref);
}
});
module.exports = ReactOwner;
}, function(module, exports, __webpack_require__) {
"use strict";
var debugTool = null;
module.exports = {
debugTool: debugTool
};
}, function(module, exports, __webpack_require__) {
"use strict";
var _prodInvariant = __webpack_require__(47), OBSERVED_ERROR = (__webpack_require__(49),
{}), TransactionImpl = {
reinitializeTransaction: function() {
this.transactionWrappers = this.getTransactionWrappers(), this.wrapperInitData ? this.wrapperInitData.length = 0 : this.wrapperInitData = [],
this._isInTransaction = !1;
},
_isInTransaction: !1,
getTransactionWrappers: null,
isInTransaction: function() {
return !!this._isInTransaction;
},
perform: function(method, scope, a, b, c, d, e, f) {
this.isInTransaction() ? _prodInvariant("27") : void 0;
var errorThrown, ret;
try {
this._isInTransaction = !0, errorThrown = !0, this.initializeAll(0), ret = method.call(scope, a, b, c, d, e, f),
errorThrown = !1;
} finally {
try {
if (errorThrown) try {
this.closeAll(0);
} catch (err) {} else this.closeAll(0);
} finally {
this._isInTransaction = !1;
}
}
return ret;
},
initializeAll: function(startIndex) {
for (var transactionWrappers = this.transactionWrappers, i = startIndex; i < transactionWrappers.length; i++) {
var wrapper = transactionWrappers[i];
try {
this.wrapperInitData[i] = OBSERVED_ERROR, this.wrapperInitData[i] = wrapper.initialize ? wrapper.initialize.call(this) : null;
} finally {
if (this.wrapperInitData[i] === OBSERVED_ERROR) try {
this.initializeAll(i + 1);
} catch (err) {}
}
}
},
closeAll: function(startIndex) {
this.isInTransaction() ? void 0 : _prodInvariant("28");
for (var transactionWrappers = this.transactionWrappers, i = startIndex; i < transactionWrappers.length; i++) {
var errorThrown, wrapper = transactionWrappers[i], initData = this.wrapperInitData[i];
try {
errorThrown = !0, initData !== OBSERVED_ERROR && wrapper.close && wrapper.close.call(this, initData),
errorThrown = !1;
} finally {
if (errorThrown) try {
this.closeAll(i + 1);
} catch (e) {}
}
}
this.wrapperInitData.length = 0;
}
};
module.exports = TransactionImpl;
}, function(module, exports) {
"use strict";
function getEventTarget(nativeEvent) {
var target = nativeEvent.target || nativeEvent.srcElement || window;
return target.correspondingUseElement && (target = target.correspondingUseElement),
3 === target.nodeType ? target.parentNode : target;
}
module.exports = getEventTarget;
}, function(module, exports, __webpack_require__) {
"use strict";
/**
* Checks if an event is supported in the current execution environment.
*
* NOTE: This will not work correctly for non-generic events such as `change`,
* `reset`, `load`, `error`, and `select`.
*
* Borrows from Modernizr.
*
* @param {string} eventNameSuffix Event name, e.g. "click".
* @param {?boolean} capture Check if the capture phase is supported.
* @return {boolean} True if the event is supported.
* @internal
* @license Modernizr 3.0.0pre (Custom Build) | MIT
*/
function isEventSupported(eventNameSuffix, capture) {
if (!ExecutionEnvironment.canUseDOM || capture && !("addEventListener" in document)) return !1;
var eventName = "on" + eventNameSuffix, isSupported = eventName in document;
if (!isSupported) {
var element = document.createElement("div");
element.setAttribute(eventName, "return;"), isSupported = "function" == typeof element[eventName];
}
return !isSupported && useHasFeature && "wheel" === eventNameSuffix && (isSupported = document.implementation.hasFeature("Events.wheel", "3.0")),
isSupported;
}
var useHasFeature, ExecutionEnvironment = __webpack_require__(63);
ExecutionEnvironment.canUseDOM && (useHasFeature = document.implementation && document.implementation.hasFeature && document.implementation.hasFeature("", "") !== !0),
module.exports = isEventSupported;
}, function(module, exports) {
"use strict";
function isTextInputElement(elem) {
var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
return "input" === nodeName ? !!supportedInputTypes[elem.type] : "textarea" === nodeName;
}
var supportedInputTypes = {
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
};
module.exports = isTextInputElement;
}, function(module, exports) {
"use strict";
var DefaultEventPluginOrder = [ "ResponderEventPlugin", "SimpleEventPlugin", "TapEventPlugin", "EnterLeaveEventPlugin", "ChangeEventPlugin", "SelectEventPlugin", "BeforeInputEventPlugin" ];
module.exports = DefaultEventPluginOrder;
}, function(module, exports, __webpack_require__) {
"use strict";
var EventPropagators = __webpack_require__(54), ReactDOMComponentTree = __webpack_require__(46), SyntheticMouseEvent = __webpack_require__(85), eventTypes = {
mouseEnter: {
registrationName: "onMouseEnter",
dependencies: [ "topMouseOut", "topMouseOver" ]
},
mouseLeave: {
registrationName: "onMouseLeave",
dependencies: [ "topMouseOut", "topMouseOver" ]
}
}, EnterLeaveEventPlugin = {
eventTypes: eventTypes,
extractEvents: function(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
if ("topMouseOver" === topLevelType && (nativeEvent.relatedTarget || nativeEvent.fromElement)) return null;
if ("topMouseOut" !== topLevelType && "topMouseOver" !== topLevelType) return null;
var win;
if (nativeEventTarget.window === nativeEventTarget) win = nativeEventTarget; else {
var doc = nativeEventTarget.ownerDocument;
win = doc ? doc.defaultView || doc.parentWindow : window;
}
var from, to;
if ("topMouseOut" === topLevelType) {
from = targetInst;
var related = nativeEvent.relatedTarget || nativeEvent.toElement;
to = related ? ReactDOMComponentTree.getClosestInstanceFromNode(related) : null;
} else from = null, to = targetInst;
if (from === to) return null;
var fromNode = null == from ? win : ReactDOMComponentTree.getNodeFromInstance(from), toNode = null == to ? win : ReactDOMComponentTree.getNodeFromInstance(to), leave = SyntheticMouseEvent.getPooled(eventTypes.mouseLeave, from, nativeEvent, nativeEventTarget);
leave.type = "mouseleave", leave.target = fromNode, leave.relatedTarget = toNode;
var enter = SyntheticMouseEvent.getPooled(eventTypes.mouseEnter, to, nativeEvent, nativeEventTarget);
return enter.type = "mouseenter", enter.target = toNode, enter.relatedTarget = fromNode,
EventPropagators.accumulateEnterLeaveDispatches(leave, enter, from, to), [ leave, enter ];
}
};
module.exports = EnterLeaveEventPlugin;
}, function(module, exports, __webpack_require__) {
"use strict";
function SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
}
var SyntheticUIEvent = __webpack_require__(86), ViewportMetrics = __webpack_require__(87), getEventModifierState = __webpack_require__(88), MouseEventInterface = {
screenX: null,
screenY: null,
clientX: null,
clientY: null,
ctrlKey: null,
shiftKey: null,
altKey: null,
metaKey: null,
getModifierState: getEventModifierState,
button: function(event) {
var button = event.button;
return "which" in event ? button : 2 === button ? 2 : 4 === button ? 1 : 0;
},
buttons: null,
relatedTarget: function(event) {
return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement);
},
pageX: function(event) {
return "pageX" in event ? event.pageX : event.clientX + ViewportMetrics.currentScrollLeft;
},
pageY: function(event) {
return "pageY" in event ? event.pageY : event.clientY + ViewportMetrics.currentScrollTop;
}
};
SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface), module.exports = SyntheticMouseEvent;
}, function(module, exports, __webpack_require__) {
"use strict";
function SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
}
var SyntheticEvent = __webpack_require__(69), getEventTarget = __webpack_require__(80), UIEventInterface = {
view: function(event) {
if (event.view) return event.view;
var target = getEventTarget(event);
if (target.window === target) return target;
var doc = target.ownerDocument;
return doc ? doc.defaultView || doc.parentWindow : window;
},
detail: function(event) {
return event.detail || 0;
}
};
SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface), module.exports = SyntheticUIEvent;
}, function(module, exports) {
"use strict";
var ViewportMetrics = {
currentScrollLeft: 0,
currentScrollTop: 0,
refreshScrollValues: function(scrollPosition) {
ViewportMetrics.currentScrollLeft = scrollPosition.x, ViewportMetrics.currentScrollTop = scrollPosition.y;
}
};
module.exports = ViewportMetrics;
}, function(module, exports) {
"use strict";
function modifierStateGetter(keyArg) {
var syntheticEvent = this, nativeEvent = syntheticEvent.nativeEvent;
if (nativeEvent.getModifierState) return nativeEvent.getModifierState(keyArg);
var keyProp = modifierKeyToProp[keyArg];
return !!keyProp && !!nativeEvent[keyProp];
}
function getEventModifierState(nativeEvent) {
return modifierStateGetter;
}
var modifierKeyToProp = {
Alt: "altKey",
Control: "ctrlKey",
Meta: "metaKey",
Shift: "shiftKey"
};
module.exports = getEventModifierState;
}, function(module, exports, __webpack_require__) {
"use strict";
var DOMProperty = __webpack_require__(48), MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY, HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE, HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE, HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE, HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE, HTMLDOMPropertyConfig = {
isCustomAttribute: RegExp.prototype.test.bind(new RegExp("^(data|aria)-[" + DOMProperty.ATTRIBUTE_NAME_CHAR + "]*$")),
Properties: {
accept: 0,
acceptCharset: 0,
accessKey: 0,
action: 0,
allowFullScreen: HAS_BOOLEAN_VALUE,
allowTransparency: 0,
alt: 0,
as: 0,
async: HAS_BOOLEAN_VALUE,
autoComplete: 0,
autoPlay: HAS_BOOLEAN_VALUE,
capture: HAS_BOOLEAN_VALUE,
cellPadding: 0,
cellSpacing: 0,
charSet: 0,
challenge: 0,
checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
cite: 0,
classID: 0,
className: 0,
cols: HAS_POSITIVE_NUMERIC_VALUE,
colSpan: 0,
content: 0,
contentEditable: 0,
contextMenu: 0,
controls: HAS_BOOLEAN_VALUE,
coords: 0,
crossOrigin: 0,
data: 0,
dateTime: 0,
"default": HAS_BOOLEAN_VALUE,
defer: HAS_BOOLEAN_VALUE,
dir: 0,
disabled: HAS_BOOLEAN_VALUE,
download: HAS_OVERLOADED_BOOLEAN_VALUE,
draggable: 0,
encType: 0,
form: 0,
formAction: 0,
formEncType: 0,
formMethod: 0,
formNoValidate: HAS_BOOLEAN_VALUE,
formTarget: 0,
frameBorder: 0,
headers: 0,
height: 0,
hidden: HAS_BOOLEAN_VALUE,
high: 0,
href: 0,
hrefLang: 0,
htmlFor: 0,
httpEquiv: 0,
icon: 0,
id: 0,
inputMode: 0,
integrity: 0,
is: 0,
keyParams: 0,
keyType: 0,
kind: 0,
label: 0,
lang: 0,
list: 0,
loop: HAS_BOOLEAN_VALUE,
low: 0,
manifest: 0,
marginHeight: 0,
marginWidth: 0,
max: 0,
maxLength: 0,
media: 0,
mediaGroup: 0,
method: 0,
min: 0,
minLength: 0,
multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
name: 0,
nonce: 0,
noValidate: HAS_BOOLEAN_VALUE,
open: HAS_BOOLEAN_VALUE,
optimum: 0,
pattern: 0,
placeholder: 0,
playsInline: HAS_BOOLEAN_VALUE,
poster: 0,
preload: 0,
profile: 0,
radioGroup: 0,
readOnly: HAS_BOOLEAN_VALUE,
referrerPolicy: 0,
rel: 0,
required: HAS_BOOLEAN_VALUE,
reversed: HAS_BOOLEAN_VALUE,
role: 0,
rows: HAS_POSITIVE_NUMERIC_VALUE,
rowSpan: HAS_NUMERIC_VALUE,
sandbox: 0,
scope: 0,
scoped: HAS_BOOLEAN_VALUE,
scrolling: 0,
seamless: HAS_BOOLEAN_VALUE,
selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
shape: 0,
size: HAS_POSITIVE_NUMERIC_VALUE,
sizes: 0,
span: HAS_POSITIVE_NUMERIC_VALUE,
spellCheck: 0,
src: 0,
srcDoc: 0,
srcLang: 0,
srcSet: 0,
start: HAS_NUMERIC_VALUE,
step: 0,
style: 0,
summary: 0,
tabIndex: 0,
target: 0,
title: 0,
type: 0,
useMap: 0,
value: 0,
width: 0,
wmode: 0,
wrap: 0,
about: 0,
datatype: 0,
inlist: 0,
prefix: 0,
property: 0,
resource: 0,
"typeof": 0,
vocab: 0,
autoCapitalize: 0,
autoCorrect: 0,
autoSave: 0,
color: 0,
itemProp: 0,
itemScope: HAS_BOOLEAN_VALUE,
itemType: 0,
itemID: 0,
itemRef: 0,
results: 0,
security: 0,
unselectable: 0
},
DOMAttributeNames: {
acceptCharset: "accept-charset",
className: "class",
htmlFor: "for",
httpEquiv: "http-equiv"
},
DOMPropertyNames: {}
};
module.exports = HTMLDOMPropertyConfig;
}, function(module, exports, __webpack_require__) {
"use strict";
var DOMChildrenOperations = __webpack_require__(91), ReactDOMIDOperations = __webpack_require__(102), ReactComponentBrowserEnvironment = {
processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates,
replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup
};
module.exports = ReactComponentBrowserEnvironment;
}, function(module, exports, __webpack_require__) {
"use strict";
function getNodeAfter(parentNode, node) {
return Array.isArray(node) && (node = node[1]), node ? node.nextSibling : parentNode.firstChild;
}
function insertLazyTreeChildAt(parentNode, childTree, referenceNode) {
DOMLazyTree.insertTreeBefore(parentNode, childTree, referenceNode);
}
function moveChild(parentNode, childNode, referenceNode) {
Array.isArray(childNode) ? moveDelimitedText(parentNode, childNode[0], childNode[1], referenceNode) : insertChildAt(parentNode, childNode, referenceNode);
}
function removeChild(parentNode, childNode) {
if (Array.isArray(childNode)) {
var closingComment = childNode[1];
childNode = childNode[0], removeDelimitedText(parentNode, childNode, closingComment),
parentNode.removeChild(closingComment);
}
parentNode.removeChild(childNode);
}
function moveDelimitedText(parentNode, openingComment, closingComment, referenceNode) {
for (var node = openingComment; ;) {
var nextNode = node.nextSibling;
if (insertChildAt(parentNode, node, referenceNode), node === closingComment) break;
node = nextNode;
}
}
function removeDelimitedText(parentNode, startNode, closingComment) {
for (;;) {
var node = startNode.nextSibling;
if (node === closingComment) break;
parentNode.removeChild(node);
}
}
function replaceDelimitedText(openingComment, closingComment, stringText) {
var parentNode = openingComment.parentNode, nodeAfterComment = openingComment.nextSibling;
nodeAfterComment === closingComment ? stringText && insertChildAt(parentNode, document.createTextNode(stringText), nodeAfterComment) : stringText ? (setTextContent(nodeAfterComment, stringText),
removeDelimitedText(parentNode, nodeAfterComment, closingComment)) : removeDelimitedText(parentNode, openingComment, closingComment);
}
var DOMLazyTree = __webpack_require__(92), Danger = __webpack_require__(98), createMicrosoftUnsafeLocalFunction = (__webpack_require__(46),
__webpack_require__(78), __webpack_require__(95)), setInnerHTML = __webpack_require__(94), setTextContent = __webpack_require__(96), insertChildAt = createMicrosoftUnsafeLocalFunction(function(parentNode, childNode, referenceNode) {
parentNode.insertBefore(childNode, referenceNode);
}), dangerouslyReplaceNodeWithMarkup = Danger.dangerouslyReplaceNodeWithMarkup, DOMChildrenOperations = {
dangerouslyReplaceNodeWithMarkup: dangerouslyReplaceNodeWithMarkup,
replaceDelimitedText: replaceDelimitedText,
processUpdates: function(parentNode, updates) {
for (var k = 0; k < updates.length; k++) {
var update = updates[k];
switch (update.type) {
case "INSERT_MARKUP":
insertLazyTreeChildAt(parentNode, update.content, getNodeAfter(parentNode, update.afterNode));
break;
case "MOVE_EXISTING":
moveChild(parentNode, update.fromNode, getNodeAfter(parentNode, update.afterNode));
break;
case "SET_MARKUP":
setInnerHTML(parentNode, update.content);
break;
case "TEXT_CONTENT":
setTextContent(parentNode, update.content);
break;
case "REMOVE_NODE":
removeChild(parentNode, update.fromNode);
}
}
}
};
module.exports = DOMChildrenOperations;
}, function(module, exports, __webpack_require__) {
"use strict";
function insertTreeChildren(tree) {
if (enableLazy) {
var node = tree.node, children = tree.children;
if (children.length) for (var i = 0; i < children.length; i++) insertTreeBefore(node, children[i], null); else null != tree.html ? setInnerHTML(node, tree.html) : null != tree.text && setTextContent(node, tree.text);
}
}
function replaceChildWithTree(oldNode, newTree) {
oldNode.parentNode.replaceChild(newTree.node, oldNode), insertTreeChildren(newTree);
}
function queueChild(parentTree, childTree) {
enableLazy ? parentTree.children.push(childTree) : parentTree.node.appendChild(childTree.node);
}
function queueHTML(tree, html) {
enableLazy ? tree.html = html : setInnerHTML(tree.node, html);
}
function queueText(tree, text) {
enableLazy ? tree.text = text : setTextContent(tree.node, text);
}
function toString() {
return this.node.nodeName;
}
function DOMLazyTree(node) {
return {
node: node,
children: [],
html: null,
text: null,
toString: toString
};
}
var DOMNamespaces = __webpack_require__(93), setInnerHTML = __webpack_require__(94), createMicrosoftUnsafeLocalFunction = __webpack_require__(95), setTextContent = __webpack_require__(96), ELEMENT_NODE_TYPE = 1, DOCUMENT_FRAGMENT_NODE_TYPE = 11, enableLazy = "undefined" != typeof document && "number" == typeof document.documentMode || "undefined" != typeof navigator && "string" == typeof navigator.userAgent && /\bEdge\/\d/.test(navigator.userAgent), insertTreeBefore = createMicrosoftUnsafeLocalFunction(function(parentNode, tree, referenceNode) {
tree.node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE || tree.node.nodeType === ELEMENT_NODE_TYPE && "object" === tree.node.nodeName.toLowerCase() && (null == tree.node.namespaceURI || tree.node.namespaceURI === DOMNamespaces.html) ? (insertTreeChildren(tree),
parentNode.insertBefore(tree.node, referenceNode)) : (parentNode.insertBefore(tree.node, referenceNode),
insertTreeChildren(tree));
});
DOMLazyTree.insertTreeBefore = insertTreeBefore, DOMLazyTree.replaceChildWithTree = replaceChildWithTree,
DOMLazyTree.queueChild = queueChild, DOMLazyTree.queueHTML = queueHTML, DOMLazyTree.queueText = queueText,
module.exports = DOMLazyTree;
}, function(module, exports) {
"use strict";
var DOMNamespaces = {
html: "http://www.w3.org/1999/xhtml",
mathml: "http://www.w3.org/1998/Math/MathML",
svg: "http://www.w3.org/2000/svg"
};
module.exports = DOMNamespaces;
}, function(module, exports, __webpack_require__) {
"use strict";
var reusableSVGContainer, ExecutionEnvironment = __webpack_require__(63), DOMNamespaces = __webpack_require__(93), WHITESPACE_TEST = /^[ \r\n\t\f]/, NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/, createMicrosoftUnsafeLocalFunction = __webpack_require__(95), setInnerHTML = createMicrosoftUnsafeLocalFunction(function(node, html) {
if (node.namespaceURI !== DOMNamespaces.svg || "innerHTML" in node) node.innerHTML = html; else {
reusableSVGContainer = reusableSVGContainer || document.createElement("div"), reusableSVGContainer.innerHTML = "";
for (var svgNode = reusableSVGContainer.firstChild; svgNode.firstChild; ) node.appendChild(svgNode.firstChild);
}
});
if (ExecutionEnvironment.canUseDOM) {
var testElement = document.createElement("div");
testElement.innerHTML = " ", "" === testElement.innerHTML && (setInnerHTML = function(node, html) {
if (node.parentNode && node.parentNode.replaceChild(node, node), WHITESPACE_TEST.test(html) || "<" === html[0] && NONVISIBLE_TEST.test(html)) {
node.innerHTML = String.fromCharCode(65279) + html;
var textNode = node.firstChild;
1 === textNode.data.length ? node.removeChild(textNode) : textNode.deleteData(0, 1);
} else node.innerHTML = html;
}), testElement = null;
}
module.exports = setInnerHTML;
}, function(module, exports) {
"use strict";
var createMicrosoftUnsafeLocalFunction = function(func) {
return "undefined" != typeof MSApp && MSApp.execUnsafeLocalFunction ? function(arg0, arg1, arg2, arg3) {
MSApp.execUnsafeLocalFunction(function() {
return func(arg0, arg1, arg2, arg3);
});
} : func;
};
module.exports = createMicrosoftUnsafeLocalFunction;
}, function(module, exports, __webpack_require__) {
"use strict";
var ExecutionEnvironment = __webpack_require__(63), escapeTextContentForBrowser = __webpack_require__(97), setInnerHTML = __webpack_require__(94), setTextContent = function(node, text) {
if (text) {
var firstChild = node.firstChild;
if (firstChild && firstChild === node.lastChild && 3 === firstChild.nodeType) return void (firstChild.nodeValue = text);
}
node.textContent = text;
};
ExecutionEnvironment.canUseDOM && ("textContent" in document.documentElement || (setTextContent = function(node, text) {
return 3 === node.nodeType ? void (node.nodeValue = text) : void setInnerHTML(node, escapeTextContentForBrowser(text));
})), module.exports = setTextContent;
}, function(module, exports) {
"use strict";
function escapeHtml(string) {
var str = "" + string, match = matchHtmlRegExp.exec(str);
if (!match) return str;
var escape, html = "", index = 0, lastIndex = 0;
for (index = match.index; index < str.length; index++) {
switch (str.charCodeAt(index)) {
case 34:
escape = """;
break;
case 38:
escape = "&";
break;
case 39:
escape = "'";
break;
case 60:
escape = "<";
break;
case 62:
escape = ">";
break;
default:
continue;
}
lastIndex !== index && (html += str.substring(lastIndex, index)), lastIndex = index + 1,
html += escape;
}
return lastIndex !== index ? html + str.substring(lastIndex, index) : html;
}
function escapeTextContentForBrowser(text) {
return "boolean" == typeof text || "number" == typeof text ? "" + text : escapeHtml(text);
}
var matchHtmlRegExp = /["'&<>]/;
module.exports = escapeTextContentForBrowser;
}, function(module, exports, __webpack_require__) {
"use strict";
var _prodInvariant = __webpack_require__(47), DOMLazyTree = __webpack_require__(92), ExecutionEnvironment = __webpack_require__(63), createNodesFromMarkup = __webpack_require__(99), emptyFunction = __webpack_require__(60), Danger = (__webpack_require__(49),
{
dangerouslyReplaceNodeWithMarkup: function(oldChild, markup) {
if (ExecutionEnvironment.canUseDOM ? void 0 : _prodInvariant("56"), markup ? void 0 : _prodInvariant("57"),
"HTML" === oldChild.nodeName ? _prodInvariant("58") : void 0, "string" == typeof markup) {
var newChild = createNodesFromMarkup(markup, emptyFunction)[0];
oldChild.parentNode.replaceChild(newChild, oldChild);
} else DOMLazyTree.replaceChildWithTree(oldChild, markup);
}
});
module.exports = Danger;
}, function(module, exports, __webpack_require__) {
"use strict";
function getNodeName(markup) {
var nodeNameMatch = markup.match(nodeNamePattern);
return nodeNameMatch && nodeNameMatch[1].toLowerCase();
}
function createNodesFromMarkup(markup, handleScript) {
var node = dummyNode;
dummyNode ? void 0 : invariant(!1);
var nodeName = getNodeName(markup), wrap = nodeName && getMarkupWrap(nodeName);
if (wrap) {
node.innerHTML = wrap[1] + markup + wrap[2];
for (var wrapDepth = wrap[0]; wrapDepth--; ) node = node.lastChild;
} else node.innerHTML = markup;
var scripts = node.getElementsByTagName("script");
scripts.length && (handleScript ? void 0 : invariant(!1), createArrayFromMixed(scripts).forEach(handleScript));
for (var nodes = Array.from(node.childNodes); node.lastChild; ) node.removeChild(node.lastChild);
return nodes;
}
var ExecutionEnvironment = __webpack_require__(63), createArrayFromMixed = __webpack_require__(100), getMarkupWrap = __webpack_require__(101), invariant = __webpack_require__(49), dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement("div") : null, nodeNamePattern = /^\s*<(\w+)/;
module.exports = createNodesFromMarkup;
}, function(module, exports, __webpack_require__) {
"use strict";
function toArray(obj) {
var length = obj.length;
if (Array.isArray(obj) || "object" != typeof obj && "function" != typeof obj ? invariant(!1) : void 0,
"number" != typeof length ? invariant(!1) : void 0, 0 === length || length - 1 in obj ? void 0 : invariant(!1),
"function" == typeof obj.callee ? invariant(!1) : void 0, obj.hasOwnProperty) try {
return Array.prototype.slice.call(obj);
} catch (e) {}
for (var ret = Array(length), ii = 0; ii < length; ii++) ret[ii] = obj[ii];
return ret;
}
function hasArrayNature(obj) {
return !!obj && ("object" == typeof obj || "function" == typeof obj) && "length" in obj && !("setInterval" in obj) && "number" != typeof obj.nodeType && (Array.isArray(obj) || "callee" in obj || "item" in obj);
}
function createArrayFromMixed(obj) {
return hasArrayNature(obj) ? Array.isArray(obj) ? obj.slice() : toArray(obj) : [ obj ];
}
var invariant = __webpack_require__(49);
module.exports = createArrayFromMixed;
}, function(module, exports, __webpack_require__) {
"use strict";
function getMarkupWrap(nodeName) {
return dummyNode ? void 0 : invariant(!1), markupWrap.hasOwnProperty(nodeName) || (nodeName = "*"),
shouldWrap.hasOwnProperty(nodeName) || ("*" === nodeName ? dummyNode.innerHTML = "" : dummyNode.innerHTML = "<" + nodeName + ">" + nodeName + ">",
shouldWrap[nodeName] = !dummyNode.firstChild), shouldWrap[nodeName] ? markupWrap[nodeName] : null;
}
var ExecutionEnvironment = __webpack_require__(63), invariant = __webpack_require__(49), dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement("div") : null, shouldWrap = {}, selectWrap = [ 1, '" ], tableWrap = [ 1, "" ], trWrap = [ 3, "" ], svgWrap = [ 1, '" ], markupWrap = {
"*": [ 1, "?", "
" ],
area: [ 1, "" ],
col: [ 2, "" ],
legend: [ 1, "" ],
param: [ 1, "" ],
tr: [ 2, "" ],
optgroup: selectWrap,
option: selectWrap,
caption: tableWrap,
colgroup: tableWrap,
tbody: tableWrap,
tfoot: tableWrap,
thead: tableWrap,
td: trWrap,
th: trWrap
}, svgElements = [ "circle", "clipPath", "defs", "ellipse", "g", "image", "line", "linearGradient", "mask", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "stop", "text", "tspan" ];
svgElements.forEach(function(nodeName) {
markupWrap[nodeName] = svgWrap, shouldWrap[nodeName] = !0;
}), module.exports = getMarkupWrap;
}, function(module, exports, __webpack_require__) {
"use strict";
var DOMChildrenOperations = __webpack_require__(91), ReactDOMComponentTree = __webpack_require__(46), ReactDOMIDOperations = {
dangerouslyProcessChildrenUpdates: function(parentInst, updates) {
var node = ReactDOMComponentTree.getNodeFromInstance(parentInst);
DOMChildrenOperations.processUpdates(node, updates);
}
};
module.exports = ReactDOMIDOperations;
}, function(module, exports, __webpack_require__) {
"use strict";
function getDeclarationErrorAddendum(internalInstance) {
if (internalInstance) {
var owner = internalInstance._currentElement._owner || null;
if (owner) {
var name = owner.getName();
if (name) return " This DOM node was rendered by `" + name + "`.";
}
}
return "";
}
function assertValidProps(component, props) {
props && (voidElementTags[component._tag] && (null != props.children || null != props.dangerouslySetInnerHTML ? _prodInvariant("137", component._tag, component._currentElement._owner ? " Check the render method of " + component._currentElement._owner.getName() + "." : "") : void 0),
null != props.dangerouslySetInnerHTML && (null != props.children ? _prodInvariant("60") : void 0,
"object" == typeof props.dangerouslySetInnerHTML && HTML in props.dangerouslySetInnerHTML ? void 0 : _prodInvariant("61")),
null != props.style && "object" != typeof props.style ? _prodInvariant("62", getDeclarationErrorAddendum(component)) : void 0);
}
function enqueuePutListener(inst, registrationName, listener, transaction) {
if (!(transaction instanceof ReactServerRenderingTransaction)) {
var containerInfo = inst._hostContainerInfo, isDocumentFragment = containerInfo._node && containerInfo._node.nodeType === DOC_FRAGMENT_TYPE, doc = isDocumentFragment ? containerInfo._node : containerInfo._ownerDocument;
listenTo(registrationName, doc), transaction.getReactMountReady().enqueue(putListener, {
inst: inst,
registrationName: registrationName,
listener: listener
});
}
}
function putListener() {
var listenerToPut = this;
EventPluginHub.putListener(listenerToPut.inst, listenerToPut.registrationName, listenerToPut.listener);
}
function inputPostMount() {
var inst = this;
ReactDOMInput.postMountWrapper(inst);
}
function textareaPostMount() {
var inst = this;
ReactDOMTextarea.postMountWrapper(inst);
}
function optionPostMount() {
var inst = this;
ReactDOMOption.postMountWrapper(inst);
}
function trapBubbledEventsLocal() {
var inst = this;
inst._rootNodeID ? void 0 : _prodInvariant("63");
var node = getNode(inst);
switch (node ? void 0 : _prodInvariant("64"), inst._tag) {
case "iframe":
case "object":
inst._wrapperState.listeners = [ ReactBrowserEventEmitter.trapBubbledEvent("topLoad", "load", node) ];
break;
case "video":
case "audio":
inst._wrapperState.listeners = [];
for (var event in mediaEvents) mediaEvents.hasOwnProperty(event) && inst._wrapperState.listeners.push(ReactBrowserEventEmitter.trapBubbledEvent(event, mediaEvents[event], node));
break;
case "source":
inst._wrapperState.listeners = [ ReactBrowserEventEmitter.trapBubbledEvent("topError", "error", node) ];
break;
case "img":
inst._wrapperState.listeners = [ ReactBrowserEventEmitter.trapBubbledEvent("topError", "error", node), ReactBrowserEventEmitter.trapBubbledEvent("topLoad", "load", node) ];
break;
case "form":
inst._wrapperState.listeners = [ ReactBrowserEventEmitter.trapBubbledEvent("topReset", "reset", node), ReactBrowserEventEmitter.trapBubbledEvent("topSubmit", "submit", node) ];
break;
case "input":
case "select":
case "textarea":
inst._wrapperState.listeners = [ ReactBrowserEventEmitter.trapBubbledEvent("topInvalid", "invalid", node) ];
}
}
function postUpdateSelectWrapper() {
ReactDOMSelect.postUpdateWrapper(this);
}
function validateDangerousTag(tag) {
hasOwnProperty.call(validatedTagCache, tag) || (VALID_TAG_REGEX.test(tag) ? void 0 : _prodInvariant("65", tag),
validatedTagCache[tag] = !0);
}
function isCustomComponent(tagName, props) {
return tagName.indexOf("-") >= 0 || null != props.is;
}
function ReactDOMComponent(element) {
var tag = element.type;
validateDangerousTag(tag), this._currentElement = element, this._tag = tag.toLowerCase(),
this._namespaceURI = null, this._renderedChildren = null, this._previousStyle = null,
this._previousStyleCopy = null, this._hostNode = null, this._hostParent = null,
this._rootNodeID = 0, this._domID = 0, this._hostContainerInfo = null, this._wrapperState = null,
this._topLevelWrapper = null, this._flags = 0;
}
var _prodInvariant = __webpack_require__(47), _assign = __webpack_require__(65), AutoFocusUtils = __webpack_require__(104), CSSPropertyOperations = __webpack_require__(106), DOMLazyTree = __webpack_require__(92), DOMNamespaces = __webpack_require__(93), DOMProperty = __webpack_require__(48), DOMPropertyOperations = __webpack_require__(114), EventPluginHub = __webpack_require__(55), EventPluginRegistry = __webpack_require__(56), ReactBrowserEventEmitter = __webpack_require__(116), ReactDOMComponentFlags = __webpack_require__(50), ReactDOMComponentTree = __webpack_require__(46), ReactDOMInput = __webpack_require__(119), ReactDOMOption = __webpack_require__(122), ReactDOMSelect = __webpack_require__(123), ReactDOMTextarea = __webpack_require__(124), ReactMultiChild = (__webpack_require__(78),
__webpack_require__(125)), ReactServerRenderingTransaction = __webpack_require__(144), escapeTextContentForBrowser = (__webpack_require__(60),
__webpack_require__(97)), Flags = (__webpack_require__(49), __webpack_require__(81),
__webpack_require__(133), __webpack_require__(147), __webpack_require__(59), ReactDOMComponentFlags), deleteListener = EventPluginHub.deleteListener, getNode = ReactDOMComponentTree.getNodeFromInstance, listenTo = ReactBrowserEventEmitter.listenTo, registrationNameModules = EventPluginRegistry.registrationNameModules, CONTENT_TYPES = {
string: !0,
number: !0
}, STYLE = "style", HTML = "__html", RESERVED_PROPS = {
children: null,
dangerouslySetInnerHTML: null,
suppressContentEditableWarning: null
}, DOC_FRAGMENT_TYPE = 11, mediaEvents = {
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"
}, omittedCloseTags = {
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
}, newlineEatingTags = {
listing: !0,
pre: !0,
textarea: !0
}, voidElementTags = _assign({
menuitem: !0
}, omittedCloseTags), VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/, validatedTagCache = {}, hasOwnProperty = {}.hasOwnProperty, globalIdCounter = 1;
ReactDOMComponent.displayName = "ReactDOMComponent", ReactDOMComponent.Mixin = {
mountComponent: function(transaction, hostParent, hostContainerInfo, context) {
this._rootNodeID = globalIdCounter++, this._domID = hostContainerInfo._idCounter++,
this._hostParent = hostParent, this._hostContainerInfo = hostContainerInfo;
var props = this._currentElement.props;
switch (this._tag) {
case "audio":
case "form":
case "iframe":
case "img":
case "link":
case "object":
case "source":
case "video":
this._wrapperState = {
listeners: null
}, transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
break;
case "input":
ReactDOMInput.mountWrapper(this, props, hostParent), props = ReactDOMInput.getHostProps(this, props),
transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
break;
case "option":
ReactDOMOption.mountWrapper(this, props, hostParent), props = ReactDOMOption.getHostProps(this, props);
break;
case "select":
ReactDOMSelect.mountWrapper(this, props, hostParent), props = ReactDOMSelect.getHostProps(this, props),
transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
break;
case "textarea":
ReactDOMTextarea.mountWrapper(this, props, hostParent), props = ReactDOMTextarea.getHostProps(this, props),
transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
}
assertValidProps(this, props);
var namespaceURI, parentTag;
null != hostParent ? (namespaceURI = hostParent._namespaceURI, parentTag = hostParent._tag) : hostContainerInfo._tag && (namespaceURI = hostContainerInfo._namespaceURI,
parentTag = hostContainerInfo._tag), (null == namespaceURI || namespaceURI === DOMNamespaces.svg && "foreignobject" === parentTag) && (namespaceURI = DOMNamespaces.html),
namespaceURI === DOMNamespaces.html && ("svg" === this._tag ? namespaceURI = DOMNamespaces.svg : "math" === this._tag && (namespaceURI = DOMNamespaces.mathml)),
this._namespaceURI = namespaceURI;
var mountImage;
if (transaction.useCreateElement) {
var el, ownerDocument = hostContainerInfo._ownerDocument;
if (namespaceURI === DOMNamespaces.html) if ("script" === this._tag) {
var div = ownerDocument.createElement("div"), type = this._currentElement.type;
div.innerHTML = "<" + type + ">" + type + ">", el = div.removeChild(div.firstChild);
} else el = props.is ? ownerDocument.createElement(this._currentElement.type, props.is) : ownerDocument.createElement(this._currentElement.type); else el = ownerDocument.createElementNS(namespaceURI, this._currentElement.type);
ReactDOMComponentTree.precacheNode(this, el), this._flags |= Flags.hasCachedChildNodes,
this._hostParent || DOMPropertyOperations.setAttributeForRoot(el), this._updateDOMProperties(null, props, transaction);
var lazyTree = DOMLazyTree(el);
this._createInitialChildren(transaction, props, context, lazyTree), mountImage = lazyTree;
} else {
var tagOpen = this._createOpenTagMarkupAndPutListeners(transaction, props), tagContent = this._createContentMarkup(transaction, props, context);
mountImage = !tagContent && omittedCloseTags[this._tag] ? tagOpen + "/>" : tagOpen + ">" + tagContent + "" + this._currentElement.type + ">";
}
switch (this._tag) {
case "input":
transaction.getReactMountReady().enqueue(inputPostMount, this), props.autoFocus && transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
break;
case "textarea":
transaction.getReactMountReady().enqueue(textareaPostMount, this), props.autoFocus && transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
break;
case "select":
props.autoFocus && transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
break;
case "button":
props.autoFocus && transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
break;
case "option":
transaction.getReactMountReady().enqueue(optionPostMount, this);
}
return mountImage;
},
_createOpenTagMarkupAndPutListeners: function(transaction, props) {
var ret = "<" + this._currentElement.type;
for (var propKey in props) if (props.hasOwnProperty(propKey)) {
var propValue = props[propKey];
if (null != propValue) if (registrationNameModules.hasOwnProperty(propKey)) propValue && enqueuePutListener(this, propKey, propValue, transaction); else {
propKey === STYLE && (propValue && (propValue = this._previousStyleCopy = _assign({}, props.style)),
propValue = CSSPropertyOperations.createMarkupForStyles(propValue, this));
var markup = null;
null != this._tag && isCustomComponent(this._tag, props) ? RESERVED_PROPS.hasOwnProperty(propKey) || (markup = DOMPropertyOperations.createMarkupForCustomAttribute(propKey, propValue)) : markup = DOMPropertyOperations.createMarkupForProperty(propKey, propValue),
markup && (ret += " " + markup);
}
}
return transaction.renderToStaticMarkup ? ret : (this._hostParent || (ret += " " + DOMPropertyOperations.createMarkupForRoot()),
ret += " " + DOMPropertyOperations.createMarkupForID(this._domID));
},
_createContentMarkup: function(transaction, props, context) {
var ret = "", innerHTML = props.dangerouslySetInnerHTML;
if (null != innerHTML) null != innerHTML.__html && (ret = innerHTML.__html); else {
var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null, childrenToUse = null != contentToUse ? null : props.children;
if (null != contentToUse) ret = escapeTextContentForBrowser(contentToUse); else if (null != childrenToUse) {
var mountImages = this.mountChildren(childrenToUse, transaction, context);
ret = mountImages.join("");
}
}
return newlineEatingTags[this._tag] && "\n" === ret.charAt(0) ? "\n" + ret : ret;
},
_createInitialChildren: function(transaction, props, context, lazyTree) {
var innerHTML = props.dangerouslySetInnerHTML;
if (null != innerHTML) null != innerHTML.__html && DOMLazyTree.queueHTML(lazyTree, innerHTML.__html); else {
var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null, childrenToUse = null != contentToUse ? null : props.children;
if (null != contentToUse) "" !== contentToUse && DOMLazyTree.queueText(lazyTree, contentToUse); else if (null != childrenToUse) for (var mountImages = this.mountChildren(childrenToUse, transaction, context), i = 0; i < mountImages.length; i++) DOMLazyTree.queueChild(lazyTree, mountImages[i]);
}
},
receiveComponent: function(nextElement, transaction, context) {
var prevElement = this._currentElement;
this._currentElement = nextElement, this.updateComponent(transaction, prevElement, nextElement, context);
},
updateComponent: function(transaction, prevElement, nextElement, context) {
var lastProps = prevElement.props, nextProps = this._currentElement.props;
switch (this._tag) {
case "input":
lastProps = ReactDOMInput.getHostProps(this, lastProps), nextProps = ReactDOMInput.getHostProps(this, nextProps);
break;
case "option":
lastProps = ReactDOMOption.getHostProps(this, lastProps), nextProps = ReactDOMOption.getHostProps(this, nextProps);
break;
case "select":
lastProps = ReactDOMSelect.getHostProps(this, lastProps), nextProps = ReactDOMSelect.getHostProps(this, nextProps);
break;
case "textarea":
lastProps = ReactDOMTextarea.getHostProps(this, lastProps), nextProps = ReactDOMTextarea.getHostProps(this, nextProps);
}
switch (assertValidProps(this, nextProps), this._updateDOMProperties(lastProps, nextProps, transaction),
this._updateDOMChildren(lastProps, nextProps, transaction, context), this._tag) {
case "input":
ReactDOMInput.updateWrapper(this);
break;
case "textarea":
ReactDOMTextarea.updateWrapper(this);
break;
case "select":
transaction.getReactMountReady().enqueue(postUpdateSelectWrapper, this);
}
},
_updateDOMProperties: function(lastProps, nextProps, transaction) {
var propKey, styleName, styleUpdates;
for (propKey in lastProps) if (!nextProps.hasOwnProperty(propKey) && lastProps.hasOwnProperty(propKey) && null != lastProps[propKey]) if (propKey === STYLE) {
var lastStyle = this._previousStyleCopy;
for (styleName in lastStyle) lastStyle.hasOwnProperty(styleName) && (styleUpdates = styleUpdates || {},
styleUpdates[styleName] = "");
this._previousStyleCopy = null;
} else registrationNameModules.hasOwnProperty(propKey) ? lastProps[propKey] && deleteListener(this, propKey) : isCustomComponent(this._tag, lastProps) ? RESERVED_PROPS.hasOwnProperty(propKey) || DOMPropertyOperations.deleteValueForAttribute(getNode(this), propKey) : (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) && DOMPropertyOperations.deleteValueForProperty(getNode(this), propKey);
for (propKey in nextProps) {
var nextProp = nextProps[propKey], lastProp = propKey === STYLE ? this._previousStyleCopy : null != lastProps ? lastProps[propKey] : void 0;
if (nextProps.hasOwnProperty(propKey) && nextProp !== lastProp && (null != nextProp || null != lastProp)) if (propKey === STYLE) if (nextProp ? nextProp = this._previousStyleCopy = _assign({}, nextProp) : this._previousStyleCopy = null,
lastProp) {
for (styleName in lastProp) !lastProp.hasOwnProperty(styleName) || nextProp && nextProp.hasOwnProperty(styleName) || (styleUpdates = styleUpdates || {},
styleUpdates[styleName] = "");
for (styleName in nextProp) nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName] && (styleUpdates = styleUpdates || {},
styleUpdates[styleName] = nextProp[styleName]);
} else styleUpdates = nextProp; else if (registrationNameModules.hasOwnProperty(propKey)) nextProp ? enqueuePutListener(this, propKey, nextProp, transaction) : lastProp && deleteListener(this, propKey); else if (isCustomComponent(this._tag, nextProps)) RESERVED_PROPS.hasOwnProperty(propKey) || DOMPropertyOperations.setValueForAttribute(getNode(this), propKey, nextProp); else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) {
var node = getNode(this);
null != nextProp ? DOMPropertyOperations.setValueForProperty(node, propKey, nextProp) : DOMPropertyOperations.deleteValueForProperty(node, propKey);
}
}
styleUpdates && CSSPropertyOperations.setValueForStyles(getNode(this), styleUpdates, this);
},
_updateDOMChildren: function(lastProps, nextProps, transaction, context) {
var lastContent = CONTENT_TYPES[typeof lastProps.children] ? lastProps.children : null, nextContent = CONTENT_TYPES[typeof nextProps.children] ? nextProps.children : null, lastHtml = lastProps.dangerouslySetInnerHTML && lastProps.dangerouslySetInnerHTML.__html, nextHtml = nextProps.dangerouslySetInnerHTML && nextProps.dangerouslySetInnerHTML.__html, lastChildren = null != lastContent ? null : lastProps.children, nextChildren = null != nextContent ? null : nextProps.children, lastHasContentOrHtml = null != lastContent || null != lastHtml, nextHasContentOrHtml = null != nextContent || null != nextHtml;
null != lastChildren && null == nextChildren ? this.updateChildren(null, transaction, context) : lastHasContentOrHtml && !nextHasContentOrHtml && this.updateTextContent(""),
null != nextContent ? lastContent !== nextContent && this.updateTextContent("" + nextContent) : null != nextHtml ? lastHtml !== nextHtml && this.updateMarkup("" + nextHtml) : null != nextChildren && this.updateChildren(nextChildren, transaction, context);
},
getHostNode: function() {
return getNode(this);
},
unmountComponent: function(safely) {
switch (this._tag) {
case "audio":
case "form":
case "iframe":
case "img":
case "link":
case "object":
case "source":
case "video":
var listeners = this._wrapperState.listeners;
if (listeners) for (var i = 0; i < listeners.length; i++) listeners[i].remove();
break;
case "html":
case "head":
case "body":
_prodInvariant("66", this._tag);
}
this.unmountChildren(safely), ReactDOMComponentTree.uncacheNode(this), EventPluginHub.deleteAllListeners(this),
this._rootNodeID = 0, this._domID = 0, this._wrapperState = null;
},
getPublicInstance: function() {
return getNode(this);
}
}, _assign(ReactDOMComponent.prototype, ReactDOMComponent.Mixin, ReactMultiChild.Mixin),
module.exports = ReactDOMComponent;
}, function(module, exports, __webpack_require__) {
"use strict";
var ReactDOMComponentTree = __webpack_require__(46), focusNode = __webpack_require__(105), AutoFocusUtils = {
focusDOMComponent: function() {
focusNode(ReactDOMComponentTree.getNodeFromInstance(this));
}
};
module.exports = AutoFocusUtils;
}, function(module, exports) {
"use strict";
function focusNode(node) {
try {
node.focus();
} catch (e) {}
}
module.exports = focusNode;
}, function(module, exports, __webpack_require__) {
"use strict";
var CSSProperty = __webpack_require__(107), ExecutionEnvironment = __webpack_require__(63), dangerousStyleValue = (__webpack_require__(78),
__webpack_require__(108), __webpack_require__(110)), hyphenateStyleName = __webpack_require__(111), memoizeStringOnly = __webpack_require__(113), processStyleName = (__webpack_require__(59),
memoizeStringOnly(function(styleName) {
return hyphenateStyleName(styleName);
})), hasShorthandPropertyBug = !1, styleFloatAccessor = "cssFloat";
if (ExecutionEnvironment.canUseDOM) {
var tempStyle = document.createElement("div").style;
try {
tempStyle.font = "";
} catch (e) {
hasShorthandPropertyBug = !0;
}
void 0 === document.documentElement.style.cssFloat && (styleFloatAccessor = "styleFloat");
}
var CSSPropertyOperations = {
createMarkupForStyles: function(styles, component) {
var serialized = "";
for (var styleName in styles) if (styles.hasOwnProperty(styleName)) {
var styleValue = styles[styleName];
null != styleValue && (serialized += processStyleName(styleName) + ":", serialized += dangerousStyleValue(styleName, styleValue, component) + ";");
}
return serialized || null;
},
setValueForStyles: function(node, styles, component) {
var style = node.style;
for (var styleName in styles) if (styles.hasOwnProperty(styleName)) {
var styleValue = dangerousStyleValue(styleName, styles[styleName], component);
if ("float" !== styleName && "cssFloat" !== styleName || (styleName = styleFloatAccessor),
styleValue) style[styleName] = styleValue; else {
var expansion = hasShorthandPropertyBug && CSSProperty.shorthandPropertyExpansions[styleName];
if (expansion) for (var individualStyleName in expansion) style[individualStyleName] = ""; else style[styleName] = "";
}
}
}
};
module.exports = CSSPropertyOperations;
}, function(module, exports) {
"use strict";
function prefixKey(prefix, key) {
return prefix + key.charAt(0).toUpperCase() + key.substring(1);
}
var isUnitlessNumber = {
animationIterationCount: !0,
borderImageOutset: !0,
borderImageSlice: !0,
borderImageWidth: !0,
boxFlex: !0,
boxFlexGroup: !0,
boxOrdinalGroup: !0,
columnCount: !0,
flex: !0,
flexGrow: !0,
flexPositive: !0,
flexShrink: !0,
flexNegative: !0,
flexOrder: !0,
gridRow: !0,
gridColumn: !0,
fontWeight: !0,
lineClamp: !0,
lineHeight: !0,
opacity: !0,
order: !0,
orphans: !0,
tabSize: !0,
widows: !0,
zIndex: !0,
zoom: !0,
fillOpacity: !0,
floodOpacity: !0,
stopOpacity: !0,
strokeDasharray: !0,
strokeDashoffset: !0,
strokeMiterlimit: !0,
strokeOpacity: !0,
strokeWidth: !0
}, prefixes = [ "Webkit", "ms", "Moz", "O" ];
Object.keys(isUnitlessNumber).forEach(function(prop) {
prefixes.forEach(function(prefix) {
isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
});
});
var shorthandPropertyExpansions = {
background: {
backgroundAttachment: !0,
backgroundColor: !0,
backgroundImage: !0,
backgroundPositionX: !0,
backgroundPositionY: !0,
backgroundRepeat: !0
},
backgroundPosition: {
backgroundPositionX: !0,
backgroundPositionY: !0
},
border: {
borderWidth: !0,
borderStyle: !0,
borderColor: !0
},
borderBottom: {
borderBottomWidth: !0,
borderBottomStyle: !0,
borderBottomColor: !0
},
borderLeft: {
borderLeftWidth: !0,
borderLeftStyle: !0,
borderLeftColor: !0
},
borderRight: {
borderRightWidth: !0,
borderRightStyle: !0,
borderRightColor: !0
},
borderTop: {
borderTopWidth: !0,
borderTopStyle: !0,
borderTopColor: !0
},
font: {
fontStyle: !0,
fontVariant: !0,
fontWeight: !0,
fontSize: !0,
lineHeight: !0,
fontFamily: !0
},
outline: {
outlineWidth: !0,
outlineStyle: !0,
outlineColor: !0
}
}, CSSProperty = {
isUnitlessNumber: isUnitlessNumber,
shorthandPropertyExpansions: shorthandPropertyExpansions
};
module.exports = CSSProperty;
}, function(module, exports, __webpack_require__) {
"use strict";
function camelizeStyleName(string) {
return camelize(string.replace(msPattern, "ms-"));
}
var camelize = __webpack_require__(109), msPattern = /^-ms-/;
module.exports = camelizeStyleName;
}, function(module, exports) {
"use strict";
function camelize(string) {
return string.replace(_hyphenPattern, function(_, character) {
return character.toUpperCase();
});
}
var _hyphenPattern = /-(.)/g;
module.exports = camelize;
}, function(module, exports, __webpack_require__) {
"use strict";
function dangerousStyleValue(name, value, component) {
var isEmpty = null == value || "boolean" == typeof value || "" === value;
if (isEmpty) return "";
var isNonNumeric = isNaN(value);
if (isNonNumeric || 0 === value || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) return "" + value;
if ("string" == typeof value) {
value = value.trim();
}
return value + "px";
}
var CSSProperty = __webpack_require__(107), isUnitlessNumber = (__webpack_require__(59),
CSSProperty.isUnitlessNumber);
module.exports = dangerousStyleValue;
}, function(module, exports, __webpack_require__) {
"use strict";
function hyphenateStyleName(string) {
return hyphenate(string).replace(msPattern, "-ms-");
}
var hyphenate = __webpack_require__(112), msPattern = /^ms-/;
module.exports = hyphenateStyleName;
}, function(module, exports) {
"use strict";
function hyphenate(string) {
return string.replace(_uppercasePattern, "-$1").toLowerCase();
}
var _uppercasePattern = /([A-Z])/g;
module.exports = hyphenate;
}, function(module, exports) {
"use strict";
function memoizeStringOnly(callback) {
var cache = {};
return function(string) {
return cache.hasOwnProperty(string) || (cache[string] = callback.call(this, string)),
cache[string];
};
}
module.exports = memoizeStringOnly;
}, function(module, exports, __webpack_require__) {
"use strict";
function isAttributeNameSafe(attributeName) {
return !!validatedAttributeNameCache.hasOwnProperty(attributeName) || !illegalAttributeNameCache.hasOwnProperty(attributeName) && (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName) ? (validatedAttributeNameCache[attributeName] = !0,
!0) : (illegalAttributeNameCache[attributeName] = !0, !1));
}
function shouldIgnoreValue(propertyInfo, value) {
return null == value || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === !1;
}
var DOMProperty = __webpack_require__(48), quoteAttributeValueForBrowser = (__webpack_require__(46),
__webpack_require__(78), __webpack_require__(115)), VALID_ATTRIBUTE_NAME_REGEX = (__webpack_require__(59),
new RegExp("^[" + DOMProperty.ATTRIBUTE_NAME_START_CHAR + "][" + DOMProperty.ATTRIBUTE_NAME_CHAR + "]*$")), illegalAttributeNameCache = {}, validatedAttributeNameCache = {}, DOMPropertyOperations = {
createMarkupForID: function(id) {
return DOMProperty.ID_ATTRIBUTE_NAME + "=" + quoteAttributeValueForBrowser(id);
},
setAttributeForID: function(node, id) {
node.setAttribute(DOMProperty.ID_ATTRIBUTE_NAME, id);
},
createMarkupForRoot: function() {
return DOMProperty.ROOT_ATTRIBUTE_NAME + '=""';
},
setAttributeForRoot: function(node) {
node.setAttribute(DOMProperty.ROOT_ATTRIBUTE_NAME, "");
},
createMarkupForProperty: function(name, value) {
var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
if (propertyInfo) {
if (shouldIgnoreValue(propertyInfo, value)) return "";
var attributeName = propertyInfo.attributeName;
return propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === !0 ? attributeName + '=""' : attributeName + "=" + quoteAttributeValueForBrowser(value);
}
return DOMProperty.isCustomAttribute(name) ? null == value ? "" : name + "=" + quoteAttributeValueForBrowser(value) : null;
},
createMarkupForCustomAttribute: function(name, value) {
return isAttributeNameSafe(name) && null != value ? name + "=" + quoteAttributeValueForBrowser(value) : "";
},
setValueForProperty: function(node, name, value) {
var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
if (propertyInfo) {
var mutationMethod = propertyInfo.mutationMethod;
if (mutationMethod) mutationMethod(node, value); else {
if (shouldIgnoreValue(propertyInfo, value)) return void this.deleteValueForProperty(node, name);
if (propertyInfo.mustUseProperty) node[propertyInfo.propertyName] = value; else {
var attributeName = propertyInfo.attributeName, namespace = propertyInfo.attributeNamespace;
namespace ? node.setAttributeNS(namespace, attributeName, "" + value) : propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === !0 ? node.setAttribute(attributeName, "") : node.setAttribute(attributeName, "" + value);
}
}
} else if (DOMProperty.isCustomAttribute(name)) return void DOMPropertyOperations.setValueForAttribute(node, name, value);
},
setValueForAttribute: function(node, name, value) {
if (isAttributeNameSafe(name)) {
null == value ? node.removeAttribute(name) : node.setAttribute(name, "" + value);
}
},
deleteValueForAttribute: function(node, name) {
node.removeAttribute(name);
},
deleteValueForProperty: function(node, name) {
var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
if (propertyInfo) {
var mutationMethod = propertyInfo.mutationMethod;
if (mutationMethod) mutationMethod(node, void 0); else if (propertyInfo.mustUseProperty) {
var propName = propertyInfo.propertyName;
propertyInfo.hasBooleanValue ? node[propName] = !1 : node[propName] = "";
} else node.removeAttribute(propertyInfo.attributeName);
} else DOMProperty.isCustomAttribute(name) && node.removeAttribute(name);
}
};
module.exports = DOMPropertyOperations;
}, function(module, exports, __webpack_require__) {
"use strict";
function quoteAttributeValueForBrowser(value) {
return '"' + escapeTextContentForBrowser(value) + '"';
}
var escapeTextContentForBrowser = __webpack_require__(97);
module.exports = quoteAttributeValueForBrowser;
}, function(module, exports, __webpack_require__) {
"use strict";
function getListeningForDocument(mountAt) {
return Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey) || (mountAt[topListenersIDKey] = reactTopListenersCounter++,
alreadyListeningTo[mountAt[topListenersIDKey]] = {}), alreadyListeningTo[mountAt[topListenersIDKey]];
}
var hasEventPageXY, _assign = __webpack_require__(65), EventPluginRegistry = __webpack_require__(56), ReactEventEmitterMixin = __webpack_require__(117), ViewportMetrics = __webpack_require__(87), getVendorPrefixedEventName = __webpack_require__(118), isEventSupported = __webpack_require__(81), alreadyListeningTo = {}, isMonitoringScrollValue = !1, reactTopListenersCounter = 0, topEventMapping = {
topAbort: "abort",
topAnimationEnd: getVendorPrefixedEventName("animationend") || "animationend",
topAnimationIteration: getVendorPrefixedEventName("animationiteration") || "animationiteration",
topAnimationStart: getVendorPrefixedEventName("animationstart") || "animationstart",
topBlur: "blur",
topCanPlay: "canplay",
topCanPlayThrough: "canplaythrough",
topChange: "change",
topClick: "click",
topCompositionEnd: "compositionend",
topCompositionStart: "compositionstart",
topCompositionUpdate: "compositionupdate",
topContextMenu: "contextmenu",
topCopy: "copy",
topCut: "cut",
topDoubleClick: "dblclick",
topDrag: "drag",
topDragEnd: "dragend",
topDragEnter: "dragenter",
topDragExit: "dragexit",
topDragLeave: "dragleave",
topDragOver: "dragover",
topDragStart: "dragstart",
topDrop: "drop",
topDurationChange: "durationchange",
topEmptied: "emptied",
topEncrypted: "encrypted",
topEnded: "ended",
topError: "error",
topFocus: "focus",
topInput: "input",
topKeyDown: "keydown",
topKeyPress: "keypress",
topKeyUp: "keyup",
topLoadedData: "loadeddata",
topLoadedMetadata: "loadedmetadata",
topLoadStart: "loadstart",
topMouseDown: "mousedown",
topMouseMove: "mousemove",
topMouseOut: "mouseout",
topMouseOver: "mouseover",
topMouseUp: "mouseup",
topPaste: "paste",
topPause: "pause",
topPlay: "play",
topPlaying: "playing",
topProgress: "progress",
topRateChange: "ratechange",
topScroll: "scroll",
topSeeked: "seeked",
topSeeking: "seeking",
topSelectionChange: "selectionchange",
topStalled: "stalled",
topSuspend: "suspend",
topTextInput: "textInput",
topTimeUpdate: "timeupdate",
topTouchCancel: "touchcancel",
topTouchEnd: "touchend",
topTouchMove: "touchmove",
topTouchStart: "touchstart",
topTransitionEnd: getVendorPrefixedEventName("transitionend") || "transitionend",
topVolumeChange: "volumechange",
topWaiting: "waiting",
topWheel: "wheel"
}, topListenersIDKey = "_reactListenersID" + String(Math.random()).slice(2), ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, {
ReactEventListener: null,
injection: {
injectReactEventListener: function(ReactEventListener) {
ReactEventListener.setHandleTopLevel(ReactBrowserEventEmitter.handleTopLevel), ReactBrowserEventEmitter.ReactEventListener = ReactEventListener;
}
},
setEnabled: function(enabled) {
ReactBrowserEventEmitter.ReactEventListener && ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled);
},
isEnabled: function() {
return !(!ReactBrowserEventEmitter.ReactEventListener || !ReactBrowserEventEmitter.ReactEventListener.isEnabled());
},
listenTo: function(registrationName, contentDocumentHandle) {
for (var mountAt = contentDocumentHandle, isListening = getListeningForDocument(mountAt), dependencies = EventPluginRegistry.registrationNameDependencies[registrationName], i = 0; i < dependencies.length; i++) {
var dependency = dependencies[i];
isListening.hasOwnProperty(dependency) && isListening[dependency] || ("topWheel" === dependency ? isEventSupported("wheel") ? ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent("topWheel", "wheel", mountAt) : isEventSupported("mousewheel") ? ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent("topWheel", "mousewheel", mountAt) : ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent("topWheel", "DOMMouseScroll", mountAt) : "topScroll" === dependency ? isEventSupported("scroll", !0) ? ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent("topScroll", "scroll", mountAt) : ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent("topScroll", "scroll", ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE) : "topFocus" === dependency || "topBlur" === dependency ? (isEventSupported("focus", !0) ? (ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent("topFocus", "focus", mountAt),
ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent("topBlur", "blur", mountAt)) : isEventSupported("focusin") && (ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent("topFocus", "focusin", mountAt),
ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent("topBlur", "focusout", mountAt)),
isListening.topBlur = !0, isListening.topFocus = !0) : topEventMapping.hasOwnProperty(dependency) && ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(dependency, topEventMapping[dependency], mountAt),
isListening[dependency] = !0);
}
},
trapBubbledEvent: function(topLevelType, handlerBaseName, handle) {
return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelType, handlerBaseName, handle);
},
trapCapturedEvent: function(topLevelType, handlerBaseName, handle) {
return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelType, handlerBaseName, handle);
},
supportsEventPageXY: function() {
if (!document.createEvent) return !1;
var ev = document.createEvent("MouseEvent");
return null != ev && "pageX" in ev;
},
ensureScrollValueMonitoring: function() {
if (void 0 === hasEventPageXY && (hasEventPageXY = ReactBrowserEventEmitter.supportsEventPageXY()),
!hasEventPageXY && !isMonitoringScrollValue) {
var refresh = ViewportMetrics.refreshScrollValues;
ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh), isMonitoringScrollValue = !0;
}
}
});
module.exports = ReactBrowserEventEmitter;
}, function(module, exports, __webpack_require__) {
"use strict";
function runEventQueueInBatch(events) {
EventPluginHub.enqueueEvents(events), EventPluginHub.processEventQueue(!1);
}
var EventPluginHub = __webpack_require__(55), ReactEventEmitterMixin = {
handleTopLevel: function(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
var events = EventPluginHub.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
runEventQueueInBatch(events);
}
};
module.exports = ReactEventEmitterMixin;
}, function(module, exports, __webpack_require__) {
"use strict";
function makePrefixMap(styleProp, eventName) {
var prefixes = {};
return prefixes[styleProp.toLowerCase()] = eventName.toLowerCase(), prefixes["Webkit" + styleProp] = "webkit" + eventName,
prefixes["Moz" + styleProp] = "moz" + eventName, prefixes["ms" + styleProp] = "MS" + eventName,
prefixes["O" + styleProp] = "o" + eventName.toLowerCase(), prefixes;
}
function getVendorPrefixedEventName(eventName) {
if (prefixedEventNames[eventName]) return prefixedEventNames[eventName];
if (!vendorPrefixes[eventName]) return eventName;
var prefixMap = vendorPrefixes[eventName];
for (var styleProp in prefixMap) if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) return prefixedEventNames[eventName] = prefixMap[styleProp];
return "";
}
var ExecutionEnvironment = __webpack_require__(63), vendorPrefixes = {
animationend: makePrefixMap("Animation", "AnimationEnd"),
animationiteration: makePrefixMap("Animation", "AnimationIteration"),
animationstart: makePrefixMap("Animation", "AnimationStart"),
transitionend: makePrefixMap("Transition", "TransitionEnd")
}, prefixedEventNames = {}, style = {};
ExecutionEnvironment.canUseDOM && (style = document.createElement("div").style,
"AnimationEvent" in window || (delete vendorPrefixes.animationend.animation, delete vendorPrefixes.animationiteration.animation,
delete vendorPrefixes.animationstart.animation), "TransitionEvent" in window || delete vendorPrefixes.transitionend.transition),
module.exports = getVendorPrefixedEventName;
}, function(module, exports, __webpack_require__) {
"use strict";
function forceUpdateIfMounted() {
this._rootNodeID && ReactDOMInput.updateWrapper(this);
}
function _handleChange(event) {
var props = this._currentElement.props, returnValue = LinkedValueUtils.executeOnChange(props, event);
ReactUpdates.asap(forceUpdateIfMounted, this);
var name = props.name;
if ("radio" === props.type && null != name) {
for (var rootNode = ReactDOMComponentTree.getNodeFromInstance(this), queryRoot = rootNode; queryRoot.parentNode; ) queryRoot = queryRoot.parentNode;
for (var group = queryRoot.querySelectorAll("input[name=" + JSON.stringify("" + name) + '][type="radio"]'), i = 0; i < group.length; i++) {
var otherNode = group[i];
if (otherNode !== rootNode && otherNode.form === rootNode.form) {
var otherInstance = ReactDOMComponentTree.getInstanceFromNode(otherNode);
otherInstance ? void 0 : _prodInvariant("90"), ReactUpdates.asap(forceUpdateIfMounted, otherInstance);
}
}
}
return returnValue;
}
var _prodInvariant = __webpack_require__(47), _assign = __webpack_require__(65), DOMPropertyOperations = __webpack_require__(114), LinkedValueUtils = __webpack_require__(120), ReactDOMComponentTree = __webpack_require__(46), ReactUpdates = __webpack_require__(72), ReactDOMInput = (__webpack_require__(49),
__webpack_require__(59), {
getHostProps: function(inst, props) {
var value = LinkedValueUtils.getValue(props), checked = LinkedValueUtils.getChecked(props), hostProps = _assign({
type: void 0,
step: void 0,
min: void 0,
max: void 0
}, props, {
defaultChecked: void 0,
defaultValue: void 0,
value: null != value ? value : inst._wrapperState.initialValue,
checked: null != checked ? checked : inst._wrapperState.initialChecked,
onChange: inst._wrapperState.onChange
});
return hostProps;
},
mountWrapper: function(inst, props) {
var defaultValue = props.defaultValue;
inst._wrapperState = {
initialChecked: null != props.checked ? props.checked : props.defaultChecked,
initialValue: null != props.value ? props.value : defaultValue,
listeners: null,
onChange: _handleChange.bind(inst)
};
},
updateWrapper: function(inst) {
var props = inst._currentElement.props, checked = props.checked;
null != checked && DOMPropertyOperations.setValueForProperty(ReactDOMComponentTree.getNodeFromInstance(inst), "checked", checked || !1);
var node = ReactDOMComponentTree.getNodeFromInstance(inst), value = LinkedValueUtils.getValue(props);
if (null != value) {
var newValue = "" + value;
newValue !== node.value && (node.value = newValue);
} else null == props.value && null != props.defaultValue && node.defaultValue !== "" + props.defaultValue && (node.defaultValue = "" + props.defaultValue),
null == props.checked && null != props.defaultChecked && (node.defaultChecked = !!props.defaultChecked);
},
postMountWrapper: function(inst) {
var props = inst._currentElement.props, node = ReactDOMComponentTree.getNodeFromInstance(inst);
switch (props.type) {
case "submit":
case "reset":
break;
case "color":
case "date":
case "datetime":
case "datetime-local":
case "month":
case "time":
case "week":
node.value = "", node.value = node.defaultValue;
break;
default:
node.value = node.value;
}
var name = node.name;
"" !== name && (node.name = ""), node.defaultChecked = !node.defaultChecked, node.defaultChecked = !node.defaultChecked,
"" !== name && (node.name = name);
}
});
module.exports = ReactDOMInput;
}, function(module, exports, __webpack_require__) {
"use strict";
function _assertSingleLink(inputProps) {
null != inputProps.checkedLink && null != inputProps.valueLink ? _prodInvariant("87") : void 0;
}
function _assertValueLink(inputProps) {
_assertSingleLink(inputProps), null != inputProps.value || null != inputProps.onChange ? _prodInvariant("88") : void 0;
}
function _assertCheckedLink(inputProps) {
_assertSingleLink(inputProps), null != inputProps.checked || null != inputProps.onChange ? _prodInvariant("89") : void 0;
}
function getDeclarationErrorAddendum(owner) {
if (owner) {
var name = owner.getName();
if (name) return " Check the render method of `" + name + "`.";
}
return "";
}
var _prodInvariant = __webpack_require__(47), React = __webpack_require__(7), ReactPropTypesSecret = __webpack_require__(121), hasReadOnlyValue = (__webpack_require__(49),
__webpack_require__(59), {
button: !0,
checkbox: !0,
image: !0,
hidden: !0,
radio: !0,
reset: !0,
submit: !0
}), propTypes = {
value: function(props, propName, componentName) {
return !props[propName] || hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled ? null : new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.");
},
checked: function(props, propName, componentName) {
return !props[propName] || props.onChange || props.readOnly || props.disabled ? null : new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.");
},
onChange: React.PropTypes.func
}, loggedTypeFailures = {}, LinkedValueUtils = {
checkPropTypes: function(tagName, props, owner) {
for (var propName in propTypes) {
if (propTypes.hasOwnProperty(propName)) var error = propTypes[propName](props, propName, tagName, "prop", null, ReactPropTypesSecret);
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
loggedTypeFailures[error.message] = !0;
getDeclarationErrorAddendum(owner);
}
}
},
getValue: function(inputProps) {
return inputProps.valueLink ? (_assertValueLink(inputProps), inputProps.valueLink.value) : inputProps.value;
},
getChecked: function(inputProps) {
return inputProps.checkedLink ? (_assertCheckedLink(inputProps), inputProps.checkedLink.value) : inputProps.checked;
},
executeOnChange: function(inputProps, event) {
return inputProps.valueLink ? (_assertValueLink(inputProps), inputProps.valueLink.requestChange(event.target.value)) : inputProps.checkedLink ? (_assertCheckedLink(inputProps),
inputProps.checkedLink.requestChange(event.target.checked)) : inputProps.onChange ? inputProps.onChange.call(void 0, event) : void 0;
}
};
module.exports = LinkedValueUtils;
}, function(module, exports) {
"use strict";
var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
module.exports = ReactPropTypesSecret;
}, function(module, exports, __webpack_require__) {
"use strict";
function flattenChildren(children) {
var content = "";
return React.Children.forEach(children, function(child) {
null != child && ("string" == typeof child || "number" == typeof child ? content += child : didWarnInvalidOptionChildren || (didWarnInvalidOptionChildren = !0));
}), content;
}
var _assign = __webpack_require__(65), React = __webpack_require__(7), ReactDOMComponentTree = __webpack_require__(46), ReactDOMSelect = __webpack_require__(123), didWarnInvalidOptionChildren = (__webpack_require__(59),
!1), ReactDOMOption = {
mountWrapper: function(inst, props, hostParent) {
var selectValue = null;
if (null != hostParent) {
var selectParent = hostParent;
"optgroup" === selectParent._tag && (selectParent = selectParent._hostParent), null != selectParent && "select" === selectParent._tag && (selectValue = ReactDOMSelect.getSelectValueContext(selectParent));
}
var selected = null;
if (null != selectValue) {
var value;
if (value = null != props.value ? props.value + "" : flattenChildren(props.children),
selected = !1, Array.isArray(selectValue)) {
for (var i = 0; i < selectValue.length; i++) if ("" + selectValue[i] === value) {
selected = !0;
break;
}
} else selected = "" + selectValue === value;
}
inst._wrapperState = {
selected: selected
};
},
postMountWrapper: function(inst) {
var props = inst._currentElement.props;
if (null != props.value) {
var node = ReactDOMComponentTree.getNodeFromInstance(inst);
node.setAttribute("value", props.value);
}
},
getHostProps: function(inst, props) {
var hostProps = _assign({
selected: void 0,
children: void 0
}, props);
null != inst._wrapperState.selected && (hostProps.selected = inst._wrapperState.selected);
var content = flattenChildren(props.children);
return content && (hostProps.children = content), hostProps;
}
};
module.exports = ReactDOMOption;
}, function(module, exports, __webpack_require__) {
"use strict";
function updateOptionsIfPendingUpdateAndMounted() {
if (this._rootNodeID && this._wrapperState.pendingUpdate) {
this._wrapperState.pendingUpdate = !1;
var props = this._currentElement.props, value = LinkedValueUtils.getValue(props);
null != value && updateOptions(this, Boolean(props.multiple), value);
}
}
function updateOptions(inst, multiple, propValue) {
var selectedValue, i, options = ReactDOMComponentTree.getNodeFromInstance(inst).options;
if (multiple) {
for (selectedValue = {}, i = 0; i < propValue.length; i++) selectedValue["" + propValue[i]] = !0;
for (i = 0; i < options.length; i++) {
var selected = selectedValue.hasOwnProperty(options[i].value);
options[i].selected !== selected && (options[i].selected = selected);
}
} else {
for (selectedValue = "" + propValue, i = 0; i < options.length; i++) if (options[i].value === selectedValue) return void (options[i].selected = !0);
options.length && (options[0].selected = !0);
}
}
function _handleChange(event) {
var props = this._currentElement.props, returnValue = LinkedValueUtils.executeOnChange(props, event);
return this._rootNodeID && (this._wrapperState.pendingUpdate = !0), ReactUpdates.asap(updateOptionsIfPendingUpdateAndMounted, this),
returnValue;
}
var _assign = __webpack_require__(65), LinkedValueUtils = __webpack_require__(120), ReactDOMComponentTree = __webpack_require__(46), ReactUpdates = __webpack_require__(72), didWarnValueDefaultValue = (__webpack_require__(59),
!1), ReactDOMSelect = {
getHostProps: function(inst, props) {
return _assign({}, props, {
onChange: inst._wrapperState.onChange,
value: void 0
});
},
mountWrapper: function(inst, props) {
var value = LinkedValueUtils.getValue(props);
inst._wrapperState = {
pendingUpdate: !1,
initialValue: null != value ? value : props.defaultValue,
listeners: null,
onChange: _handleChange.bind(inst),
wasMultiple: Boolean(props.multiple)
}, void 0 === props.value || void 0 === props.defaultValue || didWarnValueDefaultValue || (didWarnValueDefaultValue = !0);
},
getSelectValueContext: function(inst) {
return inst._wrapperState.initialValue;
},
postUpdateWrapper: function(inst) {
var props = inst._currentElement.props;
inst._wrapperState.initialValue = void 0;
var wasMultiple = inst._wrapperState.wasMultiple;
inst._wrapperState.wasMultiple = Boolean(props.multiple);
var value = LinkedValueUtils.getValue(props);
null != value ? (inst._wrapperState.pendingUpdate = !1, updateOptions(inst, Boolean(props.multiple), value)) : wasMultiple !== Boolean(props.multiple) && (null != props.defaultValue ? updateOptions(inst, Boolean(props.multiple), props.defaultValue) : updateOptions(inst, Boolean(props.multiple), props.multiple ? [] : ""));
}
};
module.exports = ReactDOMSelect;
}, function(module, exports, __webpack_require__) {
"use strict";
function forceUpdateIfMounted() {
this._rootNodeID && ReactDOMTextarea.updateWrapper(this);
}
function _handleChange(event) {
var props = this._currentElement.props, returnValue = LinkedValueUtils.executeOnChange(props, event);
return ReactUpdates.asap(forceUpdateIfMounted, this), returnValue;
}
var _prodInvariant = __webpack_require__(47), _assign = __webpack_require__(65), LinkedValueUtils = __webpack_require__(120), ReactDOMComponentTree = __webpack_require__(46), ReactUpdates = __webpack_require__(72), ReactDOMTextarea = (__webpack_require__(49),
__webpack_require__(59), {
getHostProps: function(inst, props) {
null != props.dangerouslySetInnerHTML ? _prodInvariant("91") : void 0;
var hostProps = _assign({}, props, {
value: void 0,
defaultValue: void 0,
children: "" + inst._wrapperState.initialValue,
onChange: inst._wrapperState.onChange
});
return hostProps;
},
mountWrapper: function(inst, props) {
var value = LinkedValueUtils.getValue(props), initialValue = value;
if (null == value) {
var defaultValue = props.defaultValue, children = props.children;
null != children && (null != defaultValue ? _prodInvariant("92") : void 0, Array.isArray(children) && (children.length <= 1 ? void 0 : _prodInvariant("93"),
children = children[0]), defaultValue = "" + children), null == defaultValue && (defaultValue = ""),
initialValue = defaultValue;
}
inst._wrapperState = {
initialValue: "" + initialValue,
listeners: null,
onChange: _handleChange.bind(inst)
};
},
updateWrapper: function(inst) {
var props = inst._currentElement.props, node = ReactDOMComponentTree.getNodeFromInstance(inst), value = LinkedValueUtils.getValue(props);
if (null != value) {
var newValue = "" + value;
newValue !== node.value && (node.value = newValue), null == props.defaultValue && (node.defaultValue = newValue);
}
null != props.defaultValue && (node.defaultValue = props.defaultValue);
},
postMountWrapper: function(inst) {
var node = ReactDOMComponentTree.getNodeFromInstance(inst), textContent = node.textContent;
textContent === inst._wrapperState.initialValue && (node.value = textContent);
}
});
module.exports = ReactDOMTextarea;
}, function(module, exports, __webpack_require__) {
"use strict";
function makeInsertMarkup(markup, afterNode, toIndex) {
return {
type: "INSERT_MARKUP",
content: markup,
fromIndex: null,
fromNode: null,
toIndex: toIndex,
afterNode: afterNode
};
}
function makeMove(child, afterNode, toIndex) {
return {
type: "MOVE_EXISTING",
content: null,
fromIndex: child._mountIndex,
fromNode: ReactReconciler.getHostNode(child),
toIndex: toIndex,
afterNode: afterNode
};
}
function makeRemove(child, node) {
return {
type: "REMOVE_NODE",
content: null,
fromIndex: child._mountIndex,
fromNode: node,
toIndex: null,
afterNode: null
};
}
function makeSetMarkup(markup) {
return {
type: "SET_MARKUP",
content: markup,
fromIndex: null,
fromNode: null,
toIndex: null,
afterNode: null
};
}
function makeTextContent(textContent) {
return {
type: "TEXT_CONTENT",
content: textContent,
fromIndex: null,
fromNode: null,
toIndex: null,
afterNode: null
};
}
function enqueue(queue, update) {
return update && (queue = queue || [], queue.push(update)), queue;
}
function processQueue(inst, updateQueue) {
ReactComponentEnvironment.processChildrenUpdates(inst, updateQueue);
}
var _prodInvariant = __webpack_require__(47), ReactComponentEnvironment = __webpack_require__(126), ReactReconciler = (__webpack_require__(127),
__webpack_require__(78), __webpack_require__(14), __webpack_require__(75)), ReactChildReconciler = __webpack_require__(128), flattenChildren = (__webpack_require__(60),
__webpack_require__(143)), ReactMultiChild = (__webpack_require__(49), {
Mixin: {
_reconcilerInstantiateChildren: function(nestedChildren, transaction, context) {
return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context);
},
_reconcilerUpdateChildren: function(prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context) {
var nextChildren, selfDebugID = 0;
return nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID),
ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID),
nextChildren;
},
mountChildren: function(nestedChildren, transaction, context) {
var children = this._reconcilerInstantiateChildren(nestedChildren, transaction, context);
this._renderedChildren = children;
var mountImages = [], index = 0;
for (var name in children) if (children.hasOwnProperty(name)) {
var child = children[name], selfDebugID = 0, mountImage = ReactReconciler.mountComponent(child, transaction, this, this._hostContainerInfo, context, selfDebugID);
child._mountIndex = index++, mountImages.push(mountImage);
}
return mountImages;
},
updateTextContent: function(nextContent) {
var prevChildren = this._renderedChildren;
ReactChildReconciler.unmountChildren(prevChildren, !1);
for (var name in prevChildren) prevChildren.hasOwnProperty(name) && _prodInvariant("118");
var updates = [ makeTextContent(nextContent) ];
processQueue(this, updates);
},
updateMarkup: function(nextMarkup) {
var prevChildren = this._renderedChildren;
ReactChildReconciler.unmountChildren(prevChildren, !1);
for (var name in prevChildren) prevChildren.hasOwnProperty(name) && _prodInvariant("118");
var updates = [ makeSetMarkup(nextMarkup) ];
processQueue(this, updates);
},
updateChildren: function(nextNestedChildrenElements, transaction, context) {
this._updateChildren(nextNestedChildrenElements, transaction, context);
},
_updateChildren: function(nextNestedChildrenElements, transaction, context) {
var prevChildren = this._renderedChildren, removedNodes = {}, mountImages = [], nextChildren = this._reconcilerUpdateChildren(prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context);
if (nextChildren || prevChildren) {
var name, updates = null, nextIndex = 0, lastIndex = 0, nextMountIndex = 0, lastPlacedNode = null;
for (name in nextChildren) if (nextChildren.hasOwnProperty(name)) {
var prevChild = prevChildren && prevChildren[name], nextChild = nextChildren[name];
prevChild === nextChild ? (updates = enqueue(updates, this.moveChild(prevChild, lastPlacedNode, nextIndex, lastIndex)),
lastIndex = Math.max(prevChild._mountIndex, lastIndex), prevChild._mountIndex = nextIndex) : (prevChild && (lastIndex = Math.max(prevChild._mountIndex, lastIndex)),
updates = enqueue(updates, this._mountChildAtIndex(nextChild, mountImages[nextMountIndex], lastPlacedNode, nextIndex, transaction, context)),
nextMountIndex++), nextIndex++, lastPlacedNode = ReactReconciler.getHostNode(nextChild);
}
for (name in removedNodes) removedNodes.hasOwnProperty(name) && (updates = enqueue(updates, this._unmountChild(prevChildren[name], removedNodes[name])));
updates && processQueue(this, updates), this._renderedChildren = nextChildren;
}
},
unmountChildren: function(safely) {
var renderedChildren = this._renderedChildren;
ReactChildReconciler.unmountChildren(renderedChildren, safely), this._renderedChildren = null;
},
moveChild: function(child, afterNode, toIndex, lastIndex) {
if (child._mountIndex < lastIndex) return makeMove(child, afterNode, toIndex);
},
createChild: function(child, afterNode, mountImage) {
return makeInsertMarkup(mountImage, afterNode, child._mountIndex);
},
removeChild: function(child, node) {
return makeRemove(child, node);
},
_mountChildAtIndex: function(child, mountImage, afterNode, index, transaction, context) {
return child._mountIndex = index, this.createChild(child, afterNode, mountImage);
},
_unmountChild: function(child, node) {
var update = this.removeChild(child, node);
return child._mountIndex = null, update;
}
}
});
module.exports = ReactMultiChild;
}, function(module, exports, __webpack_require__) {
"use strict";
var _prodInvariant = __webpack_require__(47), injected = (__webpack_require__(49),
!1), ReactComponentEnvironment = {
replaceNodeWithMarkup: null,
processChildrenUpdates: null,
injection: {
injectEnvironment: function(environment) {
injected ? _prodInvariant("104") : void 0, ReactComponentEnvironment.replaceNodeWithMarkup = environment.replaceNodeWithMarkup,
ReactComponentEnvironment.processChildrenUpdates = environment.processChildrenUpdates,
injected = !0;
}
}
};
module.exports = ReactComponentEnvironment;
}, function(module, exports) {
"use strict";
var ReactInstanceMap = {
remove: function(key) {
key._reactInternalInstance = void 0;
},
get: function(key) {
return key._reactInternalInstance;
},
has: function(key) {
return void 0 !== key._reactInternalInstance;
},
set: function(key, value) {
key._reactInternalInstance = value;
}
};
module.exports = ReactInstanceMap;
}, function(module, exports, __webpack_require__) {
"use strict";
function instantiateChild(childInstances, child, name, selfDebugID) {
var keyUnique = void 0 === childInstances[name];
null != child && keyUnique && (childInstances[name] = instantiateReactComponent(child, !0));
}
var ReactReconciler = __webpack_require__(75), instantiateReactComponent = __webpack_require__(129), shouldUpdateReactComponent = (__webpack_require__(138),
__webpack_require__(134)), traverseAllChildren = __webpack_require__(139);
__webpack_require__(59);
"undefined" != typeof process && process.env, 1;
var ReactChildReconciler = {
instantiateChildren: function(nestedChildNodes, transaction, context, selfDebugID) {
if (null == nestedChildNodes) return null;
var childInstances = {};
return traverseAllChildren(nestedChildNodes, instantiateChild, childInstances),
childInstances;
},
updateChildren: function(prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context, selfDebugID) {
if (nextChildren || prevChildren) {
var name, prevChild;
for (name in nextChildren) if (nextChildren.hasOwnProperty(name)) {
prevChild = prevChildren && prevChildren[name];
var prevElement = prevChild && prevChild._currentElement, nextElement = nextChildren[name];
if (null != prevChild && shouldUpdateReactComponent(prevElement, nextElement)) ReactReconciler.receiveComponent(prevChild, nextElement, transaction, context),
nextChildren[name] = prevChild; else {
prevChild && (removedNodes[name] = ReactReconciler.getHostNode(prevChild), ReactReconciler.unmountComponent(prevChild, !1));
var nextChildInstance = instantiateReactComponent(nextElement, !0);
nextChildren[name] = nextChildInstance;
var nextChildMountImage = ReactReconciler.mountComponent(nextChildInstance, transaction, hostParent, hostContainerInfo, context, selfDebugID);
mountImages.push(nextChildMountImage);
}
}
for (name in prevChildren) !prevChildren.hasOwnProperty(name) || nextChildren && nextChildren.hasOwnProperty(name) || (prevChild = prevChildren[name],
removedNodes[name] = ReactReconciler.getHostNode(prevChild), ReactReconciler.unmountComponent(prevChild, !1));
}
},
unmountChildren: function(renderedChildren, safely) {
for (var name in renderedChildren) if (renderedChildren.hasOwnProperty(name)) {
var renderedChild = renderedChildren[name];
ReactReconciler.unmountComponent(renderedChild, safely);
}
}
};
module.exports = ReactChildReconciler;
}, function(module, exports, __webpack_require__) {
"use strict";
function getDeclarationErrorAddendum(owner) {
if (owner) {
var name = owner.getName();
if (name) return " Check the render method of `" + name + "`.";
}
return "";
}
function isInternalComponentType(type) {
return "function" == typeof type && "undefined" != typeof type.prototype && "function" == typeof type.prototype.mountComponent && "function" == typeof type.prototype.receiveComponent;
}
function instantiateReactComponent(node, shouldHaveDebugID) {
var instance;
if (null === node || node === !1) instance = ReactEmptyComponent.create(instantiateReactComponent); else if ("object" == typeof node) {
var element = node, type = element.type;
if ("function" != typeof type && "string" != typeof type) {
var info = "";
info += getDeclarationErrorAddendum(element._owner), _prodInvariant("130", null == type ? type : typeof type, info);
}
"string" == typeof element.type ? instance = ReactHostComponent.createInternalComponent(element) : isInternalComponentType(element.type) ? (instance = new element.type(element),
instance.getHostNode || (instance.getHostNode = instance.getNativeNode)) : instance = new ReactCompositeComponentWrapper(element);
} else "string" == typeof node || "number" == typeof node ? instance = ReactHostComponent.createInstanceForText(node) : _prodInvariant("131", typeof node);
return instance._mountIndex = 0, instance._mountImage = null, instance;
}
var _prodInvariant = __webpack_require__(47), _assign = __webpack_require__(65), ReactCompositeComponent = __webpack_require__(130), ReactEmptyComponent = __webpack_require__(135), ReactHostComponent = __webpack_require__(136), ReactCompositeComponentWrapper = (__webpack_require__(137),
__webpack_require__(49), __webpack_require__(59), function(element) {
this.construct(element);
});
_assign(ReactCompositeComponentWrapper.prototype, ReactCompositeComponent, {
_instantiateReactComponent: instantiateReactComponent
}), module.exports = instantiateReactComponent;
}, function(module, exports, __webpack_require__) {
"use strict";
function StatelessComponent(Component) {}
function warnIfInvalidElement(Component, element) {}
function shouldConstruct(Component) {
return !(!Component.prototype || !Component.prototype.isReactComponent);
}
function isPureComponent(Component) {
return !(!Component.prototype || !Component.prototype.isPureReactComponent);
}
var _prodInvariant = __webpack_require__(47), _assign = __webpack_require__(65), React = __webpack_require__(7), ReactComponentEnvironment = __webpack_require__(126), ReactCurrentOwner = __webpack_require__(14), ReactErrorUtils = __webpack_require__(58), ReactInstanceMap = __webpack_require__(127), ReactNodeTypes = (__webpack_require__(78),
__webpack_require__(131)), ReactReconciler = __webpack_require__(75), emptyObject = __webpack_require__(132), shallowEqual = (__webpack_require__(49),
__webpack_require__(133)), shouldUpdateReactComponent = __webpack_require__(134), CompositeTypes = (__webpack_require__(59),
{
ImpureClass: 0,
PureClass: 1,
StatelessFunctional: 2
});
StatelessComponent.prototype.render = function() {
var Component = ReactInstanceMap.get(this)._currentElement.type, element = Component(this.props, this.context, this.updater);
return warnIfInvalidElement(Component, element), element;
};
var nextMountID = 1, ReactCompositeComponent = {
construct: function(element) {
this._currentElement = element, this._rootNodeID = 0, this._compositeType = null,
this._instance = null, this._hostParent = null, this._hostContainerInfo = null,
this._updateBatchNumber = null, this._pendingElement = null, this._pendingStateQueue = null,
this._pendingReplaceState = !1, this._pendingForceUpdate = !1, this._renderedNodeType = null,
this._renderedComponent = null, this._context = null, this._mountOrder = 0, this._topLevelWrapper = null,
this._pendingCallbacks = null, this._calledComponentWillUnmount = !1;
},
mountComponent: function(transaction, hostParent, hostContainerInfo, context) {
this._context = context, this._mountOrder = nextMountID++, this._hostParent = hostParent,
this._hostContainerInfo = hostContainerInfo;
var renderedElement, publicProps = this._currentElement.props, publicContext = this._processContext(context), Component = this._currentElement.type, updateQueue = transaction.getUpdateQueue(), doConstruct = shouldConstruct(Component), inst = this._constructComponent(doConstruct, publicProps, publicContext, updateQueue);
doConstruct || null != inst && null != inst.render ? isPureComponent(Component) ? this._compositeType = CompositeTypes.PureClass : this._compositeType = CompositeTypes.ImpureClass : (renderedElement = inst,
warnIfInvalidElement(Component, renderedElement), null === inst || inst === !1 || React.isValidElement(inst) ? void 0 : _prodInvariant("105", Component.displayName || Component.name || "Component"),
inst = new StatelessComponent(Component), this._compositeType = CompositeTypes.StatelessFunctional);
inst.props = publicProps, inst.context = publicContext, inst.refs = emptyObject,
inst.updater = updateQueue, this._instance = inst, ReactInstanceMap.set(inst, this);
var initialState = inst.state;
void 0 === initialState && (inst.state = initialState = null), "object" != typeof initialState || Array.isArray(initialState) ? _prodInvariant("106", this.getName() || "ReactCompositeComponent") : void 0,
this._pendingStateQueue = null, this._pendingReplaceState = !1, this._pendingForceUpdate = !1;
var markup;
return markup = inst.unstable_handleError ? this.performInitialMountWithErrorHandling(renderedElement, hostParent, hostContainerInfo, transaction, context) : this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context),
inst.componentDidMount && transaction.getReactMountReady().enqueue(inst.componentDidMount, inst),
markup;
},
_constructComponent: function(doConstruct, publicProps, publicContext, updateQueue) {
return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue);
},
_constructComponentWithoutOwner: function(doConstruct, publicProps, publicContext, updateQueue) {
var Component = this._currentElement.type;
return doConstruct ? new Component(publicProps, publicContext, updateQueue) : Component(publicProps, publicContext, updateQueue);
},
performInitialMountWithErrorHandling: function(renderedElement, hostParent, hostContainerInfo, transaction, context) {
var markup, checkpoint = transaction.checkpoint();
try {
markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
} catch (e) {
transaction.rollback(checkpoint), this._instance.unstable_handleError(e), this._pendingStateQueue && (this._instance.state = this._processPendingState(this._instance.props, this._instance.context)),
checkpoint = transaction.checkpoint(), this._renderedComponent.unmountComponent(!0),
transaction.rollback(checkpoint), markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
}
return markup;
},
performInitialMount: function(renderedElement, hostParent, hostContainerInfo, transaction, context) {
var inst = this._instance, debugID = 0;
inst.componentWillMount && (inst.componentWillMount(), this._pendingStateQueue && (inst.state = this._processPendingState(inst.props, inst.context))),
void 0 === renderedElement && (renderedElement = this._renderValidatedComponent());
var nodeType = ReactNodeTypes.getType(renderedElement);
this._renderedNodeType = nodeType;
var child = this._instantiateReactComponent(renderedElement, nodeType !== ReactNodeTypes.EMPTY);
this._renderedComponent = child;
var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context), debugID);
return markup;
},
getHostNode: function() {
return ReactReconciler.getHostNode(this._renderedComponent);
},
unmountComponent: function(safely) {
if (this._renderedComponent) {
var inst = this._instance;
if (inst.componentWillUnmount && !inst._calledComponentWillUnmount) if (inst._calledComponentWillUnmount = !0,
safely) {
var name = this.getName() + ".componentWillUnmount()";
ReactErrorUtils.invokeGuardedCallback(name, inst.componentWillUnmount.bind(inst));
} else inst.componentWillUnmount();
this._renderedComponent && (ReactReconciler.unmountComponent(this._renderedComponent, safely),
this._renderedNodeType = null, this._renderedComponent = null, this._instance = null),
this._pendingStateQueue = null, this._pendingReplaceState = !1, this._pendingForceUpdate = !1,
this._pendingCallbacks = null, this._pendingElement = null, this._context = null,
this._rootNodeID = 0, this._topLevelWrapper = null, ReactInstanceMap.remove(inst);
}
},
_maskContext: function(context) {
var Component = this._currentElement.type, contextTypes = Component.contextTypes;
if (!contextTypes) return emptyObject;
var maskedContext = {};
for (var contextName in contextTypes) maskedContext[contextName] = context[contextName];
return maskedContext;
},
_processContext: function(context) {
var maskedContext = this._maskContext(context);
return maskedContext;
},
_processChildContext: function(currentContext) {
var childContext, Component = this._currentElement.type, inst = this._instance;
if (inst.getChildContext && (childContext = inst.getChildContext()), childContext) {
"object" != typeof Component.childContextTypes ? _prodInvariant("107", this.getName() || "ReactCompositeComponent") : void 0;
for (var name in childContext) name in Component.childContextTypes ? void 0 : _prodInvariant("108", this.getName() || "ReactCompositeComponent", name);
return _assign({}, currentContext, childContext);
}
return currentContext;
},
_checkContextTypes: function(typeSpecs, values, location) {},
receiveComponent: function(nextElement, transaction, nextContext) {
var prevElement = this._currentElement, prevContext = this._context;
this._pendingElement = null, this.updateComponent(transaction, prevElement, nextElement, prevContext, nextContext);
},
performUpdateIfNecessary: function(transaction) {
null != this._pendingElement ? ReactReconciler.receiveComponent(this, this._pendingElement, transaction, this._context) : null !== this._pendingStateQueue || this._pendingForceUpdate ? this.updateComponent(transaction, this._currentElement, this._currentElement, this._context, this._context) : this._updateBatchNumber = null;
},
updateComponent: function(transaction, prevParentElement, nextParentElement, prevUnmaskedContext, nextUnmaskedContext) {
var inst = this._instance;
null == inst ? _prodInvariant("136", this.getName() || "ReactCompositeComponent") : void 0;
var nextContext, willReceive = !1;
this._context === nextUnmaskedContext ? nextContext = inst.context : (nextContext = this._processContext(nextUnmaskedContext),
willReceive = !0);
var prevProps = prevParentElement.props, nextProps = nextParentElement.props;
prevParentElement !== nextParentElement && (willReceive = !0), willReceive && inst.componentWillReceiveProps && inst.componentWillReceiveProps(nextProps, nextContext);
var nextState = this._processPendingState(nextProps, nextContext), shouldUpdate = !0;
this._pendingForceUpdate || (inst.shouldComponentUpdate ? shouldUpdate = inst.shouldComponentUpdate(nextProps, nextState, nextContext) : this._compositeType === CompositeTypes.PureClass && (shouldUpdate = !shallowEqual(prevProps, nextProps) || !shallowEqual(inst.state, nextState))),
this._updateBatchNumber = null, shouldUpdate ? (this._pendingForceUpdate = !1, this._performComponentUpdate(nextParentElement, nextProps, nextState, nextContext, transaction, nextUnmaskedContext)) : (this._currentElement = nextParentElement,
this._context = nextUnmaskedContext, inst.props = nextProps, inst.state = nextState,
inst.context = nextContext);
},
_processPendingState: function(props, context) {
var inst = this._instance, queue = this._pendingStateQueue, replace = this._pendingReplaceState;
if (this._pendingReplaceState = !1, this._pendingStateQueue = null, !queue) return inst.state;
if (replace && 1 === queue.length) return queue[0];
for (var nextState = _assign({}, replace ? queue[0] : inst.state), i = replace ? 1 : 0; i < queue.length; i++) {
var partial = queue[i];
_assign(nextState, "function" == typeof partial ? partial.call(inst, nextState, props, context) : partial);
}
return nextState;
},
_performComponentUpdate: function(nextElement, nextProps, nextState, nextContext, transaction, unmaskedContext) {
var prevProps, prevState, prevContext, inst = this._instance, hasComponentDidUpdate = Boolean(inst.componentDidUpdate);
hasComponentDidUpdate && (prevProps = inst.props, prevState = inst.state, prevContext = inst.context),
inst.componentWillUpdate && inst.componentWillUpdate(nextProps, nextState, nextContext),
this._currentElement = nextElement, this._context = unmaskedContext, inst.props = nextProps,
inst.state = nextState, inst.context = nextContext, this._updateRenderedComponent(transaction, unmaskedContext),
hasComponentDidUpdate && transaction.getReactMountReady().enqueue(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), inst);
},
_updateRenderedComponent: function(transaction, context) {
var prevComponentInstance = this._renderedComponent, prevRenderedElement = prevComponentInstance._currentElement, nextRenderedElement = this._renderValidatedComponent(), debugID = 0;
if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) ReactReconciler.receiveComponent(prevComponentInstance, nextRenderedElement, transaction, this._processChildContext(context)); else {
var oldHostNode = ReactReconciler.getHostNode(prevComponentInstance);
ReactReconciler.unmountComponent(prevComponentInstance, !1);
var nodeType = ReactNodeTypes.getType(nextRenderedElement);
this._renderedNodeType = nodeType;
var child = this._instantiateReactComponent(nextRenderedElement, nodeType !== ReactNodeTypes.EMPTY);
this._renderedComponent = child;
var nextMarkup = ReactReconciler.mountComponent(child, transaction, this._hostParent, this._hostContainerInfo, this._processChildContext(context), debugID);
this._replaceNodeWithMarkup(oldHostNode, nextMarkup, prevComponentInstance);
}
},
_replaceNodeWithMarkup: function(oldHostNode, nextMarkup, prevInstance) {
ReactComponentEnvironment.replaceNodeWithMarkup(oldHostNode, nextMarkup, prevInstance);
},
_renderValidatedComponentWithoutOwnerOrContext: function() {
var renderedElement, inst = this._instance;
return renderedElement = inst.render();
},
_renderValidatedComponent: function() {
var renderedElement;
if (this._compositeType !== CompositeTypes.StatelessFunctional) {
ReactCurrentOwner.current = this;
try {
renderedElement = this._renderValidatedComponentWithoutOwnerOrContext();
} finally {
ReactCurrentOwner.current = null;
}
} else renderedElement = this._renderValidatedComponentWithoutOwnerOrContext();
return null === renderedElement || renderedElement === !1 || React.isValidElement(renderedElement) ? void 0 : _prodInvariant("109", this.getName() || "ReactCompositeComponent"),
renderedElement;
},
attachRef: function(ref, component) {
var inst = this.getPublicInstance();
null == inst ? _prodInvariant("110") : void 0;
var publicComponentInstance = component.getPublicInstance(), refs = inst.refs === emptyObject ? inst.refs = {} : inst.refs;
refs[ref] = publicComponentInstance;
},
detachRef: function(ref) {
var refs = this.getPublicInstance().refs;
delete refs[ref];
},
getName: function() {
var type = this._currentElement.type, constructor = this._instance && this._instance.constructor;
return type.displayName || constructor && constructor.displayName || type.name || constructor && constructor.name || null;
},
getPublicInstance: function() {
var inst = this._instance;
return this._compositeType === CompositeTypes.StatelessFunctional ? null : inst;
},
_instantiateReactComponent: null
};
module.exports = ReactCompositeComponent;
}, function(module, exports, __webpack_require__) {
"use strict";
var _prodInvariant = __webpack_require__(47), React = __webpack_require__(7), ReactNodeTypes = (__webpack_require__(49),
{
HOST: 0,
COMPOSITE: 1,
EMPTY: 2,
getType: function(node) {
return null === node || node === !1 ? ReactNodeTypes.EMPTY : React.isValidElement(node) ? "function" == typeof node.type ? ReactNodeTypes.COMPOSITE : ReactNodeTypes.HOST : void _prodInvariant("26", node);
}
});
module.exports = ReactNodeTypes;
}, function(module, exports, __webpack_require__) {
"use strict";
var emptyObject = {};
module.exports = emptyObject;
}, function(module, exports) {
"use strict";
function is(x, y) {
return x === y ? 0 !== x || 0 !== y || 1 / x === 1 / y : x !== x && y !== y;
}
function shallowEqual(objA, objB) {
if (is(objA, objB)) return !0;
if ("object" != typeof objA || null === objA || "object" != typeof objB || null === objB) return !1;
var keysA = Object.keys(objA), keysB = Object.keys(objB);
if (keysA.length !== keysB.length) return !1;
for (var i = 0; i < keysA.length; i++) if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) return !1;
return !0;
}
var hasOwnProperty = Object.prototype.hasOwnProperty;
module.exports = shallowEqual;
}, function(module, exports) {
"use strict";
function shouldUpdateReactComponent(prevElement, nextElement) {
var prevEmpty = null === prevElement || prevElement === !1, nextEmpty = null === nextElement || nextElement === !1;
if (prevEmpty || nextEmpty) return prevEmpty === nextEmpty;
var prevType = typeof prevElement, nextType = typeof nextElement;
return "string" === prevType || "number" === prevType ? "string" === nextType || "number" === nextType : "object" === nextType && prevElement.type === nextElement.type && prevElement.key === nextElement.key;
}
module.exports = shouldUpdateReactComponent;
}, function(module, exports) {
"use strict";
var emptyComponentFactory, ReactEmptyComponentInjection = {
injectEmptyComponentFactory: function(factory) {
emptyComponentFactory = factory;
}
}, ReactEmptyComponent = {
create: function(instantiate) {
return emptyComponentFactory(instantiate);
}
};
ReactEmptyComponent.injection = ReactEmptyComponentInjection, module.exports = ReactEmptyComponent;
}, function(module, exports, __webpack_require__) {
"use strict";
function createInternalComponent(element) {
return genericComponentClass ? void 0 : _prodInvariant("111", element.type), new genericComponentClass(element);
}
function createInstanceForText(text) {
return new textComponentClass(text);
}
function isTextComponent(component) {
return component instanceof textComponentClass;
}
var _prodInvariant = __webpack_require__(47), genericComponentClass = (__webpack_require__(49),
null), textComponentClass = null, ReactHostComponentInjection = {
injectGenericComponentClass: function(componentClass) {
genericComponentClass = componentClass;
},
injectTextComponentClass: function(componentClass) {
textComponentClass = componentClass;
}
}, ReactHostComponent = {
createInternalComponent: createInternalComponent,
createInstanceForText: createInstanceForText,
isTextComponent: isTextComponent,
injection: ReactHostComponentInjection
};
module.exports = ReactHostComponent;
}, function(module, exports) {
"use strict";
function getNextDebugID() {
return nextDebugID++;
}
var nextDebugID = 1;
module.exports = getNextDebugID;
}, function(module, exports) {
"use strict";
function escape(key) {
var escapeRegex = /[=:]/g, escaperLookup = {
"=": "=0",
":": "=2"
}, escapedString = ("" + key).replace(escapeRegex, function(match) {
return escaperLookup[match];
});
return "$" + escapedString;
}
function unescape(key) {
var unescapeRegex = /(=0|=2)/g, unescaperLookup = {
"=0": "=",
"=2": ":"
}, keySubstring = "." === key[0] && "$" === key[1] ? key.substring(2) : key.substring(1);
return ("" + keySubstring).replace(unescapeRegex, function(match) {
return unescaperLookup[match];
});
}
var KeyEscapeUtils = {
escape: escape,
unescape: unescape
};
module.exports = KeyEscapeUtils;
}, function(module, exports, __webpack_require__) {
"use strict";
function getComponentKey(component, index) {
return component && "object" == typeof component && null != component.key ? KeyEscapeUtils.escape(component.key) : index.toString(36);
}
function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
var type = typeof children;
if ("undefined" !== type && "boolean" !== type || (children = null), null === children || "string" === type || "number" === type || "object" === type && children.$$typeof === REACT_ELEMENT_TYPE) return callback(traverseContext, children, "" === nameSoFar ? SEPARATOR + getComponentKey(children, 0) : nameSoFar),
1;
var child, nextName, subtreeCount = 0, nextNamePrefix = "" === nameSoFar ? SEPARATOR : nameSoFar + SUBSEPARATOR;
if (Array.isArray(children)) for (var i = 0; i < children.length; i++) child = children[i],
nextName = nextNamePrefix + getComponentKey(child, i), subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); else {
var iteratorFn = getIteratorFn(children);
if (iteratorFn) {
var step, iterator = iteratorFn.call(children);
if (iteratorFn !== children.entries) for (var ii = 0; !(step = iterator.next()).done; ) child = step.value,
nextName = nextNamePrefix + getComponentKey(child, ii++), subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); else for (;!(step = iterator.next()).done; ) {
var entry = step.value;
entry && (child = entry[1], nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0),
subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext));
}
} else if ("object" === type) {
var addendum = "", childrenString = String(children);
_prodInvariant("31", "[object Object]" === childrenString ? "object with keys {" + Object.keys(children).join(", ") + "}" : childrenString, addendum);
}
}
return subtreeCount;
}
function traverseAllChildren(children, callback, traverseContext) {
return null == children ? 0 : traverseAllChildrenImpl(children, "", callback, traverseContext);
}
var _prodInvariant = __webpack_require__(47), REACT_ELEMENT_TYPE = (__webpack_require__(14),
__webpack_require__(140)), getIteratorFn = __webpack_require__(141), KeyEscapeUtils = (__webpack_require__(49),
__webpack_require__(138)), SEPARATOR = (__webpack_require__(59), "."), SUBSEPARATOR = ":";
module.exports = traverseAllChildren;
}, function(module, exports) {
"use strict";
var REACT_ELEMENT_TYPE = "function" == typeof Symbol && Symbol["for"] && Symbol["for"]("react.element") || 60103;
module.exports = REACT_ELEMENT_TYPE;
}, function(module, exports) {
"use strict";
function getIteratorFn(maybeIterable) {
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
if ("function" == typeof iteratorFn) return iteratorFn;
}
var ITERATOR_SYMBOL = "function" == typeof Symbol && Symbol.iterator, FAUX_ITERATOR_SYMBOL = "@@iterator";
module.exports = getIteratorFn;
}, function(module, exports, __webpack_require__) {
"use strict";
function isNative(fn) {
var funcToString = Function.prototype.toString, hasOwnProperty = Object.prototype.hasOwnProperty, reIsNative = RegExp("^" + funcToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
try {
var source = funcToString.call(fn);
return reIsNative.test(source);
} catch (err) {
return !1;
}
}
function purgeDeep(id) {
var item = getItem(id);
if (item) {
var childIDs = item.childIDs;
removeItem(id), childIDs.forEach(purgeDeep);
}
}
function describeComponentFrame(name, source, ownerName) {
return "\n in " + (name || "Unknown") + (source ? " (at " + source.fileName.replace(/^.*[\\\/]/, "") + ":" + source.lineNumber + ")" : ownerName ? " (created by " + ownerName + ")" : "");
}
function getDisplayName(element) {
return null == element ? "#empty" : "string" == typeof element || "number" == typeof element ? "#text" : "string" == typeof element.type ? element.type : element.type.displayName || element.type.name || "Unknown";
}
function describeID(id) {
var ownerName, name = ReactComponentTreeHook.getDisplayName(id), element = ReactComponentTreeHook.getElement(id), ownerID = ReactComponentTreeHook.getOwnerID(id);
return ownerID && (ownerName = ReactComponentTreeHook.getDisplayName(ownerID)),
describeComponentFrame(name, element && element._source, ownerName);
}
var setItem, getItem, removeItem, getItemIDs, addRoot, removeRoot, getRootIDs, _prodInvariant = __webpack_require__(11), ReactCurrentOwner = __webpack_require__(14), canUseCollections = (__webpack_require__(12),
__webpack_require__(15), "function" == typeof Array.from && "function" == typeof Map && isNative(Map) && null != Map.prototype && "function" == typeof Map.prototype.keys && isNative(Map.prototype.keys) && "function" == typeof Set && isNative(Set) && null != Set.prototype && "function" == typeof Set.prototype.keys && isNative(Set.prototype.keys));
if (canUseCollections) {
var itemMap = new Map(), rootIDSet = new Set();
setItem = function(id, item) {
itemMap.set(id, item);
}, getItem = function(id) {
return itemMap.get(id);
}, removeItem = function(id) {
itemMap["delete"](id);
}, getItemIDs = function() {
return Array.from(itemMap.keys());
}, addRoot = function(id) {
rootIDSet.add(id);
}, removeRoot = function(id) {
rootIDSet["delete"](id);
}, getRootIDs = function() {
return Array.from(rootIDSet.keys());
};
} else {
var itemByKey = {}, rootByKey = {}, getKeyFromID = function(id) {
return "." + id;
}, getIDFromKey = function(key) {
return parseInt(key.substr(1), 10);
};
setItem = function(id, item) {
var key = getKeyFromID(id);
itemByKey[key] = item;
}, getItem = function(id) {
var key = getKeyFromID(id);
return itemByKey[key];
}, removeItem = function(id) {
var key = getKeyFromID(id);
delete itemByKey[key];
}, getItemIDs = function() {
return Object.keys(itemByKey).map(getIDFromKey);
}, addRoot = function(id) {
var key = getKeyFromID(id);
rootByKey[key] = !0;
}, removeRoot = function(id) {
var key = getKeyFromID(id);
delete rootByKey[key];
}, getRootIDs = function() {
return Object.keys(rootByKey).map(getIDFromKey);
};
}
var unmountedIDs = [], ReactComponentTreeHook = {
onSetChildren: function(id, nextChildIDs) {
var item = getItem(id);
item ? void 0 : _prodInvariant("144"), item.childIDs = nextChildIDs;
for (var i = 0; i < nextChildIDs.length; i++) {
var nextChildID = nextChildIDs[i], nextChild = getItem(nextChildID);
nextChild ? void 0 : _prodInvariant("140"), null == nextChild.childIDs && "object" == typeof nextChild.element && null != nextChild.element ? _prodInvariant("141") : void 0,
nextChild.isMounted ? void 0 : _prodInvariant("71"), null == nextChild.parentID && (nextChild.parentID = id),
nextChild.parentID !== id ? _prodInvariant("142", nextChildID, nextChild.parentID, id) : void 0;
}
},
onBeforeMountComponent: function(id, element, parentID) {
var item = {
element: element,
parentID: parentID,
text: null,
childIDs: [],
isMounted: !1,
updateCount: 0
};
setItem(id, item);
},
onBeforeUpdateComponent: function(id, element) {
var item = getItem(id);
item && item.isMounted && (item.element = element);
},
onMountComponent: function(id) {
var item = getItem(id);
item ? void 0 : _prodInvariant("144"), item.isMounted = !0;
var isRoot = 0 === item.parentID;
isRoot && addRoot(id);
},
onUpdateComponent: function(id) {
var item = getItem(id);
item && item.isMounted && item.updateCount++;
},
onUnmountComponent: function(id) {
var item = getItem(id);
if (item) {
item.isMounted = !1;
var isRoot = 0 === item.parentID;
isRoot && removeRoot(id);
}
unmountedIDs.push(id);
},
purgeUnmountedComponents: function() {
if (!ReactComponentTreeHook._preventPurging) {
for (var i = 0; i < unmountedIDs.length; i++) {
var id = unmountedIDs[i];
purgeDeep(id);
}
unmountedIDs.length = 0;
}
},
isMounted: function(id) {
var item = getItem(id);
return !!item && item.isMounted;
},
getCurrentStackAddendum: function(topElement) {
var info = "";
if (topElement) {
var name = getDisplayName(topElement), owner = topElement._owner;
info += describeComponentFrame(name, topElement._source, owner && owner.getName());
}
var currentOwner = ReactCurrentOwner.current, id = currentOwner && currentOwner._debugID;
return info += ReactComponentTreeHook.getStackAddendumByID(id);
},
getStackAddendumByID: function(id) {
for (var info = ""; id; ) info += describeID(id), id = ReactComponentTreeHook.getParentID(id);
return info;
},
getChildIDs: function(id) {
var item = getItem(id);
return item ? item.childIDs : [];
},
getDisplayName: function(id) {
var element = ReactComponentTreeHook.getElement(id);
return element ? getDisplayName(element) : null;
},
getElement: function(id) {
var item = getItem(id);
return item ? item.element : null;
},
getOwnerID: function(id) {
var element = ReactComponentTreeHook.getElement(id);
return element && element._owner ? element._owner._debugID : null;
},
getParentID: function(id) {
var item = getItem(id);
return item ? item.parentID : null;
},
getSource: function(id) {
var item = getItem(id), element = item ? item.element : null, source = null != element ? element._source : null;
return source;
},
getText: function(id) {
var element = ReactComponentTreeHook.getElement(id);
return "string" == typeof element ? element : "number" == typeof element ? "" + element : null;
},
getUpdateCount: function(id) {
var item = getItem(id);
return item ? item.updateCount : 0;
},
getRootIDs: getRootIDs,
getRegisteredIDs: getItemIDs
};
module.exports = ReactComponentTreeHook;
}, function(module, exports, __webpack_require__) {
"use strict";
function flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID) {
if (traverseContext && "object" == typeof traverseContext) {
var result = traverseContext, keyUnique = void 0 === result[name];
keyUnique && null != child && (result[name] = child);
}
}
function flattenChildren(children, selfDebugID) {
if (null == children) return children;
var result = {};
return traverseAllChildren(children, flattenSingleChildIntoContext, result), result;
}
var traverseAllChildren = (__webpack_require__(138), __webpack_require__(139));
__webpack_require__(59);
"undefined" != typeof process && process.env, 1, module.exports = flattenChildren;
}, function(module, exports, __webpack_require__) {
"use strict";
function ReactServerRenderingTransaction(renderToStaticMarkup) {
this.reinitializeTransaction(), this.renderToStaticMarkup = renderToStaticMarkup,
this.useCreateElement = !1, this.updateQueue = new ReactServerUpdateQueue(this);
}
var _assign = __webpack_require__(65), PooledClass = __webpack_require__(66), Transaction = __webpack_require__(79), ReactServerUpdateQueue = (__webpack_require__(78),
__webpack_require__(145)), TRANSACTION_WRAPPERS = [], noopCallbackQueue = {
enqueue: function() {}
}, Mixin = {
getTransactionWrappers: function() {
return TRANSACTION_WRAPPERS;
},
getReactMountReady: function() {
return noopCallbackQueue;
},
getUpdateQueue: function() {
return this.updateQueue;
},
destructor: function() {},
checkpoint: function() {},
rollback: function() {}
};
_assign(ReactServerRenderingTransaction.prototype, Transaction, Mixin), PooledClass.addPoolingTo(ReactServerRenderingTransaction),
module.exports = ReactServerRenderingTransaction;
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function warnNoop(publicInstance, callerName) {
}
var ReactUpdateQueue = __webpack_require__(146), ReactServerUpdateQueue = (__webpack_require__(59),
function() {
function ReactServerUpdateQueue(transaction) {
_classCallCheck(this, ReactServerUpdateQueue), this.transaction = transaction;
}
return ReactServerUpdateQueue.prototype.isMounted = function(publicInstance) {
return !1;
}, ReactServerUpdateQueue.prototype.enqueueCallback = function(publicInstance, callback, callerName) {
this.transaction.isInTransaction() && ReactUpdateQueue.enqueueCallback(publicInstance, callback, callerName);
}, ReactServerUpdateQueue.prototype.enqueueForceUpdate = function(publicInstance) {
this.transaction.isInTransaction() ? ReactUpdateQueue.enqueueForceUpdate(publicInstance) : warnNoop(publicInstance, "forceUpdate");
}, ReactServerUpdateQueue.prototype.enqueueReplaceState = function(publicInstance, completeState) {
this.transaction.isInTransaction() ? ReactUpdateQueue.enqueueReplaceState(publicInstance, completeState) : warnNoop(publicInstance, "replaceState");
}, ReactServerUpdateQueue.prototype.enqueueSetState = function(publicInstance, partialState) {
this.transaction.isInTransaction() ? ReactUpdateQueue.enqueueSetState(publicInstance, partialState) : warnNoop(publicInstance, "setState");
}, ReactServerUpdateQueue;
}());
module.exports = ReactServerUpdateQueue;
}, function(module, exports, __webpack_require__) {
"use strict";
function enqueueUpdate(internalInstance) {
ReactUpdates.enqueueUpdate(internalInstance);
}
function formatUnexpectedArgument(arg) {
var type = typeof arg;
if ("object" !== type) return type;
var displayName = arg.constructor && arg.constructor.name || type, keys = Object.keys(arg);
return keys.length > 0 && keys.length < 20 ? displayName + " (keys: " + keys.join(", ") + ")" : displayName;
}
function getInternalInstanceReadyForUpdate(publicInstance, callerName) {
var internalInstance = ReactInstanceMap.get(publicInstance);
if (!internalInstance) {
return null;
}
return internalInstance;
}
var _prodInvariant = __webpack_require__(47), ReactInstanceMap = (__webpack_require__(14),
__webpack_require__(127)), ReactUpdates = (__webpack_require__(78), __webpack_require__(72)), ReactUpdateQueue = (__webpack_require__(49),
__webpack_require__(59), {
isMounted: function(publicInstance) {
var internalInstance = ReactInstanceMap.get(publicInstance);
return !!internalInstance && !!internalInstance._renderedComponent;
},
enqueueCallback: function(publicInstance, callback, callerName) {
ReactUpdateQueue.validateCallback(callback, callerName);
var internalInstance = getInternalInstanceReadyForUpdate(publicInstance);
return internalInstance ? (internalInstance._pendingCallbacks ? internalInstance._pendingCallbacks.push(callback) : internalInstance._pendingCallbacks = [ callback ],
void enqueueUpdate(internalInstance)) : null;
},
enqueueCallbackInternal: function(internalInstance, callback) {
internalInstance._pendingCallbacks ? internalInstance._pendingCallbacks.push(callback) : internalInstance._pendingCallbacks = [ callback ],
enqueueUpdate(internalInstance);
},
enqueueForceUpdate: function(publicInstance) {
var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, "forceUpdate");
internalInstance && (internalInstance._pendingForceUpdate = !0, enqueueUpdate(internalInstance));
},
enqueueReplaceState: function(publicInstance, completeState) {
var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, "replaceState");
internalInstance && (internalInstance._pendingStateQueue = [ completeState ], internalInstance._pendingReplaceState = !0,
enqueueUpdate(internalInstance));
},
enqueueSetState: function(publicInstance, partialState) {
var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, "setState");
if (internalInstance) {
var queue = internalInstance._pendingStateQueue || (internalInstance._pendingStateQueue = []);
queue.push(partialState), enqueueUpdate(internalInstance);
}
},
enqueueElementInternal: function(internalInstance, nextElement, nextContext) {
internalInstance._pendingElement = nextElement, internalInstance._context = nextContext,
enqueueUpdate(internalInstance);
},
validateCallback: function(callback, callerName) {
callback && "function" != typeof callback ? _prodInvariant("122", callerName, formatUnexpectedArgument(callback)) : void 0;
}
});
module.exports = ReactUpdateQueue;
}, function(module, exports, __webpack_require__) {
"use strict";
var emptyFunction = (__webpack_require__(65), __webpack_require__(60)), validateDOMNesting = (__webpack_require__(59),
emptyFunction);
module.exports = validateDOMNesting;
}, function(module, exports, __webpack_require__) {
"use strict";
var _assign = __webpack_require__(65), DOMLazyTree = __webpack_require__(92), ReactDOMComponentTree = __webpack_require__(46), ReactDOMEmptyComponent = function(instantiate) {
this._currentElement = null, this._hostNode = null, this._hostParent = null, this._hostContainerInfo = null,
this._domID = 0;
};
_assign(ReactDOMEmptyComponent.prototype, {
mountComponent: function(transaction, hostParent, hostContainerInfo, context) {
var domID = hostContainerInfo._idCounter++;
this._domID = domID, this._hostParent = hostParent, this._hostContainerInfo = hostContainerInfo;
var nodeValue = " react-empty: " + this._domID + " ";
if (transaction.useCreateElement) {
var ownerDocument = hostContainerInfo._ownerDocument, node = ownerDocument.createComment(nodeValue);
return ReactDOMComponentTree.precacheNode(this, node), DOMLazyTree(node);
}
return transaction.renderToStaticMarkup ? "" : "";
},
receiveComponent: function() {},
getHostNode: function() {
return ReactDOMComponentTree.getNodeFromInstance(this);
},
unmountComponent: function() {
ReactDOMComponentTree.uncacheNode(this);
}
}), module.exports = ReactDOMEmptyComponent;
}, function(module, exports, __webpack_require__) {
"use strict";
function getLowestCommonAncestor(instA, instB) {
"_hostNode" in instA ? void 0 : _prodInvariant("33"), "_hostNode" in instB ? void 0 : _prodInvariant("33");
for (var depthA = 0, tempA = instA; tempA; tempA = tempA._hostParent) depthA++;
for (var depthB = 0, tempB = instB; tempB; tempB = tempB._hostParent) depthB++;
for (;depthA - depthB > 0; ) instA = instA._hostParent, depthA--;
for (;depthB - depthA > 0; ) instB = instB._hostParent, depthB--;
for (var depth = depthA; depth--; ) {
if (instA === instB) return instA;
instA = instA._hostParent, instB = instB._hostParent;
}
return null;
}
function isAncestor(instA, instB) {
"_hostNode" in instA ? void 0 : _prodInvariant("35"), "_hostNode" in instB ? void 0 : _prodInvariant("35");
for (;instB; ) {
if (instB === instA) return !0;
instB = instB._hostParent;
}
return !1;
}
function getParentInstance(inst) {
return "_hostNode" in inst ? void 0 : _prodInvariant("36"), inst._hostParent;
}
function traverseTwoPhase(inst, fn, arg) {
for (var path = []; inst; ) path.push(inst), inst = inst._hostParent;
var i;
for (i = path.length; i-- > 0; ) fn(path[i], "captured", arg);
for (i = 0; i < path.length; i++) fn(path[i], "bubbled", arg);
}
function traverseEnterLeave(from, to, fn, argFrom, argTo) {
for (var common = from && to ? getLowestCommonAncestor(from, to) : null, pathFrom = []; from && from !== common; ) pathFrom.push(from),
from = from._hostParent;
for (var pathTo = []; to && to !== common; ) pathTo.push(to), to = to._hostParent;
var i;
for (i = 0; i < pathFrom.length; i++) fn(pathFrom[i], "bubbled", argFrom);
for (i = pathTo.length; i-- > 0; ) fn(pathTo[i], "captured", argTo);
}
var _prodInvariant = __webpack_require__(47);
__webpack_require__(49);
module.exports = {
isAncestor: isAncestor,
getLowestCommonAncestor: getLowestCommonAncestor,
getParentInstance: getParentInstance,
traverseTwoPhase: traverseTwoPhase,
traverseEnterLeave: traverseEnterLeave
};
}, function(module, exports, __webpack_require__) {
"use strict";
var _prodInvariant = __webpack_require__(47), _assign = __webpack_require__(65), DOMChildrenOperations = __webpack_require__(91), DOMLazyTree = __webpack_require__(92), ReactDOMComponentTree = __webpack_require__(46), escapeTextContentForBrowser = __webpack_require__(97), ReactDOMTextComponent = (__webpack_require__(49),
__webpack_require__(147), function(text) {
this._currentElement = text, this._stringText = "" + text, this._hostNode = null,
this._hostParent = null, this._domID = 0, this._mountIndex = 0, this._closingComment = null,
this._commentNodes = null;
});
_assign(ReactDOMTextComponent.prototype, {
mountComponent: function(transaction, hostParent, hostContainerInfo, context) {
var domID = hostContainerInfo._idCounter++, openingValue = " react-text: " + domID + " ", closingValue = " /react-text ";
if (this._domID = domID, this._hostParent = hostParent, transaction.useCreateElement) {
var ownerDocument = hostContainerInfo._ownerDocument, openingComment = ownerDocument.createComment(openingValue), closingComment = ownerDocument.createComment(closingValue), lazyTree = DOMLazyTree(ownerDocument.createDocumentFragment());
return DOMLazyTree.queueChild(lazyTree, DOMLazyTree(openingComment)), this._stringText && DOMLazyTree.queueChild(lazyTree, DOMLazyTree(ownerDocument.createTextNode(this._stringText))),
DOMLazyTree.queueChild(lazyTree, DOMLazyTree(closingComment)), ReactDOMComponentTree.precacheNode(this, openingComment),
this._closingComment = closingComment, lazyTree;
}
var escapedText = escapeTextContentForBrowser(this._stringText);
return transaction.renderToStaticMarkup ? escapedText : "" + escapedText + "";
},
receiveComponent: function(nextText, transaction) {
if (nextText !== this._currentElement) {
this._currentElement = nextText;
var nextStringText = "" + nextText;
if (nextStringText !== this._stringText) {
this._stringText = nextStringText;
var commentNodes = this.getHostNode();
DOMChildrenOperations.replaceDelimitedText(commentNodes[0], commentNodes[1], nextStringText);
}
}
},
getHostNode: function() {
var hostNode = this._commentNodes;
if (hostNode) return hostNode;
if (!this._closingComment) for (var openingComment = ReactDOMComponentTree.getNodeFromInstance(this), node = openingComment.nextSibling; ;) {
if (null == node ? _prodInvariant("67", this._domID) : void 0, 8 === node.nodeType && " /react-text " === node.nodeValue) {
this._closingComment = node;
break;
}
node = node.nextSibling;
}
return hostNode = [ this._hostNode, this._closingComment ], this._commentNodes = hostNode,
hostNode;
},
unmountComponent: function() {
this._closingComment = null, this._commentNodes = null, ReactDOMComponentTree.uncacheNode(this);
}
}), module.exports = ReactDOMTextComponent;
}, function(module, exports, __webpack_require__) {
"use strict";
function ReactDefaultBatchingStrategyTransaction() {
this.reinitializeTransaction();
}
var _assign = __webpack_require__(65), ReactUpdates = __webpack_require__(72), Transaction = __webpack_require__(79), emptyFunction = __webpack_require__(60), RESET_BATCHED_UPDATES = {
initialize: emptyFunction,
close: function() {
ReactDefaultBatchingStrategy.isBatchingUpdates = !1;
}
}, FLUSH_BATCHED_UPDATES = {
initialize: emptyFunction,
close: ReactUpdates.flushBatchedUpdates.bind(ReactUpdates)
}, TRANSACTION_WRAPPERS = [ FLUSH_BATCHED_UPDATES, RESET_BATCHED_UPDATES ];
_assign(ReactDefaultBatchingStrategyTransaction.prototype, Transaction, {
getTransactionWrappers: function() {
return TRANSACTION_WRAPPERS;
}
});
var transaction = new ReactDefaultBatchingStrategyTransaction(), ReactDefaultBatchingStrategy = {
isBatchingUpdates: !1,
batchedUpdates: function(callback, a, b, c, d, e) {
var alreadyBatchingUpdates = ReactDefaultBatchingStrategy.isBatchingUpdates;
return ReactDefaultBatchingStrategy.isBatchingUpdates = !0, alreadyBatchingUpdates ? callback(a, b, c, d, e) : transaction.perform(callback, null, a, b, c, d, e);
}
};
module.exports = ReactDefaultBatchingStrategy;
}, function(module, exports, __webpack_require__) {
"use strict";
function findParent(inst) {
for (;inst._hostParent; ) inst = inst._hostParent;
var rootNode = ReactDOMComponentTree.getNodeFromInstance(inst), container = rootNode.parentNode;
return ReactDOMComponentTree.getClosestInstanceFromNode(container);
}
function TopLevelCallbackBookKeeping(topLevelType, nativeEvent) {
this.topLevelType = topLevelType, this.nativeEvent = nativeEvent, this.ancestors = [];
}
function handleTopLevelImpl(bookKeeping) {
var nativeEventTarget = getEventTarget(bookKeeping.nativeEvent), targetInst = ReactDOMComponentTree.getClosestInstanceFromNode(nativeEventTarget), ancestor = targetInst;
do bookKeeping.ancestors.push(ancestor), ancestor = ancestor && findParent(ancestor); while (ancestor);
for (var i = 0; i < bookKeeping.ancestors.length; i++) targetInst = bookKeeping.ancestors[i],
ReactEventListener._handleTopLevel(bookKeeping.topLevelType, targetInst, bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));
}
function scrollValueMonitor(cb) {
var scrollPosition = getUnboundedScrollPosition(window);
cb(scrollPosition);
}
var _assign = __webpack_require__(65), EventListener = __webpack_require__(153), ExecutionEnvironment = __webpack_require__(63), PooledClass = __webpack_require__(66), ReactDOMComponentTree = __webpack_require__(46), ReactUpdates = __webpack_require__(72), getEventTarget = __webpack_require__(80), getUnboundedScrollPosition = __webpack_require__(154);
_assign(TopLevelCallbackBookKeeping.prototype, {
destructor: function() {
this.topLevelType = null, this.nativeEvent = null, this.ancestors.length = 0;
}
}), PooledClass.addPoolingTo(TopLevelCallbackBookKeeping, PooledClass.twoArgumentPooler);
var ReactEventListener = {
_enabled: !0,
_handleTopLevel: null,
WINDOW_HANDLE: ExecutionEnvironment.canUseDOM ? window : null,
setHandleTopLevel: function(handleTopLevel) {
ReactEventListener._handleTopLevel = handleTopLevel;
},
setEnabled: function(enabled) {
ReactEventListener._enabled = !!enabled;
},
isEnabled: function() {
return ReactEventListener._enabled;
},
trapBubbledEvent: function(topLevelType, handlerBaseName, element) {
return element ? EventListener.listen(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType)) : null;
},
trapCapturedEvent: function(topLevelType, handlerBaseName, element) {
return element ? EventListener.capture(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType)) : null;
},
monitorScrollValue: function(refresh) {
var callback = scrollValueMonitor.bind(null, refresh);
EventListener.listen(window, "scroll", callback);
},
dispatchEvent: function(topLevelType, nativeEvent) {
if (ReactEventListener._enabled) {
var bookKeeping = TopLevelCallbackBookKeeping.getPooled(topLevelType, nativeEvent);
try {
ReactUpdates.batchedUpdates(handleTopLevelImpl, bookKeeping);
} finally {
TopLevelCallbackBookKeeping.release(bookKeeping);
}
}
}
};
module.exports = ReactEventListener;
}, function(module, exports, __webpack_require__) {
"use strict";
var emptyFunction = __webpack_require__(60), EventListener = {
listen: function(target, eventType, callback) {
return target.addEventListener ? (target.addEventListener(eventType, callback, !1),
{
remove: function() {
target.removeEventListener(eventType, callback, !1);
}
}) : target.attachEvent ? (target.attachEvent("on" + eventType, callback), {
remove: function() {
target.detachEvent("on" + eventType, callback);
}
}) : void 0;
},
capture: function(target, eventType, callback) {
return target.addEventListener ? (target.addEventListener(eventType, callback, !0),
{
remove: function() {
target.removeEventListener(eventType, callback, !0);
}
}) : {
remove: emptyFunction
};
},
registerDefault: function() {}
};
module.exports = EventListener;
}, function(module, exports) {
"use strict";
function getUnboundedScrollPosition(scrollable) {
return scrollable === window ? {
x: window.pageXOffset || document.documentElement.scrollLeft,
y: window.pageYOffset || document.documentElement.scrollTop
} : {
x: scrollable.scrollLeft,
y: scrollable.scrollTop
};
}
module.exports = getUnboundedScrollPosition;
}, function(module, exports, __webpack_require__) {
"use strict";
var DOMProperty = __webpack_require__(48), EventPluginHub = __webpack_require__(55), EventPluginUtils = __webpack_require__(57), ReactComponentEnvironment = __webpack_require__(126), ReactEmptyComponent = __webpack_require__(135), ReactBrowserEventEmitter = __webpack_require__(116), ReactHostComponent = __webpack_require__(136), ReactUpdates = __webpack_require__(72), ReactInjection = {
Component: ReactComponentEnvironment.injection,
DOMProperty: DOMProperty.injection,
EmptyComponent: ReactEmptyComponent.injection,
EventPluginHub: EventPluginHub.injection,
EventPluginUtils: EventPluginUtils.injection,
EventEmitter: ReactBrowserEventEmitter.injection,
HostComponent: ReactHostComponent.injection,
Updates: ReactUpdates.injection
};
module.exports = ReactInjection;
}, function(module, exports, __webpack_require__) {
"use strict";
function ReactReconcileTransaction(useCreateElement) {
this.reinitializeTransaction(), this.renderToStaticMarkup = !1, this.reactMountReady = CallbackQueue.getPooled(null),
this.useCreateElement = useCreateElement;
}
var _assign = __webpack_require__(65), CallbackQueue = __webpack_require__(73), PooledClass = __webpack_require__(66), ReactBrowserEventEmitter = __webpack_require__(116), ReactInputSelection = __webpack_require__(157), Transaction = (__webpack_require__(78),
__webpack_require__(79)), ReactUpdateQueue = __webpack_require__(146), SELECTION_RESTORATION = {
initialize: ReactInputSelection.getSelectionInformation,
close: ReactInputSelection.restoreSelection
}, EVENT_SUPPRESSION = {
initialize: function() {
var currentlyEnabled = ReactBrowserEventEmitter.isEnabled();
return ReactBrowserEventEmitter.setEnabled(!1), currentlyEnabled;
},
close: function(previouslyEnabled) {
ReactBrowserEventEmitter.setEnabled(previouslyEnabled);
}
}, ON_DOM_READY_QUEUEING = {
initialize: function() {
this.reactMountReady.reset();
},
close: function() {
this.reactMountReady.notifyAll();
}
}, TRANSACTION_WRAPPERS = [ SELECTION_RESTORATION, EVENT_SUPPRESSION, ON_DOM_READY_QUEUEING ], Mixin = {
getTransactionWrappers: function() {
return TRANSACTION_WRAPPERS;
},
getReactMountReady: function() {
return this.reactMountReady;
},
getUpdateQueue: function() {
return ReactUpdateQueue;
},
checkpoint: function() {
return this.reactMountReady.checkpoint();
},
rollback: function(checkpoint) {
this.reactMountReady.rollback(checkpoint);
},
destructor: function() {
CallbackQueue.release(this.reactMountReady), this.reactMountReady = null;
}
};
_assign(ReactReconcileTransaction.prototype, Transaction, Mixin), PooledClass.addPoolingTo(ReactReconcileTransaction),
module.exports = ReactReconcileTransaction;
}, function(module, exports, __webpack_require__) {
"use strict";
function isInDocument(node) {
return containsNode(document.documentElement, node);
}
var ReactDOMSelection = __webpack_require__(158), containsNode = __webpack_require__(160), focusNode = __webpack_require__(105), getActiveElement = __webpack_require__(163), ReactInputSelection = {
hasSelectionCapabilities: function(elem) {
var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
return nodeName && ("input" === nodeName && "text" === elem.type || "textarea" === nodeName || "true" === elem.contentEditable);
},
getSelectionInformation: function() {
var focusedElem = getActiveElement();
return {
focusedElem: focusedElem,
selectionRange: ReactInputSelection.hasSelectionCapabilities(focusedElem) ? ReactInputSelection.getSelection(focusedElem) : null
};
},
restoreSelection: function(priorSelectionInformation) {
var curFocusedElem = getActiveElement(), priorFocusedElem = priorSelectionInformation.focusedElem, priorSelectionRange = priorSelectionInformation.selectionRange;
curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem) && (ReactInputSelection.hasSelectionCapabilities(priorFocusedElem) && ReactInputSelection.setSelection(priorFocusedElem, priorSelectionRange),
focusNode(priorFocusedElem));
},
getSelection: function(input) {
var selection;
if ("selectionStart" in input) selection = {
start: input.selectionStart,
end: input.selectionEnd
}; else if (document.selection && input.nodeName && "input" === input.nodeName.toLowerCase()) {
var range = document.selection.createRange();
range.parentElement() === input && (selection = {
start: -range.moveStart("character", -input.value.length),
end: -range.moveEnd("character", -input.value.length)
});
} else selection = ReactDOMSelection.getOffsets(input);
return selection || {
start: 0,
end: 0
};
},
setSelection: function(input, offsets) {
var start = offsets.start, end = offsets.end;
if (void 0 === end && (end = start), "selectionStart" in input) input.selectionStart = start,
input.selectionEnd = Math.min(end, input.value.length); else if (document.selection && input.nodeName && "input" === input.nodeName.toLowerCase()) {
var range = input.createTextRange();
range.collapse(!0), range.moveStart("character", start), range.moveEnd("character", end - start),
range.select();
} else ReactDOMSelection.setOffsets(input, offsets);
}
};
module.exports = ReactInputSelection;
}, function(module, exports, __webpack_require__) {
"use strict";
function isCollapsed(anchorNode, anchorOffset, focusNode, focusOffset) {
return anchorNode === focusNode && anchorOffset === focusOffset;
}
function getIEOffsets(node) {
var selection = document.selection, selectedRange = selection.createRange(), selectedLength = selectedRange.text.length, fromStart = selectedRange.duplicate();
fromStart.moveToElementText(node), fromStart.setEndPoint("EndToStart", selectedRange);
var startOffset = fromStart.text.length, endOffset = startOffset + selectedLength;
return {
start: startOffset,
end: endOffset
};
}
function getModernOffsets(node) {
var selection = window.getSelection && window.getSelection();
if (!selection || 0 === selection.rangeCount) return null;
var anchorNode = selection.anchorNode, anchorOffset = selection.anchorOffset, focusNode = selection.focusNode, focusOffset = selection.focusOffset, currentRange = selection.getRangeAt(0);
try {
currentRange.startContainer.nodeType, currentRange.endContainer.nodeType;
} catch (e) {
return null;
}
var isSelectionCollapsed = isCollapsed(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset), rangeLength = isSelectionCollapsed ? 0 : currentRange.toString().length, tempRange = currentRange.cloneRange();
tempRange.selectNodeContents(node), tempRange.setEnd(currentRange.startContainer, currentRange.startOffset);
var isTempRangeCollapsed = isCollapsed(tempRange.startContainer, tempRange.startOffset, tempRange.endContainer, tempRange.endOffset), start = isTempRangeCollapsed ? 0 : tempRange.toString().length, end = start + rangeLength, detectionRange = document.createRange();
detectionRange.setStart(anchorNode, anchorOffset), detectionRange.setEnd(focusNode, focusOffset);
var isBackward = detectionRange.collapsed;
return {
start: isBackward ? end : start,
end: isBackward ? start : end
};
}
function setIEOffsets(node, offsets) {
var start, end, range = document.selection.createRange().duplicate();
void 0 === offsets.end ? (start = offsets.start, end = start) : offsets.start > offsets.end ? (start = offsets.end,
end = offsets.start) : (start = offsets.start, end = offsets.end), range.moveToElementText(node),
range.moveStart("character", start), range.setEndPoint("EndToStart", range), range.moveEnd("character", end - start),
range.select();
}
function setModernOffsets(node, offsets) {
if (window.getSelection) {
var selection = window.getSelection(), length = node[getTextContentAccessor()].length, start = Math.min(offsets.start, length), end = void 0 === offsets.end ? start : Math.min(offsets.end, length);
if (!selection.extend && start > end) {
var temp = end;
end = start, start = temp;
}
var startMarker = getNodeForCharacterOffset(node, start), endMarker = getNodeForCharacterOffset(node, end);
if (startMarker && endMarker) {
var range = document.createRange();
range.setStart(startMarker.node, startMarker.offset), selection.removeAllRanges(),
start > end ? (selection.addRange(range), selection.extend(endMarker.node, endMarker.offset)) : (range.setEnd(endMarker.node, endMarker.offset),
selection.addRange(range));
}
}
}
var ExecutionEnvironment = __webpack_require__(63), getNodeForCharacterOffset = __webpack_require__(159), getTextContentAccessor = __webpack_require__(67), useIEOffsets = ExecutionEnvironment.canUseDOM && "selection" in document && !("getSelection" in window), ReactDOMSelection = {
getOffsets: useIEOffsets ? getIEOffsets : getModernOffsets,
setOffsets: useIEOffsets ? setIEOffsets : setModernOffsets
};
module.exports = ReactDOMSelection;
}, function(module, exports) {
"use strict";
function getLeafNode(node) {
for (;node && node.firstChild; ) node = node.firstChild;
return node;
}
function getSiblingNode(node) {
for (;node; ) {
if (node.nextSibling) return node.nextSibling;
node = node.parentNode;
}
}
function getNodeForCharacterOffset(root, offset) {
for (var node = getLeafNode(root), nodeStart = 0, nodeEnd = 0; node; ) {
if (3 === node.nodeType) {
if (nodeEnd = nodeStart + node.textContent.length, nodeStart <= offset && nodeEnd >= offset) return {
node: node,
offset: offset - nodeStart
};
nodeStart = nodeEnd;
}
node = getLeafNode(getSiblingNode(node));
}
}
module.exports = getNodeForCharacterOffset;
}, function(module, exports, __webpack_require__) {
"use strict";
function containsNode(outerNode, innerNode) {
return !(!outerNode || !innerNode) && (outerNode === innerNode || !isTextNode(outerNode) && (isTextNode(innerNode) ? containsNode(outerNode, innerNode.parentNode) : "contains" in outerNode ? outerNode.contains(innerNode) : !!outerNode.compareDocumentPosition && !!(16 & outerNode.compareDocumentPosition(innerNode))));
}
var isTextNode = __webpack_require__(161);
module.exports = containsNode;
}, function(module, exports, __webpack_require__) {
"use strict";
function isTextNode(object) {
return isNode(object) && 3 == object.nodeType;
}
var isNode = __webpack_require__(162);
module.exports = isTextNode;
}, function(module, exports) {
"use strict";
function isNode(object) {
return !(!object || !("function" == typeof Node ? object instanceof Node : "object" == typeof object && "number" == typeof object.nodeType && "string" == typeof object.nodeName));
}
module.exports = isNode;
}, function(module, exports) {
"use strict";
function getActiveElement() {
if ("undefined" == typeof document) return null;
try {
return document.activeElement || document.body;
} catch (e) {
return document.body;
}
}
module.exports = getActiveElement;
}, function(module, exports) {
"use strict";
var NS = {
xlink: "http://www.w3.org/1999/xlink",
xml: "http://www.w3.org/XML/1998/namespace"
}, ATTRS = {
accentHeight: "accent-height",
accumulate: 0,
additive: 0,
alignmentBaseline: "alignment-baseline",
allowReorder: "allowReorder",
alphabetic: 0,
amplitude: 0,
arabicForm: "arabic-form",
ascent: 0,
attributeName: "attributeName",
attributeType: "attributeType",
autoReverse: "autoReverse",
azimuth: 0,
baseFrequency: "baseFrequency",
baseProfile: "baseProfile",
baselineShift: "baseline-shift",
bbox: 0,
begin: 0,
bias: 0,
by: 0,
calcMode: "calcMode",
capHeight: "cap-height",
clip: 0,
clipPath: "clip-path",
clipRule: "clip-rule",
clipPathUnits: "clipPathUnits",
colorInterpolation: "color-interpolation",
colorInterpolationFilters: "color-interpolation-filters",
colorProfile: "color-profile",
colorRendering: "color-rendering",
contentScriptType: "contentScriptType",
contentStyleType: "contentStyleType",
cursor: 0,
cx: 0,
cy: 0,
d: 0,
decelerate: 0,
descent: 0,
diffuseConstant: "diffuseConstant",
direction: 0,
display: 0,
divisor: 0,
dominantBaseline: "dominant-baseline",
dur: 0,
dx: 0,
dy: 0,
edgeMode: "edgeMode",
elevation: 0,
enableBackground: "enable-background",
end: 0,
exponent: 0,
externalResourcesRequired: "externalResourcesRequired",
fill: 0,
fillOpacity: "fill-opacity",
fillRule: "fill-rule",
filter: 0,
filterRes: "filterRes",
filterUnits: "filterUnits",
floodColor: "flood-color",
floodOpacity: "flood-opacity",
focusable: 0,
fontFamily: "font-family",
fontSize: "font-size",
fontSizeAdjust: "font-size-adjust",
fontStretch: "font-stretch",
fontStyle: "font-style",
fontVariant: "font-variant",
fontWeight: "font-weight",
format: 0,
from: 0,
fx: 0,
fy: 0,
g1: 0,
g2: 0,
glyphName: "glyph-name",
glyphOrientationHorizontal: "glyph-orientation-horizontal",
glyphOrientationVertical: "glyph-orientation-vertical",
glyphRef: "glyphRef",
gradientTransform: "gradientTransform",
gradientUnits: "gradientUnits",
hanging: 0,
horizAdvX: "horiz-adv-x",
horizOriginX: "horiz-origin-x",
ideographic: 0,
imageRendering: "image-rendering",
"in": 0,
in2: 0,
intercept: 0,
k: 0,
k1: 0,
k2: 0,
k3: 0,
k4: 0,
kernelMatrix: "kernelMatrix",
kernelUnitLength: "kernelUnitLength",
kerning: 0,
keyPoints: "keyPoints",
keySplines: "keySplines",
keyTimes: "keyTimes",
lengthAdjust: "lengthAdjust",
letterSpacing: "letter-spacing",
lightingColor: "lighting-color",
limitingConeAngle: "limitingConeAngle",
local: 0,
markerEnd: "marker-end",
markerMid: "marker-mid",
markerStart: "marker-start",
markerHeight: "markerHeight",
markerUnits: "markerUnits",
markerWidth: "markerWidth",
mask: 0,
maskContentUnits: "maskContentUnits",
maskUnits: "maskUnits",
mathematical: 0,
mode: 0,
numOctaves: "numOctaves",
offset: 0,
opacity: 0,
operator: 0,
order: 0,
orient: 0,
orientation: 0,
origin: 0,
overflow: 0,
overlinePosition: "overline-position",
overlineThickness: "overline-thickness",
paintOrder: "paint-order",
panose1: "panose-1",
pathLength: "pathLength",
patternContentUnits: "patternContentUnits",
patternTransform: "patternTransform",
patternUnits: "patternUnits",
pointerEvents: "pointer-events",
points: 0,
pointsAtX: "pointsAtX",
pointsAtY: "pointsAtY",
pointsAtZ: "pointsAtZ",
preserveAlpha: "preserveAlpha",
preserveAspectRatio: "preserveAspectRatio",
primitiveUnits: "primitiveUnits",
r: 0,
radius: 0,
refX: "refX",
refY: "refY",
renderingIntent: "rendering-intent",
repeatCount: "repeatCount",
repeatDur: "repeatDur",
requiredExtensions: "requiredExtensions",
requiredFeatures: "requiredFeatures",
restart: 0,
result: 0,
rotate: 0,
rx: 0,
ry: 0,
scale: 0,
seed: 0,
shapeRendering: "shape-rendering",
slope: 0,
spacing: 0,
specularConstant: "specularConstant",
specularExponent: "specularExponent",
speed: 0,
spreadMethod: "spreadMethod",
startOffset: "startOffset",
stdDeviation: "stdDeviation",
stemh: 0,
stemv: 0,
stitchTiles: "stitchTiles",
stopColor: "stop-color",
stopOpacity: "stop-opacity",
strikethroughPosition: "strikethrough-position",
strikethroughThickness: "strikethrough-thickness",
string: 0,
stroke: 0,
strokeDasharray: "stroke-dasharray",
strokeDashoffset: "stroke-dashoffset",
strokeLinecap: "stroke-linecap",
strokeLinejoin: "stroke-linejoin",
strokeMiterlimit: "stroke-miterlimit",
strokeOpacity: "stroke-opacity",
strokeWidth: "stroke-width",
surfaceScale: "surfaceScale",
systemLanguage: "systemLanguage",
tableValues: "tableValues",
targetX: "targetX",
targetY: "targetY",
textAnchor: "text-anchor",
textDecoration: "text-decoration",
textRendering: "text-rendering",
textLength: "textLength",
to: 0,
transform: 0,
u1: 0,
u2: 0,
underlinePosition: "underline-position",
underlineThickness: "underline-thickness",
unicode: 0,
unicodeBidi: "unicode-bidi",
unicodeRange: "unicode-range",
unitsPerEm: "units-per-em",
vAlphabetic: "v-alphabetic",
vHanging: "v-hanging",
vIdeographic: "v-ideographic",
vMathematical: "v-mathematical",
values: 0,
vectorEffect: "vector-effect",
version: 0,
vertAdvY: "vert-adv-y",
vertOriginX: "vert-origin-x",
vertOriginY: "vert-origin-y",
viewBox: "viewBox",
viewTarget: "viewTarget",
visibility: 0,
widths: 0,
wordSpacing: "word-spacing",
writingMode: "writing-mode",
x: 0,
xHeight: "x-height",
x1: 0,
x2: 0,
xChannelSelector: "xChannelSelector",
xlinkActuate: "xlink:actuate",
xlinkArcrole: "xlink:arcrole",
xlinkHref: "xlink:href",
xlinkRole: "xlink:role",
xlinkShow: "xlink:show",
xlinkTitle: "xlink:title",
xlinkType: "xlink:type",
xmlBase: "xml:base",
xmlns: 0,
xmlnsXlink: "xmlns:xlink",
xmlLang: "xml:lang",
xmlSpace: "xml:space",
y: 0,
y1: 0,
y2: 0,
yChannelSelector: "yChannelSelector",
z: 0,
zoomAndPan: "zoomAndPan"
}, SVGDOMPropertyConfig = {
Properties: {},
DOMAttributeNamespaces: {
xlinkActuate: NS.xlink,
xlinkArcrole: NS.xlink,
xlinkHref: NS.xlink,
xlinkRole: NS.xlink,
xlinkShow: NS.xlink,
xlinkTitle: NS.xlink,
xlinkType: NS.xlink,
xmlBase: NS.xml,
xmlLang: NS.xml,
xmlSpace: NS.xml
},
DOMAttributeNames: {}
};
Object.keys(ATTRS).forEach(function(key) {
SVGDOMPropertyConfig.Properties[key] = 0, ATTRS[key] && (SVGDOMPropertyConfig.DOMAttributeNames[key] = ATTRS[key]);
}), module.exports = SVGDOMPropertyConfig;
}, function(module, exports, __webpack_require__) {
"use strict";
function getSelection(node) {
if ("selectionStart" in node && ReactInputSelection.hasSelectionCapabilities(node)) return {
start: node.selectionStart,
end: node.selectionEnd
};
if (window.getSelection) {
var selection = window.getSelection();
return {
anchorNode: selection.anchorNode,
anchorOffset: selection.anchorOffset,
focusNode: selection.focusNode,
focusOffset: selection.focusOffset
};
}
if (document.selection) {
var range = document.selection.createRange();
return {
parentElement: range.parentElement(),
text: range.text,
top: range.boundingTop,
left: range.boundingLeft
};
}
}
function constructSelectEvent(nativeEvent, nativeEventTarget) {
if (mouseDown || null == activeElement || activeElement !== getActiveElement()) return null;
var currentSelection = getSelection(activeElement);
if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {
lastSelection = currentSelection;
var syntheticEvent = SyntheticEvent.getPooled(eventTypes.select, activeElementInst, nativeEvent, nativeEventTarget);
return syntheticEvent.type = "select", syntheticEvent.target = activeElement, EventPropagators.accumulateTwoPhaseDispatches(syntheticEvent),
syntheticEvent;
}
return null;
}
var EventPropagators = __webpack_require__(54), ExecutionEnvironment = __webpack_require__(63), ReactDOMComponentTree = __webpack_require__(46), ReactInputSelection = __webpack_require__(157), SyntheticEvent = __webpack_require__(69), getActiveElement = __webpack_require__(163), isTextInputElement = __webpack_require__(82), shallowEqual = __webpack_require__(133), skipSelectionChangeEvent = ExecutionEnvironment.canUseDOM && "documentMode" in document && document.documentMode <= 11, eventTypes = {
select: {
phasedRegistrationNames: {
bubbled: "onSelect",
captured: "onSelectCapture"
},
dependencies: [ "topBlur", "topContextMenu", "topFocus", "topKeyDown", "topKeyUp", "topMouseDown", "topMouseUp", "topSelectionChange" ]
}
}, activeElement = null, activeElementInst = null, lastSelection = null, mouseDown = !1, hasListener = !1, SelectEventPlugin = {
eventTypes: eventTypes,
extractEvents: function(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
if (!hasListener) return null;
var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window;
switch (topLevelType) {
case "topFocus":
(isTextInputElement(targetNode) || "true" === targetNode.contentEditable) && (activeElement = targetNode,
activeElementInst = targetInst, lastSelection = null);
break;
case "topBlur":
activeElement = null, activeElementInst = null, lastSelection = null;
break;
case "topMouseDown":
mouseDown = !0;
break;
case "topContextMenu":
case "topMouseUp":
return mouseDown = !1, constructSelectEvent(nativeEvent, nativeEventTarget);
case "topSelectionChange":
if (skipSelectionChangeEvent) break;
case "topKeyDown":
case "topKeyUp":
return constructSelectEvent(nativeEvent, nativeEventTarget);
}
return null;
},
didPutListener: function(inst, registrationName, listener) {
"onSelect" === registrationName && (hasListener = !0);
}
};
module.exports = SelectEventPlugin;
}, function(module, exports, __webpack_require__) {
"use strict";
function getDictionaryKey(inst) {
return "." + inst._rootNodeID;
}
function isInteractive(tag) {
return "button" === tag || "input" === tag || "select" === tag || "textarea" === tag;
}
var _prodInvariant = __webpack_require__(47), EventListener = __webpack_require__(153), EventPropagators = __webpack_require__(54), ReactDOMComponentTree = __webpack_require__(46), SyntheticAnimationEvent = __webpack_require__(167), SyntheticClipboardEvent = __webpack_require__(168), SyntheticEvent = __webpack_require__(69), SyntheticFocusEvent = __webpack_require__(169), SyntheticKeyboardEvent = __webpack_require__(170), SyntheticMouseEvent = __webpack_require__(85), SyntheticDragEvent = __webpack_require__(173), SyntheticTouchEvent = __webpack_require__(174), SyntheticTransitionEvent = __webpack_require__(175), SyntheticUIEvent = __webpack_require__(86), SyntheticWheelEvent = __webpack_require__(176), emptyFunction = __webpack_require__(60), getEventCharCode = __webpack_require__(171), eventTypes = (__webpack_require__(49),
{}), topLevelEventsToDispatchConfig = {};
[ "abort", "animationEnd", "animationIteration", "animationStart", "blur", "canPlay", "canPlayThrough", "click", "contextMenu", "copy", "cut", "doubleClick", "drag", "dragEnd", "dragEnter", "dragExit", "dragLeave", "dragOver", "dragStart", "drop", "durationChange", "emptied", "encrypted", "ended", "error", "focus", "input", "invalid", "keyDown", "keyPress", "keyUp", "load", "loadedData", "loadedMetadata", "loadStart", "mouseDown", "mouseMove", "mouseOut", "mouseOver", "mouseUp", "paste", "pause", "play", "playing", "progress", "rateChange", "reset", "scroll", "seeked", "seeking", "stalled", "submit", "suspend", "timeUpdate", "touchCancel", "touchEnd", "touchMove", "touchStart", "transitionEnd", "volumeChange", "waiting", "wheel" ].forEach(function(event) {
var capitalizedEvent = event[0].toUpperCase() + event.slice(1), onEvent = "on" + capitalizedEvent, topEvent = "top" + capitalizedEvent, type = {
phasedRegistrationNames: {
bubbled: onEvent,
captured: onEvent + "Capture"
},
dependencies: [ topEvent ]
};
eventTypes[event] = type, topLevelEventsToDispatchConfig[topEvent] = type;
});
var onClickListeners = {}, SimpleEventPlugin = {
eventTypes: eventTypes,
extractEvents: function(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType];
if (!dispatchConfig) return null;
var EventConstructor;
switch (topLevelType) {
case "topAbort":
case "topCanPlay":
case "topCanPlayThrough":
case "topDurationChange":
case "topEmptied":
case "topEncrypted":
case "topEnded":
case "topError":
case "topInput":
case "topInvalid":
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":
EventConstructor = SyntheticEvent;
break;
case "topKeyPress":
if (0 === getEventCharCode(nativeEvent)) return null;
case "topKeyDown":
case "topKeyUp":
EventConstructor = SyntheticKeyboardEvent;
break;
case "topBlur":
case "topFocus":
EventConstructor = SyntheticFocusEvent;
break;
case "topClick":
if (2 === nativeEvent.button) return null;
case "topDoubleClick":
case "topMouseDown":
case "topMouseMove":
case "topMouseUp":
case "topMouseOut":
case "topMouseOver":
case "topContextMenu":
EventConstructor = SyntheticMouseEvent;
break;
case "topDrag":
case "topDragEnd":
case "topDragEnter":
case "topDragExit":
case "topDragLeave":
case "topDragOver":
case "topDragStart":
case "topDrop":
EventConstructor = SyntheticDragEvent;
break;
case "topTouchCancel":
case "topTouchEnd":
case "topTouchMove":
case "topTouchStart":
EventConstructor = SyntheticTouchEvent;
break;
case "topAnimationEnd":
case "topAnimationIteration":
case "topAnimationStart":
EventConstructor = SyntheticAnimationEvent;
break;
case "topTransitionEnd":
EventConstructor = SyntheticTransitionEvent;
break;
case "topScroll":
EventConstructor = SyntheticUIEvent;
break;
case "topWheel":
EventConstructor = SyntheticWheelEvent;
break;
case "topCopy":
case "topCut":
case "topPaste":
EventConstructor = SyntheticClipboardEvent;
}
EventConstructor ? void 0 : _prodInvariant("86", topLevelType);
var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget);
return EventPropagators.accumulateTwoPhaseDispatches(event), event;
},
didPutListener: function(inst, registrationName, listener) {
if ("onClick" === registrationName && !isInteractive(inst._tag)) {
var key = getDictionaryKey(inst), node = ReactDOMComponentTree.getNodeFromInstance(inst);
onClickListeners[key] || (onClickListeners[key] = EventListener.listen(node, "click", emptyFunction));
}
},
willDeleteListener: function(inst, registrationName) {
if ("onClick" === registrationName && !isInteractive(inst._tag)) {
var key = getDictionaryKey(inst);
onClickListeners[key].remove(), delete onClickListeners[key];
}
}
};
module.exports = SimpleEventPlugin;
}, function(module, exports, __webpack_require__) {
"use strict";
function SyntheticAnimationEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
}
var SyntheticEvent = __webpack_require__(69), AnimationEventInterface = {
animationName: null,
elapsedTime: null,
pseudoElement: null
};
SyntheticEvent.augmentClass(SyntheticAnimationEvent, AnimationEventInterface), module.exports = SyntheticAnimationEvent;
}, function(module, exports, __webpack_require__) {
"use strict";
function SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
}
var SyntheticEvent = __webpack_require__(69), ClipboardEventInterface = {
clipboardData: function(event) {
return "clipboardData" in event ? event.clipboardData : window.clipboardData;
}
};
SyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface), module.exports = SyntheticClipboardEvent;
}, function(module, exports, __webpack_require__) {
"use strict";
function SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
}
var SyntheticUIEvent = __webpack_require__(86), FocusEventInterface = {
relatedTarget: null
};
SyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface), module.exports = SyntheticFocusEvent;
}, function(module, exports, __webpack_require__) {
"use strict";
function SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
}
var SyntheticUIEvent = __webpack_require__(86), getEventCharCode = __webpack_require__(171), getEventKey = __webpack_require__(172), getEventModifierState = __webpack_require__(88), KeyboardEventInterface = {
key: getEventKey,
location: null,
ctrlKey: null,
shiftKey: null,
altKey: null,
metaKey: null,
repeat: null,
locale: null,
getModifierState: getEventModifierState,
charCode: function(event) {
return "keypress" === event.type ? getEventCharCode(event) : 0;
},
keyCode: function(event) {
return "keydown" === event.type || "keyup" === event.type ? event.keyCode : 0;
},
which: function(event) {
return "keypress" === event.type ? getEventCharCode(event) : "keydown" === event.type || "keyup" === event.type ? event.keyCode : 0;
}
};
SyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface), module.exports = SyntheticKeyboardEvent;
}, function(module, exports) {
"use strict";
function getEventCharCode(nativeEvent) {
var charCode, keyCode = nativeEvent.keyCode;
return "charCode" in nativeEvent ? (charCode = nativeEvent.charCode, 0 === charCode && 13 === keyCode && (charCode = 13)) : charCode = keyCode,
charCode >= 32 || 13 === charCode ? charCode : 0;
}
module.exports = getEventCharCode;
}, function(module, exports, __webpack_require__) {
"use strict";
function getEventKey(nativeEvent) {
if (nativeEvent.key) {
var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
if ("Unidentified" !== key) return key;
}
if ("keypress" === nativeEvent.type) {
var charCode = getEventCharCode(nativeEvent);
return 13 === charCode ? "Enter" : String.fromCharCode(charCode);
}
return "keydown" === nativeEvent.type || "keyup" === nativeEvent.type ? translateToKey[nativeEvent.keyCode] || "Unidentified" : "";
}
var getEventCharCode = __webpack_require__(171), normalizeKey = {
Esc: "Escape",
Spacebar: " ",
Left: "ArrowLeft",
Up: "ArrowUp",
Right: "ArrowRight",
Down: "ArrowDown",
Del: "Delete",
Win: "OS",
Menu: "ContextMenu",
Apps: "ContextMenu",
Scroll: "ScrollLock",
MozPrintableKey: "Unidentified"
}, translateToKey = {
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"
};
module.exports = getEventKey;
}, function(module, exports, __webpack_require__) {
"use strict";
function SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
}
var SyntheticMouseEvent = __webpack_require__(85), DragEventInterface = {
dataTransfer: null
};
SyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface), module.exports = SyntheticDragEvent;
}, function(module, exports, __webpack_require__) {
"use strict";
function SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
}
var SyntheticUIEvent = __webpack_require__(86), getEventModifierState = __webpack_require__(88), TouchEventInterface = {
touches: null,
targetTouches: null,
changedTouches: null,
altKey: null,
metaKey: null,
ctrlKey: null,
shiftKey: null,
getModifierState: getEventModifierState
};
SyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface), module.exports = SyntheticTouchEvent;
}, function(module, exports, __webpack_require__) {
"use strict";
function SyntheticTransitionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
}
var SyntheticEvent = __webpack_require__(69), TransitionEventInterface = {
propertyName: null,
elapsedTime: null,
pseudoElement: null
};
SyntheticEvent.augmentClass(SyntheticTransitionEvent, TransitionEventInterface),
module.exports = SyntheticTransitionEvent;
}, function(module, exports, __webpack_require__) {
"use strict";
function SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
}
var SyntheticMouseEvent = __webpack_require__(85), WheelEventInterface = {
deltaX: function(event) {
return "deltaX" in event ? event.deltaX : "wheelDeltaX" in event ? -event.wheelDeltaX : 0;
},
deltaY: function(event) {
return "deltaY" in event ? event.deltaY : "wheelDeltaY" in event ? -event.wheelDeltaY : "wheelDelta" in event ? -event.wheelDelta : 0;
},
deltaZ: null,
deltaMode: null
};
SyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface), module.exports = SyntheticWheelEvent;
}, function(module, exports, __webpack_require__) {
"use strict";
function firstDifferenceIndex(string1, string2) {
for (var minLen = Math.min(string1.length, string2.length), i = 0; i < minLen; i++) if (string1.charAt(i) !== string2.charAt(i)) return i;
return string1.length === string2.length ? -1 : minLen;
}
function getReactRootElementInContainer(container) {
return container ? container.nodeType === DOC_NODE_TYPE ? container.documentElement : container.firstChild : null;
}
function internalGetID(node) {
return node.getAttribute && node.getAttribute(ATTR_NAME) || "";
}
function mountComponentIntoNode(wrapperInstance, container, transaction, shouldReuseMarkup, context) {
var markerName;
if (ReactFeatureFlags.logTopLevelRenders) {
var wrappedElement = wrapperInstance._currentElement.props.child, type = wrappedElement.type;
markerName = "React mount: " + ("string" == typeof type ? type : type.displayName || type.name),
console.time(markerName);
}
var markup = ReactReconciler.mountComponent(wrapperInstance, transaction, null, ReactDOMContainerInfo(wrapperInstance, container), context, 0);
markerName && console.timeEnd(markerName), wrapperInstance._renderedComponent._topLevelWrapper = wrapperInstance,
ReactMount._mountImageIntoNode(markup, container, wrapperInstance, shouldReuseMarkup, transaction);
}
function batchedMountComponentIntoNode(componentInstance, container, shouldReuseMarkup, context) {
var transaction = ReactUpdates.ReactReconcileTransaction.getPooled(!shouldReuseMarkup && ReactDOMFeatureFlags.useCreateElement);
transaction.perform(mountComponentIntoNode, null, componentInstance, container, transaction, shouldReuseMarkup, context),
ReactUpdates.ReactReconcileTransaction.release(transaction);
}
function unmountComponentFromNode(instance, container, safely) {
for (ReactReconciler.unmountComponent(instance, safely), container.nodeType === DOC_NODE_TYPE && (container = container.documentElement); container.lastChild; ) container.removeChild(container.lastChild);
}
function hasNonRootReactChild(container) {
var rootEl = getReactRootElementInContainer(container);
if (rootEl) {
var inst = ReactDOMComponentTree.getInstanceFromNode(rootEl);
return !(!inst || !inst._hostParent);
}
}
function isValidContainer(node) {
return !(!node || node.nodeType !== ELEMENT_NODE_TYPE && node.nodeType !== DOC_NODE_TYPE && node.nodeType !== DOCUMENT_FRAGMENT_NODE_TYPE);
}
function getHostRootInstanceInContainer(container) {
var rootEl = getReactRootElementInContainer(container), prevHostInstance = rootEl && ReactDOMComponentTree.getInstanceFromNode(rootEl);
return prevHostInstance && !prevHostInstance._hostParent ? prevHostInstance : null;
}
function getTopLevelWrapperInContainer(container) {
var root = getHostRootInstanceInContainer(container);
return root ? root._hostContainerInfo._topLevelWrapper : null;
}
var _prodInvariant = __webpack_require__(47), DOMLazyTree = __webpack_require__(92), DOMProperty = __webpack_require__(48), React = __webpack_require__(7), ReactBrowserEventEmitter = __webpack_require__(116), ReactDOMComponentTree = (__webpack_require__(14),
__webpack_require__(46)), ReactDOMContainerInfo = __webpack_require__(178), ReactDOMFeatureFlags = __webpack_require__(179), ReactFeatureFlags = __webpack_require__(74), ReactInstanceMap = __webpack_require__(127), ReactMarkupChecksum = (__webpack_require__(78),
__webpack_require__(180)), ReactReconciler = __webpack_require__(75), ReactUpdateQueue = __webpack_require__(146), ReactUpdates = __webpack_require__(72), emptyObject = __webpack_require__(132), instantiateReactComponent = __webpack_require__(129), setInnerHTML = (__webpack_require__(49),
__webpack_require__(94)), shouldUpdateReactComponent = __webpack_require__(134), ATTR_NAME = (__webpack_require__(59),
DOMProperty.ID_ATTRIBUTE_NAME), ROOT_ATTR_NAME = DOMProperty.ROOT_ATTRIBUTE_NAME, ELEMENT_NODE_TYPE = 1, DOC_NODE_TYPE = 9, DOCUMENT_FRAGMENT_NODE_TYPE = 11, instancesByReactRootID = {}, topLevelRootCounter = 1, TopLevelWrapper = function() {
this.rootID = topLevelRootCounter++;
};
TopLevelWrapper.prototype.isReactComponent = {}, TopLevelWrapper.prototype.render = function() {
return this.props.child;
}, TopLevelWrapper.isReactTopLevelWrapper = !0;
var ReactMount = {
TopLevelWrapper: TopLevelWrapper,
_instancesByReactRootID: instancesByReactRootID,
scrollMonitor: function(container, renderCallback) {
renderCallback();
},
_updateRootComponent: function(prevComponent, nextElement, nextContext, container, callback) {
return ReactMount.scrollMonitor(container, function() {
ReactUpdateQueue.enqueueElementInternal(prevComponent, nextElement, nextContext),
callback && ReactUpdateQueue.enqueueCallbackInternal(prevComponent, callback);
}), prevComponent;
},
_renderNewRootComponent: function(nextElement, container, shouldReuseMarkup, context) {
isValidContainer(container) ? void 0 : _prodInvariant("37"), ReactBrowserEventEmitter.ensureScrollValueMonitoring();
var componentInstance = instantiateReactComponent(nextElement, !1);
ReactUpdates.batchedUpdates(batchedMountComponentIntoNode, componentInstance, container, shouldReuseMarkup, context);
var wrapperID = componentInstance._instance.rootID;
return instancesByReactRootID[wrapperID] = componentInstance, componentInstance;
},
renderSubtreeIntoContainer: function(parentComponent, nextElement, container, callback) {
return null != parentComponent && ReactInstanceMap.has(parentComponent) ? void 0 : _prodInvariant("38"),
ReactMount._renderSubtreeIntoContainer(parentComponent, nextElement, container, callback);
},
_renderSubtreeIntoContainer: function(parentComponent, nextElement, container, callback) {
ReactUpdateQueue.validateCallback(callback, "ReactDOM.render"), React.isValidElement(nextElement) ? void 0 : _prodInvariant("39", "string" == typeof nextElement ? " Instead of passing a string like 'div', pass React.createElement('div') or ." : "function" == typeof nextElement ? " Instead of passing a class like Foo, pass React.createElement(Foo) or ." : null != nextElement && void 0 !== nextElement.props ? " This may be caused by unintentionally loading two independent copies of React." : "");
var nextContext, nextWrappedElement = React.createElement(TopLevelWrapper, {
child: nextElement
});
if (parentComponent) {
var parentInst = ReactInstanceMap.get(parentComponent);
nextContext = parentInst._processChildContext(parentInst._context);
} else nextContext = emptyObject;
var prevComponent = getTopLevelWrapperInContainer(container);
if (prevComponent) {
var prevWrappedElement = prevComponent._currentElement, prevElement = prevWrappedElement.props.child;
if (shouldUpdateReactComponent(prevElement, nextElement)) {
var publicInst = prevComponent._renderedComponent.getPublicInstance(), updatedCallback = callback && function() {
callback.call(publicInst);
};
return ReactMount._updateRootComponent(prevComponent, nextWrappedElement, nextContext, container, updatedCallback),
publicInst;
}
ReactMount.unmountComponentAtNode(container);
}
var reactRootElement = getReactRootElementInContainer(container), containerHasReactMarkup = reactRootElement && !!internalGetID(reactRootElement), containerHasNonRootReactChild = hasNonRootReactChild(container), shouldReuseMarkup = containerHasReactMarkup && !prevComponent && !containerHasNonRootReactChild, component = ReactMount._renderNewRootComponent(nextWrappedElement, container, shouldReuseMarkup, nextContext)._renderedComponent.getPublicInstance();
return callback && callback.call(component), component;
},
render: function(nextElement, container, callback) {
return ReactMount._renderSubtreeIntoContainer(null, nextElement, container, callback);
},
unmountComponentAtNode: function(container) {
isValidContainer(container) ? void 0 : _prodInvariant("40");
var prevComponent = getTopLevelWrapperInContainer(container);
if (!prevComponent) {
hasNonRootReactChild(container), 1 === container.nodeType && container.hasAttribute(ROOT_ATTR_NAME);
return !1;
}
return delete instancesByReactRootID[prevComponent._instance.rootID], ReactUpdates.batchedUpdates(unmountComponentFromNode, prevComponent, container, !1),
!0;
},
_mountImageIntoNode: function(markup, container, instance, shouldReuseMarkup, transaction) {
if (isValidContainer(container) ? void 0 : _prodInvariant("41"), shouldReuseMarkup) {
var rootElement = getReactRootElementInContainer(container);
if (ReactMarkupChecksum.canReuseMarkup(markup, rootElement)) return void ReactDOMComponentTree.precacheNode(instance, rootElement);
var checksum = rootElement.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);
rootElement.removeAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);
var rootMarkup = rootElement.outerHTML;
rootElement.setAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME, checksum);
var normalizedMarkup = markup, diffIndex = firstDifferenceIndex(normalizedMarkup, rootMarkup), difference = " (client) " + normalizedMarkup.substring(diffIndex - 20, diffIndex + 20) + "\n (server) " + rootMarkup.substring(diffIndex - 20, diffIndex + 20);
container.nodeType === DOC_NODE_TYPE ? _prodInvariant("42", difference) : void 0;
}
if (container.nodeType === DOC_NODE_TYPE ? _prodInvariant("43") : void 0, transaction.useCreateElement) {
for (;container.lastChild; ) container.removeChild(container.lastChild);
DOMLazyTree.insertTreeBefore(container, markup, null);
} else setInnerHTML(container, markup), ReactDOMComponentTree.precacheNode(instance, container.firstChild);
}
};
module.exports = ReactMount;
}, function(module, exports, __webpack_require__) {
"use strict";
function ReactDOMContainerInfo(topLevelWrapper, node) {
var info = {
_topLevelWrapper: topLevelWrapper,
_idCounter: 1,
_ownerDocument: node ? node.nodeType === DOC_NODE_TYPE ? node : node.ownerDocument : null,
_node: node,
_tag: node ? node.nodeName.toLowerCase() : null,
_namespaceURI: node ? node.namespaceURI : null
};
return info;
}
var DOC_NODE_TYPE = (__webpack_require__(147), 9);
module.exports = ReactDOMContainerInfo;
}, function(module, exports) {
"use strict";
var ReactDOMFeatureFlags = {
useCreateElement: !0,
useFiber: !1
};
module.exports = ReactDOMFeatureFlags;
}, function(module, exports, __webpack_require__) {
"use strict";
var adler32 = __webpack_require__(181), TAG_END = /\/?>/, COMMENT_START = /^<\!\-\-/, ReactMarkupChecksum = {
CHECKSUM_ATTR_NAME: "data-react-checksum",
addChecksumToMarkup: function(markup) {
var checksum = adler32(markup);
return COMMENT_START.test(markup) ? markup : markup.replace(TAG_END, " " + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + '="' + checksum + '"$&');
},
canReuseMarkup: function(markup, element) {
var existingChecksum = element.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);
existingChecksum = existingChecksum && parseInt(existingChecksum, 10);
var markupChecksum = adler32(markup);
return markupChecksum === existingChecksum;
}
};
module.exports = ReactMarkupChecksum;
}, function(module, exports) {
"use strict";
function adler32(data) {
for (var a = 1, b = 0, i = 0, l = data.length, m = l & -4; i < m; ) {
for (var n = Math.min(i + 4096, m); i < n; i += 4) b += (a += data.charCodeAt(i)) + (a += data.charCodeAt(i + 1)) + (a += data.charCodeAt(i + 2)) + (a += data.charCodeAt(i + 3));
a %= MOD, b %= MOD;
}
for (;i < l; i++) b += a += data.charCodeAt(i);
return a %= MOD, b %= MOD, a | b << 16;
}
var MOD = 65521;
module.exports = adler32;
}, function(module, exports) {
"use strict";
module.exports = "15.4.2";
}, function(module, exports, __webpack_require__) {
"use strict";
function findDOMNode(componentOrElement) {
if (null == componentOrElement) return null;
if (1 === componentOrElement.nodeType) return componentOrElement;
var inst = ReactInstanceMap.get(componentOrElement);
return inst ? (inst = getHostComponentFromComposite(inst), inst ? ReactDOMComponentTree.getNodeFromInstance(inst) : null) : void ("function" == typeof componentOrElement.render ? _prodInvariant("44") : _prodInvariant("45", Object.keys(componentOrElement)));
}
var _prodInvariant = __webpack_require__(47), ReactDOMComponentTree = (__webpack_require__(14),
__webpack_require__(46)), ReactInstanceMap = __webpack_require__(127), getHostComponentFromComposite = __webpack_require__(184);
__webpack_require__(49), __webpack_require__(59);
module.exports = findDOMNode;
}, function(module, exports, __webpack_require__) {
"use strict";
function getHostComponentFromComposite(inst) {
for (var type; (type = inst._renderedNodeType) === ReactNodeTypes.COMPOSITE; ) inst = inst._renderedComponent;
return type === ReactNodeTypes.HOST ? inst._renderedComponent : type === ReactNodeTypes.EMPTY ? null : void 0;
}
var ReactNodeTypes = __webpack_require__(131);
module.exports = getHostComponentFromComposite;
}, function(module, exports, __webpack_require__) {
"use strict";
var ReactMount = __webpack_require__(177);
module.exports = ReactMount.renderSubtreeIntoContainer;
}, function(module, exports) {
"use strict";
function flash(node, flashColor, baseColor, duration) {
node.style.transition = "none", node.style.backgroundColor = flashColor, void node.offsetTop,
node.style.transition = "background-color " + duration + "s ease", node.style.backgroundColor = baseColor;
}
module.exports = flash;
}, function(module, exports, __webpack_require__) {
"use strict";
var _Symbol = __webpack_require__(188);
module.exports = {
name: _Symbol("name"),
type: _Symbol("type"),
inspected: _Symbol("inspected"),
meta: _Symbol("meta"),
proto: _Symbol("proto")
};
}, function(module, exports, __webpack_require__) {
"use strict";
module.exports = __webpack_require__(189)() ? Symbol : __webpack_require__(190);
}, function(module, exports) {
"use strict";
module.exports = function() {
var symbol;
if ("function" != typeof Symbol) return !1;
symbol = Symbol("test symbol");
try {
String(symbol);
} catch (e) {
return !1;
}
return "symbol" == typeof Symbol.iterator || "object" == typeof Symbol.isConcatSpreadable && ("object" == typeof Symbol.iterator && ("object" == typeof Symbol.toPrimitive && ("object" == typeof Symbol.toStringTag && "object" == typeof Symbol.unscopables)));
};
}, function(module, exports, __webpack_require__) {
"use strict";
var NativeSymbol, SymbolPolyfill, HiddenSymbol, d = __webpack_require__(191), validateSymbol = __webpack_require__(204), create = Object.create, defineProperties = Object.defineProperties, defineProperty = Object.defineProperty, objPrototype = Object.prototype, globalSymbols = create(null);
"function" == typeof Symbol && (NativeSymbol = Symbol);
var generateName = function() {
var created = create(null);
return function(desc) {
for (var name, ie11BugWorkaround, postfix = 0; created[desc + (postfix || "")]; ) ++postfix;
return desc += postfix || "", created[desc] = !0, name = "@@" + desc, defineProperty(objPrototype, name, d.gs(null, function(value) {
ie11BugWorkaround || (ie11BugWorkaround = !0, defineProperty(this, name, d(value)),
ie11BugWorkaround = !1);
})), name;
};
}();
HiddenSymbol = function(description) {
if (this instanceof HiddenSymbol) throw new TypeError("TypeError: Symbol is not a constructor");
return SymbolPolyfill(description);
}, module.exports = SymbolPolyfill = function Symbol(description) {
var symbol;
if (this instanceof Symbol) throw new TypeError("TypeError: Symbol is not a constructor");
return symbol = create(HiddenSymbol.prototype), description = void 0 === description ? "" : String(description),
defineProperties(symbol, {
__description__: d("", description),
__name__: d("", generateName(description))
});
}, defineProperties(SymbolPolyfill, {
"for": d(function(key) {
return globalSymbols[key] ? globalSymbols[key] : globalSymbols[key] = SymbolPolyfill(String(key));
}),
keyFor: d(function(s) {
var key;
validateSymbol(s);
for (key in globalSymbols) if (globalSymbols[key] === s) return key;
}),
hasInstance: d("", NativeSymbol && NativeSymbol.hasInstance || SymbolPolyfill("hasInstance")),
isConcatSpreadable: d("", NativeSymbol && NativeSymbol.isConcatSpreadable || SymbolPolyfill("isConcatSpreadable")),
iterator: d("", NativeSymbol && NativeSymbol.iterator || SymbolPolyfill("iterator")),
match: d("", NativeSymbol && NativeSymbol.match || SymbolPolyfill("match")),
replace: d("", NativeSymbol && NativeSymbol.replace || SymbolPolyfill("replace")),
search: d("", NativeSymbol && NativeSymbol.search || SymbolPolyfill("search")),
species: d("", NativeSymbol && NativeSymbol.species || SymbolPolyfill("species")),
split: d("", NativeSymbol && NativeSymbol.split || SymbolPolyfill("split")),
toPrimitive: d("", NativeSymbol && NativeSymbol.toPrimitive || SymbolPolyfill("toPrimitive")),
toStringTag: d("", NativeSymbol && NativeSymbol.toStringTag || SymbolPolyfill("toStringTag")),
unscopables: d("", NativeSymbol && NativeSymbol.unscopables || SymbolPolyfill("unscopables"))
}), defineProperties(HiddenSymbol.prototype, {
constructor: d(SymbolPolyfill),
toString: d("", function() {
return this.__name__;
})
}), defineProperties(SymbolPolyfill.prototype, {
toString: d(function() {
return "Symbol (" + validateSymbol(this).__description__ + ")";
}),
valueOf: d(function() {
return validateSymbol(this);
})
}), defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toPrimitive, d("", function() {
return validateSymbol(this);
})), defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toStringTag, d("c", "Symbol")),
defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toStringTag, d("c", SymbolPolyfill.prototype[SymbolPolyfill.toStringTag])),
defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toPrimitive, d("c", SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive]));
}, function(module, exports, __webpack_require__) {
"use strict";
var d, assign = __webpack_require__(192), normalizeOpts = __webpack_require__(199), isCallable = __webpack_require__(200), contains = __webpack_require__(201);
d = module.exports = function(dscr, value) {
var c, e, w, options, desc;
return arguments.length < 2 || "string" != typeof dscr ? (options = value, value = dscr,
dscr = null) : options = arguments[2], null == dscr ? (c = w = !0, e = !1) : (c = contains.call(dscr, "c"),
e = contains.call(dscr, "e"), w = contains.call(dscr, "w")), desc = {
value: value,
configurable: c,
enumerable: e,
writable: w
}, options ? assign(normalizeOpts(options), desc) : desc;
}, d.gs = function(dscr, get, set) {
var c, e, options, desc;
return "string" != typeof dscr ? (options = set, set = get, get = dscr, dscr = null) : options = arguments[3],
null == get ? get = void 0 : isCallable(get) ? null == set ? set = void 0 : isCallable(set) || (options = set,
set = void 0) : (options = get, get = set = void 0), null == dscr ? (c = !0, e = !1) : (c = contains.call(dscr, "c"),
e = contains.call(dscr, "e")), desc = {
get: get,
set: set,
configurable: c,
enumerable: e
}, options ? assign(normalizeOpts(options), desc) : desc;
};
}, function(module, exports, __webpack_require__) {
"use strict";
module.exports = __webpack_require__(193)() ? Object.assign : __webpack_require__(194);
}, function(module, exports) {
"use strict";
module.exports = function() {
var obj, assign = Object.assign;
return "function" == typeof assign && (obj = {
foo: "raz"
}, assign(obj, {
bar: "dwa"
}, {
trzy: "trzy"
}), obj.foo + obj.bar + obj.trzy === "razdwatrzy");
};
}, function(module, exports, __webpack_require__) {
"use strict";
var keys = __webpack_require__(195), value = __webpack_require__(198), max = Math.max;
module.exports = function(dest, src) {
var error, i, assign, l = max(arguments.length, 2);
for (dest = Object(value(dest)), assign = function(key) {
try {
dest[key] = src[key];
} catch (e) {
error || (error = e);
}
}, i = 1; i < l; ++i) src = arguments[i], keys(src).forEach(assign);
if (void 0 !== error) throw error;
return dest;
};
}, function(module, exports, __webpack_require__) {
"use strict";
module.exports = __webpack_require__(196)() ? Object.keys : __webpack_require__(197);
}, function(module, exports) {
"use strict";
module.exports = function() {
try {
return Object.keys("primitive"), !0;
} catch (e) {
return !1;
}
};
}, function(module, exports) {
"use strict";
var keys = Object.keys;
module.exports = function(object) {
return keys(null == object ? object : Object(object));
};
}, function(module, exports) {
"use strict";
module.exports = function(value) {
if (null == value) throw new TypeError("Cannot use null or undefined");
return value;
};
}, function(module, exports) {
"use strict";
var forEach = Array.prototype.forEach, create = Object.create, process = function(src, obj) {
var key;
for (key in src) obj[key] = src[key];
};
module.exports = function(options) {
var result = create(null);
return forEach.call(arguments, function(options) {
null != options && process(Object(options), result);
}), result;
};
}, function(module, exports) {
"use strict";
module.exports = function(obj) {
return "function" == typeof obj;
};
}, function(module, exports, __webpack_require__) {
"use strict";
module.exports = __webpack_require__(202)() ? String.prototype.contains : __webpack_require__(203);
}, function(module, exports) {
"use strict";
var str = "razdwatrzy";
module.exports = function() {
return "function" == typeof str.contains && (str.contains("dwa") === !0 && str.contains("foo") === !1);
};
}, function(module, exports) {
"use strict";
var indexOf = String.prototype.indexOf;
module.exports = function(searchString) {
return indexOf.call(this, searchString, arguments[1]) > -1;
};
}, function(module, exports, __webpack_require__) {
"use strict";
var isSymbol = __webpack_require__(205);
module.exports = function(value) {
if (!isSymbol(value)) throw new TypeError(value + " is not a symbol");
return value;
};
}, function(module, exports) {
"use strict";
module.exports = function(x) {
return x && ("symbol" == typeof x || "Symbol" === x["@@toStringTag"]) || !1;
};
}, function(module, exports, __webpack_require__) {
"use strict";
function previewComplex(data, theme) {
var style = {
color: theme.special04
};
if (Array.isArray(data)) return React.createElement("span", {
style: style
}, "Array[", data.length, "]");
switch (data[consts.type]) {
case "function":
return React.createElement("span", {
style: style
}, data[consts.name] || "fn", "()");
case "object":
return React.createElement("span", {
style: style
}, data[consts.name] + "{…}");
case "date":
return React.createElement("span", {
style: style
}, data[consts.name]);
case "symbol":
return React.createElement("span", {
style: style
}, data[consts.name]);
case "iterator":
return React.createElement("span", {
style: style
}, data[consts.name] + "(…)");
case "array_buffer":
case "data_view":
case "array":
case "typed_array":
return React.createElement("span", {
style: style
}, data[consts.name] + "[" + data[consts.meta].length + "]");
case void 0:
case null:
return "{…}";
}
return null;
}
var React = __webpack_require__(6), consts = __webpack_require__(187);
module.exports = previewComplex;
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), _require = __webpack_require__(35), monospace = _require.monospace, React = __webpack_require__(6), DetailPane = function(_React$Component) {
function DetailPane() {
return _classCallCheck(this, DetailPane), _possibleConstructorReturn(this, (DetailPane.__proto__ || Object.getPrototypeOf(DetailPane)).apply(this, arguments));
}
return _inherits(DetailPane, _React$Component), _createClass(DetailPane, [ {
key: "render",
value: function() {
return React.createElement("div", {
style: styles.container
}, this.props.children);
}
} ]), DetailPane;
}(React.Component), styles = {
container: {
fontSize: monospace.sizes.normal,
fontFamily: monospace.family,
overflow: "auto",
flex: 1,
display: "flex",
flexDirection: "column"
}
};
module.exports = DetailPane;
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), React = __webpack_require__(6), DetailPaneSection = function(_React$Component) {
function DetailPaneSection() {
return _classCallCheck(this, DetailPaneSection), _possibleConstructorReturn(this, (DetailPaneSection.__proto__ || Object.getPrototypeOf(DetailPaneSection)).apply(this, arguments));
}
return _inherits(DetailPaneSection, _React$Component), _createClass(DetailPaneSection, [ {
key: "render",
value: function() {
var theme = this.context.theme, _props = this.props, children = _props.children, hint = _props.hint;
return React.createElement("div", {
style: sectionStyle(theme)
}, React.createElement("strong", {
style: styles.title
}, this.props.title), hint, children);
}
} ]), DetailPaneSection;
}(React.Component);
DetailPaneSection.contextTypes = {
theme: React.PropTypes.object.isRequired
};
var sectionStyle = function(theme) {
return {
borderTop: "1px solid " + theme.base01,
padding: "0.25rem",
flexShrink: 0
};
}, styles = {
title: {
display: "inline-block",
marginRight: "0.25rem"
}
};
module.exports = DetailPaneSection;
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
function previewProp(val, nested, inverted, theme) {
var style = {
color: inverted ? getInvertedWeak(theme.state02) : theme.special01
};
if ("number" == typeof val) return React.createElement("span", {
style: style
}, val);
if ("string" == typeof val) return style = {
color: inverted ? getInvertedWeak(theme.state02) : theme.special02
}, val.length > 50 && (val = val.slice(0, 50) + "…"), React.createElement("span", {
style: style
}, '"', val, '"');
if ("boolean" == typeof val) return React.createElement("span", {
style: style
}, "" + val);
if (Array.isArray(val)) return style = {
color: inverted ? getInvertedWeak(theme.state02) : theme.special02
}, nested ? React.createElement("span", {
style: style
}, "[(", val.length, ")]") : previewArray(val, inverted, theme);
if (!val) return style = {
color: inverted ? getInvertedWeak(theme.state02) : theme.base03
}, React.createElement("span", {
style: style
}, "" + val);
if ("object" !== ("undefined" == typeof val ? "undefined" : _typeof(val))) return style = {
color: inverted ? getInvertedWeak(theme.state02) : theme.special04
}, React.createElement("span", {
style: style
}, "…");
switch (val[consts.type]) {
case "date":
return React.createElement("span", {
style: style
}, val[consts.name]);
case "function":
return style = {
color: inverted ? getInvertedWeak(theme.state02) : theme.special04
}, React.createElement("span", {
style: style
}, val[consts.name] || "fn", "()");
case "object":
return React.createElement("span", {
style: style
}, val[consts.name] + "{…}");
case "array":
return style = {
color: inverted ? getInvertedWeak(theme.state02) : theme.special02
}, React.createElement("span", {
style: style
}, "Array[", val[consts.meta].length, "]");
case "typed_array":
case "array_buffer":
case "data_view":
return style = {
color: inverted ? getInvertedWeak(theme.state02) : theme.special02
}, React.createElement("span", {
style: style
}, val[consts.name] + "[" + val[consts.meta].length + "]");
case "iterator":
return style = {
color: inverted ? getInvertedWeak(theme.state02) : theme.base05
}, React.createElement("span", {
style: style
}, val[consts.name] + "(…)");
case "symbol":
return style = {
color: inverted ? getInvertedWeak(theme.state02) : theme.base05
}, React.createElement("span", {
style: style
}, val[consts.name]);
}
return nested ? (style = {
color: inverted ? getInvertedWeak(theme.state02) : theme.base05
}, React.createElement("span", {
style: style
}, "{…}")) : previewObject(val, inverted, theme);
}
function previewArray(val, inverted, theme) {
var items = {};
val.slice(0, 3).forEach(function(item, i) {
items["n" + i] = React.createElement(PropVal, {
val: item,
nested: !0,
inverted: inverted,
theme: theme
}), items["c" + i] = ", ";
}), val.length > 3 ? items.last = "…" : delete items["c" + (val.length - 1)];
var style = {
color: inverted ? theme.base03 : theme.special01
};
return React.createElement("span", {
style: style
}, "[", createFragment(items), "]");
}
function previewObject(val, inverted, theme) {
var names = Object.keys(val), items = {}, attrStyle = {
color: inverted ? getInvertedWeak(theme.state02) : theme.special06
};
names.slice(0, 3).forEach(function(name, i) {
items["k" + i] = React.createElement("span", {
style: attrStyle
}, name), items["c" + i] = ": ", items["v" + i] = React.createElement(PropVal, {
val: val[name],
nested: !0,
inverted: inverted,
theme: theme
}), items["m" + i] = ", ";
}), names.length > 3 ? items.rest = "…" : delete items["m" + (names.length - 1)];
var style = {
color: inverted ? getInvertedWeak(theme.state02) : theme.special01
};
return React.createElement("span", {
style: style
}, "{", createFragment(items), "}");
}
var _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj) {
return typeof obj;
} : function(obj) {
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
}, _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), React = __webpack_require__(6), ReactDOM = __webpack_require__(44), consts = __webpack_require__(187), createFragment = __webpack_require__(210), _require = __webpack_require__(212), getInvertedWeak = _require.getInvertedWeak, flash = __webpack_require__(186), PropVal = function(_React$Component) {
function PropVal() {
return _classCallCheck(this, PropVal), _possibleConstructorReturn(this, (PropVal.__proto__ || Object.getPrototypeOf(PropVal)).apply(this, arguments));
}
return _inherits(PropVal, _React$Component), _createClass(PropVal, [ {
key: "componentDidUpdate",
value: function(prevProps) {
if (!(this.props.val === prevProps.val || this.props.val && prevProps.val && "object" === _typeof(this.props.val) && "object" === _typeof(prevProps.val))) {
var node = ReactDOM.findDOMNode(this);
flash(node, this.context.theme.state04, "transparent", 1);
}
}
}, {
key: "render",
value: function() {
return previewProp(this.props.val, !!this.props.nested, !!this.props.inverted, this.context.theme);
}
} ]), PropVal;
}(React.Component);
PropVal.contextTypes = {
theme: React.PropTypes.object.isRequired
}, module.exports = PropVal;
}, function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(211).create;
}, function(module, exports, __webpack_require__) {
"use strict";
var _prodInvariant = __webpack_require__(11), ReactChildren = __webpack_require__(9), ReactElement = __webpack_require__(13), emptyFunction = __webpack_require__(16), ReactFragment = (__webpack_require__(12),
__webpack_require__(15), {
create: function(object) {
if ("object" != typeof object || !object || Array.isArray(object)) return object;
if (ReactElement.isValidElement(object)) return object;
1 === object.nodeType ? _prodInvariant("0") : void 0;
var result = [];
for (var key in object) ReactChildren.mapIntoWithKeyPrefixInternal(object[key], result, key, emptyFunction.thatReturnsArgument);
return result;
}
});
module.exports = ReactFragment;
}, function(module, exports) {
"use strict";
function getBrightness(hex) {
var _getRgb = getRgb(hex), r = _getRgb.r, g = _getRgb.g, b = _getRgb.b;
return Math.round((299 * r + 587 * g + 114 * b) / 1e3);
}
function getInvertedMid(hex) {
return hexToRgba(hex, .8);
}
function getInvertedWeak(hex) {
return hexToRgba(hex, .65);
}
function getRgb() {
var hex = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "";
hex = hex.replace("#", ""), 3 === hex.length && (hex = hex.charAt(0) + hex.charAt(0) + hex.charAt(1) + hex.charAt(1) + hex.charAt(2) + hex.charAt(2));
var r = parseInt(hex.substring(0, 2), 16), g = parseInt(hex.substring(2, 4), 16), b = parseInt(hex.substring(4, 6), 16);
return {
r: r,
g: g,
b: b
};
}
function hexToRgba(hex, alpha) {
var _getRgb2 = getRgb(hex), r = _getRgb2.r, g = _getRgb2.g, b = _getRgb2.b;
return "rgba(" + r + ", " + g + ", " + b + ", " + alpha + ")";
}
function isBright(hex) {
return getBrightness(hex) > 125;
}
module.exports = {
getBrightness: getBrightness,
getInvertedMid: getInvertedMid,
getInvertedWeak: getInvertedWeak,
getRgb: getRgb,
hexToRgba: hexToRgba,
isBright: isBright
};
}, function(module, exports, __webpack_require__) {
"use strict";
var __DEV__ = !1, invariant = function(condition, format, a, b, c, d, e, f) {
if (__DEV__ && void 0 === format) throw new Error("invariant requires an error message argument");
if (!condition) {
var error;
if (void 0 === format) error = new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."); else {
var args = [ a, b, c, d, e, f ], argIndex = 0;
error = new Error("Invariant Violation: " + format.replace(/%s/g, function() {
return args[argIndex++];
}));
}
throw error.framesToPop = 1, error;
}
};
module.exports = invariant;
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), React = __webpack_require__(6), SettingsPane = __webpack_require__(215), TreeView = __webpack_require__(224), PropTypes = React.PropTypes, LeftPane = function(_React$Component) {
function LeftPane() {
return _classCallCheck(this, LeftPane), _possibleConstructorReturn(this, (LeftPane.__proto__ || Object.getPrototypeOf(LeftPane)).apply(this, arguments));
}
return _inherits(LeftPane, _React$Component), _createClass(LeftPane, [ {
key: "render",
value: function() {
return React.createElement("div", {
style: styles.container
}, React.createElement(SettingsPane, null), React.createElement(TreeView, {
reload: this.props.reload
}));
}
} ]), LeftPane;
}(React.Component);
LeftPane.propTypes = {
reload: PropTypes.func
};
var styles = {
container: {
flex: 1,
display: "flex",
flexDirection: "column",
minWidth: 0
}
};
module.exports = LeftPane;
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
function SearchIcon(_ref4) {
var theme = _ref4.theme;
return React.createElement(SvgIcon, {
style: searchIconStyle(theme),
path: Icons.SEARCH
});
}
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
}
return target;
}, _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), TraceUpdatesFrontendControl = __webpack_require__(216), ColorizerFrontendControl = __webpack_require__(219), React = __webpack_require__(6), ReactDOM = __webpack_require__(44), _require = __webpack_require__(35), sansSerif = _require.sansSerif, SearchUtils = __webpack_require__(220), SvgIcon = __webpack_require__(221), PropTypes = React.PropTypes, Icons = __webpack_require__(222), Input = __webpack_require__(41), Hoverable = __webpack_require__(223), decorate = __webpack_require__(38), _require2 = __webpack_require__(212), hexToRgba = _require2.hexToRgba, SettingsPane = function(_React$Component) {
function SettingsPane(props) {
_classCallCheck(this, SettingsPane);
var _this = _possibleConstructorReturn(this, (SettingsPane.__proto__ || Object.getPrototypeOf(SettingsPane)).call(this, props));
return _this.state = {
focused: !1
}, _this;
}
return _inherits(SettingsPane, _React$Component), _createClass(SettingsPane, [ {
key: "componentDidMount",
value: function() {
this._key = this.onDocumentKeyDown.bind(this);
var doc = ReactDOM.findDOMNode(this).ownerDocument;
doc.addEventListener("keydown", this._key, !0);
}
}, {
key: "componentWillUnmount",
value: function() {
var doc = ReactDOM.findDOMNode(this).ownerDocument;
doc.removeEventListener("keydown", this._key, !0);
}
}, {
key: "onDocumentKeyDown",
value: function(e) {
if (191 === e.keyCode && "INPUT" !== e.target.nodeName && !e.target.isContentEditable && this.input && (this.input.focus(),
e.preventDefault()), 27 === e.keyCode) {
if (!this.props.searchText && !this.state.focused) return;
e.stopPropagation(), e.preventDefault(), this.cancel();
}
}
}, {
key: "cancel",
value: function() {
this.props.onChangeSearch(""), this.input && this.input.blur();
}
}, {
key: "onKeyDown",
value: function(key) {
"Enter" === key && this.input && (this.input.blur(), this.props.selectFirstSearchResult());
}
}, {
key: "render",
value: function() {
var inputStyle, _this2 = this, theme = this.context.theme, searchText = this.props.searchText;
return inputStyle = searchText && SearchUtils.shouldSearchUseRegex(searchText) && !SearchUtils.isValidRegex(searchText) ? errorInputStyle(theme) : searchText || this.state.focused ? highlightedInputStyle(theme) : baseInputStyle(theme),
React.createElement("div", {
style: settingsPaneStyle(theme)
}, this.context.showInspectButton && React.createElement(InspectMenuButton, {
isInspectEnabled: this.props.isInspectEnabled,
onClick: this.props.toggleInspectEnabled,
theme: theme
}), React.createElement(SettingsMenuButton, {
onClick: this.props.showPreferencesPanel,
theme: theme
}), React.createElement(TraceUpdatesFrontendControl, this.props), React.createElement("div", {
style: styles.growToFill
}, React.createElement(ColorizerFrontendControl, this.props)), React.createElement("div", {
style: styles.searchInputWrapper
}, React.createElement(Input, {
style: inputStyle,
innerRef: function(i) {
return _this2.input = i;
},
value: searchText,
onFocus: function() {
return _this2.setState({
focused: !0
});
},
onBlur: function() {
return _this2.setState({
focused: !1
});
},
onKeyDown: function(e) {
return _this2.onKeyDown(e.key);
},
placeholder: "Search (text or /regex/)",
onChange: function(e) {
return _this2.props.onChangeSearch(e.target.value);
},
title: "Search by React component name or text"
}), React.createElement(SearchIcon, {
theme: theme
}), !!searchText && React.createElement(ClearSearchButton, {
onClick: this.cancel.bind(this),
theme: theme
})));
}
} ]), SettingsPane;
}(React.Component);
SettingsPane.contextTypes = {
showInspectButton: React.PropTypes.bool.isRequired,
theme: React.PropTypes.object.isRequired
}, SettingsPane.propTypes = {
searchText: PropTypes.string,
selectFirstSearchResult: PropTypes.func,
onChangeSearch: PropTypes.func
};
var Wrapped = decorate({
listeners: function(props) {
return [ "isInspectEnabled", "searchText" ];
},
props: function(store) {
return {
isInspectEnabled: store.isInspectEnabled,
onChangeSearch: function(text) {
return store.changeSearch(text);
},
searchText: store.searchText,
selectFirstSearchResult: store.selectFirstSearchResult.bind(store),
showPreferencesPanel: function() {
store.showPreferencesPanel();
},
toggleInspectEnabled: function() {
return store.setInspectEnabled(!store.isInspectEnabled);
}
};
}
}, SettingsPane), ClearSearchButton = Hoverable(function(_ref) {
var isHovered = _ref.isHovered, onClick = _ref.onClick, onMouseEnter = _ref.onMouseEnter, onMouseLeave = _ref.onMouseLeave, theme = _ref.theme;
return React.createElement("div", {
onClick: onClick,
onMouseEnter: onMouseEnter,
onMouseLeave: onMouseLeave,
style: clearSearchButtonStyle(isHovered, theme)
}, "×");
}), InspectMenuButton = Hoverable(function(_ref2) {
var isHovered = _ref2.isHovered, isInspectEnabled = _ref2.isInspectEnabled, onClick = _ref2.onClick, onMouseEnter = _ref2.onMouseEnter, onMouseLeave = _ref2.onMouseLeave, theme = _ref2.theme;
return React.createElement("button", {
onClick: onClick,
onMouseEnter: onMouseEnter,
onMouseLeave: onMouseLeave,
style: inspectMenuButtonStyle(isInspectEnabled, isHovered, theme),
title: "Select a React element in the page to inspect it"
}, React.createElement(SvgIcon, {
path: Icons.INSPECT
}));
}), SettingsMenuButton = Hoverable(function(_ref3) {
var isHovered = _ref3.isHovered, onClick = _ref3.onClick, onMouseEnter = _ref3.onMouseEnter, onMouseLeave = _ref3.onMouseLeave, theme = _ref3.theme;
return React.createElement("button", {
onClick: onClick,
onMouseEnter: onMouseEnter,
onMouseLeave: onMouseLeave,
style: settingsMenuButtonStyle(isHovered, theme),
title: "Customize React DevTools"
}, React.createElement(SvgIcon, {
path: Icons.SETTINGS
}));
}), settingsPaneStyle = function(theme) {
return {
padding: "0.25rem",
display: "flex",
flexWrap: "wrap",
flexShrink: 0,
alignItems: "center",
position: "relative",
backgroundColor: theme.base01,
borderBottom: "1px solid " + theme.base03
};
}, clearSearchButtonStyle = function(isHovered, theme) {
return {
fontSize: sansSerif.sizes.large,
padding: "0 0.5rem",
position: "absolute",
cursor: "default",
right: 0,
lineHeight: "28px",
color: isHovered ? theme.base04 : theme.base02
};
}, inspectMenuButtonStyle = function(isInspectEnabled, isHovered, theme) {
var color = void 0;
return color = isInspectEnabled ? theme.state00 : isHovered ? theme.state06 : "inherit",
{
display: "flex",
background: "none",
border: "none",
outline: "none",
color: color
};
}, searchIconStyle = function(theme) {
return {
position: "absolute",
display: "inline-block",
pointerEvents: "none",
left: "0.25rem",
top: 0,
width: "1em",
height: "100%",
strokeWidth: 0,
stroke: theme.base02,
fill: theme.base02,
lineHeight: "28px",
fontSize: sansSerif.sizes.normal
};
}, settingsMenuButtonStyle = function(isHovered, theme) {
return {
display: "flex",
background: "none",
border: "none",
marginRight: "0.5rem",
color: isHovered ? theme.state06 : "inherit"
};
}, baseInputStyle = function(theme) {
return {
fontSize: sansSerif.sizes.normal,
padding: "0.25rem",
border: "1px solid " + theme.base02,
outline: "none",
borderRadius: "0.25rem",
paddingLeft: "1.25rem",
width: "150px"
};
}, highlightedInputStyle = function(theme) {
return _extends({}, baseInputStyle(theme), {
border: "1px solid " + hexToRgba(theme.state00, .75)
});
}, errorInputStyle = function(theme) {
return _extends({}, baseInputStyle(theme), {
backgroundColor: hexToRgba(theme.special03, .1),
border: "1px solid " + theme.special03
});
}, styles = {
growToFill: {
flexGrow: 1
},
searchInputWrapper: {
display: "flex",
alignItems: "center",
flexShrink: 0,
position: "relative"
}
};
module.exports = Wrapped;
}, function(module, exports, __webpack_require__) {
"use strict";
var decorate = __webpack_require__(38), SettingsCheckbox = __webpack_require__(217), Wrapped = decorate({
listeners: function() {
return [ "traceupdatesstatechange" ];
},
props: function(store) {
return {
state: store.traceupdatesState,
text: "Highlight Updates",
onChange: function(state) {
return store.changeTraceUpdates(state);
}
};
}
}, SettingsCheckbox);
module.exports = Wrapped;
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), React = __webpack_require__(6), immutable = __webpack_require__(218), _require = __webpack_require__(35), sansSerif = _require.sansSerif, StateRecord = immutable.Record({
enabled: !1
}), SettingsCheckbox = function(_React$Component) {
function SettingsCheckbox(props) {
_classCallCheck(this, SettingsCheckbox);
var _this = _possibleConstructorReturn(this, (SettingsCheckbox.__proto__ || Object.getPrototypeOf(SettingsCheckbox)).call(this, props));
return _this._toggle = _this._toggle.bind(_this), _this._defaultState = new StateRecord(),
_this;
}
return _inherits(SettingsCheckbox, _React$Component), _createClass(SettingsCheckbox, [ {
key: "componentDidMount",
value: function() {
!this.props.state !== this._defaultState && this.props.onChange(this._defaultState);
}
}, {
key: "render",
value: function() {
var state = this.props.state || this._defaultState;
return React.createElement("div", {
style: styles.container,
onClick: this._toggle,
tabIndex: 0
}, React.createElement("input", {
style: styles.checkbox,
type: "checkbox",
checked: state.enabled,
readOnly: !0
}), React.createElement("span", null, this.props.text));
}
}, {
key: "_toggle",
value: function() {
var state = this.props.state || this._defaultState, nextState = state.merge({
enabled: !state.enabled
});
this.props.onChange(nextState);
}
} ]), SettingsCheckbox;
}(React.Component), styles = {
checkbox: {
pointerEvents: "none",
marginRight: "5px"
},
container: {
WebkitUserSelect: "none",
cursor: "default",
display: "inline-block",
fontSize: sansSerif.sizes.normal,
outline: "none",
fontFamily: sansSerif.family,
userSelect: "none",
marginRight: "10px"
}
};
module.exports = SettingsCheckbox;
}, function(module, exports, __webpack_require__) {
!function(global, factory) {
module.exports = factory();
}(this, function() {
"use strict";
function createClass(ctor, superClass) {
superClass && (ctor.prototype = Object.create(superClass.prototype)), ctor.prototype.constructor = ctor;
}
function Iterable(value) {
return isIterable(value) ? value : Seq(value);
}
function KeyedIterable(value) {
return isKeyed(value) ? value : KeyedSeq(value);
}
function IndexedIterable(value) {
return isIndexed(value) ? value : IndexedSeq(value);
}
function SetIterable(value) {
return isIterable(value) && !isAssociative(value) ? value : SetSeq(value);
}
function isIterable(maybeIterable) {
return !(!maybeIterable || !maybeIterable[IS_ITERABLE_SENTINEL]);
}
function isKeyed(maybeKeyed) {
return !(!maybeKeyed || !maybeKeyed[IS_KEYED_SENTINEL]);
}
function isIndexed(maybeIndexed) {
return !(!maybeIndexed || !maybeIndexed[IS_INDEXED_SENTINEL]);
}
function isAssociative(maybeAssociative) {
return isKeyed(maybeAssociative) || isIndexed(maybeAssociative);
}
function isOrdered(maybeOrdered) {
return !(!maybeOrdered || !maybeOrdered[IS_ORDERED_SENTINEL]);
}
function MakeRef(ref) {
return ref.value = !1, ref;
}
function SetRef(ref) {
ref && (ref.value = !0);
}
function OwnerID() {}
function arrCopy(arr, offset) {
offset = offset || 0;
for (var len = Math.max(0, arr.length - offset), newArr = new Array(len), ii = 0; ii < len; ii++) newArr[ii] = arr[ii + offset];
return newArr;
}
function ensureSize(iter) {
return void 0 === iter.size && (iter.size = iter.__iterate(returnTrue)), iter.size;
}
function wrapIndex(iter, index) {
if ("number" != typeof index) {
var uint32Index = index >>> 0;
if ("" + uint32Index !== index || 4294967295 === uint32Index) return NaN;
index = uint32Index;
}
return index < 0 ? ensureSize(iter) + index : index;
}
function returnTrue() {
return !0;
}
function wholeSlice(begin, end, size) {
return (0 === begin || void 0 !== size && begin <= -size) && (void 0 === end || void 0 !== size && end >= size);
}
function resolveBegin(begin, size) {
return resolveIndex(begin, size, 0);
}
function resolveEnd(end, size) {
return resolveIndex(end, size, size);
}
function resolveIndex(index, size, defaultIndex) {
return void 0 === index ? defaultIndex : index < 0 ? Math.max(0, size + index) : void 0 === size ? index : Math.min(size, index);
}
function Iterator(next) {
this.next = next;
}
function iteratorValue(type, k, v, iteratorResult) {
var value = 0 === type ? k : 1 === type ? v : [ k, v ];
return iteratorResult ? iteratorResult.value = value : iteratorResult = {
value: value,
done: !1
}, iteratorResult;
}
function iteratorDone() {
return {
value: void 0,
done: !0
};
}
function hasIterator(maybeIterable) {
return !!getIteratorFn(maybeIterable);
}
function isIterator(maybeIterator) {
return maybeIterator && "function" == typeof maybeIterator.next;
}
function getIterator(iterable) {
var iteratorFn = getIteratorFn(iterable);
return iteratorFn && iteratorFn.call(iterable);
}
function getIteratorFn(iterable) {
var iteratorFn = iterable && (REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL] || iterable[FAUX_ITERATOR_SYMBOL]);
if ("function" == typeof iteratorFn) return iteratorFn;
}
function isArrayLike(value) {
return value && "number" == typeof value.length;
}
function Seq(value) {
return null === value || void 0 === value ? emptySequence() : isIterable(value) ? value.toSeq() : seqFromValue(value);
}
function KeyedSeq(value) {
return null === value || void 0 === value ? emptySequence().toKeyedSeq() : isIterable(value) ? isKeyed(value) ? value.toSeq() : value.fromEntrySeq() : keyedSeqFromValue(value);
}
function IndexedSeq(value) {
return null === value || void 0 === value ? emptySequence() : isIterable(value) ? isKeyed(value) ? value.entrySeq() : value.toIndexedSeq() : indexedSeqFromValue(value);
}
function SetSeq(value) {
return (null === value || void 0 === value ? emptySequence() : isIterable(value) ? isKeyed(value) ? value.entrySeq() : value : indexedSeqFromValue(value)).toSetSeq();
}
function ArraySeq(array) {
this._array = array, this.size = array.length;
}
function ObjectSeq(object) {
var keys = Object.keys(object);
this._object = object, this._keys = keys, this.size = keys.length;
}
function IterableSeq(iterable) {
this._iterable = iterable, this.size = iterable.length || iterable.size;
}
function IteratorSeq(iterator) {
this._iterator = iterator, this._iteratorCache = [];
}
function isSeq(maybeSeq) {
return !(!maybeSeq || !maybeSeq[IS_SEQ_SENTINEL]);
}
function emptySequence() {
return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([]));
}
function keyedSeqFromValue(value) {
var seq = Array.isArray(value) ? new ArraySeq(value).fromEntrySeq() : isIterator(value) ? new IteratorSeq(value).fromEntrySeq() : hasIterator(value) ? new IterableSeq(value).fromEntrySeq() : "object" == typeof value ? new ObjectSeq(value) : void 0;
if (!seq) throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: " + value);
return seq;
}
function indexedSeqFromValue(value) {
var seq = maybeIndexedSeqFromValue(value);
if (!seq) throw new TypeError("Expected Array or iterable object of values: " + value);
return seq;
}
function seqFromValue(value) {
var seq = maybeIndexedSeqFromValue(value) || "object" == typeof value && new ObjectSeq(value);
if (!seq) throw new TypeError("Expected Array or iterable object of values, or keyed object: " + value);
return seq;
}
function maybeIndexedSeqFromValue(value) {
return isArrayLike(value) ? new ArraySeq(value) : isIterator(value) ? new IteratorSeq(value) : hasIterator(value) ? new IterableSeq(value) : void 0;
}
function seqIterate(seq, fn, reverse, useKeys) {
var cache = seq._cache;
if (cache) {
for (var maxIndex = cache.length - 1, ii = 0; ii <= maxIndex; ii++) {
var entry = cache[reverse ? maxIndex - ii : ii];
if (fn(entry[1], useKeys ? entry[0] : ii, seq) === !1) return ii + 1;
}
return ii;
}
return seq.__iterateUncached(fn, reverse);
}
function seqIterator(seq, type, reverse, useKeys) {
var cache = seq._cache;
if (cache) {
var maxIndex = cache.length - 1, ii = 0;
return new Iterator(function() {
var entry = cache[reverse ? maxIndex - ii : ii];
return ii++ > maxIndex ? iteratorDone() : iteratorValue(type, useKeys ? entry[0] : ii - 1, entry[1]);
});
}
return seq.__iteratorUncached(type, reverse);
}
function fromJS(json, converter) {
return converter ? fromJSWith(converter, json, "", {
"": json
}) : fromJSDefault(json);
}
function fromJSWith(converter, json, key, parentJSON) {
return Array.isArray(json) ? converter.call(parentJSON, key, IndexedSeq(json).map(function(v, k) {
return fromJSWith(converter, v, k, json);
})) : isPlainObj(json) ? converter.call(parentJSON, key, KeyedSeq(json).map(function(v, k) {
return fromJSWith(converter, v, k, json);
})) : json;
}
function fromJSDefault(json) {
return Array.isArray(json) ? IndexedSeq(json).map(fromJSDefault).toList() : isPlainObj(json) ? KeyedSeq(json).map(fromJSDefault).toMap() : json;
}
function isPlainObj(value) {
return value && (value.constructor === Object || void 0 === value.constructor);
}
function is(valueA, valueB) {
if (valueA === valueB || valueA !== valueA && valueB !== valueB) return !0;
if (!valueA || !valueB) return !1;
if ("function" == typeof valueA.valueOf && "function" == typeof valueB.valueOf) {
if (valueA = valueA.valueOf(), valueB = valueB.valueOf(), valueA === valueB || valueA !== valueA && valueB !== valueB) return !0;
if (!valueA || !valueB) return !1;
}
return !("function" != typeof valueA.equals || "function" != typeof valueB.equals || !valueA.equals(valueB));
}
function deepEqual(a, b) {
if (a === b) return !0;
if (!isIterable(b) || void 0 !== a.size && void 0 !== b.size && a.size !== b.size || void 0 !== a.__hash && void 0 !== b.__hash && a.__hash !== b.__hash || isKeyed(a) !== isKeyed(b) || isIndexed(a) !== isIndexed(b) || isOrdered(a) !== isOrdered(b)) return !1;
if (0 === a.size && 0 === b.size) return !0;
var notAssociative = !isAssociative(a);
if (isOrdered(a)) {
var entries = a.entries();
return b.every(function(v, k) {
var entry = entries.next().value;
return entry && is(entry[1], v) && (notAssociative || is(entry[0], k));
}) && entries.next().done;
}
var flipped = !1;
if (void 0 === a.size) if (void 0 === b.size) "function" == typeof a.cacheResult && a.cacheResult(); else {
flipped = !0;
var _ = a;
a = b, b = _;
}
var allEqual = !0, bSize = b.__iterate(function(v, k) {
if (notAssociative ? !a.has(v) : flipped ? !is(v, a.get(k, NOT_SET)) : !is(a.get(k, NOT_SET), v)) return allEqual = !1,
!1;
});
return allEqual && a.size === bSize;
}
function Repeat(value, times) {
if (!(this instanceof Repeat)) return new Repeat(value, times);
if (this._value = value, this.size = void 0 === times ? 1 / 0 : Math.max(0, times),
0 === this.size) {
if (EMPTY_REPEAT) return EMPTY_REPEAT;
EMPTY_REPEAT = this;
}
}
function invariant(condition, error) {
if (!condition) throw new Error(error);
}
function Range(start, end, step) {
if (!(this instanceof Range)) return new Range(start, end, step);
if (invariant(0 !== step, "Cannot step a Range by 0"), start = start || 0, void 0 === end && (end = 1 / 0),
step = void 0 === step ? 1 : Math.abs(step), end < start && (step = -step), this._start = start,
this._end = end, this._step = step, this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1),
0 === this.size) {
if (EMPTY_RANGE) return EMPTY_RANGE;
EMPTY_RANGE = this;
}
}
function Collection() {
throw TypeError("Abstract");
}
function KeyedCollection() {}
function IndexedCollection() {}
function SetCollection() {}
function smi(i32) {
return i32 >>> 1 & 1073741824 | 3221225471 & i32;
}
function hash(o) {
if (o === !1 || null === o || void 0 === o) return 0;
if ("function" == typeof o.valueOf && (o = o.valueOf(), o === !1 || null === o || void 0 === o)) return 0;
if (o === !0) return 1;
var type = typeof o;
if ("number" === type) {
var h = 0 | o;
for (h !== o && (h ^= 4294967295 * o); o > 4294967295; ) o /= 4294967295, h ^= o;
return smi(h);
}
if ("string" === type) return o.length > STRING_HASH_CACHE_MIN_STRLEN ? cachedHashString(o) : hashString(o);
if ("function" == typeof o.hashCode) return o.hashCode();
if ("object" === type) return hashJSObj(o);
if ("function" == typeof o.toString) return hashString(o.toString());
throw new Error("Value type " + type + " cannot be hashed.");
}
function cachedHashString(string) {
var hash = stringHashCache[string];
return void 0 === hash && (hash = hashString(string), STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE && (STRING_HASH_CACHE_SIZE = 0,
stringHashCache = {}), STRING_HASH_CACHE_SIZE++, stringHashCache[string] = hash),
hash;
}
function hashString(string) {
for (var hash = 0, ii = 0; ii < string.length; ii++) hash = 31 * hash + string.charCodeAt(ii) | 0;
return smi(hash);
}
function hashJSObj(obj) {
var hash;
if (usingWeakMap && (hash = weakMap.get(obj), void 0 !== hash)) return hash;
if (hash = obj[UID_HASH_KEY], void 0 !== hash) return hash;
if (!canDefineProperty) {
if (hash = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY], void 0 !== hash) return hash;
if (hash = getIENodeHash(obj), void 0 !== hash) return hash;
}
if (hash = ++objHashUID, 1073741824 & objHashUID && (objHashUID = 0), usingWeakMap) weakMap.set(obj, hash); else {
if (void 0 !== isExtensible && isExtensible(obj) === !1) throw new Error("Non-extensible objects are not allowed as keys.");
if (canDefineProperty) Object.defineProperty(obj, UID_HASH_KEY, {
enumerable: !1,
configurable: !1,
writable: !1,
value: hash
}); else if (void 0 !== obj.propertyIsEnumerable && obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable) obj.propertyIsEnumerable = function() {
return this.constructor.prototype.propertyIsEnumerable.apply(this, arguments);
}, obj.propertyIsEnumerable[UID_HASH_KEY] = hash; else {
if (void 0 === obj.nodeType) throw new Error("Unable to set a non-enumerable property on object.");
obj[UID_HASH_KEY] = hash;
}
}
return hash;
}
function getIENodeHash(node) {
if (node && node.nodeType > 0) switch (node.nodeType) {
case 1:
return node.uniqueID;
case 9:
return node.documentElement && node.documentElement.uniqueID;
}
}
function assertNotInfinite(size) {
invariant(size !== 1 / 0, "Cannot perform this action with an infinite size.");
}
function Map(value) {
return null === value || void 0 === value ? emptyMap() : isMap(value) && !isOrdered(value) ? value : emptyMap().withMutations(function(map) {
var iter = KeyedIterable(value);
assertNotInfinite(iter.size), iter.forEach(function(v, k) {
return map.set(k, v);
});
});
}
function isMap(maybeMap) {
return !(!maybeMap || !maybeMap[IS_MAP_SENTINEL]);
}
function ArrayMapNode(ownerID, entries) {
this.ownerID = ownerID, this.entries = entries;
}
function BitmapIndexedNode(ownerID, bitmap, nodes) {
this.ownerID = ownerID, this.bitmap = bitmap, this.nodes = nodes;
}
function HashArrayMapNode(ownerID, count, nodes) {
this.ownerID = ownerID, this.count = count, this.nodes = nodes;
}
function HashCollisionNode(ownerID, keyHash, entries) {
this.ownerID = ownerID, this.keyHash = keyHash, this.entries = entries;
}
function ValueNode(ownerID, keyHash, entry) {
this.ownerID = ownerID, this.keyHash = keyHash, this.entry = entry;
}
function MapIterator(map, type, reverse) {
this._type = type, this._reverse = reverse, this._stack = map._root && mapIteratorFrame(map._root);
}
function mapIteratorValue(type, entry) {
return iteratorValue(type, entry[0], entry[1]);
}
function mapIteratorFrame(node, prev) {
return {
node: node,
index: 0,
__prev: prev
};
}
function makeMap(size, root, ownerID, hash) {
var map = Object.create(MapPrototype);
return map.size = size, map._root = root, map.__ownerID = ownerID, map.__hash = hash,
map.__altered = !1, map;
}
function emptyMap() {
return EMPTY_MAP || (EMPTY_MAP = makeMap(0));
}
function updateMap(map, k, v) {
var newRoot, newSize;
if (map._root) {
var didChangeSize = MakeRef(CHANGE_LENGTH), didAlter = MakeRef(DID_ALTER);
if (newRoot = updateNode(map._root, map.__ownerID, 0, void 0, k, v, didChangeSize, didAlter),
!didAlter.value) return map;
newSize = map.size + (didChangeSize.value ? v === NOT_SET ? -1 : 1 : 0);
} else {
if (v === NOT_SET) return map;
newSize = 1, newRoot = new ArrayMapNode(map.__ownerID, [ [ k, v ] ]);
}
return map.__ownerID ? (map.size = newSize, map._root = newRoot, map.__hash = void 0,
map.__altered = !0, map) : newRoot ? makeMap(newSize, newRoot) : emptyMap();
}
function updateNode(node, ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
return node ? node.update(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) : value === NOT_SET ? node : (SetRef(didAlter),
SetRef(didChangeSize), new ValueNode(ownerID, keyHash, [ key, value ]));
}
function isLeafNode(node) {
return node.constructor === ValueNode || node.constructor === HashCollisionNode;
}
function mergeIntoNode(node, ownerID, shift, keyHash, entry) {
if (node.keyHash === keyHash) return new HashCollisionNode(ownerID, keyHash, [ node.entry, entry ]);
var newNode, idx1 = (0 === shift ? node.keyHash : node.keyHash >>> shift) & MASK, idx2 = (0 === shift ? keyHash : keyHash >>> shift) & MASK, nodes = idx1 === idx2 ? [ mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry) ] : (newNode = new ValueNode(ownerID, keyHash, entry),
idx1 < idx2 ? [ node, newNode ] : [ newNode, node ]);
return new BitmapIndexedNode(ownerID, 1 << idx1 | 1 << idx2, nodes);
}
function createNodes(ownerID, entries, key, value) {
ownerID || (ownerID = new OwnerID());
for (var node = new ValueNode(ownerID, hash(key), [ key, value ]), ii = 0; ii < entries.length; ii++) {
var entry = entries[ii];
node = node.update(ownerID, 0, void 0, entry[0], entry[1]);
}
return node;
}
function packNodes(ownerID, nodes, count, excluding) {
for (var bitmap = 0, packedII = 0, packedNodes = new Array(count), ii = 0, bit = 1, len = nodes.length; ii < len; ii++,
bit <<= 1) {
var node = nodes[ii];
void 0 !== node && ii !== excluding && (bitmap |= bit, packedNodes[packedII++] = node);
}
return new BitmapIndexedNode(ownerID, bitmap, packedNodes);
}
function expandNodes(ownerID, nodes, bitmap, including, node) {
for (var count = 0, expandedNodes = new Array(SIZE), ii = 0; 0 !== bitmap; ii++,
bitmap >>>= 1) expandedNodes[ii] = 1 & bitmap ? nodes[count++] : void 0;
return expandedNodes[including] = node, new HashArrayMapNode(ownerID, count + 1, expandedNodes);
}
function mergeIntoMapWith(map, merger, iterables) {
for (var iters = [], ii = 0; ii < iterables.length; ii++) {
var value = iterables[ii], iter = KeyedIterable(value);
isIterable(value) || (iter = iter.map(function(v) {
return fromJS(v);
})), iters.push(iter);
}
return mergeIntoCollectionWith(map, merger, iters);
}
function deepMerger(existing, value, key) {
return existing && existing.mergeDeep && isIterable(value) ? existing.mergeDeep(value) : is(existing, value) ? existing : value;
}
function deepMergerWith(merger) {
return function(existing, value, key) {
if (existing && existing.mergeDeepWith && isIterable(value)) return existing.mergeDeepWith(merger, value);
var nextValue = merger(existing, value, key);
return is(existing, nextValue) ? existing : nextValue;
};
}
function mergeIntoCollectionWith(collection, merger, iters) {
return iters = iters.filter(function(x) {
return 0 !== x.size;
}), 0 === iters.length ? collection : 0 !== collection.size || collection.__ownerID || 1 !== iters.length ? collection.withMutations(function(collection) {
for (var mergeIntoMap = merger ? function(value, key) {
collection.update(key, NOT_SET, function(existing) {
return existing === NOT_SET ? value : merger(existing, value, key);
});
} : function(value, key) {
collection.set(key, value);
}, ii = 0; ii < iters.length; ii++) iters[ii].forEach(mergeIntoMap);
}) : collection.constructor(iters[0]);
}
function updateInDeepMap(existing, keyPathIter, notSetValue, updater) {
var isNotSet = existing === NOT_SET, step = keyPathIter.next();
if (step.done) {
var existingValue = isNotSet ? notSetValue : existing, newValue = updater(existingValue);
return newValue === existingValue ? existing : newValue;
}
invariant(isNotSet || existing && existing.set, "invalid keyPath");
var key = step.value, nextExisting = isNotSet ? NOT_SET : existing.get(key, NOT_SET), nextUpdated = updateInDeepMap(nextExisting, keyPathIter, notSetValue, updater);
return nextUpdated === nextExisting ? existing : nextUpdated === NOT_SET ? existing.remove(key) : (isNotSet ? emptyMap() : existing).set(key, nextUpdated);
}
function popCount(x) {
return x -= x >> 1 & 1431655765, x = (858993459 & x) + (x >> 2 & 858993459), x = x + (x >> 4) & 252645135,
x += x >> 8, x += x >> 16, 127 & x;
}
function setIn(array, idx, val, canEdit) {
var newArray = canEdit ? array : arrCopy(array);
return newArray[idx] = val, newArray;
}
function spliceIn(array, idx, val, canEdit) {
var newLen = array.length + 1;
if (canEdit && idx + 1 === newLen) return array[idx] = val, array;
for (var newArray = new Array(newLen), after = 0, ii = 0; ii < newLen; ii++) ii === idx ? (newArray[ii] = val,
after = -1) : newArray[ii] = array[ii + after];
return newArray;
}
function spliceOut(array, idx, canEdit) {
var newLen = array.length - 1;
if (canEdit && idx === newLen) return array.pop(), array;
for (var newArray = new Array(newLen), after = 0, ii = 0; ii < newLen; ii++) ii === idx && (after = 1),
newArray[ii] = array[ii + after];
return newArray;
}
function List(value) {
var empty = emptyList();
if (null === value || void 0 === value) return empty;
if (isList(value)) return value;
var iter = IndexedIterable(value), size = iter.size;
return 0 === size ? empty : (assertNotInfinite(size), size > 0 && size < SIZE ? makeList(0, size, SHIFT, null, new VNode(iter.toArray())) : empty.withMutations(function(list) {
list.setSize(size), iter.forEach(function(v, i) {
return list.set(i, v);
});
}));
}
function isList(maybeList) {
return !(!maybeList || !maybeList[IS_LIST_SENTINEL]);
}
function VNode(array, ownerID) {
this.array = array, this.ownerID = ownerID;
}
function iterateList(list, reverse) {
function iterateNodeOrLeaf(node, level, offset) {
return 0 === level ? iterateLeaf(node, offset) : iterateNode(node, level, offset);
}
function iterateLeaf(node, offset) {
var array = offset === tailPos ? tail && tail.array : node && node.array, from = offset > left ? 0 : left - offset, to = right - offset;
return to > SIZE && (to = SIZE), function() {
if (from === to) return DONE;
var idx = reverse ? --to : from++;
return array && array[idx];
};
}
function iterateNode(node, level, offset) {
var values, array = node && node.array, from = offset > left ? 0 : left - offset >> level, to = (right - offset >> level) + 1;
return to > SIZE && (to = SIZE), function() {
for (;;) {
if (values) {
var value = values();
if (value !== DONE) return value;
values = null;
}
if (from === to) return DONE;
var idx = reverse ? --to : from++;
values = iterateNodeOrLeaf(array && array[idx], level - SHIFT, offset + (idx << level));
}
};
}
var left = list._origin, right = list._capacity, tailPos = getTailOffset(right), tail = list._tail;
return iterateNodeOrLeaf(list._root, list._level, 0);
}
function makeList(origin, capacity, level, root, tail, ownerID, hash) {
var list = Object.create(ListPrototype);
return list.size = capacity - origin, list._origin = origin, list._capacity = capacity,
list._level = level, list._root = root, list._tail = tail, list.__ownerID = ownerID,
list.__hash = hash, list.__altered = !1, list;
}
function emptyList() {
return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT));
}
function updateList(list, index, value) {
if (index = wrapIndex(list, index), index !== index) return list;
if (index >= list.size || index < 0) return list.withMutations(function(list) {
index < 0 ? setListBounds(list, index).set(0, value) : setListBounds(list, 0, index + 1).set(index, value);
});
index += list._origin;
var newTail = list._tail, newRoot = list._root, didAlter = MakeRef(DID_ALTER);
return index >= getTailOffset(list._capacity) ? newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter) : newRoot = updateVNode(newRoot, list.__ownerID, list._level, index, value, didAlter),
didAlter.value ? list.__ownerID ? (list._root = newRoot, list._tail = newTail, list.__hash = void 0,
list.__altered = !0, list) : makeList(list._origin, list._capacity, list._level, newRoot, newTail) : list;
}
function updateVNode(node, ownerID, level, index, value, didAlter) {
var idx = index >>> level & MASK, nodeHas = node && idx < node.array.length;
if (!nodeHas && void 0 === value) return node;
var newNode;
if (level > 0) {
var lowerNode = node && node.array[idx], newLowerNode = updateVNode(lowerNode, ownerID, level - SHIFT, index, value, didAlter);
return newLowerNode === lowerNode ? node : (newNode = editableVNode(node, ownerID),
newNode.array[idx] = newLowerNode, newNode);
}
return nodeHas && node.array[idx] === value ? node : (SetRef(didAlter), newNode = editableVNode(node, ownerID),
void 0 === value && idx === newNode.array.length - 1 ? newNode.array.pop() : newNode.array[idx] = value,
newNode);
}
function editableVNode(node, ownerID) {
return ownerID && node && ownerID === node.ownerID ? node : new VNode(node ? node.array.slice() : [], ownerID);
}
function listNodeFor(list, rawIndex) {
if (rawIndex >= getTailOffset(list._capacity)) return list._tail;
if (rawIndex < 1 << list._level + SHIFT) {
for (var node = list._root, level = list._level; node && level > 0; ) node = node.array[rawIndex >>> level & MASK],
level -= SHIFT;
return node;
}
}
function setListBounds(list, begin, end) {
void 0 !== begin && (begin = 0 | begin), void 0 !== end && (end = 0 | end);
var owner = list.__ownerID || new OwnerID(), oldOrigin = list._origin, oldCapacity = list._capacity, newOrigin = oldOrigin + begin, newCapacity = void 0 === end ? oldCapacity : end < 0 ? oldCapacity + end : oldOrigin + end;
if (newOrigin === oldOrigin && newCapacity === oldCapacity) return list;
if (newOrigin >= newCapacity) return list.clear();
for (var newLevel = list._level, newRoot = list._root, offsetShift = 0; newOrigin + offsetShift < 0; ) newRoot = new VNode(newRoot && newRoot.array.length ? [ void 0, newRoot ] : [], owner),
newLevel += SHIFT, offsetShift += 1 << newLevel;
offsetShift && (newOrigin += offsetShift, oldOrigin += offsetShift, newCapacity += offsetShift,
oldCapacity += offsetShift);
for (var oldTailOffset = getTailOffset(oldCapacity), newTailOffset = getTailOffset(newCapacity); newTailOffset >= 1 << newLevel + SHIFT; ) newRoot = new VNode(newRoot && newRoot.array.length ? [ newRoot ] : [], owner),
newLevel += SHIFT;
var oldTail = list._tail, newTail = newTailOffset < oldTailOffset ? listNodeFor(list, newCapacity - 1) : newTailOffset > oldTailOffset ? new VNode([], owner) : oldTail;
if (oldTail && newTailOffset > oldTailOffset && newOrigin < oldCapacity && oldTail.array.length) {
newRoot = editableVNode(newRoot, owner);
for (var node = newRoot, level = newLevel; level > SHIFT; level -= SHIFT) {
var idx = oldTailOffset >>> level & MASK;
node = node.array[idx] = editableVNode(node.array[idx], owner);
}
node.array[oldTailOffset >>> SHIFT & MASK] = oldTail;
}
if (newCapacity < oldCapacity && (newTail = newTail && newTail.removeAfter(owner, 0, newCapacity)),
newOrigin >= newTailOffset) newOrigin -= newTailOffset, newCapacity -= newTailOffset,
newLevel = SHIFT, newRoot = null, newTail = newTail && newTail.removeBefore(owner, 0, newOrigin); else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) {
for (offsetShift = 0; newRoot; ) {
var beginIndex = newOrigin >>> newLevel & MASK;
if (beginIndex !== newTailOffset >>> newLevel & MASK) break;
beginIndex && (offsetShift += (1 << newLevel) * beginIndex), newLevel -= SHIFT,
newRoot = newRoot.array[beginIndex];
}
newRoot && newOrigin > oldOrigin && (newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift)),
newRoot && newTailOffset < oldTailOffset && (newRoot = newRoot.removeAfter(owner, newLevel, newTailOffset - offsetShift)),
offsetShift && (newOrigin -= offsetShift, newCapacity -= offsetShift);
}
return list.__ownerID ? (list.size = newCapacity - newOrigin, list._origin = newOrigin,
list._capacity = newCapacity, list._level = newLevel, list._root = newRoot, list._tail = newTail,
list.__hash = void 0, list.__altered = !0, list) : makeList(newOrigin, newCapacity, newLevel, newRoot, newTail);
}
function mergeIntoListWith(list, merger, iterables) {
for (var iters = [], maxSize = 0, ii = 0; ii < iterables.length; ii++) {
var value = iterables[ii], iter = IndexedIterable(value);
iter.size > maxSize && (maxSize = iter.size), isIterable(value) || (iter = iter.map(function(v) {
return fromJS(v);
})), iters.push(iter);
}
return maxSize > list.size && (list = list.setSize(maxSize)), mergeIntoCollectionWith(list, merger, iters);
}
function getTailOffset(size) {
return size < SIZE ? 0 : size - 1 >>> SHIFT << SHIFT;
}
function OrderedMap(value) {
return null === value || void 0 === value ? emptyOrderedMap() : isOrderedMap(value) ? value : emptyOrderedMap().withMutations(function(map) {
var iter = KeyedIterable(value);
assertNotInfinite(iter.size), iter.forEach(function(v, k) {
return map.set(k, v);
});
});
}
function isOrderedMap(maybeOrderedMap) {
return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap);
}
function makeOrderedMap(map, list, ownerID, hash) {
var omap = Object.create(OrderedMap.prototype);
return omap.size = map ? map.size : 0, omap._map = map, omap._list = list, omap.__ownerID = ownerID,
omap.__hash = hash, omap;
}
function emptyOrderedMap() {
return EMPTY_ORDERED_MAP || (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList()));
}
function updateOrderedMap(omap, k, v) {
var newMap, newList, map = omap._map, list = omap._list, i = map.get(k), has = void 0 !== i;
if (v === NOT_SET) {
if (!has) return omap;
list.size >= SIZE && list.size >= 2 * map.size ? (newList = list.filter(function(entry, idx) {
return void 0 !== entry && i !== idx;
}), newMap = newList.toKeyedSeq().map(function(entry) {
return entry[0];
}).flip().toMap(), omap.__ownerID && (newMap.__ownerID = newList.__ownerID = omap.__ownerID)) : (newMap = map.remove(k),
newList = i === list.size - 1 ? list.pop() : list.set(i, void 0));
} else if (has) {
if (v === list.get(i)[1]) return omap;
newMap = map, newList = list.set(i, [ k, v ]);
} else newMap = map.set(k, list.size), newList = list.set(list.size, [ k, v ]);
return omap.__ownerID ? (omap.size = newMap.size, omap._map = newMap, omap._list = newList,
omap.__hash = void 0, omap) : makeOrderedMap(newMap, newList);
}
function ToKeyedSequence(indexed, useKeys) {
this._iter = indexed, this._useKeys = useKeys, this.size = indexed.size;
}
function ToIndexedSequence(iter) {
this._iter = iter, this.size = iter.size;
}
function ToSetSequence(iter) {
this._iter = iter, this.size = iter.size;
}
function FromEntriesSequence(entries) {
this._iter = entries, this.size = entries.size;
}
function flipFactory(iterable) {
var flipSequence = makeSequence(iterable);
return flipSequence._iter = iterable, flipSequence.size = iterable.size, flipSequence.flip = function() {
return iterable;
}, flipSequence.reverse = function() {
var reversedSequence = iterable.reverse.apply(this);
return reversedSequence.flip = function() {
return iterable.reverse();
}, reversedSequence;
}, flipSequence.has = function(key) {
return iterable.includes(key);
}, flipSequence.includes = function(key) {
return iterable.has(key);
}, flipSequence.cacheResult = cacheResultThrough, flipSequence.__iterateUncached = function(fn, reverse) {
var this$0 = this;
return iterable.__iterate(function(v, k) {
return fn(k, v, this$0) !== !1;
}, reverse);
}, flipSequence.__iteratorUncached = function(type, reverse) {
if (type === ITERATE_ENTRIES) {
var iterator = iterable.__iterator(type, reverse);
return new Iterator(function() {
var step = iterator.next();
if (!step.done) {
var k = step.value[0];
step.value[0] = step.value[1], step.value[1] = k;
}
return step;
});
}
return iterable.__iterator(type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES, reverse);
}, flipSequence;
}
function mapFactory(iterable, mapper, context) {
var mappedSequence = makeSequence(iterable);
return mappedSequence.size = iterable.size, mappedSequence.has = function(key) {
return iterable.has(key);
}, mappedSequence.get = function(key, notSetValue) {
var v = iterable.get(key, NOT_SET);
return v === NOT_SET ? notSetValue : mapper.call(context, v, key, iterable);
}, mappedSequence.__iterateUncached = function(fn, reverse) {
var this$0 = this;
return iterable.__iterate(function(v, k, c) {
return fn(mapper.call(context, v, k, c), k, this$0) !== !1;
}, reverse);
}, mappedSequence.__iteratorUncached = function(type, reverse) {
var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);
return new Iterator(function() {
var step = iterator.next();
if (step.done) return step;
var entry = step.value, key = entry[0];
return iteratorValue(type, key, mapper.call(context, entry[1], key, iterable), step);
});
}, mappedSequence;
}
function reverseFactory(iterable, useKeys) {
var reversedSequence = makeSequence(iterable);
return reversedSequence._iter = iterable, reversedSequence.size = iterable.size,
reversedSequence.reverse = function() {
return iterable;
}, iterable.flip && (reversedSequence.flip = function() {
var flipSequence = flipFactory(iterable);
return flipSequence.reverse = function() {
return iterable.flip();
}, flipSequence;
}), reversedSequence.get = function(key, notSetValue) {
return iterable.get(useKeys ? key : -1 - key, notSetValue);
}, reversedSequence.has = function(key) {
return iterable.has(useKeys ? key : -1 - key);
}, reversedSequence.includes = function(value) {
return iterable.includes(value);
}, reversedSequence.cacheResult = cacheResultThrough, reversedSequence.__iterate = function(fn, reverse) {
var this$0 = this;
return iterable.__iterate(function(v, k) {
return fn(v, k, this$0);
}, !reverse);
}, reversedSequence.__iterator = function(type, reverse) {
return iterable.__iterator(type, !reverse);
}, reversedSequence;
}
function filterFactory(iterable, predicate, context, useKeys) {
var filterSequence = makeSequence(iterable);
return useKeys && (filterSequence.has = function(key) {
var v = iterable.get(key, NOT_SET);
return v !== NOT_SET && !!predicate.call(context, v, key, iterable);
}, filterSequence.get = function(key, notSetValue) {
var v = iterable.get(key, NOT_SET);
return v !== NOT_SET && predicate.call(context, v, key, iterable) ? v : notSetValue;
}), filterSequence.__iterateUncached = function(fn, reverse) {
var this$0 = this, iterations = 0;
return iterable.__iterate(function(v, k, c) {
if (predicate.call(context, v, k, c)) return iterations++, fn(v, useKeys ? k : iterations - 1, this$0);
}, reverse), iterations;
}, filterSequence.__iteratorUncached = function(type, reverse) {
var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse), iterations = 0;
return new Iterator(function() {
for (;;) {
var step = iterator.next();
if (step.done) return step;
var entry = step.value, key = entry[0], value = entry[1];
if (predicate.call(context, value, key, iterable)) return iteratorValue(type, useKeys ? key : iterations++, value, step);
}
});
}, filterSequence;
}
function countByFactory(iterable, grouper, context) {
var groups = Map().asMutable();
return iterable.__iterate(function(v, k) {
groups.update(grouper.call(context, v, k, iterable), 0, function(a) {
return a + 1;
});
}), groups.asImmutable();
}
function groupByFactory(iterable, grouper, context) {
var isKeyedIter = isKeyed(iterable), groups = (isOrdered(iterable) ? OrderedMap() : Map()).asMutable();
iterable.__iterate(function(v, k) {
groups.update(grouper.call(context, v, k, iterable), function(a) {
return a = a || [], a.push(isKeyedIter ? [ k, v ] : v), a;
});
});
var coerce = iterableClass(iterable);
return groups.map(function(arr) {
return reify(iterable, coerce(arr));
});
}
function sliceFactory(iterable, begin, end, useKeys) {
var originalSize = iterable.size;
if (void 0 !== begin && (begin = 0 | begin), void 0 !== end && (end = 0 | end),
wholeSlice(begin, end, originalSize)) return iterable;
var resolvedBegin = resolveBegin(begin, originalSize), resolvedEnd = resolveEnd(end, originalSize);
if (resolvedBegin !== resolvedBegin || resolvedEnd !== resolvedEnd) return sliceFactory(iterable.toSeq().cacheResult(), begin, end, useKeys);
var sliceSize, resolvedSize = resolvedEnd - resolvedBegin;
resolvedSize === resolvedSize && (sliceSize = resolvedSize < 0 ? 0 : resolvedSize);
var sliceSeq = makeSequence(iterable);
return sliceSeq.size = 0 === sliceSize ? sliceSize : iterable.size && sliceSize || void 0,
!useKeys && isSeq(iterable) && sliceSize >= 0 && (sliceSeq.get = function(index, notSetValue) {
return index = wrapIndex(this, index), index >= 0 && index < sliceSize ? iterable.get(index + resolvedBegin, notSetValue) : notSetValue;
}), sliceSeq.__iterateUncached = function(fn, reverse) {
var this$0 = this;
if (0 === sliceSize) return 0;
if (reverse) return this.cacheResult().__iterate(fn, reverse);
var skipped = 0, isSkipping = !0, iterations = 0;
return iterable.__iterate(function(v, k) {
if (!isSkipping || !(isSkipping = skipped++ < resolvedBegin)) return iterations++,
fn(v, useKeys ? k : iterations - 1, this$0) !== !1 && iterations !== sliceSize;
}), iterations;
}, sliceSeq.__iteratorUncached = function(type, reverse) {
if (0 !== sliceSize && reverse) return this.cacheResult().__iterator(type, reverse);
var iterator = 0 !== sliceSize && iterable.__iterator(type, reverse), skipped = 0, iterations = 0;
return new Iterator(function() {
for (;skipped++ < resolvedBegin; ) iterator.next();
if (++iterations > sliceSize) return iteratorDone();
var step = iterator.next();
return useKeys || type === ITERATE_VALUES ? step : type === ITERATE_KEYS ? iteratorValue(type, iterations - 1, void 0, step) : iteratorValue(type, iterations - 1, step.value[1], step);
});
}, sliceSeq;
}
function takeWhileFactory(iterable, predicate, context) {
var takeSequence = makeSequence(iterable);
return takeSequence.__iterateUncached = function(fn, reverse) {
var this$0 = this;
if (reverse) return this.cacheResult().__iterate(fn, reverse);
var iterations = 0;
return iterable.__iterate(function(v, k, c) {
return predicate.call(context, v, k, c) && ++iterations && fn(v, k, this$0);
}), iterations;
}, takeSequence.__iteratorUncached = function(type, reverse) {
var this$0 = this;
if (reverse) return this.cacheResult().__iterator(type, reverse);
var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse), iterating = !0;
return new Iterator(function() {
if (!iterating) return iteratorDone();
var step = iterator.next();
if (step.done) return step;
var entry = step.value, k = entry[0], v = entry[1];
return predicate.call(context, v, k, this$0) ? type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step) : (iterating = !1,
iteratorDone());
});
}, takeSequence;
}
function skipWhileFactory(iterable, predicate, context, useKeys) {
var skipSequence = makeSequence(iterable);
return skipSequence.__iterateUncached = function(fn, reverse) {
var this$0 = this;
if (reverse) return this.cacheResult().__iterate(fn, reverse);
var isSkipping = !0, iterations = 0;
return iterable.__iterate(function(v, k, c) {
if (!isSkipping || !(isSkipping = predicate.call(context, v, k, c))) return iterations++,
fn(v, useKeys ? k : iterations - 1, this$0);
}), iterations;
}, skipSequence.__iteratorUncached = function(type, reverse) {
var this$0 = this;
if (reverse) return this.cacheResult().__iterator(type, reverse);
var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse), skipping = !0, iterations = 0;
return new Iterator(function() {
var step, k, v;
do {
if (step = iterator.next(), step.done) return useKeys || type === ITERATE_VALUES ? step : type === ITERATE_KEYS ? iteratorValue(type, iterations++, void 0, step) : iteratorValue(type, iterations++, step.value[1], step);
var entry = step.value;
k = entry[0], v = entry[1], skipping && (skipping = predicate.call(context, v, k, this$0));
} while (skipping);
return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step);
});
}, skipSequence;
}
function concatFactory(iterable, values) {
var isKeyedIterable = isKeyed(iterable), iters = [ iterable ].concat(values).map(function(v) {
return isIterable(v) ? isKeyedIterable && (v = KeyedIterable(v)) : v = isKeyedIterable ? keyedSeqFromValue(v) : indexedSeqFromValue(Array.isArray(v) ? v : [ v ]),
v;
}).filter(function(v) {
return 0 !== v.size;
});
if (0 === iters.length) return iterable;
if (1 === iters.length) {
var singleton = iters[0];
if (singleton === iterable || isKeyedIterable && isKeyed(singleton) || isIndexed(iterable) && isIndexed(singleton)) return singleton;
}
var concatSeq = new ArraySeq(iters);
return isKeyedIterable ? concatSeq = concatSeq.toKeyedSeq() : isIndexed(iterable) || (concatSeq = concatSeq.toSetSeq()),
concatSeq = concatSeq.flatten(!0), concatSeq.size = iters.reduce(function(sum, seq) {
if (void 0 !== sum) {
var size = seq.size;
if (void 0 !== size) return sum + size;
}
}, 0), concatSeq;
}
function flattenFactory(iterable, depth, useKeys) {
var flatSequence = makeSequence(iterable);
return flatSequence.__iterateUncached = function(fn, reverse) {
function flatDeep(iter, currentDepth) {
var this$0 = this;
iter.__iterate(function(v, k) {
return (!depth || currentDepth < depth) && isIterable(v) ? flatDeep(v, currentDepth + 1) : fn(v, useKeys ? k : iterations++, this$0) === !1 && (stopped = !0),
!stopped;
}, reverse);
}
var iterations = 0, stopped = !1;
return flatDeep(iterable, 0), iterations;
}, flatSequence.__iteratorUncached = function(type, reverse) {
var iterator = iterable.__iterator(type, reverse), stack = [], iterations = 0;
return new Iterator(function() {
for (;iterator; ) {
var step = iterator.next();
if (step.done === !1) {
var v = step.value;
if (type === ITERATE_ENTRIES && (v = v[1]), depth && !(stack.length < depth) || !isIterable(v)) return useKeys ? step : iteratorValue(type, iterations++, v, step);
stack.push(iterator), iterator = v.__iterator(type, reverse);
} else iterator = stack.pop();
}
return iteratorDone();
});
}, flatSequence;
}
function flatMapFactory(iterable, mapper, context) {
var coerce = iterableClass(iterable);
return iterable.toSeq().map(function(v, k) {
return coerce(mapper.call(context, v, k, iterable));
}).flatten(!0);
}
function interposeFactory(iterable, separator) {
var interposedSequence = makeSequence(iterable);
return interposedSequence.size = iterable.size && 2 * iterable.size - 1, interposedSequence.__iterateUncached = function(fn, reverse) {
var this$0 = this, iterations = 0;
return iterable.__iterate(function(v, k) {
return (!iterations || fn(separator, iterations++, this$0) !== !1) && fn(v, iterations++, this$0) !== !1;
}, reverse), iterations;
}, interposedSequence.__iteratorUncached = function(type, reverse) {
var step, iterator = iterable.__iterator(ITERATE_VALUES, reverse), iterations = 0;
return new Iterator(function() {
return (!step || iterations % 2) && (step = iterator.next(), step.done) ? step : iterations % 2 ? iteratorValue(type, iterations++, separator) : iteratorValue(type, iterations++, step.value, step);
});
}, interposedSequence;
}
function sortFactory(iterable, comparator, mapper) {
comparator || (comparator = defaultComparator);
var isKeyedIterable = isKeyed(iterable), index = 0, entries = iterable.toSeq().map(function(v, k) {
return [ k, v, index++, mapper ? mapper(v, k, iterable) : v ];
}).toArray();
return entries.sort(function(a, b) {
return comparator(a[3], b[3]) || a[2] - b[2];
}).forEach(isKeyedIterable ? function(v, i) {
entries[i].length = 2;
} : function(v, i) {
entries[i] = v[1];
}), isKeyedIterable ? KeyedSeq(entries) : isIndexed(iterable) ? IndexedSeq(entries) : SetSeq(entries);
}
function maxFactory(iterable, comparator, mapper) {
if (comparator || (comparator = defaultComparator), mapper) {
var entry = iterable.toSeq().map(function(v, k) {
return [ v, mapper(v, k, iterable) ];
}).reduce(function(a, b) {
return maxCompare(comparator, a[1], b[1]) ? b : a;
});
return entry && entry[0];
}
return iterable.reduce(function(a, b) {
return maxCompare(comparator, a, b) ? b : a;
});
}
function maxCompare(comparator, a, b) {
var comp = comparator(b, a);
return 0 === comp && b !== a && (void 0 === b || null === b || b !== b) || comp > 0;
}
function zipWithFactory(keyIter, zipper, iters) {
var zipSequence = makeSequence(keyIter);
return zipSequence.size = new ArraySeq(iters).map(function(i) {
return i.size;
}).min(), zipSequence.__iterate = function(fn, reverse) {
for (var step, iterator = this.__iterator(ITERATE_VALUES, reverse), iterations = 0; !(step = iterator.next()).done && fn(step.value, iterations++, this) !== !1; ) ;
return iterations;
}, zipSequence.__iteratorUncached = function(type, reverse) {
var iterators = iters.map(function(i) {
return i = Iterable(i), getIterator(reverse ? i.reverse() : i);
}), iterations = 0, isDone = !1;
return new Iterator(function() {
var steps;
return isDone || (steps = iterators.map(function(i) {
return i.next();
}), isDone = steps.some(function(s) {
return s.done;
})), isDone ? iteratorDone() : iteratorValue(type, iterations++, zipper.apply(null, steps.map(function(s) {
return s.value;
})));
});
}, zipSequence;
}
function reify(iter, seq) {
return isSeq(iter) ? seq : iter.constructor(seq);
}
function validateEntry(entry) {
if (entry !== Object(entry)) throw new TypeError("Expected [K, V] tuple: " + entry);
}
function resolveSize(iter) {
return assertNotInfinite(iter.size), ensureSize(iter);
}
function iterableClass(iterable) {
return isKeyed(iterable) ? KeyedIterable : isIndexed(iterable) ? IndexedIterable : SetIterable;
}
function makeSequence(iterable) {
return Object.create((isKeyed(iterable) ? KeyedSeq : isIndexed(iterable) ? IndexedSeq : SetSeq).prototype);
}
function cacheResultThrough() {
return this._iter.cacheResult ? (this._iter.cacheResult(), this.size = this._iter.size,
this) : Seq.prototype.cacheResult.call(this);
}
function defaultComparator(a, b) {
return a > b ? 1 : a < b ? -1 : 0;
}
function forceIterator(keyPath) {
var iter = getIterator(keyPath);
if (!iter) {
if (!isArrayLike(keyPath)) throw new TypeError("Expected iterable or array-like: " + keyPath);
iter = getIterator(Iterable(keyPath));
}
return iter;
}
function Record(defaultValues, name) {
var hasInitialized, RecordType = function(values) {
if (values instanceof RecordType) return values;
if (!(this instanceof RecordType)) return new RecordType(values);
if (!hasInitialized) {
hasInitialized = !0;
var keys = Object.keys(defaultValues);
setProps(RecordTypePrototype, keys), RecordTypePrototype.size = keys.length, RecordTypePrototype._name = name,
RecordTypePrototype._keys = keys, RecordTypePrototype._defaultValues = defaultValues;
}
this._map = Map(values);
}, RecordTypePrototype = RecordType.prototype = Object.create(RecordPrototype);
return RecordTypePrototype.constructor = RecordType, RecordType;
}
function makeRecord(likeRecord, map, ownerID) {
var record = Object.create(Object.getPrototypeOf(likeRecord));
return record._map = map, record.__ownerID = ownerID, record;
}
function recordName(record) {
return record._name || record.constructor.name || "Record";
}
function setProps(prototype, names) {
try {
names.forEach(setProp.bind(void 0, prototype));
} catch (error) {}
}
function setProp(prototype, name) {
Object.defineProperty(prototype, name, {
get: function() {
return this.get(name);
},
set: function(value) {
invariant(this.__ownerID, "Cannot set on an immutable record."), this.set(name, value);
}
});
}
function Set(value) {
return null === value || void 0 === value ? emptySet() : isSet(value) && !isOrdered(value) ? value : emptySet().withMutations(function(set) {
var iter = SetIterable(value);
assertNotInfinite(iter.size), iter.forEach(function(v) {
return set.add(v);
});
});
}
function isSet(maybeSet) {
return !(!maybeSet || !maybeSet[IS_SET_SENTINEL]);
}
function updateSet(set, newMap) {
return set.__ownerID ? (set.size = newMap.size, set._map = newMap, set) : newMap === set._map ? set : 0 === newMap.size ? set.__empty() : set.__make(newMap);
}
function makeSet(map, ownerID) {
var set = Object.create(SetPrototype);
return set.size = map ? map.size : 0, set._map = map, set.__ownerID = ownerID, set;
}
function emptySet() {
return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap()));
}
function OrderedSet(value) {
return null === value || void 0 === value ? emptyOrderedSet() : isOrderedSet(value) ? value : emptyOrderedSet().withMutations(function(set) {
var iter = SetIterable(value);
assertNotInfinite(iter.size), iter.forEach(function(v) {
return set.add(v);
});
});
}
function isOrderedSet(maybeOrderedSet) {
return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet);
}
function makeOrderedSet(map, ownerID) {
var set = Object.create(OrderedSetPrototype);
return set.size = map ? map.size : 0, set._map = map, set.__ownerID = ownerID, set;
}
function emptyOrderedSet() {
return EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap()));
}
function Stack(value) {
return null === value || void 0 === value ? emptyStack() : isStack(value) ? value : emptyStack().unshiftAll(value);
}
function isStack(maybeStack) {
return !(!maybeStack || !maybeStack[IS_STACK_SENTINEL]);
}
function makeStack(size, head, ownerID, hash) {
var map = Object.create(StackPrototype);
return map.size = size, map._head = head, map.__ownerID = ownerID, map.__hash = hash,
map.__altered = !1, map;
}
function emptyStack() {
return EMPTY_STACK || (EMPTY_STACK = makeStack(0));
}
function mixin(ctor, methods) {
var keyCopier = function(key) {
ctor.prototype[key] = methods[key];
};
return Object.keys(methods).forEach(keyCopier), Object.getOwnPropertySymbols && Object.getOwnPropertySymbols(methods).forEach(keyCopier),
ctor;
}
function keyMapper(v, k) {
return k;
}
function entryMapper(v, k) {
return [ k, v ];
}
function not(predicate) {
return function() {
return !predicate.apply(this, arguments);
};
}
function neg(predicate) {
return function() {
return -predicate.apply(this, arguments);
};
}
function quoteString(value) {
return "string" == typeof value ? JSON.stringify(value) : value;
}
function defaultZipper() {
return arrCopy(arguments);
}
function defaultNegComparator(a, b) {
return a < b ? 1 : a > b ? -1 : 0;
}
function hashIterable(iterable) {
if (iterable.size === 1 / 0) return 0;
var ordered = isOrdered(iterable), keyed = isKeyed(iterable), h = ordered ? 1 : 0, size = iterable.__iterate(keyed ? ordered ? function(v, k) {
h = 31 * h + hashMerge(hash(v), hash(k)) | 0;
} : function(v, k) {
h = h + hashMerge(hash(v), hash(k)) | 0;
} : ordered ? function(v) {
h = 31 * h + hash(v) | 0;
} : function(v) {
h = h + hash(v) | 0;
});
return murmurHashOfSize(size, h);
}
function murmurHashOfSize(size, h) {
return h = imul(h, 3432918353), h = imul(h << 15 | h >>> -15, 461845907), h = imul(h << 13 | h >>> -13, 5),
h = (h + 3864292196 | 0) ^ size, h = imul(h ^ h >>> 16, 2246822507), h = imul(h ^ h >>> 13, 3266489909),
h = smi(h ^ h >>> 16);
}
function hashMerge(a, b) {
return a ^ b + 2654435769 + (a << 6) + (a >> 2) | 0;
}
var SLICE$0 = Array.prototype.slice;
createClass(KeyedIterable, Iterable), createClass(IndexedIterable, Iterable), createClass(SetIterable, Iterable),
Iterable.isIterable = isIterable, Iterable.isKeyed = isKeyed, Iterable.isIndexed = isIndexed,
Iterable.isAssociative = isAssociative, Iterable.isOrdered = isOrdered, Iterable.Keyed = KeyedIterable,
Iterable.Indexed = IndexedIterable, Iterable.Set = SetIterable;
var IS_ITERABLE_SENTINEL = "@@__IMMUTABLE_ITERABLE__@@", IS_KEYED_SENTINEL = "@@__IMMUTABLE_KEYED__@@", IS_INDEXED_SENTINEL = "@@__IMMUTABLE_INDEXED__@@", IS_ORDERED_SENTINEL = "@@__IMMUTABLE_ORDERED__@@", DELETE = "delete", SHIFT = 5, SIZE = 1 << SHIFT, MASK = SIZE - 1, NOT_SET = {}, CHANGE_LENGTH = {
value: !1
}, DID_ALTER = {
value: !1
}, ITERATE_KEYS = 0, ITERATE_VALUES = 1, ITERATE_ENTRIES = 2, REAL_ITERATOR_SYMBOL = "function" == typeof Symbol && Symbol.iterator, FAUX_ITERATOR_SYMBOL = "@@iterator", ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL;
Iterator.prototype.toString = function() {
return "[Iterator]";
}, Iterator.KEYS = ITERATE_KEYS, Iterator.VALUES = ITERATE_VALUES, Iterator.ENTRIES = ITERATE_ENTRIES,
Iterator.prototype.inspect = Iterator.prototype.toSource = function() {
return this.toString();
}, Iterator.prototype[ITERATOR_SYMBOL] = function() {
return this;
}, createClass(Seq, Iterable), Seq.of = function() {
return Seq(arguments);
}, Seq.prototype.toSeq = function() {
return this;
}, Seq.prototype.toString = function() {
return this.__toString("Seq {", "}");
}, Seq.prototype.cacheResult = function() {
return !this._cache && this.__iterateUncached && (this._cache = this.entrySeq().toArray(),
this.size = this._cache.length), this;
}, Seq.prototype.__iterate = function(fn, reverse) {
return seqIterate(this, fn, reverse, !0);
}, Seq.prototype.__iterator = function(type, reverse) {
return seqIterator(this, type, reverse, !0);
}, createClass(KeyedSeq, Seq), KeyedSeq.prototype.toKeyedSeq = function() {
return this;
}, createClass(IndexedSeq, Seq), IndexedSeq.of = function() {
return IndexedSeq(arguments);
}, IndexedSeq.prototype.toIndexedSeq = function() {
return this;
}, IndexedSeq.prototype.toString = function() {
return this.__toString("Seq [", "]");
}, IndexedSeq.prototype.__iterate = function(fn, reverse) {
return seqIterate(this, fn, reverse, !1);
}, IndexedSeq.prototype.__iterator = function(type, reverse) {
return seqIterator(this, type, reverse, !1);
}, createClass(SetSeq, Seq), SetSeq.of = function() {
return SetSeq(arguments);
}, SetSeq.prototype.toSetSeq = function() {
return this;
}, Seq.isSeq = isSeq, Seq.Keyed = KeyedSeq, Seq.Set = SetSeq, Seq.Indexed = IndexedSeq;
var IS_SEQ_SENTINEL = "@@__IMMUTABLE_SEQ__@@";
Seq.prototype[IS_SEQ_SENTINEL] = !0, createClass(ArraySeq, IndexedSeq), ArraySeq.prototype.get = function(index, notSetValue) {
return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue;
}, ArraySeq.prototype.__iterate = function(fn, reverse) {
for (var array = this._array, maxIndex = array.length - 1, ii = 0; ii <= maxIndex; ii++) if (fn(array[reverse ? maxIndex - ii : ii], ii, this) === !1) return ii + 1;
return ii;
}, ArraySeq.prototype.__iterator = function(type, reverse) {
var array = this._array, maxIndex = array.length - 1, ii = 0;
return new Iterator(function() {
return ii > maxIndex ? iteratorDone() : iteratorValue(type, ii, array[reverse ? maxIndex - ii++ : ii++]);
});
}, createClass(ObjectSeq, KeyedSeq), ObjectSeq.prototype.get = function(key, notSetValue) {
return void 0 === notSetValue || this.has(key) ? this._object[key] : notSetValue;
}, ObjectSeq.prototype.has = function(key) {
return this._object.hasOwnProperty(key);
}, ObjectSeq.prototype.__iterate = function(fn, reverse) {
for (var object = this._object, keys = this._keys, maxIndex = keys.length - 1, ii = 0; ii <= maxIndex; ii++) {
var key = keys[reverse ? maxIndex - ii : ii];
if (fn(object[key], key, this) === !1) return ii + 1;
}
return ii;
}, ObjectSeq.prototype.__iterator = function(type, reverse) {
var object = this._object, keys = this._keys, maxIndex = keys.length - 1, ii = 0;
return new Iterator(function() {
var key = keys[reverse ? maxIndex - ii : ii];
return ii++ > maxIndex ? iteratorDone() : iteratorValue(type, key, object[key]);
});
}, ObjectSeq.prototype[IS_ORDERED_SENTINEL] = !0, createClass(IterableSeq, IndexedSeq),
IterableSeq.prototype.__iterateUncached = function(fn, reverse) {
if (reverse) return this.cacheResult().__iterate(fn, reverse);
var iterable = this._iterable, iterator = getIterator(iterable), iterations = 0;
if (isIterator(iterator)) for (var step; !(step = iterator.next()).done && fn(step.value, iterations++, this) !== !1; ) ;
return iterations;
}, IterableSeq.prototype.__iteratorUncached = function(type, reverse) {
if (reverse) return this.cacheResult().__iterator(type, reverse);
var iterable = this._iterable, iterator = getIterator(iterable);
if (!isIterator(iterator)) return new Iterator(iteratorDone);
var iterations = 0;
return new Iterator(function() {
var step = iterator.next();
return step.done ? step : iteratorValue(type, iterations++, step.value);
});
}, createClass(IteratorSeq, IndexedSeq), IteratorSeq.prototype.__iterateUncached = function(fn, reverse) {
if (reverse) return this.cacheResult().__iterate(fn, reverse);
for (var iterator = this._iterator, cache = this._iteratorCache, iterations = 0; iterations < cache.length; ) if (fn(cache[iterations], iterations++, this) === !1) return iterations;
for (var step; !(step = iterator.next()).done; ) {
var val = step.value;
if (cache[iterations] = val, fn(val, iterations++, this) === !1) break;
}
return iterations;
}, IteratorSeq.prototype.__iteratorUncached = function(type, reverse) {
if (reverse) return this.cacheResult().__iterator(type, reverse);
var iterator = this._iterator, cache = this._iteratorCache, iterations = 0;
return new Iterator(function() {
if (iterations >= cache.length) {
var step = iterator.next();
if (step.done) return step;
cache[iterations] = step.value;
}
return iteratorValue(type, iterations, cache[iterations++]);
});
};
var EMPTY_SEQ;
createClass(Repeat, IndexedSeq), Repeat.prototype.toString = function() {
return 0 === this.size ? "Repeat []" : "Repeat [ " + this._value + " " + this.size + " times ]";
}, Repeat.prototype.get = function(index, notSetValue) {
return this.has(index) ? this._value : notSetValue;
}, Repeat.prototype.includes = function(searchValue) {
return is(this._value, searchValue);
}, Repeat.prototype.slice = function(begin, end) {
var size = this.size;
return wholeSlice(begin, end, size) ? this : new Repeat(this._value, resolveEnd(end, size) - resolveBegin(begin, size));
}, Repeat.prototype.reverse = function() {
return this;
}, Repeat.prototype.indexOf = function(searchValue) {
return is(this._value, searchValue) ? 0 : -1;
}, Repeat.prototype.lastIndexOf = function(searchValue) {
return is(this._value, searchValue) ? this.size : -1;
}, Repeat.prototype.__iterate = function(fn, reverse) {
for (var ii = 0; ii < this.size; ii++) if (fn(this._value, ii, this) === !1) return ii + 1;
return ii;
}, Repeat.prototype.__iterator = function(type, reverse) {
var this$0 = this, ii = 0;
return new Iterator(function() {
return ii < this$0.size ? iteratorValue(type, ii++, this$0._value) : iteratorDone();
});
}, Repeat.prototype.equals = function(other) {
return other instanceof Repeat ? is(this._value, other._value) : deepEqual(other);
};
var EMPTY_REPEAT;
createClass(Range, IndexedSeq), Range.prototype.toString = function() {
return 0 === this.size ? "Range []" : "Range [ " + this._start + "..." + this._end + (this._step > 1 ? " by " + this._step : "") + " ]";
}, Range.prototype.get = function(index, notSetValue) {
return this.has(index) ? this._start + wrapIndex(this, index) * this._step : notSetValue;
}, Range.prototype.includes = function(searchValue) {
var possibleIndex = (searchValue - this._start) / this._step;
return possibleIndex >= 0 && possibleIndex < this.size && possibleIndex === Math.floor(possibleIndex);
}, Range.prototype.slice = function(begin, end) {
return wholeSlice(begin, end, this.size) ? this : (begin = resolveBegin(begin, this.size),
end = resolveEnd(end, this.size), end <= begin ? new Range(0, 0) : new Range(this.get(begin, this._end), this.get(end, this._end), this._step));
}, Range.prototype.indexOf = function(searchValue) {
var offsetValue = searchValue - this._start;
if (offsetValue % this._step === 0) {
var index = offsetValue / this._step;
if (index >= 0 && index < this.size) return index;
}
return -1;
}, Range.prototype.lastIndexOf = function(searchValue) {
return this.indexOf(searchValue);
}, Range.prototype.__iterate = function(fn, reverse) {
for (var maxIndex = this.size - 1, step = this._step, value = reverse ? this._start + maxIndex * step : this._start, ii = 0; ii <= maxIndex; ii++) {
if (fn(value, ii, this) === !1) return ii + 1;
value += reverse ? -step : step;
}
return ii;
}, Range.prototype.__iterator = function(type, reverse) {
var maxIndex = this.size - 1, step = this._step, value = reverse ? this._start + maxIndex * step : this._start, ii = 0;
return new Iterator(function() {
var v = value;
return value += reverse ? -step : step, ii > maxIndex ? iteratorDone() : iteratorValue(type, ii++, v);
});
}, Range.prototype.equals = function(other) {
return other instanceof Range ? this._start === other._start && this._end === other._end && this._step === other._step : deepEqual(this, other);
};
var EMPTY_RANGE;
createClass(Collection, Iterable), createClass(KeyedCollection, Collection), createClass(IndexedCollection, Collection),
createClass(SetCollection, Collection), Collection.Keyed = KeyedCollection, Collection.Indexed = IndexedCollection,
Collection.Set = SetCollection;
var weakMap, imul = "function" == typeof Math.imul && Math.imul(4294967295, 2) === -2 ? Math.imul : function(a, b) {
a = 0 | a, b = 0 | b;
var c = 65535 & a, d = 65535 & b;
return c * d + ((a >>> 16) * d + c * (b >>> 16) << 16 >>> 0) | 0;
}, isExtensible = Object.isExtensible, canDefineProperty = function() {
try {
return Object.defineProperty({}, "@", {}), !0;
} catch (e) {
return !1;
}
}(), usingWeakMap = "function" == typeof WeakMap;
usingWeakMap && (weakMap = new WeakMap());
var objHashUID = 0, UID_HASH_KEY = "__immutablehash__";
"function" == typeof Symbol && (UID_HASH_KEY = Symbol(UID_HASH_KEY));
var STRING_HASH_CACHE_MIN_STRLEN = 16, STRING_HASH_CACHE_MAX_SIZE = 255, STRING_HASH_CACHE_SIZE = 0, stringHashCache = {};
createClass(Map, KeyedCollection), Map.prototype.toString = function() {
return this.__toString("Map {", "}");
}, Map.prototype.get = function(k, notSetValue) {
return this._root ? this._root.get(0, void 0, k, notSetValue) : notSetValue;
}, Map.prototype.set = function(k, v) {
return updateMap(this, k, v);
}, Map.prototype.setIn = function(keyPath, v) {
return this.updateIn(keyPath, NOT_SET, function() {
return v;
});
}, Map.prototype.remove = function(k) {
return updateMap(this, k, NOT_SET);
}, Map.prototype.deleteIn = function(keyPath) {
return this.updateIn(keyPath, function() {
return NOT_SET;
});
}, Map.prototype.update = function(k, notSetValue, updater) {
return 1 === arguments.length ? k(this) : this.updateIn([ k ], notSetValue, updater);
}, Map.prototype.updateIn = function(keyPath, notSetValue, updater) {
updater || (updater = notSetValue, notSetValue = void 0);
var updatedValue = updateInDeepMap(this, forceIterator(keyPath), notSetValue, updater);
return updatedValue === NOT_SET ? void 0 : updatedValue;
}, Map.prototype.clear = function() {
return 0 === this.size ? this : this.__ownerID ? (this.size = 0, this._root = null,
this.__hash = void 0, this.__altered = !0, this) : emptyMap();
}, Map.prototype.merge = function() {
return mergeIntoMapWith(this, void 0, arguments);
}, Map.prototype.mergeWith = function(merger) {
var iters = SLICE$0.call(arguments, 1);
return mergeIntoMapWith(this, merger, iters);
}, Map.prototype.mergeIn = function(keyPath) {
var iters = SLICE$0.call(arguments, 1);
return this.updateIn(keyPath, emptyMap(), function(m) {
return "function" == typeof m.merge ? m.merge.apply(m, iters) : iters[iters.length - 1];
});
}, Map.prototype.mergeDeep = function() {
return mergeIntoMapWith(this, deepMerger, arguments);
}, Map.prototype.mergeDeepWith = function(merger) {
var iters = SLICE$0.call(arguments, 1);
return mergeIntoMapWith(this, deepMergerWith(merger), iters);
}, Map.prototype.mergeDeepIn = function(keyPath) {
var iters = SLICE$0.call(arguments, 1);
return this.updateIn(keyPath, emptyMap(), function(m) {
return "function" == typeof m.mergeDeep ? m.mergeDeep.apply(m, iters) : iters[iters.length - 1];
});
}, Map.prototype.sort = function(comparator) {
return OrderedMap(sortFactory(this, comparator));
}, Map.prototype.sortBy = function(mapper, comparator) {
return OrderedMap(sortFactory(this, comparator, mapper));
}, Map.prototype.withMutations = function(fn) {
var mutable = this.asMutable();
return fn(mutable), mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this;
}, Map.prototype.asMutable = function() {
return this.__ownerID ? this : this.__ensureOwner(new OwnerID());
}, Map.prototype.asImmutable = function() {
return this.__ensureOwner();
}, Map.prototype.wasAltered = function() {
return this.__altered;
}, Map.prototype.__iterator = function(type, reverse) {
return new MapIterator(this, type, reverse);
}, Map.prototype.__iterate = function(fn, reverse) {
var this$0 = this, iterations = 0;
return this._root && this._root.iterate(function(entry) {
return iterations++, fn(entry[1], entry[0], this$0);
}, reverse), iterations;
}, Map.prototype.__ensureOwner = function(ownerID) {
return ownerID === this.__ownerID ? this : ownerID ? makeMap(this.size, this._root, ownerID, this.__hash) : (this.__ownerID = ownerID,
this.__altered = !1, this);
}, Map.isMap = isMap;
var IS_MAP_SENTINEL = "@@__IMMUTABLE_MAP__@@", MapPrototype = Map.prototype;
MapPrototype[IS_MAP_SENTINEL] = !0, MapPrototype[DELETE] = MapPrototype.remove,
MapPrototype.removeIn = MapPrototype.deleteIn, ArrayMapNode.prototype.get = function(shift, keyHash, key, notSetValue) {
for (var entries = this.entries, ii = 0, len = entries.length; ii < len; ii++) if (is(key, entries[ii][0])) return entries[ii][1];
return notSetValue;
}, ArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
for (var removed = value === NOT_SET, entries = this.entries, idx = 0, len = entries.length; idx < len && !is(key, entries[idx][0]); idx++) ;
var exists = idx < len;
if (exists ? entries[idx][1] === value : removed) return this;
if (SetRef(didAlter), (removed || !exists) && SetRef(didChangeSize), !removed || 1 !== entries.length) {
if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) return createNodes(ownerID, entries, key, value);
var isEditable = ownerID && ownerID === this.ownerID, newEntries = isEditable ? entries : arrCopy(entries);
return exists ? removed ? idx === len - 1 ? newEntries.pop() : newEntries[idx] = newEntries.pop() : newEntries[idx] = [ key, value ] : newEntries.push([ key, value ]),
isEditable ? (this.entries = newEntries, this) : new ArrayMapNode(ownerID, newEntries);
}
}, BitmapIndexedNode.prototype.get = function(shift, keyHash, key, notSetValue) {
void 0 === keyHash && (keyHash = hash(key));
var bit = 1 << ((0 === shift ? keyHash : keyHash >>> shift) & MASK), bitmap = this.bitmap;
return 0 === (bitmap & bit) ? notSetValue : this.nodes[popCount(bitmap & bit - 1)].get(shift + SHIFT, keyHash, key, notSetValue);
}, BitmapIndexedNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
void 0 === keyHash && (keyHash = hash(key));
var keyHashFrag = (0 === shift ? keyHash : keyHash >>> shift) & MASK, bit = 1 << keyHashFrag, bitmap = this.bitmap, exists = 0 !== (bitmap & bit);
if (!exists && value === NOT_SET) return this;
var idx = popCount(bitmap & bit - 1), nodes = this.nodes, node = exists ? nodes[idx] : void 0, newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);
if (newNode === node) return this;
if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode);
if (exists && !newNode && 2 === nodes.length && isLeafNode(nodes[1 ^ idx])) return nodes[1 ^ idx];
if (exists && newNode && 1 === nodes.length && isLeafNode(newNode)) return newNode;
var isEditable = ownerID && ownerID === this.ownerID, newBitmap = exists ? newNode ? bitmap : bitmap ^ bit : bitmap | bit, newNodes = exists ? newNode ? setIn(nodes, idx, newNode, isEditable) : spliceOut(nodes, idx, isEditable) : spliceIn(nodes, idx, newNode, isEditable);
return isEditable ? (this.bitmap = newBitmap, this.nodes = newNodes, this) : new BitmapIndexedNode(ownerID, newBitmap, newNodes);
}, HashArrayMapNode.prototype.get = function(shift, keyHash, key, notSetValue) {
void 0 === keyHash && (keyHash = hash(key));
var idx = (0 === shift ? keyHash : keyHash >>> shift) & MASK, node = this.nodes[idx];
return node ? node.get(shift + SHIFT, keyHash, key, notSetValue) : notSetValue;
}, HashArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
void 0 === keyHash && (keyHash = hash(key));
var idx = (0 === shift ? keyHash : keyHash >>> shift) & MASK, removed = value === NOT_SET, nodes = this.nodes, node = nodes[idx];
if (removed && !node) return this;
var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);
if (newNode === node) return this;
var newCount = this.count;
if (node) {
if (!newNode && (newCount--, newCount < MIN_HASH_ARRAY_MAP_SIZE)) return packNodes(ownerID, nodes, newCount, idx);
} else newCount++;
var isEditable = ownerID && ownerID === this.ownerID, newNodes = setIn(nodes, idx, newNode, isEditable);
return isEditable ? (this.count = newCount, this.nodes = newNodes, this) : new HashArrayMapNode(ownerID, newCount, newNodes);
}, HashCollisionNode.prototype.get = function(shift, keyHash, key, notSetValue) {
for (var entries = this.entries, ii = 0, len = entries.length; ii < len; ii++) if (is(key, entries[ii][0])) return entries[ii][1];
return notSetValue;
}, HashCollisionNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
void 0 === keyHash && (keyHash = hash(key));
var removed = value === NOT_SET;
if (keyHash !== this.keyHash) return removed ? this : (SetRef(didAlter), SetRef(didChangeSize),
mergeIntoNode(this, ownerID, shift, keyHash, [ key, value ]));
for (var entries = this.entries, idx = 0, len = entries.length; idx < len && !is(key, entries[idx][0]); idx++) ;
var exists = idx < len;
if (exists ? entries[idx][1] === value : removed) return this;
if (SetRef(didAlter), (removed || !exists) && SetRef(didChangeSize), removed && 2 === len) return new ValueNode(ownerID, this.keyHash, entries[1 ^ idx]);
var isEditable = ownerID && ownerID === this.ownerID, newEntries = isEditable ? entries : arrCopy(entries);
return exists ? removed ? idx === len - 1 ? newEntries.pop() : newEntries[idx] = newEntries.pop() : newEntries[idx] = [ key, value ] : newEntries.push([ key, value ]),
isEditable ? (this.entries = newEntries, this) : new HashCollisionNode(ownerID, this.keyHash, newEntries);
}, ValueNode.prototype.get = function(shift, keyHash, key, notSetValue) {
return is(key, this.entry[0]) ? this.entry[1] : notSetValue;
}, ValueNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
var removed = value === NOT_SET, keyMatch = is(key, this.entry[0]);
return (keyMatch ? value === this.entry[1] : removed) ? this : (SetRef(didAlter),
removed ? void SetRef(didChangeSize) : keyMatch ? ownerID && ownerID === this.ownerID ? (this.entry[1] = value,
this) : new ValueNode(ownerID, this.keyHash, [ key, value ]) : (SetRef(didChangeSize),
mergeIntoNode(this, ownerID, shift, hash(key), [ key, value ])));
}, ArrayMapNode.prototype.iterate = HashCollisionNode.prototype.iterate = function(fn, reverse) {
for (var entries = this.entries, ii = 0, maxIndex = entries.length - 1; ii <= maxIndex; ii++) if (fn(entries[reverse ? maxIndex - ii : ii]) === !1) return !1;
}, BitmapIndexedNode.prototype.iterate = HashArrayMapNode.prototype.iterate = function(fn, reverse) {
for (var nodes = this.nodes, ii = 0, maxIndex = nodes.length - 1; ii <= maxIndex; ii++) {
var node = nodes[reverse ? maxIndex - ii : ii];
if (node && node.iterate(fn, reverse) === !1) return !1;
}
}, ValueNode.prototype.iterate = function(fn, reverse) {
return fn(this.entry);
}, createClass(MapIterator, Iterator), MapIterator.prototype.next = function() {
for (var type = this._type, stack = this._stack; stack; ) {
var maxIndex, node = stack.node, index = stack.index++;
if (node.entry) {
if (0 === index) return mapIteratorValue(type, node.entry);
} else if (node.entries) {
if (maxIndex = node.entries.length - 1, index <= maxIndex) return mapIteratorValue(type, node.entries[this._reverse ? maxIndex - index : index]);
} else if (maxIndex = node.nodes.length - 1, index <= maxIndex) {
var subNode = node.nodes[this._reverse ? maxIndex - index : index];
if (subNode) {
if (subNode.entry) return mapIteratorValue(type, subNode.entry);
stack = this._stack = mapIteratorFrame(subNode, stack);
}
continue;
}
stack = this._stack = this._stack.__prev;
}
return iteratorDone();
};
var EMPTY_MAP, MAX_ARRAY_MAP_SIZE = SIZE / 4, MAX_BITMAP_INDEXED_SIZE = SIZE / 2, MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4;
createClass(List, IndexedCollection), List.of = function() {
return this(arguments);
}, List.prototype.toString = function() {
return this.__toString("List [", "]");
}, List.prototype.get = function(index, notSetValue) {
if (index = wrapIndex(this, index), index >= 0 && index < this.size) {
index += this._origin;
var node = listNodeFor(this, index);
return node && node.array[index & MASK];
}
return notSetValue;
}, List.prototype.set = function(index, value) {
return updateList(this, index, value);
}, List.prototype.remove = function(index) {
return this.has(index) ? 0 === index ? this.shift() : index === this.size - 1 ? this.pop() : this.splice(index, 1) : this;
}, List.prototype.insert = function(index, value) {
return this.splice(index, 0, value);
}, List.prototype.clear = function() {
return 0 === this.size ? this : this.__ownerID ? (this.size = this._origin = this._capacity = 0,
this._level = SHIFT, this._root = this._tail = null, this.__hash = void 0, this.__altered = !0,
this) : emptyList();
}, List.prototype.push = function() {
var values = arguments, oldSize = this.size;
return this.withMutations(function(list) {
setListBounds(list, 0, oldSize + values.length);
for (var ii = 0; ii < values.length; ii++) list.set(oldSize + ii, values[ii]);
});
}, List.prototype.pop = function() {
return setListBounds(this, 0, -1);
}, List.prototype.unshift = function() {
var values = arguments;
return this.withMutations(function(list) {
setListBounds(list, -values.length);
for (var ii = 0; ii < values.length; ii++) list.set(ii, values[ii]);
});
}, List.prototype.shift = function() {
return setListBounds(this, 1);
}, List.prototype.merge = function() {
return mergeIntoListWith(this, void 0, arguments);
}, List.prototype.mergeWith = function(merger) {
var iters = SLICE$0.call(arguments, 1);
return mergeIntoListWith(this, merger, iters);
}, List.prototype.mergeDeep = function() {
return mergeIntoListWith(this, deepMerger, arguments);
}, List.prototype.mergeDeepWith = function(merger) {
var iters = SLICE$0.call(arguments, 1);
return mergeIntoListWith(this, deepMergerWith(merger), iters);
}, List.prototype.setSize = function(size) {
return setListBounds(this, 0, size);
}, List.prototype.slice = function(begin, end) {
var size = this.size;
return wholeSlice(begin, end, size) ? this : setListBounds(this, resolveBegin(begin, size), resolveEnd(end, size));
}, List.prototype.__iterator = function(type, reverse) {
var index = 0, values = iterateList(this, reverse);
return new Iterator(function() {
var value = values();
return value === DONE ? iteratorDone() : iteratorValue(type, index++, value);
});
}, List.prototype.__iterate = function(fn, reverse) {
for (var value, index = 0, values = iterateList(this, reverse); (value = values()) !== DONE && fn(value, index++, this) !== !1; ) ;
return index;
}, List.prototype.__ensureOwner = function(ownerID) {
return ownerID === this.__ownerID ? this : ownerID ? makeList(this._origin, this._capacity, this._level, this._root, this._tail, ownerID, this.__hash) : (this.__ownerID = ownerID,
this);
}, List.isList = isList;
var IS_LIST_SENTINEL = "@@__IMMUTABLE_LIST__@@", ListPrototype = List.prototype;
ListPrototype[IS_LIST_SENTINEL] = !0, ListPrototype[DELETE] = ListPrototype.remove,
ListPrototype.setIn = MapPrototype.setIn, ListPrototype.deleteIn = ListPrototype.removeIn = MapPrototype.removeIn,
ListPrototype.update = MapPrototype.update, ListPrototype.updateIn = MapPrototype.updateIn,
ListPrototype.mergeIn = MapPrototype.mergeIn, ListPrototype.mergeDeepIn = MapPrototype.mergeDeepIn,
ListPrototype.withMutations = MapPrototype.withMutations, ListPrototype.asMutable = MapPrototype.asMutable,
ListPrototype.asImmutable = MapPrototype.asImmutable, ListPrototype.wasAltered = MapPrototype.wasAltered,
VNode.prototype.removeBefore = function(ownerID, level, index) {
if (index === level ? 1 << level : 0 === this.array.length) return this;
var originIndex = index >>> level & MASK;
if (originIndex >= this.array.length) return new VNode([], ownerID);
var newChild, removingFirst = 0 === originIndex;
if (level > 0) {
var oldChild = this.array[originIndex];
if (newChild = oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index),
newChild === oldChild && removingFirst) return this;
}
if (removingFirst && !newChild) return this;
var editable = editableVNode(this, ownerID);
if (!removingFirst) for (var ii = 0; ii < originIndex; ii++) editable.array[ii] = void 0;
return newChild && (editable.array[originIndex] = newChild), editable;
}, VNode.prototype.removeAfter = function(ownerID, level, index) {
if (index === (level ? 1 << level : 0) || 0 === this.array.length) return this;
var sizeIndex = index - 1 >>> level & MASK;
if (sizeIndex >= this.array.length) return this;
var newChild;
if (level > 0) {
var oldChild = this.array[sizeIndex];
if (newChild = oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index),
newChild === oldChild && sizeIndex === this.array.length - 1) return this;
}
var editable = editableVNode(this, ownerID);
return editable.array.splice(sizeIndex + 1), newChild && (editable.array[sizeIndex] = newChild),
editable;
};
var EMPTY_LIST, DONE = {};
createClass(OrderedMap, Map), OrderedMap.of = function() {
return this(arguments);
}, OrderedMap.prototype.toString = function() {
return this.__toString("OrderedMap {", "}");
}, OrderedMap.prototype.get = function(k, notSetValue) {
var index = this._map.get(k);
return void 0 !== index ? this._list.get(index)[1] : notSetValue;
}, OrderedMap.prototype.clear = function() {
return 0 === this.size ? this : this.__ownerID ? (this.size = 0, this._map.clear(),
this._list.clear(), this) : emptyOrderedMap();
}, OrderedMap.prototype.set = function(k, v) {
return updateOrderedMap(this, k, v);
}, OrderedMap.prototype.remove = function(k) {
return updateOrderedMap(this, k, NOT_SET);
}, OrderedMap.prototype.wasAltered = function() {
return this._map.wasAltered() || this._list.wasAltered();
}, OrderedMap.prototype.__iterate = function(fn, reverse) {
var this$0 = this;
return this._list.__iterate(function(entry) {
return entry && fn(entry[1], entry[0], this$0);
}, reverse);
}, OrderedMap.prototype.__iterator = function(type, reverse) {
return this._list.fromEntrySeq().__iterator(type, reverse);
}, OrderedMap.prototype.__ensureOwner = function(ownerID) {
if (ownerID === this.__ownerID) return this;
var newMap = this._map.__ensureOwner(ownerID), newList = this._list.__ensureOwner(ownerID);
return ownerID ? makeOrderedMap(newMap, newList, ownerID, this.__hash) : (this.__ownerID = ownerID,
this._map = newMap, this._list = newList, this);
}, OrderedMap.isOrderedMap = isOrderedMap, OrderedMap.prototype[IS_ORDERED_SENTINEL] = !0,
OrderedMap.prototype[DELETE] = OrderedMap.prototype.remove;
var EMPTY_ORDERED_MAP;
createClass(ToKeyedSequence, KeyedSeq), ToKeyedSequence.prototype.get = function(key, notSetValue) {
return this._iter.get(key, notSetValue);
}, ToKeyedSequence.prototype.has = function(key) {
return this._iter.has(key);
}, ToKeyedSequence.prototype.valueSeq = function() {
return this._iter.valueSeq();
}, ToKeyedSequence.prototype.reverse = function() {
var this$0 = this, reversedSequence = reverseFactory(this, !0);
return this._useKeys || (reversedSequence.valueSeq = function() {
return this$0._iter.toSeq().reverse();
}), reversedSequence;
}, ToKeyedSequence.prototype.map = function(mapper, context) {
var this$0 = this, mappedSequence = mapFactory(this, mapper, context);
return this._useKeys || (mappedSequence.valueSeq = function() {
return this$0._iter.toSeq().map(mapper, context);
}), mappedSequence;
}, ToKeyedSequence.prototype.__iterate = function(fn, reverse) {
var ii, this$0 = this;
return this._iter.__iterate(this._useKeys ? function(v, k) {
return fn(v, k, this$0);
} : (ii = reverse ? resolveSize(this) : 0, function(v) {
return fn(v, reverse ? --ii : ii++, this$0);
}), reverse);
}, ToKeyedSequence.prototype.__iterator = function(type, reverse) {
if (this._useKeys) return this._iter.__iterator(type, reverse);
var iterator = this._iter.__iterator(ITERATE_VALUES, reverse), ii = reverse ? resolveSize(this) : 0;
return new Iterator(function() {
var step = iterator.next();
return step.done ? step : iteratorValue(type, reverse ? --ii : ii++, step.value, step);
});
}, ToKeyedSequence.prototype[IS_ORDERED_SENTINEL] = !0, createClass(ToIndexedSequence, IndexedSeq),
ToIndexedSequence.prototype.includes = function(value) {
return this._iter.includes(value);
}, ToIndexedSequence.prototype.__iterate = function(fn, reverse) {
var this$0 = this, iterations = 0;
return this._iter.__iterate(function(v) {
return fn(v, iterations++, this$0);
}, reverse);
}, ToIndexedSequence.prototype.__iterator = function(type, reverse) {
var iterator = this._iter.__iterator(ITERATE_VALUES, reverse), iterations = 0;
return new Iterator(function() {
var step = iterator.next();
return step.done ? step : iteratorValue(type, iterations++, step.value, step);
});
}, createClass(ToSetSequence, SetSeq), ToSetSequence.prototype.has = function(key) {
return this._iter.includes(key);
}, ToSetSequence.prototype.__iterate = function(fn, reverse) {
var this$0 = this;
return this._iter.__iterate(function(v) {
return fn(v, v, this$0);
}, reverse);
}, ToSetSequence.prototype.__iterator = function(type, reverse) {
var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);
return new Iterator(function() {
var step = iterator.next();
return step.done ? step : iteratorValue(type, step.value, step.value, step);
});
}, createClass(FromEntriesSequence, KeyedSeq), FromEntriesSequence.prototype.entrySeq = function() {
return this._iter.toSeq();
}, FromEntriesSequence.prototype.__iterate = function(fn, reverse) {
var this$0 = this;
return this._iter.__iterate(function(entry) {
if (entry) {
validateEntry(entry);
var indexedIterable = isIterable(entry);
return fn(indexedIterable ? entry.get(1) : entry[1], indexedIterable ? entry.get(0) : entry[0], this$0);
}
}, reverse);
}, FromEntriesSequence.prototype.__iterator = function(type, reverse) {
var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);
return new Iterator(function() {
for (;;) {
var step = iterator.next();
if (step.done) return step;
var entry = step.value;
if (entry) {
validateEntry(entry);
var indexedIterable = isIterable(entry);
return iteratorValue(type, indexedIterable ? entry.get(0) : entry[0], indexedIterable ? entry.get(1) : entry[1], step);
}
}
});
}, ToIndexedSequence.prototype.cacheResult = ToKeyedSequence.prototype.cacheResult = ToSetSequence.prototype.cacheResult = FromEntriesSequence.prototype.cacheResult = cacheResultThrough,
createClass(Record, KeyedCollection), Record.prototype.toString = function() {
return this.__toString(recordName(this) + " {", "}");
}, Record.prototype.has = function(k) {
return this._defaultValues.hasOwnProperty(k);
}, Record.prototype.get = function(k, notSetValue) {
if (!this.has(k)) return notSetValue;
var defaultVal = this._defaultValues[k];
return this._map ? this._map.get(k, defaultVal) : defaultVal;
}, Record.prototype.clear = function() {
if (this.__ownerID) return this._map && this._map.clear(), this;
var RecordType = this.constructor;
return RecordType._empty || (RecordType._empty = makeRecord(this, emptyMap()));
}, Record.prototype.set = function(k, v) {
if (!this.has(k)) throw new Error('Cannot set unknown key "' + k + '" on ' + recordName(this));
var newMap = this._map && this._map.set(k, v);
return this.__ownerID || newMap === this._map ? this : makeRecord(this, newMap);
}, Record.prototype.remove = function(k) {
if (!this.has(k)) return this;
var newMap = this._map && this._map.remove(k);
return this.__ownerID || newMap === this._map ? this : makeRecord(this, newMap);
}, Record.prototype.wasAltered = function() {
return this._map.wasAltered();
}, Record.prototype.__iterator = function(type, reverse) {
var this$0 = this;
return KeyedIterable(this._defaultValues).map(function(_, k) {
return this$0.get(k);
}).__iterator(type, reverse);
}, Record.prototype.__iterate = function(fn, reverse) {
var this$0 = this;
return KeyedIterable(this._defaultValues).map(function(_, k) {
return this$0.get(k);
}).__iterate(fn, reverse);
}, Record.prototype.__ensureOwner = function(ownerID) {
if (ownerID === this.__ownerID) return this;
var newMap = this._map && this._map.__ensureOwner(ownerID);
return ownerID ? makeRecord(this, newMap, ownerID) : (this.__ownerID = ownerID,
this._map = newMap, this);
};
var RecordPrototype = Record.prototype;
RecordPrototype[DELETE] = RecordPrototype.remove, RecordPrototype.deleteIn = RecordPrototype.removeIn = MapPrototype.removeIn,
RecordPrototype.merge = MapPrototype.merge, RecordPrototype.mergeWith = MapPrototype.mergeWith,
RecordPrototype.mergeIn = MapPrototype.mergeIn, RecordPrototype.mergeDeep = MapPrototype.mergeDeep,
RecordPrototype.mergeDeepWith = MapPrototype.mergeDeepWith, RecordPrototype.mergeDeepIn = MapPrototype.mergeDeepIn,
RecordPrototype.setIn = MapPrototype.setIn, RecordPrototype.update = MapPrototype.update,
RecordPrototype.updateIn = MapPrototype.updateIn, RecordPrototype.withMutations = MapPrototype.withMutations,
RecordPrototype.asMutable = MapPrototype.asMutable, RecordPrototype.asImmutable = MapPrototype.asImmutable,
createClass(Set, SetCollection), Set.of = function() {
return this(arguments);
}, Set.fromKeys = function(value) {
return this(KeyedIterable(value).keySeq());
}, Set.prototype.toString = function() {
return this.__toString("Set {", "}");
}, Set.prototype.has = function(value) {
return this._map.has(value);
}, Set.prototype.add = function(value) {
return updateSet(this, this._map.set(value, !0));
}, Set.prototype.remove = function(value) {
return updateSet(this, this._map.remove(value));
}, Set.prototype.clear = function() {
return updateSet(this, this._map.clear());
}, Set.prototype.union = function() {
var iters = SLICE$0.call(arguments, 0);
return iters = iters.filter(function(x) {
return 0 !== x.size;
}), 0 === iters.length ? this : 0 !== this.size || this.__ownerID || 1 !== iters.length ? this.withMutations(function(set) {
for (var ii = 0; ii < iters.length; ii++) SetIterable(iters[ii]).forEach(function(value) {
return set.add(value);
});
}) : this.constructor(iters[0]);
}, Set.prototype.intersect = function() {
var iters = SLICE$0.call(arguments, 0);
if (0 === iters.length) return this;
iters = iters.map(function(iter) {
return SetIterable(iter);
});
var originalSet = this;
return this.withMutations(function(set) {
originalSet.forEach(function(value) {
iters.every(function(iter) {
return iter.includes(value);
}) || set.remove(value);
});
});
}, Set.prototype.subtract = function() {
var iters = SLICE$0.call(arguments, 0);
if (0 === iters.length) return this;
iters = iters.map(function(iter) {
return SetIterable(iter);
});
var originalSet = this;
return this.withMutations(function(set) {
originalSet.forEach(function(value) {
iters.some(function(iter) {
return iter.includes(value);
}) && set.remove(value);
});
});
}, Set.prototype.merge = function() {
return this.union.apply(this, arguments);
}, Set.prototype.mergeWith = function(merger) {
var iters = SLICE$0.call(arguments, 1);
return this.union.apply(this, iters);
}, Set.prototype.sort = function(comparator) {
return OrderedSet(sortFactory(this, comparator));
}, Set.prototype.sortBy = function(mapper, comparator) {
return OrderedSet(sortFactory(this, comparator, mapper));
}, Set.prototype.wasAltered = function() {
return this._map.wasAltered();
}, Set.prototype.__iterate = function(fn, reverse) {
var this$0 = this;
return this._map.__iterate(function(_, k) {
return fn(k, k, this$0);
}, reverse);
}, Set.prototype.__iterator = function(type, reverse) {
return this._map.map(function(_, k) {
return k;
}).__iterator(type, reverse);
}, Set.prototype.__ensureOwner = function(ownerID) {
if (ownerID === this.__ownerID) return this;
var newMap = this._map.__ensureOwner(ownerID);
return ownerID ? this.__make(newMap, ownerID) : (this.__ownerID = ownerID, this._map = newMap,
this);
}, Set.isSet = isSet;
var IS_SET_SENTINEL = "@@__IMMUTABLE_SET__@@", SetPrototype = Set.prototype;
SetPrototype[IS_SET_SENTINEL] = !0, SetPrototype[DELETE] = SetPrototype.remove,
SetPrototype.mergeDeep = SetPrototype.merge, SetPrototype.mergeDeepWith = SetPrototype.mergeWith,
SetPrototype.withMutations = MapPrototype.withMutations, SetPrototype.asMutable = MapPrototype.asMutable,
SetPrototype.asImmutable = MapPrototype.asImmutable, SetPrototype.__empty = emptySet,
SetPrototype.__make = makeSet;
var EMPTY_SET;
createClass(OrderedSet, Set), OrderedSet.of = function() {
return this(arguments);
}, OrderedSet.fromKeys = function(value) {
return this(KeyedIterable(value).keySeq());
}, OrderedSet.prototype.toString = function() {
return this.__toString("OrderedSet {", "}");
}, OrderedSet.isOrderedSet = isOrderedSet;
var OrderedSetPrototype = OrderedSet.prototype;
OrderedSetPrototype[IS_ORDERED_SENTINEL] = !0, OrderedSetPrototype.__empty = emptyOrderedSet,
OrderedSetPrototype.__make = makeOrderedSet;
var EMPTY_ORDERED_SET;
createClass(Stack, IndexedCollection), Stack.of = function() {
return this(arguments);
}, Stack.prototype.toString = function() {
return this.__toString("Stack [", "]");
}, Stack.prototype.get = function(index, notSetValue) {
var head = this._head;
for (index = wrapIndex(this, index); head && index--; ) head = head.next;
return head ? head.value : notSetValue;
}, Stack.prototype.peek = function() {
return this._head && this._head.value;
}, Stack.prototype.push = function() {
if (0 === arguments.length) return this;
for (var newSize = this.size + arguments.length, head = this._head, ii = arguments.length - 1; ii >= 0; ii--) head = {
value: arguments[ii],
next: head
};
return this.__ownerID ? (this.size = newSize, this._head = head, this.__hash = void 0,
this.__altered = !0, this) : makeStack(newSize, head);
}, Stack.prototype.pushAll = function(iter) {
if (iter = IndexedIterable(iter), 0 === iter.size) return this;
assertNotInfinite(iter.size);
var newSize = this.size, head = this._head;
return iter.reverse().forEach(function(value) {
newSize++, head = {
value: value,
next: head
};
}), this.__ownerID ? (this.size = newSize, this._head = head, this.__hash = void 0,
this.__altered = !0, this) : makeStack(newSize, head);
}, Stack.prototype.pop = function() {
return this.slice(1);
}, Stack.prototype.unshift = function() {
return this.push.apply(this, arguments);
}, Stack.prototype.unshiftAll = function(iter) {
return this.pushAll(iter);
}, Stack.prototype.shift = function() {
return this.pop.apply(this, arguments);
}, Stack.prototype.clear = function() {
return 0 === this.size ? this : this.__ownerID ? (this.size = 0, this._head = void 0,
this.__hash = void 0, this.__altered = !0, this) : emptyStack();
}, Stack.prototype.slice = function(begin, end) {
if (wholeSlice(begin, end, this.size)) return this;
var resolvedBegin = resolveBegin(begin, this.size), resolvedEnd = resolveEnd(end, this.size);
if (resolvedEnd !== this.size) return IndexedCollection.prototype.slice.call(this, begin, end);
for (var newSize = this.size - resolvedBegin, head = this._head; resolvedBegin--; ) head = head.next;
return this.__ownerID ? (this.size = newSize, this._head = head, this.__hash = void 0,
this.__altered = !0, this) : makeStack(newSize, head);
}, Stack.prototype.__ensureOwner = function(ownerID) {
return ownerID === this.__ownerID ? this : ownerID ? makeStack(this.size, this._head, ownerID, this.__hash) : (this.__ownerID = ownerID,
this.__altered = !1, this);
}, Stack.prototype.__iterate = function(fn, reverse) {
if (reverse) return this.reverse().__iterate(fn);
for (var iterations = 0, node = this._head; node && fn(node.value, iterations++, this) !== !1; ) node = node.next;
return iterations;
}, Stack.prototype.__iterator = function(type, reverse) {
if (reverse) return this.reverse().__iterator(type);
var iterations = 0, node = this._head;
return new Iterator(function() {
if (node) {
var value = node.value;
return node = node.next, iteratorValue(type, iterations++, value);
}
return iteratorDone();
});
}, Stack.isStack = isStack;
var IS_STACK_SENTINEL = "@@__IMMUTABLE_STACK__@@", StackPrototype = Stack.prototype;
StackPrototype[IS_STACK_SENTINEL] = !0, StackPrototype.withMutations = MapPrototype.withMutations,
StackPrototype.asMutable = MapPrototype.asMutable, StackPrototype.asImmutable = MapPrototype.asImmutable,
StackPrototype.wasAltered = MapPrototype.wasAltered;
var EMPTY_STACK;
Iterable.Iterator = Iterator, mixin(Iterable, {
toArray: function() {
assertNotInfinite(this.size);
var array = new Array(this.size || 0);
return this.valueSeq().__iterate(function(v, i) {
array[i] = v;
}), array;
},
toIndexedSeq: function() {
return new ToIndexedSequence(this);
},
toJS: function() {
return this.toSeq().map(function(value) {
return value && "function" == typeof value.toJS ? value.toJS() : value;
}).__toJS();
},
toJSON: function() {
return this.toSeq().map(function(value) {
return value && "function" == typeof value.toJSON ? value.toJSON() : value;
}).__toJS();
},
toKeyedSeq: function() {
return new ToKeyedSequence(this, (!0));
},
toMap: function() {
return Map(this.toKeyedSeq());
},
toObject: function() {
assertNotInfinite(this.size);
var object = {};
return this.__iterate(function(v, k) {
object[k] = v;
}), object;
},
toOrderedMap: function() {
return OrderedMap(this.toKeyedSeq());
},
toOrderedSet: function() {
return OrderedSet(isKeyed(this) ? this.valueSeq() : this);
},
toSet: function() {
return Set(isKeyed(this) ? this.valueSeq() : this);
},
toSetSeq: function() {
return new ToSetSequence(this);
},
toSeq: function() {
return isIndexed(this) ? this.toIndexedSeq() : isKeyed(this) ? this.toKeyedSeq() : this.toSetSeq();
},
toStack: function() {
return Stack(isKeyed(this) ? this.valueSeq() : this);
},
toList: function() {
return List(isKeyed(this) ? this.valueSeq() : this);
},
toString: function() {
return "[Iterable]";
},
__toString: function(head, tail) {
return 0 === this.size ? head + tail : head + " " + this.toSeq().map(this.__toStringMapper).join(", ") + " " + tail;
},
concat: function() {
var values = SLICE$0.call(arguments, 0);
return reify(this, concatFactory(this, values));
},
includes: function(searchValue) {
return this.some(function(value) {
return is(value, searchValue);
});
},
entries: function() {
return this.__iterator(ITERATE_ENTRIES);
},
every: function(predicate, context) {
assertNotInfinite(this.size);
var returnValue = !0;
return this.__iterate(function(v, k, c) {
if (!predicate.call(context, v, k, c)) return returnValue = !1, !1;
}), returnValue;
},
filter: function(predicate, context) {
return reify(this, filterFactory(this, predicate, context, !0));
},
find: function(predicate, context, notSetValue) {
var entry = this.findEntry(predicate, context);
return entry ? entry[1] : notSetValue;
},
findEntry: function(predicate, context) {
var found;
return this.__iterate(function(v, k, c) {
if (predicate.call(context, v, k, c)) return found = [ k, v ], !1;
}), found;
},
findLastEntry: function(predicate, context) {
return this.toSeq().reverse().findEntry(predicate, context);
},
forEach: function(sideEffect, context) {
return assertNotInfinite(this.size), this.__iterate(context ? sideEffect.bind(context) : sideEffect);
},
join: function(separator) {
assertNotInfinite(this.size), separator = void 0 !== separator ? "" + separator : ",";
var joined = "", isFirst = !0;
return this.__iterate(function(v) {
isFirst ? isFirst = !1 : joined += separator, joined += null !== v && void 0 !== v ? v.toString() : "";
}), joined;
},
keys: function() {
return this.__iterator(ITERATE_KEYS);
},
map: function(mapper, context) {
return reify(this, mapFactory(this, mapper, context));
},
reduce: function(reducer, initialReduction, context) {
assertNotInfinite(this.size);
var reduction, useFirst;
return arguments.length < 2 ? useFirst = !0 : reduction = initialReduction, this.__iterate(function(v, k, c) {
useFirst ? (useFirst = !1, reduction = v) : reduction = reducer.call(context, reduction, v, k, c);
}), reduction;
},
reduceRight: function(reducer, initialReduction, context) {
var reversed = this.toKeyedSeq().reverse();
return reversed.reduce.apply(reversed, arguments);
},
reverse: function() {
return reify(this, reverseFactory(this, !0));
},
slice: function(begin, end) {
return reify(this, sliceFactory(this, begin, end, !0));
},
some: function(predicate, context) {
return !this.every(not(predicate), context);
},
sort: function(comparator) {
return reify(this, sortFactory(this, comparator));
},
values: function() {
return this.__iterator(ITERATE_VALUES);
},
butLast: function() {
return this.slice(0, -1);
},
isEmpty: function() {
return void 0 !== this.size ? 0 === this.size : !this.some(function() {
return !0;
});
},
count: function(predicate, context) {
return ensureSize(predicate ? this.toSeq().filter(predicate, context) : this);
},
countBy: function(grouper, context) {
return countByFactory(this, grouper, context);
},
equals: function(other) {
return deepEqual(this, other);
},
entrySeq: function() {
var iterable = this;
if (iterable._cache) return new ArraySeq(iterable._cache);
var entriesSequence = iterable.toSeq().map(entryMapper).toIndexedSeq();
return entriesSequence.fromEntrySeq = function() {
return iterable.toSeq();
}, entriesSequence;
},
filterNot: function(predicate, context) {
return this.filter(not(predicate), context);
},
findLast: function(predicate, context, notSetValue) {
return this.toKeyedSeq().reverse().find(predicate, context, notSetValue);
},
first: function() {
return this.find(returnTrue);
},
flatMap: function(mapper, context) {
return reify(this, flatMapFactory(this, mapper, context));
},
flatten: function(depth) {
return reify(this, flattenFactory(this, depth, !0));
},
fromEntrySeq: function() {
return new FromEntriesSequence(this);
},
get: function(searchKey, notSetValue) {
return this.find(function(_, key) {
return is(key, searchKey);
}, void 0, notSetValue);
},
getIn: function(searchKeyPath, notSetValue) {
for (var step, nested = this, iter = forceIterator(searchKeyPath); !(step = iter.next()).done; ) {
var key = step.value;
if (nested = nested && nested.get ? nested.get(key, NOT_SET) : NOT_SET, nested === NOT_SET) return notSetValue;
}
return nested;
},
groupBy: function(grouper, context) {
return groupByFactory(this, grouper, context);
},
has: function(searchKey) {
return this.get(searchKey, NOT_SET) !== NOT_SET;
},
hasIn: function(searchKeyPath) {
return this.getIn(searchKeyPath, NOT_SET) !== NOT_SET;
},
isSubset: function(iter) {
return iter = "function" == typeof iter.includes ? iter : Iterable(iter), this.every(function(value) {
return iter.includes(value);
});
},
isSuperset: function(iter) {
return iter = "function" == typeof iter.isSubset ? iter : Iterable(iter), iter.isSubset(this);
},
keySeq: function() {
return this.toSeq().map(keyMapper).toIndexedSeq();
},
last: function() {
return this.toSeq().reverse().first();
},
max: function(comparator) {
return maxFactory(this, comparator);
},
maxBy: function(mapper, comparator) {
return maxFactory(this, comparator, mapper);
},
min: function(comparator) {
return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator);
},
minBy: function(mapper, comparator) {
return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator, mapper);
},
rest: function() {
return this.slice(1);
},
skip: function(amount) {
return this.slice(Math.max(0, amount));
},
skipLast: function(amount) {
return reify(this, this.toSeq().reverse().skip(amount).reverse());
},
skipWhile: function(predicate, context) {
return reify(this, skipWhileFactory(this, predicate, context, !0));
},
skipUntil: function(predicate, context) {
return this.skipWhile(not(predicate), context);
},
sortBy: function(mapper, comparator) {
return reify(this, sortFactory(this, comparator, mapper));
},
take: function(amount) {
return this.slice(0, Math.max(0, amount));
},
takeLast: function(amount) {
return reify(this, this.toSeq().reverse().take(amount).reverse());
},
takeWhile: function(predicate, context) {
return reify(this, takeWhileFactory(this, predicate, context));
},
takeUntil: function(predicate, context) {
return this.takeWhile(not(predicate), context);
},
valueSeq: function() {
return this.toIndexedSeq();
},
hashCode: function() {
return this.__hash || (this.__hash = hashIterable(this));
}
});
var IterablePrototype = Iterable.prototype;
IterablePrototype[IS_ITERABLE_SENTINEL] = !0, IterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.values,
IterablePrototype.__toJS = IterablePrototype.toArray, IterablePrototype.__toStringMapper = quoteString,
IterablePrototype.inspect = IterablePrototype.toSource = function() {
return this.toString();
}, IterablePrototype.chain = IterablePrototype.flatMap, IterablePrototype.contains = IterablePrototype.includes,
function() {
try {
Object.defineProperty(IterablePrototype, "length", {
get: function() {
if (!Iterable.noLengthWarning) {
var stack;
try {
throw new Error();
} catch (error) {
stack = error.stack;
}
if (stack.indexOf("_wrapObject") === -1) return console && console.warn && console.warn("iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. " + stack),
this.size;
}
}
});
} catch (e) {}
}(), mixin(KeyedIterable, {
flip: function() {
return reify(this, flipFactory(this));
},
findKey: function(predicate, context) {
var entry = this.findEntry(predicate, context);
return entry && entry[0];
},
findLastKey: function(predicate, context) {
return this.toSeq().reverse().findKey(predicate, context);
},
keyOf: function(searchValue) {
return this.findKey(function(value) {
return is(value, searchValue);
});
},
lastKeyOf: function(searchValue) {
return this.findLastKey(function(value) {
return is(value, searchValue);
});
},
mapEntries: function(mapper, context) {
var this$0 = this, iterations = 0;
return reify(this, this.toSeq().map(function(v, k) {
return mapper.call(context, [ k, v ], iterations++, this$0);
}).fromEntrySeq());
},
mapKeys: function(mapper, context) {
var this$0 = this;
return reify(this, this.toSeq().flip().map(function(k, v) {
return mapper.call(context, k, v, this$0);
}).flip());
}
});
var KeyedIterablePrototype = KeyedIterable.prototype;
KeyedIterablePrototype[IS_KEYED_SENTINEL] = !0, KeyedIterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.entries,
KeyedIterablePrototype.__toJS = IterablePrototype.toObject, KeyedIterablePrototype.__toStringMapper = function(v, k) {
return JSON.stringify(k) + ": " + quoteString(v);
}, mixin(IndexedIterable, {
toKeyedSeq: function() {
return new ToKeyedSequence(this, (!1));
},
filter: function(predicate, context) {
return reify(this, filterFactory(this, predicate, context, !1));
},
findIndex: function(predicate, context) {
var entry = this.findEntry(predicate, context);
return entry ? entry[0] : -1;
},
indexOf: function(searchValue) {
var key = this.toKeyedSeq().keyOf(searchValue);
return void 0 === key ? -1 : key;
},
lastIndexOf: function(searchValue) {
var key = this.toKeyedSeq().reverse().keyOf(searchValue);
return void 0 === key ? -1 : key;
},
reverse: function() {
return reify(this, reverseFactory(this, !1));
},
slice: function(begin, end) {
return reify(this, sliceFactory(this, begin, end, !1));
},
splice: function(index, removeNum) {
var numArgs = arguments.length;
if (removeNum = Math.max(0 | removeNum, 0), 0 === numArgs || 2 === numArgs && !removeNum) return this;
index = resolveBegin(index, index < 0 ? this.count() : this.size);
var spliced = this.slice(0, index);
return reify(this, 1 === numArgs ? spliced : spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum)));
},
findLastIndex: function(predicate, context) {
var key = this.toKeyedSeq().findLastKey(predicate, context);
return void 0 === key ? -1 : key;
},
first: function() {
return this.get(0);
},
flatten: function(depth) {
return reify(this, flattenFactory(this, depth, !1));
},
get: function(index, notSetValue) {
return index = wrapIndex(this, index), index < 0 || this.size === 1 / 0 || void 0 !== this.size && index > this.size ? notSetValue : this.find(function(_, key) {
return key === index;
}, void 0, notSetValue);
},
has: function(index) {
return index = wrapIndex(this, index), index >= 0 && (void 0 !== this.size ? this.size === 1 / 0 || index < this.size : this.indexOf(index) !== -1);
},
interpose: function(separator) {
return reify(this, interposeFactory(this, separator));
},
interleave: function() {
var iterables = [ this ].concat(arrCopy(arguments)), zipped = zipWithFactory(this.toSeq(), IndexedSeq.of, iterables), interleaved = zipped.flatten(!0);
return zipped.size && (interleaved.size = zipped.size * iterables.length), reify(this, interleaved);
},
last: function() {
return this.get(-1);
},
skipWhile: function(predicate, context) {
return reify(this, skipWhileFactory(this, predicate, context, !1));
},
zip: function() {
var iterables = [ this ].concat(arrCopy(arguments));
return reify(this, zipWithFactory(this, defaultZipper, iterables));
},
zipWith: function(zipper) {
var iterables = arrCopy(arguments);
return iterables[0] = this, reify(this, zipWithFactory(this, zipper, iterables));
}
}), IndexedIterable.prototype[IS_INDEXED_SENTINEL] = !0, IndexedIterable.prototype[IS_ORDERED_SENTINEL] = !0,
mixin(SetIterable, {
get: function(value, notSetValue) {
return this.has(value) ? value : notSetValue;
},
includes: function(value) {
return this.has(value);
},
keySeq: function() {
return this.valueSeq();
}
}), SetIterable.prototype.has = IterablePrototype.includes, mixin(KeyedSeq, KeyedIterable.prototype),
mixin(IndexedSeq, IndexedIterable.prototype), mixin(SetSeq, SetIterable.prototype),
mixin(KeyedCollection, KeyedIterable.prototype), mixin(IndexedCollection, IndexedIterable.prototype),
mixin(SetCollection, SetIterable.prototype);
var Immutable = {
Iterable: Iterable,
Seq: Seq,
Collection: Collection,
Map: Map,
OrderedMap: OrderedMap,
List: List,
Stack: Stack,
Set: Set,
OrderedSet: OrderedSet,
Record: Record,
Range: Range,
Repeat: Repeat,
is: is,
fromJS: fromJS
};
return Immutable;
});
}, function(module, exports, __webpack_require__) {
"use strict";
var decorate = __webpack_require__(38), SettingsCheckbox = __webpack_require__(217), Wrapped = decorate({
listeners: function() {
return [ "colorizerchange" ];
},
props: function(store) {
return {
state: store.colorizerState,
text: "Highlight Search",
onChange: function(state) {
return store.changeColorizer(state);
}
};
}
}, SettingsCheckbox);
module.exports = Wrapped;
}, function(module, exports) {
"use strict";
function isValidRegex(needle) {
var isValid = !0;
if (needle) try {
searchTextToRegExp(needle);
} catch (error) {
isValid = !1;
}
return isValid;
}
function searchTextToRegExp(needle) {
return new RegExp(trimSearchText(needle), "gi");
}
function shouldSearchUseRegex(needle) {
return !!needle && "/" === needle.charAt(0) && trimSearchText(needle).length > 0;
}
function trimSearchText(needle) {
return "/" === needle.charAt(0) && (needle = needle.substr(1)), "/" === needle.charAt(needle.length - 1) && (needle = needle.substr(0, needle.length - 1)),
needle;
}
module.exports = {
isValidRegex: isValidRegex,
searchTextToRegExp: searchTextToRegExp,
shouldSearchUseRegex: shouldSearchUseRegex,
trimSearchText: trimSearchText
};
}, function(module, exports, __webpack_require__) {
"use strict";
var React = __webpack_require__(6), SvgIcon = function(_ref) {
var path = _ref.path, _ref$style = _ref.style, style = void 0 === _ref$style ? styles.svgIcon : _ref$style;
return React.createElement("svg", {
style: style,
viewBox: "0 0 24 24"
}, React.createElement("path", {
d: path
}));
}, styles = {
svgIcon: {
flex: "0 0 1rem",
width: "1rem",
height: "1rem",
fill: "currentColor"
}
};
module.exports = SvgIcon;
}, function(module, exports) {
"use strict";
var Icons = {
CHECK: "\n M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z\n ",
COPY: "\n M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,\n 0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z\n ",
EDIT: "\n M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,\n 5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z\n ",
INSPECT: "\n M12,8A4,4 0 0,1 16,12A4,4 0 0,1 12,16A4,4 0 0,1 8,12A4,4 0 0,1 12,8M3.05,\n 13H1V11H3.05C3.5,6.83 6.83,3.5 11,3.05V1H13V3.05C17.17,3.5 20.5,6.83 20.95,\n 11H23V13H20.95C20.5,17.17 17.17,20.5 13,20.95V23H11V20.95C6.83,20.5 3.5,17.17 3.05,\n 13M12,5A7,7 0 0,0 5,12A7,7 0 0,0 12,19A7,7 0 0,0 19,12A7,7 0 0,0 12,5Z\n ",
SEARCH: "\n M31.008 27.231l-7.58-6.447c-0.784-0.705-1.622-1.029-2.299-0.998 1.789-2.096 2.87-4.815\n 2.87-7.787 0-6.627-5.373-12-12-12s-12 5.373-12 12 5.373 12 12 12c2.972 0 5.691-1.081\n 7.787-2.87-0.031 0.677 0.293 1.515 0.998 2.299l6.447 7.58c1.104 1.226 2.907 1.33 4.007\n 0.23s0.997-2.903-0.23-4.007zM12 20c-4.418 0-8-3.582-8-8s3.582-8 8-8 8 3.582 8 8-3.582\n 8-8 8z\n ",
SETTINGS: "\n M12,15.5A3.5,3.5 0 0,1 8.5,12A3.5,3.5 0 0,1 12,8.5A3.5,3.5 0 0,1 15.5,12A3.5,3.5 0 0,\n 1 12,15.5M19.43,12.97C19.47,12.65 19.5,12.33 19.5,12C19.5,11.67 19.47,11.34 19.43,\n 11L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.96 19.05,\n 5.05L16.56,6.05C16.04,5.66 15.5,5.32 14.87,5.07L14.5,2.42C14.46,2.18 14.25,2 14,\n 2H10C9.75,2 9.54,2.18 9.5,2.42L9.13,5.07C8.5,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.73,\n 4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11C4.53,11.34 4.5,\n 11.67 4.5,12C4.5,12.33 4.53,12.65 4.57,12.97L2.46,14.63C2.27,14.78 2.21,15.05 2.34,\n 15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.94C7.96,18.34 8.5,18.68 9.13,\n 18.93L9.5,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.5,21.58L14.87,\n 18.93C15.5,18.67 16.04,18.34 16.56,17.94L19.05,18.95C19.27,19.03 19.54,18.95 19.66,\n 18.73L21.66,15.27C21.78,15.05 21.73,14.78 21.54,14.63L19.43,12.97Z\n ",
SHARE: "\n M18,16.08C17.24,16.08 16.56,16.38 16.04,16.85L8.91,12.7C8.96,12.47 9,12.24 9,12C9,\n 11.76 8.96,11.53 8.91,11.3L15.96,7.19C16.5,7.69 17.21,8 18,8A3,3 0 0,0 21,5A3,\n 3 0 0,0 18,2A3,3 0 0,0 15,5C15,5.24 15.04,5.47 15.09,5.7L8.04,9.81C7.5,9.31 6.79,\n 9 6,9A3,3 0 0,0 3,12A3,3 0 0,0 6,15C6.79,15 7.5,14.69 8.04,14.19L15.16,18.34C15.11,\n 18.55 15.08,18.77 15.08,19C15.08,20.61 16.39,21.91 18,21.91C19.61,21.91 20.92,\n 20.61 20.92,19A2.92,2.92 0 0,0 18,16.08Z\n "
};
module.exports = Icons;
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
}
return target;
}, _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), React = __webpack_require__(6), Hoverable = function(Component) {
var HoverableImplementation = function(_React$Component) {
function HoverableImplementation() {
var _ref, _temp, _this, _ret;
_classCallCheck(this, HoverableImplementation);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
return _temp = _this = _possibleConstructorReturn(this, (_ref = HoverableImplementation.__proto__ || Object.getPrototypeOf(HoverableImplementation)).call.apply(_ref, [ this ].concat(args))),
_this.state = {
isHovered: !1,
isPressed: !1
}, _this._onMouseDown = function(event) {
_this.setState({
isPressed: !0
});
}, _this._onMouseEnter = function(event) {
_this.setState({
isHovered: !0
});
}, _this._onMouseLeave = function(event) {
_this.setState({
isHovered: !1,
isPressed: !1
});
}, _this._onMouseUp = function(event) {
_this.setState({
isPressed: !1
});
}, _ret = _temp, _possibleConstructorReturn(_this, _ret);
}
return _inherits(HoverableImplementation, _React$Component), _createClass(HoverableImplementation, [ {
key: "render",
value: function() {
var _state = this.state, isHovered = _state.isHovered, isPressed = _state.isPressed;
return React.createElement(Component, _extends({}, this.props, {
isHovered: isHovered,
isPressed: isPressed,
onMouseDown: this._onMouseDown,
onMouseEnter: this._onMouseEnter,
onMouseLeave: this._onMouseLeave,
onMouseUp: this._onMouseUp
}));
}
} ]), HoverableImplementation;
}(React.Component);
return HoverableImplementation;
};
module.exports = Hoverable;
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), Breadcrumb = __webpack_require__(225), Node = __webpack_require__(226), React = __webpack_require__(6), SearchUtils = __webpack_require__(220), decorate = __webpack_require__(38), _require = __webpack_require__(35), monospace = _require.monospace, sansSerif = _require.sansSerif, MAX_SEARCH_ROOTS = 200, TreeView = function(_React$Component) {
function TreeView() {
return _classCallCheck(this, TreeView), _possibleConstructorReturn(this, (TreeView.__proto__ || Object.getPrototypeOf(TreeView)).apply(this, arguments));
}
return _inherits(TreeView, _React$Component), _createClass(TreeView, [ {
key: "getChildContext",
value: function() {
return {
scrollTo: this.scrollTo.bind(this)
};
}
}, {
key: "scrollTo",
value: function(toNode) {
if (this.node) {
for (var val = 0, height = toNode.offsetHeight; toNode && this.node.contains(toNode); ) val += toNode.offsetTop,
toNode = toNode.offsetParent;
var top = this.node.scrollTop, rel = val - this.node.offsetTop, margin = 40;
top > rel - margin ? this.node.scrollTop = rel - margin : top + this.node.offsetHeight < rel + height + margin && (this.node.scrollTop = rel - this.node.offsetHeight + height + margin);
}
}
}, {
key: "render",
value: function() {
var _this2 = this, theme = this.context.theme;
if (!this.props.roots.count()) return this.props.searching ? React.createElement("div", {
style: styles.container
}, React.createElement("span", {
style: noSearchResultsStyle(theme)
}, "No search results")) : React.createElement("div", {
style: styles.container
}, React.createElement("div", {
ref: function(n) {
return _this2.node = n;
},
style: styles.scroll
}, React.createElement("div", {
style: styles.scrollContents
}, "Waiting for roots to load...", this.props.reload && React.createElement("span", null, "to reload the inspector ", React.createElement("button", {
onClick: this.props.reload
}, " click here")))));
var searchText = this.props.searchText, searchRegExp = SearchUtils.isValidRegex(searchText) ? SearchUtils.searchTextToRegExp(searchText) : null;
return this.props.searching && this.props.roots.count() > MAX_SEARCH_ROOTS ? React.createElement("div", {
style: styles.container
}, React.createElement("div", {
ref: function(n) {
return _this2.node = n;
},
style: styles.scroll
}, React.createElement("div", {
style: styles.scrollContents
}, this.props.roots.slice(0, MAX_SEARCH_ROOTS).map(function(id) {
return React.createElement(Node, {
depth: 0,
id: id,
key: id,
searchRegExp: searchRegExp
});
}).toJS(), React.createElement("span", null, "Some results not shown. Narrow your search criteria to find them")))) : React.createElement("div", {
style: styles.container
}, React.createElement("div", {
ref: function(n) {
return _this2.node = n;
},
style: styles.scroll
}, React.createElement("div", {
style: styles.scrollContents
}, this.props.roots.map(function(id) {
return React.createElement(Node, {
depth: 0,
id: id,
key: id,
searchRegExp: searchRegExp
});
}).toJS())), React.createElement(Breadcrumb, null));
}
} ]), TreeView;
}(React.Component);
TreeView.childContextTypes = {
scrollTo: React.PropTypes.func
}, TreeView.contextTypes = {
theme: React.PropTypes.object.isRequired
};
var noSearchResultsStyle = function(theme) {
return {
color: theme.base04,
fontFamily: sansSerif.family,
fontSize: sansSerif.sizes.large,
fontStyle: "italic",
padding: "0.5rem"
};
}, styles = {
container: {
fontFamily: monospace.family,
fontSize: monospace.sizes.normal,
lineHeight: 1.3,
flex: 1,
display: "flex",
flexDirection: "column",
minHeight: 0,
WebkitUserSelect: "none",
MozUserSelect: "none",
userSelect: "none"
},
scroll: {
overflow: "auto",
minHeight: 0,
flex: 1,
display: "flex",
alignItems: "flex-start"
},
scrollContents: {
flexDirection: "column",
flex: 1,
display: "flex",
alignItems: "stretch"
}
}, WrappedTreeView = decorate({
listeners: function(props) {
return [ "searchRoots", "roots" ];
},
props: function(store, _props) {
return {
roots: store.searchRoots || store.roots,
searching: !!store.searchRoots,
searchText: store.searchText
};
}
}, TreeView);
module.exports = WrappedTreeView;
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
function getBreadcrumbPath(store) {
for (var path = [], current = store.breadcrumbHead; current; ) path.unshift({
id: current,
node: store.get(current)
}), current = store.skipWrapper(store.getParent(current), !0);
return path;
}
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), _require = __webpack_require__(35), sansSerif = _require.sansSerif, React = __webpack_require__(6), decorate = __webpack_require__(38), Breadcrumb = function(_React$Component) {
function Breadcrumb(props) {
_classCallCheck(this, Breadcrumb);
var _this = _possibleConstructorReturn(this, (Breadcrumb.__proto__ || Object.getPrototypeOf(Breadcrumb)).call(this, props));
return _this.state = {
hovered: null
}, _this;
}
return _inherits(Breadcrumb, _React$Component), _createClass(Breadcrumb, [ {
key: "handleCrumbMouseOver",
value: function(id) {
this.setState({
hovered: id
}), this.props.hover(id, !0);
}
}, {
key: "handleCrumbMouseOut",
value: function(id) {
this.setState({
hovered: null
}), this.props.hover(id, !1);
}
}, {
key: "render",
value: function() {
var _this2 = this, theme = this.context.theme;
return React.createElement("ul", {
style: containerStyle(theme)
}, this.props.path.map(function(_ref) {
var id = _ref.id, node = _ref.node, isSelected = id === _this2.props.selected, style = itemStyle(isSelected, "Composite" === node.get("nodeType"), theme);
return React.createElement("li", {
style: style,
key: id,
onMouseOver: function() {
return _this2.handleCrumbMouseOver(id);
},
onMouseOut: function() {
return _this2.handleCrumbMouseOut(id);
},
onClick: isSelected ? null : function() {
return _this2.props.select(id);
}
}, node.get("name") || '"' + node.get("text") + '"');
}));
}
} ]), Breadcrumb;
}(React.Component);
Breadcrumb.contextTypes = {
theme: React.PropTypes.object.isRequired
};
var containerStyle = function(theme) {
return {
fontFamily: sansSerif.family,
listStyle: "none",
padding: 0,
margin: 0,
maxHeight: "80px",
overflow: "auto",
marginTop: "2px",
backgroundColor: theme.base01,
borderTop: "1px solid " + theme.base03
};
}, itemStyle = function(isSelected, isComposite, theme) {
var color = void 0;
return isSelected ? color = theme.state02 : isComposite && (color = theme.special05),
{
backgroundColor: isSelected ? theme.state00 : "transparent",
color: color,
cursor: isSelected ? "default" : "pointer",
padding: "0.25rem 0.5rem",
WebkitUserSelect: "none",
MozUserSelect: "none",
userSelect: "none",
display: "inline-block",
marginRight: "2px"
};
};
module.exports = decorate({
listeners: function() {
return [ "breadcrumbHead", "selected" ];
},
props: function(store, _props) {
return {
select: function(id) {
return store.selectBreadcrumb(id);
},
hover: function(id, isHovered) {
return store.setHover(id, isHovered, !1);
},
selected: store.selected,
path: getBreadcrumbPath(store)
};
}
}, Breadcrumb);
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
}
return target;
}, _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), React = __webpack_require__(6), decorate = __webpack_require__(38), Props = __webpack_require__(227), _require = __webpack_require__(212), getInvertedWeak = _require.getInvertedWeak, hexToRgba = _require.hexToRgba, Node = function(_React$Component) {
function Node() {
var _ref, _temp, _this, _ret;
_classCallCheck(this, Node);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
return _temp = _this = _possibleConstructorReturn(this, (_ref = Node.__proto__ || Object.getPrototypeOf(Node)).call.apply(_ref, [ this ].concat(args))),
_this.state = {
isWindowFocused: !0
}, _this._handleWindowFocus = function() {
setTimeout(function() {
if (_this._ownerWindow) {
var doc = _this._ownerWindow.document;
_this.setState({
isWindowFocused: doc.hasFocus()
});
}
}, 50);
}, _this._handleWindowBlur = function() {
_this.setState({
isWindowFocused: !1
});
}, _ret = _temp, _possibleConstructorReturn(_this, _ret);
}
return _inherits(Node, _React$Component), _createClass(Node, [ {
key: "shouldComponentUpdate",
value: function(nextProps, nextState) {
return nextProps !== this.props || nextState.isWindowFocused !== this.state.isWindowFocused;
}
}, {
key: "componentDidMount",
value: function() {
this.props.selected && (this.ensureInView(), this.subscribeToWindowFocus());
}
}, {
key: "componentDidUpdate",
value: function(prevProps) {
this.props.selected && !prevProps.selected ? (this.ensureInView(), this.subscribeToWindowFocus()) : !this.props.selected && prevProps.selected && this.unsubscribeFromWindowFocus();
}
}, {
key: "componentWillUnmount",
value: function() {
this.props.selected && this.unsubscribeFromWindowFocus(), this._ownerWindow = null;
}
}, {
key: "findOwnerWindow",
value: function() {
if (!this._head) return null;
var doc = this._head.ownerDocument;
if (!doc) return null;
var win = doc.defaultView;
return win ? win : null;
}
}, {
key: "subscribeToWindowFocus",
value: function() {
if (this._ownerWindow || (this._ownerWindow = this.findOwnerWindow(), this._ownerWindow)) {
var win = this._ownerWindow;
win.addEventListener("focus", this._handleWindowFocus), win.addEventListener("blur", this._handleWindowBlur),
this.props.selected && this.setState({
isWindowFocused: win.document.hasFocus()
});
}
}
}, {
key: "unsubscribeFromWindowFocus",
value: function() {
if (this._ownerWindow) {
var win = this._ownerWindow;
win.removeEventListener("focus", this._handleWindowFocus), win.removeEventListener("blur", this._handleWindowBlur);
}
}
}, {
key: "ensureInView",
value: function() {
var node = this.props.isBottomTagSelected ? this._tail : this._head;
node && this.context.scrollTo(node);
}
}, {
key: "render",
value: function() {
var _this2 = this, theme = this.context.theme, _props = this.props, depth = _props.depth, hovered = _props.hovered, isBottomTagHovered = _props.isBottomTagHovered, isBottomTagSelected = _props.isBottomTagSelected, node = _props.node, onContextMenu = _props.onContextMenu, onHover = _props.onHover, onHoverBottom = _props.onHoverBottom, onSelect = _props.onSelect, onSelectBottom = _props.onSelectBottom, onToggleCollapse = _props.onToggleCollapse, searchRegExp = _props.searchRegExp, selected = _props.selected, wrappedChildren = _props.wrappedChildren, isWindowFocused = this.state.isWindowFocused;
if (!node) return React.createElement("span", null, "Node was deleted");
var children = node.get("children");
if ("Wrapper" === node.get("nodeType")) return React.createElement("span", null, children.map(function(child) {
return React.createElement(WrappedNode, {
key: child,
id: child,
depth: depth
});
}));
"NativeWrapper" === node.get("nodeType") && (children = wrappedChildren);
var collapsed = node.get("collapsed"), inverted = selected && isWindowFocused, sharedHeadBracketStyle = bracketStyle(inverted && !isBottomTagSelected, theme), sharedTailBracketStyle = bracketStyle(inverted && isBottomTagSelected, theme), sharedHeadStyle = headStyle({
depth: depth,
isBottomTagHovered: isBottomTagHovered,
isBottomTagSelected: isBottomTagSelected,
isCollapsed: collapsed,
isHovered: hovered,
isSelected: selected,
isWindowFocused: isWindowFocused,
theme: theme
}), headEvents = {
onContextMenu: onContextMenu,
onDoubleClick: onToggleCollapse,
onMouseOver: function() {
return onHover(!0);
},
onMouseOut: function() {
return onHover(!1);
},
onMouseDown: onSelect
}, tailEvents = {
onContextMenu: onContextMenu,
onDoubleClick: onToggleCollapse,
onMouseOver: function() {
return onHoverBottom(!0);
},
onMouseOut: function() {
return onHoverBottom(!1);
},
onMouseDown: onSelectBottom
}, nodeType = node.get("nodeType");
if ("Text" === nodeType || "Empty" === nodeType) {
var tag = void 0;
if ("Text" === nodeType) {
var text = node.get("text");
tag = React.createElement("span", {
style: tagTextStyle(inverted, theme)
}, '"', text, '"');
} else "Empty" === nodeType && (tag = React.createElement("span", {
style: tagTextStyle(inverted, theme)
}, React.createElement("span", {
style: styles.falseyLiteral
}, "null")));
return React.createElement("div", {
style: styles.container
}, React.createElement("div", _extends({
ref: function(h) {
return _this2._head = h;
},
style: sharedHeadStyle
}, headEvents), tag));
}
var isCustom = "Composite" === nodeType, name = node.get("name") + "";
if (searchRegExp) {
for (var unmatched = name.split(searchRegExp), matched = name.match(searchRegExp), pieces = [ React.createElement("span", {
key: 0
}, unmatched.shift()) ]; unmatched.length > 0; ) pieces.push(React.createElement("span", {
key: pieces.length,
style: highlightStyle(theme)
}, matched.shift())), pieces.push(React.createElement("span", {
key: pieces.length
}, unmatched.shift()));
name = React.createElement("span", null, pieces);
}
if (!children || "string" == typeof children || !children.length) {
var jsxSingleLineTagStyle = jsxTagStyle(inverted, isCustom, theme), content = children, _isCollapsed = null === content || void 0 === content;
return React.createElement("div", {
style: styles.container
}, React.createElement("div", _extends({
style: sharedHeadStyle,
ref: function(h) {
return _this2._head = h;
}
}, headEvents), React.createElement("span", null, React.createElement("span", null, React.createElement("span", {
style: sharedHeadBracketStyle
}, "<"), React.createElement("span", {
style: jsxSingleLineTagStyle
}, name), node.get("key") && React.createElement(Props, {
key: "key",
props: {
key: node.get("key")
},
inverted: inverted
}), node.get("ref") && React.createElement(Props, {
key: "ref",
props: {
ref: node.get("ref")
},
inverted: inverted
}), node.get("props") && React.createElement(Props, {
key: "props",
props: node.get("props"),
inverted: inverted
}), React.createElement("span", {
style: sharedHeadBracketStyle
}, _isCollapsed ? " />" : ">")), !_isCollapsed && [ React.createElement("span", {
key: "content"
}, content), React.createElement("span", {
key: "close"
}, React.createElement("span", {
style: sharedHeadBracketStyle
}, ""), React.createElement("span", {
style: jsxSingleLineTagStyle
}, name), React.createElement("span", {
style: sharedHeadBracketStyle
}, ">")) ], selected && React.createElement("span", {
style: jsxSingleLineTagStyle
}, " == $r"))));
}
var jsxCloseTagStyle = jsxTagStyle(inverted && (isBottomTagSelected || collapsed), isCustom, theme), closeTagBracketStyle = collapsed ? sharedHeadBracketStyle : sharedTailBracketStyle, closeTag = React.createElement("span", null, React.createElement("span", {
style: closeTagBracketStyle
}, ""), React.createElement("span", {
style: jsxCloseTagStyle
}, name), React.createElement("span", {
style: closeTagBracketStyle
}, ">"), selected && (collapsed && !this.props.isBottomTagSelected || this.props.isBottomTagSelected) && React.createElement("span", {
style: jsxCloseTagStyle
}, " == $r")), hasState = !!node.get("state") || !!node.get("context"), headInverted = inverted && !isBottomTagSelected, collapser = React.createElement("span", {
title: hasState ? "This component is stateful." : null,
onClick: onToggleCollapse,
style: collapserStyle(depth)
}, React.createElement("span", {
style: arrowStyle(collapsed, hasState, headInverted, theme)
})), jsxOpenTagStyle = jsxTagStyle(inverted && !isBottomTagSelected, isCustom, theme), head = React.createElement("div", _extends({
ref: function(h) {
return _this2._head = h;
},
style: sharedHeadStyle
}, headEvents), collapser, React.createElement("span", null, React.createElement("span", {
style: sharedHeadBracketStyle
}, "<"), React.createElement("span", {
style: jsxOpenTagStyle
}, name), node.get("key") && React.createElement(Props, {
key: "key",
props: {
key: node.get("key")
},
inverted: headInverted
}), node.get("ref") && React.createElement(Props, {
key: "ref",
props: {
ref: node.get("ref")
},
inverted: headInverted
}), node.get("props") && React.createElement(Props, {
key: "props",
props: node.get("props"),
inverted: headInverted
}), React.createElement("span", {
style: sharedHeadBracketStyle
}, ">"), selected && !collapsed && !this.props.isBottomTagSelected && React.createElement("span", {
style: jsxOpenTagStyle
}, " == $r")), collapsed && React.createElement("span", null, "…"), collapsed && closeTag);
if (collapsed) return React.createElement("div", {
style: styles.container
}, head);
var tailStyleActual = tailStyle({
depth: depth,
isBottomTagHovered: isBottomTagHovered,
isBottomTagSelected: isBottomTagSelected,
isHovered: hovered,
isSelected: selected,
isWindowFocused: isWindowFocused,
theme: theme
});
return React.createElement("div", {
style: styles.container
}, head, React.createElement("div", {
style: guidelineStyle(depth, selected, hovered, isBottomTagHovered, theme)
}), React.createElement("div", null, children.map(function(id) {
return React.createElement(WrappedNode, {
key: id,
depth: depth + 1,
id: id
});
})), React.createElement("div", _extends({
ref: function(t) {
return _this2._tail = t;
},
style: tailStyleActual
}, tailEvents), closeTag));
}
} ]), Node;
}(React.Component);
Node.contextTypes = {
scrollTo: React.PropTypes.func,
theme: React.PropTypes.object.isRequired
};
var WrappedNode = decorate({
listeners: function(props) {
return [ props.id ];
},
props: function(store, _props2) {
var node = store.get(_props2.id), wrappedChildren = null;
if (node && "NativeWrapper" === node.get("nodeType")) {
var child = store.get(node.get("children")[0]);
wrappedChildren = child && child.get("children");
}
return {
node: node,
wrappedChildren: wrappedChildren,
selected: store.selected === _props2.id,
isBottomTagSelected: store.isBottomTagSelected,
isBottomTagHovered: store.isBottomTagHovered,
hovered: store.hovered === _props2.id,
searchRegExp: _props2.searchRegExp,
onToggleCollapse: function(e) {
e.preventDefault(), store.toggleCollapse(_props2.id);
},
onHover: function(isHovered) {
return store.setHover(_props2.id, isHovered, !1);
},
onHoverBottom: function(isHovered) {
return store.setHover(_props2.id, isHovered, !0);
},
onSelect: function(e) {
store.selectTop(_props2.id);
},
onSelectBottom: function(e) {
store.selectBottom(_props2.id);
},
onContextMenu: function(e) {
store.showContextMenu("tree", e, _props2.id, node);
}
};
},
shouldUpdate: function(nextProps, prevProps) {
return nextProps.id !== prevProps.id || nextProps.searchRegExp !== prevProps.searchRegExp;
}
}, Node), calcPaddingLeft = function(depth) {
return 5 + 10 * (depth + 1);
}, paddingRight = 5, headStyle = function(_ref2) {
var depth = _ref2.depth, isBottomTagHovered = _ref2.isBottomTagHovered, isBottomTagSelected = _ref2.isBottomTagSelected, isCollapsed = _ref2.isCollapsed, isHovered = _ref2.isHovered, isSelected = _ref2.isSelected, isWindowFocused = _ref2.isWindowFocused, theme = _ref2.theme, backgroundColor = void 0;
!isSelected || !isCollapsed && isBottomTagSelected ? !isHovered || !isCollapsed && isBottomTagHovered || (backgroundColor = theme.state03) : backgroundColor = isWindowFocused ? theme.state00 : theme.state01;
var isInverted = isSelected && isWindowFocused && !isBottomTagSelected, color = isInverted ? theme.state02 : void 0;
return {
cursor: "default",
borderTop: "1px solid transparent",
position: "relative",
display: "flex",
paddingLeft: calcPaddingLeft(depth),
paddingRight: paddingRight,
backgroundColor: backgroundColor,
color: color
};
}, jsxTagStyle = function(inverted, isCustom, theme) {
var color = void 0;
return color = inverted ? theme.state02 : isCustom ? theme.special00 : theme.special07,
{
color: color
};
}, tagTextStyle = function(inverted, theme) {
return {
flex: 1,
whiteSpace: "nowrap",
color: inverted ? getInvertedWeak(theme.state02) : theme.special06
};
}, collapserStyle = function(depth) {
return {
position: "absolute",
padding: 2,
left: calcPaddingLeft(depth) - 12
};
}, arrowStyle = function(isCollapsed, hasState, isHeadInverted, theme) {
var borderColor = theme.base05;
return isHeadInverted ? borderColor = theme.base00 : hasState && (borderColor = theme.special00),
isCollapsed ? {
borderStyle: "solid",
borderWidth: "4px 0 4px 7px",
borderColor: "transparent transparent transparent " + borderColor,
display: "inline-block",
marginLeft: 1,
verticalAlign: "top"
} : {
borderStyle: "solid",
borderWidth: "7px 4px 0 4px",
borderColor: borderColor + " transparent transparent transparent",
display: "inline-block",
marginTop: 1,
verticalAlign: "top"
};
}, bracketStyle = function(inverted, theme) {
return {
color: inverted ? getInvertedWeak(theme.state02) : theme.special07
};
}, highlightStyle = function(theme) {
return {
backgroundColor: theme.state04,
color: theme.state05
};
}, tailStyle = function(_ref3) {
var depth = _ref3.depth, isBottomTagHovered = _ref3.isBottomTagHovered, isBottomTagSelected = _ref3.isBottomTagSelected, isHovered = _ref3.isHovered, isSelected = _ref3.isSelected, isWindowFocused = _ref3.isWindowFocused, theme = _ref3.theme, backgroundColor = void 0;
isSelected && isBottomTagSelected ? backgroundColor = isWindowFocused ? theme.state00 : theme.state01 : isHovered && isBottomTagHovered && (backgroundColor = theme.state03);
var isInverted = isSelected && isWindowFocused && isBottomTagSelected, color = isInverted ? theme.base04 : void 0;
return {
borderTop: "1px solid transparent",
cursor: "default",
paddingLeft: calcPaddingLeft(depth),
paddingRight: paddingRight,
backgroundColor: backgroundColor,
color: color
};
}, guidelineStyle = function(depth, isSelected, isHovered, isBottomTagHovered, theme) {
var borderLeftColor = "transparent";
return isSelected ? borderLeftColor = hexToRgba(theme.state00, .45) : isHovered && !isBottomTagHovered && (borderLeftColor = hexToRgba(theme.base04, .2)),
{
position: "absolute",
width: "1px",
borderLeft: "1px solid " + borderLeftColor,
top: 16,
bottom: 0,
willChange: "opacity",
left: calcPaddingLeft(depth) - 7,
zIndex: isSelected ? 1 : 0
};
}, styles = {
container: {
flexShrink: 0,
position: "relative",
whiteSpace: "nowrap"
},
falseyLiteral: {
fontStyle: "italic"
}
};
module.exports = WrappedNode;
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
var _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj) {
return typeof obj;
} : function(obj) {
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
}, _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), React = __webpack_require__(6), PropVal = __webpack_require__(209), _require = __webpack_require__(212), getInvertedMid = _require.getInvertedMid, Props = function(_React$Component) {
function Props() {
return _classCallCheck(this, Props), _possibleConstructorReturn(this, (Props.__proto__ || Object.getPrototypeOf(Props)).apply(this, arguments));
}
return _inherits(Props, _React$Component), _createClass(Props, [ {
key: "shouldComponentUpdate",
value: function(nextProps) {
return nextProps.props !== this.props.props || nextProps.inverted !== this.props.inverted;
}
}, {
key: "render",
value: function() {
var theme = this.context.theme, _props = this.props, inverted = _props.inverted, props = _props.props;
if (!props || "object" !== ("undefined" == typeof props ? "undefined" : _typeof(props))) return React.createElement("span", null);
var names = Object.keys(props).filter(function(name) {
return "_" !== name[0] && "children" !== name;
}), items = [];
return names.slice(0, 3).forEach(function(name) {
items.push(React.createElement("span", {
key: "prop-" + name,
style: propStype(inverted, theme)
}, React.createElement("span", {
style: attributeNameStyle(inverted, theme)
}, name), "=", React.createElement(PropVal, {
val: props[name],
inverted: inverted
})));
}), names.length > 3 && items.push(React.createElement("span", {
key: "ellipsis",
style: ellipsisStyle(inverted, theme)
}, "…")), React.createElement("span", null, items);
}
} ]), Props;
}(React.Component);
Props.contextTypes = {
theme: React.PropTypes.object.isRequired
};
var attributeNameStyle = function(isInverted, theme) {
return {
color: isInverted ? getInvertedMid(theme.state02) : theme.special06
};
}, ellipsisStyle = function(isInverted, theme) {
return {
color: isInverted ? getInvertedMid(theme.state02) : theme.special06
};
}, propStype = function(isInverted, theme) {
return {
paddingLeft: 5,
color: isInverted ? getInvertedMid(theme.state02) : theme.special06
};
};
module.exports = Props;
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), React = __webpack_require__(6), decorate = __webpack_require__(38), _require = __webpack_require__(35), sansSerif = _require.sansSerif, _require2 = __webpack_require__(229), CUSTOM_THEME_NAME = _require2.CUSTOM_THEME_NAME, Icons = __webpack_require__(222), SvgIcon = __webpack_require__(221), ThemeEditor = __webpack_require__(230), Hoverable = __webpack_require__(223), PreferencesPanel = function(_React$Component) {
function PreferencesPanel(props, context) {
_classCallCheck(this, PreferencesPanel);
var _this = _possibleConstructorReturn(this, (PreferencesPanel.__proto__ || Object.getPrototypeOf(PreferencesPanel)).call(this, props, context));
return _this._changeTheme = function(event) {
var changeTheme = _this.props.changeTheme;
changeTheme(event.target.value);
}, _this._hide = function() {
var hide = _this.props.hide, editMode = _this.state.editMode;
editMode ? _this.setState({
editMode: !1
}) : hide();
}, _this._onEditCustomThemeClick = function() {
_this.setState({
editMode: !0
});
}, _this._onKeyUp = function(_ref) {
var key = _ref.key;
"Escape" === key && _this.props.hide();
}, _this._setSelectRef = function(ref) {
_this._selectRef = ref;
}, _this.state = {
editMode: !1
}, _this;
}
return _inherits(PreferencesPanel, _React$Component), _createClass(PreferencesPanel, [ {
key: "componentDidMount",
value: function(prevProps, prevState) {
this.props.open && this._selectRef.focus();
}
}, {
key: "componentDidUpdate",
value: function(prevProps, prevState) {
this.props.open && !prevProps.open && this._selectRef.focus();
}
}, {
key: "render",
value: function() {
var _context = this.context, browserName = _context.browserName, showHiddenThemes = _context.showHiddenThemes, theme = _context.theme, themeName = _context.themeName, themes = _context.themes, _props = this.props, hasCustomTheme = _props.hasCustomTheme, hide = _props.hide, open = _props.open, editMode = this.state.editMode;
if (!open) return null;
var content = void 0;
if (editMode) content = React.createElement(ThemeEditor, {
hide: this._hide,
theme: theme
}); else {
var themeNames = Object.keys(themes);
showHiddenThemes || (themeNames = themeNames.filter(function(key) {
return !themes[key].hidden;
})), content = React.createElement("div", {
style: panelStyle(theme),
onClick: blockClick
}, React.createElement("h4", {
style: styles.header
}, "Theme"), React.createElement("div", {
style: styles.selectAndPreviewRow
}, React.createElement("select", {
onChange: this._changeTheme,
onKeyUp: this._onKeyUp,
ref: this._setSelectRef,
value: themeName
}, browserName && React.createElement("option", {
value: ""
}, browserName), hasCustomTheme && React.createElement("option", {
value: CUSTOM_THEME_NAME
}, "Custom"), (browserName || hasCustomTheme) && React.createElement("option", {
disabled: "disabled"
}, "---"), themeNames.map(function(key) {
return React.createElement("option", {
key: key,
value: key
}, themes[key].displayName);
})), React.createElement(EditButton, {
onClick: this._onEditCustomThemeClick,
theme: theme
}, React.createElement(EditIcon, null))), React.createElement("div", {
style: styles.buttonBar
}, React.createElement("button", {
onClick: hide,
style: styles.button
}, "Close")));
}
return React.createElement("div", {
style: styles.backdrop,
onClick: this._hide
}, content);
}
} ]), PreferencesPanel;
}(React.Component);
PreferencesPanel.contextTypes = {
browserName: React.PropTypes.string.isRequired,
showHiddenThemes: React.PropTypes.bool.isRequired,
theme: React.PropTypes.object.isRequired,
themeName: React.PropTypes.string.isRequired,
themes: React.PropTypes.object.isRequired
}, PreferencesPanel.propTypes = {
changeTheme: React.PropTypes.func,
hide: React.PropTypes.func,
open: React.PropTypes.bool
};
var EditButton = Hoverable(function(_ref2) {
var isHovered = _ref2.isHovered, onClick = _ref2.onClick, onMouseEnter = _ref2.onMouseEnter, onMouseLeave = _ref2.onMouseLeave, theme = _ref2.theme;
return React.createElement("button", {
onClick: onClick,
onMouseEnter: onMouseEnter,
onMouseLeave: onMouseLeave,
style: buttonStyle(isHovered, theme)
}, React.createElement(EditIcon, null));
}), EditIcon = function() {
return React.createElement(SvgIcon, {
path: Icons.EDIT
});
}, blockClick = function(event) {
return event.stopPropagation();
}, WrappedPreferencesPanel = decorate({
listeners: function() {
return [ "preferencesPanelShown" ];
},
props: function(store, _props2) {
return {
changeTheme: function(themeName) {
return store.changeTheme(themeName);
},
hasCustomTheme: !!store.themeStore.customTheme,
hide: function() {
return store.hidePreferencesPanel();
},
open: store.preferencesPanelShown
};
}
}, PreferencesPanel), panelStyle = function(theme) {
return {
maxWidth: "100%",
margin: "0.5rem",
padding: "0.5rem",
borderRadius: "0.25rem",
display: "flex",
flexDirection: "column",
alignItems: "flex-start",
zIndex: 1,
fontFamily: sansSerif.family,
backgroundColor: theme.base01,
border: "1px solid " + theme.base03,
color: theme.base05
};
}, buttonStyle = function(isHovered, theme) {
return {
padding: "0.25rem",
marginLeft: "0.25rem",
height: "1.5rem",
background: "none",
border: "none",
color: isHovered ? theme.state06 : "inherit"
};
}, styles = {
backdrop: {
position: "fixed",
zIndex: 1,
width: "100%",
height: "100%",
top: 0,
left: 0,
display: "flex",
justifyContent: "center",
alignItems: "center",
backgroundColor: "rgba(0,0,0,0)"
},
header: {
margin: "0 0 0.25rem"
},
buttonBar: {
flexDirection: "row"
},
button: {
marginTop: "0.5rem",
marginRight: "0.25rem",
padding: "0.25rem"
},
selectAndPreviewRow: {
display: "flex",
direction: "row",
alignItems: "center"
}
};
module.exports = WrappedPreferencesPanel;
}, function(module, exports) {
"use strict";
var CUSTOM_THEME_NAME = "Custom";
module.exports = {
CUSTOM_THEME_NAME: CUSTOM_THEME_NAME
};
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), _require = __webpack_require__(231), copy = _require.copy, decorate = __webpack_require__(38), React = __webpack_require__(6), ColorInput = __webpack_require__(232), ColorGroups = __webpack_require__(469), Hoverable = __webpack_require__(223), Icons = __webpack_require__(222), Input = __webpack_require__(41), _require2 = __webpack_require__(35), monospace = _require2.monospace, sansSerif = _require2.sansSerif, Preview = __webpack_require__(470), SvgIcon = __webpack_require__(221), Themes = __webpack_require__(471), TimerSafe = __webpack_require__(472), _require3 = __webpack_require__(473), deserialize = _require3.deserialize, serialize = _require3.serialize, _require4 = __webpack_require__(229), CUSTOM_THEME_NAME = _require4.CUSTOM_THEME_NAME, THEME_SITE_URL = "http://facebook.github.io/react-devtools/?theme=", safeTheme = Themes.ChromeDefault, colors = Object.assign({}, ColorGroups.Base, ColorGroups.Selection, ColorGroups.Syntax), Editor = function(_React$Component) {
function Editor(props, context) {
_classCallCheck(this, Editor);
var _this = _possibleConstructorReturn(this, (Editor.__proto__ || Object.getPrototypeOf(Editor)).call(this, props, context));
return _this._copyTheme = function() {
var serializedTheme = encodeURI(serialize(_this._customTheme));
copy(THEME_SITE_URL + serializedTheme), _this.setState({
showCopyConfirmation: !0
}, function() {
_this.props.setTimeout(function() {
return _this.setState({
showCopyConfirmation: !1
});
}, 2500);
});
}, _this._onShareChange = function(event) {
_this._customTheme = deserialize(event.target.value, _this.props.theme), _this._sanitizeCustomTheme(),
_this._udpatePreview();
}, _this._udpatePreview = function() {
_this.setState(function(state) {
return {
isResetEnabled: _this._serializedPropsTheme !== serialize(_this._customTheme),
updateCounter: state.updateCounter + 1
};
});
}, _this._reset = function() {
_this._customTheme = Object.assign({}, _this.props.theme), _this._udpatePreview();
}, _this._save = function() {
var _this$props = _this.props, changeTheme = _this$props.changeTheme, hide = _this$props.hide, saveTheme = _this$props.saveTheme;
saveTheme(_this._customTheme), changeTheme(CUSTOM_THEME_NAME), hide();
}, _this.state = {
isResetEnabled: !1,
showCopyConfirmation: !1,
updateCounter: 0
}, _this._serializedPropsTheme = serialize(props.theme), _this._reset(), _this._sanitizeCustomTheme(),
_this;
}
return _inherits(Editor, _React$Component), _createClass(Editor, [ {
key: "getChildContext",
value: function() {
return {
theme: this._customTheme
};
}
}, {
key: "render",
value: function() {
var _this2 = this, hide = this.props.hide, _state = this.state, isResetEnabled = _state.isResetEnabled, showCopyConfirmation = _state.showCopyConfirmation, updateCounter = _state.updateCounter;
return React.createElement("div", {
onClick: function(event) {
return event.stopPropagation();
},
style: editorStyle(safeTheme)
}, React.createElement("h3", {
style: styles.header
}, "Custom Theme"), React.createElement("div", {
style: styles.middleRow
}, React.createElement("div", {
style: groupStyle(safeTheme)
}, Object.keys(colors).map(function(key) {
return React.createElement(ColorInput, {
descriptions: colors[key],
customTheme: _this2._customTheme,
key: key,
label: colors[key],
propertyName: key,
udpatePreview: _this2._udpatePreview,
theme: safeTheme
});
})), React.createElement("div", {
style: previewWrapperStyle(this._customTheme)
}, React.createElement(Preview, {
key: updateCounter,
theme: this._customTheme
}))), React.createElement("div", {
style: styles.bottomRow
}, React.createElement("div", {
style: styles.buttons
}, React.createElement("button", {
onClick: hide
}, "Cancel"), " ", React.createElement("button", {
disabled: !isResetEnabled,
onClick: this._reset
}, "Reset"), " ", React.createElement("button", {
onClick: this._save
}, "Save")), React.createElement("div", {
style: styles.importExportRow
}, React.createElement(CopyThemeButton, {
onClick: this._copyTheme,
showCopyConfirmation: showCopyConfirmation,
title: "Copy theme to clipboard",
theme: safeTheme
}), React.createElement(SvgIcon, {
path: Icons.SHARE
}), React.createElement("label", {
style: styles.shareLabel
}, "Import/export:"), React.createElement(Input, {
onChange: this._onShareChange,
style: shareInput(safeTheme),
theme: safeTheme,
type: "text",
value: serialize(this._customTheme)
}))));
}
}, {
key: "_sanitizeCustomTheme",
value: function() {
this._customTheme.displayName = CUSTOM_THEME_NAME, delete this._customTheme.hidden;
}
} ]), Editor;
}(React.Component);
Editor.childContextTypes = {
theme: React.PropTypes.object
};
var WrappedEditor = decorate({
listeners: function() {
return [];
},
props: function(store, _props) {
return {
changeTheme: function(themeName) {
return store.changeTheme(themeName);
},
defaultThemeName: store.themeStore.defaultThemeName,
saveTheme: function(theme) {
return store.saveCustomTheme(theme);
}
};
}
}, TimerSafe(Editor)), CopyThemeButton = Hoverable(function(_ref) {
var isHovered = _ref.isHovered, isPressed = _ref.isPressed, onClick = _ref.onClick, onMouseDown = _ref.onMouseDown, onMouseEnter = _ref.onMouseEnter, onMouseLeave = _ref.onMouseLeave, onMouseUp = _ref.onMouseUp, showCopyConfirmation = _ref.showCopyConfirmation, theme = _ref.theme;
return React.createElement("button", {
onClick: onClick,
onMouseDown: onMouseDown,
onMouseEnter: onMouseEnter,
onMouseLeave: onMouseLeave,
onMouseUp: onMouseUp,
style: copyThemeButtonStyle(isHovered, isPressed, theme),
title: "Copy theme to clipboard"
}, React.createElement(SvgIcon, {
path: showCopyConfirmation ? Icons.CHECK : Icons.COPY
}), React.createElement("label", {
style: styles.copyLabel
}, showCopyConfirmation ? "Copied" : "Copy"));
}), editorStyle = function(theme) {
return {
display: "flex",
flexDirection: "column",
maxWidth: "calc(100vw - 2rem)",
maxHeight: "calc(100vh - 2rem)",
boxSizing: "border-box",
zIndex: 1,
padding: "0.5rem",
borderRadius: "0.25rem",
backgroundColor: theme.base01,
color: theme.base05,
border: "1px solid " + theme.base03,
fontFamily: sansSerif.family,
fontSize: sansSerif.sizes.normal
};
}, groupStyle = function(theme) {
return {
display: "flex",
flexDirection: "row",
flexWrap: "wrap",
overflowY: "auto",
borderRadius: "0.25rem"
};
}, previewWrapperStyle = function(theme) {
return {
display: "inline-flex",
flex: "1 0 auto",
marginLeft: "0.5rem",
alignItems: "stretch",
borderRadius: "0.25rem",
border: "1px solid " + theme.base03
};
}, shareInput = function(theme) {
return {
flex: "0 1 15rem",
padding: "0.25rem",
border: "1px solid " + theme.base03,
borderRadius: "0.25rem",
fontFamily: monospace.family,
fontSize: monospace.sizes.normal,
color: "inherit"
};
}, copyThemeButtonStyle = function(isHovered, isPressed, theme) {
return {
flex: "0 0 auto",
display: "flex",
alignItems: "center",
padding: "0.25rem",
margin: "0 0.25rem",
height: "1.5rem",
background: isPressed ? theme.state01 : "none",
border: "none",
color: isHovered ? theme.state06 : "inherit"
};
}, styles = {
header: {
flex: "0 0 auto",
marginTop: 0,
marginBottom: "0.5rem"
},
bottomRow: {
flex: "0 0 auto",
display: "flex",
flexDirection: "row",
alignItems: "center",
marginTop: "0.5rem"
},
buttons: {
flex: "1 0 auto",
marginTop: "0.5rem"
},
copyLabel: {
flex: "0 0 auto",
marginLeft: "0.25rem"
},
middleRow: {
display: "flex",
flexDirection: "row",
flex: "0 1 auto",
overflowY: "auto"
},
column: {
display: "flex",
flexDirection: "column"
},
importExportRow: {
display: "flex",
flexDirection: "row",
alignItems: "center",
flex: "0 0 auto",
marginTop: "0.5rem"
},
shareLabel: {
flex: "0 0 auto",
margin: "0 0.25rem"
}
};
module.exports = WrappedEditor;
}, function(module, exports, __webpack_require__) {
!function(name, definition) {
module.exports = definition();
}("clipboard", function() {
if ("undefined" == typeof document || !document.addEventListener) return null;
var clipboard = {};
/*! promise-polyfill 2.0.1 */
return clipboard.copy = function() {
function cleanup() {
_intercept = !1, _data = null, _bogusSelection && window.getSelection().removeAllRanges(),
_bogusSelection = !1;
}
function bogusSelect() {
var sel = document.getSelection();
if (!document.queryCommandEnabled("copy") && sel.isCollapsed) {
var range = document.createRange();
range.selectNodeContents(document.body), sel.removeAllRanges(), sel.addRange(range),
_bogusSelection = !0;
}
}
var _intercept = !1, _data = null, _bogusSelection = !1;
return document.addEventListener("copy", function(e) {
if (_intercept) {
for (var key in _data) e.clipboardData.setData(key, _data[key]);
e.preventDefault();
}
}), function(data) {
return new Promise(function(resolve, reject) {
function triggerCopy(tryBogusSelect) {
try {
if (document.execCommand("copy")) cleanup(), resolve(); else {
if (tryBogusSelect) throw new Error("Unable to copy. Perhaps it's not available in your browser?");
bogusSelect(), triggerCopy(!0);
}
} catch (e) {
cleanup(), reject(e);
}
}
_intercept = !0, _data = "string" == typeof data ? {
"text/plain": data
} : data instanceof Node ? {
"text/html": new XMLSerializer().serializeToString(data)
} : data, triggerCopy(!1);
});
};
}(), clipboard.paste = function() {
var _resolve, _dataType, _intercept = !1;
return document.addEventListener("paste", function(e) {
if (_intercept) {
_intercept = !1, e.preventDefault();
var resolve = _resolve;
_resolve = null, resolve(e.clipboardData.getData(_dataType));
}
}), function(dataType) {
return new Promise(function(resolve, reject) {
_intercept = !0, _resolve = resolve, _dataType = dataType || "text/plain";
try {
document.execCommand("paste") || (_intercept = !1, reject(new Error("Unable to paste. Pasting only works in Internet Explorer at the moment.")));
} catch (e) {
_intercept = !1, reject(new Error(e));
}
});
};
}(), "undefined" == typeof ClipboardEvent && "undefined" != typeof window.clipboardData && "undefined" != typeof window.clipboardData.setData && (!function(a) {
function b(a, b) {
return function() {
a.apply(b, arguments);
};
}
function c(a) {
if ("object" != typeof this) throw new TypeError("Promises must be constructed via new");
if ("function" != typeof a) throw new TypeError("not a function");
this._state = null, this._value = null, this._deferreds = [], i(a, b(e, this), b(f, this));
}
function d(a) {
var b = this;
return null === this._state ? void this._deferreds.push(a) : void j(function() {
var c = b._state ? a.onFulfilled : a.onRejected;
if (null === c) return void (b._state ? a.resolve : a.reject)(b._value);
var d;
try {
d = c(b._value);
} catch (e) {
return void a.reject(e);
}
a.resolve(d);
});
}
function e(a) {
try {
if (a === this) throw new TypeError("A promise cannot be resolved with itself.");
if (a && ("object" == typeof a || "function" == typeof a)) {
var c = a.then;
if ("function" == typeof c) return void i(b(c, a), b(e, this), b(f, this));
}
this._state = !0, this._value = a, g.call(this);
} catch (d) {
f.call(this, d);
}
}
function f(a) {
this._state = !1, this._value = a, g.call(this);
}
function g() {
for (var a = 0, b = this._deferreds.length; b > a; a++) d.call(this, this._deferreds[a]);
this._deferreds = null;
}
function h(a, b, c, d) {
this.onFulfilled = "function" == typeof a ? a : null, this.onRejected = "function" == typeof b ? b : null,
this.resolve = c, this.reject = d;
}
function i(a, b, c) {
var d = !1;
try {
a(function(a) {
d || (d = !0, b(a));
}, function(a) {
d || (d = !0, c(a));
});
} catch (e) {
if (d) return;
d = !0, c(e);
}
}
var j = c.immediateFn || "function" == typeof setImmediate && setImmediate || function(a) {
setTimeout(a, 1);
}, k = Array.isArray || function(a) {
return "[object Array]" === Object.prototype.toString.call(a);
};
c.prototype["catch"] = function(a) {
return this.then(null, a);
}, c.prototype.then = function(a, b) {
var e = this;
return new c(function(c, f) {
d.call(e, new h(a, b, c, f));
});
}, c.all = function() {
var a = Array.prototype.slice.call(1 === arguments.length && k(arguments[0]) ? arguments[0] : arguments);
return new c(function(b, c) {
function d(f, g) {
try {
if (g && ("object" == typeof g || "function" == typeof g)) {
var h = g.then;
if ("function" == typeof h) return void h.call(g, function(a) {
d(f, a);
}, c);
}
a[f] = g, 0 === --e && b(a);
} catch (i) {
c(i);
}
}
if (0 === a.length) return b([]);
for (var e = a.length, f = 0; f < a.length; f++) d(f, a[f]);
});
}, c.resolve = function(a) {
return a && "object" == typeof a && a.constructor === c ? a : new c(function(b) {
b(a);
});
}, c.reject = function(a) {
return new c(function(b, c) {
c(a);
});
}, c.race = function(a) {
return new c(function(b, c) {
for (var d = 0, e = a.length; e > d; d++) a[d].then(b, c);
});
}, "undefined" != typeof module && module.exports ? module.exports = c : a.Promise || (a.Promise = c);
}(this), clipboard.copy = function(data) {
return new Promise(function(resolve, reject) {
if ("string" != typeof data && !("text/plain" in data)) throw new Error("You must provide a text/plain type.");
var strData = "string" == typeof data ? data : data["text/plain"], copySucceeded = window.clipboardData.setData("Text", strData);
copySucceeded ? resolve() : reject(new Error("Copying was rejected."));
});
}, clipboard.paste = function() {
return new Promise(function(resolve, reject) {
var strData = window.clipboardData.getData("Text");
strData ? resolve(strData) : reject(new Error("Pasting was rejected."));
});
}), clipboard;
});
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), React = __webpack_require__(6), _require = __webpack_require__(44), findDOMNode = _require.findDOMNode, Portal = __webpack_require__(233), ColorPicker = __webpack_require__(239), Input = __webpack_require__(41), _require2 = __webpack_require__(35), monospace = _require2.monospace, _require3 = __webpack_require__(212), getBrightness = _require3.getBrightness, isBright = _require3.isBright, ColorInput = function(_React$Component) {
function ColorInput(props, context) {
_classCallCheck(this, ColorInput);
var _this = _possibleConstructorReturn(this, (ColorInput.__proto__ || Object.getPrototypeOf(ColorInput)).call(this, props, context));
_initialiseProps.call(_this);
var customTheme = props.customTheme, propertyName = props.propertyName;
return _this.state = {
color: customTheme[propertyName],
isColorPickerOpen: !1,
maxHeight: null,
targetPosition: {
left: 0,
top: 0
}
}, _this;
}
return _inherits(ColorInput, _React$Component), _createClass(ColorInput, [ {
key: "componentWillReceiveProps",
value: function(nextProps) {
var customTheme = nextProps.customTheme, propertyName = nextProps.propertyName;
this.setState({
color: customTheme[propertyName]
});
}
}, {
key: "render",
value: function() {
var _props = this.props, label = _props.label, theme = _props.theme, _state = this.state, color = _state.color, isColorPickerOpen = _state.isColorPickerOpen, maxHeight = _state.maxHeight, targetPosition = _state.targetPosition, backgroundIsBright = isBright(theme.base00), chipIsBright = isBright(color), showColorChipBorder = backgroundIsBright === chipIsBright && getBrightness(color) > getBrightness(theme.base03);
return React.createElement("div", {
ref: this._setContainerRef,
style: containerStyle(maxHeight)
}, React.createElement("label", {
style: styles.label
}, label), React.createElement("div", {
style: inputContainerStyle(theme)
}, React.createElement("div", {
onClick: this._onClick,
ref: this._setColorChipRef,
style: colorChipStyle(theme, color, showColorChipBorder)
}), React.createElement(Input, {
onChange: this._onChange,
style: styles.input,
theme: theme,
type: "text",
value: color || ""
})), React.createElement(Portal, {
closeOnEsc: !0,
closeOnOutsideClick: !0,
isOpened: isColorPickerOpen,
onClose: this._onClose
}, React.createElement("div", {
style: colorPickerPosition(targetPosition)
}, React.createElement(ColorPicker, {
color: color,
theme: theme,
updateColor: this._updateColor
}))));
}
} ]), ColorInput;
}(React.Component), _initialiseProps = function() {
var _this2 = this;
this._onChange = function(_ref) {
var target = _ref.target;
_this2._updateColor(target.value);
}, this._onClick = function(event) {
var container = findDOMNode(_this2._containerRef), targetPosition = findDOMNode(_this2._colorChipRef).getBoundingClientRect();
_this2.setState({
isColorPickerOpen: !0,
maxHeight: container.offsetHeight,
targetPosition: targetPosition
});
}, this._onClose = function() {
_this2.setState({
isColorPickerOpen: !1
});
}, this._setColorChipRef = function(ref) {
_this2._colorChipRef = ref;
}, this._setContainerRef = function(ref) {
_this2._containerRef = ref;
}, this._updateColor = function(color) {
var _props2 = _this2.props, customTheme = _props2.customTheme, propertyName = _props2.propertyName, udpatePreview = _props2.udpatePreview;
customTheme[propertyName] = color, _this2.setState({
color: color
}), udpatePreview();
};
}, colorPickerPosition = function(position) {
return {
position: "absolute",
left: position.left + "px",
top: position.top + "px"
};
}, containerStyle = function(maxHeight) {
return {
margin: "0.25rem",
minWidth: "7.5rem",
maxHeight: maxHeight
};
}, colorChipStyle = function(theme) {
var color = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "", showBorder = arguments.length > 2 && void 0 !== arguments[2] && arguments[2];
return {
height: "1.25rem",
width: "1.25rem",
borderRadius: "2px",
backgroundColor: color,
boxSizing: "border-box",
border: showBorder ? "1px solid " + theme.base03 : "none"
};
}, inputContainerStyle = function(theme) {
return {
display: "flex",
flexDirection: "row",
alignItems: "center",
padding: "0.125rem",
flex: "0 0 1.25rem",
backgroundColor: theme.base00,
color: theme.base05,
border: "1px solid " + theme.base03,
borderRadius: "0.25rem"
};
}, styles = {
input: {
width: "5rem",
flex: "1 0 auto",
textTransform: "lowercase",
boxSizing: "border-box",
background: "transparent",
border: "none",
marginLeft: "0.25rem",
outline: "none",
color: "inherit",
fontFamily: monospace.family,
fontSize: monospace.sizes.large
},
label: {
marginBottom: "0.25rem",
display: "inline-block"
},
small: {
fontWeight: "normal"
}
};
module.exports = ColorInput;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
Object.defineProperty(exports, "__esModule", {
value: !0
});
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactDom = __webpack_require__(44), _reactDom2 = _interopRequireDefault(_reactDom), _propTypes = __webpack_require__(234), _propTypes2 = _interopRequireDefault(_propTypes), KEYCODES = {
ESCAPE: 27
}, Portal = function(_React$Component) {
function Portal() {
_classCallCheck(this, Portal);
var _this = _possibleConstructorReturn(this, (Portal.__proto__ || Object.getPrototypeOf(Portal)).call(this));
return _this.state = {
active: !1
}, _this.handleWrapperClick = _this.handleWrapperClick.bind(_this), _this.closePortal = _this.closePortal.bind(_this),
_this.handleOutsideMouseClick = _this.handleOutsideMouseClick.bind(_this), _this.handleKeydown = _this.handleKeydown.bind(_this),
_this.portal = null, _this.node = null, _this;
}
return _inherits(Portal, _React$Component), _createClass(Portal, [ {
key: "componentDidMount",
value: function() {
this.props.closeOnEsc && document.addEventListener("keydown", this.handleKeydown),
this.props.closeOnOutsideClick && (document.addEventListener("mouseup", this.handleOutsideMouseClick),
document.addEventListener("touchstart", this.handleOutsideMouseClick)), this.props.isOpened && this.openPortal();
}
}, {
key: "componentWillReceiveProps",
value: function(newProps) {
"undefined" != typeof newProps.isOpened && (newProps.isOpened && (this.state.active ? this.renderPortal(newProps) : this.openPortal(newProps)),
!newProps.isOpened && this.state.active && this.closePortal()), "undefined" == typeof newProps.isOpened && this.state.active && this.renderPortal(newProps);
}
}, {
key: "componentWillUnmount",
value: function() {
this.props.closeOnEsc && document.removeEventListener("keydown", this.handleKeydown),
this.props.closeOnOutsideClick && (document.removeEventListener("mouseup", this.handleOutsideMouseClick),
document.removeEventListener("touchstart", this.handleOutsideMouseClick)), this.closePortal(!0);
}
}, {
key: "handleWrapperClick",
value: function(e) {
e.preventDefault(), e.stopPropagation(), this.state.active || this.openPortal();
}
}, {
key: "openPortal",
value: function() {
var props = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.props;
this.setState({
active: !0
}), this.renderPortal(props), this.props.onOpen(this.node);
}
}, {
key: "closePortal",
value: function() {
var _this2 = this, isUnmounted = arguments.length > 0 && void 0 !== arguments[0] && arguments[0], resetPortalState = function() {
_this2.node && (_reactDom2["default"].unmountComponentAtNode(_this2.node), document.body.removeChild(_this2.node)),
_this2.portal = null, _this2.node = null, isUnmounted !== !0 && _this2.setState({
active: !1
});
};
this.state.active && (this.props.beforeClose ? this.props.beforeClose(this.node, resetPortalState) : resetPortalState(),
this.props.onClose());
}
}, {
key: "handleOutsideMouseClick",
value: function(e) {
if (this.state.active) {
var root = (0, _reactDom.findDOMNode)(this.portal);
root.contains(e.target) || e.button && 0 !== e.button || (e.stopPropagation(), this.closePortal());
}
}
}, {
key: "handleKeydown",
value: function(e) {
e.keyCode === KEYCODES.ESCAPE && this.state.active && this.closePortal();
}
}, {
key: "renderPortal",
value: function(props) {
this.node || (this.node = document.createElement("div"), document.body.appendChild(this.node));
var children = props.children;
"function" == typeof props.children.type && (children = _react2["default"].cloneElement(props.children, {
closePortal: this.closePortal
})), this.portal = _reactDom2["default"].unstable_renderSubtreeIntoContainer(this, children, this.node, this.props.onUpdate);
}
}, {
key: "render",
value: function() {
return this.props.openByClickOn ? _react2["default"].cloneElement(this.props.openByClickOn, {
onClick: this.handleWrapperClick
}) : null;
}
} ]), Portal;
}(_react2["default"].Component);
exports["default"] = Portal, Portal.propTypes = {
children: _propTypes2["default"].element.isRequired,
openByClickOn: _propTypes2["default"].element,
closeOnEsc: _propTypes2["default"].bool,
closeOnOutsideClick: _propTypes2["default"].bool,
isOpened: _propTypes2["default"].bool,
onOpen: _propTypes2["default"].func,
onClose: _propTypes2["default"].func,
beforeClose: _propTypes2["default"].func,
onUpdate: _propTypes2["default"].func
}, Portal.defaultProps = {
onOpen: function() {},
onClose: function() {},
onUpdate: function() {}
}, module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(235)();
}, function(module, exports, __webpack_require__) {
"use strict";
var emptyFunction = __webpack_require__(236), invariant = __webpack_require__(237), ReactPropTypesSecret = __webpack_require__(238);
module.exports = function() {
function shim(props, propName, componentName, location, propFullName, secret) {
secret !== ReactPropTypesSecret && invariant(!1, "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");
}
function getShim() {
return shim;
}
shim.isRequired = shim;
var ReactPropTypes = {
array: shim,
bool: shim,
func: shim,
number: shim,
object: shim,
string: shim,
symbol: shim,
any: shim,
arrayOf: getShim,
element: shim,
instanceOf: getShim,
node: shim,
objectOf: getShim,
oneOf: getShim,
oneOfType: getShim,
shape: getShim
};
return ReactPropTypes.checkPropTypes = emptyFunction, ReactPropTypes.PropTypes = ReactPropTypes,
ReactPropTypes;
};
}, function(module, exports) {
"use strict";
function makeEmptyFunction(arg) {
return function() {
return arg;
};
}
var emptyFunction = function() {};
emptyFunction.thatReturns = makeEmptyFunction, emptyFunction.thatReturnsFalse = makeEmptyFunction(!1),
emptyFunction.thatReturnsTrue = makeEmptyFunction(!0), emptyFunction.thatReturnsNull = makeEmptyFunction(null),
emptyFunction.thatReturnsThis = function() {
return this;
}, emptyFunction.thatReturnsArgument = function(arg) {
return arg;
}, module.exports = emptyFunction;
}, function(module, exports, __webpack_require__) {
"use strict";
function invariant(condition, format, a, b, c, d, e, f) {
if (validateFormat(format), !condition) {
var error;
if (void 0 === format) error = new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."); else {
var args = [ a, b, c, d, e, f ], argIndex = 0;
error = new Error(format.replace(/%s/g, function() {
return args[argIndex++];
})), error.name = "Invariant Violation";
}
throw error.framesToPop = 1, error;
}
}
var validateFormat = function(format) {};
module.exports = invariant;
}, function(module, exports) {
"use strict";
var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
module.exports = ReactPropTypesSecret;
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
}
return target;
}, _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), React = __webpack_require__(6), _require = __webpack_require__(240), CustomPicker = _require.CustomPicker, _require2 = __webpack_require__(408), Hue = _require2.Hue, Saturation = _require2.Saturation, ColorPicker = function(_React$Component) {
function ColorPicker() {
var _ref, _temp, _this, _ret;
_classCallCheck(this, ColorPicker);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
return _temp = _this = _possibleConstructorReturn(this, (_ref = ColorPicker.__proto__ || Object.getPrototypeOf(ColorPicker)).call.apply(_ref, [ this ].concat(args))),
_this._onChangeComplete = function(color) {
_this.props.updateColor(color.hex);
}, _this._setRef = function(ref) {
_this._ref = ref;
}, _ret = _temp, _possibleConstructorReturn(_this, _ret);
}
return _inherits(ColorPicker, _React$Component), _createClass(ColorPicker, [ {
key: "render",
value: function() {
var _props = this.props, color = _props.color, theme = _props.theme;
return React.createElement(DecoratedCustomColorPicker, {
color: color,
disableAlpha: !0,
onChangeComplete: this._onChangeComplete,
ref: this._setRef,
theme: theme
});
}
} ]), ColorPicker;
}(React.Component), CustomColorPicker = function(_React$Component2) {
function CustomColorPicker() {
return _classCallCheck(this, CustomColorPicker), _possibleConstructorReturn(this, (CustomColorPicker.__proto__ || Object.getPrototypeOf(CustomColorPicker)).apply(this, arguments));
}
return _inherits(CustomColorPicker, _React$Component2), _createClass(CustomColorPicker, [ {
key: "render",
value: function() {
return React.createElement("div", {
style: customColorPicker(this.props.theme)
}, React.createElement("div", {
style: styles.saturation
}, React.createElement(Saturation, _extends({}, this.props, {
onChange: this.props.onChange,
pointer: CustomPointer
}))), React.createElement("div", {
style: styles.hue
}, React.createElement(Hue, _extends({}, this.props, {
direction: "vertical",
onChange: this.props.onChange,
pointer: CustomPointer
}))));
}
} ]), CustomColorPicker;
}(React.Component), CustomPointer = function() {
return React.createElement("div", {
style: styles.pointer
});
}, DecoratedCustomColorPicker = CustomPicker(CustomColorPicker), customColorPicker = function(theme) {
return {
display: "flex",
flexDirection: "row",
padding: "0.125rem",
borderRadius: "0.25rem",
position: "relative",
zIndex: 1,
background: theme.base00,
border: "1px solid " + theme.base03
};
}, styles = {
saturation: {
flex: "0 0 auto",
position: "relative",
width: "6rem",
height: "6rem"
},
hue: {
flex: "1 0 auto",
position: "relative",
width: "0.75rem",
height: "6rem",
marginLeft: "0.125rem"
},
pointer: {
width: "0.25rem",
height: "0.25rem",
borderRadius: "50%",
transform: "translate(-0.125rem, -0.125rem)",
boxShadow: "rgb(255, 255, 255) 0px 0px 0px 1.5px, rgba(0, 0, 0, 0.3) 0px 0px 1px 1px inset, rgba(0, 0, 0, 0.4) 0px 0px 1px 2px"
}
};
module.exports = ColorPicker;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.CustomPicker = exports.TwitterPicker = exports.SwatchesPicker = exports.SliderPicker = exports.SketchPicker = exports.PhotoshopPicker = exports.MaterialPicker = exports.HuePicker = exports.GithubPicker = exports.CompactPicker = exports.ChromePicker = exports["default"] = exports.CirclePicker = exports.BlockPicker = exports.AlphaPicker = void 0;
var _Alpha = __webpack_require__(241);
Object.defineProperty(exports, "AlphaPicker", {
enumerable: !0,
get: function() {
return _interopRequireDefault(_Alpha)["default"];
}
});
var _Block = __webpack_require__(429);
Object.defineProperty(exports, "BlockPicker", {
enumerable: !0,
get: function() {
return _interopRequireDefault(_Block)["default"];
}
});
var _Circle = __webpack_require__(431);
Object.defineProperty(exports, "CirclePicker", {
enumerable: !0,
get: function() {
return _interopRequireDefault(_Circle)["default"];
}
});
var _Chrome = __webpack_require__(434);
Object.defineProperty(exports, "ChromePicker", {
enumerable: !0,
get: function() {
return _interopRequireDefault(_Chrome)["default"];
}
});
var _Compact = __webpack_require__(438);
Object.defineProperty(exports, "CompactPicker", {
enumerable: !0,
get: function() {
return _interopRequireDefault(_Compact)["default"];
}
});
var _Github = __webpack_require__(447);
Object.defineProperty(exports, "GithubPicker", {
enumerable: !0,
get: function() {
return _interopRequireDefault(_Github)["default"];
}
});
var _Hue = __webpack_require__(449);
Object.defineProperty(exports, "HuePicker", {
enumerable: !0,
get: function() {
return _interopRequireDefault(_Hue)["default"];
}
});
var _Material = __webpack_require__(451);
Object.defineProperty(exports, "MaterialPicker", {
enumerable: !0,
get: function() {
return _interopRequireDefault(_Material)["default"];
}
});
var _Photoshop = __webpack_require__(452);
Object.defineProperty(exports, "PhotoshopPicker", {
enumerable: !0,
get: function() {
return _interopRequireDefault(_Photoshop)["default"];
}
});
var _Sketch = __webpack_require__(458);
Object.defineProperty(exports, "SketchPicker", {
enumerable: !0,
get: function() {
return _interopRequireDefault(_Sketch)["default"];
}
});
var _Slider = __webpack_require__(461);
Object.defineProperty(exports, "SliderPicker", {
enumerable: !0,
get: function() {
return _interopRequireDefault(_Slider)["default"];
}
});
var _Swatches = __webpack_require__(465);
Object.defineProperty(exports, "SwatchesPicker", {
enumerable: !0,
get: function() {
return _interopRequireDefault(_Swatches)["default"];
}
});
var _Twitter = __webpack_require__(468);
Object.defineProperty(exports, "TwitterPicker", {
enumerable: !0,
get: function() {
return _interopRequireDefault(_Twitter)["default"];
}
});
var _ColorWrap = __webpack_require__(422);
Object.defineProperty(exports, "CustomPicker", {
enumerable: !0,
get: function() {
return _interopRequireDefault(_ColorWrap)["default"];
}
});
var _Chrome2 = _interopRequireDefault(_Chrome);
exports["default"] = _Chrome2["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.AlphaPicker = void 0;
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
}
return target;
}, _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), _common = __webpack_require__(408), _AlphaPointer = __webpack_require__(428), _AlphaPointer2 = _interopRequireDefault(_AlphaPointer), AlphaPicker = exports.AlphaPicker = function(_ref) {
var rgb = _ref.rgb, hsl = _ref.hsl, width = _ref.width, height = _ref.height, onChange = _ref.onChange, direction = _ref.direction, style = _ref.style, renderers = _ref.renderers, pointer = _ref.pointer, styles = (0,
_reactcss2["default"])({
"default": {
picker: {
position: "relative",
width: width,
height: height
},
alpha: {
radius: "2px",
style: style
}
}
});
return _react2["default"].createElement("div", {
style: styles.picker,
className: "alpha-picker"
}, _react2["default"].createElement(_common.Alpha, _extends({}, styles.alpha, {
rgb: rgb,
hsl: hsl,
pointer: pointer,
renderers: renderers,
onChange: onChange,
direction: direction
})));
};
AlphaPicker.defaultProps = {
width: "316px",
height: "16px",
direction: "horizontal",
pointer: _AlphaPointer2["default"]
}, exports["default"] = (0, _common.ColorWrap)(AlphaPicker);
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.ReactCSS = exports.loop = exports.handleActive = exports.handleHover = exports.hover = void 0;
var _flattenNames = __webpack_require__(243), _flattenNames2 = _interopRequireDefault(_flattenNames), _mergeClasses = __webpack_require__(371), _mergeClasses2 = _interopRequireDefault(_mergeClasses), _autoprefix = __webpack_require__(404), _autoprefix2 = _interopRequireDefault(_autoprefix), _hover2 = __webpack_require__(405), _hover3 = _interopRequireDefault(_hover2), _active = __webpack_require__(406), _active2 = _interopRequireDefault(_active), _loop2 = __webpack_require__(407), _loop3 = _interopRequireDefault(_loop2);
exports.hover = _hover3["default"], exports.handleHover = _hover3["default"], exports.handleActive = _active2["default"],
exports.loop = _loop3["default"];
var ReactCSS = exports.ReactCSS = function(classes) {
for (var _len = arguments.length, activations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) activations[_key - 1] = arguments[_key];
var activeNames = (0, _flattenNames2["default"])(activations), merged = (0, _mergeClasses2["default"])(classes, activeNames);
return (0, _autoprefix2["default"])(merged);
};
exports["default"] = ReactCSS;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.flattenNames = void 0;
var _isString2 = __webpack_require__(244), _isString3 = _interopRequireDefault(_isString2), _forOwn2 = __webpack_require__(253), _forOwn3 = _interopRequireDefault(_forOwn2), _isPlainObject2 = __webpack_require__(280), _isPlainObject3 = _interopRequireDefault(_isPlainObject2), _map2 = __webpack_require__(282), _map3 = _interopRequireDefault(_map2), flattenNames = exports.flattenNames = function flattenNames() {
var things = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [], names = [];
return (0, _map3["default"])(things, function(thing) {
Array.isArray(thing) ? flattenNames(thing).map(function(name) {
return names.push(name);
}) : (0, _isPlainObject3["default"])(thing) ? (0, _forOwn3["default"])(thing, function(value, key) {
value === !0 && names.push(key), names.push(key + "-" + value);
}) : (0, _isString3["default"])(thing) && names.push(thing);
}), names;
};
exports["default"] = flattenNames;
}, function(module, exports, __webpack_require__) {
function isString(value) {
return "string" == typeof value || !isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag;
}
var baseGetTag = __webpack_require__(245), isArray = __webpack_require__(251), isObjectLike = __webpack_require__(252), stringTag = "[object String]";
module.exports = isString;
}, function(module, exports, __webpack_require__) {
function baseGetTag(value) {
return null == value ? void 0 === value ? undefinedTag : nullTag : symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
}
var Symbol = __webpack_require__(246), getRawTag = __webpack_require__(249), objectToString = __webpack_require__(250), nullTag = "[object Null]", undefinedTag = "[object Undefined]", symToStringTag = Symbol ? Symbol.toStringTag : void 0;
module.exports = baseGetTag;
}, function(module, exports, __webpack_require__) {
var root = __webpack_require__(247), Symbol = root.Symbol;
module.exports = Symbol;
}, function(module, exports, __webpack_require__) {
var freeGlobal = __webpack_require__(248), freeSelf = "object" == typeof self && self && self.Object === Object && self, root = freeGlobal || freeSelf || Function("return this")();
module.exports = root;
}, function(module, exports) {
var freeGlobal = "object" == typeof global && global && global.Object === Object && global;
module.exports = freeGlobal;
}, function(module, exports, __webpack_require__) {
function getRawTag(value) {
var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
try {
value[symToStringTag] = void 0;
var unmasked = !0;
} catch (e) {}
var result = nativeObjectToString.call(value);
return unmasked && (isOwn ? value[symToStringTag] = tag : delete value[symToStringTag]),
result;
}
var Symbol = __webpack_require__(246), objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty, nativeObjectToString = objectProto.toString, symToStringTag = Symbol ? Symbol.toStringTag : void 0;
module.exports = getRawTag;
}, function(module, exports) {
function objectToString(value) {
return nativeObjectToString.call(value);
}
var objectProto = Object.prototype, nativeObjectToString = objectProto.toString;
module.exports = objectToString;
}, function(module, exports) {
var isArray = Array.isArray;
module.exports = isArray;
}, function(module, exports) {
function isObjectLike(value) {
return null != value && "object" == typeof value;
}
module.exports = isObjectLike;
}, function(module, exports, __webpack_require__) {
function forOwn(object, iteratee) {
return object && baseForOwn(object, castFunction(iteratee));
}
var baseForOwn = __webpack_require__(254), castFunction = __webpack_require__(278);
module.exports = forOwn;
}, function(module, exports, __webpack_require__) {
function baseForOwn(object, iteratee) {
return object && baseFor(object, iteratee, keys);
}
var baseFor = __webpack_require__(255), keys = __webpack_require__(257);
module.exports = baseForOwn;
}, function(module, exports, __webpack_require__) {
var createBaseFor = __webpack_require__(256), baseFor = createBaseFor();
module.exports = baseFor;
}, function(module, exports) {
function createBaseFor(fromRight) {
return function(object, iteratee, keysFunc) {
for (var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length; length--; ) {
var key = props[fromRight ? length : ++index];
if (iteratee(iterable[key], key, iterable) === !1) break;
}
return object;
};
}
module.exports = createBaseFor;
}, function(module, exports, __webpack_require__) {
function keys(object) {
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
}
var arrayLikeKeys = __webpack_require__(258), baseKeys = __webpack_require__(271), isArrayLike = __webpack_require__(275);
module.exports = keys;
}, function(module, exports, __webpack_require__) {
function arrayLikeKeys(value, inherited) {
var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
for (var key in value) !inherited && !hasOwnProperty.call(value, key) || skipIndexes && ("length" == key || isBuff && ("offset" == key || "parent" == key) || isType && ("buffer" == key || "byteLength" == key || "byteOffset" == key) || isIndex(key, length)) || result.push(key);
return result;
}
var baseTimes = __webpack_require__(259), isArguments = __webpack_require__(260), isArray = __webpack_require__(251), isBuffer = __webpack_require__(262), isIndex = __webpack_require__(265), isTypedArray = __webpack_require__(266), objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty;
module.exports = arrayLikeKeys;
}, function(module, exports) {
function baseTimes(n, iteratee) {
for (var index = -1, result = Array(n); ++index < n; ) result[index] = iteratee(index);
return result;
}
module.exports = baseTimes;
}, function(module, exports, __webpack_require__) {
var baseIsArguments = __webpack_require__(261), isObjectLike = __webpack_require__(252), objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty, propertyIsEnumerable = objectProto.propertyIsEnumerable, isArguments = baseIsArguments(function() {
return arguments;
}()) ? baseIsArguments : function(value) {
return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
};
module.exports = isArguments;
}, function(module, exports, __webpack_require__) {
function baseIsArguments(value) {
return isObjectLike(value) && baseGetTag(value) == argsTag;
}
var baseGetTag = __webpack_require__(245), isObjectLike = __webpack_require__(252), argsTag = "[object Arguments]";
module.exports = baseIsArguments;
}, function(module, exports, __webpack_require__) {
(function(module) {
var root = __webpack_require__(247), stubFalse = __webpack_require__(264), freeExports = "object" == typeof exports && exports && !exports.nodeType && exports, freeModule = freeExports && "object" == typeof module && module && !module.nodeType && module, moduleExports = freeModule && freeModule.exports === freeExports, Buffer = moduleExports ? root.Buffer : void 0, nativeIsBuffer = Buffer ? Buffer.isBuffer : void 0, isBuffer = nativeIsBuffer || stubFalse;
module.exports = isBuffer;
}).call(exports, __webpack_require__(263)(module));
}, function(module, exports) {
module.exports = function(module) {
return module.webpackPolyfill || (module.deprecate = function() {}, module.paths = [],
module.children = [], module.webpackPolyfill = 1), module;
};
}, function(module, exports) {
function stubFalse() {
return !1;
}
module.exports = stubFalse;
}, function(module, exports) {
function isIndex(value, length) {
return length = null == length ? MAX_SAFE_INTEGER : length, !!length && ("number" == typeof value || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
}
var MAX_SAFE_INTEGER = 9007199254740991, reIsUint = /^(?:0|[1-9]\d*)$/;
module.exports = isIndex;
}, function(module, exports, __webpack_require__) {
var baseIsTypedArray = __webpack_require__(267), baseUnary = __webpack_require__(269), nodeUtil = __webpack_require__(270), nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray, isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
module.exports = isTypedArray;
}, function(module, exports, __webpack_require__) {
function baseIsTypedArray(value) {
return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
}
var baseGetTag = __webpack_require__(245), isLength = __webpack_require__(268), isObjectLike = __webpack_require__(252), argsTag = "[object Arguments]", arrayTag = "[object Array]", boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", funcTag = "[object Function]", mapTag = "[object Map]", numberTag = "[object Number]", objectTag = "[object Object]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", weakMapTag = "[object WeakMap]", arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]", typedArrayTags = {};
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = !0,
typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = !1,
module.exports = baseIsTypedArray;
}, function(module, exports) {
function isLength(value) {
return "number" == typeof value && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}
var MAX_SAFE_INTEGER = 9007199254740991;
module.exports = isLength;
}, function(module, exports) {
function baseUnary(func) {
return function(value) {
return func(value);
};
}
module.exports = baseUnary;
}, function(module, exports, __webpack_require__) {
(function(module) {
var freeGlobal = __webpack_require__(248), freeExports = "object" == typeof exports && exports && !exports.nodeType && exports, freeModule = freeExports && "object" == typeof module && module && !module.nodeType && module, moduleExports = freeModule && freeModule.exports === freeExports, freeProcess = moduleExports && freeGlobal.process, nodeUtil = function() {
try {
return freeProcess && freeProcess.binding && freeProcess.binding("util");
} catch (e) {}
}();
module.exports = nodeUtil;
}).call(exports, __webpack_require__(263)(module));
}, function(module, exports, __webpack_require__) {
function baseKeys(object) {
if (!isPrototype(object)) return nativeKeys(object);
var result = [];
for (var key in Object(object)) hasOwnProperty.call(object, key) && "constructor" != key && result.push(key);
return result;
}
var isPrototype = __webpack_require__(272), nativeKeys = __webpack_require__(273), objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty;
module.exports = baseKeys;
}, function(module, exports) {
function isPrototype(value) {
var Ctor = value && value.constructor, proto = "function" == typeof Ctor && Ctor.prototype || objectProto;
return value === proto;
}
var objectProto = Object.prototype;
module.exports = isPrototype;
}, function(module, exports, __webpack_require__) {
var overArg = __webpack_require__(274), nativeKeys = overArg(Object.keys, Object);
module.exports = nativeKeys;
}, function(module, exports) {
function overArg(func, transform) {
return function(arg) {
return func(transform(arg));
};
}
module.exports = overArg;
}, function(module, exports, __webpack_require__) {
function isArrayLike(value) {
return null != value && isLength(value.length) && !isFunction(value);
}
var isFunction = __webpack_require__(276), isLength = __webpack_require__(268);
module.exports = isArrayLike;
}, function(module, exports, __webpack_require__) {
function isFunction(value) {
if (!isObject(value)) return !1;
var tag = baseGetTag(value);
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
}
var baseGetTag = __webpack_require__(245), isObject = __webpack_require__(277), asyncTag = "[object AsyncFunction]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
module.exports = isFunction;
}, function(module, exports) {
function isObject(value) {
var type = typeof value;
return null != value && ("object" == type || "function" == type);
}
module.exports = isObject;
}, function(module, exports, __webpack_require__) {
function castFunction(value) {
return "function" == typeof value ? value : identity;
}
var identity = __webpack_require__(279);
module.exports = castFunction;
}, function(module, exports) {
function identity(value) {
return value;
}
module.exports = identity;
}, function(module, exports, __webpack_require__) {
function isPlainObject(value) {
if (!isObjectLike(value) || baseGetTag(value) != objectTag) return !1;
var proto = getPrototype(value);
if (null === proto) return !0;
var Ctor = hasOwnProperty.call(proto, "constructor") && proto.constructor;
return "function" == typeof Ctor && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
}
var baseGetTag = __webpack_require__(245), getPrototype = __webpack_require__(281), isObjectLike = __webpack_require__(252), objectTag = "[object Object]", funcProto = Function.prototype, objectProto = Object.prototype, funcToString = funcProto.toString, hasOwnProperty = objectProto.hasOwnProperty, objectCtorString = funcToString.call(Object);
module.exports = isPlainObject;
}, function(module, exports, __webpack_require__) {
var overArg = __webpack_require__(274), getPrototype = overArg(Object.getPrototypeOf, Object);
module.exports = getPrototype;
}, function(module, exports, __webpack_require__) {
function map(collection, iteratee) {
var func = isArray(collection) ? arrayMap : baseMap;
return func(collection, baseIteratee(iteratee, 3));
}
var arrayMap = __webpack_require__(283), baseIteratee = __webpack_require__(284), baseMap = __webpack_require__(368), isArray = __webpack_require__(251);
module.exports = map;
}, function(module, exports) {
function arrayMap(array, iteratee) {
for (var index = -1, length = null == array ? 0 : array.length, result = Array(length); ++index < length; ) result[index] = iteratee(array[index], index, array);
return result;
}
module.exports = arrayMap;
}, function(module, exports, __webpack_require__) {
function baseIteratee(value) {
return "function" == typeof value ? value : null == value ? identity : "object" == typeof value ? isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value) : property(value);
}
var baseMatches = __webpack_require__(285), baseMatchesProperty = __webpack_require__(350), identity = __webpack_require__(279), isArray = __webpack_require__(251), property = __webpack_require__(365);
module.exports = baseIteratee;
}, function(module, exports, __webpack_require__) {
function baseMatches(source) {
var matchData = getMatchData(source);
return 1 == matchData.length && matchData[0][2] ? matchesStrictComparable(matchData[0][0], matchData[0][1]) : function(object) {
return object === source || baseIsMatch(object, source, matchData);
};
}
var baseIsMatch = __webpack_require__(286), getMatchData = __webpack_require__(347), matchesStrictComparable = __webpack_require__(349);
module.exports = baseMatches;
}, function(module, exports, __webpack_require__) {
function baseIsMatch(object, source, matchData, customizer) {
var index = matchData.length, length = index, noCustomizer = !customizer;
if (null == object) return !length;
for (object = Object(object); index--; ) {
var data = matchData[index];
if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) return !1;
}
for (;++index < length; ) {
data = matchData[index];
var key = data[0], objValue = object[key], srcValue = data[1];
if (noCustomizer && data[2]) {
if (void 0 === objValue && !(key in object)) return !1;
} else {
var stack = new Stack();
if (customizer) var result = customizer(objValue, srcValue, key, object, source, stack);
if (!(void 0 === result ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result)) return !1;
}
}
return !0;
}
var Stack = __webpack_require__(287), baseIsEqual = __webpack_require__(323), COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2;
module.exports = baseIsMatch;
}, function(module, exports, __webpack_require__) {
function Stack(entries) {
var data = this.__data__ = new ListCache(entries);
this.size = data.size;
}
var ListCache = __webpack_require__(288), stackClear = __webpack_require__(296), stackDelete = __webpack_require__(297), stackGet = __webpack_require__(298), stackHas = __webpack_require__(299), stackSet = __webpack_require__(300);
Stack.prototype.clear = stackClear, Stack.prototype["delete"] = stackDelete, Stack.prototype.get = stackGet,
Stack.prototype.has = stackHas, Stack.prototype.set = stackSet, module.exports = Stack;
}, function(module, exports, __webpack_require__) {
function ListCache(entries) {
var index = -1, length = null == entries ? 0 : entries.length;
for (this.clear(); ++index < length; ) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
var listCacheClear = __webpack_require__(289), listCacheDelete = __webpack_require__(290), listCacheGet = __webpack_require__(293), listCacheHas = __webpack_require__(294), listCacheSet = __webpack_require__(295);
ListCache.prototype.clear = listCacheClear, ListCache.prototype["delete"] = listCacheDelete,
ListCache.prototype.get = listCacheGet, ListCache.prototype.has = listCacheHas,
ListCache.prototype.set = listCacheSet, module.exports = ListCache;
}, function(module, exports) {
function listCacheClear() {
this.__data__ = [], this.size = 0;
}
module.exports = listCacheClear;
}, function(module, exports, __webpack_require__) {
function listCacheDelete(key) {
var data = this.__data__, index = assocIndexOf(data, key);
if (index < 0) return !1;
var lastIndex = data.length - 1;
return index == lastIndex ? data.pop() : splice.call(data, index, 1), --this.size,
!0;
}
var assocIndexOf = __webpack_require__(291), arrayProto = Array.prototype, splice = arrayProto.splice;
module.exports = listCacheDelete;
}, function(module, exports, __webpack_require__) {
function assocIndexOf(array, key) {
for (var length = array.length; length--; ) if (eq(array[length][0], key)) return length;
return -1;
}
var eq = __webpack_require__(292);
module.exports = assocIndexOf;
}, function(module, exports) {
function eq(value, other) {
return value === other || value !== value && other !== other;
}
module.exports = eq;
}, function(module, exports, __webpack_require__) {
function listCacheGet(key) {
var data = this.__data__, index = assocIndexOf(data, key);
return index < 0 ? void 0 : data[index][1];
}
var assocIndexOf = __webpack_require__(291);
module.exports = listCacheGet;
}, function(module, exports, __webpack_require__) {
function listCacheHas(key) {
return assocIndexOf(this.__data__, key) > -1;
}
var assocIndexOf = __webpack_require__(291);
module.exports = listCacheHas;
}, function(module, exports, __webpack_require__) {
function listCacheSet(key, value) {
var data = this.__data__, index = assocIndexOf(data, key);
return index < 0 ? (++this.size, data.push([ key, value ])) : data[index][1] = value,
this;
}
var assocIndexOf = __webpack_require__(291);
module.exports = listCacheSet;
}, function(module, exports, __webpack_require__) {
function stackClear() {
this.__data__ = new ListCache(), this.size = 0;
}
var ListCache = __webpack_require__(288);
module.exports = stackClear;
}, function(module, exports) {
function stackDelete(key) {
var data = this.__data__, result = data["delete"](key);
return this.size = data.size, result;
}
module.exports = stackDelete;
}, function(module, exports) {
function stackGet(key) {
return this.__data__.get(key);
}
module.exports = stackGet;
}, function(module, exports) {
function stackHas(key) {
return this.__data__.has(key);
}
module.exports = stackHas;
}, function(module, exports, __webpack_require__) {
function stackSet(key, value) {
var data = this.__data__;
if (data instanceof ListCache) {
var pairs = data.__data__;
if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) return pairs.push([ key, value ]),
this.size = ++data.size, this;
data = this.__data__ = new MapCache(pairs);
}
return data.set(key, value), this.size = data.size, this;
}
var ListCache = __webpack_require__(288), Map = __webpack_require__(301), MapCache = __webpack_require__(308), LARGE_ARRAY_SIZE = 200;
module.exports = stackSet;
}, function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(302), root = __webpack_require__(247), Map = getNative(root, "Map");
module.exports = Map;
}, function(module, exports, __webpack_require__) {
function getNative(object, key) {
var value = getValue(object, key);
return baseIsNative(value) ? value : void 0;
}
var baseIsNative = __webpack_require__(303), getValue = __webpack_require__(307);
module.exports = getNative;
}, function(module, exports, __webpack_require__) {
function baseIsNative(value) {
if (!isObject(value) || isMasked(value)) return !1;
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
return pattern.test(toSource(value));
}
var isFunction = __webpack_require__(276), isMasked = __webpack_require__(304), isObject = __webpack_require__(277), toSource = __webpack_require__(306), reRegExpChar = /[\\^$.*+?()[\]{}|]/g, reIsHostCtor = /^\[object .+?Constructor\]$/, funcProto = Function.prototype, objectProto = Object.prototype, funcToString = funcProto.toString, hasOwnProperty = objectProto.hasOwnProperty, reIsNative = RegExp("^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
module.exports = baseIsNative;
}, function(module, exports, __webpack_require__) {
function isMasked(func) {
return !!maskSrcKey && maskSrcKey in func;
}
var coreJsData = __webpack_require__(305), maskSrcKey = function() {
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
return uid ? "Symbol(src)_1." + uid : "";
}();
module.exports = isMasked;
}, function(module, exports, __webpack_require__) {
var root = __webpack_require__(247), coreJsData = root["__core-js_shared__"];
module.exports = coreJsData;
}, function(module, exports) {
function toSource(func) {
if (null != func) {
try {
return funcToString.call(func);
} catch (e) {}
try {
return func + "";
} catch (e) {}
}
return "";
}
var funcProto = Function.prototype, funcToString = funcProto.toString;
module.exports = toSource;
}, function(module, exports) {
function getValue(object, key) {
return null == object ? void 0 : object[key];
}
module.exports = getValue;
}, function(module, exports, __webpack_require__) {
function MapCache(entries) {
var index = -1, length = null == entries ? 0 : entries.length;
for (this.clear(); ++index < length; ) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
var mapCacheClear = __webpack_require__(309), mapCacheDelete = __webpack_require__(317), mapCacheGet = __webpack_require__(320), mapCacheHas = __webpack_require__(321), mapCacheSet = __webpack_require__(322);
MapCache.prototype.clear = mapCacheClear, MapCache.prototype["delete"] = mapCacheDelete,
MapCache.prototype.get = mapCacheGet, MapCache.prototype.has = mapCacheHas, MapCache.prototype.set = mapCacheSet,
module.exports = MapCache;
}, function(module, exports, __webpack_require__) {
function mapCacheClear() {
this.size = 0, this.__data__ = {
hash: new Hash(),
map: new (Map || ListCache)(),
string: new Hash()
};
}
var Hash = __webpack_require__(310), ListCache = __webpack_require__(288), Map = __webpack_require__(301);
module.exports = mapCacheClear;
}, function(module, exports, __webpack_require__) {
function Hash(entries) {
var index = -1, length = null == entries ? 0 : entries.length;
for (this.clear(); ++index < length; ) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
var hashClear = __webpack_require__(311), hashDelete = __webpack_require__(313), hashGet = __webpack_require__(314), hashHas = __webpack_require__(315), hashSet = __webpack_require__(316);
Hash.prototype.clear = hashClear, Hash.prototype["delete"] = hashDelete, Hash.prototype.get = hashGet,
Hash.prototype.has = hashHas, Hash.prototype.set = hashSet, module.exports = Hash;
}, function(module, exports, __webpack_require__) {
function hashClear() {
this.__data__ = nativeCreate ? nativeCreate(null) : {}, this.size = 0;
}
var nativeCreate = __webpack_require__(312);
module.exports = hashClear;
}, function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(302), nativeCreate = getNative(Object, "create");
module.exports = nativeCreate;
}, function(module, exports) {
function hashDelete(key) {
var result = this.has(key) && delete this.__data__[key];
return this.size -= result ? 1 : 0, result;
}
module.exports = hashDelete;
}, function(module, exports, __webpack_require__) {
function hashGet(key) {
var data = this.__data__;
if (nativeCreate) {
var result = data[key];
return result === HASH_UNDEFINED ? void 0 : result;
}
return hasOwnProperty.call(data, key) ? data[key] : void 0;
}
var nativeCreate = __webpack_require__(312), HASH_UNDEFINED = "__lodash_hash_undefined__", objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty;
module.exports = hashGet;
}, function(module, exports, __webpack_require__) {
function hashHas(key) {
var data = this.__data__;
return nativeCreate ? void 0 !== data[key] : hasOwnProperty.call(data, key);
}
var nativeCreate = __webpack_require__(312), objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty;
module.exports = hashHas;
}, function(module, exports, __webpack_require__) {
function hashSet(key, value) {
var data = this.__data__;
return this.size += this.has(key) ? 0 : 1, data[key] = nativeCreate && void 0 === value ? HASH_UNDEFINED : value,
this;
}
var nativeCreate = __webpack_require__(312), HASH_UNDEFINED = "__lodash_hash_undefined__";
module.exports = hashSet;
}, function(module, exports, __webpack_require__) {
function mapCacheDelete(key) {
var result = getMapData(this, key)["delete"](key);
return this.size -= result ? 1 : 0, result;
}
var getMapData = __webpack_require__(318);
module.exports = mapCacheDelete;
}, function(module, exports, __webpack_require__) {
function getMapData(map, key) {
var data = map.__data__;
return isKeyable(key) ? data["string" == typeof key ? "string" : "hash"] : data.map;
}
var isKeyable = __webpack_require__(319);
module.exports = getMapData;
}, function(module, exports) {
function isKeyable(value) {
var type = typeof value;
return "string" == type || "number" == type || "symbol" == type || "boolean" == type ? "__proto__" !== value : null === value;
}
module.exports = isKeyable;
}, function(module, exports, __webpack_require__) {
function mapCacheGet(key) {
return getMapData(this, key).get(key);
}
var getMapData = __webpack_require__(318);
module.exports = mapCacheGet;
}, function(module, exports, __webpack_require__) {
function mapCacheHas(key) {
return getMapData(this, key).has(key);
}
var getMapData = __webpack_require__(318);
module.exports = mapCacheHas;
}, function(module, exports, __webpack_require__) {
function mapCacheSet(key, value) {
var data = getMapData(this, key), size = data.size;
return data.set(key, value), this.size += data.size == size ? 0 : 1, this;
}
var getMapData = __webpack_require__(318);
module.exports = mapCacheSet;
}, function(module, exports, __webpack_require__) {
function baseIsEqual(value, other, bitmask, customizer, stack) {
return value === other || (null == value || null == other || !isObjectLike(value) && !isObjectLike(other) ? value !== value && other !== other : baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack));
}
var baseIsEqualDeep = __webpack_require__(324), isObjectLike = __webpack_require__(252);
module.exports = baseIsEqual;
}, function(module, exports, __webpack_require__) {
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other);
objTag = objTag == argsTag ? objectTag : objTag, othTag = othTag == argsTag ? objectTag : othTag;
var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
if (isSameTag && isBuffer(object)) {
if (!isBuffer(other)) return !1;
objIsArr = !0, objIsObj = !1;
}
if (isSameTag && !objIsObj) return stack || (stack = new Stack()), objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__");
if (objIsWrapped || othIsWrapped) {
var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
return stack || (stack = new Stack()), equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
}
}
return !!isSameTag && (stack || (stack = new Stack()), equalObjects(object, other, bitmask, customizer, equalFunc, stack));
}
var Stack = __webpack_require__(287), equalArrays = __webpack_require__(325), equalByTag = __webpack_require__(331), equalObjects = __webpack_require__(335), getTag = __webpack_require__(342), isArray = __webpack_require__(251), isBuffer = __webpack_require__(262), isTypedArray = __webpack_require__(266), COMPARE_PARTIAL_FLAG = 1, argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[object Object]", objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty;
module.exports = baseIsEqualDeep;
}, function(module, exports, __webpack_require__) {
function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length;
if (arrLength != othLength && !(isPartial && othLength > arrLength)) return !1;
var stacked = stack.get(array);
if (stacked && stack.get(other)) return stacked == other;
var index = -1, result = !0, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : void 0;
for (stack.set(array, other), stack.set(other, array); ++index < arrLength; ) {
var arrValue = array[index], othValue = other[index];
if (customizer) var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
if (void 0 !== compared) {
if (compared) continue;
result = !1;
break;
}
if (seen) {
if (!arraySome(other, function(othValue, othIndex) {
if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) return seen.push(othIndex);
})) {
result = !1;
break;
}
} else if (arrValue !== othValue && !equalFunc(arrValue, othValue, bitmask, customizer, stack)) {
result = !1;
break;
}
}
return stack["delete"](array), stack["delete"](other), result;
}
var SetCache = __webpack_require__(326), arraySome = __webpack_require__(329), cacheHas = __webpack_require__(330), COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2;
module.exports = equalArrays;
}, function(module, exports, __webpack_require__) {
function SetCache(values) {
var index = -1, length = null == values ? 0 : values.length;
for (this.__data__ = new MapCache(); ++index < length; ) this.add(values[index]);
}
var MapCache = __webpack_require__(308), setCacheAdd = __webpack_require__(327), setCacheHas = __webpack_require__(328);
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd, SetCache.prototype.has = setCacheHas,
module.exports = SetCache;
}, function(module, exports) {
function setCacheAdd(value) {
return this.__data__.set(value, HASH_UNDEFINED), this;
}
var HASH_UNDEFINED = "__lodash_hash_undefined__";
module.exports = setCacheAdd;
}, function(module, exports) {
function setCacheHas(value) {
return this.__data__.has(value);
}
module.exports = setCacheHas;
}, function(module, exports) {
function arraySome(array, predicate) {
for (var index = -1, length = null == array ? 0 : array.length; ++index < length; ) if (predicate(array[index], index, array)) return !0;
return !1;
}
module.exports = arraySome;
}, function(module, exports) {
function cacheHas(cache, key) {
return cache.has(key);
}
module.exports = cacheHas;
}, function(module, exports, __webpack_require__) {
function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
switch (tag) {
case dataViewTag:
if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) return !1;
object = object.buffer, other = other.buffer;
case arrayBufferTag:
return !(object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other)));
case boolTag:
case dateTag:
case numberTag:
return eq(+object, +other);
case errorTag:
return object.name == other.name && object.message == other.message;
case regexpTag:
case stringTag:
return object == other + "";
case mapTag:
var convert = mapToArray;
case setTag:
var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
if (convert || (convert = setToArray), object.size != other.size && !isPartial) return !1;
var stacked = stack.get(object);
if (stacked) return stacked == other;
bitmask |= COMPARE_UNORDERED_FLAG, stack.set(object, other);
var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
return stack["delete"](object), result;
case symbolTag:
if (symbolValueOf) return symbolValueOf.call(object) == symbolValueOf.call(other);
}
return !1;
}
var Symbol = __webpack_require__(246), Uint8Array = __webpack_require__(332), eq = __webpack_require__(292), equalArrays = __webpack_require__(325), mapToArray = __webpack_require__(333), setToArray = __webpack_require__(334), COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2, boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", mapTag = "[object Map]", numberTag = "[object Number]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]", arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", symbolProto = Symbol ? Symbol.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
module.exports = equalByTag;
}, function(module, exports, __webpack_require__) {
var root = __webpack_require__(247), Uint8Array = root.Uint8Array;
module.exports = Uint8Array;
}, function(module, exports) {
function mapToArray(map) {
var index = -1, result = Array(map.size);
return map.forEach(function(value, key) {
result[++index] = [ key, value ];
}), result;
}
module.exports = mapToArray;
}, function(module, exports) {
function setToArray(set) {
var index = -1, result = Array(set.size);
return set.forEach(function(value) {
result[++index] = value;
}), result;
}
module.exports = setToArray;
}, function(module, exports, __webpack_require__) {
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length;
if (objLength != othLength && !isPartial) return !1;
for (var index = objLength; index--; ) {
var key = objProps[index];
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) return !1;
}
var stacked = stack.get(object);
if (stacked && stack.get(other)) return stacked == other;
var result = !0;
stack.set(object, other), stack.set(other, object);
for (var skipCtor = isPartial; ++index < objLength; ) {
key = objProps[index];
var objValue = object[key], othValue = other[key];
if (customizer) var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
if (!(void 0 === compared ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
result = !1;
break;
}
skipCtor || (skipCtor = "constructor" == key);
}
if (result && !skipCtor) {
var objCtor = object.constructor, othCtor = other.constructor;
objCtor != othCtor && "constructor" in object && "constructor" in other && !("function" == typeof objCtor && objCtor instanceof objCtor && "function" == typeof othCtor && othCtor instanceof othCtor) && (result = !1);
}
return stack["delete"](object), stack["delete"](other), result;
}
var getAllKeys = __webpack_require__(336), COMPARE_PARTIAL_FLAG = 1, objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty;
module.exports = equalObjects;
}, function(module, exports, __webpack_require__) {
function getAllKeys(object) {
return baseGetAllKeys(object, keys, getSymbols);
}
var baseGetAllKeys = __webpack_require__(337), getSymbols = __webpack_require__(339), keys = __webpack_require__(257);
module.exports = getAllKeys;
}, function(module, exports, __webpack_require__) {
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
var result = keysFunc(object);
return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
}
var arrayPush = __webpack_require__(338), isArray = __webpack_require__(251);
module.exports = baseGetAllKeys;
}, function(module, exports) {
function arrayPush(array, values) {
for (var index = -1, length = values.length, offset = array.length; ++index < length; ) array[offset + index] = values[index];
return array;
}
module.exports = arrayPush;
}, function(module, exports, __webpack_require__) {
var arrayFilter = __webpack_require__(340), stubArray = __webpack_require__(341), objectProto = Object.prototype, propertyIsEnumerable = objectProto.propertyIsEnumerable, nativeGetSymbols = Object.getOwnPropertySymbols, getSymbols = nativeGetSymbols ? function(object) {
return null == object ? [] : (object = Object(object), arrayFilter(nativeGetSymbols(object), function(symbol) {
return propertyIsEnumerable.call(object, symbol);
}));
} : stubArray;
module.exports = getSymbols;
}, function(module, exports) {
function arrayFilter(array, predicate) {
for (var index = -1, length = null == array ? 0 : array.length, resIndex = 0, result = []; ++index < length; ) {
var value = array[index];
predicate(value, index, array) && (result[resIndex++] = value);
}
return result;
}
module.exports = arrayFilter;
}, function(module, exports) {
function stubArray() {
return [];
}
module.exports = stubArray;
}, function(module, exports, __webpack_require__) {
var DataView = __webpack_require__(343), Map = __webpack_require__(301), Promise = __webpack_require__(344), Set = __webpack_require__(345), WeakMap = __webpack_require__(346), baseGetTag = __webpack_require__(245), toSource = __webpack_require__(306), mapTag = "[object Map]", objectTag = "[object Object]", promiseTag = "[object Promise]", setTag = "[object Set]", weakMapTag = "[object WeakMap]", dataViewTag = "[object DataView]", dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap), getTag = baseGetTag;
(DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) && (getTag = function(value) {
var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
if (ctorString) switch (ctorString) {
case dataViewCtorString:
return dataViewTag;
case mapCtorString:
return mapTag;
case promiseCtorString:
return promiseTag;
case setCtorString:
return setTag;
case weakMapCtorString:
return weakMapTag;
}
return result;
}), module.exports = getTag;
}, function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(302), root = __webpack_require__(247), DataView = getNative(root, "DataView");
module.exports = DataView;
}, function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(302), root = __webpack_require__(247), Promise = getNative(root, "Promise");
module.exports = Promise;
}, function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(302), root = __webpack_require__(247), Set = getNative(root, "Set");
module.exports = Set;
}, function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(302), root = __webpack_require__(247), WeakMap = getNative(root, "WeakMap");
module.exports = WeakMap;
}, function(module, exports, __webpack_require__) {
function getMatchData(object) {
for (var result = keys(object), length = result.length; length--; ) {
var key = result[length], value = object[key];
result[length] = [ key, value, isStrictComparable(value) ];
}
return result;
}
var isStrictComparable = __webpack_require__(348), keys = __webpack_require__(257);
module.exports = getMatchData;
}, function(module, exports, __webpack_require__) {
function isStrictComparable(value) {
return value === value && !isObject(value);
}
var isObject = __webpack_require__(277);
module.exports = isStrictComparable;
}, function(module, exports) {
function matchesStrictComparable(key, srcValue) {
return function(object) {
return null != object && (object[key] === srcValue && (void 0 !== srcValue || key in Object(object)));
};
}
module.exports = matchesStrictComparable;
}, function(module, exports, __webpack_require__) {
function baseMatchesProperty(path, srcValue) {
return isKey(path) && isStrictComparable(srcValue) ? matchesStrictComparable(toKey(path), srcValue) : function(object) {
var objValue = get(object, path);
return void 0 === objValue && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
};
}
var baseIsEqual = __webpack_require__(323), get = __webpack_require__(351), hasIn = __webpack_require__(362), isKey = __webpack_require__(354), isStrictComparable = __webpack_require__(348), matchesStrictComparable = __webpack_require__(349), toKey = __webpack_require__(361), COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2;
module.exports = baseMatchesProperty;
}, function(module, exports, __webpack_require__) {
function get(object, path, defaultValue) {
var result = null == object ? void 0 : baseGet(object, path);
return void 0 === result ? defaultValue : result;
}
var baseGet = __webpack_require__(352);
module.exports = get;
}, function(module, exports, __webpack_require__) {
function baseGet(object, path) {
path = castPath(path, object);
for (var index = 0, length = path.length; null != object && index < length; ) object = object[toKey(path[index++])];
return index && index == length ? object : void 0;
}
var castPath = __webpack_require__(353), toKey = __webpack_require__(361);
module.exports = baseGet;
}, function(module, exports, __webpack_require__) {
function castPath(value, object) {
return isArray(value) ? value : isKey(value, object) ? [ value ] : stringToPath(toString(value));
}
var isArray = __webpack_require__(251), isKey = __webpack_require__(354), stringToPath = __webpack_require__(356), toString = __webpack_require__(359);
module.exports = castPath;
}, function(module, exports, __webpack_require__) {
function isKey(value, object) {
if (isArray(value)) return !1;
var type = typeof value;
return !("number" != type && "symbol" != type && "boolean" != type && null != value && !isSymbol(value)) || (reIsPlainProp.test(value) || !reIsDeepProp.test(value) || null != object && value in Object(object));
}
var isArray = __webpack_require__(251), isSymbol = __webpack_require__(355), reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/;
module.exports = isKey;
}, function(module, exports, __webpack_require__) {
function isSymbol(value) {
return "symbol" == typeof value || isObjectLike(value) && baseGetTag(value) == symbolTag;
}
var baseGetTag = __webpack_require__(245), isObjectLike = __webpack_require__(252), symbolTag = "[object Symbol]";
module.exports = isSymbol;
}, function(module, exports, __webpack_require__) {
var memoizeCapped = __webpack_require__(357), reLeadingDot = /^\./, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, reEscapeChar = /\\(\\)?/g, stringToPath = memoizeCapped(function(string) {
var result = [];
return reLeadingDot.test(string) && result.push(""), string.replace(rePropName, function(match, number, quote, string) {
result.push(quote ? string.replace(reEscapeChar, "$1") : number || match);
}), result;
});
module.exports = stringToPath;
}, function(module, exports, __webpack_require__) {
function memoizeCapped(func) {
var result = memoize(func, function(key) {
return cache.size === MAX_MEMOIZE_SIZE && cache.clear(), key;
}), cache = result.cache;
return result;
}
var memoize = __webpack_require__(358), MAX_MEMOIZE_SIZE = 500;
module.exports = memoizeCapped;
}, function(module, exports, __webpack_require__) {
function memoize(func, resolver) {
if ("function" != typeof func || null != resolver && "function" != typeof resolver) throw new TypeError(FUNC_ERROR_TEXT);
var memoized = function() {
var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
if (cache.has(key)) return cache.get(key);
var result = func.apply(this, args);
return memoized.cache = cache.set(key, result) || cache, result;
};
return memoized.cache = new (memoize.Cache || MapCache)(), memoized;
}
var MapCache = __webpack_require__(308), FUNC_ERROR_TEXT = "Expected a function";
memoize.Cache = MapCache, module.exports = memoize;
}, function(module, exports, __webpack_require__) {
function toString(value) {
return null == value ? "" : baseToString(value);
}
var baseToString = __webpack_require__(360);
module.exports = toString;
}, function(module, exports, __webpack_require__) {
function baseToString(value) {
if ("string" == typeof value) return value;
if (isArray(value)) return arrayMap(value, baseToString) + "";
if (isSymbol(value)) return symbolToString ? symbolToString.call(value) : "";
var result = value + "";
return "0" == result && 1 / value == -INFINITY ? "-0" : result;
}
var Symbol = __webpack_require__(246), arrayMap = __webpack_require__(283), isArray = __webpack_require__(251), isSymbol = __webpack_require__(355), INFINITY = 1 / 0, symbolProto = Symbol ? Symbol.prototype : void 0, symbolToString = symbolProto ? symbolProto.toString : void 0;
module.exports = baseToString;
}, function(module, exports, __webpack_require__) {
function toKey(value) {
if ("string" == typeof value || isSymbol(value)) return value;
var result = value + "";
return "0" == result && 1 / value == -INFINITY ? "-0" : result;
}
var isSymbol = __webpack_require__(355), INFINITY = 1 / 0;
module.exports = toKey;
}, function(module, exports, __webpack_require__) {
function hasIn(object, path) {
return null != object && hasPath(object, path, baseHasIn);
}
var baseHasIn = __webpack_require__(363), hasPath = __webpack_require__(364);
module.exports = hasIn;
}, function(module, exports) {
function baseHasIn(object, key) {
return null != object && key in Object(object);
}
module.exports = baseHasIn;
}, function(module, exports, __webpack_require__) {
function hasPath(object, path, hasFunc) {
path = castPath(path, object);
for (var index = -1, length = path.length, result = !1; ++index < length; ) {
var key = toKey(path[index]);
if (!(result = null != object && hasFunc(object, key))) break;
object = object[key];
}
return result || ++index != length ? result : (length = null == object ? 0 : object.length,
!!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object)));
}
var castPath = __webpack_require__(353), isArguments = __webpack_require__(260), isArray = __webpack_require__(251), isIndex = __webpack_require__(265), isLength = __webpack_require__(268), toKey = __webpack_require__(361);
module.exports = hasPath;
}, function(module, exports, __webpack_require__) {
function property(path) {
return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
}
var baseProperty = __webpack_require__(366), basePropertyDeep = __webpack_require__(367), isKey = __webpack_require__(354), toKey = __webpack_require__(361);
module.exports = property;
}, function(module, exports) {
function baseProperty(key) {
return function(object) {
return null == object ? void 0 : object[key];
};
}
module.exports = baseProperty;
}, function(module, exports, __webpack_require__) {
function basePropertyDeep(path) {
return function(object) {
return baseGet(object, path);
};
}
var baseGet = __webpack_require__(352);
module.exports = basePropertyDeep;
}, function(module, exports, __webpack_require__) {
function baseMap(collection, iteratee) {
var index = -1, result = isArrayLike(collection) ? Array(collection.length) : [];
return baseEach(collection, function(value, key, collection) {
result[++index] = iteratee(value, key, collection);
}), result;
}
var baseEach = __webpack_require__(369), isArrayLike = __webpack_require__(275);
module.exports = baseMap;
}, function(module, exports, __webpack_require__) {
var baseForOwn = __webpack_require__(254), createBaseEach = __webpack_require__(370), baseEach = createBaseEach(baseForOwn);
module.exports = baseEach;
}, function(module, exports, __webpack_require__) {
function createBaseEach(eachFunc, fromRight) {
return function(collection, iteratee) {
if (null == collection) return collection;
if (!isArrayLike(collection)) return eachFunc(collection, iteratee);
for (var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection); (fromRight ? index-- : ++index < length) && iteratee(iterable[index], index, iterable) !== !1; ) ;
return collection;
};
}
var isArrayLike = __webpack_require__(275);
module.exports = createBaseEach;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.mergeClasses = void 0;
var _forOwn2 = __webpack_require__(253), _forOwn3 = _interopRequireDefault(_forOwn2), _cloneDeep2 = __webpack_require__(372), _cloneDeep3 = _interopRequireDefault(_cloneDeep2), _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
}
return target;
}, mergeClasses = exports.mergeClasses = function(classes) {
var activeNames = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : [], styles = classes["default"] && (0,
_cloneDeep3["default"])(classes["default"]) || {};
return activeNames.map(function(name) {
var toMerge = classes[name];
return toMerge && (0, _forOwn3["default"])(toMerge, function(value, key) {
styles[key] || (styles[key] = {}), styles[key] = _extends({}, styles[key], toMerge[key]);
}), name;
}), styles;
};
exports["default"] = mergeClasses;
}, function(module, exports, __webpack_require__) {
function cloneDeep(value) {
return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
}
var baseClone = __webpack_require__(373), CLONE_DEEP_FLAG = 1, CLONE_SYMBOLS_FLAG = 4;
module.exports = cloneDeep;
}, function(module, exports, __webpack_require__) {
function baseClone(value, bitmask, customizer, key, object, stack) {
var result, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG;
if (customizer && (result = object ? customizer(value, key, object, stack) : customizer(value)),
void 0 !== result) return result;
if (!isObject(value)) return value;
var isArr = isArray(value);
if (isArr) {
if (result = initCloneArray(value), !isDeep) return copyArray(value, result);
} else {
var tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
if (isBuffer(value)) return cloneBuffer(value, isDeep);
if (tag == objectTag || tag == argsTag || isFunc && !object) {
if (result = isFlat || isFunc ? {} : initCloneObject(value), !isDeep) return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value));
} else {
if (!cloneableTags[tag]) return object ? value : {};
result = initCloneByTag(value, tag, baseClone, isDeep);
}
}
stack || (stack = new Stack());
var stacked = stack.get(value);
if (stacked) return stacked;
stack.set(value, result);
var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys, props = isArr ? void 0 : keysFunc(value);
return arrayEach(props || value, function(subValue, key) {
props && (key = subValue, subValue = value[key]), assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
}), result;
}
var Stack = __webpack_require__(287), arrayEach = __webpack_require__(374), assignValue = __webpack_require__(375), baseAssign = __webpack_require__(378), baseAssignIn = __webpack_require__(380), cloneBuffer = __webpack_require__(384), copyArray = __webpack_require__(385), copySymbols = __webpack_require__(386), copySymbolsIn = __webpack_require__(387), getAllKeys = __webpack_require__(336), getAllKeysIn = __webpack_require__(389), getTag = __webpack_require__(342), initCloneArray = __webpack_require__(390), initCloneByTag = __webpack_require__(391), initCloneObject = __webpack_require__(402), isArray = __webpack_require__(251), isBuffer = __webpack_require__(262), isObject = __webpack_require__(277), keys = __webpack_require__(257), CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4, argsTag = "[object Arguments]", arrayTag = "[object Array]", boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag = "[object Map]", numberTag = "[object Number]", objectTag = "[object Object]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]", weakMapTag = "[object WeakMap]", arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]", cloneableTags = {};
cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = !0,
cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = !1,
module.exports = baseClone;
}, function(module, exports) {
function arrayEach(array, iteratee) {
for (var index = -1, length = null == array ? 0 : array.length; ++index < length && iteratee(array[index], index, array) !== !1; ) ;
return array;
}
module.exports = arrayEach;
}, function(module, exports, __webpack_require__) {
function assignValue(object, key, value) {
var objValue = object[key];
hasOwnProperty.call(object, key) && eq(objValue, value) && (void 0 !== value || key in object) || baseAssignValue(object, key, value);
}
var baseAssignValue = __webpack_require__(376), eq = __webpack_require__(292), objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty;
module.exports = assignValue;
}, function(module, exports, __webpack_require__) {
function baseAssignValue(object, key, value) {
"__proto__" == key && defineProperty ? defineProperty(object, key, {
configurable: !0,
enumerable: !0,
value: value,
writable: !0
}) : object[key] = value;
}
var defineProperty = __webpack_require__(377);
module.exports = baseAssignValue;
}, function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(302), defineProperty = function() {
try {
var func = getNative(Object, "defineProperty");
return func({}, "", {}), func;
} catch (e) {}
}();
module.exports = defineProperty;
}, function(module, exports, __webpack_require__) {
function baseAssign(object, source) {
return object && copyObject(source, keys(source), object);
}
var copyObject = __webpack_require__(379), keys = __webpack_require__(257);
module.exports = baseAssign;
}, function(module, exports, __webpack_require__) {
function copyObject(source, props, object, customizer) {
var isNew = !object;
object || (object = {});
for (var index = -1, length = props.length; ++index < length; ) {
var key = props[index], newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0;
void 0 === newValue && (newValue = source[key]), isNew ? baseAssignValue(object, key, newValue) : assignValue(object, key, newValue);
}
return object;
}
var assignValue = __webpack_require__(375), baseAssignValue = __webpack_require__(376);
module.exports = copyObject;
}, function(module, exports, __webpack_require__) {
function baseAssignIn(object, source) {
return object && copyObject(source, keysIn(source), object);
}
var copyObject = __webpack_require__(379), keysIn = __webpack_require__(381);
module.exports = baseAssignIn;
}, function(module, exports, __webpack_require__) {
function keysIn(object) {
return isArrayLike(object) ? arrayLikeKeys(object, !0) : baseKeysIn(object);
}
var arrayLikeKeys = __webpack_require__(258), baseKeysIn = __webpack_require__(382), isArrayLike = __webpack_require__(275);
module.exports = keysIn;
}, function(module, exports, __webpack_require__) {
function baseKeysIn(object) {
if (!isObject(object)) return nativeKeysIn(object);
var isProto = isPrototype(object), result = [];
for (var key in object) ("constructor" != key || !isProto && hasOwnProperty.call(object, key)) && result.push(key);
return result;
}
var isObject = __webpack_require__(277), isPrototype = __webpack_require__(272), nativeKeysIn = __webpack_require__(383), objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty;
module.exports = baseKeysIn;
}, function(module, exports) {
function nativeKeysIn(object) {
var result = [];
if (null != object) for (var key in Object(object)) result.push(key);
return result;
}
module.exports = nativeKeysIn;
}, function(module, exports, __webpack_require__) {
(function(module) {
function cloneBuffer(buffer, isDeep) {
if (isDeep) return buffer.slice();
var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
return buffer.copy(result), result;
}
var root = __webpack_require__(247), freeExports = "object" == typeof exports && exports && !exports.nodeType && exports, freeModule = freeExports && "object" == typeof module && module && !module.nodeType && module, moduleExports = freeModule && freeModule.exports === freeExports, Buffer = moduleExports ? root.Buffer : void 0, allocUnsafe = Buffer ? Buffer.allocUnsafe : void 0;
module.exports = cloneBuffer;
}).call(exports, __webpack_require__(263)(module));
}, function(module, exports) {
function copyArray(source, array) {
var index = -1, length = source.length;
for (array || (array = Array(length)); ++index < length; ) array[index] = source[index];
return array;
}
module.exports = copyArray;
}, function(module, exports, __webpack_require__) {
function copySymbols(source, object) {
return copyObject(source, getSymbols(source), object);
}
var copyObject = __webpack_require__(379), getSymbols = __webpack_require__(339);
module.exports = copySymbols;
}, function(module, exports, __webpack_require__) {
function copySymbolsIn(source, object) {
return copyObject(source, getSymbolsIn(source), object);
}
var copyObject = __webpack_require__(379), getSymbolsIn = __webpack_require__(388);
module.exports = copySymbolsIn;
}, function(module, exports, __webpack_require__) {
var arrayPush = __webpack_require__(338), getPrototype = __webpack_require__(281), getSymbols = __webpack_require__(339), stubArray = __webpack_require__(341), nativeGetSymbols = Object.getOwnPropertySymbols, getSymbolsIn = nativeGetSymbols ? function(object) {
for (var result = []; object; ) arrayPush(result, getSymbols(object)), object = getPrototype(object);
return result;
} : stubArray;
module.exports = getSymbolsIn;
}, function(module, exports, __webpack_require__) {
function getAllKeysIn(object) {
return baseGetAllKeys(object, keysIn, getSymbolsIn);
}
var baseGetAllKeys = __webpack_require__(337), getSymbolsIn = __webpack_require__(388), keysIn = __webpack_require__(381);
module.exports = getAllKeysIn;
}, function(module, exports) {
function initCloneArray(array) {
var length = array.length, result = array.constructor(length);
return length && "string" == typeof array[0] && hasOwnProperty.call(array, "index") && (result.index = array.index,
result.input = array.input), result;
}
var objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty;
module.exports = initCloneArray;
}, function(module, exports, __webpack_require__) {
function initCloneByTag(object, tag, cloneFunc, isDeep) {
var Ctor = object.constructor;
switch (tag) {
case arrayBufferTag:
return cloneArrayBuffer(object);
case boolTag:
case dateTag:
return new Ctor((+object));
case dataViewTag:
return cloneDataView(object, isDeep);
case float32Tag:
case float64Tag:
case int8Tag:
case int16Tag:
case int32Tag:
case uint8Tag:
case uint8ClampedTag:
case uint16Tag:
case uint32Tag:
return cloneTypedArray(object, isDeep);
case mapTag:
return cloneMap(object, isDeep, cloneFunc);
case numberTag:
case stringTag:
return new Ctor(object);
case regexpTag:
return cloneRegExp(object);
case setTag:
return cloneSet(object, isDeep, cloneFunc);
case symbolTag:
return cloneSymbol(object);
}
}
var cloneArrayBuffer = __webpack_require__(392), cloneDataView = __webpack_require__(393), cloneMap = __webpack_require__(394), cloneRegExp = __webpack_require__(397), cloneSet = __webpack_require__(398), cloneSymbol = __webpack_require__(400), cloneTypedArray = __webpack_require__(401), boolTag = "[object Boolean]", dateTag = "[object Date]", mapTag = "[object Map]", numberTag = "[object Number]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]", arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
module.exports = initCloneByTag;
}, function(module, exports, __webpack_require__) {
function cloneArrayBuffer(arrayBuffer) {
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
return new Uint8Array(result).set(new Uint8Array(arrayBuffer)), result;
}
var Uint8Array = __webpack_require__(332);
module.exports = cloneArrayBuffer;
}, function(module, exports, __webpack_require__) {
function cloneDataView(dataView, isDeep) {
var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
}
var cloneArrayBuffer = __webpack_require__(392);
module.exports = cloneDataView;
}, function(module, exports, __webpack_require__) {
function cloneMap(map, isDeep, cloneFunc) {
var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map);
return arrayReduce(array, addMapEntry, new map.constructor());
}
var addMapEntry = __webpack_require__(395), arrayReduce = __webpack_require__(396), mapToArray = __webpack_require__(333), CLONE_DEEP_FLAG = 1;
module.exports = cloneMap;
}, function(module, exports) {
function addMapEntry(map, pair) {
return map.set(pair[0], pair[1]), map;
}
module.exports = addMapEntry;
}, function(module, exports) {
function arrayReduce(array, iteratee, accumulator, initAccum) {
var index = -1, length = null == array ? 0 : array.length;
for (initAccum && length && (accumulator = array[++index]); ++index < length; ) accumulator = iteratee(accumulator, array[index], index, array);
return accumulator;
}
module.exports = arrayReduce;
}, function(module, exports) {
function cloneRegExp(regexp) {
var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
return result.lastIndex = regexp.lastIndex, result;
}
var reFlags = /\w*$/;
module.exports = cloneRegExp;
}, function(module, exports, __webpack_require__) {
function cloneSet(set, isDeep, cloneFunc) {
var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG) : setToArray(set);
return arrayReduce(array, addSetEntry, new set.constructor());
}
var addSetEntry = __webpack_require__(399), arrayReduce = __webpack_require__(396), setToArray = __webpack_require__(334), CLONE_DEEP_FLAG = 1;
module.exports = cloneSet;
}, function(module, exports) {
function addSetEntry(set, value) {
return set.add(value), set;
}
module.exports = addSetEntry;
}, function(module, exports, __webpack_require__) {
function cloneSymbol(symbol) {
return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
}
var Symbol = __webpack_require__(246), symbolProto = Symbol ? Symbol.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
module.exports = cloneSymbol;
}, function(module, exports, __webpack_require__) {
function cloneTypedArray(typedArray, isDeep) {
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
}
var cloneArrayBuffer = __webpack_require__(392);
module.exports = cloneTypedArray;
}, function(module, exports, __webpack_require__) {
function initCloneObject(object) {
return "function" != typeof object.constructor || isPrototype(object) ? {} : baseCreate(getPrototype(object));
}
var baseCreate = __webpack_require__(403), getPrototype = __webpack_require__(281), isPrototype = __webpack_require__(272);
module.exports = initCloneObject;
}, function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(277), objectCreate = Object.create, baseCreate = function() {
function object() {}
return function(proto) {
if (!isObject(proto)) return {};
if (objectCreate) return objectCreate(proto);
object.prototype = proto;
var result = new object();
return object.prototype = void 0, result;
};
}();
module.exports = baseCreate;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.autoprefix = void 0;
var _forOwn2 = __webpack_require__(253), _forOwn3 = _interopRequireDefault(_forOwn2), _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
}
return target;
}, transforms = {
borderRadius: function(value) {
return {
msBorderRadius: value,
MozBorderRadius: value,
OBorderRadius: value,
WebkitBorderRadius: value,
borderRadius: value
};
},
boxShadow: function(value) {
return {
msBoxShadow: value,
MozBoxShadow: value,
OBoxShadow: value,
WebkitBoxShadow: value,
boxShadow: value
};
},
userSelect: function(value) {
return {
WebkitTouchCallout: value,
KhtmlUserSelect: value,
MozUserSelect: value,
msUserSelect: value,
WebkitUserSelect: value,
userSelect: value
};
},
flex: function(value) {
return {
WebkitBoxFlex: value,
MozBoxFlex: value,
WebkitFlex: value,
msFlex: value,
flex: value
};
},
flexBasis: function(value) {
return {
WebkitFlexBasis: value,
flexBasis: value
};
},
justifyContent: function(value) {
return {
WebkitJustifyContent: value,
justifyContent: value
};
},
transition: function(value) {
return {
msTransition: value,
MozTransition: value,
OTransition: value,
WebkitTransition: value,
transition: value
};
},
transform: function(value) {
return {
msTransform: value,
MozTransform: value,
OTransform: value,
WebkitTransform: value,
transform: value
};
},
absolute: function(value) {
var direction = value && value.split(" ");
return {
position: "absolute",
top: direction && direction[0],
right: direction && direction[1],
bottom: direction && direction[2],
left: direction && direction[3]
};
},
extend: function(name, otherElementStyles) {
var otherStyle = otherElementStyles[name];
return otherStyle ? otherStyle : {
extend: name
};
}
}, autoprefix = exports.autoprefix = function(elements) {
var prefixed = {};
return (0, _forOwn3["default"])(elements, function(styles, element) {
var expanded = {};
(0, _forOwn3["default"])(styles, function(value, key) {
var transform = transforms[key];
transform ? expanded = _extends({}, expanded, transform(value)) : expanded[key] = value;
}), prefixed[element] = expanded;
}), prefixed;
};
exports["default"] = autoprefix;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.hover = void 0;
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
}
return target;
}, _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), hover = exports.hover = function(Component) {
var Span = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "span";
return function(_React$Component) {
function Hover() {
var _ref, _temp, _this, _ret;
_classCallCheck(this, Hover);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
return _temp = _this = _possibleConstructorReturn(this, (_ref = Hover.__proto__ || Object.getPrototypeOf(Hover)).call.apply(_ref, [ this ].concat(args))),
_this.state = {
hover: !1
}, _this.handleMouseOver = function() {
return _this.setState({
hover: !0
});
}, _this.handleMouseOut = function() {
return _this.setState({
hover: !1
});
}, _this.render = function() {
return _react2["default"].createElement(Span, {
onMouseOver: _this.handleMouseOver,
onMouseOut: _this.handleMouseOut
}, _react2["default"].createElement(Component, _extends({}, _this.props, _this.state)));
}, _ret = _temp, _possibleConstructorReturn(_this, _ret);
}
return _inherits(Hover, _React$Component), Hover;
}(_react2["default"].Component);
};
exports["default"] = hover;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.active = void 0;
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
}
return target;
}, _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), active = exports.active = function(Component) {
var Span = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "span";
return function(_React$Component) {
function Active() {
var _ref, _temp, _this, _ret;
_classCallCheck(this, Active);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
return _temp = _this = _possibleConstructorReturn(this, (_ref = Active.__proto__ || Object.getPrototypeOf(Active)).call.apply(_ref, [ this ].concat(args))),
_this.state = {
active: !1
}, _this.handleMouseDown = function() {
return _this.setState({
active: !0
});
}, _this.handleMouseUp = function() {
return _this.setState({
active: !1
});
}, _this.render = function() {
return _react2["default"].createElement(Span, {
onMouseDown: _this.handleMouseDown,
onMouseUp: _this.handleMouseUp
}, _react2["default"].createElement(Component, _extends({}, _this.props, _this.state)));
}, _ret = _temp, _possibleConstructorReturn(_this, _ret);
}
return _inherits(Active, _React$Component), Active;
}(_react2["default"].Component);
};
exports["default"] = active;
}, function(module, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: !0
});
var loopable = function(i, length) {
var props = {}, setProp = function(name) {
var value = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1];
props[name] = value;
};
return 0 === i && setProp("first-child"), i === length - 1 && setProp("last-child"),
(0 === i || i % 2 === 0) && setProp("even"), 1 === Math.abs(i % 2) && setProp("odd"),
setProp("nth-child", i), props;
};
exports["default"] = loopable;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
});
var _Alpha = __webpack_require__(409);
Object.defineProperty(exports, "Alpha", {
enumerable: !0,
get: function() {
return _interopRequireDefault(_Alpha)["default"];
}
});
var _Checkboard = __webpack_require__(411);
Object.defineProperty(exports, "Checkboard", {
enumerable: !0,
get: function() {
return _interopRequireDefault(_Checkboard)["default"];
}
});
var _EditableInput = __webpack_require__(413);
Object.defineProperty(exports, "EditableInput", {
enumerable: !0,
get: function() {
return _interopRequireDefault(_EditableInput)["default"];
}
});
var _Hue = __webpack_require__(414);
Object.defineProperty(exports, "Hue", {
enumerable: !0,
get: function() {
return _interopRequireDefault(_Hue)["default"];
}
});
var _Saturation = __webpack_require__(416);
Object.defineProperty(exports, "Saturation", {
enumerable: !0,
get: function() {
return _interopRequireDefault(_Saturation)["default"];
}
});
var _ColorWrap = __webpack_require__(422);
Object.defineProperty(exports, "ColorWrap", {
enumerable: !0,
get: function() {
return _interopRequireDefault(_ColorWrap)["default"];
}
});
var _Swatch = __webpack_require__(427);
Object.defineProperty(exports, "Swatch", {
enumerable: !0,
get: function() {
return _interopRequireDefault(_Swatch)["default"];
}
});
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireWildcard(obj) {
if (obj && obj.__esModule) return obj;
var newObj = {};
if (null != obj) for (var key in obj) Object.prototype.hasOwnProperty.call(obj, key) && (newObj[key] = obj[key]);
return newObj["default"] = obj, newObj;
}
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.Alpha = void 0;
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
}
return target;
}, _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), _alpha = __webpack_require__(410), alpha = _interopRequireWildcard(_alpha), _Checkboard = __webpack_require__(411), _Checkboard2 = _interopRequireDefault(_Checkboard), Alpha = exports.Alpha = function(_ref) {
function Alpha() {
var _ref2, _temp, _this, _ret;
_classCallCheck(this, Alpha);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
return _temp = _this = _possibleConstructorReturn(this, (_ref2 = Alpha.__proto__ || Object.getPrototypeOf(Alpha)).call.apply(_ref2, [ this ].concat(args))),
_this.handleChange = function(e, skip) {
var change = alpha.calculateChange(e, skip, _this.props, _this.refs.container);
change && _this.props.onChange(change, e);
}, _this.handleMouseDown = function(e) {
_this.handleChange(e, !0), window.addEventListener("mousemove", _this.handleChange),
window.addEventListener("mouseup", _this.handleMouseUp);
}, _this.handleMouseUp = function() {
_this.unbindEventListeners();
}, _this.unbindEventListeners = function() {
window.removeEventListener("mousemove", _this.handleChange), window.removeEventListener("mouseup", _this.handleMouseUp);
}, _ret = _temp, _possibleConstructorReturn(_this, _ret);
}
return _inherits(Alpha, _ref), _createClass(Alpha, [ {
key: "componentWillUnmount",
value: function() {
this.unbindEventListeners();
}
}, {
key: "render",
value: function() {
var rgb = this.props.rgb, styles = (0, _reactcss2["default"])({
"default": {
alpha: {
absolute: "0px 0px 0px 0px",
borderRadius: this.props.radius
},
checkboard: {
absolute: "0px 0px 0px 0px",
overflow: "hidden"
},
gradient: {
absolute: "0px 0px 0px 0px",
background: "linear-gradient(to right, rgba(" + rgb.r + "," + rgb.g + "," + rgb.b + ", 0) 0%,\n rgba(" + rgb.r + "," + rgb.g + "," + rgb.b + ", 1) 100%)",
boxShadow: this.props.shadow,
borderRadius: this.props.radius
},
container: {
position: "relative",
height: "100%",
margin: "0 3px"
},
pointer: {
position: "absolute",
left: 100 * rgb.a + "%"
},
slider: {
width: "4px",
borderRadius: "1px",
height: "8px",
boxShadow: "0 0 2px rgba(0, 0, 0, .6)",
background: "#fff",
marginTop: "1px",
transform: "translateX(-2px)"
}
},
vertical: {
gradient: {
background: "linear-gradient(to bottom, rgba(" + rgb.r + "," + rgb.g + "," + rgb.b + ", 0) 0%,\n rgba(" + rgb.r + "," + rgb.g + "," + rgb.b + ", 1) 100%)"
},
pointer: {
left: 0,
top: 100 * rgb.a + "%"
}
},
overwrite: _extends({}, this.props.style)
}, {
vertical: "vertical" === this.props.direction,
overwrite: !0
});
return _react2["default"].createElement("div", {
style: styles.alpha
}, _react2["default"].createElement("div", {
style: styles.checkboard
}, _react2["default"].createElement(_Checkboard2["default"], {
renderers: this.props.renderers
})), _react2["default"].createElement("div", {
style: styles.gradient
}), _react2["default"].createElement("div", {
style: styles.container,
ref: "container",
onMouseDown: this.handleMouseDown,
onTouchMove: this.handleChange,
onTouchStart: this.handleChange
}, _react2["default"].createElement("div", {
style: styles.pointer
}, this.props.pointer ? _react2["default"].createElement(this.props.pointer, this.props) : _react2["default"].createElement("div", {
style: styles.slider
}))));
}
} ]), Alpha;
}(_react.PureComponent || _react.Component);
exports["default"] = Alpha;
}, function(module, exports) {
"use strict";
function calculateChange(e, skip, props, container) {
!skip && e.preventDefault();
var containerWidth = container.clientWidth, containerHeight = container.clientHeight, x = "number" == typeof e.pageX ? e.pageX : e.touches[0].pageX, y = "number" == typeof e.pageY ? e.pageY : e.touches[0].pageY, left = x - (container.getBoundingClientRect().left + window.pageXOffset), top = y - (container.getBoundingClientRect().top + window.pageYOffset);
if ("vertical" === props.direction) {
var a = void 0;
if (a = top < 0 ? 0 : top > containerHeight ? 1 : Math.round(100 * top / containerHeight) / 100,
props.hsl.a !== a) return {
h: props.hsl.h,
s: props.hsl.s,
l: props.hsl.l,
a: a,
source: "rgb"
};
} else {
var _a = void 0;
if (_a = left < 0 ? 0 : left > containerWidth ? 1 : Math.round(100 * left / containerWidth) / 100,
props.a !== _a) return {
h: props.hsl.h,
s: props.hsl.s,
l: props.hsl.l,
a: _a,
source: "rgb"
};
}
return null;
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.calculateChange = calculateChange;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireWildcard(obj) {
if (obj && obj.__esModule) return obj;
var newObj = {};
if (null != obj) for (var key in obj) Object.prototype.hasOwnProperty.call(obj, key) && (newObj[key] = obj[key]);
return newObj["default"] = obj, newObj;
}
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.Checkboard = void 0;
var _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), _checkboard = __webpack_require__(412), checkboard = _interopRequireWildcard(_checkboard), Checkboard = exports.Checkboard = function(_ref) {
var white = _ref.white, grey = _ref.grey, size = _ref.size, renderers = _ref.renderers, styles = (0,
_reactcss2["default"])({
"default": {
grid: {
absolute: "0px 0px 0px 0px",
background: "url(" + checkboard.get(white, grey, size, renderers.canvas) + ") center left"
}
}
});
return _react2["default"].createElement("div", {
style: styles.grid
});
};
Checkboard.defaultProps = {
size: 8,
white: "transparent",
grey: "rgba(0,0,0,.08)",
renderers: {}
}, exports["default"] = Checkboard;
}, function(module, exports) {
"use strict";
function render(c1, c2, size, serverCanvas) {
if ("undefined" == typeof document && !serverCanvas) return null;
var canvas = serverCanvas ? new serverCanvas() : document.createElement("canvas");
canvas.width = 2 * size, canvas.height = 2 * size;
var ctx = canvas.getContext("2d");
return ctx ? (ctx.fillStyle = c1, ctx.fillRect(0, 0, canvas.width, canvas.height),
ctx.fillStyle = c2, ctx.fillRect(0, 0, size, size), ctx.translate(size, size), ctx.fillRect(0, 0, size, size),
canvas.toDataURL()) : null;
}
function get(c1, c2, size, serverCanvas) {
var key = c1 + "-" + c2 + "-" + size + (serverCanvas ? "-server" : ""), checkboard = render(c1, c2, size, serverCanvas);
return checkboardCache[key] ? checkboardCache[key] : (checkboardCache[key] = checkboard,
checkboard);
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.render = render, exports.get = get;
var checkboardCache = {};
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function _defineProperty(obj, key, value) {
return key in obj ? Object.defineProperty(obj, key, {
value: value,
enumerable: !0,
configurable: !0,
writable: !0
}) : obj[key] = value, obj;
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.EditableInput = void 0;
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), EditableInput = exports.EditableInput = function(_ref) {
function EditableInput(props) {
_classCallCheck(this, EditableInput);
var _this = _possibleConstructorReturn(this, (EditableInput.__proto__ || Object.getPrototypeOf(EditableInput)).call(this));
return _this.handleBlur = function() {
_this.state.blurValue && _this.setState({
value: _this.state.blurValue,
blurValue: null
});
}, _this.handleChange = function(e) {
_this.props.label ? _this.props.onChange(_defineProperty({}, _this.props.label, e.target.value), e) : _this.props.onChange(e.target.value, e),
_this.setState({
value: e.target.value
});
}, _this.handleKeyDown = function(e) {
var number = Number(e.target.value);
if (!isNaN(number)) {
var amount = _this.props.arrowOffset || 1;
38 === e.keyCode && (null !== _this.props.label ? _this.props.onChange(_defineProperty({}, _this.props.label, number + amount), e) : _this.props.onChange(number + amount, e),
_this.setState({
value: number + amount
})), 40 === e.keyCode && (null !== _this.props.label ? _this.props.onChange(_defineProperty({}, _this.props.label, number - amount), e) : _this.props.onChange(number - amount, e),
_this.setState({
value: number - amount
}));
}
}, _this.handleDrag = function(e) {
if (_this.props.dragLabel) {
var newValue = Math.round(_this.props.value + e.movementX);
newValue >= 0 && newValue <= _this.props.dragMax && _this.props.onChange(_defineProperty({}, _this.props.label, newValue), e);
}
}, _this.handleMouseDown = function(e) {
_this.props.dragLabel && (e.preventDefault(), _this.handleDrag(e), window.addEventListener("mousemove", _this.handleDrag),
window.addEventListener("mouseup", _this.handleMouseUp));
}, _this.handleMouseUp = function() {
_this.unbindEventListeners();
}, _this.unbindEventListeners = function() {
window.removeEventListener("mousemove", _this.handleDrag), window.removeEventListener("mouseup", _this.handleMouseUp);
}, _this.state = {
value: String(props.value).toUpperCase(),
blurValue: String(props.value).toUpperCase()
}, _this;
}
return _inherits(EditableInput, _ref), _createClass(EditableInput, [ {
key: "componentWillReceiveProps",
value: function(nextProps) {
var input = this.refs.input;
nextProps.value !== this.state.value && (input === document.activeElement ? this.setState({
blurValue: String(nextProps.value).toUpperCase()
}) : this.setState({
value: String(nextProps.value).toUpperCase()
}));
}
}, {
key: "componentWillUnmount",
value: function() {
this.unbindEventListeners();
}
}, {
key: "render",
value: function() {
var styles = (0, _reactcss2["default"])({
"default": {
wrap: {
position: "relative"
}
},
"user-override": {
wrap: this.props.style && this.props.style.wrap ? this.props.style.wrap : {},
input: this.props.style && this.props.style.input ? this.props.style.input : {},
label: this.props.style && this.props.style.label ? this.props.style.label : {}
},
"dragLabel-true": {
label: {
cursor: "ew-resize"
}
}
}, {
"user-override": !0
}, this.props);
return _react2["default"].createElement("div", {
style: styles.wrap
}, _react2["default"].createElement("input", {
style: styles.input,
ref: "input",
value: this.state.value,
onKeyDown: this.handleKeyDown,
onChange: this.handleChange,
onBlur: this.handleBlur,
placeholder: this.props.placeholder
}), this.props.label ? _react2["default"].createElement("span", {
style: styles.label,
onMouseDown: this.handleMouseDown
}, this.props.label) : null);
}
} ]), EditableInput;
}(_react.PureComponent || _react.Component);
exports["default"] = EditableInput;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireWildcard(obj) {
if (obj && obj.__esModule) return obj;
var newObj = {};
if (null != obj) for (var key in obj) Object.prototype.hasOwnProperty.call(obj, key) && (newObj[key] = obj[key]);
return newObj["default"] = obj, newObj;
}
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.Hue = void 0;
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), _hue = __webpack_require__(415), hue = _interopRequireWildcard(_hue), Hue = exports.Hue = function(_ref) {
function Hue() {
var _ref2, _temp, _this, _ret;
_classCallCheck(this, Hue);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
return _temp = _this = _possibleConstructorReturn(this, (_ref2 = Hue.__proto__ || Object.getPrototypeOf(Hue)).call.apply(_ref2, [ this ].concat(args))),
_this.handleChange = function(e, skip) {
var change = hue.calculateChange(e, skip, _this.props, _this.refs.container);
change && _this.props.onChange(change, e);
}, _this.handleMouseDown = function(e) {
_this.handleChange(e, !0), window.addEventListener("mousemove", _this.handleChange),
window.addEventListener("mouseup", _this.handleMouseUp);
}, _this.handleMouseUp = function() {
_this.unbindEventListeners();
}, _ret = _temp, _possibleConstructorReturn(_this, _ret);
}
return _inherits(Hue, _ref), _createClass(Hue, [ {
key: "componentWillUnmount",
value: function() {
this.unbindEventListeners();
}
}, {
key: "unbindEventListeners",
value: function() {
window.removeEventListener("mousemove", this.handleChange), window.removeEventListener("mouseup", this.handleMouseUp);
}
}, {
key: "render",
value: function() {
var styles = (0, _reactcss2["default"])({
"default": {
hue: {
absolute: "0px 0px 0px 0px",
background: "linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%,\n #0ff 50%, #00f 67%, #f0f 83%, #f00 100%)",
borderRadius: this.props.radius,
boxShadow: this.props.shadow
},
container: {
margin: "0 2px",
position: "relative",
height: "100%"
},
pointer: {
position: "absolute",
left: 100 * this.props.hsl.h / 360 + "%"
},
slider: {
marginTop: "1px",
width: "4px",
borderRadius: "1px",
height: "8px",
boxShadow: "0 0 2px rgba(0, 0, 0, .6)",
background: "#fff",
transform: "translateX(-2px)"
}
},
vertical: {
hue: {
background: "linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,\n #0ff 50%, #00f 67%, #f0f 83%, #f00 100%)"
},
pointer: {
left: "0px",
top: -(100 * this.props.hsl.h / 360) + 100 + "%"
}
}
}, {
vertical: "vertical" === this.props.direction
});
return _react2["default"].createElement("div", {
style: styles.hue
}, _react2["default"].createElement("div", {
style: styles.container,
ref: "container",
onMouseDown: this.handleMouseDown,
onTouchMove: this.handleChange,
onTouchStart: this.handleChange
}, _react2["default"].createElement("div", {
style: styles.pointer
}, this.props.pointer ? _react2["default"].createElement(this.props.pointer, this.props) : _react2["default"].createElement("div", {
style: styles.slider
}))));
}
} ]), Hue;
}(_react.PureComponent || _react.Component);
exports["default"] = Hue;
}, function(module, exports) {
"use strict";
function calculateChange(e, skip, props, container) {
!skip && e.preventDefault();
var containerWidth = container.clientWidth, containerHeight = container.clientHeight, x = "number" == typeof e.pageX ? e.pageX : e.touches[0].pageX, y = "number" == typeof e.pageY ? e.pageY : e.touches[0].pageY, left = x - (container.getBoundingClientRect().left + window.pageXOffset), top = y - (container.getBoundingClientRect().top + window.pageYOffset);
if ("vertical" === props.direction) {
var h = void 0;
if (top < 0) h = 359; else if (top > containerHeight) h = 0; else {
var percent = -(100 * top / containerHeight) + 100;
h = 360 * percent / 100;
}
if (props.hsl.h !== h) return {
h: h,
s: props.hsl.s,
l: props.hsl.l,
a: props.hsl.a,
source: "rgb"
};
} else {
var _h = void 0;
if (left < 0) _h = 0; else if (left > containerWidth) _h = 359; else {
var _percent = 100 * left / containerWidth;
_h = 360 * _percent / 100;
}
if (props.hsl.h !== _h) return {
h: _h,
s: props.hsl.s,
l: props.hsl.l,
a: props.hsl.a,
source: "rgb"
};
}
return null;
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.calculateChange = calculateChange;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireWildcard(obj) {
if (obj && obj.__esModule) return obj;
var newObj = {};
if (null != obj) for (var key in obj) Object.prototype.hasOwnProperty.call(obj, key) && (newObj[key] = obj[key]);
return newObj["default"] = obj, newObj;
}
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.Saturation = void 0;
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), _throttle = __webpack_require__(417), _throttle2 = _interopRequireDefault(_throttle), _saturation = __webpack_require__(421), saturation = _interopRequireWildcard(_saturation), Saturation = exports.Saturation = function(_ref) {
function Saturation(props) {
_classCallCheck(this, Saturation);
var _this = _possibleConstructorReturn(this, (Saturation.__proto__ || Object.getPrototypeOf(Saturation)).call(this, props));
return _this.handleChange = function(e, skip) {
_this.throttle(_this.props.onChange, saturation.calculateChange(e, skip, _this.props, _this.refs.container), e);
}, _this.handleMouseDown = function(e) {
_this.handleChange(e, !0), window.addEventListener("mousemove", _this.handleChange),
window.addEventListener("mouseup", _this.handleMouseUp);
}, _this.handleMouseUp = function() {
_this.unbindEventListeners();
}, _this.throttle = (0, _throttle2["default"])(function(fn, data, e) {
fn(data, e);
}, 50), _this;
}
return _inherits(Saturation, _ref), _createClass(Saturation, [ {
key: "componentWillUnmount",
value: function() {
this.unbindEventListeners();
}
}, {
key: "unbindEventListeners",
value: function() {
window.removeEventListener("mousemove", this.handleChange), window.removeEventListener("mouseup", this.handleMouseUp);
}
}, {
key: "render",
value: function() {
var _ref2 = this.props.style || {}, color = _ref2.color, white = _ref2.white, black = _ref2.black, pointer = _ref2.pointer, circle = _ref2.circle, styles = (0,
_reactcss2["default"])({
"default": {
color: {
absolute: "0px 0px 0px 0px",
background: "hsl(" + this.props.hsl.h + ",100%, 50%)",
borderRadius: this.props.radius
},
white: {
absolute: "0px 0px 0px 0px",
background: "linear-gradient(to right, #fff, rgba(255,255,255,0))"
},
black: {
absolute: "0px 0px 0px 0px",
background: "linear-gradient(to top, #000, rgba(0,0,0,0))",
boxShadow: this.props.shadow
},
pointer: {
position: "absolute",
top: -(100 * this.props.hsv.v) + 100 + "%",
left: 100 * this.props.hsv.s + "%",
cursor: "default"
},
circle: {
width: "4px",
height: "4px",
boxShadow: "0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\n 0 0 1px 2px rgba(0,0,0,.4)",
borderRadius: "50%",
cursor: "hand",
transform: "translate(-2px, -2px)"
}
},
custom: {
color: color,
white: white,
black: black,
pointer: pointer,
circle: circle
}
}, {
custom: !!this.props.style
});
return _react2["default"].createElement("div", {
style: styles.color,
ref: "container",
onMouseDown: this.handleMouseDown,
onTouchMove: this.handleChange,
onTouchStart: this.handleChange
}, _react2["default"].createElement("div", {
style: styles.white
}, _react2["default"].createElement("div", {
style: styles.black
}), _react2["default"].createElement("div", {
style: styles.pointer
}, this.props.pointer ? _react2["default"].createElement(this.props.pointer, this.props) : _react2["default"].createElement("div", {
style: styles.circle
}))));
}
} ]), Saturation;
}(_react.PureComponent || _react.Component);
exports["default"] = Saturation;
}, function(module, exports, __webpack_require__) {
function throttle(func, wait, options) {
var leading = !0, trailing = !0;
if ("function" != typeof func) throw new TypeError(FUNC_ERROR_TEXT);
return isObject(options) && (leading = "leading" in options ? !!options.leading : leading,
trailing = "trailing" in options ? !!options.trailing : trailing), debounce(func, wait, {
leading: leading,
maxWait: wait,
trailing: trailing
});
}
var debounce = __webpack_require__(418), isObject = __webpack_require__(277), FUNC_ERROR_TEXT = "Expected a function";
module.exports = throttle;
}, function(module, exports, __webpack_require__) {
function debounce(func, wait, options) {
function invokeFunc(time) {
var args = lastArgs, thisArg = lastThis;
return lastArgs = lastThis = void 0, lastInvokeTime = time, result = func.apply(thisArg, args);
}
function leadingEdge(time) {
return lastInvokeTime = time, timerId = setTimeout(timerExpired, wait), leading ? invokeFunc(time) : result;
}
function remainingWait(time) {
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, result = wait - timeSinceLastCall;
return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
}
function shouldInvoke(time) {
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
return void 0 === lastCallTime || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
}
function timerExpired() {
var time = now();
return shouldInvoke(time) ? trailingEdge(time) : void (timerId = setTimeout(timerExpired, remainingWait(time)));
}
function trailingEdge(time) {
return timerId = void 0, trailing && lastArgs ? invokeFunc(time) : (lastArgs = lastThis = void 0,
result);
}
function cancel() {
void 0 !== timerId && clearTimeout(timerId), lastInvokeTime = 0, lastArgs = lastCallTime = lastThis = timerId = void 0;
}
function flush() {
return void 0 === timerId ? result : trailingEdge(now());
}
function debounced() {
var time = now(), isInvoking = shouldInvoke(time);
if (lastArgs = arguments, lastThis = this, lastCallTime = time, isInvoking) {
if (void 0 === timerId) return leadingEdge(lastCallTime);
if (maxing) return timerId = setTimeout(timerExpired, wait), invokeFunc(lastCallTime);
}
return void 0 === timerId && (timerId = setTimeout(timerExpired, wait)), result;
}
var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = !1, maxing = !1, trailing = !0;
if ("function" != typeof func) throw new TypeError(FUNC_ERROR_TEXT);
return wait = toNumber(wait) || 0, isObject(options) && (leading = !!options.leading,
maxing = "maxWait" in options, maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait,
trailing = "trailing" in options ? !!options.trailing : trailing), debounced.cancel = cancel,
debounced.flush = flush, debounced;
}
var isObject = __webpack_require__(277), now = __webpack_require__(419), toNumber = __webpack_require__(420), FUNC_ERROR_TEXT = "Expected a function", nativeMax = Math.max, nativeMin = Math.min;
module.exports = debounce;
}, function(module, exports, __webpack_require__) {
var root = __webpack_require__(247), now = function() {
return root.Date.now();
};
module.exports = now;
}, function(module, exports, __webpack_require__) {
function toNumber(value) {
if ("number" == typeof value) return value;
if (isSymbol(value)) return NAN;
if (isObject(value)) {
var other = "function" == typeof value.valueOf ? value.valueOf() : value;
value = isObject(other) ? other + "" : other;
}
if ("string" != typeof value) return 0 === value ? value : +value;
value = value.replace(reTrim, "");
var isBinary = reIsBinary.test(value);
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
}
var isObject = __webpack_require__(277), isSymbol = __webpack_require__(355), NAN = NaN, reTrim = /^\s+|\s+$/g, reIsBadHex = /^[-+]0x[0-9a-f]+$/i, reIsBinary = /^0b[01]+$/i, reIsOctal = /^0o[0-7]+$/i, freeParseInt = parseInt;
module.exports = toNumber;
}, function(module, exports) {
"use strict";
function calculateChange(e, skip, props, container) {
!skip && e.preventDefault();
var containerWidth = container.clientWidth, containerHeight = container.clientHeight, x = "number" == typeof e.pageX ? e.pageX : e.touches[0].pageX, y = "number" == typeof e.pageY ? e.pageY : e.touches[0].pageY, left = x - (container.getBoundingClientRect().left + window.pageXOffset), top = y - (container.getBoundingClientRect().top + window.pageYOffset);
left < 0 ? left = 0 : left > containerWidth ? left = containerWidth : top < 0 ? top = 0 : top > containerHeight && (top = containerHeight);
var saturation = 100 * left / containerWidth, bright = -(100 * top / containerHeight) + 100;
return {
h: props.hsl.h,
s: saturation,
v: bright,
a: props.hsl.a,
source: "rgb"
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.calculateChange = calculateChange;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.ColorWrap = void 0;
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
}
return target;
}, _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _debounce = __webpack_require__(418), _debounce2 = _interopRequireDefault(_debounce), _color = __webpack_require__(423), _color2 = _interopRequireDefault(_color), ColorWrap = exports.ColorWrap = function(Picker) {
var ColorPicker = function(_ref) {
function ColorPicker(props) {
_classCallCheck(this, ColorPicker);
var _this = _possibleConstructorReturn(this, (ColorPicker.__proto__ || Object.getPrototypeOf(ColorPicker)).call(this));
return _this.handleChange = function(data, event) {
var isValidColor = _color2["default"].simpleCheckForValidColor(data);
if (isValidColor) {
var colors = _color2["default"].toState(data, data.h || _this.state.oldHue);
_this.setState(colors), _this.props.onChangeComplete && _this.debounce(_this.props.onChangeComplete, colors, event),
_this.props.onChange && _this.props.onChange(colors, event);
}
}, _this.state = _extends({}, _color2["default"].toState(props.color, 0), {
visible: props.display
}), _this.debounce = (0, _debounce2["default"])(function(fn, data, event) {
fn(data, event);
}, 100), _this;
}
return _inherits(ColorPicker, _ref), _createClass(ColorPicker, [ {
key: "componentWillReceiveProps",
value: function(nextProps) {
this.setState(_extends({}, _color2["default"].toState(nextProps.color, this.state.oldHue), {
visible: nextProps.display
}));
}
}, {
key: "render",
value: function() {
return _react2["default"].createElement(Picker, _extends({}, this.props, this.state, {
onChange: this.handleChange
}));
}
} ]), ColorPicker;
}(_react.PureComponent || _react.Component);
return ColorPicker.defaultProps = {
color: {
h: 250,
s: .5,
l: .2,
a: 1
}
}, ColorPicker;
};
exports["default"] = ColorWrap;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.red = void 0;
var _each = __webpack_require__(424), _each2 = _interopRequireDefault(_each), _tinycolor = __webpack_require__(426), _tinycolor2 = _interopRequireDefault(_tinycolor);
exports["default"] = {
simpleCheckForValidColor: function(data) {
var keysToCheck = [ "r", "g", "b", "a", "h", "s", "a", "v" ], checked = 0, passed = 0;
return (0, _each2["default"])(keysToCheck, function(letter) {
data[letter] && (checked += 1, isNaN(data[letter]) || (passed += 1));
}), checked === passed && data;
},
toState: function(data, oldHue) {
var color = data.hex ? (0, _tinycolor2["default"])(data.hex) : (0, _tinycolor2["default"])(data), hsl = color.toHsl(), hsv = color.toHsv();
return 0 === hsl.s && (hsl.h = oldHue || 0, hsv.h = oldHue || 0), {
hsl: hsl,
hex: "#" + color.toHex(),
rgb: color.toRgb(),
hsv: hsv,
oldHue: data.h || oldHue || hsl.h,
source: data.source
};
},
isValidHex: function(hex) {
return (0, _tinycolor2["default"])(hex).isValid();
}
};
exports.red = {
hsl: {
a: 1,
h: 0,
l: .5,
s: 1
},
hex: "#ff0000",
rgb: {
r: 255,
g: 0,
b: 0,
a: 1
},
hsv: {
h: 0,
s: 1,
v: 1,
a: 1
}
};
}, function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(425);
}, function(module, exports, __webpack_require__) {
function forEach(collection, iteratee) {
var func = isArray(collection) ? arrayEach : baseEach;
return func(collection, castFunction(iteratee));
}
var arrayEach = __webpack_require__(374), baseEach = __webpack_require__(369), castFunction = __webpack_require__(278), isArray = __webpack_require__(251);
module.exports = forEach;
}, function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;
!function() {
function tinycolor(color, opts) {
if (color = color ? color : "", opts = opts || {}, color instanceof tinycolor) return color;
if (!(this instanceof tinycolor)) return new tinycolor(color, opts);
var rgb = inputToRGB(color);
this._originalInput = color, this._r = rgb.r, this._g = rgb.g, this._b = rgb.b,
this._a = rgb.a, this._roundA = mathRound(100 * this._a) / 100, this._format = opts.format || rgb.format,
this._gradientType = opts.gradientType, this._r < 1 && (this._r = mathRound(this._r)),
this._g < 1 && (this._g = mathRound(this._g)), this._b < 1 && (this._b = mathRound(this._b)),
this._ok = rgb.ok, this._tc_id = tinyCounter++;
}
function inputToRGB(color) {
var rgb = {
r: 0,
g: 0,
b: 0
}, a = 1, ok = !1, format = !1;
return "string" == typeof color && (color = stringInputToObject(color)), "object" == typeof color && (color.hasOwnProperty("r") && color.hasOwnProperty("g") && color.hasOwnProperty("b") ? (rgb = rgbToRgb(color.r, color.g, color.b),
ok = !0, format = "%" === String(color.r).substr(-1) ? "prgb" : "rgb") : color.hasOwnProperty("h") && color.hasOwnProperty("s") && color.hasOwnProperty("v") ? (color.s = convertToPercentage(color.s, 1),
color.v = convertToPercentage(color.v, 1), rgb = hsvToRgb(color.h, color.s, color.v),
ok = !0, format = "hsv") : color.hasOwnProperty("h") && color.hasOwnProperty("s") && color.hasOwnProperty("l") && (color.s = convertToPercentage(color.s),
color.l = convertToPercentage(color.l), rgb = hslToRgb(color.h, color.s, color.l),
ok = !0, format = "hsl"), color.hasOwnProperty("a") && (a = color.a)), a = boundAlpha(a),
{
ok: ok,
format: color.format || format,
r: mathMin(255, mathMax(rgb.r, 0)),
g: mathMin(255, mathMax(rgb.g, 0)),
b: mathMin(255, mathMax(rgb.b, 0)),
a: a
};
}
function rgbToRgb(r, g, b) {
return {
r: 255 * bound01(r, 255),
g: 255 * bound01(g, 255),
b: 255 * bound01(b, 255)
};
}
function rgbToHsl(r, g, b) {
r = bound01(r, 255), g = bound01(g, 255), b = bound01(b, 255);
var h, s, max = mathMax(r, g, b), min = mathMin(r, g, b), l = (max + min) / 2;
if (max == min) h = s = 0; else {
var d = max - min;
switch (s = l > .5 ? d / (2 - max - min) : d / (max + min), max) {
case r:
h = (g - b) / d + (g < b ? 6 : 0);
break;
case g:
h = (b - r) / d + 2;
break;
case b:
h = (r - g) / d + 4;
}
h /= 6;
}
return {
h: h,
s: s,
l: l
};
}
function hslToRgb(h, s, l) {
function hue2rgb(p, q, t) {
return t < 0 && (t += 1), t > 1 && (t -= 1), t < 1 / 6 ? p + 6 * (q - p) * t : t < .5 ? q : t < 2 / 3 ? p + (q - p) * (2 / 3 - t) * 6 : p;
}
var r, g, b;
if (h = bound01(h, 360), s = bound01(s, 100), l = bound01(l, 100), 0 === s) r = g = b = l; else {
var q = l < .5 ? l * (1 + s) : l + s - l * s, p = 2 * l - q;
r = hue2rgb(p, q, h + 1 / 3), g = hue2rgb(p, q, h), b = hue2rgb(p, q, h - 1 / 3);
}
return {
r: 255 * r,
g: 255 * g,
b: 255 * b
};
}
function rgbToHsv(r, g, b) {
r = bound01(r, 255), g = bound01(g, 255), b = bound01(b, 255);
var h, s, max = mathMax(r, g, b), min = mathMin(r, g, b), v = max, d = max - min;
if (s = 0 === max ? 0 : d / max, max == min) h = 0; else {
switch (max) {
case r:
h = (g - b) / d + (g < b ? 6 : 0);
break;
case g:
h = (b - r) / d + 2;
break;
case b:
h = (r - g) / d + 4;
}
h /= 6;
}
return {
h: h,
s: s,
v: v
};
}
function hsvToRgb(h, s, v) {
h = 6 * bound01(h, 360), s = bound01(s, 100), v = bound01(v, 100);
var i = math.floor(h), f = h - i, p = v * (1 - s), q = v * (1 - f * s), t = v * (1 - (1 - f) * s), mod = i % 6, r = [ v, q, p, p, t, v ][mod], g = [ t, v, v, q, p, p ][mod], b = [ p, p, t, v, v, q ][mod];
return {
r: 255 * r,
g: 255 * g,
b: 255 * b
};
}
function rgbToHex(r, g, b, allow3Char) {
var hex = [ pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16)) ];
return allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) ? hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) : hex.join("");
}
function rgbaToHex(r, g, b, a) {
var hex = [ pad2(convertDecimalToHex(a)), pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16)) ];
return hex.join("");
}
function desaturate(color, amount) {
amount = 0 === amount ? 0 : amount || 10;
var hsl = tinycolor(color).toHsl();
return hsl.s -= amount / 100, hsl.s = clamp01(hsl.s), tinycolor(hsl);
}
function saturate(color, amount) {
amount = 0 === amount ? 0 : amount || 10;
var hsl = tinycolor(color).toHsl();
return hsl.s += amount / 100, hsl.s = clamp01(hsl.s), tinycolor(hsl);
}
function greyscale(color) {
return tinycolor(color).desaturate(100);
}
function lighten(color, amount) {
amount = 0 === amount ? 0 : amount || 10;
var hsl = tinycolor(color).toHsl();
return hsl.l += amount / 100, hsl.l = clamp01(hsl.l), tinycolor(hsl);
}
function brighten(color, amount) {
amount = 0 === amount ? 0 : amount || 10;
var rgb = tinycolor(color).toRgb();
return rgb.r = mathMax(0, mathMin(255, rgb.r - mathRound(255 * -(amount / 100)))),
rgb.g = mathMax(0, mathMin(255, rgb.g - mathRound(255 * -(amount / 100)))), rgb.b = mathMax(0, mathMin(255, rgb.b - mathRound(255 * -(amount / 100)))),
tinycolor(rgb);
}
function darken(color, amount) {
amount = 0 === amount ? 0 : amount || 10;
var hsl = tinycolor(color).toHsl();
return hsl.l -= amount / 100, hsl.l = clamp01(hsl.l), tinycolor(hsl);
}
function spin(color, amount) {
var hsl = tinycolor(color).toHsl(), hue = (mathRound(hsl.h) + amount) % 360;
return hsl.h = hue < 0 ? 360 + hue : hue, tinycolor(hsl);
}
function complement(color) {
var hsl = tinycolor(color).toHsl();
return hsl.h = (hsl.h + 180) % 360, tinycolor(hsl);
}
function triad(color) {
var hsl = tinycolor(color).toHsl(), h = hsl.h;
return [ tinycolor(color), tinycolor({
h: (h + 120) % 360,
s: hsl.s,
l: hsl.l
}), tinycolor({
h: (h + 240) % 360,
s: hsl.s,
l: hsl.l
}) ];
}
function tetrad(color) {
var hsl = tinycolor(color).toHsl(), h = hsl.h;
return [ tinycolor(color), tinycolor({
h: (h + 90) % 360,
s: hsl.s,
l: hsl.l
}), tinycolor({
h: (h + 180) % 360,
s: hsl.s,
l: hsl.l
}), tinycolor({
h: (h + 270) % 360,
s: hsl.s,
l: hsl.l
}) ];
}
function splitcomplement(color) {
var hsl = tinycolor(color).toHsl(), h = hsl.h;
return [ tinycolor(color), tinycolor({
h: (h + 72) % 360,
s: hsl.s,
l: hsl.l
}), tinycolor({
h: (h + 216) % 360,
s: hsl.s,
l: hsl.l
}) ];
}
function analogous(color, results, slices) {
results = results || 6, slices = slices || 30;
var hsl = tinycolor(color).toHsl(), part = 360 / slices, ret = [ tinycolor(color) ];
for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results; ) hsl.h = (hsl.h + part) % 360,
ret.push(tinycolor(hsl));
return ret;
}
function monochromatic(color, results) {
results = results || 6;
for (var hsv = tinycolor(color).toHsv(), h = hsv.h, s = hsv.s, v = hsv.v, ret = [], modification = 1 / results; results--; ) ret.push(tinycolor({
h: h,
s: s,
v: v
})), v = (v + modification) % 1;
return ret;
}
function flip(o) {
var flipped = {};
for (var i in o) o.hasOwnProperty(i) && (flipped[o[i]] = i);
return flipped;
}
function boundAlpha(a) {
return a = parseFloat(a), (isNaN(a) || a < 0 || a > 1) && (a = 1), a;
}
function bound01(n, max) {
isOnePointZero(n) && (n = "100%");
var processPercent = isPercentage(n);
return n = mathMin(max, mathMax(0, parseFloat(n))), processPercent && (n = parseInt(n * max, 10) / 100),
math.abs(n - max) < 1e-6 ? 1 : n % max / parseFloat(max);
}
function clamp01(val) {
return mathMin(1, mathMax(0, val));
}
function parseIntFromHex(val) {
return parseInt(val, 16);
}
function isOnePointZero(n) {
return "string" == typeof n && n.indexOf(".") != -1 && 1 === parseFloat(n);
}
function isPercentage(n) {
return "string" == typeof n && n.indexOf("%") != -1;
}
function pad2(c) {
return 1 == c.length ? "0" + c : "" + c;
}
function convertToPercentage(n, multiplier) {
return multiplier = multiplier || 100, n <= 1 && (n = n * multiplier + "%"), n;
}
function convertDecimalToHex(d) {
return Math.round(255 * parseFloat(d)).toString(16);
}
function convertHexToDecimal(h) {
return parseIntFromHex(h) / 255;
}
function stringInputToObject(color) {
color = color.replace(trimLeft, "").replace(trimRight, "").toLowerCase();
var named = !1;
if (names[color]) color = names[color], named = !0; else if ("transparent" == color) return {
r: 0,
g: 0,
b: 0,
a: 0,
format: "name"
};
var match;
return (match = matchers.rgb.exec(color)) ? {
r: match[1],
g: match[2],
b: match[3]
} : (match = matchers.rgba.exec(color)) ? {
r: match[1],
g: match[2],
b: match[3],
a: match[4]
} : (match = matchers.hsl.exec(color)) ? {
h: match[1],
s: match[2],
l: match[3]
} : (match = matchers.hsla.exec(color)) ? {
h: match[1],
s: match[2],
l: match[3],
a: match[4]
} : (match = matchers.hsv.exec(color)) ? {
h: match[1],
s: match[2],
v: match[3]
} : (match = matchers.hsva.exec(color)) ? {
h: match[1],
s: match[2],
v: match[3],
a: match[4]
} : (match = matchers.hex8.exec(color)) ? {
a: convertHexToDecimal(match[1]),
r: parseIntFromHex(match[2]),
g: parseIntFromHex(match[3]),
b: parseIntFromHex(match[4]),
format: named ? "name" : "hex8"
} : (match = matchers.hex6.exec(color)) ? {
r: parseIntFromHex(match[1]),
g: parseIntFromHex(match[2]),
b: parseIntFromHex(match[3]),
format: named ? "name" : "hex"
} : !!(match = matchers.hex3.exec(color)) && {
r: parseIntFromHex(match[1] + "" + match[1]),
g: parseIntFromHex(match[2] + "" + match[2]),
b: parseIntFromHex(match[3] + "" + match[3]),
format: named ? "name" : "hex"
};
}
function validateWCAG2Parms(parms) {
var level, size;
return parms = parms || {
level: "AA",
size: "small"
}, level = (parms.level || "AA").toUpperCase(), size = (parms.size || "small").toLowerCase(),
"AA" !== level && "AAA" !== level && (level = "AA"), "small" !== size && "large" !== size && (size = "small"),
{
level: level,
size: size
};
}
var trimLeft = /^[\s,#]+/, trimRight = /\s+$/, tinyCounter = 0, math = Math, mathRound = math.round, mathMin = math.min, mathMax = math.max, mathRandom = math.random;
tinycolor.prototype = {
isDark: function() {
return this.getBrightness() < 128;
},
isLight: function() {
return !this.isDark();
},
isValid: function() {
return this._ok;
},
getOriginalInput: function() {
return this._originalInput;
},
getFormat: function() {
return this._format;
},
getAlpha: function() {
return this._a;
},
getBrightness: function() {
var rgb = this.toRgb();
return (299 * rgb.r + 587 * rgb.g + 114 * rgb.b) / 1e3;
},
getLuminance: function() {
var RsRGB, GsRGB, BsRGB, R, G, B, rgb = this.toRgb();
return RsRGB = rgb.r / 255, GsRGB = rgb.g / 255, BsRGB = rgb.b / 255, R = RsRGB <= .03928 ? RsRGB / 12.92 : Math.pow((RsRGB + .055) / 1.055, 2.4),
G = GsRGB <= .03928 ? GsRGB / 12.92 : Math.pow((GsRGB + .055) / 1.055, 2.4), B = BsRGB <= .03928 ? BsRGB / 12.92 : Math.pow((BsRGB + .055) / 1.055, 2.4),
.2126 * R + .7152 * G + .0722 * B;
},
setAlpha: function(value) {
return this._a = boundAlpha(value), this._roundA = mathRound(100 * this._a) / 100,
this;
},
toHsv: function() {
var hsv = rgbToHsv(this._r, this._g, this._b);
return {
h: 360 * hsv.h,
s: hsv.s,
v: hsv.v,
a: this._a
};
},
toHsvString: function() {
var hsv = rgbToHsv(this._r, this._g, this._b), h = mathRound(360 * hsv.h), s = mathRound(100 * hsv.s), v = mathRound(100 * hsv.v);
return 1 == this._a ? "hsv(" + h + ", " + s + "%, " + v + "%)" : "hsva(" + h + ", " + s + "%, " + v + "%, " + this._roundA + ")";
},
toHsl: function() {
var hsl = rgbToHsl(this._r, this._g, this._b);
return {
h: 360 * hsl.h,
s: hsl.s,
l: hsl.l,
a: this._a
};
},
toHslString: function() {
var hsl = rgbToHsl(this._r, this._g, this._b), h = mathRound(360 * hsl.h), s = mathRound(100 * hsl.s), l = mathRound(100 * hsl.l);
return 1 == this._a ? "hsl(" + h + ", " + s + "%, " + l + "%)" : "hsla(" + h + ", " + s + "%, " + l + "%, " + this._roundA + ")";
},
toHex: function(allow3Char) {
return rgbToHex(this._r, this._g, this._b, allow3Char);
},
toHexString: function(allow3Char) {
return "#" + this.toHex(allow3Char);
},
toHex8: function() {
return rgbaToHex(this._r, this._g, this._b, this._a);
},
toHex8String: function() {
return "#" + this.toHex8();
},
toRgb: function() {
return {
r: mathRound(this._r),
g: mathRound(this._g),
b: mathRound(this._b),
a: this._a
};
},
toRgbString: function() {
return 1 == this._a ? "rgb(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ")" : "rgba(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ", " + this._roundA + ")";
},
toPercentageRgb: function() {
return {
r: mathRound(100 * bound01(this._r, 255)) + "%",
g: mathRound(100 * bound01(this._g, 255)) + "%",
b: mathRound(100 * bound01(this._b, 255)) + "%",
a: this._a
};
},
toPercentageRgbString: function() {
return 1 == this._a ? "rgb(" + mathRound(100 * bound01(this._r, 255)) + "%, " + mathRound(100 * bound01(this._g, 255)) + "%, " + mathRound(100 * bound01(this._b, 255)) + "%)" : "rgba(" + mathRound(100 * bound01(this._r, 255)) + "%, " + mathRound(100 * bound01(this._g, 255)) + "%, " + mathRound(100 * bound01(this._b, 255)) + "%, " + this._roundA + ")";
},
toName: function() {
return 0 === this._a ? "transparent" : !(this._a < 1) && (hexNames[rgbToHex(this._r, this._g, this._b, !0)] || !1);
},
toFilter: function(secondColor) {
var hex8String = "#" + rgbaToHex(this._r, this._g, this._b, this._a), secondHex8String = hex8String, gradientType = this._gradientType ? "GradientType = 1, " : "";
if (secondColor) {
var s = tinycolor(secondColor);
secondHex8String = s.toHex8String();
}
return "progid:DXImageTransform.Microsoft.gradient(" + gradientType + "startColorstr=" + hex8String + ",endColorstr=" + secondHex8String + ")";
},
toString: function(format) {
var formatSet = !!format;
format = format || this._format;
var formattedString = !1, hasAlpha = this._a < 1 && this._a >= 0, needsAlphaFormat = !formatSet && hasAlpha && ("hex" === format || "hex6" === format || "hex3" === format || "name" === format);
return needsAlphaFormat ? "name" === format && 0 === this._a ? this.toName() : this.toRgbString() : ("rgb" === format && (formattedString = this.toRgbString()),
"prgb" === format && (formattedString = this.toPercentageRgbString()), "hex" !== format && "hex6" !== format || (formattedString = this.toHexString()),
"hex3" === format && (formattedString = this.toHexString(!0)), "hex8" === format && (formattedString = this.toHex8String()),
"name" === format && (formattedString = this.toName()), "hsl" === format && (formattedString = this.toHslString()),
"hsv" === format && (formattedString = this.toHsvString()), formattedString || this.toHexString());
},
_applyModification: function(fn, args) {
var color = fn.apply(null, [ this ].concat([].slice.call(args)));
return this._r = color._r, this._g = color._g, this._b = color._b, this.setAlpha(color._a),
this;
},
lighten: function() {
return this._applyModification(lighten, arguments);
},
brighten: function() {
return this._applyModification(brighten, arguments);
},
darken: function() {
return this._applyModification(darken, arguments);
},
desaturate: function() {
return this._applyModification(desaturate, arguments);
},
saturate: function() {
return this._applyModification(saturate, arguments);
},
greyscale: function() {
return this._applyModification(greyscale, arguments);
},
spin: function() {
return this._applyModification(spin, arguments);
},
_applyCombination: function(fn, args) {
return fn.apply(null, [ this ].concat([].slice.call(args)));
},
analogous: function() {
return this._applyCombination(analogous, arguments);
},
complement: function() {
return this._applyCombination(complement, arguments);
},
monochromatic: function() {
return this._applyCombination(monochromatic, arguments);
},
splitcomplement: function() {
return this._applyCombination(splitcomplement, arguments);
},
triad: function() {
return this._applyCombination(triad, arguments);
},
tetrad: function() {
return this._applyCombination(tetrad, arguments);
}
}, tinycolor.fromRatio = function(color, opts) {
if ("object" == typeof color) {
var newColor = {};
for (var i in color) color.hasOwnProperty(i) && ("a" === i ? newColor[i] = color[i] : newColor[i] = convertToPercentage(color[i]));
color = newColor;
}
return tinycolor(color, opts);
}, tinycolor.equals = function(color1, color2) {
return !(!color1 || !color2) && tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();
}, tinycolor.random = function() {
return tinycolor.fromRatio({
r: mathRandom(),
g: mathRandom(),
b: mathRandom()
});
}, tinycolor.mix = function(color1, color2, amount) {
amount = 0 === amount ? 0 : amount || 50;
var w1, rgb1 = tinycolor(color1).toRgb(), rgb2 = tinycolor(color2).toRgb(), p = amount / 100, w = 2 * p - 1, a = rgb2.a - rgb1.a;
w1 = w * a == -1 ? w : (w + a) / (1 + w * a), w1 = (w1 + 1) / 2;
var w2 = 1 - w1, rgba = {
r: rgb2.r * w1 + rgb1.r * w2,
g: rgb2.g * w1 + rgb1.g * w2,
b: rgb2.b * w1 + rgb1.b * w2,
a: rgb2.a * p + rgb1.a * (1 - p)
};
return tinycolor(rgba);
}, tinycolor.readability = function(color1, color2) {
var c1 = tinycolor(color1), c2 = tinycolor(color2);
return (Math.max(c1.getLuminance(), c2.getLuminance()) + .05) / (Math.min(c1.getLuminance(), c2.getLuminance()) + .05);
}, tinycolor.isReadable = function(color1, color2, wcag2) {
var wcag2Parms, out, readability = tinycolor.readability(color1, color2);
switch (out = !1, wcag2Parms = validateWCAG2Parms(wcag2), wcag2Parms.level + wcag2Parms.size) {
case "AAsmall":
case "AAAlarge":
out = readability >= 4.5;
break;
case "AAlarge":
out = readability >= 3;
break;
case "AAAsmall":
out = readability >= 7;
}
return out;
}, tinycolor.mostReadable = function(baseColor, colorList, args) {
var readability, includeFallbackColors, level, size, bestColor = null, bestScore = 0;
args = args || {}, includeFallbackColors = args.includeFallbackColors, level = args.level,
size = args.size;
for (var i = 0; i < colorList.length; i++) readability = tinycolor.readability(baseColor, colorList[i]),
readability > bestScore && (bestScore = readability, bestColor = tinycolor(colorList[i]));
return tinycolor.isReadable(baseColor, bestColor, {
level: level,
size: size
}) || !includeFallbackColors ? bestColor : (args.includeFallbackColors = !1, tinycolor.mostReadable(baseColor, [ "#fff", "#000" ], args));
};
var names = tinycolor.names = {
aliceblue: "f0f8ff",
antiquewhite: "faebd7",
aqua: "0ff",
aquamarine: "7fffd4",
azure: "f0ffff",
beige: "f5f5dc",
bisque: "ffe4c4",
black: "000",
blanchedalmond: "ffebcd",
blue: "00f",
blueviolet: "8a2be2",
brown: "a52a2a",
burlywood: "deb887",
burntsienna: "ea7e5d",
cadetblue: "5f9ea0",
chartreuse: "7fff00",
chocolate: "d2691e",
coral: "ff7f50",
cornflowerblue: "6495ed",
cornsilk: "fff8dc",
crimson: "dc143c",
cyan: "0ff",
darkblue: "00008b",
darkcyan: "008b8b",
darkgoldenrod: "b8860b",
darkgray: "a9a9a9",
darkgreen: "006400",
darkgrey: "a9a9a9",
darkkhaki: "bdb76b",
darkmagenta: "8b008b",
darkolivegreen: "556b2f",
darkorange: "ff8c00",
darkorchid: "9932cc",
darkred: "8b0000",
darksalmon: "e9967a",
darkseagreen: "8fbc8f",
darkslateblue: "483d8b",
darkslategray: "2f4f4f",
darkslategrey: "2f4f4f",
darkturquoise: "00ced1",
darkviolet: "9400d3",
deeppink: "ff1493",
deepskyblue: "00bfff",
dimgray: "696969",
dimgrey: "696969",
dodgerblue: "1e90ff",
firebrick: "b22222",
floralwhite: "fffaf0",
forestgreen: "228b22",
fuchsia: "f0f",
gainsboro: "dcdcdc",
ghostwhite: "f8f8ff",
gold: "ffd700",
goldenrod: "daa520",
gray: "808080",
green: "008000",
greenyellow: "adff2f",
grey: "808080",
honeydew: "f0fff0",
hotpink: "ff69b4",
indianred: "cd5c5c",
indigo: "4b0082",
ivory: "fffff0",
khaki: "f0e68c",
lavender: "e6e6fa",
lavenderblush: "fff0f5",
lawngreen: "7cfc00",
lemonchiffon: "fffacd",
lightblue: "add8e6",
lightcoral: "f08080",
lightcyan: "e0ffff",
lightgoldenrodyellow: "fafad2",
lightgray: "d3d3d3",
lightgreen: "90ee90",
lightgrey: "d3d3d3",
lightpink: "ffb6c1",
lightsalmon: "ffa07a",
lightseagreen: "20b2aa",
lightskyblue: "87cefa",
lightslategray: "789",
lightslategrey: "789",
lightsteelblue: "b0c4de",
lightyellow: "ffffe0",
lime: "0f0",
limegreen: "32cd32",
linen: "faf0e6",
magenta: "f0f",
maroon: "800000",
mediumaquamarine: "66cdaa",
mediumblue: "0000cd",
mediumorchid: "ba55d3",
mediumpurple: "9370db",
mediumseagreen: "3cb371",
mediumslateblue: "7b68ee",
mediumspringgreen: "00fa9a",
mediumturquoise: "48d1cc",
mediumvioletred: "c71585",
midnightblue: "191970",
mintcream: "f5fffa",
mistyrose: "ffe4e1",
moccasin: "ffe4b5",
navajowhite: "ffdead",
navy: "000080",
oldlace: "fdf5e6",
olive: "808000",
olivedrab: "6b8e23",
orange: "ffa500",
orangered: "ff4500",
orchid: "da70d6",
palegoldenrod: "eee8aa",
palegreen: "98fb98",
paleturquoise: "afeeee",
palevioletred: "db7093",
papayawhip: "ffefd5",
peachpuff: "ffdab9",
peru: "cd853f",
pink: "ffc0cb",
plum: "dda0dd",
powderblue: "b0e0e6",
purple: "800080",
rebeccapurple: "663399",
red: "f00",
rosybrown: "bc8f8f",
royalblue: "4169e1",
saddlebrown: "8b4513",
salmon: "fa8072",
sandybrown: "f4a460",
seagreen: "2e8b57",
seashell: "fff5ee",
sienna: "a0522d",
silver: "c0c0c0",
skyblue: "87ceeb",
slateblue: "6a5acd",
slategray: "708090",
slategrey: "708090",
snow: "fffafa",
springgreen: "00ff7f",
steelblue: "4682b4",
tan: "d2b48c",
teal: "008080",
thistle: "d8bfd8",
tomato: "ff6347",
turquoise: "40e0d0",
violet: "ee82ee",
wheat: "f5deb3",
white: "fff",
whitesmoke: "f5f5f5",
yellow: "ff0",
yellowgreen: "9acd32"
}, hexNames = tinycolor.hexNames = flip(names), matchers = function() {
var CSS_INTEGER = "[-\\+]?\\d+%?", CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?", CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")", PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?", PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
return {
rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
hex3: /^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
hex6: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
hex8: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
};
}();
"undefined" != typeof module && module.exports ? module.exports = tinycolor : (__WEBPACK_AMD_DEFINE_RESULT__ = function() {
return tinycolor;
}.call(exports, __webpack_require__, exports, module), !(void 0 !== __WEBPACK_AMD_DEFINE_RESULT__ && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)));
}();
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.Swatch = void 0;
var _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), Swatch = exports.Swatch = function(_ref) {
var color = _ref.color, style = _ref.style, onClick = _ref.onClick, _ref$title = _ref.title, title = void 0 === _ref$title ? color : _ref$title, styles = (0,
_reactcss2["default"])({
"default": {
swatch: {
background: color,
height: "100%",
width: "100%",
cursor: "pointer"
}
},
custom: {
swatch: style
}
}, "custom"), handleClick = function(e) {
return onClick(color, e);
};
return _react2["default"].createElement("div", {
style: styles.swatch,
onClick: handleClick,
title: title
});
};
exports["default"] = Swatch;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.AlphaPointer = void 0;
var _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), AlphaPointer = exports.AlphaPointer = function(_ref) {
var direction = _ref.direction, styles = (0, _reactcss2["default"])({
"default": {
picker: {
width: "18px",
height: "18px",
borderRadius: "50%",
transform: "translate(-9px, -1px)",
backgroundColor: "rgb(248, 248, 248)",
boxShadow: "0 1px 4px 0 rgba(0, 0, 0, 0.37)"
}
},
vertical: {
picker: {
transform: "translate(-3px, -9px)"
}
}
}, {
vertical: "vertical" === direction
});
return _react2["default"].createElement("div", {
style: styles.picker
});
};
exports["default"] = AlphaPointer;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.Block = void 0;
var _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), _color = __webpack_require__(423), _color2 = _interopRequireDefault(_color), _common = __webpack_require__(408), _BlockSwatches = __webpack_require__(430), _BlockSwatches2 = _interopRequireDefault(_BlockSwatches), Block = exports.Block = function(_ref) {
var onChange = _ref.onChange, hex = _ref.hex, colors = _ref.colors, width = _ref.width, triangle = _ref.triangle, handleChange = function(hexCode, e) {
_color2["default"].isValidHex(hexCode) && onChange({
hex: hexCode,
source: "hex"
}, e);
}, styles = (0, _reactcss2["default"])({
"default": {
card: {
width: width,
background: "#fff",
boxShadow: "0 1px rgba(0,0,0,.1)",
borderRadius: "6px",
position: "relative"
},
head: {
height: "110px",
background: hex,
borderRadius: "6px 6px 0 0",
display: "flex",
alignItems: "center",
justifyContent: "center"
},
body: {
padding: "10px"
},
label: {
fontSize: "18px",
color: "#fff"
},
triangle: {
width: "0px",
height: "0px",
borderStyle: "solid",
borderWidth: "0 10px 10px 10px",
borderColor: "transparent transparent " + hex + " transparent",
position: "absolute",
top: "-10px",
left: "50%",
marginLeft: "-10px"
},
input: {
width: "100%",
fontSize: "12px",
color: "#666",
border: "0px",
outline: "none",
height: "22px",
boxShadow: "inset 0 0 0 1px #ddd",
borderRadius: "4px",
padding: "0 7px",
boxSizing: "border-box"
}
},
"hide-triangle": {
triangle: {
display: "none"
}
}
}, {
"hide-triangle": "hide" === triangle
});
return _react2["default"].createElement("div", {
style: styles.card,
className: "block-picker"
}, _react2["default"].createElement("div", {
style: styles.triangle
}), _react2["default"].createElement("div", {
style: styles.head
}, _react2["default"].createElement("div", {
style: styles.label
}, hex)), _react2["default"].createElement("div", {
style: styles.body
}, _react2["default"].createElement(_BlockSwatches2["default"], {
colors: colors,
onClick: handleChange
}), _react2["default"].createElement(_common.EditableInput, {
placeholder: "Hex Code",
style: {
input: styles.input
},
value: "",
onChange: handleChange
})));
};
Block.defaultProps = {
width: "170px",
colors: [ "#D9E3F0", "#F47373", "#697689", "#37D67A", "#2CCCE4", "#555555", "#dce775", "#ff8a65", "#ba68c8" ],
triangle: "top"
}, exports["default"] = (0, _common.ColorWrap)(Block);
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.BlockSwatches = void 0;
var _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), _map = __webpack_require__(282), _map2 = _interopRequireDefault(_map), _common = __webpack_require__(408), BlockSwatches = exports.BlockSwatches = function(_ref) {
var colors = _ref.colors, onClick = _ref.onClick, styles = (0, _reactcss2["default"])({
"default": {
swatches: {
marginRight: "-10px"
},
swatch: {
width: "22px",
height: "22px",
"float": "left",
marginRight: "10px",
marginBottom: "10px",
borderRadius: "4px"
},
clear: {
clear: "both"
}
}
});
return _react2["default"].createElement("div", {
style: styles.swatches
}, (0, _map2["default"])(colors, function(c) {
return _react2["default"].createElement(_common.Swatch, {
key: c,
color: c,
style: styles.swatch,
onClick: onClick
});
}), _react2["default"].createElement("div", {
style: styles.clear
}));
};
exports["default"] = BlockSwatches;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireWildcard(obj) {
if (obj && obj.__esModule) return obj;
var newObj = {};
if (null != obj) for (var key in obj) Object.prototype.hasOwnProperty.call(obj, key) && (newObj[key] = obj[key]);
return newObj["default"] = obj, newObj;
}
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.Circle = void 0;
var _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), _map = __webpack_require__(282), _map2 = _interopRequireDefault(_map), _materialColors = __webpack_require__(432), material = _interopRequireWildcard(_materialColors), _common = __webpack_require__(408), _CircleSwatch = __webpack_require__(433), _CircleSwatch2 = _interopRequireDefault(_CircleSwatch), Circle = exports.Circle = function(_ref) {
var width = _ref.width, onChange = _ref.onChange, colors = _ref.colors, hex = _ref.hex, circleSize = _ref.circleSize, circleSpacing = _ref.circleSpacing, styles = (0,
_reactcss2["default"])({
"default": {
card: {
width: width,
display: "flex",
flexWrap: "wrap",
marginRight: -circleSpacing,
marginBottom: -circleSpacing
}
}
}), handleChange = function(hexCode, e) {
return onChange({
hex: hexCode,
source: "hex"
}, e);
};
return _react2["default"].createElement("div", {
style: styles.card,
className: "circle-picker"
}, (0, _map2["default"])(colors, function(c) {
return _react2["default"].createElement(_CircleSwatch2["default"], {
key: c,
color: c,
onClick: handleChange,
active: hex === c.toLowerCase(),
circleSize: circleSize,
circleSpacing: circleSpacing
});
}));
};
Circle.defaultProps = {
width: "252px",
circleSize: 28,
circleSpacing: 14,
colors: [ material.red[500], material.pink[500], material.purple[500], material.deepPurple[500], material.indigo[500], material.blue[500], material.lightBlue[500], material.cyan[500], material.teal[500], material.green[500], material.lightGreen[500], material.lime[500], material.yellow[500], material.amber[500], material.orange[500], material.deepOrange[500], material.brown[500], material.blueGrey[500] ]
}, exports["default"] = (0, _common.ColorWrap)(Circle);
}, function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
!function(root, factory) {
__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = factory, __WEBPACK_AMD_DEFINE_RESULT__ = "function" == typeof __WEBPACK_AMD_DEFINE_FACTORY__ ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__,
!(void 0 !== __WEBPACK_AMD_DEFINE_RESULT__ && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
}(this, function() {
return {
red: {
"50": "#ffebee",
"100": "#ffcdd2",
"200": "#ef9a9a",
"300": "#e57373",
"400": "#ef5350",
"500": "#f44336",
"600": "#e53935",
"700": "#d32f2f",
"800": "#c62828",
"900": "#b71c1c",
a100: "#ff8a80",
a200: "#ff5252",
a400: "#ff1744",
a700: "#d50000"
},
pink: {
"50": "#fce4ec",
"100": "#f8bbd0",
"200": "#f48fb1",
"300": "#f06292",
"400": "#ec407a",
"500": "#e91e63",
"600": "#d81b60",
"700": "#c2185b",
"800": "#ad1457",
"900": "#880e4f",
a100: "#ff80ab",
a200: "#ff4081",
a400: "#f50057",
a700: "#c51162"
},
purple: {
"50": "#f3e5f5",
"100": "#e1bee7",
"200": "#ce93d8",
"300": "#ba68c8",
"400": "#ab47bc",
"500": "#9c27b0",
"600": "#8e24aa",
"700": "#7b1fa2",
"800": "#6a1b9a",
"900": "#4a148c",
a100: "#ea80fc",
a200: "#e040fb",
a400: "#d500f9",
a700: "#aa00ff"
},
deepPurple: {
"50": "#ede7f6",
"100": "#d1c4e9",
"200": "#b39ddb",
"300": "#9575cd",
"400": "#7e57c2",
"500": "#673ab7",
"600": "#5e35b1",
"700": "#512da8",
"800": "#4527a0",
"900": "#311b92",
a100: "#b388ff",
a200: "#7c4dff",
a400: "#651fff",
a700: "#6200ea"
},
indigo: {
"50": "#e8eaf6",
"100": "#c5cae9",
"200": "#9fa8da",
"300": "#7986cb",
"400": "#5c6bc0",
"500": "#3f51b5",
"600": "#3949ab",
"700": "#303f9f",
"800": "#283593",
"900": "#1a237e",
a100: "#8c9eff",
a200: "#536dfe",
a400: "#3d5afe",
a700: "#304ffe"
},
blue: {
"50": "#e3f2fd",
"100": "#bbdefb",
"200": "#90caf9",
"300": "#64b5f6",
"400": "#42a5f5",
"500": "#2196f3",
"600": "#1e88e5",
"700": "#1976d2",
"800": "#1565c0",
"900": "#0d47a1",
a100: "#82b1ff",
a200: "#448aff",
a400: "#2979ff",
a700: "#2962ff"
},
lightBlue: {
"50": "#e1f5fe",
"100": "#b3e5fc",
"200": "#81d4fa",
"300": "#4fc3f7",
"400": "#29b6f6",
"500": "#03a9f4",
"600": "#039be5",
"700": "#0288d1",
"800": "#0277bd",
"900": "#01579b",
a100: "#80d8ff",
a200: "#40c4ff",
a400: "#00b0ff",
a700: "#0091ea"
},
cyan: {
"50": "#e0f7fa",
"100": "#b2ebf2",
"200": "#80deea",
"300": "#4dd0e1",
"400": "#26c6da",
"500": "#00bcd4",
"600": "#00acc1",
"700": "#0097a7",
"800": "#00838f",
"900": "#006064",
a100: "#84ffff",
a200: "#18ffff",
a400: "#00e5ff",
a700: "#00b8d4"
},
teal: {
"50": "#e0f2f1",
"100": "#b2dfdb",
"200": "#80cbc4",
"300": "#4db6ac",
"400": "#26a69a",
"500": "#009688",
"600": "#00897b",
"700": "#00796b",
"800": "#00695c",
"900": "#004d40",
a100: "#a7ffeb",
a200: "#64ffda",
a400: "#1de9b6",
a700: "#00bfa5"
},
green: {
"50": "#e8f5e9",
"100": "#c8e6c9",
"200": "#a5d6a7",
"300": "#81c784",
"400": "#66bb6a",
"500": "#4caf50",
"600": "#43a047",
"700": "#388e3c",
"800": "#2e7d32",
"900": "#1b5e20",
a100: "#b9f6ca",
a200: "#69f0ae",
a400: "#00e676",
a700: "#00c853"
},
lightGreen: {
"50": "#f1f8e9",
"100": "#dcedc8",
"200": "#c5e1a5",
"300": "#aed581",
"400": "#9ccc65",
"500": "#8bc34a",
"600": "#7cb342",
"700": "#689f38",
"800": "#558b2f",
"900": "#33691e",
a100: "#ccff90",
a200: "#b2ff59",
a400: "#76ff03",
a700: "#64dd17"
},
lime: {
"50": "#f9fbe7",
"100": "#f0f4c3",
"200": "#e6ee9c",
"300": "#dce775",
"400": "#d4e157",
"500": "#cddc39",
"600": "#c0ca33",
"700": "#afb42b",
"800": "#9e9d24",
"900": "#827717",
a100: "#f4ff81",
a200: "#eeff41",
a400: "#c6ff00",
a700: "#aeea00"
},
yellow: {
"50": "#fffde7",
"100": "#fff9c4",
"200": "#fff59d",
"300": "#fff176",
"400": "#ffee58",
"500": "#ffeb3b",
"600": "#fdd835",
"700": "#fbc02d",
"800": "#f9a825",
"900": "#f57f17",
a100: "#ffff8d",
a200: "#ffff00",
a400: "#ffea00",
a700: "#ffd600"
},
amber: {
"50": "#fff8e1",
"100": "#ffecb3",
"200": "#ffe082",
"300": "#ffd54f",
"400": "#ffca28",
"500": "#ffc107",
"600": "#ffb300",
"700": "#ffa000",
"800": "#ff8f00",
"900": "#ff6f00",
a100: "#ffe57f",
a200: "#ffd740",
a400: "#ffc400",
a700: "#ffab00"
},
orange: {
"50": "#fff3e0",
"100": "#ffe0b2",
"200": "#ffcc80",
"300": "#ffb74d",
"400": "#ffa726",
"500": "#ff9800",
"600": "#fb8c00",
"700": "#f57c00",
"800": "#ef6c00",
"900": "#e65100",
a100: "#ffd180",
a200: "#ffab40",
a400: "#ff9100",
a700: "#ff6d00"
},
deepOrange: {
"50": "#fbe9e7",
"100": "#ffccbc",
"200": "#ffab91",
"300": "#ff8a65",
"400": "#ff7043",
"500": "#ff5722",
"600": "#f4511e",
"700": "#e64a19",
"800": "#d84315",
"900": "#bf360c",
a100: "#ff9e80",
a200: "#ff6e40",
a400: "#ff3d00",
a700: "#dd2c00"
},
brown: {
"50": "#efebe9",
"100": "#d7ccc8",
"200": "#bcaaa4",
"300": "#a1887f",
"400": "#8d6e63",
"500": "#795548",
"600": "#6d4c41",
"700": "#5d4037",
"800": "#4e342e",
"900": "#3e2723"
},
grey: {
"50": "#fafafa",
"100": "#f5f5f5",
"200": "#eeeeee",
"300": "#e0e0e0",
"400": "#bdbdbd",
"500": "#9e9e9e",
"600": "#757575",
"700": "#616161",
"800": "#424242",
"900": "#212121"
},
blueGrey: {
"50": "#eceff1",
"100": "#cfd8dc",
"200": "#b0bec5",
"300": "#90a4ae",
"400": "#78909c",
"500": "#607d8b",
"600": "#546e7a",
"700": "#455a64",
"800": "#37474f",
"900": "#263238"
},
darkText: {
primary: "rgba(0, 0, 0, 0.87)",
secondary: "rgba(0, 0, 0, 0.54)",
disabled: "rgba(0, 0, 0, 0.38)",
dividers: "rgba(0, 0, 0, 0.12)"
},
lightText: {
primary: "rgba(255, 255, 255, 1)",
secondary: "rgba(255, 255, 255, 0.7)",
disabled: "rgba(255, 255, 255, 0.5)",
dividers: "rgba(255, 255, 255, 0.12)"
},
darkIcons: {
active: "rgba(0, 0, 0, 0.54)",
inactive: "rgba(0, 0, 0, 0.38)"
},
lightIcons: {
active: "rgba(255, 255, 255, 1)",
inactive: "rgba(255, 255, 255, 0.5)"
},
white: "#ffffff",
black: "#000000"
};
});
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.CircleSwatch = void 0;
var _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), _common = __webpack_require__(408), CircleSwatch = exports.CircleSwatch = function(_ref) {
var color = _ref.color, onClick = _ref.onClick, hover = _ref.hover, active = _ref.active, circleSize = _ref.circleSize, circleSpacing = _ref.circleSpacing, styles = (0,
_reactcss2["default"])({
"default": {
swatch: {
width: circleSize,
height: circleSize,
marginRight: circleSpacing,
marginBottom: circleSpacing,
transform: "scale(1)",
transition: "100ms transform ease"
},
Swatch: {
borderRadius: "50%",
background: "transparent",
boxShadow: "inset 0 0 0 " + circleSize / 2 + "px " + color,
transition: "100ms box-shadow ease"
}
},
hover: {
swatch: {
transform: "scale(1.2)"
}
},
active: {
Swatch: {
boxShadow: "inset 0 0 0 3px " + color
}
}
}, {
hover: hover,
active: active
});
return _react2["default"].createElement("div", {
style: styles.swatch
}, _react2["default"].createElement(_common.Swatch, {
style: styles.Swatch,
color: color,
onClick: onClick
}));
};
CircleSwatch.defaultProps = {
circleSize: 28,
circleSpacing: 14
}, exports["default"] = (0, _reactcss.handleHover)(CircleSwatch);
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.Chrome = void 0;
var _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), _common = __webpack_require__(408), _ChromeFields = __webpack_require__(435), _ChromeFields2 = _interopRequireDefault(_ChromeFields), _ChromePointer = __webpack_require__(436), _ChromePointer2 = _interopRequireDefault(_ChromePointer), _ChromePointerCircle = __webpack_require__(437), _ChromePointerCircle2 = _interopRequireDefault(_ChromePointerCircle), Chrome = exports.Chrome = function(_ref) {
var onChange = _ref.onChange, disableAlpha = _ref.disableAlpha, rgb = _ref.rgb, hsl = _ref.hsl, hsv = _ref.hsv, hex = _ref.hex, renderers = _ref.renderers, styles = (0,
_reactcss2["default"])({
"default": {
picker: {
background: "#fff",
borderRadius: "2px",
boxShadow: "0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",
boxSizing: "initial",
width: "225px",
fontFamily: "Menlo"
},
saturation: {
width: "100%",
paddingBottom: "55%",
position: "relative",
borderRadius: "2px 2px 0 0",
overflow: "hidden"
},
Saturation: {
radius: "2px 2px 0 0"
},
body: {
padding: "16px 16px 12px"
},
controls: {
display: "flex"
},
color: {
width: "32px"
},
swatch: {
marginTop: "6px",
width: "16px",
height: "16px",
borderRadius: "8px",
position: "relative",
overflow: "hidden"
},
active: {
absolute: "0px 0px 0px 0px",
borderRadius: "8px",
boxShadow: "inset 0 0 0 1px rgba(0,0,0,.1)",
background: "rgba(" + rgb.r + ", " + rgb.g + ", " + rgb.b + ", " + rgb.a + ")",
zIndex: "2"
},
toggles: {
flex: "1"
},
hue: {
height: "10px",
position: "relative",
marginBottom: "8px"
},
Hue: {
radius: "2px"
},
alpha: {
height: "10px",
position: "relative"
},
Alpha: {
radius: "2px"
}
},
disableAlpha: {
color: {
width: "22px"
},
alpha: {
display: "none"
},
hue: {
marginBottom: "0px"
},
swatch: {
width: "10px",
height: "10px",
marginTop: "0px"
}
}
}, {
disableAlpha: disableAlpha
});
return _react2["default"].createElement("div", {
style: styles.picker,
className: "chrome-picker"
}, _react2["default"].createElement("div", {
style: styles.saturation
}, _react2["default"].createElement(_common.Saturation, {
style: styles.Saturation,
hsl: hsl,
hsv: hsv,
pointer: _ChromePointerCircle2["default"],
onChange: onChange
})), _react2["default"].createElement("div", {
style: styles.body
}, _react2["default"].createElement("div", {
style: styles.controls,
className: "flexbox-fix"
}, _react2["default"].createElement("div", {
style: styles.color
}, _react2["default"].createElement("div", {
style: styles.swatch
}, _react2["default"].createElement("div", {
style: styles.active
}), _react2["default"].createElement(_common.Checkboard, {
renderers: renderers
}))), _react2["default"].createElement("div", {
style: styles.toggles
}, _react2["default"].createElement("div", {
style: styles.hue
}, _react2["default"].createElement(_common.Hue, {
style: styles.Hue,
hsl: hsl,
pointer: _ChromePointer2["default"],
onChange: onChange
})), _react2["default"].createElement("div", {
style: styles.alpha
}, _react2["default"].createElement(_common.Alpha, {
style: styles.Alpha,
rgb: rgb,
hsl: hsl,
pointer: _ChromePointer2["default"],
renderers: renderers,
onChange: onChange
})))), _react2["default"].createElement(_ChromeFields2["default"], {
rgb: rgb,
hsl: hsl,
hex: hex,
onChange: onChange,
disableAlpha: disableAlpha
})));
};
exports["default"] = (0, _common.ColorWrap)(Chrome);
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.ChromeFields = void 0;
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), _color = __webpack_require__(423), _color2 = _interopRequireDefault(_color), _common = __webpack_require__(408), ChromeFields = exports.ChromeFields = function(_React$Component) {
function ChromeFields() {
var _ref, _temp, _this, _ret;
_classCallCheck(this, ChromeFields);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
return _temp = _this = _possibleConstructorReturn(this, (_ref = ChromeFields.__proto__ || Object.getPrototypeOf(ChromeFields)).call.apply(_ref, [ this ].concat(args))),
_this.state = {
view: ""
}, _this.toggleViews = function() {
"hex" === _this.state.view ? _this.setState({
view: "rgb"
}) : "rgb" === _this.state.view ? _this.setState({
view: "hsl"
}) : "hsl" === _this.state.view && (1 === _this.props.hsl.a ? _this.setState({
view: "hex"
}) : _this.setState({
view: "rgb"
}));
}, _this.handleChange = function(data, e) {
data.hex ? _color2["default"].isValidHex(data.hex) && _this.props.onChange({
hex: data.hex,
source: "hex"
}, e) : data.r || data.g || data.b ? _this.props.onChange({
r: data.r || _this.props.rgb.r,
g: data.g || _this.props.rgb.g,
b: data.b || _this.props.rgb.b,
source: "rgb"
}, e) : data.a ? (data.a < 0 ? data.a = 0 : data.a > 1 && (data.a = 1), _this.props.onChange({
h: _this.props.hsl.h,
s: _this.props.hsl.s,
l: _this.props.hsl.l,
a: Math.round(100 * data.a) / 100,
source: "rgb"
}, e)) : (data.h || data.s || data.l) && _this.props.onChange({
h: data.h || _this.props.hsl.h,
s: data.s && data.s.replace("%", "") || _this.props.hsl.s,
l: data.l && data.l.replace("%", "") || _this.props.hsl.l,
source: "hsl"
}, e);
}, _this.showHighlight = function(e) {
e.target.style.background = "#eee";
}, _this.hideHighlight = function(e) {
e.target.style.background = "transparent";
}, _ret = _temp, _possibleConstructorReturn(_this, _ret);
}
return _inherits(ChromeFields, _React$Component), _createClass(ChromeFields, [ {
key: "componentDidMount",
value: function() {
1 === this.props.hsl.a && "hex" !== this.state.view ? this.setState({
view: "hex"
}) : "rgb" !== this.state.view && "hsl" !== this.state.view && this.setState({
view: "rgb"
});
}
}, {
key: "componentWillReceiveProps",
value: function(nextProps) {
1 !== nextProps.hsl.a && "hex" === this.state.view && this.setState({
view: "rgb"
});
}
}, {
key: "render",
value: function() {
var styles = (0, _reactcss2["default"])({
"default": {
wrap: {
paddingTop: "16px",
display: "flex"
},
fields: {
flex: "1",
display: "flex",
marginLeft: "-6px"
},
field: {
paddingLeft: "6px",
width: "100%"
},
alpha: {
paddingLeft: "6px",
width: "100%"
},
toggle: {
width: "32px",
textAlign: "right",
position: "relative"
},
icon: {
marginRight: "-4px",
marginTop: "12px",
cursor: "pointer",
position: "relative"
},
iconHighlight: {
position: "absolute",
width: "24px",
height: "28px",
background: "#eee",
borderRadius: "4px",
top: "10px",
left: "12px",
display: "none"
},
input: {
fontSize: "11px",
color: "#333",
width: "100%",
borderRadius: "2px",
border: "none",
boxShadow: "inset 0 0 0 1px #dadada",
height: "21px",
textAlign: "center"
},
label: {
textTransform: "uppercase",
fontSize: "11px",
lineHeight: "11px",
color: "#969696",
textAlign: "center",
display: "block",
marginTop: "12px"
},
svg: {
width: "24px",
height: "24px",
border: "1px transparent solid",
borderRadius: "5px"
}
},
disableAlpha: {
alpha: {
display: "none"
}
}
}, this.props, this.state), fields = void 0;
return "hex" === this.state.view ? fields = _react2["default"].createElement("div", {
style: styles.fields,
className: "flexbox-fix"
}, _react2["default"].createElement("div", {
style: styles.field
}, _react2["default"].createElement(_common.EditableInput, {
style: {
input: styles.input,
label: styles.label
},
label: "hex",
value: this.props.hex,
onChange: this.handleChange
}))) : "rgb" === this.state.view ? fields = _react2["default"].createElement("div", {
style: styles.fields,
className: "flexbox-fix"
}, _react2["default"].createElement("div", {
style: styles.field
}, _react2["default"].createElement(_common.EditableInput, {
style: {
input: styles.input,
label: styles.label
},
label: "r",
value: this.props.rgb.r,
onChange: this.handleChange
})), _react2["default"].createElement("div", {
style: styles.field
}, _react2["default"].createElement(_common.EditableInput, {
style: {
input: styles.input,
label: styles.label
},
label: "g",
value: this.props.rgb.g,
onChange: this.handleChange
})), _react2["default"].createElement("div", {
style: styles.field
}, _react2["default"].createElement(_common.EditableInput, {
style: {
input: styles.input,
label: styles.label
},
label: "b",
value: this.props.rgb.b,
onChange: this.handleChange
})), _react2["default"].createElement("div", {
style: styles.alpha
}, _react2["default"].createElement(_common.EditableInput, {
style: {
input: styles.input,
label: styles.label
},
label: "a",
value: this.props.rgb.a,
arrowOffset: .01,
onChange: this.handleChange
}))) : "hsl" === this.state.view && (fields = _react2["default"].createElement("div", {
style: styles.fields,
className: "flexbox-fix"
}, _react2["default"].createElement("div", {
style: styles.field
}, _react2["default"].createElement(_common.EditableInput, {
style: {
input: styles.input,
label: styles.label
},
label: "h",
value: Math.round(this.props.hsl.h),
onChange: this.handleChange
})), _react2["default"].createElement("div", {
style: styles.field
}, _react2["default"].createElement(_common.EditableInput, {
style: {
input: styles.input,
label: styles.label
},
label: "s",
value: Math.round(100 * this.props.hsl.s) + "%",
onChange: this.handleChange
})), _react2["default"].createElement("div", {
style: styles.field
}, _react2["default"].createElement(_common.EditableInput, {
style: {
input: styles.input,
label: styles.label
},
label: "l",
value: Math.round(100 * this.props.hsl.l) + "%",
onChange: this.handleChange
})), _react2["default"].createElement("div", {
style: styles.alpha
}, _react2["default"].createElement(_common.EditableInput, {
style: {
input: styles.input,
label: styles.label
},
label: "a",
value: this.props.hsl.a,
arrowOffset: .01,
onChange: this.handleChange
})))), _react2["default"].createElement("div", {
style: styles.wrap,
className: "flexbox-fix"
}, fields, _react2["default"].createElement("div", {
style: styles.toggle
}, _react2["default"].createElement("div", {
style: styles.icon,
onClick: this.toggleViews,
ref: "icon"
}, _react2["default"].createElement("svg", {
style: styles.svg,
viewBox: "0 0 24 24",
onMouseOver: this.showHighlight,
onMouseEnter: this.showHighlight,
onMouseOut: this.hideHighlight
}, _react2["default"].createElement("path", {
ref: "iconUp",
fill: "#333",
d: "M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"
}), _react2["default"].createElement("path", {
ref: "iconDown",
fill: "#333",
d: "M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15Z"
})))));
}
} ]), ChromeFields;
}(_react2["default"].Component);
exports["default"] = ChromeFields;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.ChromePointer = void 0;
var _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), ChromePointer = exports.ChromePointer = function() {
var styles = (0, _reactcss2["default"])({
"default": {
picker: {
width: "12px",
height: "12px",
borderRadius: "6px",
transform: "translate(-6px, -1px)",
backgroundColor: "rgb(248, 248, 248)",
boxShadow: "0 1px 4px 0 rgba(0, 0, 0, 0.37)"
}
}
});
return _react2["default"].createElement("div", {
style: styles.picker
});
};
exports["default"] = ChromePointer;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.ChromePointerCircle = void 0;
var _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), ChromePointerCircle = exports.ChromePointerCircle = function() {
var styles = (0, _reactcss2["default"])({
"default": {
picker: {
width: "12px",
height: "12px",
borderRadius: "6px",
boxShadow: "inset 0 0 0 1px #fff",
transform: "translate(-6px, -6px)"
}
}
});
return _react2["default"].createElement("div", {
style: styles.picker
});
};
exports["default"] = ChromePointerCircle;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.Compact = void 0;
var _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), _map = __webpack_require__(282), _map2 = _interopRequireDefault(_map), _color = __webpack_require__(423), _color2 = _interopRequireDefault(_color), _reactMaterialDesign = __webpack_require__(439), _common = __webpack_require__(408), _CompactColor = __webpack_require__(445), _CompactColor2 = _interopRequireDefault(_CompactColor), _CompactFields = __webpack_require__(446), _CompactFields2 = _interopRequireDefault(_CompactFields), Compact = exports.Compact = function(_ref) {
var onChange = _ref.onChange, colors = _ref.colors, hex = _ref.hex, rgb = _ref.rgb, styles = (0,
_reactcss2["default"])({
"default": {
Compact: {
background: "#f6f6f6",
radius: "4px"
},
compact: {
paddingTop: "5px",
paddingLeft: "5px",
boxSizing: "initial",
width: "240px"
},
clear: {
clear: "both"
}
}
}), handleChange = function(data, e) {
data.hex ? _color2["default"].isValidHex(data.hex) && onChange({
hex: data.hex,
source: "hex"
}, e) : onChange(data, e);
};
return _react2["default"].createElement(_reactMaterialDesign.Raised, {
style: styles.Compact
}, _react2["default"].createElement("div", {
style: styles.compact,
className: "compact-picker"
}, _react2["default"].createElement("div", null, (0, _map2["default"])(colors, function(c) {
return _react2["default"].createElement(_CompactColor2["default"], {
key: c,
color: c,
active: c.toLowerCase() === hex,
onClick: handleChange
});
}), _react2["default"].createElement("div", {
style: styles.clear
})), _react2["default"].createElement(_CompactFields2["default"], {
hex: hex,
rgb: rgb,
onChange: handleChange
})));
};
Compact.defaultProps = {
colors: [ "#4D4D4D", "#999999", "#FFFFFF", "#F44E3B", "#FE9200", "#FCDC00", "#DBDF00", "#A4DD00", "#68CCCA", "#73D8FF", "#AEA1FF", "#FDA1FF", "#333333", "#808080", "#cccccc", "#D33115", "#E27300", "#FCC400", "#B0BC00", "#68BC00", "#16A5A5", "#009CE0", "#7B64FF", "#FA28FF", "#000000", "#666666", "#B3B3B3", "#9F0500", "#C45100", "#FB9E00", "#808900", "#194D33", "#0C797D", "#0062B1", "#653294", "#AB149E" ]
}, exports["default"] = (0, _common.ColorWrap)(Compact);
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
});
var _libComponentsRaised = __webpack_require__(440), _libComponentsRaised2 = _interopRequireDefault(_libComponentsRaised), _libComponentsTile = __webpack_require__(441), _libComponentsTile2 = _interopRequireDefault(_libComponentsTile), _libComponentsTabs = __webpack_require__(442), _libComponentsTabs2 = _interopRequireDefault(_libComponentsTabs);
exports.Raised = _libComponentsRaised2["default"], exports.Tile = _libComponentsTile2["default"],
exports.Tabs = _libComponentsTabs2["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
Object.defineProperty(exports, "__esModule", {
value: !0
});
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _propTypes = __webpack_require__(234), _propTypes2 = _interopRequireDefault(_propTypes), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), Raised = function(_React$Component) {
function Raised() {
return _classCallCheck(this, Raised), _possibleConstructorReturn(this, (Raised.__proto__ || Object.getPrototypeOf(Raised)).apply(this, arguments));
}
return _inherits(Raised, _React$Component), _createClass(Raised, [ {
key: "render",
value: function() {
var styles = (0, _reactcss2["default"])({
"default": {
wrap: {
position: "relative"
},
content: {
position: "relative"
},
bg: {
absolute: "0px 0px 0px 0px",
boxShadow: "0 ${ this.props.zDepth }px ${ this.props.zDepth * 4 }px rgba(0,0,0,.24)",
borderRadius: this.props.radius,
background: this.props.background
}
},
"zDepth-0": {
bg: {
boxShadow: "none"
}
},
"zDepth-1": {
bg: {
boxShadow: "0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"
}
},
"zDepth-2": {
bg: {
boxShadow: "0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"
}
},
"zDepth-3": {
bg: {
boxShadow: "0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"
}
},
"zDepth-4": {
bg: {
boxShadow: "0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"
}
},
"zDepth-5": {
bg: {
boxShadow: "0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"
}
},
square: {
bg: {
borderRadius: "0"
}
},
circle: {
bg: {
borderRadius: "50%"
}
}
}, this.props);
return _react2["default"].createElement("div", {
style: styles.wrap
}, _react2["default"].createElement("div", {
style: styles.bg
}), _react2["default"].createElement("div", {
style: styles.content
}, this.props.children));
}
} ]), Raised;
}(_react2["default"].Component);
Raised.propTypes = {
background: _propTypes2["default"].string,
zDepth: _propTypes2["default"].oneOf([ "0", "1", "2", "3", "4", "5", 0, 1, 2, 3, 4, 5 ]),
radius: _propTypes2["default"].oneOfType([ _propTypes2["default"].string, _propTypes2["default"].number ])
}, Raised.defaultProps = {
background: "#fff",
zDepth: "1",
radius: "2px"
}, exports["default"] = Raised;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
Object.defineProperty(exports, "__esModule", {
value: !0
});
var _slicedToArray = function() {
function sliceIterator(arr, i) {
var _arr = [], _n = !0, _d = !1, _e = void 0;
try {
for (var _s, _i = arr[Symbol.iterator](); !(_n = (_s = _i.next()).done) && (_arr.push(_s.value),
!i || _arr.length !== i); _n = !0) ;
} catch (err) {
_d = !0, _e = err;
} finally {
try {
!_n && _i["return"] && _i["return"]();
} finally {
if (_d) throw _e;
}
}
return _arr;
}
return function(arr, i) {
if (Array.isArray(arr)) return arr;
if (Symbol.iterator in Object(arr)) return sliceIterator(arr, i);
throw new TypeError("Invalid attempt to destructure non-iterable instance");
};
}(), _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), Tile = function(_React$Component) {
function Tile() {
return _classCallCheck(this, Tile), _possibleConstructorReturn(this, (Tile.__proto__ || Object.getPrototypeOf(Tile)).apply(this, arguments));
}
return _inherits(Tile, _React$Component), _createClass(Tile, [ {
key: "render",
value: function() {
var styles = (0, _reactcss2["default"])({
"default": {
tile: {
fontSize: "16px",
padding: "16px",
display: "flex",
justifyContent: "space-between",
color: this.props.color
},
primary: {
display: "flex",
width: "100%"
},
sidebar: {
minWidth: "56px",
maxWidth: "56px",
flexBasis: "56px"
},
content: {
background: "none",
flex: "1",
overflow: "auto"
},
secondary: {
flexBasis: "42",
textAlign: "center"
},
sidebarIcon: {
marginTop: "-12px",
marginLeft: "-12px",
marginBottom: "-12px"
}
},
divider: {
tile: {
boxShadow: "inset 0 -1px 0 rgba(0,0,0,.12)"
}
},
condensed: {
tile: {
paddingBottom: "0px",
paddingTop: "0px",
paddingRight: "0px"
},
sidebar: {
minWidth: "28px",
maxWidth: "28px",
flexBasis: "28px"
}
}
}, {
clickable: this.props.onClick
}, this.props), _props$children = _slicedToArray(this.props.children, 2), sidebar = _props$children[0], content = _props$children[1];
return _react2["default"].createElement("div", {
style: styles.tile,
className: "flexbox-fix"
}, _react2["default"].createElement("div", {
style: styles.primary,
className: "flexbox-fix"
}, _react2["default"].createElement("div", {
style: styles.sidebar,
key: "sidebar-#{ sidebar }"
}, sidebar), _react2["default"].createElement("div", {
style: styles.content,
key: "content-#{ content }"
}, content)));
}
} ]), Tile;
}(_react2["default"].Component);
exports["default"] = Tile;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
Object.defineProperty(exports, "__esModule", {
value: !0
});
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), _isString = __webpack_require__(244), _isString2 = _interopRequireDefault(_isString), _Tab = __webpack_require__(443), _Tab2 = _interopRequireDefault(_Tab), _Link = __webpack_require__(444), _Link2 = _interopRequireDefault(_Link), Tabs = function(_React$Component) {
function Tabs(props) {
_classCallCheck(this, Tabs);
var selectedTab, _this = _possibleConstructorReturn(this, (Tabs.__proto__ || Object.getPrototypeOf(Tabs)).call(this));
return selectedTab = props.selectedTab < (props.tabs && props.tabs.length) ? props.selectedTab : 0,
_this.state = {
selectedTab: selectedTab
}, _this.handleClick = _this.handleClick.bind(_this), _this.slide = _this.slide.bind(_this),
_this;
}
return _inherits(Tabs, _React$Component), _createClass(Tabs, [ {
key: "handleClick",
value: function(tab) {
this.props.onChange && this.props.onChange(tab), this.setState({
selectedTab: tab
});
}
}, {
key: "slide",
value: function() {
if (this.props.tabs.length) {
var containerNode = this.refs.tabs.getDOMNode(), containerLeft = containerNode.scrollLeft, containerRight = containerNode.offsetWidth + containerNode.scrollLeft, selectedNode = this.refs["tab-" + this.state.selectedTab] && this.refs["tab-" + this.state.selectedTab].getDOMNode(), selectedLeft = selectedNode && selectedNode.getBoundingClientRect().left - containerNode.getBoundingClientRect().left + containerNode.scrollLeft, selectedRight = selectedNode && selectedLeft + selectedNode.offsetWidth;
selectedRight > containerRight && (containerNode.scrollLeft += selectedRight - containerRight),
selectedLeft < containerLeft && (containerNode.scrollLeft -= containerLeft - selectedLeft);
var indicator = this.refs.indicator;
indicator.style.left = selectedLeft + "px", indicator.style.width = selectedNode.offsetWidth + "px",
indicator.style.height = "2px";
}
}
}, {
key: "componentDidMount",
value: function() {
this.slide();
}
}, {
key: "componentWillReceiveProps",
value: function(nextProps) {
nextProps.selectedTab !== this.state.selectedTab && this.setState({
selectedTab: nextProps.selectedTab
});
}
}, {
key: "componentWillUpdate",
value: function(nextProps, nextState) {
nextState.selectedTab >= (nextProps.tabs && nextProps.tabs.length) && (nextState.selectedTab = nextProps.tabs.length - 1);
}
}, {
key: "componentDidUpdate",
value: function() {
this.slide();
}
}, {
key: "render",
value: function() {
for (var styles = (0, _reactcss2["default"])({
"default": {
tabs: {
position: "relative",
background: this.props.background
},
tabWrap: {
display: "flex"
},
tab: {
justifyContent: "flex-start",
minWidth: "68px",
maxWidth: "240px"
},
Tab: {
color: this.props.color,
inactive: this.props.inactive,
capitalize: this.props.capitalize
},
indicator: {
height: "0",
position: "absolute",
bottom: "0",
left: "0",
background: this.props.color,
transition: "all 200ms linear"
}
},
scrollable: {
tabs: {
overflowX: "scroll"
},
tabWrap: {
paddingLeft: "60px",
justifyContent: "flex-start",
width: "400%"
},
tab: {
width: "auto"
}
},
"align-justify": {
tabWrap: {
justifyContent: "space-between"
},
tab: {
width: 100 / this.props.tabs.length + "%"
}
},
"align-left": {
tabWrap: {
paddingLeft: "60px",
justifyContent: "flex-start"
},
tab: {
width: "auto"
}
},
"align-center": {
tabWrap: {
justifyContent: "center"
},
tab: {
width: "auto"
}
}
}, {
scrollable: this.props.width / this.props.tabs.length < 72
}, this.props, this.state), tabs = [], i = 0; i < this.props.tabs.length; i++) {
var label, callback, callbackValue, newTab, tab = this.props.tabs[i];
(0, _isString2["default"])(tab) ? (label = tab, callback = null) : (label = tab.label,
callback = tab.onClick, callbackValue = tab.callbackValue, newTab = tab.newTab),
tabs.push(_react2["default"].createElement("div", {
style: styles.tab,
ref: "tab-" + i,
key: i
}, _react2["default"].createElement(_Link2["default"], {
onClick: callback,
callbackValue: callbackValue,
newTab: newTab
}, _react2["default"].createElement(_Tab2["default"], {
style: styles.Tab,
tab: i,
selected: this.state.selectedTab === i,
selectable: tab.selectable,
onClick: this.handleClick
}, label))));
}
return _react2["default"].createElement("div", {
style: styles.tabs,
ref: "tabs"
}, _react2["default"].createElement("div", {
style: styles.tabWrap,
className: "flexbox-fix"
}, tabs), _react2["default"].createElement("div", {
style: styles.indicator,
ref: "indicator"
}));
}
} ]), Tabs;
}(_react2["default"].Component);
Tabs.defaultProps = {
selectedTab: 0,
background: "transparent",
color: "#fff"
}, exports["default"] = Tabs;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
Object.defineProperty(exports, "__esModule", {
value: !0
});
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _propTypes = __webpack_require__(234), _propTypes2 = _interopRequireDefault(_propTypes), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), Tab = function(_React$Component) {
function Tab() {
_classCallCheck(this, Tab);
var _this = _possibleConstructorReturn(this, (Tab.__proto__ || Object.getPrototypeOf(Tab)).call(this));
return _this.handleClick = _this.handleClick.bind(_this), _this;
}
return _inherits(Tab, _React$Component), _createClass(Tab, [ {
key: "handleClick",
value: function() {
this.props.selectable !== !1 && this.props.onClick(this.props.tab);
}
}, {
key: "render",
value: function() {
var styles = (0, _reactcss2["default"])({
"default": {
tab: {
color: this.props.inactive || this.props.color,
cursor: "pointer",
paddingLeft: "12px",
paddingRight: "12px",
height: "48px",
lineHeight: "48px",
textAlign: "center",
fontSize: "14px",
textTransform: this.props.capitalize === !1 ? "" : "uppercase",
fontWeight: "500",
whiteSpace: "nowrap",
opacity: ".47",
transition: "opacity 100ms linear"
}
},
selected: {
tab: {
color: this.props.color,
opacity: ".87"
}
}
}, this.props);
return _react2["default"].createElement("div", {
style: styles.tab,
onClick: this.handleClick
}, this.props.children);
}
} ]), Tab;
}(_react2["default"].Component);
Tab.propTypes = {
selected: _propTypes2["default"].bool
}, Tab.defaultProps = {
selected: !1,
color: "#fff"
}, exports["default"] = Tab;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
Object.defineProperty(exports, "__esModule", {
value: !0
});
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _isString = __webpack_require__(244), _isString2 = _interopRequireDefault(_isString), Link = function(_React$Component) {
function Link() {
_classCallCheck(this, Link);
var _this = _possibleConstructorReturn(this, (Link.__proto__ || Object.getPrototypeOf(Link)).call(this));
return _this.handleClick = _this.handleClick.bind(_this), _this;
}
return _inherits(Link, _React$Component), _createClass(Link, [ {
key: "handleClick",
value: function(e) {
this.props.onClick && this.props.onClick(e, this.props.callbackValue);
}
}, {
key: "render",
value: function() {
var a;
return a = (0, _isString2["default"])(this.props.onClick) ? _react2["default"].createElement("a", {
style: {
textDecoration: "none"
},
href: this.props.onClick,
target: this.props.newTab && "_blank"
}, this.props.children) : _react2["default"].createElement("a", {
style: {
textDecoration: "none"
},
onClick: this.handleClick
}, this.props.children);
}
} ]), Link;
}(_react2["default"].Component);
Link.defaultProps = {
newTab: !1
}, exports["default"] = Link;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.CompactColor = void 0;
var _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), CompactColor = exports.CompactColor = function(_ref) {
var color = _ref.color, onClick = _ref.onClick, active = _ref.active, styles = (0,
_reactcss2["default"])({
"default": {
color: {
background: color,
width: "15px",
height: "15px",
"float": "left",
marginRight: "5px",
marginBottom: "5px",
position: "relative",
cursor: "pointer"
},
dot: {
absolute: "5px 5px 5px 5px",
background: "#fff",
borderRadius: "50%",
opacity: "0"
}
},
active: {
dot: {
opacity: "1"
}
},
"color-#FFFFFF": {
color: {
boxShadow: "inset 0 0 0 1px #ddd"
},
dot: {
background: "#000"
}
}
}, {
active: active,
"color-#FFFFFF": "#FFFFFF" === color
}), handleClick = function(e) {
return onClick({
hex: color
}, e);
};
return _react2["default"].createElement("div", {
style: styles.color,
onClick: handleClick
}, _react2["default"].createElement("div", {
style: styles.dot
}));
};
exports["default"] = CompactColor;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.CompactFields = void 0;
var _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), _common = __webpack_require__(408), CompactFields = exports.CompactFields = function(_ref) {
var hex = _ref.hex, rgb = _ref.rgb, onChange = _ref.onChange, styles = (0, _reactcss2["default"])({
"default": {
fields: {
display: "flex",
paddingBottom: "6px",
paddingRight: "5px",
position: "relative"
},
active: {
position: "absolute",
top: "6px",
left: "5px",
height: "9px",
width: "9px",
background: hex
},
HEXwrap: {
flex: "6",
position: "relative"
},
HEXinput: {
width: "80%",
padding: "0px",
paddingLeft: "20%",
border: "none",
outline: "none",
background: "none",
fontSize: "12px",
color: "#333",
height: "16px"
},
HEXlabel: {
display: "none"
},
RGBwrap: {
flex: "3",
position: "relative"
},
RGBinput: {
width: "70%",
padding: "0px",
paddingLeft: "30%",
border: "none",
outline: "none",
background: "none",
fontSize: "12px",
color: "#333",
height: "16px"
},
RGBlabel: {
position: "absolute",
top: "3px",
left: "0px",
lineHeight: "16px",
textTransform: "uppercase",
fontSize: "12px",
color: "#999"
}
}
}), handleChange = function(data, e) {
data.r || data.g || data.b ? onChange({
r: data.r || rgb.r,
g: data.g || rgb.g,
b: data.b || rgb.b,
source: "rgb"
}, e) : onChange({
hex: data.hex,
source: "hex"
}, e);
};
return _react2["default"].createElement("div", {
style: styles.fields,
className: "flexbox-fix"
}, _react2["default"].createElement("div", {
style: styles.active
}), _react2["default"].createElement(_common.EditableInput, {
style: {
wrap: styles.HEXwrap,
input: styles.HEXinput,
label: styles.HEXlabel
},
label: "hex",
value: hex,
onChange: handleChange
}), _react2["default"].createElement(_common.EditableInput, {
style: {
wrap: styles.RGBwrap,
input: styles.RGBinput,
label: styles.RGBlabel
},
label: "r",
value: rgb.r,
onChange: handleChange
}), _react2["default"].createElement(_common.EditableInput, {
style: {
wrap: styles.RGBwrap,
input: styles.RGBinput,
label: styles.RGBlabel
},
label: "g",
value: rgb.g,
onChange: handleChange
}), _react2["default"].createElement(_common.EditableInput, {
style: {
wrap: styles.RGBwrap,
input: styles.RGBinput,
label: styles.RGBlabel
},
label: "b",
value: rgb.b,
onChange: handleChange
}));
};
exports["default"] = CompactFields;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.Github = void 0;
var _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), _map = __webpack_require__(282), _map2 = _interopRequireDefault(_map), _common = __webpack_require__(408), _GithubSwatch = __webpack_require__(448), _GithubSwatch2 = _interopRequireDefault(_GithubSwatch), Github = exports.Github = function(_ref) {
var width = _ref.width, colors = _ref.colors, onChange = _ref.onChange, triangle = _ref.triangle, styles = (0,
_reactcss2["default"])({
"default": {
card: {
width: width,
background: "#fff",
border: "1px solid rgba(0,0,0,0.2)",
boxShadow: "0 3px 12px rgba(0,0,0,0.15)",
borderRadius: "4px",
position: "relative",
padding: "5px",
display: "flex",
flexWrap: "wrap"
},
triangle: {
position: "absolute",
border: "7px solid transparent",
borderBottomColor: "#fff"
},
triangleShadow: {
position: "absolute",
border: "8px solid transparent",
borderBottomColor: "rgba(0,0,0,0.15)"
}
},
"hide-triangle": {
triangle: {
display: "none"
},
triangleShadow: {
display: "none"
}
},
"top-left-triangle": {
triangle: {
top: "-14px",
left: "10px"
},
triangleShadow: {
top: "-16px",
left: "9px"
}
},
"top-right-triangle": {
triangle: {
top: "-14px",
right: "10px"
},
triangleShadow: {
top: "-16px",
right: "9px"
}
},
"bottom-right-triangle": {
triangle: {
top: "35px",
right: "10px",
transform: "rotate(180deg)"
},
triangleShadow: {
top: "37px",
right: "9px",
transform: "rotate(180deg)"
}
}
}, {
"hide-triangle": "hide" === triangle,
"top-left-triangle": "top-left" === triangle,
"top-right-triangle": "top-right" === triangle,
"bottom-right-triangle": "bottom-right" === triangle
}), handleChange = function(hex, e) {
return onChange({
hex: hex,
source: "hex"
}, e);
};
return _react2["default"].createElement("div", {
style: styles.card,
className: "github-picker"
}, _react2["default"].createElement("div", {
style: styles.triangleShadow
}), _react2["default"].createElement("div", {
style: styles.triangle
}), (0, _map2["default"])(colors, function(c) {
return _react2["default"].createElement(_GithubSwatch2["default"], {
color: c,
key: c,
onClick: handleChange
});
}));
};
Github.defaultProps = {
width: "200px",
colors: [ "#B80000", "#DB3E00", "#FCCB00", "#008B02", "#006B76", "#1273DE", "#004DCF", "#5300EB", "#EB9694", "#FAD0C3", "#FEF3BD", "#C1E1C5", "#BEDADC", "#C4DEF6", "#BED3F3", "#D4C4FB" ],
triangle: "top-left"
}, exports["default"] = (0, _common.ColorWrap)(Github);
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.GithubSwatch = void 0;
var _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), _common = __webpack_require__(408), GithubSwatch = exports.GithubSwatch = function(_ref) {
var hover = _ref.hover, color = _ref.color, onClick = _ref.onClick, styles = (0,
_reactcss2["default"])({
"default": {
swatch: {
width: "25px",
height: "25px"
}
},
hover: {
swatch: {
position: "relative",
zIndex: "2",
outline: "2px solid #fff",
boxShadow: "0 0 5px 2px rgba(0,0,0,0.25)"
}
}
}, {
hover: hover
});
return _react2["default"].createElement("div", {
style: styles.swatch
}, _react2["default"].createElement(_common.Swatch, {
color: color,
onClick: onClick
}));
};
exports["default"] = (0, _reactcss.handleHover)(GithubSwatch);
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.HuePicker = void 0;
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
}
return target;
}, _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), _common = __webpack_require__(408), _HuePointer = __webpack_require__(450), _HuePointer2 = _interopRequireDefault(_HuePointer), HuePicker = exports.HuePicker = function(_ref) {
var width = _ref.width, height = _ref.height, onChange = _ref.onChange, hsl = _ref.hsl, direction = _ref.direction, pointer = _ref.pointer, styles = (0,
_reactcss2["default"])({
"default": {
picker: {
position: "relative",
width: width,
height: height
},
hue: {
radius: "2px"
}
}
}), handleChange = function(data) {
return onChange({
a: 1,
h: data.h,
l: .5,
s: 1
});
};
return _react2["default"].createElement("div", {
style: styles.picker,
className: "hue-picker"
}, _react2["default"].createElement(_common.Hue, _extends({}, styles.hue, {
hsl: hsl,
pointer: pointer,
onChange: handleChange,
direction: direction
})));
};
HuePicker.defaultProps = {
width: "316px",
height: "16px",
direction: "horizontal",
pointer: _HuePointer2["default"]
}, exports["default"] = (0, _common.ColorWrap)(HuePicker);
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.SliderPointer = void 0;
var _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), SliderPointer = exports.SliderPointer = function(_ref) {
var direction = _ref.direction, styles = (0, _reactcss2["default"])({
"default": {
picker: {
width: "18px",
height: "18px",
borderRadius: "50%",
transform: "translate(-9px, -1px)",
backgroundColor: "rgb(248, 248, 248)",
boxShadow: "0 1px 4px 0 rgba(0, 0, 0, 0.37)"
}
},
vertical: {
picker: {
transform: "translate(-3px, -9px)"
}
}
}, {
vertical: "vertical" === direction
});
return _react2["default"].createElement("div", {
style: styles.picker
});
};
exports["default"] = SliderPointer;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.Material = void 0;
var _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), _color = __webpack_require__(423), _color2 = _interopRequireDefault(_color), _reactMaterialDesign = __webpack_require__(439), _common = __webpack_require__(408), Material = exports.Material = function(_ref) {
var onChange = _ref.onChange, hex = _ref.hex, rgb = _ref.rgb, styles = (0, _reactcss2["default"])({
"default": {
material: {
width: "98px",
height: "98px",
padding: "16px",
fontFamily: "Roboto"
},
HEXwrap: {
position: "relative"
},
HEXinput: {
width: "100%",
marginTop: "12px",
fontSize: "15px",
color: "#333",
padding: "0px",
border: "0px",
borderBottom: "2px solid " + hex,
outline: "none",
height: "30px"
},
HEXlabel: {
position: "absolute",
top: "0px",
left: "0px",
fontSize: "11px",
color: "#999999",
textTransform: "capitalize"
},
Hex: {
style: {}
},
RGBwrap: {
position: "relative"
},
RGBinput: {
width: "100%",
marginTop: "12px",
fontSize: "15px",
color: "#333",
padding: "0px",
border: "0px",
borderBottom: "1px solid #eee",
outline: "none",
height: "30px"
},
RGBlabel: {
position: "absolute",
top: "0px",
left: "0px",
fontSize: "11px",
color: "#999999",
textTransform: "capitalize"
},
split: {
display: "flex",
marginRight: "-10px",
paddingTop: "11px"
},
third: {
flex: "1",
paddingRight: "10px"
}
}
}), handleChange = function(data, e) {
data.hex ? _color2["default"].isValidHex(data.hex) && onChange({
hex: data.hex,
source: "hex"
}, e) : (data.r || data.g || data.b) && onChange({
r: data.r || rgb.r,
g: data.g || rgb.g,
b: data.b || rgb.b,
source: "rgb"
}, e);
};
return _react2["default"].createElement(_reactMaterialDesign.Raised, null, _react2["default"].createElement("div", {
style: styles.material,
className: "material-picker"
}, _react2["default"].createElement(_common.EditableInput, {
style: {
wrap: styles.HEXwrap,
input: styles.HEXinput,
label: styles.HEXlabel
},
label: "hex",
value: hex,
onChange: handleChange
}), _react2["default"].createElement("div", {
style: styles.split,
className: "flexbox-fix"
}, _react2["default"].createElement("div", {
style: styles.third
}, _react2["default"].createElement(_common.EditableInput, {
style: {
wrap: styles.RGBwrap,
input: styles.RGBinput,
label: styles.RGBlabel
},
label: "r",
value: rgb.r,
onChange: handleChange
})), _react2["default"].createElement("div", {
style: styles.third
}, _react2["default"].createElement(_common.EditableInput, {
style: {
wrap: styles.RGBwrap,
input: styles.RGBinput,
label: styles.RGBlabel
},
label: "g",
value: rgb.g,
onChange: handleChange
})), _react2["default"].createElement("div", {
style: styles.third
}, _react2["default"].createElement(_common.EditableInput, {
style: {
wrap: styles.RGBwrap,
input: styles.RGBinput,
label: styles.RGBlabel
},
label: "b",
value: rgb.b,
onChange: handleChange
})))));
};
exports["default"] = (0, _common.ColorWrap)(Material);
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.Photoshop = void 0;
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), _common = __webpack_require__(408), _PhotoshopFields = __webpack_require__(453), _PhotoshopFields2 = _interopRequireDefault(_PhotoshopFields), _PhotoshopPointerCircle = __webpack_require__(454), _PhotoshopPointerCircle2 = _interopRequireDefault(_PhotoshopPointerCircle), _PhotoshopPointer = __webpack_require__(455), _PhotoshopPointer2 = _interopRequireDefault(_PhotoshopPointer), _PhotoshopButton = __webpack_require__(456), _PhotoshopButton2 = _interopRequireDefault(_PhotoshopButton), _PhotoshopPreviews = __webpack_require__(457), _PhotoshopPreviews2 = _interopRequireDefault(_PhotoshopPreviews), Photoshop = exports.Photoshop = function(_React$Component) {
function Photoshop(props) {
_classCallCheck(this, Photoshop);
var _this = _possibleConstructorReturn(this, (Photoshop.__proto__ || Object.getPrototypeOf(Photoshop)).call(this));
return _this.state = {
currentColor: props.hex
}, _this;
}
return _inherits(Photoshop, _React$Component), _createClass(Photoshop, [ {
key: "render",
value: function() {
var styles = (0, _reactcss2["default"])({
"default": {
picker: {
background: "#DCDCDC",
borderRadius: "4px",
boxShadow: "0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15)",
boxSizing: "initial",
width: "513px"
},
head: {
backgroundImage: "linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%)",
borderBottom: "1px solid #B1B1B1",
boxShadow: "inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02)",
height: "23px",
lineHeight: "24px",
borderRadius: "4px 4px 0 0",
fontSize: "13px",
color: "#4D4D4D",
textAlign: "center"
},
body: {
padding: "15px 15px 0",
display: "flex"
},
saturation: {
width: "256px",
height: "256px",
position: "relative",
border: "2px solid #B3B3B3",
borderBottom: "2px solid #F0F0F0",
overflow: "hidden"
},
hue: {
position: "relative",
height: "256px",
width: "19px",
marginLeft: "10px",
border: "2px solid #B3B3B3",
borderBottom: "2px solid #F0F0F0"
},
controls: {
width: "180px",
marginLeft: "10px"
},
top: {
display: "flex"
},
previews: {
width: "60px"
},
actions: {
flex: "1",
marginLeft: "20px"
}
}
});
return _react2["default"].createElement("div", {
style: styles.picker,
className: "photoshop-picker"
}, _react2["default"].createElement("div", {
style: styles.head
}, this.props.header), _react2["default"].createElement("div", {
style: styles.body,
className: "flexbox-fix"
}, _react2["default"].createElement("div", {
style: styles.saturation
}, _react2["default"].createElement(_common.Saturation, {
hsl: this.props.hsl,
hsv: this.props.hsv,
pointer: _PhotoshopPointerCircle2["default"],
onChange: this.props.onChange
})), _react2["default"].createElement("div", {
style: styles.hue
}, _react2["default"].createElement(_common.Hue, {
direction: "vertical",
hsl: this.props.hsl,
pointer: _PhotoshopPointer2["default"],
onChange: this.props.onChange
})), _react2["default"].createElement("div", {
style: styles.controls
}, _react2["default"].createElement("div", {
style: styles.top,
className: "flexbox-fix"
}, _react2["default"].createElement("div", {
style: styles.previews
}, _react2["default"].createElement(_PhotoshopPreviews2["default"], {
rgb: this.props.rgb,
currentColor: this.state.currentColor
})), _react2["default"].createElement("div", {
style: styles.actions
}, _react2["default"].createElement(_PhotoshopButton2["default"], {
label: "OK",
onClick: this.props.onAccept,
active: !0
}), _react2["default"].createElement(_PhotoshopButton2["default"], {
label: "Cancel",
onClick: this.props.onCancel
}), _react2["default"].createElement(_PhotoshopFields2["default"], {
onChange: this.props.onChange,
rgb: this.props.rgb,
hsv: this.props.hsv,
hex: this.props.hex
}))))));
}
} ]), Photoshop;
}(_react2["default"].Component);
Photoshop.defaultProps = {
header: "Color Picker"
}, exports["default"] = (0, _common.ColorWrap)(Photoshop);
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.PhotoshopPicker = void 0;
var _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), _color = __webpack_require__(423), _color2 = _interopRequireDefault(_color), _common = __webpack_require__(408), PhotoshopPicker = exports.PhotoshopPicker = function(_ref) {
var onChange = _ref.onChange, rgb = _ref.rgb, hsv = _ref.hsv, hex = _ref.hex, styles = (0,
_reactcss2["default"])({
"default": {
fields: {
paddingTop: "5px",
paddingBottom: "9px",
width: "80px",
position: "relative"
},
divider: {
height: "5px"
},
RGBwrap: {
position: "relative"
},
RGBinput: {
marginLeft: "40%",
width: "40%",
height: "18px",
border: "1px solid #888888",
boxShadow: "inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",
marginBottom: "5px",
fontSize: "13px",
paddingLeft: "3px",
marginRight: "10px"
},
RGBlabel: {
left: "0px",
width: "34px",
textTransform: "uppercase",
fontSize: "13px",
height: "18px",
lineHeight: "22px",
position: "absolute"
},
HEXwrap: {
position: "relative"
},
HEXinput: {
marginLeft: "20%",
width: "80%",
height: "18px",
border: "1px solid #888888",
boxShadow: "inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",
marginBottom: "6px",
fontSize: "13px",
paddingLeft: "3px"
},
HEXlabel: {
position: "absolute",
top: "0px",
left: "0px",
width: "14px",
textTransform: "uppercase",
fontSize: "13px",
height: "18px",
lineHeight: "22px"
},
fieldSymbols: {
position: "absolute",
top: "5px",
right: "-7px",
fontSize: "13px"
},
symbol: {
height: "20px",
lineHeight: "22px",
paddingBottom: "7px"
}
}
}), handleChange = function(data, e) {
data["#"] ? _color2["default"].isValidHex(data["#"]) && onChange({
hex: data["#"],
source: "hex"
}, e) : data.r || data.g || data.b ? onChange({
r: data.r || rgb.r,
g: data.g || rgb.g,
b: data.b || rgb.b,
source: "rgb"
}, e) : (data.h || data.s || data.v) && onChange({
h: data.h || hsv.h,
s: data.s || hsv.s,
v: data.v || hsv.v,
source: "hsv"
}, e);
};
return _react2["default"].createElement("div", {
style: styles.fields
}, _react2["default"].createElement(_common.EditableInput, {
style: {
wrap: styles.RGBwrap,
input: styles.RGBinput,
label: styles.RGBlabel
},
label: "h",
value: Math.round(hsv.h),
onChange: handleChange
}), _react2["default"].createElement(_common.EditableInput, {
style: {
wrap: styles.RGBwrap,
input: styles.RGBinput,
label: styles.RGBlabel
},
label: "s",
value: Math.round(100 * hsv.s),
onChange: handleChange
}), _react2["default"].createElement(_common.EditableInput, {
style: {
wrap: styles.RGBwrap,
input: styles.RGBinput,
label: styles.RGBlabel
},
label: "v",
value: Math.round(100 * hsv.v),
onChange: handleChange
}), _react2["default"].createElement("div", {
style: styles.divider
}), _react2["default"].createElement(_common.EditableInput, {
style: {
wrap: styles.RGBwrap,
input: styles.RGBinput,
label: styles.RGBlabel
},
label: "r",
value: rgb.r,
onChange: handleChange
}), _react2["default"].createElement(_common.EditableInput, {
style: {
wrap: styles.RGBwrap,
input: styles.RGBinput,
label: styles.RGBlabel
},
label: "g",
value: rgb.g,
onChange: handleChange
}), _react2["default"].createElement(_common.EditableInput, {
style: {
wrap: styles.RGBwrap,
input: styles.RGBinput,
label: styles.RGBlabel
},
label: "b",
value: rgb.b,
onChange: handleChange
}), _react2["default"].createElement("div", {
style: styles.divider
}), _react2["default"].createElement(_common.EditableInput, {
style: {
wrap: styles.HEXwrap,
input: styles.HEXinput,
label: styles.HEXlabel
},
label: "#",
value: hex.replace("#", ""),
onChange: handleChange
}), _react2["default"].createElement("div", {
style: styles.fieldSymbols
}, _react2["default"].createElement("div", {
style: styles.symbol
}, "°"), _react2["default"].createElement("div", {
style: styles.symbol
}, "%"), _react2["default"].createElement("div", {
style: styles.symbol
}, "%")));
};
exports["default"] = PhotoshopPicker;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.PhotoshopPointerCircle = void 0;
var _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), PhotoshopPointerCircle = exports.PhotoshopPointerCircle = function(_ref) {
var hsl = _ref.hsl, styles = (0, _reactcss2["default"])({
"default": {
picker: {
width: "12px",
height: "12px",
borderRadius: "6px",
boxShadow: "inset 0 0 0 1px #fff",
transform: "translate(-6px, -6px)"
}
},
"black-outline": {
picker: {
boxShadow: "inset 0 0 0 1px #000"
}
}
}, {
"black-outline": hsl.l > .5
});
return _react2["default"].createElement("div", {
style: styles.picker
});
};
exports["default"] = PhotoshopPointerCircle;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.PhotoshopPointerCircle = void 0;
var _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), PhotoshopPointerCircle = exports.PhotoshopPointerCircle = function() {
var styles = (0, _reactcss2["default"])({
"default": {
triangle: {
width: 0,
height: 0,
borderStyle: "solid",
borderWidth: "4px 0 4px 6px",
borderColor: "transparent transparent transparent #fff",
position: "absolute",
top: "1px",
left: "1px"
},
triangleBorder: {
width: 0,
height: 0,
borderStyle: "solid",
borderWidth: "5px 0 5px 8px",
borderColor: "transparent transparent transparent #555"
},
left: {
Extend: "triangleBorder",
transform: "translate(-13px, -4px)"
},
leftInside: {
Extend: "triangle",
transform: "translate(-8px, -5px)"
},
right: {
Extend: "triangleBorder",
transform: "translate(20px, -14px) rotate(180deg)"
},
rightInside: {
Extend: "triangle",
transform: "translate(-8px, -5px)"
}
}
});
return _react2["default"].createElement("div", {
style: styles.pointer
}, _react2["default"].createElement("div", {
style: styles.left
}, _react2["default"].createElement("div", {
style: styles.leftInside
})), _react2["default"].createElement("div", {
style: styles.right
}, _react2["default"].createElement("div", {
style: styles.rightInside
})));
};
exports["default"] = PhotoshopPointerCircle;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.PhotoshopBotton = void 0;
var _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), PhotoshopBotton = exports.PhotoshopBotton = function(_ref) {
var onClick = _ref.onClick, label = _ref.label, children = _ref.children, active = _ref.active, styles = (0,
_reactcss2["default"])({
"default": {
button: {
backgroundImage: "linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",
border: "1px solid #878787",
borderRadius: "2px",
height: "20px",
boxShadow: "0 1px 0 0 #EAEAEA",
fontSize: "14px",
color: "#000",
lineHeight: "20px",
textAlign: "center",
marginBottom: "10px",
cursor: "pointer"
}
},
active: {
button: {
boxShadow: "0 0 0 1px #878787"
}
}
}, {
active: active
});
return _react2["default"].createElement("div", {
style: styles.button,
onClick: onClick
}, label || children);
};
exports["default"] = PhotoshopBotton;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.PhotoshopPreviews = void 0;
var _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), PhotoshopPreviews = exports.PhotoshopPreviews = function(_ref) {
var rgb = _ref.rgb, currentColor = _ref.currentColor, styles = (0, _reactcss2["default"])({
"default": {
swatches: {
border: "1px solid #B3B3B3",
borderBottom: "1px solid #F0F0F0",
marginBottom: "2px",
marginTop: "1px"
},
"new": {
height: "34px",
background: "rgb(" + rgb.r + "," + rgb.g + ", " + rgb.b + ")",
boxShadow: "inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"
},
current: {
height: "34px",
background: currentColor,
boxShadow: "inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"
},
label: {
fontSize: "14px",
color: "#000",
textAlign: "center"
}
}
});
return _react2["default"].createElement("div", null, _react2["default"].createElement("div", {
style: styles.label
}, "new"), _react2["default"].createElement("div", {
style: styles.swatches
}, _react2["default"].createElement("div", {
style: styles["new"]
}), _react2["default"].createElement("div", {
style: styles.current
})), _react2["default"].createElement("div", {
style: styles.label
}, "current"));
};
exports["default"] = PhotoshopPreviews;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.Sketch = void 0;
var _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), _common = __webpack_require__(408), _SketchFields = __webpack_require__(459), _SketchFields2 = _interopRequireDefault(_SketchFields), _SketchPresetColors = __webpack_require__(460), _SketchPresetColors2 = _interopRequireDefault(_SketchPresetColors), Sketch = exports.Sketch = function(_ref) {
var width = _ref.width, rgb = _ref.rgb, hex = _ref.hex, hsv = _ref.hsv, hsl = _ref.hsl, onChange = _ref.onChange, disableAlpha = _ref.disableAlpha, presetColors = _ref.presetColors, renderers = _ref.renderers, styles = (0,
_reactcss2["default"])({
"default": {
picker: {
width: width,
padding: "10px 10px 0",
boxSizing: "initial",
background: "#fff",
borderRadius: "4px",
boxShadow: "0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"
},
saturation: {
width: "100%",
paddingBottom: "75%",
position: "relative",
overflow: "hidden"
},
Saturation: {
radius: "3px",
shadow: "inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"
},
controls: {
display: "flex"
},
sliders: {
padding: "4px 0",
flex: "1"
},
color: {
width: "24px",
height: "24px",
position: "relative",
marginTop: "4px",
marginLeft: "4px",
borderRadius: "3px"
},
activeColor: {
absolute: "0px 0px 0px 0px",
borderRadius: "2px",
background: "rgba(" + rgb.r + "," + rgb.g + "," + rgb.b + "," + rgb.a + ")",
boxShadow: "inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"
},
hue: {
position: "relative",
height: "10px",
overflow: "hidden"
},
Hue: {
radius: "2px",
shadow: "inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"
},
alpha: {
position: "relative",
height: "10px",
marginTop: "4px",
overflow: "hidden"
},
Alpha: {
radius: "2px",
shadow: "inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"
}
},
disableAlpha: {
color: {
height: "10px"
},
hue: {
height: "10px"
},
alpha: {
display: "none"
}
}
}, {
disableAlpha: disableAlpha
});
return _react2["default"].createElement("div", {
style: styles.picker,
className: "sketch-picker"
}, _react2["default"].createElement("div", {
style: styles.saturation
}, _react2["default"].createElement(_common.Saturation, {
style: styles.Saturation,
hsl: hsl,
hsv: hsv,
onChange: onChange
})), _react2["default"].createElement("div", {
style: styles.controls,
className: "flexbox-fix"
}, _react2["default"].createElement("div", {
style: styles.sliders
}, _react2["default"].createElement("div", {
style: styles.hue
}, _react2["default"].createElement(_common.Hue, {
style: styles.Hue,
hsl: hsl,
onChange: onChange
})), _react2["default"].createElement("div", {
style: styles.alpha
}, _react2["default"].createElement(_common.Alpha, {
style: styles.Alpha,
rgb: rgb,
hsl: hsl,
renderers: renderers,
onChange: onChange
}))), _react2["default"].createElement("div", {
style: styles.color
}, _react2["default"].createElement(_common.Checkboard, null), _react2["default"].createElement("div", {
style: styles.activeColor
}))), _react2["default"].createElement(_SketchFields2["default"], {
rgb: rgb,
hsl: hsl,
hex: hex,
onChange: onChange,
disableAlpha: disableAlpha
}), _react2["default"].createElement(_SketchPresetColors2["default"], {
colors: presetColors,
onClick: onChange
}));
};
Sketch.defaultProps = {
presetColors: [ "#D0021B", "#F5A623", "#F8E71C", "#8B572A", "#7ED321", "#417505", "#BD10E0", "#9013FE", "#4A90E2", "#50E3C2", "#B8E986", "#000000", "#4A4A4A", "#9B9B9B", "#FFFFFF" ],
width: 200
}, exports["default"] = (0, _common.ColorWrap)(Sketch);
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.ShetchFields = void 0;
var _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), _color = __webpack_require__(423), _color2 = _interopRequireDefault(_color), _common = __webpack_require__(408), ShetchFields = exports.ShetchFields = function(_ref) {
var onChange = _ref.onChange, rgb = _ref.rgb, hsl = _ref.hsl, hex = _ref.hex, disableAlpha = _ref.disableAlpha, styles = (0,
_reactcss2["default"])({
"default": {
fields: {
display: "flex",
paddingTop: "4px"
},
single: {
flex: "1",
paddingLeft: "6px"
},
alpha: {
flex: "1",
paddingLeft: "6px"
},
"double": {
flex: "2"
},
input: {
width: "80%",
padding: "4px 10% 3px",
border: "none",
boxShadow: "inset 0 0 0 1px #ccc",
fontSize: "11px"
},
label: {
display: "block",
textAlign: "center",
fontSize: "11px",
color: "#222",
paddingTop: "3px",
paddingBottom: "4px",
textTransform: "capitalize"
}
},
disableAlpha: {
alpha: {
display: "none"
}
}
}, {
disableAlpha: disableAlpha
}), handleChange = function(data, e) {
data.hex ? _color2["default"].isValidHex(data.hex) && onChange({
hex: data.hex,
source: "hex"
}, e) : data.r || data.g || data.b ? onChange({
r: data.r || rgb.r,
g: data.g || rgb.g,
b: data.b || rgb.b,
a: rgb.a,
source: "rgb"
}, e) : data.a && (data.a < 0 ? data.a = 0 : data.a > 100 && (data.a = 100), data.a = data.a / 100,
onChange({
h: hsl.h,
s: hsl.s,
l: hsl.l,
a: data.a,
source: "rgb"
}, e));
};
return _react2["default"].createElement("div", {
style: styles.fields,
className: "flexbox-fix"
}, _react2["default"].createElement("div", {
style: styles["double"]
}, _react2["default"].createElement(_common.EditableInput, {
style: {
input: styles.input,
label: styles.label
},
label: "hex",
value: hex.replace("#", ""),
onChange: handleChange
})), _react2["default"].createElement("div", {
style: styles.single
}, _react2["default"].createElement(_common.EditableInput, {
style: {
input: styles.input,
label: styles.label
},
label: "r",
value: rgb.r,
onChange: handleChange,
dragLabel: "true",
dragMax: "255"
})), _react2["default"].createElement("div", {
style: styles.single
}, _react2["default"].createElement(_common.EditableInput, {
style: {
input: styles.input,
label: styles.label
},
label: "g",
value: rgb.g,
onChange: handleChange,
dragLabel: "true",
dragMax: "255"
})), _react2["default"].createElement("div", {
style: styles.single
}, _react2["default"].createElement(_common.EditableInput, {
style: {
input: styles.input,
label: styles.label
},
label: "b",
value: rgb.b,
onChange: handleChange,
dragLabel: "true",
dragMax: "255"
})), _react2["default"].createElement("div", {
style: styles.alpha
}, _react2["default"].createElement(_common.EditableInput, {
style: {
input: styles.input,
label: styles.label
},
label: "a",
value: Math.round(100 * rgb.a),
onChange: handleChange,
dragLabel: "true",
dragMax: "100"
})));
};
exports["default"] = ShetchFields;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.SketchPresetColors = void 0;
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
}
return target;
}, _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _propTypes = __webpack_require__(234), _propTypes2 = _interopRequireDefault(_propTypes), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), _common = __webpack_require__(408), SketchPresetColors = exports.SketchPresetColors = function(_ref) {
var colors = _ref.colors, onClick = _ref.onClick, styles = (0, _reactcss2["default"])({
"default": {
colors: {
margin: "0 -10px",
padding: "10px 0 0 10px",
borderTop: "1px solid #eee",
display: "flex",
flexWrap: "wrap",
position: "relative"
},
swatchWrap: {
width: "16px",
height: "16px",
margin: "0 10px 10px 0"
},
swatch: {
borderRadius: "3px",
boxShadow: "inset 0 0 0 1px rgba(0,0,0,.15)"
}
},
"no-presets": {
colors: {
display: "none"
}
}
}, {
"no-presets": !colors || !colors.length
}), handleClick = function(hex, e) {
onClick({
hex: hex,
source: "hex"
}, e);
};
return _react2["default"].createElement("div", {
style: styles.colors,
className: "flexbox-fix"
}, colors.map(function(colorObjOrString) {
var c = "string" == typeof colorObjOrString ? {
color: colorObjOrString
} : colorObjOrString;
return _react2["default"].createElement("div", {
key: c.color,
style: styles.swatchWrap
}, _react2["default"].createElement(_common.Swatch, _extends({}, c, {
style: styles.swatch,
onClick: handleClick
})));
}));
};
SketchPresetColors.propTypes = {
colors: _propTypes2["default"].arrayOf(_propTypes2["default"].oneOfType([ _propTypes2["default"].string, _propTypes2["default"].shape({
color: _propTypes2["default"].string,
title: _propTypes2["default"].string
}) ]))
}, exports["default"] = SketchPresetColors;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.Slider = void 0;
var _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), _common = __webpack_require__(408), _SliderSwatches = __webpack_require__(462), _SliderSwatches2 = _interopRequireDefault(_SliderSwatches), _SliderPointer = __webpack_require__(464), _SliderPointer2 = _interopRequireDefault(_SliderPointer), Slider = exports.Slider = function(_ref) {
var hsl = _ref.hsl, onChange = _ref.onChange, pointer = _ref.pointer, styles = (0,
_reactcss2["default"])({
"default": {
hue: {
height: "12px",
position: "relative"
},
Hue: {
radius: "2px"
}
}
});
return _react2["default"].createElement("div", {
className: "slider-picker"
}, _react2["default"].createElement("div", {
style: styles.hue
}, _react2["default"].createElement(_common.Hue, {
style: styles.Hue,
hsl: hsl,
pointer: pointer,
onChange: onChange
})), _react2["default"].createElement("div", {
style: styles.swatches
}, _react2["default"].createElement(_SliderSwatches2["default"], {
hsl: hsl,
onClick: onChange
})));
};
Slider.defaultProps = {
pointer: _SliderPointer2["default"]
}, exports["default"] = (0, _common.ColorWrap)(Slider);
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.SliderSwatches = void 0;
var _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), _SliderSwatch = __webpack_require__(463), _SliderSwatch2 = _interopRequireDefault(_SliderSwatch), SliderSwatches = exports.SliderSwatches = function(_ref) {
var onClick = _ref.onClick, hsl = _ref.hsl, styles = (0, _reactcss2["default"])({
"default": {
swatches: {
marginTop: "20px"
},
swatch: {
boxSizing: "border-box",
width: "20%",
paddingRight: "1px",
"float": "left"
},
clear: {
clear: "both"
}
}
});
return _react2["default"].createElement("div", {
style: styles.swatches
}, _react2["default"].createElement("div", {
style: styles.swatch
}, _react2["default"].createElement(_SliderSwatch2["default"], {
hsl: hsl,
offset: ".80",
active: Math.round(100 * hsl.l) / 100 === .8 && Math.round(100 * hsl.s) / 100 === .5,
onClick: onClick,
first: !0
})), _react2["default"].createElement("div", {
style: styles.swatch
}, _react2["default"].createElement(_SliderSwatch2["default"], {
hsl: hsl,
offset: ".65",
active: Math.round(100 * hsl.l) / 100 === .65 && Math.round(100 * hsl.s) / 100 === .5,
onClick: onClick
})), _react2["default"].createElement("div", {
style: styles.swatch
}, _react2["default"].createElement(_SliderSwatch2["default"], {
hsl: hsl,
offset: ".50",
active: Math.round(100 * hsl.l) / 100 === .5 && Math.round(100 * hsl.s) / 100 === .5,
onClick: onClick
})), _react2["default"].createElement("div", {
style: styles.swatch
}, _react2["default"].createElement(_SliderSwatch2["default"], {
hsl: hsl,
offset: ".35",
active: Math.round(100 * hsl.l) / 100 === .35 && Math.round(100 * hsl.s) / 100 === .5,
onClick: onClick
})), _react2["default"].createElement("div", {
style: styles.swatch
}, _react2["default"].createElement(_SliderSwatch2["default"], {
hsl: hsl,
offset: ".20",
active: Math.round(100 * hsl.l) / 100 === .2 && Math.round(100 * hsl.s) / 100 === .5,
onClick: onClick,
last: !0
})), _react2["default"].createElement("div", {
style: styles.clear
}));
};
exports["default"] = SliderSwatches;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.SliderSwatch = void 0;
var _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), SliderSwatch = exports.SliderSwatch = function(_ref) {
var hsl = _ref.hsl, offset = _ref.offset, onClick = _ref.onClick, active = _ref.active, first = _ref.first, last = _ref.last, styles = (0,
_reactcss2["default"])({
"default": {
swatch: {
height: "12px",
background: "hsl(" + hsl.h + ", 50%, " + 100 * offset + "%)",
cursor: "pointer"
}
},
first: {
swatch: {
borderRadius: "2px 0 0 2px"
}
},
last: {
swatch: {
borderRadius: "0 2px 2px 0"
}
},
active: {
swatch: {
transform: "scaleY(1.8)",
borderRadius: "3.6px/2px"
}
}
}, {
active: active,
first: first,
last: last
}), handleClick = function(e) {
return onClick({
h: hsl.h,
s: .5,
l: offset,
source: "hsl"
}, e);
};
return _react2["default"].createElement("div", {
style: styles.swatch,
onClick: handleClick
});
};
exports["default"] = SliderSwatch;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.SliderPointer = void 0;
var _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), SliderPointer = exports.SliderPointer = function() {
var styles = (0, _reactcss2["default"])({
"default": {
picker: {
width: "14px",
height: "14px",
borderRadius: "6px",
transform: "translate(-7px, -1px)",
backgroundColor: "rgb(248, 248, 248)",
boxShadow: "0 1px 4px 0 rgba(0, 0, 0, 0.37)"
}
}
});
return _react2["default"].createElement("div", {
style: styles.picker
});
};
exports["default"] = SliderPointer;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireWildcard(obj) {
if (obj && obj.__esModule) return obj;
var newObj = {};
if (null != obj) for (var key in obj) Object.prototype.hasOwnProperty.call(obj, key) && (newObj[key] = obj[key]);
return newObj["default"] = obj, newObj;
}
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.Swatches = void 0;
var _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), _map = __webpack_require__(282), _map2 = _interopRequireDefault(_map), _color = __webpack_require__(423), _color2 = _interopRequireDefault(_color), _materialColors = __webpack_require__(432), material = _interopRequireWildcard(_materialColors), _common = __webpack_require__(408), _reactMaterialDesign = __webpack_require__(439), _SwatchesGroup = __webpack_require__(466), _SwatchesGroup2 = _interopRequireDefault(_SwatchesGroup), Swatches = exports.Swatches = function(_ref) {
var width = _ref.width, height = _ref.height, onChange = _ref.onChange, colors = _ref.colors, hex = _ref.hex, styles = (0,
_reactcss2["default"])({
"default": {
picker: {
width: width,
height: height
},
overflow: {
height: height,
overflowY: "scroll"
},
body: {
padding: "16px 0 6px 16px"
},
clear: {
clear: "both"
}
}
}), handleChange = function(data, e) {
_color2["default"].isValidHex(data) && onChange({
hex: data,
source: "hex"
}, e);
};
return _react2["default"].createElement("div", {
style: styles.picker,
className: "swatches-picker"
}, _react2["default"].createElement(_reactMaterialDesign.Raised, null, _react2["default"].createElement("div", {
style: styles.overflow
}, _react2["default"].createElement("div", {
style: styles.body
}, (0, _map2["default"])(colors, function(group) {
return _react2["default"].createElement(_SwatchesGroup2["default"], {
key: group.toString(),
group: group,
active: hex,
onClick: handleChange
});
}), _react2["default"].createElement("div", {
style: styles.clear
})))));
};
Swatches.defaultProps = {
width: 320,
height: 240,
colors: [ [ material.red[900], material.red[700], material.red[500], material.red[300], material.red[100] ], [ material.pink[900], material.pink[700], material.pink[500], material.pink[300], material.pink[100] ], [ material.purple[900], material.purple[700], material.purple[500], material.purple[300], material.purple[100] ], [ material.deepPurple[900], material.deepPurple[700], material.deepPurple[500], material.deepPurple[300], material.deepPurple[100] ], [ material.indigo[900], material.indigo[700], material.indigo[500], material.indigo[300], material.indigo[100] ], [ material.blue[900], material.blue[700], material.blue[500], material.blue[300], material.blue[100] ], [ material.lightBlue[900], material.lightBlue[700], material.lightBlue[500], material.lightBlue[300], material.lightBlue[100] ], [ material.cyan[900], material.cyan[700], material.cyan[500], material.cyan[300], material.cyan[100] ], [ material.teal[900], material.teal[700], material.teal[500], material.teal[300], material.teal[100] ], [ "#194D33", material.green[700], material.green[500], material.green[300], material.green[100] ], [ material.lightGreen[900], material.lightGreen[700], material.lightGreen[500], material.lightGreen[300], material.lightGreen[100] ], [ material.lime[900], material.lime[700], material.lime[500], material.lime[300], material.lime[100] ], [ material.yellow[900], material.yellow[700], material.yellow[500], material.yellow[300], material.yellow[100] ], [ material.amber[900], material.amber[700], material.amber[500], material.amber[300], material.amber[100] ], [ material.orange[900], material.orange[700], material.orange[500], material.orange[300], material.orange[100] ], [ material.deepOrange[900], material.deepOrange[700], material.deepOrange[500], material.deepOrange[300], material.deepOrange[100] ], [ material.brown[900], material.brown[700], material.brown[500], material.brown[300], material.brown[100] ], [ material.blueGrey[900], material.blueGrey[700], material.blueGrey[500], material.blueGrey[300], material.blueGrey[100] ], [ "#000000", "#525252", "#969696", "#D9D9D9", "#FFFFFF" ] ]
}, exports["default"] = (0, _common.ColorWrap)(Swatches);
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.SwatchesGroup = void 0;
var _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), _map = __webpack_require__(282), _map2 = _interopRequireDefault(_map), _SwatchesColor = __webpack_require__(467), _SwatchesColor2 = _interopRequireDefault(_SwatchesColor), SwatchesGroup = exports.SwatchesGroup = function(_ref) {
var onClick = _ref.onClick, group = _ref.group, active = _ref.active, styles = (0,
_reactcss2["default"])({
"default": {
group: {
paddingBottom: "10px",
width: "40px",
"float": "left",
marginRight: "10px"
}
}
});
return _react2["default"].createElement("div", {
style: styles.group
}, (0, _map2["default"])(group, function(color, i) {
return _react2["default"].createElement(_SwatchesColor2["default"], {
key: color,
color: color,
active: color.toLowerCase() === active,
first: 0 === i,
last: i === group.length - 1,
onClick: onClick
});
}));
};
exports["default"] = SwatchesGroup;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.SwatchesColor = void 0;
var _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), SwatchesColor = exports.SwatchesColor = function(_ref) {
var color = _ref.color, onClick = _ref.onClick, first = _ref.first, last = _ref.last, active = _ref.active, styles = (0,
_reactcss2["default"])({
"default": {
color: {
width: "40px",
height: "24px",
cursor: "pointer",
background: color,
marginBottom: "1px"
},
check: {
fill: "#fff",
marginLeft: "8px",
display: "none"
}
},
first: {
color: {
overflow: "hidden",
borderRadius: "2px 2px 0 0"
}
},
last: {
color: {
overflow: "hidden",
borderRadius: "0 0 2px 2px"
}
},
active: {
check: {
display: "block"
}
},
"color-#FFFFFF": {
color: {
boxShadow: "inset 0 0 0 1px #ddd"
},
check: {
fill: "#333"
}
}
}, {
first: first,
last: last,
active: active,
"color-#FFFFFF": "#FFFFFF" === color
}), handleClick = function(e) {
return onClick(color, e);
};
return _react2["default"].createElement("div", {
style: styles.color,
onClick: handleClick
}, _react2["default"].createElement("div", {
style: styles.check
}, _react2["default"].createElement("svg", {
style: {
width: "24px",
height: "24px"
},
viewBox: "0 0 24 24"
}, _react2["default"].createElement("path", {
d: "M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"
}))));
};
exports["default"] = SwatchesColor;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.Twitter = void 0;
var _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(242), _reactcss2 = _interopRequireDefault(_reactcss), _map = __webpack_require__(282), _map2 = _interopRequireDefault(_map), _color = __webpack_require__(423), _color2 = _interopRequireDefault(_color), _common = __webpack_require__(408), Twitter = exports.Twitter = function(_ref) {
var onChange = _ref.onChange, colors = _ref.colors, width = _ref.width, triangle = _ref.triangle, styles = (0,
_reactcss2["default"])({
"default": {
card: {
width: width,
background: "#fff",
border: "0 solid rgba(0,0,0,0.25)",
boxShadow: "0 1px 4px rgba(0,0,0,0.25)",
borderRadius: "4px",
position: "relative"
},
body: {
padding: "15px 9px 9px 15px"
},
label: {
fontSize: "18px",
color: "#fff"
},
triangle: {
width: "0px",
height: "0px",
borderStyle: "solid",
borderWidth: "0 9px 10px 9px",
borderColor: "transparent transparent #fff transparent",
position: "absolute"
},
triangleShadow: {
width: "0px",
height: "0px",
borderStyle: "solid",
borderWidth: "0 9px 10px 9px",
borderColor: "transparent transparent rgba(0,0,0,.1) transparent",
position: "absolute"
},
hash: {
background: "#F0F0F0",
height: "30px",
width: "30px",
borderRadius: "4px 0 0 4px",
"float": "left",
color: "#98A1A4",
display: "flex",
alignItems: "center",
justifyContent: "center"
},
input: {
width: "100px",
fontSize: "14px",
color: "#666",
border: "0px",
outline: "none",
height: "28px",
boxShadow: "inset 0 0 0 1px #F0F0F0",
borderRadius: "0 4px 4px 0",
"float": "left",
paddingLeft: "8px"
},
swatch: {
width: "30px",
height: "30px",
"float": "left",
borderRadius: "4px",
margin: "0 6px 6px 0"
},
clear: {
clear: "both"
}
},
"hide-triangle": {
triangle: {
display: "none"
},
triangleShadow: {
display: "none"
}
},
"top-left-triangle": {
triangle: {
top: "-10px",
left: "12px"
},
triangleShadow: {
top: "-11px",
left: "12px"
}
},
"top-right-triangle": {
triangle: {
top: "-10px",
right: "12px"
},
triangleShadow: {
top: "-11px",
right: "12px"
}
}
}, {
"hide-triangle": "hide" === triangle,
"top-left-triangle": "top-left" === triangle,
"top-right-triangle": "top-right" === triangle
}), handleChange = function(hex, e) {
_color2["default"].isValidHex(hex) && onChange({
hex: hex,
source: "hex"
}, e);
};
return _react2["default"].createElement("div", {
style: styles.card,
className: "twitter-picker"
}, _react2["default"].createElement("div", {
style: styles.triangleShadow
}), _react2["default"].createElement("div", {
style: styles.triangle
}), _react2["default"].createElement("div", {
style: styles.body
}, (0, _map2["default"])(colors, function(c, i) {
return _react2["default"].createElement(_common.Swatch, {
key: i,
color: c,
hex: c,
style: styles.swatch,
onClick: handleChange
});
}), _react2["default"].createElement("div", {
style: styles.hash
}, "#"), _react2["default"].createElement(_common.EditableInput, {
placeholder: "ff691f",
style: {
input: styles.input
},
value: "",
onChange: handleChange
}), _react2["default"].createElement("div", {
style: styles.clear
})));
};
Twitter.defaultProps = {
width: "276px",
colors: [ "#FF6900", "#FCB900", "#7BDCB5", "#00D084", "#8ED1FC", "#0693E3", "#ABB8C3", "#EB144C", "#F78DA7", "#9900EF" ],
triangle: "top-left"
}, exports["default"] = (0, _common.ColorWrap)(Twitter);
}, function(module, exports) {
"use strict";
var Base = {
base00: "Default Background",
base01: "Soft Background",
base02: "Soft Middle",
base03: "Strong Middle",
base04: "Soft Foreground",
base05: "Default Foreground"
}, Syntax = {
special00: "Custom Components",
special01: "Integers, Booleans",
special02: "Strings, Arrays",
special03: "Details Pane Text",
special04: "Functions, Objects",
special05: "Special Text",
special06: "XML Attributes",
special07: "Host Components"
}, Selection = {
state00: "Focused Background",
state01: "Blurred Background",
state03: "Hovered Background",
state02: "Focused Foreground",
state04: "Search Background",
state05: "Search Foreground",
state06: "Interactive Hover"
};
module.exports = {
Base: Base,
Selection: Selection,
Syntax: Syntax
};
}, function(module, exports, __webpack_require__) {
"use strict";
function _defineProperty(obj, key, value) {
return key in obj ? Object.defineProperty(obj, key, {
value: value,
enumerable: !0,
configurable: !0,
writable: !0
}) : obj[key] = value, obj;
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
var _fauxRef, _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), React = __webpack_require__(6), _require = __webpack_require__(218), Map = _require.Map, consts = __webpack_require__(187), Node = __webpack_require__(226), _require2 = __webpack_require__(35), monospace = _require2.monospace, Preview = function(_React$Component) {
function Preview() {
return _classCallCheck(this, Preview), _possibleConstructorReturn(this, (Preview.__proto__ || Object.getPrototypeOf(Preview)).apply(this, arguments));
}
return _inherits(Preview, _React$Component), _createClass(Preview, [ {
key: "getChildContext",
value: function() {
return {
scrollTo: function() {},
store: fauxStore
};
}
}, {
key: "render",
value: function() {
var theme = this.props.theme;
return React.createElement("div", {
style: panelStyle(theme)
}, React.createElement(Node, {
depth: 0,
node: Map({
children: [ "grandparent" ],
name: "div"
}),
searchRegExp: /iv/
}));
}
} ]), Preview;
}(React.Component);
Preview.childContextTypes = {
scrollTo: React.PropTypes.func,
store: React.PropTypes.object
};
var fauxRef = (_fauxRef = {}, _defineProperty(_fauxRef, consts.type, "function"),
_defineProperty(_fauxRef, consts.name, "setRef"), _fauxRef), childNode = Map({
id: "child",
children: "text",
name: "div",
props: {
style: {
color: "red"
}
},
ref: fauxRef
}), grandparentNode = Map({
id: "grandparent",
children: [ "parent" ],
name: "Grandparent",
nodeType: "Composite",
props: {
depth: 0
}
}), parentNode = Map({
id: "parent",
children: [ "child" ],
name: "Parent",
nodeType: "Composite",
props: {
"boolean": !0,
integer: 123,
string: "foobar"
}
}), nodes = {
child: childNode,
grandparent: grandparentNode,
parent: parentNode
}, noop = function() {}, fauxStore = {
hovered: "parent",
selected: "grandparent",
get: function(id) {
return nodes[id];
},
off: noop,
on: noop,
onContextMenu: noop,
onHover: noop,
onHoverBottom: noop,
onSelect: noop,
onSelectBottom: noop,
onToggleCollapse: noop,
setHover: noop,
selectBottom: noop,
selectTop: noop
}, panelStyle = function(theme) {
return {
maxWidth: "100%",
padding: "0.25rem 0",
zIndex: 1,
fontFamily: monospace.family,
fontSize: monospace.sizes.normal,
backgroundColor: theme.base00,
color: theme.base05
};
};
module.exports = Preview;
}, function(module, exports) {
"use strict";
var ApathyDark = {
displayName: "Apathy (dark)",
base00: "#1b322e",
base01: "#30695f",
base02: "#184E45",
base03: "#2B685E",
base04: "#5F9C92",
base05: "#f5fcfb",
special00: "#3E9688",
special01: "#3E7996",
special02: "#883E96",
special03: "#963E4C",
special04: "#96883E",
special05: "#4C963E",
special06: "#3E965B",
special07: "#5F9C92",
state00: "#28423d",
state01: "#28423d",
state02: "#f5fcfb",
state03: "#28423d",
state04: "#3E4C96",
state05: "#f5fcfb",
state06: "#ffffff"
}, ApathyLight = {
displayName: "Apathy (light)",
base00: "#D2E7E4",
base01: "#fff",
base02: "#184E45",
base03: "#2B685E",
base04: "#5F9C92",
base05: "rgba(0, 0, 0, .7)",
special00: "#3E9688",
special01: "#3E7996",
special02: "#883E96",
special03: "#963E4C",
special04: "#96883E",
special05: "#4C963E",
special06: "#3E965B",
special07: "#5F9C92",
state00: "#f5fcfb",
state01: "#f5fcfb",
state02: "#2b2d2d",
state03: "#f5fcfb",
state04: "#3E4C96",
state05: "#f5fcfb",
state06: "#000000"
}, AtomDark = {
displayName: "Atom (dark)",
hidden: !0,
base00: "#1d1f21",
base01: "#292c2f",
base02: "#2e2e2e",
base03: "#303030",
base04: "#868989",
base05: "#c1c4c2",
special00: "#fffeba",
special01: "#f574f3",
special02: "#aafd6a",
special03: "#93c294",
special04: "#fed2aa",
special05: "#93c294",
special06: "#c5c5fb",
special07: "#98ccfc",
state00: "#4483c2",
state01: "#444444",
state02: "#ffffff",
state03: "#444444",
state04: "#4483c2",
state05: "#ffffff",
state06: "#e3e6e4"
}, AtomLight = {
displayName: "Atom (light)",
hidden: !0,
base00: "#ffffff",
base01: "#f4f4f4",
base02: "#eeeeee",
base03: "#555555",
base04: "#999989",
base05: "#222222",
special00: "#11807f",
special01: "#db1847",
special02: "#db1847",
special03: "#11807f",
special04: "#97040c",
special05: "#616b9f",
special06: "#455686",
special07: "#11807f",
state00: "#b0c4d9",
state01: "#fffed8",
state02: "#222222",
state03: "#fffed8",
state04: "#6da6e7",
state05: "#ffffff",
state06: "#000000"
}, ChromeDark = {
displayName: "Chrome (dark)",
hidden: !0,
base00: "#242424",
base01: "#2a2a2a",
base02: "#363636",
base03: "#404040",
base04: "#777777",
base05: "#a5a5a5",
special00: "#5db0d7",
special01: "#a1f7b5",
special02: "#f29766",
special03: "#d2c057",
special04: "#34d1c5",
special05: "#9a7fd5",
special06: "#9bbbdc",
special07: "#777777",
state00: "#c78626",
state01: "#363636",
state02: "#242424",
state03: "#342e24",
state04: "#66ff88",
state05: "#242424",
state06: "#cccccc"
}, ChromeDefault = {
displayName: "Chrome (default)",
hidden: !0,
base00: "#ffffff",
base01: "#f3f3f3",
base02: "#eeeeee",
base03: "#dadada",
base04: "#888888",
base05: "#5a5a5a",
special00: "#881280",
special01: "#222222",
special02: "#1a1aa6",
special03: "#c80000",
special04: "#236e25",
special05: "#aa0d91",
special06: "#994500",
special07: "#888888",
state00: "#3879d9",
state01: "#dadada",
state02: "#ffffff",
state03: "#ebf1fb",
state04: "#FFFF00",
state05: "#222222",
state06: "#222222"
}, Dracula = {
displayName: "Dracula",
base00: "#282936",
base01: "#3a3c4e",
base02: "#4d4f68",
base03: "#626483",
base04: "#6f7191",
base05: "#e9e9f4",
special00: "#ff79c6",
special01: "#bd93f9",
special02: "#f1fa8c",
special03: "#a1efe4",
special04: "#4afa7b",
special05: "#ff79c6",
special06: "#f8f8f2",
special07: "#6f7191",
state00: "#181a21",
state01: "#323547",
state02: "#f7f7fb",
state03: "#323547",
state04: "#fafa8c",
state05: "#000000",
state06: "#ffffff"
}, Eighties = {
displayName: "Eighties",
base00: "#2d2d2d",
base01: "#393939",
base02: "#515151",
base03: "#747369",
base04: "#a09f93",
base05: "#d3d0c8",
special00: "#f2777a",
special01: "#f99157",
special02: "#99cc99",
special03: "#66cccc",
special04: "#4afa7b",
special05: "#cc99cc",
special06: "#d27b53",
special07: "#a09f93",
state00: "#f2f0ec",
state01: "#3f3e3e",
state02: "#2d2d2d",
state03: "#3f3e3e",
state04: "#4afa7b",
state05: "#121212",
state06: "#e3e0d8"
}, FirefoxDark = {
displayName: "Firefox (dark)",
hidden: !0,
base00: "#393f4c",
base01: "#393f4c",
base02: "#454d5d",
base03: "#454D5D",
base04: "#8fa1b2",
base05: "#a9bacb",
special00: "#00ff7f",
special01: "#eb5368",
special02: "#e9f4fe",
special03: "#bcb8db",
special04: "#e9f4fe",
special05: "#e9f4fe",
special06: "#e9f4fe",
special07: "#8fa1b2",
state00: "#5675b9",
state01: "#475983",
state02: "#ffffff",
state03: "#475983",
state04: "#00ff7f",
state05: "#181d20",
state06: "#b9cadb"
}, FirefoxFirebug = {
displayName: "Firefox (firebug)",
hidden: !0,
base00: "#ffffff",
base01: "#f5f5f5",
base02: "#dde1e4",
base03: "#c1c1c1",
base04: "#888888",
base05: "#2a2a2a",
special00: "#0000ff",
special01: "#ff0000",
special02: "#ff0000",
special03: "#292e33",
special04: "#ff0000",
special05: "#0000ff",
special06: "#000062",
special07: "#0000ff",
state00: "#3399ff",
state01: "#e4f1fa",
state02: "#ffffff",
state03: "#e6e6e6",
state04: "#ffee99",
state05: "#000000",
state06: "#000000"
}, FirefoxLight = {
displayName: "Firefox (light)",
hidden: !0,
base00: "#ffffff",
base01: "#fcfcfc",
base02: "#dde1e4",
base03: "#c1c1c1",
base04: "#888888",
base05: "#767676",
special00: "#2e9dd5",
special01: "#676bff",
special02: "#5b5fff",
special03: "#393f4c",
special04: "#ed2655",
special05: "#4f88cc",
special06: "#393f4c",
special07: "#888888",
state00: "#4c9ed9",
state01: "#e4f1fa",
state02: "#f4f7fa",
state03: "#e4f1fa",
state04: "#FFFF00",
state05: "#585959",
state06: "#444444"
}, Flat = {
displayName: "Flat",
base00: "#2C3E50",
base01: "#34495E",
base02: "#7F8C8D",
base03: "#95A5A6",
base04: "#BDC3C7",
base05: "#e0e0e0",
special00: "#E74C3C",
special01: "#E67E22",
special02: "#2ECC71",
special03: "#1ABC9C",
special04: "#3498DB",
special05: "#b670d2",
special06: "#be643c",
special07: "#BDC3C7",
state00: "#6a8db1",
state01: "#364c62",
state02: "#2C3E50",
state03: "#364c62",
state04: "#64fa82",
state05: "#2C3E50",
state06: "#ffffff"
}, GruvboxDark = {
displayName: "Gruvbox (dark)",
base00: "#282828",
base01: "#3c3836",
base02: "#504945",
base03: "#928374",
base04: "#bdae93",
base05: "#ebdbb2",
special00: "#83a598",
special01: "#d3869b",
special02: "#b8bb26",
special03: "#689d6a",
special04: "#fabd2f",
special05: "#fe8019",
special06: "#fe8019",
special07: "#bdae93",
state00: "#504945",
state01: "#3c3836",
state02: "#fbf1c7",
state03: "#3c3836",
state04: "#7c6f64",
state05: "#fbf1c7",
state06: "#fbebc2"
}, GruvboxLight = {
displayName: "Gruvbox (light)",
base00: "#fbf1c7",
base01: "#ebdbb2",
base02: "#d5c4a1",
base03: "#928374",
base04: "#282828",
base05: "#3c3836",
special00: "#076678",
special01: "#8f3f71",
special02: "#98971a",
special03: "#af3a03",
special04: "#458588",
special05: "#fe8019",
special06: "#b57614",
special07: "#282828",
state00: "#bdae93",
state01: "#d5c4a1",
state02: "#282828",
state03: "#d5c4a1",
state04: "#d5c4a1",
state05: "#282828",
state06: "#000000"
}, Halflife = {
displayName: "Halflife",
base00: "#222222",
base01: "#f3f3f3",
base02: "#888888",
base03: "#282828",
base04: "#888888",
base05: "#aaaaaa",
special00: "#fc913a",
special01: "#f9d423",
special02: "#f9d423",
special03: "#cccccc",
special04: "#f9d423",
special05: "#3b3a32",
special06: "#cccccc",
special07: "#7d8991",
state00: "#f85931",
state01: "#dadada",
state02: "#ffffff",
state03: "#282828",
state04: "#ffe792",
state05: "#000000",
state06: "#222222"
}, Materia = {
displayName: "Materia",
base00: "#263238",
base01: "#2C393F",
base02: "#37474F",
base03: "#707880",
base04: "#C9CCD3",
base05: "#CDD3DE",
special00: "#EC5F67",
special01: "#EA9560",
special02: "#8BD649",
special03: "#80CBC4",
special04: "#89DDFF",
special05: "#82AAFF",
special06: "#EC5F67",
special07: "#C9CCD3",
state00: "#0084ff",
state01: "#314048",
state02: "#263238",
state03: "#314048",
state04: "#00ff84",
state05: "#263238",
state06: "#DDE3EE"
}, MaterialDark = {
displayName: "Material Dark",
base00: "#263239",
base01: "#373b41",
base02: "#3e4a51",
base03: "#445052",
base04: "#718184",
base05: "#B2CCD6",
special00: "#f95479",
special01: "#F78C6A",
special02: "#C3E88D",
special03: "#89DDF3",
special04: "#82AAFF",
special05: "#C792EA",
special06: "#FFCB6B",
special07: "#718184",
state00: "#4a55b9",
state01: "#3e4a50",
state02: "#ffffff",
state03: "#212b30",
state04: "#4a55b9",
state05: "#ffffff",
state06: "#D2ECF6"
}, OceanDark = {
displayName: "Ocean Dark",
base00: "#232730",
base01: "#2b303c",
base02: "#323943",
base03: "#414551",
base04: "#65727e",
base05: "#757984",
special00: "#b48bae",
special01: "#c0c5ce",
special02: "#a3c08a",
special03: "#ab7866",
special04: "#eccd88",
special05: "#d06a77",
special06: "#757a85",
special07: "#65727e",
state00: "#a0a4ae",
state01: "#314048",
state02: "#263238",
state03: "#314048",
state04: "#d06a77",
state05: "#1c1f27",
state06: "#A5A9B4"
}, OneDark = {
displayName: "One (dark)",
base00: "#282c34",
base01: "#21252b",
base02: "#568af2",
base03: "#3b4048",
base04: "#3e454f",
base05: "#abb2bf",
special00: "#e5c07b",
special01: "#abb2bf",
special02: "#98c379",
special03: "#9da5b4",
special04: "#e06c75",
special05: "#6b717e",
special06: "#d19a66",
special07: "#abb2bf",
state00: "#4d78cc",
state01: "#3e4450",
state02: "#ffffff",
state03: "#2c323c",
state04: "#4d78cc",
state05: "#ffffff",
state06: "#ffffff"
}, OneLight = {
displayName: "One (light)",
base00: "#fafafa",
base01: "#eaeaeb",
base02: "#eeeeee",
base03: "#dbdbdc",
base04: "#8e8e90",
base05: "#3e4048",
special00: "#c0831e",
special01: "#a42ea2",
special02: "#68ab68",
special03: "#447bef",
special04: "#e2574e",
special05: "#424242",
special06: "#976715",
special07: "#424242",
state00: "#447bef",
state01: "#f0f0f1",
state02: "#ffffff",
state03: "#f0f0f1",
state04: "#447bef",
state05: "#ffffff",
state06: "#1c2026"
}, Phd = {
displayName: "Phd",
base00: "#061229",
base01: "#2a3448",
base02: "#4d5666",
base03: "#717885",
base04: "#9a99a3",
base05: "#b8bbc2",
special00: "#d07346",
special01: "#f0a000",
special02: "#99bf52",
special03: "#72b9bf",
special04: "#5299bf",
special05: "#9989cc",
special06: "#b08060",
special07: "#9a99a3",
state00: "#4b73bf",
state01: "#112243",
state02: "#061229",
state03: "#112243",
state04: "#00c8fa",
state05: "#061229",
state06: "#d8dbe2"
}, SolarizedDark = {
displayName: "Solarized Dark",
base00: "#002b36",
base01: "#073642",
base02: "#586e75",
base03: "#657b83",
base04: "#93a1a1",
base05: "#839496",
special00: "#268bd2",
special01: "#268bd2",
special02: "#2aa198",
special03: "#839496",
special04: "#2aa198",
special05: "#b58900",
special06: "#859900",
special07: "#268bd2",
state00: "#073642",
state01: "#002b36",
state02: "#93a1a1",
state03: "#073642",
state04: "#859900",
state05: "#002b36",
state06: "#fdf6e3"
}, SolarizedLight = {
displayName: "Solarized Light",
base00: "#fdf6e3",
base01: "#eee8d5",
base02: "#586e75",
base03: "#657b83",
base04: "#93a1a1",
base05: "#657b83",
special00: "#268bd2",
special01: "#268bd2",
special02: "#2aa198",
special03: "#839496",
special04: "#2aa198",
special05: "#b58900",
special06: "#859900",
special07: "#268bd2",
state00: "#eee8d5",
state01: "#eee8d5",
state02: "#586e75",
state03: "#eee8d5",
state04: "#859900",
state05: "#eee8d5",
state06: "#073642"
}, Tomorrow = {
displayName: "Tomorrow",
base00: "#ffffff",
base01: "#e0e0e0",
base02: "#d6d6d6",
base03: "#8e908c",
base04: "#969896",
base05: "#4d4d4c",
special00: "#c82829",
special01: "#f5871f",
special02: "#718c00",
special03: "#3e999f",
special04: "#4271ae",
special05: "#8959a8",
special06: "#a3685a",
special07: "#969896",
state00: "#4271ae",
state01: "#e0e0e0",
state02: "#ffffff",
state03: "#e0e0e0",
state04: "#eab700",
state05: "#1d1f21",
state06: "#222222"
}, TomorrowNight = {
displayName: "Tomorrow Night",
base00: "#1d1f21",
base01: "#282a2e",
base02: "#373b41",
base03: "#969896",
base04: "#b4b7b4",
base05: "#c5c8c6",
special00: "#cc6666",
special01: "#de935f",
special02: "#b5bd68",
special03: "#8abeb7",
special04: "#81a2be",
special05: "#b294bb",
special06: "#a3685a",
special07: "#b4b7b4",
state00: "#0084ff",
state01: "#e0e0e0",
state02: "#282a2e",
state03: "#373b41",
state04: "#f0c674",
state05: "#1d1f21",
state06: "#e5e8e6"
};
module.exports = {
ApathyDark: ApathyDark,
ApathyLight: ApathyLight,
AtomDark: AtomDark,
AtomLight: AtomLight,
ChromeDark: ChromeDark,
ChromeDefault: ChromeDefault,
Dracula: Dracula,
Eighties: Eighties,
FirefoxDark: FirefoxDark,
FirefoxFirebug: FirefoxFirebug,
FirefoxLight: FirefoxLight,
Flat: Flat,
GruvboxDark: GruvboxDark,
GruvboxLight: GruvboxLight,
Halflife: Halflife,
Materia: Materia,
MaterialDark: MaterialDark,
OceanDark: OceanDark,
OneDark: OneDark,
OneLight: OneLight,
Phd: Phd,
SolarizedDark: SolarizedDark,
SolarizedLight: SolarizedLight,
Tomorrow: Tomorrow,
TomorrowNight: TomorrowNight
};
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
}
return target;
}, _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), React = __webpack_require__(6), TimerSafe = function(Component) {
var TimerSafeImplementation = function(_React$Component) {
function TimerSafeImplementation() {
var _ref, _temp, _this, _ret;
_classCallCheck(this, TimerSafeImplementation);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
return _temp = _this = _possibleConstructorReturn(this, (_ref = TimerSafeImplementation.__proto__ || Object.getPrototypeOf(TimerSafeImplementation)).call.apply(_ref, [ this ].concat(args))),
_this._timeoutIds = {}, _this._clearTimeout = function(id) {
clearTimeout(id), delete _this._timeoutIds[id];
}, _this._setTimeout = function(callback, delay) {
var id = setTimeout(function() {
delete _this._timeoutIds[id], callback();
}, delay);
return _this._timeoutIds[id] = !0, id;
}, _ret = _temp, _possibleConstructorReturn(_this, _ret);
}
return _inherits(TimerSafeImplementation, _React$Component), _createClass(TimerSafeImplementation, [ {
key: "componentWillUnmount",
value: function() {
Object.keys(this._timeoutIds).forEach(this._clearTimeout);
}
}, {
key: "render",
value: function() {
return React.createElement(Component, _extends({}, this.props, {
clearTimeout: this._clearTimeout,
setTimeout: this._setTimeout
}));
}
} ]), TimerSafeImplementation;
}(React.Component);
return TimerSafeImplementation;
};
module.exports = TimerSafe;
}, function(module, exports, __webpack_require__) {
"use strict";
function deserialize(string) {
var fallbackTheme = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : ChromeDefault, theme = {};
try {
!function() {
var maybeTheme = JSON.parse(string);
themeKeys.forEach(function(key) {
var maybeColor = maybeTheme[key];
isColorSet(maybeColor) && (theme[key] = maybeColor);
});
}();
} catch (error) {
console.error("Could not deserialize theme", error);
}
return isColorSet(theme.state06) || (theme.state06 = theme.base05), themeKeys.forEach(function(key) {
var maybeColor = theme[key];
isColorSet(maybeColor) || (theme[key] = fallbackTheme[key]);
}), theme;
}
function isColorSet(maybeColor) {
return "string" == typeof maybeColor && "" !== maybeColor;
}
function serialize(theme) {
return JSON.stringify(theme, null, 0);
}
var _require = __webpack_require__(471), ChromeDefault = _require.ChromeDefault, themeKeys = Object.keys(ChromeDefault);
module.exports = {
deserialize: deserialize,
serialize: serialize
};
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
}
return target;
}, _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), React = __webpack_require__(6), ReactDOM = __webpack_require__(44), Draggable = __webpack_require__(475), SplitPane = function(_React$Component) {
function SplitPane(props) {
_classCallCheck(this, SplitPane);
var _this = _possibleConstructorReturn(this, (SplitPane.__proto__ || Object.getPrototypeOf(SplitPane)).call(this, props));
return _this.state = {
moving: !1,
width: props.initialWidth,
height: props.initialHeight
}, _this;
}
return _inherits(SplitPane, _React$Component), _createClass(SplitPane, [ {
key: "componentDidMount",
value: function() {
var node = ReactDOM.findDOMNode(this), width = Math.floor(node.offsetWidth * (this.props.isVertical ? .6 : .3));
this.setState({
width: Math.min(250, width),
height: Math.floor(.3 * node.offsetHeight)
});
}
}, {
key: "onMove",
value: function(x, y) {
var _this2 = this, rect = ReactDOM.findDOMNode(this).getBoundingClientRect();
this.setState(function(prevState) {
return {
width: _this2.props.isVertical ? prevState.width : Math.floor(rect.left + rect.width - x),
height: _this2.props.isVertical ? Math.floor(rect.top + rect.height - y) : prevState.height
};
});
}
}, {
key: "render",
value: function() {
var _this3 = this, theme = this.context.theme, isVertical = this.props.isVertical, _state = this.state, height = _state.height, width = _state.width;
return React.createElement("div", {
style: containerStyle(isVertical)
}, React.createElement("div", {
style: styles.leftPane
}, this.props.left()), React.createElement("div", {
style: rightStyle(isVertical, width, height)
}, React.createElement(Draggable, {
style: draggerStyle(isVertical),
onStart: function() {
return _this3.setState({
moving: !0
});
},
onMove: function(x, y) {
return _this3.onMove(x, y);
},
onStop: function() {
return _this3.setState({
moving: !1
});
}
}, React.createElement("div", {
style: draggerInnerStyle(isVertical, theme)
})), React.createElement("div", {
style: styles.rightPane
}, this.props.right())));
}
} ]), SplitPane;
}(React.Component);
SplitPane.contextTypes = {
theme: React.PropTypes.object.isRequired
};
var containerStyle = function(isVertical) {
return {
display: "flex",
minWidth: 0,
flex: 1,
flexDirection: isVertical ? "column" : "row"
};
}, draggerInnerStyle = function(isVertical, theme) {
return {
height: isVertical ? "1px" : "100%",
width: isVertical ? "100%" : "1px",
backgroundColor: theme.base04
};
}, draggerStyle = function(isVertical) {
return {
position: "relative",
zIndex: 1,
padding: isVertical ? "0.25rem 0" : "0 0.25rem",
margin: isVertical ? "-0.25rem 0" : "0 -0.25rem",
cursor: isVertical ? "ns-resize" : "ew-resize"
};
}, rightStyle = function(isVertical, width, height) {
return _extends({}, containerStyle(isVertical), {
width: isVertical ? null : width,
height: isVertical ? height : null,
flex: "initial",
minHeight: 120,
minWidth: 150
});
}, styles = {
rightPane: {
display: "flex",
width: "100%"
},
leftPane: {
display: "flex",
minWidth: "50%",
minHeight: "50%",
flex: 1,
overflow: "hidden"
}
};
module.exports = SplitPane;
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), React = __webpack_require__(6), ReactDOM = __webpack_require__(44), Draggable = function(_React$Component) {
function Draggable() {
return _classCallCheck(this, Draggable), _possibleConstructorReturn(this, (Draggable.__proto__ || Object.getPrototypeOf(Draggable)).apply(this, arguments));
}
return _inherits(Draggable, _React$Component), _createClass(Draggable, [ {
key: "componentDidMount",
value: function() {
this._onMove = this.onMove.bind(this), this._onUp = this.onUp.bind(this);
}
}, {
key: "_startDragging",
value: function(evt) {
evt.preventDefault();
var doc = ReactDOM.findDOMNode(this).ownerDocument;
doc.addEventListener("mousemove", this._onMove), doc.addEventListener("mouseup", this._onUp),
this.props.onStart();
}
}, {
key: "onMove",
value: function(evt) {
evt.preventDefault(), this.props.onMove(evt.pageX, evt.pageY);
}
}, {
key: "onUp",
value: function(evt) {
evt.preventDefault();
var doc = ReactDOM.findDOMNode(this).ownerDocument;
doc.removeEventListener("mousemove", this._onMove), doc.removeEventListener("mouseup", this._onUp),
this.props.onStop();
}
}, {
key: "render",
value: function() {
return React.createElement("div", {
style: this.props.style,
onMouseDown: this._startDragging.bind(this)
}, this.props.children);
}
} ]), Draggable;
}(React.Component);
module.exports = Draggable;
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), React = __webpack_require__(6), decorate = __webpack_require__(38), _require = __webpack_require__(35), sansSerif = _require.sansSerif, TabbedPane = function(_React$Component) {
function TabbedPane() {
return _classCallCheck(this, TabbedPane), _possibleConstructorReturn(this, (TabbedPane.__proto__ || Object.getPrototypeOf(TabbedPane)).apply(this, arguments));
}
return _inherits(TabbedPane, _React$Component), _createClass(TabbedPane, [ {
key: "render",
value: function() {
var _this2 = this, theme = this.context.theme, tabs = Object.keys(this.props.tabs);
return 1 === tabs.length ? this.props.tabs[tabs[0]]() : React.createElement("div", {
style: styles.container
}, React.createElement("ul", {
style: tabsStyle(theme)
}, tabs.map(function(name, i) {
return React.createElement("li", {
key: name + i,
onClick: function() {
return _this2.props.setSelectedTab(name);
},
style: tabStyle(name === _this2.props.selected, theme)
}, name);
})), React.createElement("div", {
style: styles.body
}, this.props.tabs[this.props.selected]()));
}
} ]), TabbedPane;
}(React.Component);
TabbedPane.contextTypes = {
theme: React.PropTypes.object.isRequired
};
var tabsStyle = function(theme) {
return {
display: "flex",
flexShrink: 0,
listStyle: "none",
margin: 0,
backgroundColor: theme.base00,
borderBottom: "1px solid " + theme.base03,
padding: "0.25rem 0.25rem 0 0.25rem"
};
}, tabStyle = function(isSelected, theme) {
var border = isSelected ? "1px solid " + theme.base03 : "none";
return {
padding: "0.25rem 0.5rem",
lineHeight: "15px",
fontSize: sansSerif.sizes.normal,
fontFamily: sansSerif.family,
cursor: "pointer",
backgroundColor: isSelected ? theme.base01 : "transparent",
borderLeft: border,
borderRight: border,
borderTop: border
};
}, styles = {
container: {
flex: 1,
display: "flex",
flexDirection: "column",
width: "100%"
},
body: {
flex: 1,
display: "flex",
minHeight: 0
}
};
module.exports = decorate({
listeners: function() {
return [ "selectedTab" ];
},
shouldUpdate: function(props, prevProps) {
for (var name in props) if (props[name] !== prevProps[name]) return !0;
return !1;
},
props: function(store) {
return {
selected: store.selectedTab,
setSelectedTab: function(name) {
return store.setSelectedTab(name);
}
};
}
}, TabbedPane);
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
var _slicedToArray = function() {
function sliceIterator(arr, i) {
var _arr = [], _n = !0, _d = !1, _e = void 0;
try {
for (var _s, _i = arr[Symbol.iterator](); !(_n = (_s = _i.next()).done) && (_arr.push(_s.value),
!i || _arr.length !== i); _n = !0) ;
} catch (err) {
_d = !0, _e = err;
} finally {
try {
!_n && _i["return"] && _i["return"]();
} finally {
if (_d) throw _e;
}
}
return _arr;
}
return function(arr, i) {
if (Array.isArray(arr)) return arr;
if (Symbol.iterator in Object(arr)) return sliceIterator(arr, i);
throw new TypeError("Invalid attempt to destructure non-iterable instance");
};
}(), _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), _require = __webpack_require__(478), EventEmitter = _require.EventEmitter, _require2 = __webpack_require__(218), Map = _require2.Map, Set = _require2.Set, List = _require2.List, assign = __webpack_require__(37), _require3 = __webpack_require__(231), copy = _require3.copy, nodeMatchesText = __webpack_require__(479), consts = __webpack_require__(187), serializePropsForCopy = __webpack_require__(480), invariant = __webpack_require__(213), SearchUtils = __webpack_require__(220), Store = (__webpack_require__(481),
function(_EventEmitter) {
function Store(bridge, themeStore) {
_classCallCheck(this, Store);
var _this = _possibleConstructorReturn(this, (Store.__proto__ || Object.getPrototypeOf(Store)).call(this));
return _this._nodes = new Map(), _this._parents = new Map(), _this._nodesByName = new Map(),
_this._bridge = bridge, _this.isInspectEnabled = !1, _this.roots = new List(), _this.contextMenu = null,
_this.searchRoots = null, _this.hovered = null, _this.selected = null, _this.selectedTab = "Elements",
_this.breadcrumbHead = null, _this.isBottomTagHovered = !1, _this.isBottomTagSelected = !1,
_this.searchText = "", _this.capabilities = {}, _this.traceupdatesState = null,
_this.colorizerState = null, _this.refreshSearch = !1, _this.themeStore = themeStore,
window.store = _this, _this._bridge.on("root", function(id) {
_this.roots.contains(id) || (_this.roots = _this.roots.push(id), _this.selected || (_this.selected = _this.skipWrapper(id),
_this.breadcrumbHead = _this.selected, _this.emit("selected"), _this.emit("breadcrumbHead"),
_this._bridge.send("selected", _this.selected)), _this.emit("roots"));
}), _this._bridge.on("mount", function(data) {
return _this._mountComponent(data);
}), _this._bridge.on("update", function(data) {
return _this._updateComponent(data);
}), _this._bridge.on("unmount", function(id) {
return _this._unmountComponent(id);
}), _this._bridge.on("setInspectEnabled", function(data) {
return _this.setInspectEnabled(data);
}), _this._bridge.on("select", function(_ref) {
for (var id = _ref.id, quiet = _ref.quiet, _ref$offsetFromLeaf = _ref.offsetFromLeaf, offsetFromLeaf = void 0 === _ref$offsetFromLeaf ? 0 : _ref$offsetFromLeaf; offsetFromLeaf > 0; ) {
offsetFromLeaf--;
var pid = _this._parents.get(id);
if (!pid) break;
id = pid;
}
_this._revealDeep(id), _this.selectTop(_this.skipWrapper(id), quiet), _this.setSelectedTab("Elements");
}), _this._establishConnection(), _this._eventQueue = [], _this._eventTimer = null,
_this;
}
return _inherits(Store, _EventEmitter), _createClass(Store, [ {
key: "emit",
value: function(event) {
var _this2 = this;
return this._eventQueue.indexOf(event) !== -1 || (this._eventQueue.push(event),
this._eventTimer || (this._eventTimer = setTimeout(function() {
return _this2.flush();
}, 50)), !0);
}
}, {
key: "flush",
value: function() {
var _this3 = this;
this._eventTimer && (clearTimeout(this._eventTimer), this._eventTimer = null), this._eventQueue.forEach(function(evt) {
EventEmitter.prototype.emit.call(_this3, evt);
}), this._eventQueue = [];
}
}, {
key: "scrollToNode",
value: function(id) {
this._bridge.send("scrollToNode", id);
}
}, {
key: "copyNodeName",
value: function(name) {
copy(name);
}
}, {
key: "copyNodeProps",
value: function(props) {
copy(serializePropsForCopy(props));
}
}, {
key: "setSelectedTab",
value: function(name) {
this.selectedTab !== name && (this.selectedTab = name, this.emit("selectedTab"));
}
}, {
key: "changeTextContent",
value: function(id, text) {
this._bridge.send("changeTextContent", {
id: id,
text: text
});
var node = this._nodes.get(id);
if ("Text" === node.get("nodeType")) this._nodes = this._nodes.set(id, node.set("text", text)); else {
this._nodes = this._nodes.set(id, node.set("children", text));
var props = node.get("props");
props.children = text;
}
this.emit(id);
}
}, {
key: "changeSearch",
value: function(text) {
var _this4 = this, needle = text.toLowerCase();
(needle !== this.searchText.toLowerCase() || this.refreshSearch) && (text && 0 !== SearchUtils.trimSearchText(text).length ? (this.searchRoots && 0 === needle.indexOf(this.searchText.toLowerCase()) && !SearchUtils.shouldSearchUseRegex(text) ? this.searchRoots = this.searchRoots.filter(function(item) {
var node = _this4.get(item);
return node.get("name") && node.get("name").toLowerCase().indexOf(needle) !== -1 || node.get("text") && node.get("text").toLowerCase().indexOf(needle) !== -1 || "string" == typeof node.get("children") && node.get("children").toLowerCase().indexOf(needle) !== -1;
}) : this.searchRoots = this._nodes.entrySeq().filter(function(_ref2) {
var _ref3 = _slicedToArray(_ref2, 2), key = _ref3[0], val = _ref3[1];
return nodeMatchesText(val, needle, key, _this4);
}).map(function(_ref4) {
var _ref5 = _slicedToArray(_ref4, 2), key = _ref5[0];
_ref5[1];
return key;
}).toList(), this.searchRoots.forEach(function(id) {
_this4.hasBottom(id) && (_this4._nodes = _this4._nodes.setIn([ id, "collapsed" ], !0));
})) : this.searchRoots = null, this.searchText = text, this.emit("searchText"),
this.emit("searchRoots"), this.searchRoots && !this.searchRoots.contains(this.selected) ? this.select(null, !0) : this.searchRoots || (this.selected ? this._revealDeep(this.selected) : this.select(this.roots.get(0))),
this.highlightSearch(), this.refreshSearch = !1, this.flush());
}
}, {
key: "highlight",
value: function(id) {
this.colorizerState && this.colorizerState.enabled || this._bridge.send("highlight", id);
}
}, {
key: "highlightMany",
value: function(ids) {
this._bridge.send("highlightMany", ids);
}
}, {
key: "highlightSearch",
value: function() {
this.colorizerState && this.colorizerState.enabled && (this._bridge.send("hideHighlight"),
this.searchRoots && this.highlightMany(this.searchRoots.toArray()));
}
}, {
key: "hoverClass",
value: function(name) {
if (null === name) return void this.hideHighlight();
var ids = this._nodesByName.get(name);
ids && this.highlightMany(ids.toArray());
}
}, {
key: "selectFirstOfClass",
value: function(name) {
var ids = this._nodesByName.get(name);
if (ids && ids.size) {
var id = ids.toSeq().first();
this._revealDeep(id), this.selectTop(id);
}
}
}, {
key: "showContextMenu",
value: function(type, evt) {
for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) args[_key - 2] = arguments[_key];
evt.preventDefault(), this.contextMenu = {
type: type,
x: evt.pageX,
y: evt.pageY,
args: args
}, this.emit("contextMenu");
}
}, {
key: "hideContextMenu",
value: function() {
this.contextMenu = null, this.emit("contextMenu");
}
}, {
key: "changeTheme",
value: function(themeName) {
this.themeStore.update(themeName), this.emit("theme");
}
}, {
key: "changeDefaultTheme",
value: function(defaultThemeName) {
this.themeStore.setDefaultTheme(defaultThemeName), this.emit("theme");
}
}, {
key: "saveCustomTheme",
value: function(theme) {
this.themeStore.saveCustomTheme(theme), this.emit("theme");
}
}, {
key: "showPreferencesPanel",
value: function() {
this.preferencesPanelShown = !0, this.emit("preferencesPanelShown");
}
}, {
key: "hidePreferencesPanel",
value: function() {
this.preferencesPanelShown = !1, this.emit("preferencesPanelShown");
}
}, {
key: "selectFirstSearchResult",
value: function() {
this.searchRoots && this.select(this.searchRoots.get(0), !0);
}
}, {
key: "hasBottom",
value: function(id) {
var node = this.get(id), children = node.get("children");
return "NativeWrapper" === node.get("nodeType") && (children = this.get(children[0]).get("children")),
!("string" == typeof children || !children || !children.length || node.get("collapsed"));
}
}, {
key: "toggleCollapse",
value: function(id) {
this._nodes = this._nodes.updateIn([ id, "collapsed" ], function(c) {
return !c;
}), this.emit(id);
}
}, {
key: "toggleAllChildrenNodes",
value: function(value) {
var id = this.selected;
id && this._toggleDeepChildren(id, value);
}
}, {
key: "setProps",
value: function(id, path, value) {
this._bridge.send("setProps", {
id: id,
path: path,
value: value
});
}
}, {
key: "setState",
value: function(id, path, value) {
this._bridge.send("setState", {
id: id,
path: path,
value: value
});
}
}, {
key: "setContext",
value: function(id, path, value) {
this._bridge.send("setContext", {
id: id,
path: path,
value: value
});
}
}, {
key: "makeGlobal",
value: function(id, path) {
this._bridge.send("makeGlobal", {
id: id,
path: path
});
}
}, {
key: "setHover",
value: function(id, isHovered, isBottomTag) {
if (isHovered) {
var old = this.hovered;
this.hovered = id, this.isBottomTagHovered = isBottomTag, old && this.emit(old),
this.emit(id), this.emit("hover"), this.highlight(id);
} else this.hovered === id && (this.hideHighlight(), this.isBottomTagHovered = !1);
}
}, {
key: "hideHighlight",
value: function() {
if ((!this.colorizerState || !this.colorizerState.enabled) && (this._bridge.send("hideHighlight"),
this.hovered)) {
var id = this.hovered;
this.hovered = null, this.emit(id), this.emit("hover");
}
}
}, {
key: "selectBreadcrumb",
value: function(id) {
this._revealDeep(id), this.changeSearch(""), this.isBottomTagSelected = !1, this.select(id, !1, !0);
}
}, {
key: "selectTop",
value: function(id, noHighlight) {
this.isBottomTagSelected = !1, this.select(id, noHighlight);
}
}, {
key: "selectBottom",
value: function(id) {
this.isBottomTagSelected = !0, this.select(id);
}
}, {
key: "select",
value: function(id, noHighlight, keepBreadcrumb) {
var oldSel = this.selected;
this.selected = id, oldSel && this.emit(oldSel), id && this.emit(id), keepBreadcrumb || (this.breadcrumbHead = id,
this.emit("breadcrumbHead")), this.emit("selected"), this._bridge.send("selected", id),
!noHighlight && id && this.highlight(id);
}
}, {
key: "get",
value: function(id) {
return this._nodes.get(id);
}
}, {
key: "getParent",
value: function(id) {
return this._parents.get(id);
}
}, {
key: "skipWrapper",
value: function(id, up, end) {
if (id) for (;;) {
var node = this.get(id), nodeType = node.get("nodeType");
if ("Wrapper" !== nodeType && "Native" !== nodeType) return id;
if ("Native" === nodeType && (!up || "NativeWrapper" !== this.get(this._parents.get(id)).get("nodeType"))) return id;
if (up) {
var parentId = this._parents.get(id);
if (!parentId) return;
id = parentId;
} else {
var children = node.get("children");
if (0 === children.length) return;
var index = end ? children.length - 1 : 0, childId = children[index];
id = childId;
}
}
}
}, {
key: "off",
value: function(evt, fn) {
this.removeListener(evt, fn);
}
}, {
key: "inspect",
value: function(id, path, cb) {
var _this5 = this;
invariant("props" === path[0] || "state" === path[0] || "context" === path[0], "Inspected path must be one of props, state, or context"),
this._bridge.inspect(id, path, function(value) {
var base = _this5.get(id).get(path[0]), inspected = path.slice(1).reduce(function(obj, attr) {
return obj ? obj[attr] : null;
}, base);
inspected && (assign(inspected, value), inspected[consts.inspected] = !0), cb();
});
}
}, {
key: "changeTraceUpdates",
value: function(state) {
this.traceupdatesState = state, this.emit("traceupdatesstatechange"), invariant(state.toJS, "state.toJS should exist"),
this._bridge.send("traceupdatesstatechange", state.toJS());
}
}, {
key: "changeColorizer",
value: function(state) {
this.colorizerState = state, this.emit("colorizerchange"), this._bridge.send("colorizerchange", state.toJS()),
this.colorizerState && this.colorizerState.enabled ? this.highlightSearch() : this.hideHighlight();
}
}, {
key: "setInspectEnabled",
value: function(isInspectEnabled) {
this.isInspectEnabled = isInspectEnabled, this.emit("isInspectEnabled"), this._bridge.send("setInspectEnabled", isInspectEnabled);
}
}, {
key: "_establishConnection",
value: function() {
var requestInt, _this6 = this, tries = 0;
this._bridge.once("capabilities", function(capabilities) {
clearInterval(requestInt), _this6.capabilities = assign(_this6.capabilities, capabilities),
_this6.emit("connected");
}), this._bridge.send("requestCapabilities"), requestInt = setInterval(function() {
return tries += 1, tries > 100 ? (console.error("failed to connect"), clearInterval(requestInt),
void _this6.emit("connection failed")) : void _this6._bridge.send("requestCapabilities");
}, 500);
}
}, {
key: "_revealDeep",
value: function(id) {
if (!this.searchRoots || !this.searchRoots.contains(id)) for (var pid = this._parents.get(id); pid; ) {
if (this._nodes.getIn([ pid, "collapsed" ]) && (this._nodes = this._nodes.setIn([ pid, "collapsed" ], !1),
this.emit(pid)), this.searchRoots && this.searchRoots.contains(pid)) return;
pid = this._parents.get(pid);
}
}
}, {
key: "_toggleDeepChildren",
value: function(id, value) {
var _this7 = this, node = this._nodes.get(id);
if (node) {
node.get("collapsed") !== value && (this._nodes = this._nodes.setIn([ id, "collapsed" ], value),
this.emit(id));
var children = node.get("children");
children && children.forEach && children.forEach(function(cid) {
return _this7._toggleDeepChildren(cid, value);
});
}
}
}, {
key: "_mountComponent",
value: function(data) {
var _this8 = this, map = Map(data).set("renders", 1);
"Composite" === data.nodeType && (map = map.set("collapsed", !0)), this._nodes = this._nodes.set(data.id, map),
data.children && data.children.forEach && data.children.forEach(function(cid) {
_this8._parents = _this8._parents.set(cid, data.id);
});
var curNodes = this._nodesByName.get(data.name) || new Set();
this._nodesByName = this._nodesByName.set(data.name, curNodes.add(data.id)), this.emit(data.id);
}
}, {
key: "_updateComponent",
value: function(data) {
var _this9 = this, node = this.get(data.id);
node && (data.renders = node.get("renders") + 1, this._nodes = this._nodes.mergeIn([ data.id ], Map(data)),
data.children && data.children.forEach && data.children.forEach(function(cid) {
if (!_this9._parents.get(cid)) {
_this9._parents = _this9._parents.set(cid, data.id);
var childNode = _this9._nodes.get(cid), childID = childNode.get("id");
_this9.searchRoots && nodeMatchesText(childNode, _this9.searchText.toLowerCase(), childID, _this9) && (_this9.searchRoots = _this9.searchRoots.push(childID),
_this9.emit("searchRoots"), _this9.highlightSearch());
}
}), this.emit(data.id));
}
}, {
key: "_unmountComponent",
value: function(id) {
var pid = this._parents.get(id);
if (this._removeFromNodesByName(id), this._parents = this._parents["delete"](id),
this._nodes = this._nodes["delete"](id), pid) this.emit(pid); else {
var ix = this.roots.indexOf(id);
ix !== -1 && (this.roots = this.roots["delete"](ix), this.emit("roots"));
}
if (id === this.selected) {
var newsel = pid ? this.skipWrapper(pid, !0) : this.roots.get(0);
this.selectTop(newsel, !0);
}
this.searchRoots && this.searchRoots.contains(id) && (this.searchRoots = this.searchRoots["delete"](this.searchRoots.indexOf(id)),
this.emit("searchRoots"), this.highlightSearch());
}
}, {
key: "_removeFromNodesByName",
value: function(id) {
var node = this._nodes.get(id);
node && (this._nodesByName = this._nodesByName.set(node.get("name"), this._nodesByName.get(node.get("name"))["delete"](id)));
}
} ]), Store;
}(EventEmitter));
module.exports = Store;
}, function(module, exports) {
module.exports = require("events");
}, function(module, exports, __webpack_require__) {
"use strict";
function nodeMatchesText(node, needle, key, store) {
var name = node.get("name"), wrapper = store.get(store.getParent(key));
if ("Native" === node.get("nodeType") && wrapper && "NativeWrapper" === wrapper.get("nodeType")) return !1;
var useRegex = SearchUtils.shouldSearchUseRegex(needle);
if (name && "Wrapper" !== node.get("nodeType")) return validString(name, needle, useRegex);
var text = node.get("text");
if (text) return validString(text, needle, useRegex);
var children = node.get("children");
return "string" == typeof children && validString(children, needle, useRegex);
}
function validString(str, needle, regex) {
if (regex) try {
var regExp = SearchUtils.searchTextToRegExp(needle);
return regExp.test(str.toLowerCase());
} catch (error) {
return !1;
}
return str.toLowerCase().indexOf(needle) !== -1;
}
var SearchUtils = __webpack_require__(220);
module.exports = nodeMatchesText;
}, function(module, exports, __webpack_require__) {
"use strict";
function stripFunctions(props) {
for (var key in props) {
var value = props[key], type = value && value[consts.type] || ("undefined" == typeof value ? "undefined" : _typeof(value));
if ("function" === type) {
var name = value[consts.name];
props[key] = "[function " + name + "]";
}
}
}
function serializePropsForCopy(props) {
var cloned = Object.assign({}, props);
delete cloned.children, stripFunctions(cloned);
try {
return JSON.stringify(cloned, null, 2);
} catch (error) {
return "";
}
}
var _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj) {
return typeof obj;
} : function(obj) {
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
}, consts = __webpack_require__(187);
module.exports = serializePropsForCopy;
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function getFromLocalStorage(key) {
var value = void 0;
try {
value = localStorage.getItem(key);
} catch (error) {
console.error("Could not read from localStorage.", error);
}
return value || null;
}
function getSafeThemeName(themeName, fallbackThemeName) {
return themeName === CUSTOM_THEME_NAME ? CUSTOM_THEME_NAME : themeName && Themes.hasOwnProperty(themeName) ? themeName : fallbackThemeName && Themes.hasOwnProperty(fallbackThemeName) ? fallbackThemeName : "ChromeDefault";
}
function setInLocalStorage(key, value) {
try {
return localStorage.setItem(key, value), !0;
} catch (error) {
console.error("Could not write to localStorage.", error);
}
return !1;
}
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), _require = __webpack_require__(473), deserialize = _require.deserialize, serialize = _require.serialize, Themes = __webpack_require__(471), _require2 = __webpack_require__(229), CUSTOM_THEME_NAME = _require2.CUSTOM_THEME_NAME, LOCAL_STORAGE_CUSTOM_THEME_KEY = "customTheme", LOCAL_STORAGE_THEME_NAME_KEY = "themeName", Store = function() {
function Store(defaultThemeName) {
_classCallCheck(this, Store), this.themes = Themes;
var customTheme = getFromLocalStorage(LOCAL_STORAGE_CUSTOM_THEME_KEY);
customTheme && (this.customTheme = deserialize(customTheme)), this.setDefaultTheme(defaultThemeName);
}
return _createClass(Store, [ {
key: "setDefaultTheme",
value: function(defaultThemeName) {
this.defaultThemeName = getSafeThemeName(defaultThemeName);
var themeName = getSafeThemeName(getFromLocalStorage(LOCAL_STORAGE_THEME_NAME_KEY), this.defaultThemeName);
this.theme = themeName === CUSTOM_THEME_NAME ? this.customTheme : Themes[themeName],
this.themeName = themeName;
}
}, {
key: "update",
value: function(themeName) {
if (themeName === CUSTOM_THEME_NAME) this.theme = this.customTheme, this.themeName = CUSTOM_THEME_NAME; else {
var safeThemeKey = getSafeThemeName(themeName, this.defaultThemeName);
this.theme = this.themes[safeThemeKey], this.themeName = safeThemeKey;
}
setInLocalStorage(LOCAL_STORAGE_THEME_NAME_KEY, themeName || null);
}
}, {
key: "saveCustomTheme",
value: function(theme) {
this.customTheme = theme, this.theme = theme, setInLocalStorage(LOCAL_STORAGE_CUSTOM_THEME_KEY, serialize(theme));
}
} ]), Store;
}();
module.exports = Store;
}, function(module, exports, __webpack_require__) {
"use strict";
function getDest(dir, store) {
var id = store.selected;
if (!id) return null;
var bottom = store.isBottomTagSelected, node = store.get(id), collapsed = node.get("collapsed"), children = node.get("children");
"NativeWrapper" === node.get("nodeType") && (children = store.get(children[0]).get("children"));
var hasChildren = children && "string" != typeof children && children.length;
return dirToDest(dir, bottom, collapsed, hasChildren);
}
function getRootSelection(dest, store, id) {
var roots = store.searchRoots || store.roots, ix = roots.indexOf(id);
if (ix === -1 && (ix = roots.indexOf(store._parents.get(id))), "prevSibling" === dest) {
if (0 === ix) return null;
var prev = store.skipWrapper(roots.get(ix - 1), !1, !0);
return store.isBottomTagSelected = !!prev && store.hasBottom(prev), prev;
}
return "nextSibling" === dest ? ix >= roots.size - 1 ? null : (store.isBottomTagSelected = !1,
store.skipWrapper(roots.get(ix + 1))) : null;
}
function getNewSelection(dest, store) {
var id = store.selected;
if (id) {
var node = store.get(id), pid = store.getParent(id);
if (pid) {
var lastId = id;
if ("parent" === dest) {
var parentNode = store.get(pid);
if ("Wrapper" !== parentNode.get("nodeType")) return pid;
for (;"Wrapper" === parentNode.get("nodeType"); ) {
if (lastId = id, id = pid, pid = store.getParent(id), !pid) {
pid = id, id = lastId;
break;
}
parentNode = store.get(pid);
}
dest = "prevSibling";
} else if ("parentBottom" === dest) {
var _parentNode = store.get(pid);
if ("Wrapper" !== _parentNode.get("nodeType")) return store.isBottomTagSelected = !0,
pid;
for (;"Wrapper" === _parentNode.get("nodeType"); ) {
if (lastId = id, id = pid, pid = store.getParent(id), !pid) {
pid = id, id = lastId;
break;
}
_parentNode = store.get(pid);
}
dest = "nextSibling";
}
}
if (id) {
if (store.searchRoots && store.searchRoots.contains(pid) && (pid = null), "collapse" === dest || "uncollapse" === dest) return "collapse" === dest && (store.isBottomTagSelected = !1),
void store.toggleCollapse(id);
"selectTop" === dest && store.selectTop(id);
var children = node.get("children");
"NativeWrapper" === node.get("nodeType") && (children = store.get(children[0]).get("children"));
var cid;
if ("firstChild" === dest) {
if ("string" == typeof children) return getNewSelection("nextSibling", store);
for (var i = 0; i < children.length; i++) if (cid = store.skipWrapper(children[i])) return store.isBottomTagSelected = !1,
cid;
}
if ("lastChild" === dest) return "string" == typeof children ? getNewSelection("prevSibling", store) : (cid = store.skipWrapper(children[children.length - 1], !1, !0),
cid && !store.hasBottom(cid) && (store.isBottomTagSelected = !1), cid);
if (!pid) return getRootSelection(dest, store, id);
var parent = store.get(store.getParent(id)), pchildren = parent.get("children"), pix = pchildren.indexOf(id);
if (pix === -1 && (pix = pchildren.indexOf(store._parents.get(id))), "prevSibling" === dest) {
for (;pix > 0; ) {
var _childId = pchildren[pix - 1], _child = store.get(_childId), prevCid = store.skipWrapper(_childId, !1, "Wrapper" === _child.get("nodeType"));
if (prevCid) return store.hasBottom(prevCid) && (store.isBottomTagSelected = !0),
prevCid;
pix--;
}
var roots = store.searchRoots || store.roots;
if (roots.indexOf(store.getParent(id)) > -1) return getRootSelection(dest, store, id);
var childId = pchildren[pix], child = store.get(childId);
return "Wrapper" === child.get("nodeType") ? store.getParent(id) : getNewSelection("parent", store);
}
if ("nextSibling" === dest) {
if (pix === pchildren.length - 1) {
var _roots = store.searchRoots || store.roots;
if (_roots.indexOf(store.getParent(id)) > -1) return getRootSelection(dest, store, id);
var _childId2 = pchildren[pix], _child2 = store.get(_childId2);
return "Wrapper" === _child2.get("nodeType") ? (store.isBottomTagSelected = !0,
store.getParent(id)) : getNewSelection("parentBottom", store);
}
return store.isBottomTagSelected = !1, store.skipWrapper(pchildren[pix + 1]);
}
return null;
}
}
}
var dirToDest = __webpack_require__(483), keyCodes = {
"72": "left",
"74": "down",
"75": "up",
"76": "right",
"37": "left",
"38": "up",
"39": "right",
"40": "down"
};
module.exports = function(store, win) {
return win = win || window, function(e) {
if (win.document.activeElement === win.document.body && !e.shiftKey && !e.metaKey) {
var direction = keyCodes[e.keyCode];
if (direction) {
if (e.preventDefault(), e.altKey && "right" === direction) return void store.toggleAllChildrenNodes(!1);
if (e.altKey && "left" === direction) return void store.toggleAllChildrenNodes(!0);
if (!e.ctrlKey && !e.altKey) {
var dest = getDest(direction, store);
if (dest) {
var move = getNewSelection(dest, store);
move && move !== store.selected && store.select(move);
}
}
}
}
};
};
}, function(module, exports) {
"use strict";
module.exports = function(dir, bottom, collapsed, hasChildren) {
if ("down" === dir) return bottom || collapsed || !hasChildren ? "nextSibling" : "firstChild";
if ("up" === dir) return bottom && !collapsed && hasChildren ? "lastChild" : "prevSibling";
if ("left" === dir) return !collapsed && hasChildren ? bottom ? "selectTop" : "collapse" : "parent";
if ("right" === dir) {
if (collapsed && hasChildren) return "uncollapse";
if (hasChildren) return bottom ? null : "firstChild";
}
return null;
};
}, function(module, exports, __webpack_require__) {
"use strict";
function _toConsumableArray(arr) {
if (Array.isArray(arr)) {
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
return arr2;
}
return Array.from(arr);
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function getWindowFunction(name, polyfill) {
return String(window[name]).indexOf("[native code]") === -1 ? polyfill : window[name];
}
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
}
return target;
}, _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), consts = __webpack_require__(187), hydrate = __webpack_require__(485), dehydrate = __webpack_require__(486), getIn = __webpack_require__(487), performanceNow = __webpack_require__(488), lastRunTimeMS = 5, cancelIdleCallback = getWindowFunction("cancelIdleCallback", clearTimeout), requestIdleCallback = getWindowFunction("requestIdleCallback", function(cb, options) {
var delayMS = 3e3 * lastRunTimeMS;
return delayMS > 500 && (delayMS = 500), setTimeout(function() {
var startTime = performanceNow();
cb({
didTimeout: !1,
timeRemaining: function() {
return 1 / 0;
}
});
var endTime = performanceNow();
lastRunTimeMS = (endTime - startTime) / 1e3;
}, delayMS);
}), Bridge = function() {
function Bridge(wall) {
_classCallCheck(this, Bridge), this._cbs = new Map(), this._inspectables = new Map(),
this._cid = 0, this._listeners = {}, this._buffer = [], this._flushHandle = null,
this._callers = {}, this._paused = !1, this._wall = wall, wall.listen(this._handleMessage.bind(this));
}
return _createClass(Bridge, [ {
key: "inspect",
value: function(id, path, cb) {
var _cid = this._cid++;
this._cbs.set(_cid, function(data, cleaned, proto, protoclean) {
cleaned.length && hydrate(data, cleaned), proto && protoclean.length && hydrate(proto, protoclean),
proto && (data[consts.proto] = proto), cb(data);
}), this._wall.send({
type: "inspect",
callback: _cid,
path: path,
id: id
});
}
}, {
key: "call",
value: function(name, args, cb) {
var _cid = this._cid++;
this._cbs.set(_cid, cb), this._wall.send({
type: "call",
callback: _cid,
args: args,
name: name
});
}
}, {
key: "onCall",
value: function(name, handler) {
if (this._callers[name]) throw new Error("only one call handler per call name allowed");
this._callers[name] = handler;
}
}, {
key: "pause",
value: function() {
this._wall.send({
type: "pause"
});
}
}, {
key: "resume",
value: function() {
this._wall.send({
type: "resume"
});
}
}, {
key: "setInspectable",
value: function(id, data) {
var prev = this._inspectables.get(id);
return prev ? void this._inspectables.set(id, _extends({}, prev, data)) : void this._inspectables.set(id, data);
}
}, {
key: "send",
value: function(evt, data) {
this._buffer.push({
evt: evt,
data: data
}), this.scheduleFlush();
}
}, {
key: "scheduleFlush",
value: function() {
if (!this._flushHandle && this._buffer.length) {
var timeout = this._paused ? 5e3 : 500;
this._flushHandle = requestIdleCallback(this.flushBufferWhileIdle.bind(this), {
timeout: timeout
});
}
}
}, {
key: "cancelFlush",
value: function() {
this._flushHandle && (cancelIdleCallback(this._flushHandle), this._flushHandle = null);
}
}, {
key: "flushBufferWhileIdle",
value: function(deadline) {
this._flushHandle = null;
for (var chunkCount = this._paused ? 20 : 10, chunkSize = Math.round(this._buffer.length / chunkCount), minChunkSize = this._paused ? 50 : 100; this._buffer.length && (deadline.timeRemaining() > 0 || deadline.didTimeout); ) {
var take = Math.min(this._buffer.length, Math.max(minChunkSize, chunkSize)), currentBuffer = this._buffer.splice(0, take);
this.flushBufferSlice(currentBuffer);
}
this._buffer.length && this.scheduleFlush();
}
}, {
key: "flushBufferSlice",
value: function(bufferSlice) {
var _this = this, events = bufferSlice.map(function(_ref) {
var evt = _ref.evt, data = _ref.data, cleaned = [], san = dehydrate(data, cleaned);
return cleaned.length && _this.setInspectable(data.id, data), {
type: "event",
evt: evt,
data: san,
cleaned: cleaned
};
});
this._wall.send({
type: "many-events",
events: events
});
}
}, {
key: "forget",
value: function(id) {
this._inspectables["delete"](id);
}
}, {
key: "on",
value: function(evt, fn) {
this._listeners[evt] ? this._listeners[evt].push(fn) : this._listeners[evt] = [ fn ];
}
}, {
key: "off",
value: function(evt, fn) {
if (this._listeners[evt]) {
var ix = this._listeners[evt].indexOf(fn);
ix !== -1 && this._listeners[evt].splice(ix, 1);
}
}
}, {
key: "once",
value: function(evt, fn) {
var self = this, listener = function listener() {
fn.apply(this, arguments), self.off(evt, listener);
};
this.on(evt, listener);
}
}, {
key: "_handleMessage",
value: function(payload) {
var _this2 = this;
if ("resume" === payload.type) return this._paused = !1, void this.scheduleFlush();
if ("pause" === payload.type) return this._paused = !0, void this.cancelFlush();
if ("callback" === payload.type) {
var callback = this._cbs.get(payload.id);
return void (callback && (callback.apply(void 0, _toConsumableArray(payload.args)),
this._cbs["delete"](payload.id)));
}
if ("call" === payload.type) return void this._handleCall(payload.name, payload.args, payload.callback);
if ("inspect" === payload.type) return void this._inspectResponse(payload.id, payload.path, payload.callback);
if ("event" === payload.type) {
payload.cleaned && hydrate(payload.data, payload.cleaned);
var fns = this._listeners[payload.evt], data = payload.data;
fns && fns.forEach(function(fn) {
return fn(data);
});
}
"many-events" === payload.type && payload.events.forEach(function(event) {
event.cleaned && hydrate(event.data, event.cleaned);
var handlers = _this2._listeners[event.evt];
handlers && handlers.forEach(function(fn) {
return fn(event.data);
});
});
}
}, {
key: "_handleCall",
value: function(name, args, callback) {
if (!this._callers[name]) return void console.warn('unknown call: "' + name + '"');
args = Array.isArray(args) ? args : [ args ];
var result;
try {
result = this._callers[name].apply(null, args);
} catch (e) {
return void console.error("Failed to call", e);
}
this._wall.send({
type: "callback",
id: callback,
args: [ result ]
});
}
}, {
key: "_inspectResponse",
value: function(id, path, callback) {
var inspectable = this._inspectables.get(id), result = {}, cleaned = [], proto = null, protoclean = [];
if (inspectable) {
var val = getIn(inspectable, path), protod = !1, isFn = "function" == typeof val;
if (val && "function" == typeof val[Symbol.iterator]) {
var iterVal = Object.create({}), count = 0, _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
try {
for (var _step, _iterator = val[Symbol.iterator](); !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
var entry = _step.value;
if (count > 100) break;
iterVal[count] = entry, count++;
}
} catch (err) {
_didIteratorError = !0, _iteratorError = err;
} finally {
try {
!_iteratorNormalCompletion && _iterator["return"] && _iterator["return"]();
} finally {
if (_didIteratorError) throw _iteratorError;
}
}
val = iterVal;
}
if (Object.getOwnPropertyNames(val).forEach(function(name) {
"__proto__" === name && (protod = !0), (!isFn || "arguments" !== name && "callee" !== name && "caller" !== name) && (result[name] = dehydrate(val[name], cleaned, [ name ]));
}), !protod && val.__proto__ && "Object" !== val.constructor.name) {
var newProto = {}, pIsFn = "function" == typeof val.__proto__;
Object.getOwnPropertyNames(val.__proto__).forEach(function(name) {
(!pIsFn || "arguments" !== name && "callee" !== name && "caller" !== name) && (newProto[name] = dehydrate(val.__proto__[name], protoclean, [ name ]));
}), proto = newProto;
}
}
this._wall.send({
type: "callback",
id: callback,
args: [ result, cleaned, proto, protoclean ]
});
}
} ]), Bridge;
}();
module.exports = Bridge;
}, function(module, exports, __webpack_require__) {
"use strict";
function hydrate(data, cleaned) {
cleaned.forEach(function(path) {
var last = path.pop(), obj = path.reduce(function(obj_, attr) {
return obj_ ? obj_[attr] : null;
}, data);
if (obj && obj[last]) {
var replace = {};
replace[consts.name] = obj[last].name, replace[consts.type] = obj[last].type, replace[consts.meta] = obj[last].meta,
replace[consts.inspected] = !1, obj[last] = replace;
}
});
}
var consts = __webpack_require__(187);
module.exports = hydrate;
}, function(module, exports) {
"use strict";
function getPropType(data) {
if (!data) return null;
var type = "undefined" == typeof data ? "undefined" : _typeof(data);
if ("object" === type) {
if (data._reactFragment) return "react_fragment";
if (Array.isArray(data)) return "array";
if (ArrayBuffer.isView(data)) return data instanceof DataView ? "data_view" : "typed_array";
if (data instanceof ArrayBuffer) return "array_buffer";
if ("function" == typeof data[Symbol.iterator]) return "iterator";
if ("[object Date]" === Object.prototype.toString.call(data)) return "date";
}
return type;
}
function createDehydrated(type, data, cleaned, path) {
var meta = {};
return "array" !== type && "typed_array" !== type || (meta.length = data.length),
"iterator" !== type && "typed_array" !== type || (meta.readOnly = !0), cleaned.push(path),
{
type: type,
meta: meta,
name: data.constructor && "Object" !== data.constructor.name ? data.constructor.name : ""
};
}
function dehydrate(data, cleaned) {
var path = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : [], level = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 0, type = getPropType(data);
switch (type) {
case "function":
return cleaned.push(path), {
name: data.name,
type: "function"
};
case "string":
return data.length <= 500 ? data : data.slice(0, 500) + "...";
case "symbol":
return cleaned.push(path), {
type: "symbol",
name: data.toString()
};
case "react_fragment":
return "A React Fragment";
case "array_buffer":
case "data_view":
return cleaned.push(path), {
type: type,
name: "data_view" === type ? "DataView" : "ArrayBuffer",
meta: {
length: data.byteLength,
uninspectable: !0
}
};
case "array":
return level > 2 ? createDehydrated(type, data, cleaned, path) : data.map(function(item, i) {
return dehydrate(item, cleaned, path.concat([ i ]), level + 1);
});
case "typed_array":
case "iterator":
return createDehydrated(type, data, cleaned, path);
case "date":
return cleaned.push(path), {
name: data.toString(),
type: "date",
meta: {
uninspectable: !0
}
};
case "object":
if (level > 2 || data.constructor && "function" == typeof data.constructor && "Object" !== data.constructor.name) return createDehydrated(type, data, cleaned, path);
var res = {};
for (var name in data) res[name] = dehydrate(data[name], cleaned, path.concat([ name ]), level + 1);
return res;
default:
return data;
}
}
var _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj) {
return typeof obj;
} : function(obj) {
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
module.exports = dehydrate;
}, function(module, exports) {
"use strict";
function _toConsumableArray(arr) {
if (Array.isArray(arr)) {
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
return arr2;
}
return Array.from(arr);
}
function getIn(base, path) {
return path.reduce(function(obj, attr) {
if (obj) {
if (obj.hasOwnProperty(attr)) return obj[attr];
if ("function" == typeof obj[Symbol.iterator]) return [].concat(_toConsumableArray(obj))[attr];
}
return null;
}, base);
}
module.exports = getIn;
}, function(module, exports, __webpack_require__) {
"use strict";
var performanceNow, performance = __webpack_require__(489);
performanceNow = performance.now ? function() {
return performance.now();
} : function() {
return Date.now();
}, module.exports = performanceNow;
}, function(module, exports, __webpack_require__) {
"use strict";
var performance, ExecutionEnvironment = __webpack_require__(490);
ExecutionEnvironment.canUseDOM && (performance = window.performance || window.msPerformance || window.webkitPerformance),
module.exports = performance || {};
}, function(module, exports) {
"use strict";
var canUseDOM = !("undefined" == typeof window || !window.document || !window.document.createElement), ExecutionEnvironment = {
canUseDOM: canUseDOM,
canUseWorkers: "undefined" != typeof Worker,
canUseEventListeners: canUseDOM && !(!window.addEventListener && !window.attachEvent),
canUseViewport: canUseDOM && !!window.screen,
isInWorker: !canUseDOM
};
module.exports = ExecutionEnvironment;
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
function shallowClone(obj) {
var nobj = {};
for (var n in obj) nobj[n] = obj[n];
return nobj;
}
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), React = __webpack_require__(6), StyleEdit = __webpack_require__(492), BoxInspector = __webpack_require__(494), NativeStyler = function(_React$Component) {
function NativeStyler(props) {
_classCallCheck(this, NativeStyler);
var _this = _possibleConstructorReturn(this, (NativeStyler.__proto__ || Object.getPrototypeOf(NativeStyler)).call(this, props));
return _this.state = {
style: null,
measuredLayout: null
}, _this;
}
return _inherits(NativeStyler, _React$Component), _createClass(NativeStyler, [ {
key: "componentWillMount",
value: function() {
var _this2 = this;
this._styleGet = this._styleGet.bind(this), this.props.supportsMeasure ? (this.props.bridge.on("rn-style:measure", this._styleGet),
this.props.bridge.send("rn-style:measure", this.props.id)) : this.props.bridge.call("rn-style:get", this.props.id, function(style) {
_this2.setState({
style: style
});
});
}
}, {
key: "componentWillUnmount",
value: function() {
this.props.supportsMeasure && this.props.bridge.off("rn-style:measure", this._styleGet);
}
}, {
key: "componentWillReceiveProps",
value: function(nextProps) {
var _this3 = this;
nextProps.id !== this.props.id && (this.setState({
style: null
}), this.props.bridge.send("rn-style:get", nextProps.id), this.props.supportsMeasure ? this.props.bridge.send("rn-style:measure", nextProps.id) : this.props.bridge.call("rn-style:get", nextProps.id, function(style) {
_this3.setState({
style: style
});
}));
}
}, {
key: "_styleGet",
value: function(result) {
var style = result.style, measuredLayout = result.measuredLayout;
this.setState({
style: style,
measuredLayout: measuredLayout
});
}
}, {
key: "_handleStyleChange",
value: function(attr, val) {
this.state.style && (this.state.style[attr] = val), this.props.bridge.send("rn-style:set", {
id: this.props.id,
attr: attr,
val: val
}), this.setState({
style: this.state.style
});
}
}, {
key: "_handleStyleRename",
value: function(oldName, newName, val) {
var style = shallowClone(this.state.style);
delete style[oldName], style[newName] = val, this.props.bridge.send("rn-style:rename", {
id: this.props.id,
oldName: oldName,
newName: newName,
val: val
}), this.setState({
style: style
});
}
}, {
key: "render",
value: function() {
return this.state.style ? React.createElement("div", {
style: styles.container
}, this.state.measuredLayout && React.createElement(BoxInspector, this.state.measuredLayout), React.createElement(StyleEdit, {
style: this.state.style,
onRename: this._handleStyleRename.bind(this),
onChange: this._handleStyleChange.bind(this)
})) : React.createElement("em", null, "loading");
}
} ]), NativeStyler;
}(React.Component), styles = {
container: {
display: "flex",
flexDirection: "column"
}
};
module.exports = NativeStyler;
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), React = __webpack_require__(6), AutoSizeInput = __webpack_require__(493), StyleEdit = function(_React$Component) {
function StyleEdit(props) {
_classCallCheck(this, StyleEdit);
var _this = _possibleConstructorReturn(this, (StyleEdit.__proto__ || Object.getPrototypeOf(StyleEdit)).call(this, props));
return _this.state = {
showNew: !1,
newAttr: "",
newValue: ""
}, _this;
}
return _inherits(StyleEdit, _React$Component), _createClass(StyleEdit, [ {
key: "onChange",
value: function(name, val) {
var num = Number(val);
this.props.onChange(name, num == val ? num : val);
}
}, {
key: "onNewSubmit",
value: function(val) {
this.onChange(this.state.newAttr, val), this.setState({
showNew: !1,
newAttr: "",
newValue: ""
});
}
}, {
key: "onNewAttr",
value: function(attr) {
"" === attr ? this.setState({
showNew: !1
}) : this.setState({
newAttr: "" + attr
});
}
}, {
key: "onListClick",
value: function(e) {
e.target instanceof Element && "INPUT" === e.target.tagName || this.setState({
showNew: !0
});
}
}, {
key: "render",
value: function() {
var _this2 = this, attrs = Object.keys(this.props.style);
return React.createElement("ul", {
style: styles.list,
onClick: function(e) {
return _this2.onListClick(e);
}
}, React.createElement("span", {
style: tagStyle(this.context.theme)
}, "style"), React.createElement("span", null, " {"), attrs.map(function(name) {
return React.createElement("li", {
key: "style-" + name,
style: styles.listItem,
onClick: blockClick
}, React.createElement(AutoSizeInput, {
type: "attr",
value: name,
onChange: function(newName) {
return _this2.props.onRename(name, "" + newName, _this2.props.style[name]);
}
}), React.createElement("span", {
style: styles.colon
}, ":"), React.createElement(AutoSizeInput, {
value: _this2.props.style[name],
onChange: function(val) {
return _this2.onChange(name, val);
}
}), React.createElement("span", {
style: styles.colon
}, ";"));
}), this.state.showNew && React.createElement("li", {
style: styles.listItem
}, React.createElement(AutoSizeInput, {
isNew: !0,
type: "attr",
value: this.state.newAttr,
onChange: function(newAttr) {
return _this2.onNewAttr(newAttr);
}
}), React.createElement("span", {
style: styles.colon
}, ":"), React.createElement(AutoSizeInput, {
value: "",
onChange: function(val) {
return _this2.onNewSubmit(val);
}
}), React.createElement("span", {
style: styles.colon
}, ";")), React.createElement("span", null, "}"));
}
} ]), StyleEdit;
}(React.Component);
StyleEdit.contextTypes = {
theme: React.PropTypes.object.isRequired
};
var blockClick = function(event) {
return event.stopPropagation();
}, tagStyle = function(theme) {
return {
color: theme.base04
};
}, styles = {
list: {
listStyle: "none",
padding: 0,
margin: "5px 0px",
cursor: "text"
},
colon: {
margin: "-3px"
},
listItem: {
margin: 0,
display: "flex",
alignItems: "center",
cursor: "default"
}
};
module.exports = StyleEdit;
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), React = __webpack_require__(6), _require = __webpack_require__(35), monospace = _require.monospace, Input = __webpack_require__(41), AutoSizeInput = function(_React$Component) {
function AutoSizeInput(props, context) {
_classCallCheck(this, AutoSizeInput);
var _this = _possibleConstructorReturn(this, (AutoSizeInput.__proto__ || Object.getPrototypeOf(AutoSizeInput)).call(this, props, context));
return _this.state = {
text: "" + _this.props.value,
inputWidth: 1
}, _this;
}
return _inherits(AutoSizeInput, _React$Component), _createClass(AutoSizeInput, [ {
key: "componentDidMount",
value: function() {
this.copyInputStyles(), this.updateInputWidth(), this.props.isNew && this.input.focus();
}
}, {
key: "componentDidUpdate",
value: function(prevProps, prevState) {
this.updateInputWidth();
}
}, {
key: "componentWillReceiveProps",
value: function(nextProps) {
this.setState({
text: "" + nextProps.value
});
}
}, {
key: "copyInputStyles",
value: function() {
if (window.getComputedStyle) {
var inputStyle = this.input && window.getComputedStyle(this.input);
if (inputStyle) {
var sizerNode = this.sizer;
sizerNode.style.fontSize = inputStyle.fontSize, sizerNode.style.fontFamily = inputStyle.fontFamily,
sizerNode.style.fontWeight = inputStyle.fontWeight, sizerNode.style.fontStyle = inputStyle.fontStyle,
sizerNode.style.letterSpacing = inputStyle.letterSpacing;
}
}
}
}, {
key: "updateInputWidth",
value: function() {
if (this.sizer && "undefined" != typeof this.sizer.scrollWidth) {
var width = this.sizer.scrollWidth + 1;
width !== this.state.inputWidth && this.setState({
inputWidth: width
});
}
}
}, {
key: "onKeyDown",
value: function(e) {
return "Enter" === e.key || "Escape" === e.key ? void this.done() : void ("ArrowUp" === e.key ? +this.state.text + "" === this.state.text && this.props.onChange(+this.state.text + 1) : "ArrowDown" === e.key && +this.state.text + "" === this.state.text && this.props.onChange(+this.state.text - 1));
}
}, {
key: "onFocus",
value: function() {
var theme = this.context.theme, input = this.input;
input.selectionStart = 0, input.selectionEnd = input.value.length, input.style.color = theme.base05,
input.style.boxShadow = "0 0 3px " + theme.base03, input.style.border = "1px solid " + theme.base03,
input.style.padding = "0px 1px";
}
}, {
key: "done",
value: function() {
var input = this.input;
input.style.color = this.getColor(), input.style.boxShadow = "none", input.style.border = "none",
input.style.padding = "1px 2px", (this.state.text !== "" + this.props.value || this.props.isNew) && this.props.onChange(this.state.text);
}
}, {
key: "getColor",
value: function() {
var theme = this.context.theme;
return "attr" === this.props.type ? theme.special06 : theme.base05;
}
}, {
key: "render",
value: function() {
var _this2 = this, style = inputStyle(this.state.text);
return style.color = this.getColor(), style.width = this.state.inputWidth + "px",
React.createElement("div", {
style: styles.wrapper
}, React.createElement(Input, {
innerRef: function(i) {
return _this2.input = i;
},
value: this.state.text,
style: style,
onChange: function(e) {
return _this2.setState({
text: e.target.value
});
},
onFocus: function() {
return _this2.onFocus();
},
onBlur: function() {
return _this2.done();
},
onKeyDown: function(e) {
return _this2.onKeyDown(e);
}
}), React.createElement("div", {
ref: function(el) {
return _this2.sizer = el;
},
style: styles.sizer
}, this.state.text));
}
} ]), AutoSizeInput;
}(React.Component);
AutoSizeInput.contextTypes = {
theme: React.PropTypes.object.isRequired
};
var inputStyle = function(text) {
return {
fontFamily: monospace.family,
fontSize: monospace.sizes.normal,
boxSizing: "content-box",
border: "none",
padding: "1px 2px",
marginLeft: "0.75rem",
outline: "none",
width: "0px",
minWidth: text ? "0" : "1rem"
};
}, styles = {
wrapper: {
display: "inline-block"
},
sizer: {
position: "absolute",
top: 0,
left: 0,
visibility: "hidden",
height: 0,
overflow: "scroll",
whiteSpace: "pre"
}
};
module.exports = AutoSizeInput;
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
}
return target;
}, _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), React = __webpack_require__(6), _require = __webpack_require__(35), sansSerif = _require.sansSerif, Box = function(props) {
var title = props.title, children = props.children, top = props.top, left = props.left, right = props.right, bottom = props.bottom, theme = props.theme;
return React.createElement("div", {
style: boxStyle(theme)
}, React.createElement("span", {
style: labelStyle(theme)
}, title), React.createElement("div", {
style: styles.boxText
}, +top.toFixed(3)), React.createElement("div", {
style: styles.row
}, React.createElement("span", {
style: styles.boxText
}, +left.toFixed(3)), children, React.createElement("span", {
style: styles.boxText
}, +right.toFixed(3))), React.createElement("div", {
style: styles.boxText
}, +bottom.toFixed(3)));
}, BoxInspector = function(_React$Component) {
function BoxInspector() {
return _classCallCheck(this, BoxInspector), _possibleConstructorReturn(this, (BoxInspector.__proto__ || Object.getPrototypeOf(BoxInspector)).apply(this, arguments));
}
return _inherits(BoxInspector, _React$Component), _createClass(BoxInspector, [ {
key: "render",
value: function() {
var theme = this.context.theme, _props = this.props, left = _props.left, top = _props.top, width = _props.width, height = _props.height, margin = _props.margin, padding = _props.padding;
return React.createElement(Box, _extends({
theme: theme,
title: "margin"
}, margin), React.createElement(Box, _extends({
theme: theme,
title: "padding"
}, padding), React.createElement("div", {
style: styles.measureLayout
}, React.createElement("span", {
style: positionTextStyle(theme)
}, "(", +left.toFixed(3), ", ", +top.toFixed(3), ")"), React.createElement("span", {
style: dimenTextStyle(theme)
}, +width.toFixed(3), " × ", +height.toFixed(3)))));
}
} ]), BoxInspector;
}(React.Component);
BoxInspector.contextTypes = {
theme: React.PropTypes.object.isRequired
};
var labelStyle = function(theme) {
return {
flex: 1,
color: theme.special03
};
}, positionTextStyle = function(theme) {
return {
color: theme.base03,
fontSize: sansSerif.sizes.normal,
textAlign: "center"
};
}, dimenTextStyle = function(theme) {
return {
color: theme.special02,
textAlign: "center"
};
}, boxStyle = function(theme) {
return {
position: "relative",
padding: 8,
margin: 8,
width: 184,
border: "1px dashed " + theme.base05,
alignItems: "center",
alignSelf: "center"
};
}, styles = {
row: {
display: "flex",
alignItems: "center",
justifyContent: "space-between"
},
measureLayout: {
display: "flex",
flexDirection: "column",
margin: 4
},
boxText: {
textAlign: "center"
}
};
module.exports = BoxInspector;
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), React = __webpack_require__(6), provideStore = __webpack_require__(496), RelayStore = __webpack_require__(497), QueriesTab = __webpack_require__(498), ElementPanel = __webpack_require__(503), StoreWrapper = provideStore("relayStore"), RelayPlugin = function() {
function RelayPlugin(store, bridge, refresh) {
var _this = this;
_classCallCheck(this, RelayPlugin), this.bridge = bridge, this.store = store, this.hasRelay = !1,
this.relayStore = new RelayStore(bridge, store), setTimeout(function() {
bridge.call("relay:check", [], function(hasRelay) {
_this.hasRelay = hasRelay, refresh();
});
}, 1e3);
}
return _createClass(RelayPlugin, [ {
key: "panes",
value: function() {
var _this2 = this;
return this.hasRelay ? [ function(node, id) {
return React.createElement(StoreWrapper, {
store: _this2.relayStore,
key: "relay"
}, function() {
return React.createElement(ElementPanel, {
node: node,
id: id
});
});
} ] : [];
}
}, {
key: "teardown",
value: function() {}
}, {
key: "tabs",
value: function() {
var _this3 = this;
return this.hasRelay ? {
Relay: function() {
return React.createElement(StoreWrapper, {
store: _this3.relayStore
}, function() {
return React.createElement(QueriesTab, null);
});
}
} : null;
}
} ]), RelayPlugin;
}();
module.exports = RelayPlugin;
}, function(module, exports, __webpack_require__) {
"use strict";
function _defineProperty(obj, key, value) {
return key in obj ? Object.defineProperty(obj, key, {
value: value,
enumerable: !0,
configurable: !0,
writable: !0
}) : obj[key] = value, obj;
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), React = __webpack_require__(6);
module.exports = function(name) {
var Wrapper = function(_React$Component) {
function Wrapper() {
return _classCallCheck(this, Wrapper), _possibleConstructorReturn(this, (Wrapper.__proto__ || Object.getPrototypeOf(Wrapper)).apply(this, arguments));
}
return _inherits(Wrapper, _React$Component), _createClass(Wrapper, [ {
key: "getChildContext",
value: function() {
return _defineProperty({}, name, this.props.store);
}
}, {
key: "render",
value: function() {
return this.props.children();
}
} ]), Wrapper;
}(React.Component);
return Wrapper.childContextTypes = _defineProperty({}, name, React.PropTypes.object),
Wrapper.displayName = "StoreProvider(" + name + ")", Wrapper;
};
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
function getDataIDs(obj) {
var collector = [];
return getDataIDsInternal(obj, collector), collector;
}
function getDataIDsInternal(obj, collector) {
for (var name in obj) "id" === name && "string" == typeof obj[name] ? collector.push(obj[name]) : "object" === _typeof(obj[name]) && getDataIDs(obj[name], collector);
}
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
}
return target;
}, _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj) {
return typeof obj;
} : function(obj) {
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
}, _require = __webpack_require__(478), EventEmitter = _require.EventEmitter, _require2 = __webpack_require__(218), OrderedMap = _require2.OrderedMap, Map = _require2.Map, assign = __webpack_require__(37), consts = __webpack_require__(187), invariant = __webpack_require__(213), Store = function(_EventEmitter) {
function Store(bridge, mainStore) {
_classCallCheck(this, Store);
var _this = _possibleConstructorReturn(this, (Store.__proto__ || Object.getPrototypeOf(Store)).call(this));
return _this.storeData = null, _this.storeDateSubscriptionCount = 0, _this.selectedQuery = null,
_this.queries = new OrderedMap(), _this._bridge = bridge, _this._mainStore = mainStore,
bridge.on("relay:store", function(data) {
_this.storeData = data, _this.emit("storeData");
}), _this.queriesByDataID = {}, bridge.on("relay:pending", function(pendingQueries) {
pendingQueries.forEach(function(pendingQuery) {
_this.queries = _this.queries.set(pendingQuery.id, new Map(_extends({}, pendingQuery, {
status: "pending",
text: pendingQuery.text.join("")
}))), _this.emit("queries"), _this.emit(pendingQuery.id), getDataIDs(pendingQuery.variables).forEach(function(id) {
_this.queriesByDataID[id] ? _this.queriesByDataID[id].push(pendingQuery.id) : _this.queriesByDataID[id] = [ pendingQuery.id ];
});
});
}), bridge.on("relay:success", function(_ref) {
var id = _ref.id, response = _ref.response, end = _ref.end;
_this.queries = _this.queries.mergeIn([ id ], new Map({
status: "success",
response: response,
end: end
})), _this.emit("queries"), _this.emit(id);
}), bridge.on("relay:failure", function(_ref2) {
var id = _ref2.id, error = _ref2.error, end = _ref2.end;
_this.queries = _this.queries.mergeIn([ id ], new Map({
status: "failure",
error: error,
end: end
})), _this.emit("queries"), _this.emit(id);
}), _this.dataIDsToNodes = {}, _this.nodesToDataIDs = {}, bridge.on("mount", function(data) {
if (data.props && (data.props.relay || 0 === data.name.indexOf("Relay("))) {
_this.nodesToDataIDs[data.id] = new window.Set();
for (var name in data.props) {
var id = data.props[name] && data.props[name].__dataID__;
id && (_this.dataIDsToNodes[id] || (_this.dataIDsToNodes[id] = new window.Set()),
_this.dataIDsToNodes[id].add(data.id), _this.nodesToDataIDs[data.id].add(id));
}
}
}), bridge.on("update", function(data) {
if (data.props && _this.nodesToDataIDs[data.id]) {
var newIds = new window.Set();
for (var name in data.props) {
var id = data.props[name] && data.props[name].__dataID__;
id && (newIds.add(id), _this.nodesToDataIDs[data.id].has(id) || (_this.dataIDsToNodes[id] || (_this.dataIDsToNodes[id] = new window.Set()),
_this.dataIDsToNodes[id].add(data.id)));
}
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
try {
for (var _step, _iterator = _this.nodesToDataIDs[data.id][Symbol.iterator](); !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
var item = _step.value;
newIds.has(item) || _this.dataIDsToNodes[item]["delete"](data.id);
}
} catch (err) {
_didIteratorError = !0, _iteratorError = err;
} finally {
try {
!_iteratorNormalCompletion && _iterator["return"] && _iterator["return"]();
} finally {
if (_didIteratorError) throw _iteratorError;
}
}
_this.nodesToDataIDs[id] = newIds;
}
}), bridge.on("unmount", function(id) {
if (_this.nodesToDataIDs[id]) {
var _iteratorNormalCompletion2 = !0, _didIteratorError2 = !1, _iteratorError2 = void 0;
try {
for (var _step2, _iterator2 = _this.nodesToDataIDs[id][Symbol.iterator](); !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = !0) {
var item = _step2.value;
_this.dataIDsToNodes[item]["delete"](id);
}
} catch (err) {
_didIteratorError2 = !0, _iteratorError2 = err;
} finally {
try {
!_iteratorNormalCompletion2 && _iterator2["return"] && _iterator2["return"]();
} finally {
if (_didIteratorError2) throw _iteratorError2;
}
}
_this.nodesToDataIDs[id] = null;
}
}), _this;
}
return _inherits(Store, _EventEmitter), _createClass(Store, [ {
key: "jumpToDataID",
value: function(dataID) {
this._mainStore.setSelectedTab("RelayStore"), this.selectedDataNode = dataID, this.emit("selectedDataNode");
}
}, {
key: "jumpToQuery",
value: function(queryID) {
this._mainStore.setSelectedTab("Relay"), this.selectedQuery = queryID, this.emit("selectedQuery"),
this.emit("queries");
}
}, {
key: "inspect",
value: function(id, path, cb) {
var _this2 = this;
this._bridge.inspect(id, path, function(value) {
var base;
"relay:store" === id ? (invariant(_this2.storeData, "RelayStore.inspect: this.storeData should be defined."),
base = _this2.storeData.nodes) : base = _this2.queries.get(id).get(path[0]);
var inspected = path.slice(1).reduce(function(obj, attr) {
return obj ? obj[attr] : null;
}, base);
inspected && (assign(inspected, value), inspected[consts.inspected] = !0), cb();
});
}
}, {
key: "on",
value: function(evt, fn) {
"storeData" === evt && (this.storeDateSubscriptionCount++, 1 === this.storeDateSubscriptionCount && this._bridge.call("relay:store:enable", [], function() {})),
this.addListener(evt, fn);
}
}, {
key: "off",
value: function(evt, fn) {
"storeData" === evt && (this.storeDateSubscriptionCount--, 0 === this.storeDateSubscriptionCount && this._bridge.call("relay:store:disable", [], function() {})),
this.removeListener(evt, fn);
}
}, {
key: "selectQuery",
value: function(id) {
this.selectedQuery = id, this.emit("selectedQuery");
}
} ]), Store;
}(EventEmitter);
module.exports = Store;
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), React = __webpack_require__(6), decorate = __webpack_require__(38), _require = __webpack_require__(35), sansSerif = _require.sansSerif, QueryList = __webpack_require__(499), QueryViewer = __webpack_require__(501), SplitPane = __webpack_require__(474), QueriesTab = function(_React$Component) {
function QueriesTab() {
return _classCallCheck(this, QueriesTab), _possibleConstructorReturn(this, (QueriesTab.__proto__ || Object.getPrototypeOf(QueriesTab)).apply(this, arguments));
}
return _inherits(QueriesTab, _React$Component), _createClass(QueriesTab, [ {
key: "render",
value: function() {
var contents;
return contents = this.props.isSplit ? React.createElement(SplitPane, {
initialWidth: 500,
initialHeight: 500,
left: function() {
return React.createElement(QueryList, null);
},
right: function() {
return React.createElement(QueryViewer, null);
},
isVertical: !1
}) : React.createElement(QueryList, null), React.createElement("div", {
style: styles.container
}, contents);
}
} ]), QueriesTab;
}(React.Component), styles = {
container: {
fontFamily: sansSerif.family,
fontSize: sansSerif.sizes.normal,
flex: 1,
display: "flex"
}
};
module.exports = decorate({
store: "relayStore",
listeners: function() {
return [ "selectedQuery" ];
},
props: function(store) {
return {
isSplit: !!store.selectedQuery
};
}
}, QueriesTab);
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), React = __webpack_require__(6), decorate = __webpack_require__(38), _require = __webpack_require__(35), sansSerif = _require.sansSerif, Query = __webpack_require__(500), QueryList = function(_React$Component) {
function QueryList() {
return _classCallCheck(this, QueryList), _possibleConstructorReturn(this, (QueryList.__proto__ || Object.getPrototypeOf(QueryList)).apply(this, arguments));
}
return _inherits(QueryList, _React$Component), _createClass(QueryList, [ {
key: "render",
value: function() {
var _this2 = this;
if (!this.props.queries.count()) return React.createElement("div", {
style: styles.empty
}, "No Relay Queries logged");
var rows = [], odd = !1, lastRequestNumber = -1;
return this.props.queries.forEach(function(query) {
var requestNumber = query.get("requestNumber");
lastRequestNumber !== requestNumber && (lastRequestNumber = requestNumber, rows.push(React.createElement("tr", {
key: "request" + requestNumber
}, React.createElement("td", {
colSpan: "4",
style: styles.grouper
}, "Request ", requestNumber))), odd = !1), rows.push(React.createElement(Query, {
data: query,
isSelected: query.get("id") === _this2.props.selectedQuery,
key: query.get("id"),
oddRow: odd,
onSelect: function() {
return _this2.props.selectQuery(query.get("id"));
}
})), odd = !odd;
}), React.createElement("div", {
style: styles.container
}, React.createElement("table", {
style: styles.table
}, React.createElement("tbody", null, rows)));
}
} ]), QueryList;
}(React.Component), styles = {
container: {
position: "relative",
flex: 1,
overflow: "scroll"
},
table: {
flex: 1,
borderCollapse: "collapse",
width: "100%"
},
grouper: {
fontWeight: "bold",
fontSize: sansSerif.sizes.normal
},
empty: {
flex: 1,
padding: 50,
textAlign: "center"
}
};
module.exports = decorate({
store: "relayStore",
listeners: function() {
return [ "queries", "selectedQuery" ];
},
props: function(store, _props) {
return {
queries: store.queries,
selectQuery: function(id) {
return store.selectQuery(id);
},
selectedQuery: store.selectedQuery
};
}
}, QueryList);
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
}
return target;
}, _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), _require = __webpack_require__(35), sansSerif = _require.sansSerif, React = __webpack_require__(6), Query = function(_React$Component) {
function Query() {
return _classCallCheck(this, Query), _possibleConstructorReturn(this, (Query.__proto__ || Object.getPrototypeOf(Query)).apply(this, arguments));
}
return _inherits(Query, _React$Component), _createClass(Query, [ {
key: "render",
value: function() {
var theme = this.context.theme, data = this.props.data, containerStyle = baseContainer;
this.props.isSelected ? containerStyle = containerSelectedStyle(theme) : this.props.oddRow && (containerStyle = containeroOddRowStyle(theme));
var status = data.get("status"), start = data.get("start"), end = data.get("end");
return React.createElement("tr", {
onClick: this.props.onSelect,
style: containerStyle
}, React.createElement("td", {
style: tdFirstStyle(theme)
}, React.createElement("span", {
style: statusStyle(status, theme),
title: status
})), React.createElement("td", {
style: tdNameStyle(theme)
}, data.get("name")), React.createElement("td", {
style: baseTDStyle(theme)
}, Math.round(start) / 1e3, "s"), React.createElement("td", {
style: baseTDStyle(theme)
}, Math.round(end - start), "ms"));
}
} ]), Query;
}(React.Component);
Query.contextTypes = {
theme: React.PropTypes.object.isRequired
};
var baseContainer = {
cursor: "pointer",
fontSize: sansSerif.sizes.normal,
height: 21,
lineHeight: "21px",
fontFamily: sansSerif.family
}, baseTDStyle = function(theme) {
return {
whiteSpace: "nowrap",
padding: "1px 4px",
lineHeight: "17px",
borderLeft: "1px solid " + theme.base01
};
}, tdFirstStyle = function(theme) {
return _extends({}, baseTDStyle(theme), {
borderLeft: ""
});
}, tdNameStyle = function(theme) {
return _extends({}, baseTDStyle(theme), {
width: "100%"
});
}, containeroOddRowStyle = function(theme) {
return _extends({}, baseContainer, {
backgroundColor: theme.base01
});
}, containerSelectedStyle = function(theme) {
return _extends({}, baseContainer, {
backgroundColor: theme.state00,
color: theme.base04
});
}, statusColors = {
pending: "orange",
success: "green",
failure: "red",
error: "#aaa"
}, statusStyle = function(status) {
return {
display: "inline-block",
width: 11,
height: 11,
borderRadius: 6,
backgroundColor: statusColors[status] || statusColors.error
};
};
module.exports = Query;
}, function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), _DataView = __webpack_require__(42), _DataView2 = _interopRequireDefault(_DataView), _DetailPane = __webpack_require__(207), _DetailPane2 = _interopRequireDefault(_DetailPane), _DetailPaneSection = __webpack_require__(208), _DetailPaneSection2 = _interopRequireDefault(_DetailPaneSection), _Fonts = __webpack_require__(35), _react = __webpack_require__(6), _react2 = _interopRequireDefault(_react), _decorate = __webpack_require__(38), _decorate2 = _interopRequireDefault(_decorate), _tidyGraphQL = __webpack_require__(502), _tidyGraphQL2 = _interopRequireDefault(_tidyGraphQL), QueryViewer = function(_React$Component) {
function QueryViewer() {
return _classCallCheck(this, QueryViewer), _possibleConstructorReturn(this, (QueryViewer.__proto__ || Object.getPrototypeOf(QueryViewer)).apply(this, arguments));
}
return _inherits(QueryViewer, _React$Component), _createClass(QueryViewer, [ {
key: "render",
value: function() {
var data = this.props.data, status = data.get("status"), resultBlock = null;
"success" === status ? resultBlock = _react2["default"].createElement(_DetailPaneSection2["default"], {
title: "Response"
}, _react2["default"].createElement(_DataView2["default"], {
data: data.get("response"),
readOnly: !0,
showMenu: !1,
inspect: this.props.inspect,
path: [ "response" ]
})) : "failure" === status && (resultBlock = _react2["default"].createElement(_DetailPaneSection2["default"], {
title: "Error"
}, _react2["default"].createElement(_DataView2["default"], {
data: data.get("error"),
readOnly: !0,
showMenu: !1,
inspect: this.props.inspect,
path: [ "error" ]
})));
var start = data.get("start"), end = data.get("end");
return _react2["default"].createElement(_DetailPane2["default"], {
header: data.get("type") + ": " + data.get("name")
}, _react2["default"].createElement(_DetailPaneSection2["default"], {
title: "Start"
}, _react2["default"].createElement("div", null, Math.round(start) / 1e3, "s since page load")), _react2["default"].createElement(_DetailPaneSection2["default"], {
title: "Status"
}, _react2["default"].createElement("div", null, status)), _react2["default"].createElement(_DetailPaneSection2["default"], {
title: "Duration"
}, _react2["default"].createElement("div", null, Math.round(end - start), "ms")), _react2["default"].createElement(_DetailPaneSection2["default"], {
title: "Query"
}, _react2["default"].createElement("div", {
style: styles.query
}, (0, _tidyGraphQL2["default"])(data.get("text")))), _react2["default"].createElement(_DetailPaneSection2["default"], {
title: "Variables"
}, _react2["default"].createElement(_DataView2["default"], {
data: data.get("variables"),
readOnly: !0,
showMenu: !1,
inspect: this.props.inspect,
path: [ "variables" ]
})), resultBlock);
}
} ]), QueryViewer;
}(_react2["default"].Component), styles = {
query: {
cursor: "text",
fontFamily: _Fonts.monospace.family,
fontSize: _Fonts.monospace.sizes.normal,
userSelect: "text",
MozUserSelect: "text",
WebkitUserSelect: "text",
whiteSpace: "pre",
wordWrap: "break-word"
}
};
module.exports = (0, _decorate2["default"])({
store: "relayStore",
listeners: function(props, store) {
return [ "selectedQuery", store.selectedQuery ];
},
props: function(store) {
return {
data: store.queries.get(store.selectedQuery),
inspect: store.inspect.bind(store, store.selectedQuery)
};
}
}, QueryViewer);
}, function(module, exports) {
"use strict";
function tidyGraphQL(input) {
for (var indent = "", lastWasNewline = !1, parenCount = 0, line = "", head = [], stack = [ head ], i = 0; i < input.length; i++) {
var c = input.charAt(i);
if ("(" == c ? parenCount++ : ")" == c && parenCount--, "{" == c) indent += " ",
lastWasNewline = !0, head.push(line + "{"), line = indent, head = [], stack.push(head); else if ("," == c && 0 == parenCount) head.push(line),
lastWasNewline = !0, line = indent; else if ("}" == c) indent = indent.substr(2),
head.push(line.replace(/ +$/, "")), head.sort(), line = head.join(",\n"), stack.pop(),
head = stack[stack.length - 1], line = head.pop() + "\n" + line + "\n" + indent + "}"; else {
if (" " == c && lastWasNewline) continue;
" " != c && i + 1 < input.length && "{" == input.charAt(i + 1) ? line += c + " " : (lastWasNewline = !1,
line += c);
}
}
return line.replace(/^} /gm, "}\n\n");
}
module.exports = tidyGraphQL;
}, function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
function _possibleConstructorReturn(self, call) {
if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !call || "object" != typeof call && "function" != typeof call ? self : call;
}
function _inherits(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: !1,
writable: !0,
configurable: !0
}
}), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
}
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), React = __webpack_require__(6), decorate = __webpack_require__(38), ElementPanel = function(_React$Component) {
function ElementPanel() {
return _classCallCheck(this, ElementPanel), _possibleConstructorReturn(this, (ElementPanel.__proto__ || Object.getPrototypeOf(ElementPanel)).apply(this, arguments));
}
return _inherits(ElementPanel, _React$Component), _createClass(ElementPanel, [ {
key: "render",
value: function() {
var _this2 = this;
if (!this.props.dataIDs.length) return React.createElement("span", null);
var theme = this.context.theme;
return React.createElement("div", null, "Relay Nodes", React.createElement("ul", {
style: styles.dataIDs
}, this.props.dataIDs.map(function(_ref) {
var id = _ref.id, queries = _ref.queries;
return React.createElement("li", {
style: dataNodeStyle(theme)
}, React.createElement("div", {
style: dataIDStyle(theme),
onClick: function() {
return _this2.props.jumpToData(id);
}
}, "ID: ", id), React.createElement("ul", {
style: styles.queries
}, queries.map(function(query) {
return React.createElement("li", {
style: styles.queryID,
onClick: function() {
var queryID = query.get("id");
queryID && _this2.props.jumpToQuery(queryID);
}
}, query.get("name"));
}), !queries.length && React.createElement("li", {
style: noQueriesStyle(theme)
}, "No Queries")));
})));
}
} ]), ElementPanel;
}(React.Component);
ElementPanel.contextTypes = {
theme: React.PropTypes.object.isRequired
};
var dataNodeStyle = function(theme) {
return {
marginBottom: 5,
border: "1px solid " + theme.base02
};
}, dataIDStyle = function(theme) {
return {
cursor: "pointer",
padding: "2px 4px",
backgroundColor: theme.base02
};
}, noQueriesStyle = function(theme) {
return {
color: theme.base03,
padding: "2px 4px"
};
}, styles = {
dataIDs: {
listStyle: "none",
padding: 0,
margin: 0
},
queries: {
listStyle: "none",
padding: 0,
margin: 0
},
queryID: {
cursor: "pointer",
padding: "2px 4px"
}
};
module.exports = decorate({
store: "relayStore",
listeners: function(props, store) {
return [ props.id ];
},
shouldUpdate: function(props, prevProps) {
return props.id !== prevProps.id;
},
props: function(store, _props) {
var dataIDs = [];
if (store.nodesToDataIDs[_props.id]) {
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
try {
for (var _step, _iterator = store.nodesToDataIDs[_props.id][Symbol.iterator](); !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
var id = _step.value;
dataIDs.push({
id: id,
queries: (store.queriesByDataID[id] || []).map(function(qid) {
return store.queries.get(qid);
})
});
}
} catch (err) {
_didIteratorError = !0, _iteratorError = err;
} finally {
try {
!_iteratorNormalCompletion && _iterator["return"] && _iterator["return"]();
} finally {
if (_didIteratorError) throw _iteratorError;
}
}
}
return {
dataIDs: dataIDs,
jumpToData: function(dataID) {
return store.jumpToDataID(dataID);
},
jumpToQuery: function(queryID) {
return store.jumpToQuery(queryID);
}
};
}
}, ElementPanel);
}, function(module, exports, __webpack_require__) {
"use strict";
function _toArray(arr) {
return Array.isArray(arr) ? arr : Array.from(arr);
}
function isTerminalEditor(editor) {
switch (editor) {
case "vim":
case "emacs":
case "nano":
return !0;
}
return !1;
}
function getArgumentsForLineNumber(editor, filePath, lineNumber) {
switch (path.basename(editor)) {
case "vim":
case "mvim":
return [ filePath, "+" + lineNumber ];
case "atom":
case "Atom":
case "Atom Beta":
case "subl":
case "sublime":
case "wstorm":
case "appcode":
case "charm":
case "idea":
return [ filePath + ":" + lineNumber ];
case "joe":
case "emacs":
case "emacsclient":
return [ "+" + lineNumber, filePath ];
case "rmate":
case "mate":
case "mine":
return [ "--line", lineNumber, filePath ];
case "code":
return [ "-g", filePath + ":" + lineNumber ];
}
return [ filePath ];
}
function guessEditor() {
if (process.env.REACT_EDITOR) return shellQuote.parse(process.env.REACT_EDITOR);
if ("darwin" === process.platform) try {
for (var output = child_process.execSync("ps x").toString(), processNames = Object.keys(COMMON_EDITORS), i = 0; i < processNames.length; i++) {
var processName = processNames[i];
if (output.indexOf(processName) !== -1) return [ COMMON_EDITORS[processName] ];
}
} catch (error) {}
return process.env.VISUAL ? [ process.env.VISUAL ] : process.env.EDITOR ? [ process.env.EDITOR ] : [];
}
function launchEditor(maybeRelativePath, lineNumber, absoluteProjectRoots) {
var filePath = [ maybeRelativePath ].concat(absoluteProjectRoots.map(function(root) {
return path.join(root, maybeRelativePath);
})).find(function(combinedPath) {
return fs.existsSync(combinedPath);
});
if (filePath && (!lineNumber || !isNaN(lineNumber))) {
var _guessEditor = guessEditor(), _guessEditor2 = _toArray(_guessEditor), editor = _guessEditor2[0], args = _guessEditor2.slice(1);
editor && (lineNumber ? args = args.concat(getArgumentsForLineNumber(editor, filePath, lineNumber)) : args.push(filePath),
_childProcess && isTerminalEditor(editor) && _childProcess.kill("SIGKILL"), _childProcess = "win32" === process.platform ? child_process.spawn("cmd.exe", [ "/C", editor ].concat(args), {
stdio: "inherit"
}) : child_process.spawn(editor, args, {
stdio: "inherit"
}), _childProcess.on("error", function() {}), _childProcess.on("exit", function(errorCode) {
_childProcess = null;
}));
}
}
var fs = __webpack_require__(2), path = __webpack_require__(3), child_process = __webpack_require__(505), shellQuote = __webpack_require__(506), COMMON_EDITORS = {
"/Applications/Atom.app/Contents/MacOS/Atom": "atom",
"/Applications/Atom Beta.app/Contents/MacOS/Atom Beta": "/Applications/Atom Beta.app/Contents/MacOS/Atom Beta",
"/Applications/Sublime Text.app/Contents/MacOS/Sublime Text": "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl",
"/Applications/Sublime Text 2.app/Contents/MacOS/Sublime Text 2": "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl",
"/Applications/Visual Studio Code.app/Contents/MacOS/Electron": "code"
}, _childProcess = null;
module.exports = launchEditor;
}, function(module, exports) {
module.exports = require("child_process");
}, function(module, exports, __webpack_require__) {
function parse(s, env, opts) {
function getVar(_, pre, key) {
var r = "function" == typeof env ? env(key) : env[key];
return void 0 === r && (r = ""), "object" == typeof r ? pre + TOKEN + json.stringify(r) + TOKEN : pre + r;
}
var chunker = new RegExp([ "(" + CONTROL + ")", "(" + BAREWORD + "|" + SINGLE_QUOTE + "|" + DOUBLE_QUOTE + ")*" ].join("|"), "g"), match = filter(s.match(chunker), Boolean), commented = !1;
return match ? (env || (env = {}), opts || (opts = {}), map(match, function(s, j) {
function parseEnvVar() {
i += 1;
var varend, varname;
if ("{" === s.charAt(i)) {
if (i += 1, "}" === s.charAt(i)) throw new Error("Bad substitution: " + s.substr(i - 2, 3));
if (varend = s.indexOf("}", i), varend < 0) throw new Error("Bad substitution: " + s.substr(i));
varname = s.substr(i, varend - i), i = varend;
} else /[*@#?$!_\-]/.test(s.charAt(i)) ? (varname = s.charAt(i), i += 1) : (varend = s.substr(i).match(/[^\w\d_]/),
varend ? (varname = s.substr(i, varend.index), i += varend.index - 1) : (varname = s.substr(i),
i = s.length));
return getVar(null, "", varname);
}
if (!commented) {
if (RegExp("^" + CONTROL + "$").test(s)) return {
op: s
};
for (var SQ = "'", DQ = '"', DS = "$", BS = opts.escape || "\\", quote = !1, esc = !1, out = "", isGlob = !1, i = 0, len = s.length; i < len; i++) {
var c = s.charAt(i);
if (isGlob = isGlob || !quote && ("*" === c || "?" === c), esc) out += c, esc = !1; else if (quote) c === quote ? quote = !1 : quote == SQ ? out += c : c === BS ? (i += 1,
c = s.charAt(i), out += c === DQ || c === BS || c === DS ? c : BS + c) : out += c === DS ? parseEnvVar() : c; else if (c === DQ || c === SQ) quote = c; else {
if (RegExp("^" + CONTROL + "$").test(c)) return {
op: s
};
if (RegExp("^#$").test(c)) return commented = !0, out.length ? [ out, {
comment: s.slice(i + 1) + match.slice(j + 1).join(" ")
} ] : [ {
comment: s.slice(i + 1) + match.slice(j + 1).join(" ")
} ];
c === BS ? esc = !0 : out += c === DS ? parseEnvVar() : c;
}
}
return isGlob ? {
op: "glob",
pattern: out
} : out;
}
}).reduce(function(prev, arg) {
return void 0 === arg ? prev : prev.concat(arg);
}, [])) : [];
}
var json = void 0 !== typeof JSON ? JSON : __webpack_require__(507), map = __webpack_require__(510), filter = __webpack_require__(511), reduce = __webpack_require__(512);
exports.quote = function(xs) {
return map(xs, function(s) {
return s && "object" == typeof s ? s.op.replace(/(.)/g, "\\$1") : /["\s]/.test(s) && !/'/.test(s) ? "'" + s.replace(/(['\\])/g, "\\$1") + "'" : /["'\s]/.test(s) ? '"' + s.replace(/(["\\$`!])/g, "\\$1") + '"' : String(s).replace(/([#!"$&'()*,:;<=>?@\[\\\]^`{|}])/g, "\\$1");
}).join(" ");
};
for (var CONTROL = "(?:" + [ "\\|\\|", "\\&\\&", ";;", "\\|\\&", "[&;()|<>]" ].join("|") + ")", META = "|&;()<> \\t", BAREWORD = "(\\\\['\"" + META + "]|[^\\s'\"" + META + "])+", SINGLE_QUOTE = '"((\\\\"|[^"])*?)"', DOUBLE_QUOTE = "'((\\\\'|[^'])*?)'", TOKEN = "", i = 0; i < 4; i++) TOKEN += (Math.pow(16, 8) * Math.random()).toString(16);
exports.parse = function(s, env, opts) {
var mapped = parse(s, env, opts);
return "function" != typeof env ? mapped : reduce(mapped, function(acc, s) {
if ("object" == typeof s) return acc.concat(s);
var xs = s.split(RegExp("(" + TOKEN + ".*?" + TOKEN + ")", "g"));
return 1 === xs.length ? acc.concat(xs[0]) : acc.concat(map(filter(xs, Boolean), function(x) {
return RegExp("^" + TOKEN).test(x) ? json.parse(x.split(TOKEN)[1]) : x;
}));
}, []);
};
}, function(module, exports, __webpack_require__) {
exports.parse = __webpack_require__(508), exports.stringify = __webpack_require__(509);
}, function(module, exports) {
var at, ch, text, value, escapee = {
'"': '"',
"\\": "\\",
"/": "/",
b: "\b",
f: "\f",
n: "\n",
r: "\r",
t: "\t"
}, error = function(m) {
throw {
name: "SyntaxError",
message: m,
at: at,
text: text
};
}, next = function(c) {
return c && c !== ch && error("Expected '" + c + "' instead of '" + ch + "'"), ch = text.charAt(at),
at += 1, ch;
}, number = function() {
var number, string = "";
for ("-" === ch && (string = "-", next("-")); ch >= "0" && ch <= "9"; ) string += ch,
next();
if ("." === ch) for (string += "."; next() && ch >= "0" && ch <= "9"; ) string += ch;
if ("e" === ch || "E" === ch) for (string += ch, next(), "-" !== ch && "+" !== ch || (string += ch,
next()); ch >= "0" && ch <= "9"; ) string += ch, next();
return number = +string, isFinite(number) ? number : void error("Bad number");
}, string = function() {
var hex, i, uffff, string = "";
if ('"' === ch) for (;next(); ) {
if ('"' === ch) return next(), string;
if ("\\" === ch) if (next(), "u" === ch) {
for (uffff = 0, i = 0; i < 4 && (hex = parseInt(next(), 16), isFinite(hex)); i += 1) uffff = 16 * uffff + hex;
string += String.fromCharCode(uffff);
} else {
if ("string" != typeof escapee[ch]) break;
string += escapee[ch];
} else string += ch;
}
error("Bad string");
}, white = function() {
for (;ch && ch <= " "; ) next();
}, word = function() {
switch (ch) {
case "t":
return next("t"), next("r"), next("u"), next("e"), !0;
case "f":
return next("f"), next("a"), next("l"), next("s"), next("e"), !1;
case "n":
return next("n"), next("u"), next("l"), next("l"), null;
}
error("Unexpected '" + ch + "'");
}, array = function() {
var array = [];
if ("[" === ch) {
if (next("["), white(), "]" === ch) return next("]"), array;
for (;ch; ) {
if (array.push(value()), white(), "]" === ch) return next("]"), array;
next(","), white();
}
}
error("Bad array");
}, object = function() {
var key, object = {};
if ("{" === ch) {
if (next("{"), white(), "}" === ch) return next("}"), object;
for (;ch; ) {
if (key = string(), white(), next(":"), Object.hasOwnProperty.call(object, key) && error('Duplicate key "' + key + '"'),
object[key] = value(), white(), "}" === ch) return next("}"), object;
next(","), white();
}
}
error("Bad object");
};
value = function() {
switch (white(), ch) {
case "{":
return object();
case "[":
return array();
case '"':
return string();
case "-":
return number();
default:
return ch >= "0" && ch <= "9" ? number() : word();
}
}, module.exports = function(source, reviver) {
var result;
return text = source, at = 0, ch = " ", result = value(), white(), ch && error("Syntax error"),
"function" == typeof reviver ? function walk(holder, key) {
var k, v, value = holder[key];
if (value && "object" == typeof value) for (k in value) Object.prototype.hasOwnProperty.call(value, k) && (v = walk(value, k),
void 0 !== v ? value[k] = v : delete value[k]);
return reviver.call(holder, key, value);
}({
"": result
}, "") : result;
};
}, function(module, exports) {
function quote(string) {
return escapable.lastIndex = 0, escapable.test(string) ? '"' + string.replace(escapable, function(a) {
var c = meta[a];
return "string" == typeof c ? c : "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4);
}) + '"' : '"' + string + '"';
}
function str(key, holder) {
var i, k, v, length, partial, mind = gap, value = holder[key];
switch (value && "object" == typeof value && "function" == typeof value.toJSON && (value = value.toJSON(key)),
"function" == typeof rep && (value = rep.call(holder, key, value)), typeof value) {
case "string":
return quote(value);
case "number":
return isFinite(value) ? String(value) : "null";
case "boolean":
case "null":
return String(value);
case "object":
if (!value) return "null";
if (gap += indent, partial = [], "[object Array]" === Object.prototype.toString.apply(value)) {
for (length = value.length, i = 0; i < length; i += 1) partial[i] = str(i, value) || "null";
return v = 0 === partial.length ? "[]" : gap ? "[\n" + gap + partial.join(",\n" + gap) + "\n" + mind + "]" : "[" + partial.join(",") + "]",
gap = mind, v;
}
if (rep && "object" == typeof rep) for (length = rep.length, i = 0; i < length; i += 1) k = rep[i],
"string" == typeof k && (v = str(k, value), v && partial.push(quote(k) + (gap ? ": " : ":") + v)); else for (k in value) Object.prototype.hasOwnProperty.call(value, k) && (v = str(k, value),
v && partial.push(quote(k) + (gap ? ": " : ":") + v));
return v = 0 === partial.length ? "{}" : gap ? "{\n" + gap + partial.join(",\n" + gap) + "\n" + mind + "}" : "{" + partial.join(",") + "}",
gap = mind, v;
}
}
var gap, indent, rep, escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, meta = {
"\b": "\\b",
"\t": "\\t",
"\n": "\\n",
"\f": "\\f",
"\r": "\\r",
'"': '\\"',
"\\": "\\\\"
};
module.exports = function(value, replacer, space) {
var i;
if (gap = "", indent = "", "number" == typeof space) for (i = 0; i < space; i += 1) indent += " "; else "string" == typeof space && (indent = space);
if (rep = replacer, replacer && "function" != typeof replacer && ("object" != typeof replacer || "number" != typeof replacer.length)) throw new Error("JSON.stringify");
return str("", {
"": value
});
};
}, function(module, exports) {
module.exports = function(xs, f) {
if (xs.map) return xs.map(f);
for (var res = [], i = 0; i < xs.length; i++) {
var x = xs[i];
hasOwn.call(xs, i) && res.push(f(x, i, xs));
}
return res;
};
var hasOwn = Object.prototype.hasOwnProperty;
}, function(module, exports) {
module.exports = function(arr, fn) {
if (arr.filter) return arr.filter(fn);
for (var ret = [], i = 0; i < arr.length; i++) hasOwn.call(arr, i) && fn(arr[i], i, arr) && ret.push(arr[i]);
return ret;
};
var hasOwn = Object.prototype.hasOwnProperty;
}, function(module, exports) {
var hasOwn = Object.prototype.hasOwnProperty;
module.exports = function(xs, f, acc) {
var hasAcc = arguments.length >= 3;
if (hasAcc && xs.reduce) return xs.reduce(f, acc);
if (xs.reduce) return xs.reduce(f);
for (var i = 0; i < xs.length; i++) hasOwn.call(xs, i) && (hasAcc ? acc = f(acc, xs[i], i) : (acc = xs[i],
hasAcc = !0));
return acc;
};
}, function(module, exports) {
module.exports = require("http");
} ]);
//# sourceMappingURL=standalone.js.map