summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrique Joaquim <henriquecjoaquim@gmail.com>2024-04-09 09:04:04 +0100
committerGitHub <noreply@github.com>2024-04-09 08:04:04 +0000
commit153723d465144905a0b8b403718ba5144a40f493 (patch)
tree3a14604403c59a9163471674f0c2cefcca6fe4c5
parent40c89444cd774e8261452c8732ababf9197d7eb9 (diff)
[Feature] Adding interactive tables (#6290)
* fix table html for charting extension * handling tables * fixes and maing linting happy * reset index and route as default title * drop "index" column and temp workaround for "provider" column that breaks charts. * text overload * only drop range index * better to do it on table.html --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com>
-rw-r--r--openbb_platform/obbject_extensions/charting/openbb_charting/__init__.py94
-rw-r--r--openbb_platform/obbject_extensions/charting/openbb_charting/core/table.html2319
2 files changed, 316 insertions, 2097 deletions
diff --git a/openbb_platform/obbject_extensions/charting/openbb_charting/__init__.py b/openbb_platform/obbject_extensions/charting/openbb_charting/__init__.py
index ac585fefada..ca03b8658b6 100644
--- a/openbb_platform/obbject_extensions/charting/openbb_charting/__init__.py
+++ b/openbb_platform/obbject_extensions/charting/openbb_charting/__init__.py
@@ -6,8 +6,10 @@ from typing import (
Dict,
List,
Optional,
+ Tuple,
Union,
)
+from warnings import warn
import numpy as np
import pandas as pd
@@ -17,6 +19,7 @@ from openbb_core.app.utils import basemodel_to_df, convert_to_basemodel
from openbb_core.provider.abstract.data import Data
from openbb_charting import charting_router
+from openbb_charting.core.backend import Backend, create_backend, get_backend
from openbb_charting.core.to_chart import ChartIndicators, to_chart
from openbb_charting.utils.helpers import get_charting_functions
@@ -51,7 +54,7 @@ class Charting:
user_settings=self._obbject._user_settings, # type: ignore
system_settings=self._obbject._system_settings, # type: ignore
)
- self._handle_backend()
+ self._backend: Backend = self._handle_backend()
@classmethod
def indicators(cls):
@@ -63,12 +66,12 @@ class Charting:
"""Returns a list of the available functions."""
return get_charting_functions()
- def _handle_backend(self):
- # pylint: disable=import-outside-toplevel
- from openbb_charting.core.backend import create_backend, get_backend
-
+ def _handle_backend(self) -> Backend:
+ """Handles backend initialization."""
create_backend(self._charting_settings)
- get_backend().start(debug=self._charting_settings.debug_mode)
+ backend = get_backend()
+ backend.start(debug=self._charting_settings.debug_mode)
+ return backend
@staticmethod
def _get_chart_function(route: str) -> Callable:
@@ -100,6 +103,28 @@ class Charting:
if render:
fig.show(**kwargs)
+ def _prepare_data_as_df(
+ self, data: Optional[Union[pd.DataFrame, pd.Series]]
+ ) -> Tuple[pd.DataFrame, bool]:
+ has_data = (isinstance(data, (pd.DataFrame, pd.Series)) and not data.empty) or (
+ bool(data)
+ )
+ index = (
+ data.index.name
+ if has_data and isinstance(data, (pd.DataFrame, pd.Series))
+ else None
+ )
+ data_as_df: pd.DataFrame = (
+ basemodel_to_df(convert_to_basemodel(data), index=index)
+ if has_data
+ else self._obbject.to_dataframe()
+ )
+ if "date" in data_as_df.columns:
+ data_as_df = data_as_df.set_index("date")
+ if "provider" in data_as_df.columns:
+ data_as_df.drop(columns="provider", inplace=True)
+ return data_as_df, has_data
+
# pylint: disable=too-many-arguments
def to_chart(
self,
@@ -173,21 +198,7 @@ class Charting:
> from openbb_charting import Charting
> Charting.indicators()
"""
- has_data = (isinstance(data, (pd.DataFrame, pd.Series)) and not data.empty) or (
- data
- )
- index = (
- data.index.name
- if has_data and isinstance(data, (pd.DataFrame, pd.Series))
- else None
- )
- data_as_df: pd.DataFrame = (
- basemodel_to_df(convert_to_basemodel(data), index=index)
- if has_data
- else self._obbject.to_dataframe()
- )
- if "date" in data_as_df.columns:
- data_as_df = data_as_df.set_index("date")
+ data_as_df, has_data = self._prepare_data_as_df(data)
try:
fig, content = to_chart(
data_as_df,
@@ -212,3 +223,44 @@ class Charting:
self.show(**kwargs)
except Exception as e:
raise RuntimeError("Could not create chart from the OBBject.") from e
+
+ def table(
+ self,
+ data: Optional[Union[pd.DataFrame, pd.Series]] = None,
+ title: str = "",
+ ):
+ """
+ Display an interactive table.
+
+ Parameters
+ ----------
+ data : Optional[Union[pd.DataFrame, pd.Series]], optional
+ Data to be plotted, by default None.
+ If no data is provided the OBBject results will be used.
+ """
+ data_as_df, _ = self._prepare_data_as_df(data)
+ if isinstance(data_as_df.index, pd.RangeIndex):
+ data_as_df.reset_index(inplace=True, drop=True)
+ else:
+ data_as_df.reset_index(inplace=True)
+ if self._backend.isatty:
+ try:
+ self._backend.send_table(
+ df_table=data_as_df,
+ title=title
+ or self._obbject._route, # pylint: disable=protected-access
+ theme=self._charting_settings.table_style,
+ )
+ except Exception as e:
+ warn(f"Failed to show figure with backend. {e}")
+
+ else:
+ from plotly import ( # pylint:disable=import-outside-toplevel
+ optional_imports,
+ )
+
+ ipython_display = optional_imports.get_module("IPython.display")
+ if ipython_display:
+ ipython_display.display(ipython_display.HTML(data_as_df.to_html()))
+ else:
+ warn("IPython.display is not available.")
diff --git a/openbb_platform/obbject_extensions/charting/openbb_charting/core/table.html b/openbb_platform/obbject_extensions/charting/openbb_charting/core/table.html
index a7e72ccce84..3f1b2b40200 100644
--- a/openbb_platform/obbject_extensions/charting/openbb_charting/core/table.html
+++ b/openbb_platform/obbject_extensions/charting/openbb_charting/core/table.html
@@ -1,150 +1,184 @@
<!DOCTYPE html>
<html lang="en">
+ <head>
+ <meta charset="UTF-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <title>OpenBB Interactive Tables</title>
+ <style>
+ table {
+ width: 100%;
+ table-layout: auto;
+ }
-<head>
- <meta charset="UTF-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <title>OpenBB Interactive Tables</title>
- <script>
- if (window.json_data && JSON.parse(window.json_data)?.posthog?.collect_logs) {
- !function (t, e) { var o, n, p, r; e.__SV || (window.posthog = e, e._i = [], e.init = function (i, s, a) { function g(t, e) { var o = e.split("."); 2 == o.length && (t = t[o[0]], e = o[1]), t[e] = function () { t.push([e].concat(Array.prototype.slice.call(arguments, 0))) } } (p = t.createElement("script")).type = "text/javascript", p.async = !0, p.src = s.api_host + "/static/array.js", (r = t.getElementsByTagName("script")[0]).parentNode.insertBefore(p, r); var u = e; for (void 0 !== a ? u = e[a] = [] : a = "posthog", u.people = u.people || [], u.toString = function (t) { var e = "posthog"; return "posthog" !== a && (e += "." + a), t || (e += " (stub)"), e }, u.people.toString = function () { return u.toString(1) + ".people (stub)" }, o = "capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled onFeatureFlags".split(" "), n = 0; n < o.length; n++)g(u, o[n]); e._i.push([i, s, a]) }, e.__SV = 1) }(document, window.posthog || []);
- posthog.init("", {
- api_host: "https://app.posthog.com",
- autocapture: {
- css_selector_allowlist: [".ph-capture"],
- },
- capture_pageview: false,
- loaded: function (posthog) {
- if (window.json_data) {
- const data = JSON.parse(window.json_data);
+ th {
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
- const log_id = data?.log_id || "";
- if (log_id != "" && log_id != "REPLACE_ME") {
- posthog.identify(log_id);
- }
+ td {
+ word-break: break-all;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+ </style>
+
+ <script>
+ if (window.json_data && JSON.parse(window.json_data)?.posthog?.collect_logs) {
+ !function(t,e){var o,n,p,r;e.__SV||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(".");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(p=t.createElement("script")).type="text/javascript",p.async=!0,p.src=s.api_host+"/static/array.js",(r=t.getElementsByTagName("script")[0]).parentNode.insertBefore(p,r);var u=e;for(void 0!==a?u=e[a]=[]:a="posthog",u.people=u.people||[],u.toString=function(t){var e="posthog";return"posthog"!==a&&(e+="."+a),t||(e+=" (stub)"),e},u.people.toString=function(){return u.toString(1)+".people (stub)"},o="capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled onFeatureFlags".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]);
+ posthog.init("posthog-key-placeholder", {
+ api_host: "https://app.posthog.com",
+ autocapture: {
+ css_selector_allowlist: [".ph-capture"],
+ },
+ capture_pageview: false,
+ loaded: function (posthog) {
+ if (window.json_data) {
+ const data = JSON.parse(window.json_data);
+
+ const log_id = data?.log_id || "";
+ if (log_id != "" && log_id != "REPLACE_ME") {
+ posthog.identify(log_id);
+ }
- posthog.capture("table", {
- INFO: {
- command: data.command_location,
- title: data.title,
- python_version: data.python_version,
- pywry_version: data.pywry_version,
- platform_version: data.platform_version,
- },
- });
- }
- posthog.onFeatureFlags(function () {
- if (
- !posthog.isFeatureEnabled("record-pywry", { send_event: false })
- ) {
- posthog.stopSessionRecording();
- }
- if (
- !posthog.isFeatureEnabled("collect-logs-pywry", {
- send_event: false,
- })
- ) {
- posthog.opt_out_capturing();
- } else if (posthog.has_opted_out_capturing()) {
- posthog.opt_in_capturing();
+ posthog.capture("table", {
+ INFO: {
+ command: data.command_location,
+ title: data.title,
+ python_version: data.python_version,
+ pywry_version: data.pywry_version,
+ platform_version: data.platform_version,
+ },
+ });
}
- });
- },
- });
- }
-
- if (
- // check if user had saved dark as their
- // theme when accessing page before
- localStorage.theme === "dark" ||
- // or user's requesting dark color
- // scheme through operating system
- (!("theme" in localStorage) &&
- window.matchMedia("(prefers-color-scheme: dark)").matches)
- ) {
- // then if we have access to the document and the element
- // we add the dark class to the html element and
- // store the dark value in the localStorage
- if (document && document.documentElement) {
- document.documentElement.classList.add("dark");
- localStorage.setItem("theme", "dark");
+ posthog.onFeatureFlags(function () {
+ if (
+ !posthog.isFeatureEnabled("record-pywry", { send_event: false })
+ ) {
+ posthog.stopSessionRecording();
+ }
+ if (
+ !posthog.isFeatureEnabled("collect-logs-pywry", {
+ send_event: false,
+ })
+ ) {
+ posthog.opt_out_capturing();
+ } else if (posthog.has_opted_out_capturing()) {
+ posthog.opt_in_capturing();
+ }
+ });
+ },
+ });
}
- } else {
- // else if we have access to the document and the element
- // we remove the dark class to the html element and
- // store the value light in the localStorage
- if (document && document.documentElement) {
- document.documentElement.classList.remove("dark");
- localStorage.setItem("theme", "light");
+
+ if (
+ // check if user had saved dark as their
+ // theme when accessing page before
+ localStorage.theme === "dark" ||
+ // or user's requesting dark color
+ // scheme through operating system
+ (!("theme" in localStorage) &&
+ window.matchMedia("(prefers-color-scheme: dark)").matches)
+ ) {
+ // then if we have access to the document and the element
+ // we add the dark class to the html element and
+ // store the dark value in the localStorage
+ if (document && document.documentElement) {
+ document.documentElement.classList.add("dark");
+ localStorage.setItem("theme", "dark");
+ }
+ } else {
+ // else if we have access to the document and the element
+ // we remove the dark class to the html element and
+ // store the value light in the localStorage
+ if (document && document.documentElement) {
+ document.documentElement.classList.remove("dark");
+ localStorage.setItem("theme", "light");
+ }
}
- }
- </script>
- <script type="module" crossorigin>
- function _y(e, t) { for (var r = 0; r < t.length; r++) { const n = t[r]; if (typeof n != "string" && !Array.isArray(n)) { for (const i in n) if (i !== "default" && !(i in e)) { const o = Object.getOwnPropertyDescriptor(n, i); o && Object.defineProperty(e, i, o.get ? o : { enumerable: !0, get: () => n[i] }) } } } return Object.freeze(Object.defineProperty(e, Symbol.toStringTag, { value: "Module" })) } (function () { const t = document.createElement("link").relList; if (t && t.supports && t.supports("modulepreload")) return; for (const i of document.querySelectorAll('link[rel="modulepreload"]')) n(i); new MutationObserver(i => { for (const o of i) if (o.type === "childList") for (const a of o.addedNodes) a.tagName === "LINK" && a.rel === "modulepreload" && n(a) }).observe(document, { childList: !0, subtree: !0 }); function r(i) { const o = {}; return i.integrity && (o.integrity = i.integrity), i.referrerPolicy && (o.referrerPolicy = i.referrerPolicy), i.crossOrigin === "use-credentials" ? o.credentials = "include" : i.crossOrigin === "anonymous" ? o.credentials = "omit" : o.credentials = "same-origin", o } function n(i) { if (i.ep) return; i.ep = !0; const o = r(i); fetch(i.href, o) } })(); function Ha(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e } var S1 = { exports: {} }, Va = {};/*
+ </script>
+ <script type="module" crossorigin>
+function $y(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(n,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();function qa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var I1={exports:{}},Qa={};/*
object-assign
(c) Sindre Sorhus
@license MIT
-*/var mh = Object.getOwnPropertySymbols, Sy = Object.prototype.hasOwnProperty, Ty = Object.prototype.propertyIsEnumerable; function Cy(e) { if (e == null) throw new TypeError("Object.assign cannot be called with null or undefined"); return Object(e) } function Ay() { try { if (!Object.assign) return !1; var e = new String("abc"); if (e[5] = "de", Object.getOwnPropertyNames(e)[0] === "5") return !1; for (var t = {}, r = 0; r < 10; r++)t["_" + String.fromCharCode(r)] = r; var n = Object.getOwnPropertyNames(t).map(function (o) { return t[o] }); if (n.join("") !== "0123456789") return !1; var i = {}; return "abcdefghijklmnopqrst".split("").forEach(function (o) { i[o] = o }), Object.keys(Object.assign({}, i)).join("") === "abcdefghijklmnopqrst" } catch { return !1 } } var T1 = Ay() ? Object.assign : function (e, t) { for (var r, n = Cy(e), i, o = 1; o < arguments.length; o++) { r = Object(arguments[o]); for (var a in r) Sy.call(r, a) && (n[a] = r[a]); if (mh) { i = mh(r); for (var s = 0; s < i.length; s++)Ty.call(r, i[s]) && (n[i[s]] = r[i[s]]) } } return n }, C1 = { exports: {} }, Ie = {};/** @license React v17.0.2
+*/var Ch=Object.getOwnPropertySymbols,Ny=Object.prototype.hasOwnProperty,My=Object.prototype.propertyIsEnumerable;function Ly(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function By(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(t).map(function(o){return t[o]});if(n.join("")!=="0123456789")return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(o){i[o]=o}),Object.keys(Object.assign({},i)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}var b1=By()?Object.assign:function(e,t){for(var r,n=Ly(e),i,o=1;o<arguments.length;o++){r=Object(arguments[o]);for(var a in r)Ny.call(r,a)&&(n[a]=r[a]);if(Ch){i=Ch(r);for(var s=0;s<i.length;s++)My.call(r,i[s])&&(n[i[s]]=r[i[s]])}}return n},k1={exports:{}},be={};/** @license React v17.0.2
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
- */var f0 = T1, ho = 60103, A1 = 60106; Ie.Fragment = 60107; Ie.StrictMode = 60108; Ie.Profiler = 60114; var R1 = 60109, O1 = 60110, F1 = 60112; Ie.Suspense = 60113; var D1 = 60115, P1 = 60116; if (typeof Symbol == "function" && Symbol.for) { var mr = Symbol.for; ho = mr("react.element"), A1 = mr("react.portal"), Ie.Fragment = mr("react.fragment"), Ie.StrictMode = mr("react.strict_mode"), Ie.Profiler = mr("react.profiler"), R1 = mr("react.provider"), O1 = mr("react.context"), F1 = mr("react.forward_ref"), Ie.Suspense = mr("react.suspense"), D1 = mr("react.memo"), P1 = mr("react.lazy") } var vh = typeof Symbol == "function" && Symbol.iterator; function Ry(e) { return e === null || typeof e != "object" ? null : (e = vh && e[vh] || e["@@iterator"], typeof e == "function" ? e : null) } function Wa(e) { for (var t = "https://reactjs.org/docs/error-decoder.html?invariant=" + e, r = 1; r < arguments.length; r++)t += "&args[]=" + encodeURIComponent(arguments[r]); return "Minified React error #" + e + "; visit " + t + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings." } var I1 = { isMounted: function () { return !1 }, enqueueForceUpdate: function () { }, enqueueReplaceState: function () { }, enqueueSetState: function () { } }, b1 = {}; function po(e, t, r) { this.props = e, this.context = t, this.refs = b1, this.updater = r || I1 } po.prototype.isReactComponent = {}; po.prototype.setState = function (e, t) { if (typeof e != "object" && typeof e != "function" && e != null) throw Error(Wa(85)); this.updater.enqueueSetState(this, e, t, "setState") }; po.prototype.forceUpdate = function (e) { this.updater.enqueueForceUpdate(this, e, "forceUpdate") }; function k1() { } k1.prototype = po.prototype; function d0(e, t, r) { this.props = e, this.context = t, this.refs = b1, this.updater = r || I1 } var h0 = d0.prototype = new k1; h0.constructor = d0; f0(h0, po.prototype); h0.isPureReactComponent = !0; var p0 = { current: null }, $1 = Object.prototype.hasOwnProperty, N1 = { key: !0, ref: !0, __self: !0, __source: !0 }; function M1(e, t, r) { var n, i = {}, o = null, a = null; if (t != null) for (n in t.ref !== void 0 && (a = t.ref), t.key !== void 0 && (o = "" + t.key), t) $1.call(t, n) && !N1.hasOwnProperty(n) && (i[n] = t[n]); var s = arguments.length - 2; if (s === 1) i.children = r; else if (1 < s) { for (var l = Array(s), u = 0; u < s; u++)l[u] = arguments[u + 2]; i.children = l } if (e && e.defaultProps) for (n in s = e.defaultProps, s) i[n] === void 0 && (i[n] = s[n]); return { $$typeof: ho, type: e, key: o, ref: a, props: i, _owner: p0.current } } function Oy(e, t) { return { $$typeof: ho, type: e.type, key: t, ref: e.ref, props: e.props, _owner: e._owner } } function g0(e) { return typeof e == "object" && e !== null && e.$$typeof === ho } function Fy(e) { var t = { "=": "=0", ":": "=2" }; return "$" + e.replace(/[=:]/g, function (r) { return t[r] }) } var xh = /\/+/g; function Uu(e, t) { return typeof e == "object" && e !== null && e.key != null ? Fy("" + e.key) : t.toString(36) } function Hs(e, t, r, n, i) { var o = typeof e; (o === "undefined" || o === "boolean") && (e = null); var a = !1; if (e === null) a = !0; else switch (o) { case "string": case "number": a = !0; break; case "object": switch (e.$$typeof) { case ho: case A1: a = !0 } }if (a) return a = e, i = i(a), e = n === "" ? "." + Uu(a, 0) : n, Array.isArray(i) ? (r = "", e != null && (r = e.replace(xh, "$&/") + "/"), Hs(i, t, r, "", function (u) { return u })) : i != null && (g0(i) && (i = Oy(i, r + (!i.key || a && a.key === i.key ? "" : ("" + i.key).replace(xh, "$&/") + "/") + e)), t.push(i)), 1; if (a = 0, n = n === "" ? "." : n + ":", Array.isArray(e)) for (var s = 0; s < e.length; s++) { o = e[s]; var l = n + Uu(o, s); a += Hs(o, t, r, l, i) } else if (l = Ry(e), typeof l == "function") for (e = l.call(e), s = 0; !(o = e.next()).done;)o = o.value, l = n + Uu(o, s++), a += Hs(o, t, r, l, i); else if (o === "object") throw t = "" + e, Error(Wa(31, t === "[object Object]" ? "object with keys {" + Object.keys(e).join(", ") + "}" : t)); return a } function as(e, t, r) { if (e == null) return e; var n = [], i = 0; return Hs(e, n, "", "", function (o) { return t.call(r, o, i++) }), n } function Dy(e) { if (e._status === -1) { var t = e._result; t = t(), e._status = 0, e._result = t, t.then(function (r) { e._status === 0 && (r = r.default, e._status = 1, e._result = r) }, function (r) { e._status === 0 && (e._status = 2, e._result = r) }) } if (e._status === 1) return e._result; throw e._result } var L1 = { current: null }; function rn() { var e = L1.current; if (e === null) throw Error(Wa(321)); return e } var Py = { ReactCurrentDispatcher: L1, ReactCurrentBatchConfig: { transition: 0 }, ReactCurrentOwner: p0, IsSomeRendererActing: { current: !1 }, assign: f0 }; Ie.Children = { map: as, forEach: function (e, t, r) { as(e, function () { t.apply(this, arguments) }, r) }, count: function (e) { var t = 0; return as(e, function () { t++ }), t }, toArray: function (e) { return as(e, function (t) { return t }) || [] }, only: function (e) { if (!g0(e)) throw Error(Wa(143)); return e } }; Ie.Component = po; Ie.PureComponent = d0; Ie.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Py; Ie.cloneElement = function (e, t, r) { if (e == null) throw Error(Wa(267, e)); var n = f0({}, e.props), i = e.key, o = e.ref, a = e._owner; if (t != null) { if (t.ref !== void 0 && (o = t.ref, a = p0.current), t.key !== void 0 && (i = "" + t.key), e.type && e.type.defaultProps) var s = e.type.defaultProps; for (l in t) $1.call(t, l) && !N1.hasOwnProperty(l) && (n[l] = t[l] === void 0 && s !== void 0 ? s[l] : t[l]) } var l = arguments.length - 2; if (l === 1) n.children = r; else if (1 < l) { s = Array(l); for (var u = 0; u < l; u++)s[u] = arguments[u + 2]; n.children = s } return { $$typeof: ho, type: e.type, key: i, ref: o, props: n, _owner: a } }; Ie.createContext = function (e, t) { return t === void 0 && (t = null), e = { $$typeof: O1, _calculateChangedBits: t, _currentValue: e, _currentValue2: e, _threadCount: 0, Provider: null, Consumer: null }, e.Provider = { $$typeof: R1, _context: e }, e.Consumer = e }; Ie.createElement = M1; Ie.createFactory = function (e) { var t = M1.bind(null, e); return t.type = e, t }; Ie.createRef = function () { return { current: null } }; Ie.forwardRef = function (e) { return { $$typeof: F1, render: e } }; Ie.isValidElement = g0; Ie.lazy = function (e) { return { $$typeof: P1, _payload: { _status: -1, _result: e }, _init: Dy } }; Ie.memo = function (e, t) { return { $$typeof: D1, type: e, compare: t === void 0 ? null : t } }; Ie.useCallback = function (e, t) { return rn().useCallback(e, t) }; Ie.useContext = function (e, t) { return rn().useContext(e, t) }; Ie.useDebugValue = function () { }; Ie.useEffect = function (e, t) { return rn().useEffect(e, t) }; Ie.useImperativeHandle = function (e, t, r) { return rn().useImperativeHandle(e, t, r) }; Ie.useLayoutEffect = function (e, t) { return rn().useLayoutEffect(e, t) }; Ie.useMemo = function (e, t) { return rn().useMemo(e, t) }; Ie.useReducer = function (e, t, r) { return rn().useReducer(e, t, r) }; Ie.useRef = function (e) { return rn().useRef(e) }; Ie.useState = function (e) { return rn().useState(e) }; Ie.version = "17.0.2"; C1.exports = Ie; var v = C1.exports; const ir = Ha(v), Iy = _y({ __proto__: null, default: ir }, [v]);/** @license React v17.0.2
+ */var E0=b1,Eo=60103,$1=60106;be.Fragment=60107;be.StrictMode=60108;be.Profiler=60114;var N1=60109,M1=60110,L1=60112;be.Suspense=60113;var B1=60115,U1=60116;if(typeof Symbol=="function"&&Symbol.for){var mr=Symbol.for;Eo=mr("react.element"),$1=mr("react.portal"),be.Fragment=mr("react.fragment"),be.StrictMode=mr("react.strict_mode"),be.Profiler=mr("react.profiler"),N1=mr("react.provider"),M1=mr("react.context"),L1=mr("react.forward_ref"),be.Suspense=mr("react.suspense"),B1=mr("react.memo"),U1=mr("react.lazy")}var Ah=typeof Symbol=="function"&&Symbol.iterator;function Uy(e){return e===null||typeof e!="object"?null:(e=Ah&&e[Ah]||e["@@iterator"],typeof e=="function"?e:null)}function Za(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var H1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},V1={};function _o(e,t,r){this.props=e,this.context=t,this.refs=V1,this.updater=r||H1}_o.prototype.isReactComponent={};_o.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error(Za(85));this.updater.enqueueSetState(this,e,t,"setState")};_o.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function W1(){}W1.prototype=_o.prototype;function _0(e,t,r){this.props=e,this.context=t,this.refs=V1,this.updater=r||H1}var S0=_0.prototype=new W1;S0.constructor=_0;E0(S0,_o.prototype);S0.isPureReactComponent=!0;var T0={current:null},z1=Object.prototype.hasOwnProperty,G1={key:!0,ref:!0,__self:!0,__source:!0};function j1(e,t,r){var n,i={},o=null,a=null;if(t!=null)for(n in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)z1.call(t,n)&&!G1.hasOwnProperty(n)&&(i[n]=t[n]);var s=arguments.length-2;if(s===1)i.children=r;else if(1<s){for(var l=Array(s),u=0;u<s;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(n in s=e.defaultProps,s)i[n]===void 0&&(i[n]=s[n]);return{$$typeof:Eo,type:e,key:o,ref:a,props:i,_owner:T0.current}}function Hy(e,t){return{$$typeof:Eo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function C0(e){return typeof e=="object"&&e!==null&&e.$$typeof===Eo}function Vy(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Rh=/\/+/g;function qu(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Vy(""+e.key):t.toString(36)}function Ks(e,t,r,n,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Eo:case $1:a=!0}}if(a)return a=e,i=i(a),e=n===""?"."+qu(a,0):n,Array.isArray(i)?(r="",e!=null&&(r=e.replace(Rh,"$&/")+"/"),Ks(i,t,r,"",function(u){return u})):i!=null&&(C0(i)&&(i=Hy(i,r+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(Rh,"$&/")+"/")+e)),t.push(i)),1;if(a=0,n=n===""?".":n+":",Array.isArray(e))for(var s=0;s<e.length;s++){o=e[s];var l=n+qu(o,s);a+=Ks(o,t,r,l,i)}else if(l=Uy(e),typeof l=="function")for(e=l.call(e),s=0;!(o=e.next()).done;)o=o.value,l=n+qu(o,s++),a+=Ks(o,t,r,l,i);else if(o==="object")throw t=""+e,Error(Za(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t));return a}function ds(e,t,r){if(e==null)return e;var n=[],i=0;return Ks(e,n,"","",function(o){return t.call(r,o,i++)}),n}function Wy(e){if(e._status===-1){var t=e._result;t=t(),e._status=0,e._result=t,t.then(function(r){e._status===0&&(r=r.default,e._status=1,e._result=r)},function(r){e._status===0&&(e._status=2,e._result=r)})}if(e._status===1)return e._result;throw e._result}var X1={current:null};function sn(){var e=X1.current;if(e===null)throw Error(Za(321));return e}var zy={ReactCurrentDispatcher:X1,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:T0,IsSomeRendererActing:{current:!1},assign:E0};be.Children={map:ds,forEach:function(e,t,r){ds(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return ds(e,function(){t++}),t},toArray:function(e){return ds(e,function(t){return t})||[]},only:function(e){if(!C0(e))throw Error(Za(143));return e}};be.Component=_o;be.PureComponent=_0;be.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=zy;be.cloneElement=function(e,t,r){if(e==null)throw Error(Za(267,e));var n=E0({},e.props),i=e.key,o=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,a=T0.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)z1.call(t,l)&&!G1.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&s!==void 0?s[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){s=Array(l);for(var u=0;u<l;u++)s[u]=arguments[u+2];n.children=s}return{$$typeof:Eo,type:e.type,key:i,ref:o,props:n,_owner:a}};be.createContext=function(e,t){return t===void 0&&(t=null),e={$$typeof:M1,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:N1,_context:e},e.Consumer=e};be.createElement=j1;be.createFactory=function(e){var t=j1.bind(null,e);return t.type=e,t};be.createRef=function(){return{current:null}};be.forwardRef=function(e){return{$$typeof:L1,render:e}};be.isValidElement=C0;be.lazy=function(e){return{$$typeof:U1,_payload:{_status:-1,_result:e},_init:Wy}};be.memo=function(e,t){return{$$typeof:B1,type:e,compare:t===void 0?null:t}};be.useCallback=function(e,t){return sn().useCallback(e,t)};be.useContext=function(e,t){return sn().useContext(e,t)};be.useDebugValue=function(){};be.useEffect=function(e,t){return sn().useEffect(e,t)};be.useImperativeHandle=function(e,t,r){return sn().useImperativeHandle(e,t,r)};be.useLayoutEffect=function(e,t){return sn().useLayoutEffect(e,t)};be.useMemo=function(e,t){return sn().useMemo(e,t)};be.useReducer=function(e,t,r){return sn().useReducer(e,t,r)};be.useRef=function(e){return sn().useRef(e)};be.useState=function(e){return sn().useState(e)};be.version="17.0.2";k1.exports=be;var x=k1.exports;const or=qa(x),Gy=$y({__proto__:null,default:or},[x]);/** @license React v17.0.2
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
- */var by = v, B1 = 60103; Va.Fragment = 60107; if (typeof Symbol == "function" && Symbol.for) { var wh = Symbol.for; B1 = wh("react.element"), Va.Fragment = wh("react.fragment") } var ky = by.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, $y = Object.prototype.hasOwnProperty, Ny = { key: !0, ref: !0, __self: !0, __source: !0 }; function U1(e, t, r) { var n, i = {}, o = null, a = null; r !== void 0 && (o = "" + r), t.key !== void 0 && (o = "" + t.key), t.ref !== void 0 && (a = t.ref); for (n in t) $y.call(t, n) && !Ny.hasOwnProperty(n) && (i[n] = t[n]); if (e && e.defaultProps) for (n in t = e.defaultProps, t) i[n] === void 0 && (i[n] = t[n]); return { $$typeof: B1, type: e, key: o, ref: a, props: i, _owner: ky.current } } Va.jsx = U1; Va.jsxs = U1; S1.exports = Va; var m0 = S1.exports; const H1 = m0.Fragment, K = m0.jsx, Se = m0.jsxs; var V1 = { exports: {} }, hr = {}, W1 = { exports: {} }, z1 = {};/** @license React v0.20.2
+ */var jy=x,K1=60103;Qa.Fragment=60107;if(typeof Symbol=="function"&&Symbol.for){var Oh=Symbol.for;K1=Oh("react.element"),Qa.Fragment=Oh("react.fragment")}var Xy=jy.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Ky=Object.prototype.hasOwnProperty,Yy={key:!0,ref:!0,__self:!0,__source:!0};function Y1(e,t,r){var n,i={},o=null,a=null;r!==void 0&&(o=""+r),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(n in t)Ky.call(t,n)&&!Yy.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:K1,type:e,key:o,ref:a,props:i,_owner:Xy.current}}Qa.jsx=Y1;Qa.jsxs=Y1;I1.exports=Qa;var A0=I1.exports;const q1=A0.Fragment,X=A0.jsx,Ce=A0.jsxs;var Q1={exports:{}},pr={},Z1={exports:{}},J1={};/** @license React v0.20.2
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
- */(function (e) { var t, r, n, i; if (typeof performance == "object" && typeof performance.now == "function") { var o = performance; e.unstable_now = function () { return o.now() } } else { var a = Date, s = a.now(); e.unstable_now = function () { return a.now() - s } } if (typeof window > "u" || typeof MessageChannel != "function") { var l = null, u = null, c = function () { if (l !== null) try { var ee = e.unstable_now(); l(!0, ee), l = null } catch (O) { throw setTimeout(c, 0), O } }; t = function (ee) { l !== null ? setTimeout(t, 0, ee) : (l = ee, setTimeout(c, 0)) }, r = function (ee, O) { u = setTimeout(ee, O) }, n = function () { clearTimeout(u) }, e.unstable_shouldYield = function () { return !1 }, i = e.unstable_forceFrameRate = function () { } } else { var f = window.setTimeout, d = window.clearTimeout; if (typeof console < "u") { var h = window.cancelAnimationFrame; typeof window.requestAnimationFrame != "function" && console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"), typeof h != "function" && console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills") } var m = !1, p = null, g = -1, x = 5, w = 0; e.unstable_shouldYield = function () { return e.unstable_now() >= w }, i = function () { }, e.unstable_forceFrameRate = function (ee) { 0 > ee || 125 < ee ? console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported") : x = 0 < ee ? Math.floor(1e3 / ee) : 5 }; var y = new MessageChannel, _ = y.port2; y.port1.onmessage = function () { if (p !== null) { var ee = e.unstable_now(); w = ee + x; try { p(!0, ee) ? _.postMessage(null) : (m = !1, p = null) } catch (O) { throw _.postMessage(null), O } } else m = !1 }, t = function (ee) { p = ee, m || (m = !0, _.postMessage(null)) }, r = function (ee, O) { g = f(function () { ee(e.unstable_now()) }, O) }, n = function () { d(g), g = -1 } } function N(ee, O) { var k = ee.length; ee.push(O); e: for (; ;) { var b = k - 1 >>> 1, D = ee[b]; if (D !== void 0 && 0 < C(D, O)) ee[b] = O, ee[k] = D, k = b; else break e } } function M(ee) { return ee = ee[0], ee === void 0 ? null : ee } function S(ee) { var O = ee[0]; if (O !== void 0) { var k = ee.pop(); if (k !== O) { ee[0] = k; e: for (var b = 0, D = ee.length; b < D;) { var U = 2 * (b + 1) - 1, G = ee[U], J = U + 1, W = ee[J]; if (G !== void 0 && 0 > C(G, k)) W !== void 0 && 0 > C(W, G) ? (ee[b] = W, ee[J] = k, b = J) : (ee[b] = G, ee[U] = k, b = U); else if (W !== void 0 && 0 > C(W, k)) ee[b] = W, ee[J] = k, b = J; else break e } } retur