diff --git a/frontend-components/plotly/src/components/Chart.tsx b/frontend-components/plotly/src/components/Chart.tsx index 1f32536cc98..2773302b807 100644 --- a/frontend-components/plotly/src/components/Chart.tsx +++ b/frontend-components/plotly/src/components/Chart.tsx @@ -1,662 +1,662 @@ // @ts-nocheck -import * as Plotly from "plotly.js-dist-min"; -import { usePostHog } from "posthog-js/react"; -import createPlotlyComponent from "react-plotly.js/factory"; -import { useState, useEffect } from "react"; -import { ICONS, DARK_CHARTS_TEMPLATE, LIGHT_CHARTS_TEMPLATE } from "./Config"; -import OverlayChartDialog from "./Dialogs/OverlayChartDialog"; -import TitleChartDialog from "./Dialogs/TitleChartDialog"; -import TextChartDialog from "./Dialogs/TextChartDialog"; -import { Icons as PlotlyIcons } from "plotly.js-dist-min"; -import { init_annotation } from "../utils/addAnnotation"; -import { PlotConfig, hideModebar } from "./PlotlyConfig"; -import autoScaling from "./AutoScaling"; -import { non_blocking, saveImage } from "../utils/utils"; -import ResizeHandler from "./ResizeHandler"; -import ChangeColor from "./ChangeColor"; import clsx from "clsx"; -import DownloadFinishedDialog from "./Dialogs/DownloadFinishedDialog"; +import * as Plotly from "plotly.js-dist-min"; +import { Icons as PlotlyIcons } from "plotly.js-dist-min"; +import { usePostHog } from "posthog-js/react"; +import { useEffect, useState } from "react"; +import createPlotlyComponent from "react-plotly.js/factory"; +import { init_annotation } from "../utils/addAnnotation"; +import { non_blocking, saveImage } from "../utils/utils"; +import autoScaling from "./AutoScaling"; +import ChangeColor from "./ChangeColor"; +import { DARK_CHARTS_TEMPLATE, ICONS, LIGHT_CHARTS_TEMPLATE } from "./Config"; import AlertDialog from "./Dialogs/AlertDialog"; +import DownloadFinishedDialog from "./Dialogs/DownloadFinishedDialog"; +import OverlayChartDialog from "./Dialogs/OverlayChartDialog"; +import TextChartDialog from "./Dialogs/TextChartDialog"; +import TitleChartDialog from "./Dialogs/TitleChartDialog"; +import { PlotConfig, hideModebar } from "./PlotlyConfig"; +import ResizeHandler from "./ResizeHandler"; const Plot = createPlotlyComponent(Plotly); function CreateDataXrange(data: Plotly.PlotData[], xrange?: any) { - if (!xrange) { - xrange = [ - data[0]?.x[data[0].x.length - 1000], - data[0]?.x[data[0].x.length - 1], - ]; - } - const new_data = []; - data.forEach((trace) => { - const new_trace = { ...trace }; - const data_keys = [ - "x", - "y", - "low", - "high", - "open", - "close", - "text", - "customdata", - ]; - const xaxis = trace.x ? trace.x : []; - const chunks = []; - for (let i = 0; i < xaxis.length; i++) { - if (xaxis[i] >= xrange[0] && xaxis[i] <= xrange[1]) { - chunks.push(i); - } - } - data_keys.forEach((key) => { - if (trace[key] && Array.isArray(trace[key])) { - new_trace[key] = trace[key].filter((_, i) => chunks.includes(i)); - } - }); - const color_keys = ["marker", "line"]; - color_keys.forEach((key) => { - if (trace[key]?.color && Array.isArray(trace[key].color)) { - new_trace[key] = { ...trace[key] }; - new_trace[key].color = trace[key].color.filter((_, i) => - chunks.includes(i), - ); - } - }); - new_data.push(new_trace); - }); + if (!xrange) { + xrange = [ + data[0]?.x[data[0].x.length - 1000], + data[0]?.x[data[0].x.length - 1], + ]; + } + const new_data = []; + data.forEach((trace) => { + const new_trace = { ...trace }; + const data_keys = [ + "x", + "y", + "low", + "high", + "open", + "close", + "text", + "customdata", + ]; + const xaxis = trace.x ? trace.x : []; + const chunks = []; + for (let i = 0; i < xaxis.length; i++) { + if (xaxis[i] >= xrange[0] && xaxis[i] <= xrange[1]) { + chunks.push(i); + } + } + data_keys.forEach((key) => { + if (trace[key] && Array.isArray(trace[key])) { + new_trace[key] = trace[key].filter((_, i) => chunks.includes(i)); + } + }); + const color_keys = ["marker", "line"]; + color_keys.forEach((key) => { + if (trace[key]?.color && Array.isArray(trace[key].color)) { + new_trace[key] = { ...trace[key] }; + new_trace[key].color = trace[key].color.filter((_, i) => + chunks.includes(i), + ); + } + }); + new_data.push(new_trace); + }); - if (new_data.length === 0) return data; + if (new_data.length === 0) return data; - return new_data; + return new_data; } async function DynamicLoad({ - event, - figure, + event, + figure, }: { - event?: any; - figure: any; + event?: any; + figure: any; }) { - try { - const XDATA = figure.data.filter( - (trace) => - trace.x !== undefined && trace.x.length > 0 && trace.x[0] !== undefined, - ); + try { + const XDATA = figure.data.filter( + (trace) => + trace.x !== undefined && trace.x.length > 0 && trace.x[0] !== undefined, + ); - if (XDATA.length === 0) return figure; - // We get the xaxis range, if no event is passed, we get the last 1000 points - const xaxis_range = event - ? [event["xaxis.range[0]"], event["xaxis.range[1]"]] - : [ - XDATA[0]?.x[XDATA[0].x.length - 1000], - XDATA[0]?.x[XDATA[0].x.length - 1], - ]; + if (XDATA.length === 0) return figure; + // We get the xaxis range, if no event is passed, we get the last 1000 points + const xaxis_range = event + ? [event["xaxis.range[0]"], event["xaxis.range[1]"]] + : [ + XDATA[0]?.x[XDATA[0].x.length - 1000], + XDATA[0]?.x[XDATA[0].x.length - 1], + ]; - const new_data = CreateDataXrange(figure.data, xaxis_range); - figure.data = new_data; - figure.layout.xaxis.range = xaxis_range; - return figure; - } catch (e) { - console.log("error", e); - } + const new_data = CreateDataXrange(figure.data, xaxis_range); + figure.data = new_data; + figure.layout.xaxis.range = xaxis_range; + return figure; + } catch (e) { + console.log("error", e); + } } export default function Chart({ - json, - date, - cmd, - title, - globals, - theme, - info, + json, + date, + cmd, + title, + globals, + theme, + info, }: { - // @ts-ignore - json: Figure; - date: Date; - cmd: string; - title: string; - globals: any; - theme: string; - info?: any; + // @ts-ignore + json: Figure; + date: Date; + cmd: string; + title: string; + globals: any; + theme: string; + info?: any; }) { - const posthog = usePostHog(); + const posthog = usePostHog(); - useEffect(() => { - if (posthog) posthog.capture("chart", info); - }, []); + useEffect(() => { + if (posthog) posthog.capture("chart", info); + }, []); - json.layout.width = undefined; - json.layout.height = undefined; - if (json.layout?.title?.text) { - json.layout.title.text = ""; - } + json.layout.width = undefined; + json.layout.height = undefined; + if (json.layout?.title?.text) { + json.layout.title.text = ""; + } - const [originalData, setOriginalData] = useState(json); - const [barButtons, setModeBarButtons] = useState({}); - const [LogYaxis, setLogYaxis] = useState(false); - const [chartTitle, setChartTitle] = useState(title); - const [axesTitles, setAxesTitles] = useState({}); - const [plotLoaded, setPlotLoaded] = useState(false); - const [modal, setModal] = useState({ name: "" }); - const [loading, setLoading] = useState(false); - const [plotDiv, setPlotDiv] = useState(null); - const [volumeBars, setVolumeBars] = useState({ old_nticks: {} }); - const [maximizePlot, setMaximizePlot] = useState(false); - const [downloadFinished, setDownloadFinished] = useState(false); - const [dateSliced, setDateSliced] = useState(false); + const [originalData, setOriginalData] = useState(json); + const [barButtons, setModeBarButtons] = useState({}); + const [LogYaxis, setLogYaxis] = useState(false); + const [chartTitle, setChartTitle] = useState(title); + const [axesTitles, setAxesTitles] = useState({}); + const [plotLoaded, setPlotLoaded] = useState(false); + const [modal, setModal] = useState({ name: "" }); + const [loading, setLoading] = useState(false); + const [plotDiv, setPlotDiv] = useState(null); + const [volumeBars, setVolumeBars] = useState({ old_nticks: {} }); + const [maximizePlot, setMaximizePlot] = useState(false); + const [downloadFinished, setDownloadFinished] = useState(false); + const [dateSliced, setDateSliced] = useState(false); - const [plotData, setPlotData] = useState(originalData); - const [annotations, setAnnotations] = useState([]); - const [changeTheme, setChangeTheme] = useState(false); - const [darkMode, setDarkMode] = useState(true); - const [autoScale, setAutoScaling] = useState(false); - const [changeColor, setChangeColor] = useState(false); - const [colorActive, setColorActive] = useState(false); - const [onAnnotationClick, setOnAnnotationClick] = useState({}); - const [ohlcAnnotation, setOhlcAnnotation] = useState([]); - const [yaxisFixedRange, setYaxisFixedRange] = useState({}); + const [plotData, setPlotData] = useState(originalData); + const [annotations, setAnnotations] = useState([]); + const [changeTheme, setChangeTheme] = useState(false); + const [darkMode, setDarkMode] = useState(true); + const [autoScale, setAutoScaling] = useState(false); + const [changeColor, setChangeColor] = useState(false); + const [colorActive, setColorActive] = useState(false); + const [onAnnotationClick, setOnAnnotationClick] = useState({}); + const [ohlcAnnotation, setOhlcAnnotation] = useState([]); + const [yaxisFixedRange, setYaxisFixedRange] = useState([]); - const onClose = () => setModal({ name: "" }); + const onClose = () => setModal({ name: "" }); - // @ts-ignore - function onDeleteAnnotation(annotation) { - console.log("onDeleteAnnotation", annotation); - const index = plotData?.layout?.annotations?.findIndex( - (a: any) => a.text === annotation.text, - ); - console.log("index", index); - if (index > -1) { - plotData?.layout?.annotations?.splice(index, 1); - setPlotData({ ...plotData }); - setAnnotations(plotData?.layout?.annotations); - } - } + // @ts-ignore + function onDeleteAnnotation(annotation) { + console.log("onDeleteAnnotation", annotation); + const index = plotData?.layout?.annotations?.findIndex( + (a: any) => a.text === annotation.text, + ); + console.log("index", index); + if (index > -1) { + plotData?.layout?.annotations?.splice(index, 1); + setPlotData({ ...plotData }); + setAnnotations(plotData?.layout?.annotations); + } + } - // @ts-ignore - function onAddAnnotation(data) { - init_annotation({ - plotData, - popupData: data, - setPlotData, - setModal, - setOnAnnotationClick, - setAnnotations, - onAnnotationClick, - ohlcAnnotation, - setOhlcAnnotation, - annotations, - plotDiv, - }); - } + // @ts-ignore + function onAddAnnotation(data) { + init_annotation({ + plotData, + popupData: data, + setPlotData, + setModal, + setOnAnnotationClick, + setAnnotations, + onAnnotationClick, + ohlcAnnotation, + setOhlcAnnotation, + annotations, + plotDiv, + }); + } - useEffect(() => { - if (downloadFinished) { - setModal({ name: "downloadFinished" }); - setDownloadFinished(false); - } - }, [downloadFinished]); + useEffect(() => { + if (downloadFinished) { + setModal({ name: "downloadFinished" }); + setDownloadFinished(false); + } + }, [downloadFinished]); - useEffect(() => { - if (axesTitles && Object.keys(axesTitles).length > 0) { - Object.keys(axesTitles).forEach((k) => { - plotData.layout[k].title = { - ...(plotData.layout[k].title || {}), - text: axesTitles[k], - }; - plotData.layout[k].showticklabels = true; - }); - setAxesTitles({}); - } - }, [axesTitles]); + useEffect(() => { + if (axesTitles && Object.keys(axesTitles).length > 0) { + Object.keys(axesTitles).forEach((k) => { + plotData.layout[k].title = { + ...(plotData.layout[k].title || {}), + text: axesTitles[k], + }; + plotData.layout[k].showticklabels = true; + }); + setAxesTitles({}); + } + }, [axesTitles]); - function onChangeColor(color) { - // updates the color of the last added shape - // this function is called when the color picker is used - // if there are no shapes, we remove the color picker - const shapes = plotDiv.layout.shapes; - if (!shapes || shapes.length === 0) { - return; - } - // we change last added shape color - const last_shape = shapes[shapes.length - 1]; - last_shape.line.color = color; - Plotly.update(plotDiv, {}, { shapes: shapes }); - } + function onChangeColor(color) { + // updates the color of the last added shape + // this function is called when the color picker is used + // if there are no shapes, we remove the color picker + const shapes = plotDiv.layout.shapes; + if (!shapes || shapes.length === 0) { + return; + } + // we change last added shape color + const last_shape = shapes[shapes.length - 1]; + last_shape.line.color = color; + Plotly.update(plotDiv, {}, { shapes: shapes }); + } - function button_pressed(title, active = false) { - // changes the style of the button when it is pressed - // title is the title of the button - // active is true if the button is active, false otherwise + function button_pressed(title, active = false) { + // changes the style of the button when it is pressed + // title is the title of the button + // active is true if the button is active, false otherwise - const button = - barButtons[title] || document.querySelector(`[data-title="${title}"]`); - if (!active) { - button.style.border = "1px solid rgba(0, 151, 222, 1.0)"; - button.style.borderRadius = "5px"; - button.style.borderpadding = "5px"; - button.style.boxShadow = "0 0 5px rgba(0, 151, 222, 1.0)"; - } else { - button.style.border = "transparent"; - button.style.boxShadow = "none"; - } - setModeBarButtons({ ...barButtons, [title]: button }); - } + const button = + barButtons[title] || document.querySelector(`[data-title="${title}"]`); + if (!active) { + button.style.border = "1px solid rgba(0, 151, 222, 1.0)"; + button.style.borderRadius = "5px"; + button.style.borderpadding = "5px"; + button.style.boxShadow = "0 0 5px rgba(0, 151, 222, 1.0)"; + } else { + button.style.border = "transparent"; + button.style.boxShadow = "none"; + } + setModeBarButtons({ ...barButtons, [title]: button }); + } - function autoscaleButton() { - // We need to check if the button is active or not - const title = "Auto Scale (Ctrl+Shift+A)"; - const button = - barButtons[title] || document.querySelector(`[data-title="${title}"]`); - let active = true; + function autoscaleButton() { + // We need to check if the button is active or not + const title = "Auto Scale (Ctrl+Shift+A)"; + const button = + barButtons[title] || document.querySelector(`[data-title="${title}"]`); + let active = true; - if (button.style.border === "transparent") { - plotDiv.removeAllListeners("plotly_relayout"); - active = false; - plotDiv.on( - "plotly_relayout", - non_blocking(async function (eventdata) { - if (eventdata["xaxis.range[0]"] === undefined) return; - if (dateSliced) { - const data = { ...originalData }; - await DynamicLoad({ - event: eventdata, - figure: data, - }).then(async (to_update) => { - setPlotData(to_update); - Plotly.react(plotDiv, to_update.data, to_update.layout); - const scaled = await autoScaling(eventdata, plotDiv); - setYaxisFixedRange(scaled.yaxis_fixedrange); - Plotly.update(plotDiv, {}, scaled.to_update); - }); - } else { - const scaled = await autoScaling(eventdata, plotDiv); - setYaxisFixedRange(scaled.yaxis_fixedrange); - Plotly.update(plotDiv, {}, scaled.to_update); - } - }, 100), - ); - } - // If the button isn't active, we remove the listener so - // the graphs don't autoscale anymore - else { - plotDiv.removeAllListeners("plotly_relayout"); - yaxisFixedRange.forEach((yaxis) => { - plotDiv.layout[yaxis].fixedrange = false; - }); - setYaxisFixedRange({}); - if (dateSliced) { - plotDiv.on( - "plotly_relayout", - non_blocking(async function (eventdata) { - if (eventdata["xaxis.range[0]"] === undefined) return; - const data = { ...originalData }; - await DynamicLoad({ - event: eventdata, - figure: data, - }).then(async (to_update) => { - setPlotData(to_update); - Plotly.react(plotDiv, to_update.data, to_update.layout); - }); - }, 100), - ); - } - } + if (button.style.border === "transparent") { + plotDiv.removeAllListeners("plotly_relayout"); + active = false; + plotDiv.on( + "plotly_relayout", + non_blocking(async function (eventdata) { + if (eventdata["xaxis.range[0]"] === undefined) return; + if (dateSliced) { + const data = { ...originalData }; + await DynamicLoad({ + event: eventdata, + figure: data, + }).then(async (to_update) => { + setPlotData(to_update); + Plotly.react(plotDiv, to_update.data, to_update.layout); + const scaled = await autoScaling(eventdata, plotDiv); + setYaxisFixedRange(scaled.yaxis_fixedrange); + Plotly.update(plotDiv, {}, scaled.to_update); + }); + } else { + const scaled = await autoScaling(eventdata, plotDiv); + setYaxisFixedRange(scaled.yaxis_fixedrange); + Plotly.update(plotDiv, {}, scaled.to_update); + } + }, 100), + ); + } + // If the button isn't active, we remove the listener so + // the graphs don't autoscale anymore + else { + plotDiv.removeAllListeners("plotly_relayout"); + yaxisFixedRange.forEach((yaxis) => { + plotDiv.layout[yaxis].fixedrange = false; + }); + setYaxisFixedRange([]); + if (dateSliced) { + plotDiv.on( + "plotly_relayout", + non_blocking(async function (eventdata) { + if (eventdata["xaxis.range[0]"] === undefined) return; + const data = { ...originalData }; + await DynamicLoad({ + event: eventdata, + figure: data, + }).then(async (to_update) => { + setPlotData(to_update); + Plotly.react(plotDiv, to_update.data, to_update.layout); + }); + }, 100), + ); + } + } - button_pressed(title, active); - } + button_pressed(title, active); + } - function changecolorButton() { - // We need to check if the button is active or not - const title = "Edit Color (Ctrl+E)"; - const button = - barButtons[title] || document.querySelector(`[data-title="${title}"]`); - let active = true; + function changecolorButton() { + // We need to check if the button is active or not + const title = "Edit Color (Ctrl+E)"; + const button = + barButtons[title] || document.querySelector(`[data-title="${title}"]`); + let active = true; - if (button.style.border === "transparent") { - active = false; - } + if (button.style.border === "transparent") { + active = false; + } - setColorActive(!active); - button_pressed(title, active); - } + setColorActive(!active); + button_pressed(title, active); + } - useEffect(() => { - if (autoScale) { - const scale = !autoScale; - console.log("activateAutoScale", scale); - autoscaleButton(); - setAutoScaling(false); - } - }, [autoScale]); + useEffect(() => { + if (autoScale) { + const scale = !autoScale; + console.log("activateAutoScale", scale); + autoscaleButton(); + setAutoScaling(false); + } + }, [autoScale]); - useEffect(() => { - if (changeColor) { - changecolorButton(); - setChangeColor(false); - } - }, [changeColor]); + useEffect(() => { + if (changeColor) { + changecolorButton(); + setChangeColor(false); + } + }, [changeColor]); - useEffect(() => { - if (changeTheme) { - try { - console.log("changeTheme", changeTheme); - const TRACES = plotData?.data.filter((trace) => - trace?.name?.startsWith("Volume"), - ); - const darkmode = !darkMode; + useEffect(() => { + if (changeTheme) { + try { + console.log("changeTheme", changeTheme); + const TRACES = plotData?.data.filter((trace) => + trace?.name?.startsWith("Volume"), + ); + const darkmode = !darkMode; - window.document.body.style.backgroundColor = darkmode ? "#000" : "#fff"; + window.document.body.style.backgroundColor = darkmode ? "#000" : "#fff"; - plotData.layout.font = { - ...(plotData.layout.font || {}), - color: darkmode ? "#fff" : "#000", - }; + plotData.layout.font = { + ...(plotData.layout.font || {}), + color: darkmode ? "#fff" : "#000", + }; - const changeIcon = darkmode ? ICONS.sunIcon : ICONS.moonIcon; + const changeIcon = darkmode ? ICONS.sunIcon : ICONS.moonIcon; - document - .querySelector('[data-title="Change Theme"]') - .getElementsByTagName("path")[0] - .setAttribute("d", changeIcon.path); + document + .querySelector('[data-title="Change Theme"]') + .getElementsByTagName("path")[0] + .setAttribute("d", changeIcon.path); - document - .querySelector('[data-title="Change Theme"]') - .getElementsByTagName("svg")[0] - .setAttribute("viewBox", changeIcon.viewBox); + document + .querySelector('[data-title="Change Theme"]') + .getElementsByTagName("svg")[0] + .setAttribute("viewBox", changeIcon.viewBox); - const volumeColorsDark = { - "#009600": "#00ACFF", - "#c80000": "#e4003a", - }; - const volumeColorsLight = { - "#e4003a": "#c80000", - "#00ACFF": "#009600", - }; + const volumeColorsDark = { + "#009600": "#00ACFF", + "#c80000": "#e4003a", + }; + const volumeColorsLight = { + "#e4003a": "#c80000", + "#00ACFF": "#009600", + }; - const volumeColors = darkmode ? volumeColorsDark : volumeColorsLight; + const volumeColors = darkmode ? volumeColorsDark : volumeColorsLight; - TRACES.forEach((trace) => { - if (trace.type === "bar") - trace.marker.color = trace.marker.color.map((color) => { - return volumeColors[color] || color; - }); - }); - plotData.layout.template = darkmode - ? DARK_CHARTS_TEMPLATE - : LIGHT_CHARTS_TEMPLATE; - setPlotData({ ...plotData }); - Plotly.react(plotDiv, plotData.data, plotData.layout); - setDarkMode(darkmode); - setChangeTheme(false); - } catch (e) { - console.log("error", e); - } - } - }, [changeTheme]); + TRACES.forEach((trace) => { + if (trace.type === "bar") + trace.marker.color = trace.marker.color.map((color) => { + return volumeColors[color] || color; + }); + }); + plotData.layout.template = darkmode + ? DARK_CHARTS_TEMPLATE + : LIGHT_CHARTS_TEMPLATE; + setPlotData({ ...plotData }); + Plotly.react(plotDiv, plotData.data, plotData.layout); + setDarkMode(darkmode); + setChangeTheme(false); + } catch (e) { + console.log("error", e); + } + } + }, [changeTheme]); - useEffect(() => { - if (plotLoaded) { - setDarkMode(true); - setAutoScaling(false); - const captureButtons = [ - "Download CSV", - "Download Chart as Image", - "Overlay chart from CSV", - "Add Text", - "Change Titles", - "Auto Scale (Ctrl+Shift+A)", - "Reset Axes", - ]; - const autoscale = document.querySelector('[data-title="Autoscale"]'); - if (autoscale) { - autoscale - .getElementsByTagName("path")[0] - .setAttribute("d", PlotlyIcons.home.path); - autoscale.setAttribute("data-title", "Reset Axes"); - } + useEffect(() => { + if (plotLoaded) { + setDarkMode(true); + setAutoScaling(false); + const captureButtons = [ + "Download CSV", + "Download Chart as Image", + "Overlay chart from CSV", + "Add Text", + "Change Titles", + "Auto Scale (Ctrl+Shift+A)", + "Reset Axes", + ]; + const autoscale = document.querySelector('[data-title="Autoscale"]'); + if (autoscale) { + autoscale + .getElementsByTagName("path")[0] + .setAttribute("d", PlotlyIcons.home.path); + autoscale.setAttribute("data-title", "Reset Axes"); + } - window.MODEBAR = document.getElementsByClassName( - "modebar-container", - )[0] as HTMLElement; - const modeBarButtons = window.MODEBAR.getElementsByClassName( - "modebar-btn", - ) as HTMLCollectionOf; + window.MODEBAR = document.getElementsByClassName( + "modebar-container", + )[0] as HTMLElement; + const modeBarButtons = window.MODEBAR.getElementsByClassName( + "modebar-btn", + ) as HTMLCollectionOf; - window.MODEBAR.style.cssText = `${window.MODEBAR.style.cssText}; display:flex;`; + window.MODEBAR.style.cssText = `${window.MODEBAR.style.cssText}; display:flex;`; - if (modeBarButtons) { - const barbuttons: any = {}; - for (let i = 0; i < modeBarButtons.length; i++) { - const btn = modeBarButtons[i]; - if (captureButtons.includes(btn.getAttribute("data-title"))) { - btn.classList.add("ph-capture"); - } - btn.style.border = "transparent"; - barbuttons[btn.getAttribute("data-title")] = btn; - } - setModeBarButtons(barbuttons); - } + if (modeBarButtons) { + const barbuttons: any = {}; + for (let i = 0; i < modeBarButtons.length; i++) { + const btn = modeBarButtons[i]; + if (captureButtons.includes(btn.getAttribute("data-title"))) { + btn.classList.add("ph-capture"); + } + btn.style.border = "transparent"; + barbuttons[btn.getAttribute("data-title")] = btn; + } + setModeBarButtons(barbuttons); + } - if (plotData?.layout?.yaxis?.type !== undefined) { - if (plotData.layout.yaxis.type === "log" && !LogYaxis) { - console.log("yaxis.type changed to log"); - setLogYaxis(true); + if (plotData?.layout?.yaxis?.type !== undefined) { + if (plotData.layout.yaxis.type === "log" && !LogYaxis) { + console.log("yaxis.type changed to log"); + setLogYaxis(true); - // const layout_update = { - // "yaxis.exponentformat": "none" - // }; - // Plotly.update(plotDiv, {}, layout_update); - } - if (plotData.layout.yaxis.type === "linear" && LogYaxis) { - console.log("yaxis.type changed to linear"); - setLogYaxis(false); + // const layout_update = { + // "yaxis.exponentformat": "none" + // }; + // Plotly.update(plotDiv, {}, layout_update); + } + if (plotData.layout.yaxis.type === "linear" && LogYaxis) { + console.log("yaxis.type changed to linear"); + setLogYaxis(false); - // We update the yaxis exponent format to none, - // set the tickformat to null and the exponentbase to 10 - const layout_update = { - "yaxis.exponentformat": "none", - "yaxis.tickformat": null, - "yaxis.exponentbase": 10, - }; - Plotly.update(plotDiv, {}, layout_update); - } - } + // We update the yaxis exponent format to none, + // set the tickformat to null and the exponentbase to 10 + const layout_update = { + "yaxis.exponentformat": "none", + "yaxis.tickformat": null, + "yaxis.exponentbase": 10, + }; + Plotly.update(plotDiv, {}, layout_update); + } + } - // We check to see if window.export_image is defined - if (window.export_image !== undefined) { - // We get the extension of the file and check if it is valid - const filename = window.export_image.split("/").pop(); - const extension = filename.split(".").pop().replace("jpg", "jpeg"); + // We check to see if window.export_image is defined + if (window.export_image !== undefined) { + // We get the extension of the file and check if it is valid + const filename = window.export_image.split("/").pop(); + const extension = filename.split(".").pop().replace("jpg", "jpeg"); - if (["jpeg", "png", "svg", "pdf"].includes(extension)) - non_blocking(async function () { - await hideModebar(); - await saveImage("MainChart", filename.split(".")[0], extension); - }, 2)(); - } + if (["jpeg", "png", "svg", "pdf"].includes(extension)) + non_blocking(async function () { + await hideModebar(); + await saveImage("MainChart", filename.split(".")[0], extension); + }, 2)(); + } - window.addEventListener("resize", async function () { - const update = await ResizeHandler({ - plotData, - volumeBars, - setMaximizePlot, - }); - const layout_update = update.layout_update; - const newPlotData = update.plotData; - const volume_update = update.volume_update; + window.addEventListener("resize", async function () { + const update = await ResizeHandler({ + plotData, + volumeBars, + setMaximizePlot, + }); + const layout_update = update.layout_update; + const newPlotData = update.plotData; + const volume_update = update.volume_update; - if (Object.keys(layout_update).length > 0) { - setPlotData(newPlotData); - setVolumeBars(volume_update); - Plotly.relayout(plotDiv, layout_update); - } - }); + if (Object.keys(layout_update).length > 0) { + setPlotData(newPlotData); + setVolumeBars(volume_update); + Plotly.relayout(plotDiv, layout_update); + } + }); - if (theme !== "dark") { - setChangeTheme(true); - } + if (theme !== "dark") { + setChangeTheme(true); + } - const traceTypes = originalData.data.map( - (trace) => trace.type === "candlestick", - ); - if ( - (originalData.data[0]?.x !== undefined && - originalData.data[0]?.x.length <= 1000) || - !traceTypes.includes(true) - ) - return; - setModal({ - name: "alertDialog", - data: { - title: "Warning", - content: `Data has been truncated to 1000 points for performance reasons. + const traceTypes = originalData.data.map( + (trace) => trace.type === "candlestick", + ); + if ( + (originalData.data[0]?.x !== undefined && + originalData.data[0]?.x.length <= 1000) || + !traceTypes.includes(true) + ) + return; + setModal({ + name: "alertDialog", + data: { + title: "Warning", + content: `Data has been truncated to 1000 points for performance reasons. Please use the zoom tool to see more data.`, - }, - }); - const new_data = CreateDataXrange(originalData.data); - setPlotData({ ...originalData, data: new_data }); - setDateSliced(true); - setAutoScaling(true); - } - }, [plotLoaded]); + }, + }); + const new_data = CreateDataXrange(originalData.data); + setPlotData({ ...originalData, data: new_data }); + setDateSliced(true); + setAutoScaling(true); + } + }, [plotLoaded]); - return ( -
- {loading && ( -
- - - - -
- )} -
-
-
-
- - { - console.log(overlay); - plotData.layout.showlegend = true; - setPlotData(overlay); - setPlotLoaded(false); - }} - plotlyData={plotData} - setLoading={setLoading} - open={modal.name === "overlayChart"} - close={onClose} - /> - setChartTitle(title)} - updateAxesTitles={(axesTitles) => setAxesTitles(axesTitles)} - defaultTitle={chartTitle} - plotlyData={plotData} - open={modal.name === "titleDialog"} - close={onClose} - /> - onAddAnnotation(data)} - deleteAnnotation={(data) => onDeleteAnnotation(data)} - /> - - + return ( +
+ {loading && ( +
+ + + + +
+ )} +
+
+
+
+ + { + console.log(overlay); + plotData.layout.showlegend = true; + setPlotData(overlay); + setPlotLoaded(false); + }} + plotlyData={plotData} + setLoading={setLoading} + open={modal.name === "overlayChart"} + close={onClose} + /> + setChartTitle(title)} + updateAxesTitles={(axesTitles) => setAxesTitles(axesTitles)} + defaultTitle={chartTitle} + plotlyData={plotData} + open={modal.name === "titleDialog"} + close={onClose} + /> + onAddAnnotation(data)} + deleteAnnotation={(data) => onDeleteAnnotation(data)} + /> + + -
-
-
- - - -
-

- {chartTitle} - {/* {source && ( +

+
+
+ + + +
+

+ {chartTitle} + {/* {source && ( {`[${source}]`} )} */} -

-

- {new Intl.DateTimeFormat("en-GB", { - dateStyle: "full", - timeStyle: "long", - }) - .format(date) - .replace(/:\d\d /, " ")} -
- {cmd} -

- {/* {source && typeof source === "string" && source.includes("*") && ( +

+

+ {new Intl.DateTimeFormat("en-GB", { + dateStyle: "full", + timeStyle: "long", + }) + .format(date) + .replace(/:\d\d /, " ")} +
+ {cmd} +

+ {/* {source && typeof source === "string" && source.includes("*") && (

*not affiliated

)} */} -
-
- { - if (!plotDiv) { - const plot = document.getElementById("plotlyChart"); - console.log("plot", plot); - if (plot) setPlotDiv(plot); - plot.globals = globals; - } - if (!plotLoaded) setPlotLoaded(true); - }} - className="w-full h-full" - divId="plotlyChart" - data={plotData.data} - layout={plotData.layout} - config={PlotConfig({ - setModal: setModal, - changeTheme: setChangeTheme, - autoScaling: setAutoScaling, - Loading: setLoading, - changeColor: setChangeColor, - downloadFinished: setDownloadFinished, - })} - /> -
-
-
- ); +
+
+ { + if (!plotDiv) { + const plot = document.getElementById("plotlyChart"); + console.log("plot", plot); + if (plot) setPlotDiv(plot); + plot.globals = globals; + } + if (!plotLoaded) setPlotLoaded(true); + }} + className="w-full h-full" + divId="plotlyChart" + data={plotData.data} + layout={plotData.layout} + config={PlotConfig({ + setModal: setModal, + changeTheme: setChangeTheme, + autoScaling: setAutoScaling, + Loading: setLoading, + changeColor: setChangeColor, + downloadFinished: setDownloadFinished, + })} + /> +
+
+
+ ); } diff --git a/openbb_terminal/core/plots/plotly.html b/openbb_terminal/core/plots/plotly.html index 59dba788562..302183d5cfc 100644 --- a/openbb_terminal/core/plots/plotly.html +++ b/openbb_terminal/core/plots/plotly.html @@ -77,7 +77,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ky(L,I){if(L){if(typeof L=="string")return lm(L,I);var K=Object.prototype.toString.call(L).slice(8,-1);return K==="Object"&&L.constructor&&(K=L.constructor.name),K==="Map"||K==="Set"?Array.from(L):K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K)?lm(L,I):void 0}}function lm(L,I){(I==null||I>L.length)&&(I=L.length);for(var K=0,se=new Array(I);K=L.length?{done:!0}:{done:!1,value:L[se++]}},e:function(_){throw _},f:Pe}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var R,E=!0,e=!1;return{s:function(){K=K.call(L)},n:function(){var _=K.next();return E=_.done,_},e:function(_){e=!0,R=_},f:function(){try{E||K.return==null||K.return()}finally{if(e)throw R}}}}var uf=String.fromCharCode,Sb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Eb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",x0={};function Cb(L,I){if(!x0[L]){x0[L]={};for(var K=0;K>>8,K[2*se+1]=R%256}return K},decompressFromUint8Array:function(L){if(L==null)return ll.decompress(L);for(var I=new Array(L.length/2),K=0,se=I.length;K>=1}else{for(Pe=1,se=0;se>=1}--k==0&&(k=Math.pow(2,w),w++),delete t[_]}else for(Pe=s[_],se=0;se>=1;--k==0&&(k=Math.pow(2,w),w++),s[e]=i++,_=String(E)}if(_!==""){if(Object.prototype.hasOwnProperty.call(t,_)){if(_.charCodeAt(0)<256){for(se=0;se>=1}else{for(Pe=1,se=0;se>=1}--k==0&&(k=Math.pow(2,w),w++),delete t[_]}else for(Pe=s[_],se=0;se>=1;--k==0&&(k=Math.pow(2,w),w++)}for(Pe=2,se=0;se>=1;for(;;){if(v<<=1,h==I-1){a.push(K(v));break}h++}return a.join("")},decompress:function(L){return L==null?"":L==""?null:ll._decompress(L.length,32768,function(I){return L.charCodeAt(I)})},_decompress:function(L,I,K){var se,Pe,R,E,e,_,k,i=[],w=[],v={val:K(0),position:I,index:1},h=4,s=4,t=3,a="";for(se=0;se<3;se+=1)i[se]=se;for(R=0,e=Math.pow(2,2),_=1;_!=e;)E=v.val&v.position,v.position>>=1,v.position==0&&(v.position=I,v.val=K(v.index++)),R|=(E>0?1:0)*_,_<<=1;switch(R){case 0:for(R=0,e=Math.pow(2,8),_=1;_!=e;)E=v.val&v.position,v.position>>=1,v.position==0&&(v.position=I,v.val=K(v.index++)),R|=(E>0?1:0)*_,_<<=1;k=uf(R);break;case 1:for(R=0,e=Math.pow(2,16),_=1;_!=e;)E=v.val&v.position,v.position>>=1,v.position==0&&(v.position=I,v.val=K(v.index++)),R|=(E>0?1:0)*_,_<<=1;k=uf(R);break;case 2:return""}for(i[3]=k,Pe=k,w.push(k);;){if(v.index>L)return"";for(R=0,e=Math.pow(2,t),_=1;_!=e;)E=v.val&v.position,v.position>>=1,v.position==0&&(v.position=I,v.val=K(v.index++)),R|=(E>0?1:0)*_,_<<=1;switch(k=R){case 0:for(R=0,e=Math.pow(2,8),_=1;_!=e;)E=v.val&v.position,v.position>>=1,v.position==0&&(v.position=I,v.val=K(v.index++)),R|=(E>0?1:0)*_,_<<=1;i[s++]=uf(R),k=s-1,h--;break;case 1:for(R=0,e=Math.pow(2,16),_=1;_!=e;)E=v.val&v.position,v.position>>=1,v.position==0&&(v.position=I,v.val=K(v.index++)),R|=(E>0?1:0)*_,_<<=1;i[s++]=uf(R),k=s-1,h--;break;case 2:return w.join("")}if(h==0&&(h=Math.pow(2,t),t++),i[k])a=i[k];else{if(k!==s)return null;a=Pe+Pe.charAt(0)}w.push(a),i[s++]=Pe+a.charAt(0),Pe=a,--h==0&&(h=Math.pow(2,t),t++)}}},Cu={DEBUG:!1,LIB_VERSION:"1.57.4"},Dw=Array.prototype,Fw=Object.prototype,F1=Fw.toString,Zk=Fw.hasOwnProperty,ai=typeof window<"u"?window:{},df=ai.navigator||{userAgent:""},ja=ai.document||{},Cl=df.userAgent,Yk=["localhost","127.0.0.1"],Lb=Dw.forEach,Pb=Dw.indexOf,Xk=Array.isArray,Ty={},Ra={log:function(){if(Cu.DEBUG&&!iu(window.console)&&window.console){for(var L=("__rrweb_original__"in window.console.log)?window.console.log.__rrweb_original__:window.console.log,I=arguments.length,K=new Array(I),se=0;se1?I-1:0),se=1;se0&&(I[se]=K)}),I},Qk=["$performance_raw"];function Uw(L,I){return K=L,se=function(R,E){return E&&Qk.indexOf(E)>-1?R:typeof R=="string"&&I!==null?R.slice(0,I):R},Pe=new Set,function R(E,e){return E!==Object(E)?se?se(E,e):E:Pe.has(E)?void 0:(Pe.add(E),Yu(E)?(_=[],Ju(E,function(k){_.push(R(k))})):(_={},ji(E,function(k,i){Pe.has(k)||(_[i]=R(k,i))})),_);var _}(K);var K,se,Pe}function B1(L){var I,K,se,Pe,R,E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",e=0,_=0,k="",i=[];if(!L)return L;L=eT(L);do I=(R=L.charCodeAt(e++)<<16|L.charCodeAt(e++)<<8|L.charCodeAt(e++))>>18&63,K=R>>12&63,se=R>>6&63,Pe=63&R,i[_++]=E.charAt(I)+E.charAt(K)+E.charAt(se)+E.charAt(Pe);while(e127&&E<2048?String.fromCharCode(E>>6|192,63&E|128):String.fromCharCode(E>>12|224,E>>6&63|128,63&E|128),e!==null&&(K>I&&(R+=L.substring(I,K)),R+=e,I=K=Pe+1)}return K>I&&(R+=L.substring(I,L.length)),R},Hc=(Qg=function(){for(var L=new Date().valueOf(),I=0;L==new Date().valueOf();)I++;return L.toString(16)+I.toString(16)},function(){var L=typeof window<"u"?(window.screen.height*window.screen.width).toString(16):"0";return Qg()+"-"+Math.random().toString(16).replace(".","")+"-"+function(){var I,K,se=Cl,Pe=0,R=[];function E(e,_){var k,i=0;for(k=0;k<_.length;k++)i|=R[k]<<8*k;return e^i}for(I=0;I=4&&(Pe=E(Pe,R),R=[]);return R.length>0&&(Pe=E(Pe,R)),Pe.toString(16)}()+"-"+L+"-"+Qg()}),tT=function(L){return!!/(google web preview|baiduspider|yandexbot|bingbot|googlebot|yahoo! slurp|ahrefsbot|facebookexternalhit|facebookcatalog|applebot|semrushbot|duckduckbot|twitterbot|rogerbot|linkedinbot|mj12bot|sitebulb|bot.htm|bot.php|hubspot|crawler)/i.test(L)},Ob=function(L,I){var K=I.replace(/[[]/,"\\[").replace(/[\]]/,"\\]"),se=new RegExp("[\\?&]"+K+"=([^&#]*)").exec(L);if(se===null||se&&typeof se[1]!="string"&&se[1].length)return"";var Pe=se[1];try{Pe=decodeURIComponent(Pe)}catch{Ra.error("Skipping decoding for malformed query param: "+Pe)}return Pe.replace(/\+/g," ")},Ib=function(L,I){var K=L.match(new RegExp(I+"=([^&]*)"));return K?K[1]:null},Up=function(){function L(I){return I&&(I.preventDefault=L.preventDefault,I.stopPropagation=L.stopPropagation),I}return L.preventDefault=function(){this.returnValue=!1},L.stopPropagation=function(){this.cancelBubble=!0},function(I,K,se,Pe,R){if(I)if(I.addEventListener&&!Pe)I.addEventListener(K,se,!!R);else{var E="on"+K,e=I[E];I[E]=function(_,k,i){return function(w){if(w=w||L(window.event)){var v,h=!0;Bw(i)&&(v=i(w));var s=k.call(_,w);return v!==!1&&s!==!1||(h=!1),h}}}(I,se,e)}else Ra.error("No valid element provided to register_event")}}();function Ay(L,I){var K=function(){var se=ja.createElement("script");se.type="text/javascript",se.src=L,se.onload=function(E){return I(void 0,E)},se.onerror=function(E){return I(E)};var Pe,R=ja.querySelectorAll("body > script");R.length>0?(Pe=R[0].parentNode)===null||Pe===void 0||Pe.insertBefore(se,R[0]):ja.body.appendChild(se)};ja.body?K():ja.addEventListener("DOMContentLoaded",K)}var po={campaignParams:function(L){var I=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gclid","fbclid","msclkid"].concat(L||[]),K={};return ji(I,function(se){var Pe=Ob(ja.URL,se);Pe.length&&(K[se]=Pe)}),K},searchEngine:function(){var L=ja.referrer;return L?L.search("https?://(.*)google.([^/?]*)")===0?"google":L.search("https?://(.*)bing.com")===0?"bing":L.search("https?://(.*)yahoo.com")===0?"yahoo":L.search("https?://(.*)duckduckgo.com")===0?"duckduckgo":null:null},searchInfo:function(){var L=po.searchEngine(),I=L!="yahoo"?"q":"p",K={};if(L!==null){K.$search_engine=L;var se=Ob(ja.referrer,I);se.length&&(K.ph_keyword=se)}return K},browser:function(L,I,K){return I=I||"",K||Yi(L," OPR/")?Yi(L,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(L)?"BlackBerry":Yi(L,"IEMobile")||Yi(L,"WPDesktop")?"Internet Explorer Mobile":Yi(L,"SamsungBrowser/")?"Samsung Internet":Yi(L,"Edge")||Yi(L,"Edg/")?"Microsoft Edge":Yi(L,"FBIOS")?"Facebook Mobile":Yi(L,"Chrome")?"Chrome":Yi(L,"CriOS")?"Chrome iOS":Yi(L,"UCWEB")||Yi(L,"UCBrowser")?"UC Browser":Yi(L,"FxiOS")?"Firefox iOS":Yi(I,"Apple")?Yi(L,"Mobile")?"Mobile Safari":"Safari":Yi(L,"Android")?"Android Mobile":Yi(L,"Konqueror")?"Konqueror":Yi(L,"Firefox")?"Firefox":Yi(L,"MSIE")||Yi(L,"Trident/")?"Internet Explorer":Yi(L,"Gecko")?"Mozilla":""},browserVersion:function(L,I,K){var se={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/}[po.browser(L,I,K)];if(se===void 0)return null;var Pe=L.match(se);return Pe?parseFloat(Pe[Pe.length-2]):null},browserLanguage:function(){return df.language||df.userLanguage},os:function(L){if(/Windows/i.test(L)){if(/Phone/.test(L)||/WPDesktop/.test(L))return{os_name:"Windows Phone",os_version:""};var I=/Windows NT ([0-9.]+)/i.exec(L);return I&&I[1]?{os_name:"Windows",os_version:I[1]}:{os_name:"Windows",os_version:""}}if(/(iPhone|iPad|iPod)/.test(L)){var K=/OS (\d+)_(\d+)_?(\d+)?/i.exec(L);return K&&K[1]?{os_name:"iOS",os_version:[K[1],K[2],K[3]||"0"].join(".")}:{os_name:"iOS",os_version:""}}if(/Android/.test(L)){var se=/Android (\d+)\.(\d+)\.?(\d+)?/i.exec(L);return se&&se[1]?{os_name:"Android",os_version:[se[1],se[2],se[3]||"0"].join(".")}:{os_name:"Android",os_version:""}}if(/(BlackBerry|PlayBook|BB10)/i.test(L))return{os_name:"BlackBerry",os_version:""};if(/Mac/i.test(L)){var Pe=/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i.exec(L);return Pe&&Pe[1]?{os_name:"Mac OS X",os_version:[Pe[1],Pe[2],Pe[3]||"0"].join(".")}:{os_name:"Mac OS X",os_version:""}}return/Linux/.test(L)?{os_name:"Linux",os_version:""}:/CrOS/.test(L)?{os_name:"Chrome OS",os_version:""}:{os_name:"",os_version:""}},device:function(L){return/Windows Phone/i.test(L)||/WPDesktop/.test(L)?"Windows Phone":/iPad/.test(L)?"iPad":/iPod/.test(L)?"iPod Touch":/iPhone/.test(L)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(L)?"BlackBerry":/Android/.test(L)&&!/Mobile/.test(L)?"Android Tablet":/Android/.test(L)?"Android":""},deviceType:function(L){var I=this.device(L);return I==="iPad"||I==="Android Tablet"?"Tablet":I?"Mobile":"Desktop"},referrer:function(){return ja.referrer||"$direct"},referringDomain:function(){if(!ja.referrer)return"$direct";var L=ja.createElement("a");return L.href=ja.referrer,L.host},properties:function(){var L=po.os(Cl),I=L.os_name,K=L.os_version;return Eo(cm({$os:I,$os_version:K,$browser:po.browser(Cl,df.vendor,ai.opera),$device:po.device(Cl),$device_type:po.deviceType(Cl)}),{$current_url:ai==null?void 0:ai.location.href,$host:ai==null?void 0:ai.location.host,$pathname:ai==null?void 0:ai.location.pathname,$browser_version:po.browserVersion(Cl,df.vendor,ai.opera),$browser_language:po.browserLanguage(),$screen_height:ai==null?void 0:ai.screen.height,$screen_width:ai==null?void 0:ai.screen.width,$viewport_height:ai==null?void 0:ai.innerHeight,$viewport_width:ai==null?void 0:ai.innerWidth,$lib:"web",$lib_version:Cu.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:(Date.now=Date.now||function(){return+new Date},Date.now()/1e3)})},people_properties:function(){var L=po.os(Cl),I=L.os_name,K=L.os_version;return Eo(cm({$os:I,$os_version:K,$browser:po.browser(Cl,df.vendor,ai.opera)}),{$browser_version:po.browserVersion(Cl,df.vendor,ai.opera)})}};function m1(L){switch(_f(L.className)){case"string":return L.className;case"object":return("baseVal"in L.className?L.className.baseVal:null)||L.getAttribute("class")||"";default:return""}}function y1(L){var I="";return j0(L)&&!Hw(L)&&L.childNodes&&L.childNodes.length&&ji(L.childNodes,function(K){Vw(K)&&K.textContent&&(I+=um(K.textContent).split(/(\s+)/).filter(xh).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))}),um(I)}function Rb(L){return!!L&&L.nodeType===1}function wf(L,I){return!!L&&!!L.tagName&&L.tagName.toLowerCase()===I.toLowerCase()}function Vw(L){return!!L&&L.nodeType===3}function zb(L){return!!L&&L.nodeType===11}var ev=["a","button","form","input","select","textarea","label"];function j0(L){for(var I=L;I.parentNode&&!wf(I,"body");I=I.parentNode){var K=m1(I).split(" ");if(Yi(K,"ph-sensitive")||Yi(K,"ph-no-capture"))return!1}if(Yi(m1(L).split(" "),"ph-include"))return!0;var se=L.type||"";if(typeof se=="string")switch(se.toLowerCase()){case"hidden":case"password":return!1}var Pe=L.name||L.id||"";return!(typeof Pe=="string"&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(Pe.replace(/[^a-zA-Z0-9]/g,"")))}function Hw(L){return!!(wf(L,"input")&&!["button","checkbox","submit","reset"].includes(L.type)||wf(L,"select")||wf(L,"textarea")||L.getAttribute("contenteditable")==="true")}function xh(L){return!(L===null||iu(L)||typeof L=="string"&&(L=um(L),/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/.test((L||"").replace(/[- ]/g,""))||/(^\d{3}-?\d{2}-?\d{4}$)/.test(L)))}function Db(L){var I=y1(L);return xh(I="".concat(I," ").concat(qw(L)).trim())?I:""}function qw(L){var I="";return L&&L.childNodes&&L.childNodes.length&&ji(L.childNodes,function(K){var se;if(K&&((se=K.tagName)===null||se===void 0?void 0:se.toLowerCase())==="span")try{var Pe=y1(K);I="".concat(I," ").concat(Pe).trim(),K.childNodes&&K.childNodes.length&&(I="".concat(I," ").concat(qw(K)).trim())}catch(R){console.error(R)}}),I}var nT=function(){function L(I){Xo(this,L),this.clicks=[],this.enabled=I}return $o(L,[{key:"isRageClick",value:function(I,K,se){if(!this.enabled)return!1;var Pe=this.clicks[this.clicks.length-1];if(Pe&&Math.abs(I-Pe.x)+Math.abs(K-Pe.y)<30&&se-Pe.timestamp<1e3){if(this.clicks.push({x:I,y:K,timestamp:se}),this.clicks.length===3)return!0}else this.clicks=[{x:I,y:K,timestamp:se}];return!1}}]),L}(),rT=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,Mu={is_supported:function(){return!0},error:function(L){Ra.error("cookieStore error: "+L)},get:function(L){try{for(var I=L+"=",K=document.cookie.split(";"),se=0;se-1&&!K&&(se.toLowerCase()==="a"||se.toLowerCase()==="button"?Pe.$el_text=Db(L):Pe.$el_text=y1(L));var R=m1(L);R.length>0&&(Pe.classes=R.split(" ").filter(function(k){return k!==""})),ji(L.attributes,function(k){var i;Hw(L)&&["name","id","class"].indexOf(k.name)===-1||!I&&xh(k.value)&&(typeof(i=k.name)!="string"||i.substring(0,10)!=="_ngcontent"&&i.substring(0,7)!=="_nghost")&&(Pe["attr__"+k.name]=k.value)});for(var E=1,e=1,_=L;_=this._previousElementSibling(_);)E++,_.tagName===L.tagName&&e++;return Pe.nth_child=E,Pe.nth_of_type=e,Pe},_getDefaultProperties:function(L){return{$event_type:L,$ce_version:1}},_extractCustomPropertyValue:function(L){var I=[];return ji(document.querySelectorAll(L.css_selector),function(K){var se;["input","select"].indexOf(K.tagName.toLowerCase())>-1?se=K.value:K.textContent&&(se=K.textContent),xh(se)&&I.push(se)}),I.join(", ")},_getCustomProperties:function(L){var I=this,K={};return ji(this._customProperties,function(se){ji(se.event_selectors,function(Pe){ji(document.querySelectorAll(Pe),function(R){Yi(L,R)&&j0(R)&&(K[se.name]=I._extractCustomPropertyValue(se))})})}),K},_getEventTarget:function(L){return L.target===void 0?L.srcElement||null:(I=L.target)!==null&&I!==void 0&&I.shadowRoot?L.composedPath()[0]||null:L.target||null;var I},_captureEvent:function(L,I){var K,se=this,Pe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"$autocapture",R=this._getEventTarget(L);if(Vw(R)&&(R=R.parentNode||null),Pe==="$autocapture"&&L.type==="click"&&L instanceof MouseEvent&&(K=this.rageclicks)!==null&&K!==void 0&&K.isRageClick(L.clientX,L.clientY,new Date().getTime())&&this._captureEvent(L,I,"$rageclick"),R&&function(h,s){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;if(!h||wf(h,"html")||!Rb(h))return!1;if(t!=null&&t.url_allowlist){var a=window.location.href,r=t.url_allowlist;if(r&&!r.some(function(y){return a.match(y)}))return!1}if(t!=null&&t.dom_event_allowlist){var n=t.dom_event_allowlist;if(n&&!n.some(function(y){return s.type===y}))return!1}if(t!=null&&t.element_allowlist){var o=t.element_allowlist;if(o&&!o.some(function(y){return h.tagName.toLowerCase()===y}))return!1}if(t!=null&&t.css_selector_allowlist){var l=t.css_selector_allowlist;if(l&&!l.some(function(y){return h.matches(y)}))return!1}for(var u=!1,d=[h],c=!0,b=h;b.parentNode&&!wf(b,"body");)if(zb(b.parentNode))d.push(b.parentNode.host),b=b.parentNode.host;else{if(!(c=b.parentNode||!1))break;if(ev.indexOf(c.tagName.toLowerCase())>-1)u=!0;else{var g=window.getComputedStyle(c);g&&g.getPropertyValue("cursor")==="pointer"&&(u=!0)}d.push(c),b=c}var f=window.getComputedStyle(h);if(f&&f.getPropertyValue("cursor")==="pointer"&&s.type==="click")return!0;var x=h.tagName.toLowerCase();switch(x){case"html":return!1;case"form":return s.type==="submit";case"input":case"select":case"textarea":return s.type==="change"||s.type==="click";default:return u?s.type==="click":s.type==="click"&&(ev.indexOf(x)>-1||h.getAttribute("contenteditable")==="true")}}(R,L,this.config)){for(var E=[R],e=R;e.parentNode&&!wf(e,"body");)zb(e.parentNode)?(E.push(e.parentNode.host),e=e.parentNode.host):(E.push(e.parentNode),e=e.parentNode);var _,k=[],i={},w=!1;if(ji(E,function(h){var s=j0(h);h.tagName.toLowerCase()==="a"&&(_=h.getAttribute("href"),_=s&&xh(_)&&_),Yi(m1(h).split(" "),"ph-no-capture")&&(w=!0),k.push(se._getPropertiesFromElement(h,I.get_config("mask_all_element_attributes"),I.get_config("mask_all_text")));var t=se._getAugmentPropertiesFromElement(h);Eo(i,t)}),I.get_config("mask_all_text")||(R.tagName.toLowerCase()==="a"||R.tagName.toLowerCase()==="button"?k[0].$el_text=Db(R):k[0].$el_text=y1(R)),_&&(k[0].attr__href=_),w)return!1;var v=Eo(this._getDefaultProperties(L.type),{$elements:k},this._getCustomProperties(E),i);return I.capture(Pe,v),!0}},_navigate:function(L){window.location.href=L},_addDomEventHandlers:function(L){var I=this,K=function(se){se=se||window.event,I._captureEvent(se,L)};Up(document,"submit",K,!1,!0),Up(document,"change",K,!1,!0),Up(document,"click",K,!1,!0)},_customProperties:[],rageclicks:null,config:void 0,init:function(L){var I;typeof L.__autocapture!="boolean"&&(this.config=L.__autocapture),(I=this.config)!==null&&I!==void 0&&I.url_allowlist&&(this.config.url_allowlist=this.config.url_allowlist.map(function(K){return new RegExp(K)})),this.rageclicks=new nT(L.get_config("rageclick"))},afterDecideResponse:function(L,I){this._setIsAutocaptureEnabled(I);var K=I.get_config("token");this._initializedTokens.indexOf(K)>-1?Ra.log('autocapture already initialized for token "'+K+'"'):(I.persistence&&I.persistence.register(yi({},Fb,!!L.autocapture_opt_out)),this._initializedTokens.push(K),L&&L.config&&L.config.enable_collect_everything&&this._isAutocaptureEnabled?(L.custom_properties&&(this._customProperties=L.custom_properties),this._addDomEventHandlers(I)):I.__autocapture=!1)},enabledForProject:function(L,I,K){if(!L)return!0;I=iu(I)?10:I,K=iu(K)?10:K;for(var se=0,Pe=0;Pe1&&arguments[1]!==void 0?arguments[1]:{};if(!this.getFlags())return console.warn('getFeatureFlag for key "'+I+`" failed. Feature flags didn't load in time.`),!1;var se=this.getFlagVariants()[I];return!K.send_event&&"send_event"in K||this.flagCallReported[I]||(this.flagCallReported[I]=!0,this.instance.capture("$feature_flag_called",{$feature_flag:I,$feature_flag_response:se})),se}},{key:"getFeatureFlagPayload",value:function(I){return this.getFlagPayloads()[I]}},{key:"isFeatureEnabled",value:function(I){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.getFlags()?!!this.getFeatureFlag(I,K):(console.warn('isFeatureEnabled for key "'+I+`" failed. Feature flags didn't load in time.`),!1)}},{key:"addFeatureFlagsHandler",value:function(I){this.featureFlagEventHandlers.push(I)}},{key:"removeFeatureFlagsHandler",value:function(I){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(function(K){return K!==I})}},{key:"receivedFeatureFlags",value:function(I){this.instance.decideEndpointWasHit=!0;var K=this.getFlagVariants(),se=this.getFlagPayloads();(function(Pe,R){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},_=Pe.featureFlags,k=Pe.featureFlagPayloads;if(_)if(Array.isArray(_)){var i,w={};if(_)for(var v=0;v<_.length;v++)w[_[v]]=!0;R&&R.register((yi(i={},rv,_),yi(i,bh,w),i))}else{var h,s=_,t=k;Pe.errorsWhileComputingFlags&&(s=hi(hi({},E),s),t=hi(hi({},e),t)),R&&R.register((yi(h={},rv,Object.keys(Hb(s))),yi(h,bh,s||{}),yi(h,Vb,t||{}),h))}})(I,this.instance.persistence,K,se),this._fireFeatureFlagsCallbacks()}},{key:"override",value:function(I){if(this._override_warning=!1,I===!1)this.instance.persistence.unregister(_0);else if(Array.isArray(I)){for(var K={},se=0;se1&&arguments[1]!==void 0&&arguments[1],Pe=this.instance.get_property(dm);if(Pe&&!se)return I(Pe);this.instance._send_request("".concat(this.instance.get_config("api_host"),"/api/early_access_features/?token=").concat(this.instance.get_config("token")),{},{method:"GET"},function(R){var E=R.earlyAccessFeatures;return K.instance.persistence.register(yi({},dm,E)),I(E)})}},{key:"_prepareFeatureFlagsForCallbacks",value:function(){var I=this.getFlags(),K=this.getFlagVariants();return{flags:I.filter(function(se){return K[se]}),flagVariants:Object.keys(K).filter(function(se){return K[se]}).reduce(function(se,Pe){return se[Pe]=K[Pe],se},{})}}},{key:"_fireFeatureFlagsCallbacks",value:function(){var I=this._prepareFeatureFlagsForCallbacks(),K=I.flags,se=I.flagVariants;this.featureFlagEventHandlers.forEach(function(Pe){return Pe(K,se)})}},{key:"setPersonPropertiesForFlags",value:function(I){var K=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],se=this.instance.get_property(_h)||{};this.instance.register(yi({},_h,hi(hi({},se),I))),K&&this.instance.reloadFeatureFlags()}},{key:"resetPersonPropertiesForFlags",value:function(){this.instance.unregister(_h)}},{key:"setGroupPropertiesForFlags",value:function(I){var K=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],se=this.instance.get_property(Ac)||{};Object.keys(se).length!==0&&Object.keys(se).forEach(function(Pe){se[Pe]=hi(hi({},se[Pe]),I[Pe]),delete I[Pe]}),this.instance.register(yi({},Ac,hi(hi({},se),I))),K&&this.instance.reloadFeatureFlags()}},{key:"resetGroupPropertiesForFlags",value:function(I){if(I){var K=this.instance.get_property(Ac)||{};this.instance.register(yi({},Ac,hi(hi({},K),{},yi({},I,{}))))}else this.instance.unregister(Ac)}}]),L}(),dT="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJibGFjayIvPgo8cGF0aCBkPSJNOCAwSDE2TDAgMTZWOEw4IDBaIiBmaWxsPSIjMkQyRDJEIi8+CjxwYXRoIGQ9Ik0xNiA4VjE2SDhMMTYgOFoiIGZpbGw9IiMyRDJEMkQiLz4KPC9zdmc+Cg==",qb=2,gT=4,vT=6,mT="rrweb/console@1",ku,yT="/e/";(function(L){L[L.Mutation=0]="Mutation",L[L.MouseMove=1]="MouseMove",L[L.MouseInteraction=2]="MouseInteraction",L[L.Scroll=3]="Scroll",L[L.ViewportResize=4]="ViewportResize",L[L.Input=5]="Input",L[L.TouchMove=6]="TouchMove",L[L.MediaInteraction=7]="MediaInteraction",L[L.StyleSheetRule=8]="StyleSheetRule",L[L.CanvasMutation=9]="CanvasMutation",L[L.Font=10]="Font",L[L.Log=11]="Log",L[L.Drag=12]="Drag",L[L.StyleDeclaration=13]="StyleDeclaration"})(ku||(ku={}));var xT=[ku.MouseMove,ku.MouseInteraction,ku.Scroll,ku.ViewportResize,ku.Input,ku.TouchMove,ku.MediaInteraction,ku.Drag],bT=function(){function L(I){Xo(this,L),yi(this,"lastActivityTimestamp",Date.now()),yi(this,"isIdle",!1),this.instance=I,this.captureStarted=!1,this.snapshots=[],this.emit=!1,this.endpoint=yT,this.stopRrweb=void 0,this.windowId=null,this.sessionId=null,this.receivedDecide=!1}return $o(L,[{key:"startRecordingIfEnabled",value:function(){this.isRecordingEnabled()?this.startCaptureAndTrySendingQueuedSnapshots():this.stopRecording()}},{key:"started",value:function(){return this.captureStarted}},{key:"stopRecording",value:function(){this.captureStarted&&this.stopRrweb&&(this.stopRrweb(),this.stopRrweb=void 0,this.captureStarted=!1)}},{key:"isRecordingEnabled",value:function(){var I=!!this.instance.get_property(hm),K=!this.instance.get_config("disable_session_recording");return I&&K}},{key:"isConsoleLogCaptureEnabled",value:function(){var I=!!this.instance.get_property(Bb),K=this.instance.get_config("enable_recording_console_log");return K??I}},{key:"getRecordingVersion",value:function(){var I,K=this.instance.get_property(Nb);return((I=this.instance.get_config("session_recording"))===null||I===void 0?void 0:I.recorderVersion)||K||"v1"}},{key:"afterDecideResponse",value:function(I){var K,se,Pe,R,E,e;this.receivedDecide=!0,this.instance.persistence&&this.instance.persistence.register((yi(E={},hm,!!I.sessionRecording),yi(E,Bb,(Pe=I.sessionRecording)===null||Pe===void 0?void 0:Pe.consoleLogRecordingEnabled),yi(E,Nb,(R=I.sessionRecording)===null||R===void 0?void 0:R.recorderVersion),E)),(K=I.sessionRecording)!==null&&K!==void 0&&K.endpoint&&(this.endpoint=(e=I.sessionRecording)===null||e===void 0?void 0:e.endpoint),(se=I.sessionRecording)!==null&&se!==void 0&&se.recorderVersion&&(this.recorderVersion=I.sessionRecording.recorderVersion),this.startRecordingIfEnabled()}},{key:"startCaptureAndTrySendingQueuedSnapshots",value:function(){var I=this;this.receivedDecide&&(this.emit=!0,this.snapshots.forEach(function(K){return I._captureSnapshot(K)})),this._startCapture()}},{key:"_startCapture",value:function(){var I=this;if(Object.assign!==void 0&&!this.captureStarted&&!this.instance.get_config("disable_session_recording")){this.captureStarted=!0,this.instance.sessionManager.checkAndGetSessionAndWindowId();var K=this.getRecordingVersion()==="v2"?"recorder-v2.js":"recorder.js";this.instance.__loaded_recorder_version!==this.getRecordingVersion()?Ay(this.instance.get_config("api_host")+"/static/".concat(K,"?v=").concat(Cu.LIB_VERSION),function(se){if(se)return Ra.error("Could not load ".concat(K),se);I._onScriptLoaded()}):this._onScriptLoaded()}}},{key:"_isInteractiveEvent",value:function(I){var K;return I.type===3&&xT.indexOf((K=I.data)===null||K===void 0?void 0:K.source)!==-1}},{key:"_updateWindowAndSessionIds",value:function(I){var K=this._isInteractiveEvent(I);if(K||this.isIdle||I.timestamp-this.lastActivityTimestamp>3e5&&(this.isIdle=!0),K&&(this.lastActivityTimestamp=I.timestamp,this.isIdle&&(this.isIdle=!1,this._tryTakeFullSnapshot())),!this.isIdle){var se=this.instance.sessionManager.checkAndGetSessionAndWindowId(!K,I.timestamp),Pe=se.windowId,R=se.sessionId;[qb,gT].indexOf(I.type)!==-1||this.windowId===Pe&&this.sessionId===R||this._tryTakeFullSnapshot(),this.windowId=Pe,this.sessionId=R}}},{key:"_tryTakeFullSnapshot",value:function(){if(!this.captureStarted)return!1;try{var I;return(I=this.rrwebRecord)===null||I===void 0||I.takeFullSnapshot(),!0}catch(K){return Ra.error("Error taking full snapshot.",K),!1}}},{key:"_onScriptLoaded",value:function(){var I=this,K={blockClass:"ph-no-capture",blockSelector:void 0,ignoreClass:"ph-ignore-input",maskTextClass:"ph-mask",maskTextSelector:void 0,maskAllInputs:!0,maskInputOptions:{},maskInputFn:void 0,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0};this.rrwebRecord=window.rrweb?window.rrweb.record:window.rrwebRecord;for(var se=this.instance.get_config("session_recording"),Pe=0,R=Object.entries(se||{});Pe10&&(se.data.payload.payload=se.data.payload.payload.slice(0,10),se.data.payload.payload.push("...[truncated]"));for(var Pe=[],R=0;R2e3?Pe.push(se.data.payload.payload[R].slice(0,2e3)+"...[truncated]"):Pe.push(se.data.payload.payload[R]);return se.data.payload.payload=Pe,se}return se}(function(se){if(se&&_f(se)==="object"){var Pe=JSON.stringify(se);if(Pe.length>5e6){var R,E=Wc(Pe.matchAll(/data:([\w\/\-\.]+);(\w+),([^)"]*)/gim));try{for(E.s();!(R=E.n()).done;){var e=R.value;Pe=e[1].toLocaleLowerCase().slice(0,6)==="image/"?Pe.replace(e[0],dT):Pe.replace(e[0],"")}}catch(_){E.e(_)}finally{E.f()}}return JSON.parse(Pe)}return se}(I)),this._updateWindowAndSessionIds(I),!this.isIdle){var K={$snapshot_data:I,$session_id:this.sessionId,$window_id:this.windowId};this.instance._captureMetrics.incr("rrweb-record"),this.instance._captureMetrics.incr("rrweb-record-".concat(I.type)),this.emit?this._captureSnapshot(K):this.snapshots.push(K)}}},{key:"_captureSnapshot",value:function(I){this.instance.capture("$snapshot",I,{transport:"XHR",method:"POST",endpoint:this.endpoint,_noTruncate:!0,_batchKey:"sessionRecording",_metrics:{rrweb_full_snapshot:I.$snapshot_data.type===qb}})}}]),L}(),_u={entryType:0,timeOrigin:1,name:2,startTime:3,redirectStart:4,redirectEnd:5,workerStart:6,fetchStart:7,domainLookupStart:8,domainLookupEnd:9,connectStart:10,secureConnectionStart:11,connectEnd:12,requestStart:13,responseStart:14,responseEnd:15,decodedBodySize:16,encodedBodySize:17,initiatorType:18,nextHopProtocol:19,renderBlockingStatus:20,responseStatus:21,transferSize:22,element:23,renderTime:24,loadTime:25,size:26,id:27,url:28,domComplete:29,domContentLoadedEvent:30,domInteractive:31,loadEventEnd:32,loadEventStart:33,redirectCount:34,navigationType:35,unloadEventEnd:36,unloadEventStart:37,duration:39,timestamp:40},_T=["first-input","navigation","paint","resource"],wT=["/s/","/e/"],kT=function(){function L(I){Xo(this,L),yi(this,"_forceAllowLocalhost",!1),this.instance=I}return $o(L,[{key:"startObservingIfEnabled",value:function(){this.isEnabled()?this.startObserving():this.stopObserving()}},{key:"startObserving",value:function(){var I=this;if(!this.observer)if(!Yk.includes(location.hostname)||this._forceAllowLocalhost)try{this.observer=new PerformanceObserver(function(se){se.getEntries().forEach(function(Pe){I._capturePerformanceEvent(Pe)})});var K=PerformanceObserver.supportedEntryTypes.filter(function(se){return _T.includes(se)});K.forEach(function(se){var Pe;(Pe=I.observer)===null||Pe===void 0||Pe.observe({type:se,buffered:!0})})}catch(se){console.error("PostHog failed to start performance observer",se),this.stopObserving()}else Ra.log("PostHog Peformance observer not started because we are on localhost.")}},{key:"stopObserving",value:function(){this.observer&&(this.observer.disconnect(),this.observer=void 0)}},{key:"isObserving",value:function(){return!!this.observer}},{key:"isEnabled",value:function(){var I,K;return(I=(K=this.instance.get_config("capture_performance"))!==null&&K!==void 0?K:this.remoteEnabled)!==null&&I!==void 0&&I}},{key:"afterDecideResponse",value:function(I){this.remoteEnabled=I.capturePerformance||!1,this.isEnabled()&&this.startObserving()}},{key:"_capturePerformanceEvent",value:function(I){if(I.name.indexOf(this.instance.get_config("api_host"))===0){var K=I.name.replace(this.instance.get_config("api_host"),"");if(wT.find(function(h){return K.indexOf(h)===0}))return}var se={url:I.name},Pe=this.instance.get_config("session_recording");if(Pe.maskNetworkRequestFn&&(se=Pe.maskNetworkRequestFn(se)),se){var R=I.toJSON();R.name=se.url;var E={},e=Math.floor(Date.now()-performance.now());for(var _ in E[_u.timeOrigin]=e,E[_u.timestamp]=Math.floor(e+I.startTime),_u)R[_]!==void 0&&(E[_u[_]]=R[_]);if(this.capturePerformanceEvent(E),TT(I)){var k,i=Wc(I.serverTiming||[]);try{for(i.s();!(k=i.n()).done;){var w,v=k.value;this.capturePerformanceEvent((yi(w={},_u.timeOrigin,e),yi(w,_u.timestamp,Math.floor(e+I.startTime)),yi(w,_u.name,v.name),yi(w,_u.duration,v.duration),yi(w,_u.entryType,"serverTiming"),w))}}catch(h){i.e(h)}finally{i.f()}}}}},{key:"capturePerformanceEvent",value:function(I){var K,se=I[_u.timestamp];(K=this.instance.sessionRecording)===null||K===void 0||K.onRRwebEmit({type:6,data:{plugin:"posthog/network@1",payload:I},timestamp:se})}}]),L}(),TT=function(L){return L.entryType==="navigation"||L.entryType==="resource"},AT=function(){function L(I){Xo(this,L),this.instance=I,this.instance.decideEndpointWasHit=this.instance._hasBootstrappedFeatureFlags()}return $o(L,[{key:"call",value:function(){var I=this,K=B1(JSON.stringify({token:this.instance.get_config("token"),distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups(),person_properties:this.instance.get_property(_h),group_properties:this.instance.get_property(Ac)}));this.instance._send_request("".concat(this.instance.get_config("api_host"),"/decide/?v=3"),{data:K,verbose:!0},{method:"POST"},function(se){return I.parseDecideResponse(se)})}},{key:"parseDecideResponse",value:function(I){var K,se,Pe=this;if((I==null?void 0:I.status)!==0){if(this.instance.decideEndpointWasHit=!0,!document||!document.body)return console.log("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(function(){Pe.parseDecideResponse(I)},500);if(this.instance.toolbar.afterDecideResponse(I),(K=this.instance.sessionRecording)===null||K===void 0||K.afterDecideResponse(I),Ec.afterDecideResponse(I,this.instance),(se=this.instance.webPerformance)===null||se===void 0||se.afterDecideResponse(I),this.instance.featureFlags.receivedFeatureFlags(I),this.instance.compression={},I.supportedCompression&&!this.instance.get_config("disable_compression")){var R,E={},e=Wc(I.supportedCompression);try{for(e.s();!(R=e.n()).done;)E[R.value]=!0}catch(v){e.e(v)}finally{e.f()}this.instance.compression=E}if(I.siteApps)if(this.instance.get_config("opt_in_site_apps")){var _,k=this.instance.get_config("api_host"),i=Wc(I.siteApps);try{var w=function(){var v=_.value,h=v.id,s=v.url,t=[k,k[k.length-1]==="/"&&s[0]==="/"?s.substring(1):s].join("");window["__$$ph_site_app_".concat(h)]=Pe.instance,Ay(t,function(a){a&&console.error("Error while initializing PostHog app with config id ".concat(h),a)})};for(i.s();!(_=i.n()).done;)w()}catch(v){i.e(v)}finally{i.f()}}else I.siteApps.length>0&&console.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}else console.error("Failed to fetch feature flags from PostHog.")}}]),L}(),MT=["https://app.posthog.com","https://eu.posthog.com"],ST=["source"],ET=function(){function L(I){Xo(this,L),this.instance=I}return $o(L,[{key:"afterDecideResponse",value:function(I){var K=I.toolbarParams||I.editorParams||(I.toolbarVersion?{toolbarVersion:I.toolbarVersion}:{});I.isAuthenticated&&K.toolbarVersion&&K.toolbarVersion.indexOf("toolbar")===0&&this.loadToolbar(hi({},K))}},{key:"maybeLoadToolbar",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.location,K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,se=arguments.length>2&&arguments[2]!==void 0?arguments[2]:window.history;try{if(!K){try{window.localStorage.setItem("test","test"),window.localStorage.removeItem("test")}catch{return!1}K=window.localStorage}var Pe,R=Ib(I.hash,"__posthog")||Ib(I.hash,"state"),E=R?JSON.parse(decodeURIComponent(R)):null;return E&&E.action==="ph_authorize"?((Pe=E).source="url",Pe&&Object.keys(Pe).length>0&&(E.desiredHash?I.hash=E.desiredHash:se?se.replaceState("",document.title,I.pathname+I.search):I.hash="")):((Pe=JSON.parse(K.getItem("_postHogToolbarParams")||"{}")).source="localstorage",delete Pe.userIntent),!(!Pe.token||this.instance.get_config("token")!==Pe.token)&&(this.loadToolbar(Pe),!0)}catch{return!1}}},{key:"loadToolbar",value:function(I){var K=this;if(window._postHogToolbarLoaded)return!1;window._postHogToolbarLoaded=!0;var se=this.instance.get_config("api_host"),Pe=3e4*Math.floor(Date.now()/3e4),R="".concat(se).concat(se.endsWith("/")?"":"/","static/toolbar.js?_ts=").concat(Pe),E=!MT.includes(this.instance.get_config("api_host"))&&this.instance.get_config("advanced_disable_toolbar_metrics"),e=hi(hi({token:this.instance.get_config("token")},I),{},{apiURL:se},E?{instrument:!1}:{});e.source;var _=Gk(e,ST);return window.localStorage.setItem("_postHogToolbarParams",JSON.stringify(_)),Ay(R,function(k){k?Ra.error("Failed to load toolbar",k):(window.ph_load_toolbar||window.ph_load_editor)(e,K.instance)}),Up(window,"turbolinks:load",function(){window._postHogToolbarLoaded=!1,K.loadToolbar(e)}),!0}},{key:"_loadEditor",value:function(I){return this.loadToolbar(I)}},{key:"maybeLoadEditor",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.location,K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,se=arguments.length>2&&arguments[2]!==void 0?arguments[2]:window.history;return this.maybeLoadToolbar(I,K,se)}}]),L}(),$w=function(){function L(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:3e3;Xo(this,L),this.isPolling=!0,this._event_queue=[],this._empty_queue_count=0,this._poller=void 0,this._pollInterval=I}return $o(L,[{key:"setPollInterval",value:function(I){this._pollInterval=I,this.isPolling&&this.poll()}},{key:"poll",value:function(){}},{key:"unload",value:function(){}},{key:"getTime",value:function(){return new Date().getTime()}}]),L}(),CT=function(L){Rw(K,$w);var I=zw(K);function K(se,Pe){var R,E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:3e3;return Xo(this,K),(R=I.call(this,E)).handlePollRequest=Pe,R.captureMetrics=se,R}return $o(K,[{key:"enqueue",value:function(se,Pe,R){this.captureMetrics.incr("batch-enqueue"),this._event_queue.push({url:se,data:Pe,options:R}),this.isPolling||(this.isPolling=!0,this.poll())}},{key:"poll",value:function(){var se=this;clearTimeout(this._poller),this._poller=setTimeout(function(){if(se._event_queue.length>0){var Pe=se.formatQueue(),R=function(e){var _=Pe[e],k=_.url,i=_.data,w=_.options;ji(i,function(v,h){i[h].offset=Math.abs(i[h].timestamp-se.getTime()),delete i[h].timestamp}),se.handlePollRequest(k,i,w),se.captureMetrics.incr("batch-requests"),se.captureMetrics.incr("batch-requests-".concat(k.slice(k.length-2))),se.captureMetrics.incr("batch-handle",i.length),se.captureMetrics.incr("batch-handle-".concat(k.slice(k.length-2)),i.length)};for(var E in Pe)R(E);se._event_queue.length=0,se._empty_queue_count=0}else se._empty_queue_count++;se._empty_queue_count>4&&(se.isPolling=!1,se._empty_queue_count=0),se.isPolling&&se.poll()},this._pollInterval)}},{key:"updateUnloadMetrics",value:function(){var se=this.formatQueue();for(var Pe in se){var R=se[Pe],E=R.url,e=R.data;this.captureMetrics.incr("batch-unload-requests"),this.captureMetrics.incr("batch-unload-requests-".concat(E.slice(E.length-2))),this.captureMetrics.incr("batch-unload",e.length),this.captureMetrics.incr("batch-unload-".concat(E.slice(E.length-2)),e.length)}}},{key:"unload",value:function(){var se=this;clearTimeout(this._poller);var Pe=this._event_queue.length>0?this.formatQueue():{};this._event_queue.length=0;var R=Object.values(Pe);[].concat(sm(R.filter(function(E){return E.url.indexOf("/e")===0})),sm(R.filter(function(E){return E.url.indexOf("/e")!==0}))).map(function(E){var e=E.url,_=E.data,k=E.options;se.handlePollRequest(e,_,hi(hi({},k),{},{transport:"sendBeacon"}))})}},{key:"formatQueue",value:function(){var se={};return ji(this._event_queue,function(Pe){var R=Pe.url,E=Pe.data,e=Pe.options,_=(e?e._batchKey:null)||R;se[_]===void 0&&(se[_]={data:[],url:R,options:e}),e&&se[_].options&&se[_].options._metrics&&!se[_].options._metrics.rrweb_full_snapshot&&(se[_].options._metrics.rrweb_full_snapshot=e._metrics.rrweb_full_snapshot),se[_].data.push(E)}),se}}]),K}(),LT=function(){function L(I){Xo(this,L),this.enabled=I,this.metrics={}}return $o(L,[{key:"incr",value:function(I){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.enabled&&(I="phjs-".concat(I),this.metrics[I]=(this.metrics[I]||0)+K)}},{key:"decr",value:function(I){this.enabled&&(I="phjs-".concat(I),this.metrics[I]=(this.metrics[I]||0)-1)}}]),L}(),hl=Uint8Array,gs=Uint16Array,Dh=Uint32Array,Ey=new hl([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Cy=new hl([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Gb=new hl([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Kw=function(L,I){for(var K=new gs(31),se=0;se<31;++se)K[se]=I+=1<>>1|(21845&ha)<<1;ff=(61680&(ff=(52428&ff)>>>2|(13107&ff)<<2))>>>4|(3855&ff)<<4,mm[ha]=((65280&ff)>>>8|(255&ff)<<8)>>>1}var Vp=function(L,I,K){for(var se=L.length,Pe=0,R=new gs(I);Pe>>_]=k}else for(E=new gs(se),Pe=0;Pe>>15-L[Pe];return E},Cf=new hl(288);for(ha=0;ha<144;++ha)Cf[ha]=8;for(ha=144;ha<256;++ha)Cf[ha]=9;for(ha=256;ha<280;++ha)Cf[ha]=7;for(ha=280;ha<288;++ha)Cf[ha]=8;var x1=new hl(32);for(ha=0;ha<32;++ha)x1[ha]=5;var eu,OT=Vp(Cf,9,0),IT=Vp(x1,5,0),Qw=function(L){return(L/8>>0)+(7&L&&1)},e5=function(L,I,K){(I==null||I<0)&&(I=0),(K==null||K>L.length)&&(K=L.length);var se=new(L instanceof gs?gs:L instanceof Dh?Dh:hl)(K-I);return se.set(L.subarray(I,K)),se},qu=function(L,I,K){K<<=7&I;var se=I/8>>0;L[se]|=K,L[se+1]|=K>>>8},Ap=function(L,I,K){K<<=7&I;var se=I/8>>0;L[se]|=K,L[se+1]|=K>>>8,L[se+2]|=K>>>16},iv=function(L,I){for(var K=[],se=0;sev&&(v=R[se].s);var h=new gs(v+1),s=RT(K[i-1],h,0);if(s>I){se=0;var t=0,a=s-I,r=1<I))break;t+=r-(1<>>=a;t>0;){var o=R[se].s;h[o]=0&&t;--se){var l=R[se].s;h[l]==I&&(--h[l],++t)}s=I}return[new hl(h),s]},RT=function L(I,K,se){return I.s==-1?Math.max(L(I.l,K,se+1),L(I.r,K,se+1)):K[I.s]=se},Zb=function(L){for(var I=L.length;I&&!L[--I];);for(var K=new gs(++I),se=0,Pe=L[0],R=1,E=function(_){K[se++]=_},e=1;e<=I;++e)if(L[e]==Pe&&e!=I)++R;else{if(!Pe&&R>2){for(;R>138;R-=138)E(32754);R>2&&(E(R>10?R-11<<5|28690:R-3<<5|12305),R=0)}else if(R>3){for(E(Pe),--R;R>6;R-=6)E(8304);R>2&&(E(R-3<<5|8208),R=0)}for(;R--;)E(Pe);R=1,Pe=L[e]}return[K.subarray(0,se),I]},Mp=function(L,I){for(var K=0,se=0;se>>8,L[Pe+2]=255^L[Pe],L[Pe+3]=255^L[Pe+1];for(var R=0;R4&&!f[Gb[y-1]];--y);var m,T,p,M,A=k+5<<3,C=Mp(Pe,Cf)+Mp(R,x1)+E,P=Mp(Pe,v)+Mp(R,t)+E+14+3*y+Mp(c,f)+(2*c[16]+3*c[17]+7*c[18]);if(A<=C&&A<=P)return V0(I,i,L.subarray(_,_+k));if(qu(I,i,1+(P15&&(qu(I,i,Y[b]>>>5&127),i+=Y[b]>>>12)}}}else m=OT,T=Cf,p=IT,M=x1;for(b=0;b255){D=se[b]>>>18&31,Ap(I,i,m[D+257]),i+=T[D+257],D>7&&(qu(I,i,se[b]>>>23&31),i+=Ey[D]);var G=31&se[b];Ap(I,i,p[G]),i+=M[G],G>3&&(Ap(I,i,se[b]>>>5&8191),i+=Cy[G])}else Ap(I,i,m[se[b]]),i+=T[se[b]];return Ap(I,i,m[256]),i+T[256]},zT=new Dh([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),DT=new hl(0),FT=function(){for(var L=new Dh(256),I=0;I<256;++I){for(var K=I,se=9;--se;)K=(1&K&&3988292384)^K>>>1;L[I]=K}return L}(),BT=function(){var L=4294967295;return{p:function(I){for(var K=L,se=0;se>>8;L=K},d:function(){return 4294967295^L}}},NT=function(L,I,K,se,Pe){return function(R,E,e,_,k,i){var w=R.length,v=new hl(_+w+5*(1+Math.floor(w/7e3))+k),h=v.subarray(_,v.length-k),s=0;if(!E||w<8)for(var t=0;t<=w;t+=65535){var a=t+65535;a>>13,o=8191&r,l=(1<7e3||p>24576)&&z>423){s=Yb(R,h,0,f,x,y,T,p,A,t-A,s),p=m=T=0,A=t;for(var B=0;B<286;++B)x[B]=0;for(B=0;B<30;++B)y[B]=0}var Y=2,D=0,G=o,U=P-O&32767;if(z>2&&C==g(t-U))for(var j=Math.min(n,z)-1,W=Math.min(32767,t),Z=Math.min(258,z);U<=W&&--G&&P!=O;){if(R[t+Y]==R[t+Y-U]){for(var ie=0;ieY){if(Y=ie,D=U,ie>j)break;var te=Math.min(U,ie-2),J=0;for(B=0;BJ&&(J=ee,O=X)}}}U+=(P=O)-(O=u[P])+32768&32767}if(D){f[p++]=268435456|vm[Y]<<18|Wb[D];var re=31&vm[Y],oe=31&Wb[D];T+=Ey[re]+Cy[oe],++x[257+re],++y[oe],M=t+Y,++m}else f[p++]=R[t],++x[R[t]]}}s=Yb(R,h,i,f,x,y,T,p,A,t-A,s),i||(s=V0(h,s,DT))}return e5(v,0,_+Qw(s)+k)}(L,I.level==null?6:I.level,I.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(L.length)))):12+I.mem,K,se,!Pe)},ym=function(L,I,K){for(;K;++I)L[I]=K,K>>>=8},jT=function(L,I){var K=I.filename;if(L[0]=31,L[1]=139,L[2]=8,L[8]=I.level<2?4:I.level==9?2:0,L[9]=3,I.mtime!=0&&ym(L,4,Math.floor(new Date(I.mtime||Date.now())/1e3)),K){L[3]=8;for(var se=0;se<=K.length;++se)L[se+10]=K.charCodeAt(se)}},UT=function(L){return 10+(L.filename&&L.filename.length+1||0)};function VT(L,I){I===void 0&&(I={});var K=BT(),se=L.length;K.p(L);var Pe=NT(L,I,UT(I),8),R=Pe.length;return jT(Pe,I),ym(Pe,R-8,K.d()),ym(Pe,R-4,se),Pe}function HT(L,I){var K=L.length;if(!I&&typeof TextEncoder<"u")return new TextEncoder().encode(L);for(var se=new hl(L.length+(L.length>>>1)),Pe=0,R=function(k){se[Pe++]=k},E=0;Ese.length){var e=new hl(Pe+8+(K-E<<1));e.set(se),se=e}var _=L.charCodeAt(E);_<128||I?R(_):_<2048?(R(192|_>>>6),R(128|63&_)):_>55295&&_<57344?(R(240|(_=65536+(1047552&_)|1023&L.charCodeAt(++E))>>>18),R(128|_>>>12&63),R(128|_>>>6&63),R(128|63&_)):(R(224|_>>>12),R(128|_>>>6&63),R(128|63&_))}return e5(se,0,Pe)}(function(L){L.GZipJS="gzip-js",L.LZ64="lz64",L.Base64="base64"})(eu||(eu={}));var od,Ly,Co,qT=function(L,I,K){var se=I||{};se.ip=K.ip?1:0,se._=new Date().getTime().toString(),se.ver=Cu.LIB_VERSION;var Pe=L.split("?");if(Pe.length>1){var R,E=Wc(Pe[1].split("&"));try{for(E.s();!(R=E.n()).done;){var e=R.value.split("=")[0];se[e]&&delete se[e]}}catch(k){E.e(k)}finally{E.f()}}var _=L.indexOf("?")>-1?"&":"?";return L+_+function(k){var i,w,v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"&",h=[];return ji(k,function(s,t){i=encodeURIComponent(s.toString()),w=encodeURIComponent(t),h[h.length]=w+"="+i}),h.join(v)}(se)},Py=function L(I,K){if(K.blob&&I.buffer)return new Blob([I.buffer],{type:"text/plain"});if(K.sendBeacon||K.blob){var se=L(I,{method:"POST"});return new Blob([se],{type:"application/x-www-form-urlencoded"})}if(K.method!=="POST")return null;var Pe,R;return Pe=Array.isArray(I)||(R=I,Object.prototype.toString.call(R)==="[object Uint8Array]")?"data="+encodeURIComponent(I):"data="+encodeURIComponent(I.data),"compression"in I&&I.compression&&(Pe+="&compression="+I.compression),Pe},t5=function(L){var I=L.url,K=L.data,se=L.headers,Pe=L.options,R=L.captureMetrics,E=L.callback,e=L.retriesPerformedSoFar,_=L.retryQueue,k=L.onXHRError,i=L.timeout,w=i===void 0?1e4:i,v=new XMLHttpRequest;v.open(Pe.method||"GET",I,!0);var h=Py(K,Pe);R.incr("_send_request"),R.incr("_send_request_inflight"),ji(se,function(s,t){v.setRequestHeader(t,s)}),Pe.method!=="POST"||Pe.blob||v.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),v.timeout=w,v.withCredentials=!0,v.onreadystatechange=function(){if(v.readyState===4)if(R.incr("xhr-response"),R.incr("xhr-response-".concat(v.status)),R.decr("_send_request_inflight"),v.status===200){if(E){var s;try{s=JSON.parse(v.responseText)}catch(t){return void Ra.error(t)}E(s)}}else typeof k=="function"&&k(v),[401,403,404,500].indexOf(v.status)<0&&_.enqueue({url:I,data:K,options:Pe,headers:se,retriesPerformedSoFar:(e||0)+1,callback:E}),E&&E({status:0})},v.send(h)},GT=function(L){Rw(K,$w);var I=zw(K);function K(se,Pe){var R;return Xo(this,K),(R=I.call(this)).captureMetrics=se,R.isPolling=!1,R.queue=[],R.areWeOnline=!0,R.onXHRError=Pe,typeof window<"u"&&"onLine"in window.navigator&&(R.areWeOnline=window.navigator.onLine,window.addEventListener("online",function(){R._handleWeAreNowOnline()}),window.addEventListener("offline",function(){R.areWeOnline=!1})),R}return $o(K,[{key:"enqueue",value:function(se){var Pe=se.retriesPerformedSoFar||0;if(!(Pe>=10)){var R=3e3*Math.pow(2,Pe),E=new Date(Date.now()+R);console.warn("Enqueued failed request for retry in ".concat(R)),this.queue.push({retryAt:E,requestData:se}),this.isPolling||(this.isPolling=!0,this.poll())}}},{key:"poll",value:function(){var se=this;this._poller&&clearTimeout(this._poller),this._poller=setTimeout(function(){se.areWeOnline&&se.queue.length>0&&se.flush(),se.poll()},this._pollInterval)}},{key:"flush",value:function(){var se=new Date(Date.now()),Pe=this.queue.filter(function(_){return _.retryAt0){this.queue=this.queue.filter(function(_){return _.retryAt>=se});var R,E=Wc(Pe);try{for(E.s();!(R=E.n()).done;){var e=R.value.requestData;this._executeXhrRequest(e)}}catch(_){E.e(_)}finally{E.f()}}}},{key:"unload",value:function(){this._poller&&(clearTimeout(this._poller),this._poller=void 0);var se,Pe=Wc(this.queue);try{for(Pe.s();!(se=Pe.n()).done;){var R=se.value.requestData,E=R.url,e=R.data,_=R.options;try{window.navigator.sendBeacon(E,Py(e,hi(hi({},_),{},{sendBeacon:!0})))}catch(k){Cu.DEBUG&&console.error(k)}}}catch(k){Pe.e(k)}finally{Pe.f()}this.queue=[]}},{key:"_executeXhrRequest",value:function(se){var Pe=se.url,R=se.data,E=se.options,e=se.headers,_=se.callback,k=se.retriesPerformedSoFar;t5({url:Pe,data:R||{},options:E||{},headers:e||{},retriesPerformedSoFar:k||0,callback:_,captureMetrics:this.captureMetrics,retryQueue:this,onXHRError:this.onXHRError})}},{key:"_handleWeAreNowOnline",value:function(){this.areWeOnline=!0,this.flush()}}]),K}(),WT=18e5,ZT=864e5,YT=function(){function L(I,K){Xo(this,L),this.config=I,this.persistence=K,this._windowId=void 0,this._sessionId=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null;var se=I.persistence_name||I.token;if(this.window_id_storage_key="ph_"+se+"_window_id",this.primary_window_exists_storage_key="ph_"+se+"_primary_window_exists",this._canUseSessionStorage()){var Pe=Lo.parse(this.window_id_storage_key),R=Lo.parse(this.primary_window_exists_storage_key);Pe&&!R?this._windowId=Pe:Lo.remove(this.window_id_storage_key),Lo.set(this.primary_window_exists_storage_key,!0)}this._listenToReloadWindow()}return $o(L,[{key:"_canUseSessionStorage",value:function(){return this.config.persistence!=="memory"&&!this.persistence.disabled&&Lo.is_supported()}},{key:"_setWindowId",value:function(I){I!==this._windowId&&(this._windowId=I,this._canUseSessionStorage()&&Lo.set(this.window_id_storage_key,I))}},{key:"_getWindowId",value:function(){return this._windowId?this._windowId:this._canUseSessionStorage()?Lo.parse(this.window_id_storage_key):null}},{key:"_setSessionId",value:function(I,K,se){I===this._sessionId&&K===this._sessionActivityTimestamp&&se===this._sessionStartTimestamp||(this._sessionStartTimestamp=se,this._sessionActivityTimestamp=K,this._sessionId=I,this.persistence.register(yi({},pm,[K,I,se])))}},{key:"_getSessionId",value:function(){if(this._sessionId&&this._sessionActivityTimestamp&&this._sessionStartTimestamp)return[this._sessionActivityTimestamp,this._sessionId,this._sessionStartTimestamp];var I=this.persistence.props[pm];return Array.isArray(I)&&I.length===2&&I.push(I[0]),I||[0,null,0]}},{key:"resetSessionId",value:function(){this._setSessionId(null,null,null)}},{key:"_listenToReloadWindow",value:function(){var I=this;window.addEventListener("beforeunload",function(){I._canUseSessionStorage()&&Lo.remove(I.primary_window_exists_storage_key)})}},{key:"checkAndGetSessionAndWindowId",value:function(){var I=arguments.length>0&&arguments[0]!==void 0&&arguments[0],K=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:null)||new Date().getTime(),se=D1(this._getSessionId(),3),Pe=se[0],R=se[1],E=se[2],e=this._getWindowId(),_=E&&E>0&&Math.abs(K-E)>ZT;!R||!I&&Math.abs(K-Pe)>WT||_?(R=Hc(),e=Hc(),E=K):e||(e=Hc());var k=Pe===0||!I||_?K:Pe,i=E===0?new Date().getTime():E;return this._setWindowId(e),this._setSessionId(R,k,i),{sessionId:R,windowId:e}}}]),L}(),XT=$o(function L(I,K,se,Pe){Xo(this,L),this.name="posthog-js",this.setupOnce=function(R){R(function(E){var e,_,k;if(E.level!=="error"||!I.__loaded)return E;E.tags||(E.tags={});var i=I.config.ui_host||I.config.api_host;E.tags["PostHog Person URL"]=i+"/person/"+I.get_distinct_id(),I.sessionRecordingStarted()&&(E.tags["PostHog Recording URL"]=i+"/recordings/"+I.sessionManager.checkAndGetSessionAndWindowId(!0).sessionId);var w=((e=E.exception)===null||e===void 0?void 0:e.values)||[],v={$sentry_event_id:E.event_id,$sentry_exception:E.exception,$sentry_exception_message:(_=w[0])===null||_===void 0?void 0:_.value,$sentry_exception_type:(k=w[0])===null||k===void 0?void 0:k.type,$sentry_tags:E.tags};return K&&se&&(v.$sentry_url=(Pe||"https://sentry.io/organizations/")+K+"/issues/?project="+se+"&query="+E.event_id),I.capture("$exception",v),E})}}),$T=function(L){var I=function(K,se){K.event.userId||K.event.anonymousId===L.get_distinct_id()||L.reset(),K.event.userId&&K.event.userId!==L.get_distinct_id()&&(L.register({distinct_id:K.event.userId}),L.reloadFeatureFlags());var Pe=L._calculate_event_properties(se,K.event.properties);return K.event.properties=Object.assign({},Pe,K.event.properties),K};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:function(K){return I(K,K.event.event)},page:function(K){return I(K,"$pageview")},identify:function(K){return I(K,"$identify")},screen:function(K){return I(K,"$screen")}}},KT=function(){function L(){Xo(this,L),yi(this,"_seenFirstPageView",!1)}return $o(L,[{key:"onPageview",value:function(){this._seenFirstPageView&&(this._pageViewId=Hc()),this._seenFirstPageView=!0}},{key:"getPageViewId",value:function(){return this._pageViewId||(this._pageViewId=Hc()),this._pageViewId}}]),L}();(function(L){L[L.INIT_MODULE=0]="INIT_MODULE",L[L.INIT_SNIPPET=1]="INIT_SNIPPET"})(od||(od={}));var xm=function(){},w0={},Bs="posthog",H0=ai.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,n5=!H0&&Cl.indexOf("MSIE")===-1&&Cl.indexOf("Mozilla")===-1,Xb=function(){var L,I,K;return{api_host:"https://app.posthog.com",api_method:"POST",api_transport:"XHR",ui_host:null,token:"",autocapture:!0,rageclick:!0,cross_subdomain_cookie:(ja==null||(L=ja.location)===null||L===void 0||(I=L.hostname)===null||I===void 0?void 0:I.indexOf("herokuapp.com"))===-1,persistence:"cookie",persistence_name:"",cookie_name:"",loaded:xm,store_google:!0,custom_campaign_params:[],save_referrer:!0,test:!1,verbose:!1,img:!1,capture_pageview:!0,capture_pageleave:!0,debug:!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_cookie:!1,enable_recording_console_log:void 0,secure_cookie:(ai==null||(K=ai.location)===null||K===void 0?void 0:K.protocol)==="https:",ip:!0,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_capturing_persistence_type:"localStorage",opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_blacklist:[],respect_dnt:!1,sanitize_properties:null,xhr_headers:{},inapp_protocol:"//",inapp_link_new_window:!1,request_batching:!0,properties_string_max_length:65535,session_recording:{blockClass:"ph-no-capture",blockSelector:null,ignoreClass:"ph-ignore-input",maskAllInputs:!0,maskInputOptions:{},maskInputFn:null,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0},mask_all_element_attributes:!1,mask_all_text:!1,advanced_disable_decide:!1,advanced_disable_toolbar_metrics:!1,on_xhr_error:function(se){var Pe="Bad HTTP status: "+se.status+" "+se.statusText;console.error(Pe)},get_device_id:function(se){return se},_onCapture:xm,_capture_metrics:!1,capture_performance:void 0,name:"posthog",callback_fn:"posthog._jsc",bootstrap:{},disable_compression:!1}},bm=function(L,I,K,se){var Pe,R=K!==Bs&&Co?K?Co[K]:void 0:Co,E={initComplete:!1,syncCode:!1},e=function(_){return function(k){E[_]||(E[_]=!0,E.initComplete&&E.syncCode&&(se==null||se(k)))}};if(R&&Ly===od.INIT_MODULE)Pe=R;else{if(R&&!Yu(R))return void console.error("You have already initialized "+K);Pe=new Oy}return Pe._init(L,I,K,e("initComplete")),Pe.toolbar.maybeLoadToolbar(),Pe.sessionRecording=new bT(Pe),Pe.sessionRecording.startRecordingIfEnabled(),Pe.webPerformance=new kT(Pe),Pe.webPerformance.startObservingIfEnabled(),Pe.__autocapture=Pe.get_config("autocapture"),Ec._setIsAutocaptureEnabled(Pe),Ec._isAutocaptureEnabled&&(Pe.__autocapture=Pe.get_config("autocapture"),Ec.enabledForProject(Pe.get_config("token"),100,100)?Ec.isBrowserSupported()?Ec.init(Pe):(Pe.__autocapture=!1,Ra.log("Disabling Automatic Event Collection because this browser is not supported")):(Pe.__autocapture=!1,Ra.log("Not in active bucket: disabling Automatic Event Collection."))),Cu.DEBUG=Cu.DEBUG||Pe.get_config("debug"),R!==void 0&&Yu(R)&&(Pe._execute_array.call(Pe.people,R.people),Pe._execute_array(R)),e("syncCode")(Pe),Pe},Oy=function(){function L(){var I=this;Xo(this,L),this.config=Xb(),this.compression={},this.decideEndpointWasHit=!1,this.SentryIntegration=XT,this.segmentIntegration=function(){return $T(I)},this.__captureHooks=[],this.__request_queue=[],this.__loaded=!1,this.__loaded_recorder_version=void 0,this.__autocapture=void 0,this._jsc=function(){},this.people=new hT(this),this.featureFlags=new pT(this),this.feature_flags=this.featureFlags,this.toolbar=new ET(this),this.pageViewIdManager=new KT,this._captureMetrics=void 0,this._requestQueue=void 0,this._retryQueue=void 0,this.persistence=void 0,this.sessionPersistence=void 0,this.sessionManager=void 0}return $o(L,[{key:"init",value:function(I,K,se){if(iu(se))console.error("You must name your new library: init(token, config, name)");else{if(se!==Bs){var Pe=bm(I,K,se,function(R){Co[se]=R,R._loaded()});return Co[se]=Pe,Pe}console.error("You must initialize the main posthog object right after you include the PostHog js snippet")}}},{key:"_init",value:function(I){var K,se,Pe=this,R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},E=arguments.length>2?arguments[2]:void 0,e=arguments.length>3?arguments[3]:void 0;this.__loaded=!0,this.config={},this._triggered_notifs=[];var _,k={segmentRegister:!1,syncCode:!1},i=function(l){return function(){k[l]||(k[l]=!0,k.segmentRegister&&k.syncCode&&(e==null||e(Pe)))}};if(this.set_config(Eo({},Xb(),R,{name:E,token:I,callback_fn:(E===Bs?E:Bs+"."+E)+"._jsc"})),this._jsc=function(){},(ai!=null&&(K=ai.rrweb)!==null&&K!==void 0&&K.record||ai!=null&&ai.rrwebRecord)&&(this.__loaded_recorder_version=ai==null||(_=ai.rrweb)===null||_===void 0?void 0:_.version),this._captureMetrics=new LT(this.get_config("_capture_metrics")),this._requestQueue=new CT(this._captureMetrics,this._handle_queued_event.bind(this)),this._retryQueue=new GT(this._captureMetrics,this.get_config("on_xhr_error")),this.__captureHooks=[],this.__request_queue=[],this.persistence=new jb(this.config),this.sessionManager=new YT(this.config,this.persistence),this.sessionPersistence=this.config.persistence==="sessionStorage"?this.persistence:new jb(hi(hi({},this.config),{},{persistence:"sessionStorage"})),this._gdpr_init(),R.segment?(this.config.get_device_id=function(){return R.segment.user().anonymousId()},R.segment.user().id()&&(this.register({distinct_id:R.segment.user().id()}),this.persistence.set_user_state("identified")),R.segment.register(this.segmentIntegration()).then(i("segmentRegister"))):i("segmentRegister")(),((se=R.bootstrap)===null||se===void 0?void 0:se.distinctID)!==void 0){var w,v,h=this.get_config("get_device_id")(Hc()),s=(w=R.bootstrap)!==null&&w!==void 0&&w.isIdentifiedID?h:R.bootstrap.distinctID;this.persistence.set_user_state((v=R.bootstrap)!==null&&v!==void 0&&v.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:R.bootstrap.distinctID,$device_id:s})}if(this._hasBootstrappedFeatureFlags()){var t,a,r=Object.keys(((t=R.bootstrap)===null||t===void 0?void 0:t.featureFlags)||{}).filter(function(l){var u,d;return!((u=R.bootstrap)===null||u===void 0||(d=u.featureFlags)===null||d===void 0||!d[l])}).reduce(function(l,u){var d,c;return l[u]=((d=R.bootstrap)===null||d===void 0||(c=d.featureFlags)===null||c===void 0?void 0:c[u])||!1,l},{}),n=Object.keys(((a=R.bootstrap)===null||a===void 0?void 0:a.featureFlagPayloads)||{}).filter(function(l){return r[l]}).reduce(function(l,u){var d,c,b,g;return(d=R.bootstrap)!==null&&d!==void 0&&(c=d.featureFlagPayloads)!==null&&c!==void 0&&c[u]&&(l[u]=(b=R.bootstrap)===null||b===void 0||(g=b.featureFlagPayloads)===null||g===void 0?void 0:g[u]),l},{});this.featureFlags.receivedFeatureFlags({featureFlags:r,featureFlagPayloads:n})}if(!this.get_distinct_id()){var o=this.get_config("get_device_id")(Hc());this.register_once({distinct_id:o,$device_id:o},""),this.persistence.set_user_state("anonymous")}ai.addEventListener&&ai.addEventListener("onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this)),i("syncCode")()}},{key:"_loaded",value:function(){this.featureFlags.setReloadingPaused(!0);try{this.get_config("loaded")(this)}catch(I){console.error("`loaded` function failed",I)}this._start_queue_if_opted_in(),this.get_config("capture_pageview")&&this.capture("$pageview",{},{send_instantly:!0}),this.get_config("advanced_disable_decide")||new AT(this).call(),this.featureFlags.resetRequestQueue(),this.featureFlags.setReloadingPaused(!1)}},{key:"_start_queue_if_opted_in",value:function(){this.has_opted_out_capturing()||this.get_config("request_batching")&&this._requestQueue.poll()}},{key:"_dom_loaded",value:function(){var I=this;this.has_opted_out_capturing()||Ju(this.__request_queue,function(K){I._send_request.apply(I,sm(K))}),this.__request_queue=[],this._start_queue_if_opted_in()}},{key:"_prepare_callback",value:function(I,K){if(iu(I))return null;if(H0)return function(E){I(E,K)};var se=this._jsc,Pe=""+Math.floor(1e8*Math.random()),R=this.get_config("callback_fn")+"["+Pe+"]";return se[Pe]=function(E){delete se[Pe],I(E,K)},R}},{key:"_handle_unload",value:function(){this.get_config("request_batching")?(this.get_config("capture_pageview")&&this.get_config("capture_pageleave")&&this.capture("$pageleave"),this.get_config("_capture_metrics")&&(this._requestQueue.updateUnloadMetrics(),this.capture("$capture_metrics",this._captureMetrics.metrics)),this._requestQueue.unload(),this._retryQueue.unload()):this.get_config("capture_pageview")&&this.get_config("capture_pageleave")&&this.capture("$pageleave",null,{transport:"sendBeacon"})}},{key:"_handle_queued_event",value:function(I,K,se){var Pe=JSON.stringify(K);this.__compress_and_send_json_request(I,Pe,se||w0,xm)}},{key:"__compress_and_send_json_request",value:function(I,K,se,Pe){var R,E=function(i,w,v){return i===eu.LZ64?[{data:ll.compressToBase64(w),compression:eu.LZ64},v]:i===eu.GZipJS?[VT(HT(w),{mtime:0}),hi(hi({},v),{},{blob:!0,urlQueryArgs:{compression:eu.GZipJS}})]:[{data:B1(w)},v]}((R=this.compression)[eu.GZipJS]?eu.GZipJS:R[eu.LZ64]?eu.LZ64:eu.Base64,K,se),e=D1(E,2),_=e[0],k=e[1];this._send_request(I,_,k,Pe)}},{key:"_send_request",value:function(I,K,se,Pe){if(n5)this.__request_queue.push([I,K,se,Pe]);else{var R={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")};se=Eo(R,se||{}),H0||(se.method="GET");var E="sendBeacon"in ai.navigator&&se.transport==="sendBeacon";if(I=qT(I,se.urlQueryArgs||{},{ip:this.get_config("ip")}),Vc(K)&&this.get_config("img")){var e=ja.createElement("img");e.src=I,ja.body.appendChild(e)}else if(E)try{ai.navigator.sendBeacon(I,Py(K,hi(hi({},se),{},{sendBeacon:!0})))}catch(w){this.get_config("debug")&&console.error(w)}else if(H0)try{t5({url:I,data:K,headers:this.get_config("xhr_headers"),options:se,captureMetrics:this._captureMetrics,callback:Pe,retriesPerformedSoFar:0,retryQueue:this._retryQueue,onXHRError:this.get_config("on_xhr_error")})}catch(w){console.error(w)}else{var _,k=ja.createElement("script");k.type="text/javascript",k.async=!0,k.defer=!0,k.src=I;var i=ja.getElementsByTagName("script")[0];(_=i.parentNode)===null||_===void 0||_.insertBefore(k,i)}}}},{key:"_execute_array",value:function(I){var K,se=this,Pe=[],R=[],E=[];Ju(I,function(_){_&&(K=_[0],Yu(K)?E.push(_):typeof _=="function"?_.call(se):Yu(_)&&K==="alias"?Pe.push(_):Yu(_)&&K.indexOf("capture")!==-1&&typeof se[K]=="function"?E.push(_):R.push(_))});var e=function(_,k){Ju(_,function(i){if(Yu(i[0])){var w=k;ji(i,function(v){w=w[v[0]].apply(w,v.slice(1))})}else this[i[0]].apply(this,i.slice(1))},k)};e(Pe,this),e(R,this),e(E,this)}},{key:"_hasBootstrappedFeatureFlags",value:function(){var I,K;return((I=this.config.bootstrap)===null||I===void 0?void 0:I.featureFlags)&&Object.keys((K=this.config.bootstrap)===null||K===void 0?void 0:K.featureFlags).length>0||!1}},{key:"push",value:function(I){this._execute_array([I])}},{key:"capture",value:function(I,K){var se=arguments.length>2&&arguments[2]!==void 0?arguments[2]:w0;if(this.__loaded&&!Xw(this,!1)){this._captureMetrics.incr("capture"),I==="$snapshot"&&this._captureMetrics.incr("snapshot");var Pe=(se=se||w0).transport;if(Pe&&(se.transport=Pe),iu(I)||typeof I!="string")console.error("No event name provided to posthog.capture");else if(!tT(Cl)){this.sessionPersistence.update_search_keyword(),this.get_config("store_google")&&this.sessionPersistence.update_campaign_params(),this.get_config("save_referrer")&&this.sessionPersistence.update_referrer_info();var R={event:I,properties:this._calculate_event_properties(I,K||{})};I==="$identify"&&(R.$set=se.$set,R.$set_once=se.$set_once),(R=Uw(R,se._noTruncate?null:this.get_config("properties_string_max_length"))).timestamp=se.timestamp||new Date,this.get_config("debug")&&Ra.log("PostHog.js send",R);var E=JSON.stringify(R),e=this.get_config("api_host")+(se.endpoint||"/e/"),_=se!==w0;return!this.get_config("request_batching")||_&&!se._batchKey||se.send_instantly?this.__compress_and_send_json_request(e,E,se):this._requestQueue.enqueue(e,R,se),this._invokeCaptureHooks(I,R),R}}}},{key:"_addCaptureHook",value:function(I){this.__captureHooks.push(I)}},{key:"_invokeCaptureHooks",value:function(I,K){this.config._onCapture(I,K),ji(this.__captureHooks,function(se){return se(I)})}},{key:"_calculate_event_properties",value:function(I,K){var se,Pe=this.persistence.remove_event_timer(I),R=hi({},K);if(R.token=this.get_config("token"),I==="$snapshot"){var E=hi(hi({},this.persistence.properties()),this.sessionPersistence.properties());return R.distinct_id=E.distinct_id,R}var e=po.properties();if(this.sessionManager){var _=this.sessionManager.checkAndGetSessionAndWindowId(),k=_.sessionId,i=_.windowId;R.$session_id=k,R.$window_id=i}if((se=this.webPerformance)!==null&&se!==void 0&&se.isEnabled&&(I==="$pageview"&&this.pageViewIdManager.onPageview(),R=Eo(R,{$pageview_id:this.pageViewIdManager.getPageViewId()})),I==="$performance_event"){var w=this.persistence.properties();return R.distinct_id=w.distinct_id,R.$current_url=e.$current_url,R}if(Pe!==void 0){var v=new Date().getTime()-Pe;R.$duration=parseFloat((v/1e3).toFixed(3))}R=Eo({},po.properties(),this.persistence.properties(),this.sessionPersistence.properties(),R);var h=this.get_config("property_blacklist");Yu(h)?ji(h,function(t){delete R[t]}):console.error("Invalid value for property_blacklist config: "+h);var s=this.get_config("sanitize_properties");return s&&(R=s(R,I)),R}},{key:"register",value:function(I,K){this.persistence.register(I,K)}},{key:"register_once",value:function(I,K,se){this.persistence.register_once(I,K,se)}},{key:"register_for_session",value:function(I){this.sessionPersistence.register(I)}},{key:"unregister",value:function(I){this.persistence.unregister(I)}},{key:"unregister_for_session",value:function(I){this.sessionPersistence.unregister(I)}},{key:"_register_single",value:function(I,K){this.register(yi({},I,K))}},{key:"getFeatureFlag",value:function(I,K){return this.featureFlags.getFeatureFlag(I,K)}},{key:"getFeatureFlagPayload",value:function(I){var K=this.featureFlags.getFeatureFlagPayload(I);try{return JSON.parse(K)}catch{return K}}},{key:"isFeatureEnabled",value:function(I,K){return this.featureFlags.isFeatureEnabled(I,K)}},{key:"reloadFeatureFlags",value:function(){this.featureFlags.reloadFeatureFlags()}},{key:"updateEarlyAccessFeatureEnrollment",value:function(I,K){this.featureFlags.updateEarlyAccessFeatureEnrollment(I,K)}},{key:"getEarlyAccessFeatures",value:function(I){var K=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return this.featureFlags.getEarlyAccessFeatures(I,K)}},{key:"onFeatureFlags",value:function(I){return this.featureFlags.onFeatureFlags(I)}},{key:"identify",value:function(I,K,se){if(I){this._captureMetrics.incr("identify");var Pe=this.get_distinct_id();if(this.register({$user_id:I}),!this.get_property("$device_id")){var R=Pe;this.register_once({$had_persisted_distinct_id:!0,$device_id:R},"")}I!==Pe&&I!==this.get_property(U0)&&(this.unregister(U0),this.register({distinct_id:I}));var E=this.persistence.get_user_state()==="anonymous";I!==Pe&&E?(this.persistence.set_user_state("identified"),this.capture("$identify",{distinct_id:I,$anon_distinct_id:Pe},{$set:K||{},$set_once:se||{}}),this.featureFlags.setAnonymousDistinctId(Pe)):(K&&this.people.set(K),se&&this.people.set_once(se)),I!==Pe&&this.reloadFeatureFlags()}else console.error("Unique user id has not been set in posthog.identify")}},{key:"group",value:function(I,K,se){if(I&&K){this._captureMetrics.incr("group");var Pe=this.getGroups();Pe[I]!==K&&this.resetGroupPropertiesForFlags(I),this.register({$groups:hi(hi({},Pe),{},yi({},I,K))}),se&&(this.capture("$groupidentify",{$group_type:I,$group_key:K,$group_set:se}),this.setGroupPropertiesForFlags(yi({},I,se))),Pe[I]===K||se||this.reloadFeatureFlags()}else console.error("posthog.group requires a group type and group key")}},{key:"resetGroups",value:function(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}},{key:"setPersonPropertiesForFlags",value:function(I){var K=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.featureFlags.setPersonPropertiesForFlags(I,K)}},{key:"resetPersonPropertiesForFlags",value:function(){this.featureFlags.resetPersonPropertiesForFlags()}},{key:"setGroupPropertiesForFlags",value:function(I){var K=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.featureFlags.setGroupPropertiesForFlags(I,K)}},{key:"resetGroupPropertiesForFlags",value:function(I){this.featureFlags.resetGroupPropertiesForFlags(I)}},{key:"reset",value:function(I){var K=this.get_property("$device_id");this.persistence.clear(),this.sessionPersistence.clear(),this.persistence.set_user_state("anonymous"),this.sessionManager.resetSessionId();var se=this.get_config("get_device_id")(Hc());this.register_once({distinct_id:se,$device_id:I?se:K},"")}},{key:"get_distinct_id",value:function(){return this.get_property("distinct_id")}},{key:"getGroups",value:function(){return this.get_property("$groups")||{}}},{key:"alias",value:function(I,K){return I===this.get_property(Gw)?(Ra.critical("Attempting to create alias for existing People user - aborting."),-2):(iu(K)&&(K=this.get_distinct_id()),I!==K?(this._register_single(U0,I),this.capture("$create_alias",{alias:I,distinct_id:K})):(console.error("alias matches current distinct_id - skipping api call."),this.identify(I),-1))}},{key:"set_config",value:function(I){var K=hi({},this.config);Vc(I)&&(Eo(this.config,I),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),this.sessionPersistence&&this.sessionPersistence.update_config(this.config),$a.is_supported()&&$a.get("ph_debug")==="true"&&(this.config.debug=!0),this.get_config("debug")&&(Cu.DEBUG=!0),this.sessionRecording&&I.disable_session_recording!==void 0&&K.disable_session_recording!==I.disable_session_recording&&(I.disable_session_recording?this.sessionRecording.stopRecording():this.sessionRecording.startRecordingIfEnabled()))}},{key:"startSessionRecording",value:function(){this.set_config({disable_session_recording:!1})}},{key:"stopSessionRecording",value:function(){this.set_config({disable_session_recording:!0})}},{key:"sessionRecordingStarted",value:function(){var I;return!((I=this.sessionRecording)===null||I===void 0||!I.started())}},{key:"loadToolbar",value:function(I){return this.toolbar.loadToolbar(I)}},{key:"get_config",value:function(I){var K;return(K=this.config)===null||K===void 0?void 0:K[I]}},{key:"get_property",value:function(I){return this.persistence.props[I]}},{key:"getSessionProperty",value:function(I){return this.sessionPersistence.props[I]}},{key:"toString",value:function(){var I,K=(I=this.get_config("name"))!==null&&I!==void 0?I:Bs;return K!==Bs&&(K=Bs+"."+K),K}},{key:"_gdpr_init",value:function(){this.get_config("opt_out_capturing_persistence_type")==="localStorage"&&$a.is_supported()&&(!this.has_opted_in_capturing()&&this.has_opted_in_capturing({persistence_type:"cookie"})&&this.opt_in_capturing({enable_persistence:!1}),!this.has_opted_out_capturing()&&this.has_opted_out_capturing({persistence_type:"cookie"})&&this.opt_out_capturing({clear_persistence:!1}),this.clear_opt_in_out_capturing({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_capturing()?this._gdpr_update_persistence({clear_persistence:!0}):this.has_opted_in_capturing()||!this.get_config("opt_out_capturing_by_default")&&!Mu.get("ph_optout")||(Mu.remove("ph_optout"),this.opt_out_capturing({clear_persistence:this.get_config("opt_out_persistence_by_default")}))}},{key:"_gdpr_update_persistence",value:function(I){var K;if(I&&I.clear_persistence)K=!0;else{if(!I||!I.enable_persistence)return;K=!1}this.get_config("disable_persistence")||this.persistence.disabled===K||this.persistence.set_disabled(K),this.get_config("disable_persistence")||this.sessionPersistence.disabled===K||this.sessionPersistence.set_disabled(K)}},{key:"_gdpr_call_func",value:function(I,K){return K=Eo({capture:this.capture.bind(this),persistence_type:this.get_config("opt_out_capturing_persistence_type"),cookie_prefix:this.get_config("opt_out_capturing_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),secure_cookie:this.get_config("secure_cookie")},K||{}),$a.is_supported()||K.persistence_type!=="localStorage"||(K.persistence_type="cookie"),I(this.get_config("token"),{capture:K.capture,captureEventName:K.capture_event_name,captureProperties:K.capture_properties,persistenceType:K.persistence_type,persistencePrefix:K.cookie_prefix,cookieExpiration:K.cookie_expiration,crossSubdomainCookie:K.cross_subdomain_cookie,secureCookie:K.secure_cookie})}},{key:"opt_in_capturing",value:function(I){I=Eo({enable_persistence:!0},I||{}),this._gdpr_call_func(lT,I),this._gdpr_update_persistence(I)}},{key:"opt_out_capturing",value:function(I){var K=Eo({clear_persistence:!0},I||{});this._gdpr_call_func(uT,K),this._gdpr_update_persistence(K)}},{key:"has_opted_in_capturing",value:function(I){return this._gdpr_call_func(cT,I)}},{key:"has_opted_out_capturing",value:function(I){return this._gdpr_call_func(Ww,I)}},{key:"clear_opt_in_out_capturing",value:function(I){var K=Eo({enable_persistence:!0},I??{});this._gdpr_call_func(fT,K),this._gdpr_update_persistence(K)}},{key:"debug",value:function(I){I===!1?(ai.console.log("You've disabled debug mode."),localStorage&&localStorage.removeItem("ph_debug"),this.set_config({debug:!1})):(ai.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),localStorage&&localStorage.setItem("ph_debug","true"),this.set_config({debug:!0}))}},{key:"decodeLZ64",value:function(I){return ll.decompressFromBase64(I||null)}}]),L}();(function(L,I){for(var K=0;K:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var i in k){var w=i.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");_.addStyleRule(w,k[i])}},98222:function(R,E,e){R.exports=e(82887)},27206:function(R,E,e){R.exports=e(60822)},59893:function(R,E,e){R.exports=e(23381)},5224:function(R,E,e){R.exports=e(83832)},59509:function(R,E,e){R.exports=e(72201)},75557:function(R,E,e){R.exports=e(91815)},40338:function(R,E,e){R.exports=e(21462)},35080:function(R,E,e){R.exports=e(51319)},61396:function(R,E,e){R.exports=e(57516)},40549:function(R,E,e){R.exports=e(98128)},49866:function(R,E,e){R.exports=e(99442)},36089:function(R,E,e){R.exports=e(93740)},19548:function(R,E,e){R.exports=e(8729)},35831:function(R,E,e){R.exports=e(93814)},61039:function(R,E,e){R.exports=e(14382)},97040:function(R,E,e){R.exports=e(51759)},77986:function(R,E,e){R.exports=e(10421)},24296:function(R,E,e){R.exports=e(43102)},58872:function(R,E,e){R.exports=e(92165)},29626:function(R,E,e){R.exports=e(3325)},65591:function(R,E,e){R.exports=e(36071)},69738:function(R,E,e){R.exports=e(43905)},92650:function(R,E,e){R.exports=e(35902)},35630:function(R,E,e){R.exports=e(69816)},73434:function(R,E,e){R.exports=e(94507)},27909:function(R,E,e){var _=e(19548);_.register([e(27206),e(5224),e(58872),e(65591),e(69738),e(92650),e(49866),e(25743),e(6197),e(97040),e(85461),e(73434),e(54201),e(81299),e(47645),e(35630),e(77986),e(83043),e(93005),e(96881),e(4534),e(50581),e(40549),e(77900),e(47582),e(35080),e(21641),e(17280),e(5861),e(29626),e(10021),e(65317),e(96268),e(61396),e(35831),e(16122),e(46163),e(40344),e(40338),e(48131),e(36089),e(55334),e(75557),e(19440),e(99488),e(59893),e(97393),e(98222),e(61039),e(24296),e(66398),e(59509)]),R.exports=_},46163:function(R,E,e){R.exports=e(15154)},96881:function(R,E,e){R.exports=e(64943)},50581:function(R,E,e){R.exports=e(21164)},55334:function(R,E,e){R.exports=e(54186)},65317:function(R,E,e){R.exports=e(94873)},10021:function(R,E,e){R.exports=e(67618)},54201:function(R,E,e){R.exports=e(58810)},5861:function(R,E,e){R.exports=e(20593)},16122:function(R,E,e){R.exports=e(29396)},83043:function(R,E,e){R.exports=e(13551)},48131:function(R,E,e){R.exports=e(46858)},47582:function(R,E,e){R.exports=e(17988)},21641:function(R,E,e){R.exports=e(68868)},96268:function(R,E,e){R.exports=e(20467)},19440:function(R,E,e){R.exports=e(91271)},99488:function(R,E,e){R.exports=e(21461)},97393:function(R,E,e){R.exports=e(85956)},25743:function(R,E,e){R.exports=e(52979)},66398:function(R,E,e){R.exports=e(32275)},17280:function(R,E,e){R.exports=e(6419)},77900:function(R,E,e){R.exports=e(61510)},81299:function(R,E,e){R.exports=e(87619)},93005:function(R,E,e){R.exports=e(93601)},40344:function(R,E,e){R.exports=e(96595)},47645:function(R,E,e){R.exports=e(70954)},6197:function(R,E,e){R.exports=e(47462)},4534:function(R,E,e){R.exports=e(17659)},85461:function(R,E,e){R.exports=e(19990)},82884:function(R){R.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]},50215:function(R,E,e){var _=e(82884),k=e(41940),i=e(85555),w=e(44467).templatedArray;e(24695),R.exports=w("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:k({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:_.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:_.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",i.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",i.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",i.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",i.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:k({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},3749:function(R,E,e){var _=e(71828),k=e(89298),i=e(92605).draw;function w(h){var s=h._fullLayout;_.filterVisible(s.annotations).forEach(function(t){var a=k.getFromId(h,t.xref),r=k.getFromId(h,t.yref),n=k.getRefType(t.xref),o=k.getRefType(t.yref);t._extremes={},n==="range"&&v(t,a),o==="range"&&v(t,r)})}function v(h,s){var t,a=s._id,r=a.charAt(0),n=h[r],o=h["a"+r],l=h[r+"ref"],u=h["a"+r+"ref"],d=h["_"+r+"padplus"],c=h["_"+r+"padminus"],b={x:1,y:-1}[r]*h[r+"shift"],g=3*h.arrowsize*h.arrowwidth||0,f=g+b,x=g-b,y=3*h.startarrowsize*h.arrowwidth||0,m=y+b,T=y-b;if(u===l){var p=k.findExtremes(s,[s.r2c(n)],{ppadplus:f,ppadminus:x}),M=k.findExtremes(s,[s.r2c(o)],{ppadplus:Math.max(d,m),ppadminus:Math.max(c,T)});t={min:[p.min[0],M.min[0]],max:[p.max[0],M.max[0]]}}else m=o?m+o:m,T=o?T-o:T,t=k.findExtremes(s,[s.r2c(n)],{ppadplus:Math.max(d,f,m),ppadminus:Math.max(c,x,T)});h._extremes[a]=t}R.exports=function(h){var s=h._fullLayout;if(_.filterVisible(s.annotations).length&&h._fullData.length)return _.syncOrAsync([i,w],h)}},44317:function(R,E,e){var _=e(71828),k=e(73972),i=e(44467).arrayEditor;function w(h,s){var t,a,r,n,o,l,u,d=h._fullLayout.annotations,c=[],b=[],g=[],f=(s||[]).length;for(t=0;t0||t.explicitOff.length>0},onClick:function(h,s){var t,a,r=w(h,s),n=r.on,o=r.off.concat(r.explicitOff),l={},u=h._fullLayout.annotations;if(n.length||o.length){for(t=0;t.6666666666666666?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[gt]}for(var qe=!1,ve=["x","y"],Ce=0;Ce1)&&(ht===rt?((zt=nt.r2fraction(f["a"+$e]))<0||zt>1)&&(qe=!0):qe=!0),Ae=nt._offset+nt.r2p(f[$e]),Ve=.5}else{var Je=Ft==="domain";$e==="x"?(Ue=f[$e],Ae=Je?nt._offset+nt._length*Ue:Ae=C.l+C.w*Ue):(Ue=1-f[$e],Ae=Je?nt._offset+nt._length*Ue:Ae=C.t+C.h*Ue),Ve=f.showarrow?.5:Ue}if(f.showarrow){St.head=Ae;var et=f["a"+$e];if(Ye=wt*Ne(.5,f.xanchor)-ct*Ne(.5,f.yanchor),ht===rt){var Ze=h.getRefType(ht);Ze==="domain"?($e==="y"&&(et=1-et),St.tail=nt._offset+nt._length*et):Ze==="paper"?$e==="y"?(et=1-et,St.tail=C.t+C.h*et):St.tail=C.l+C.w*et:St.tail=nt._offset+nt.r2p(et),ze=Ye}else St.tail=Ae+et,ze=Ye+et;St.text=St.tail+Ye;var Qe=A[$e==="x"?"width":"height"];if(rt==="paper"&&(St.head=w.constrain(St.head,1,Qe-1)),ht==="pixel"){var st=-Math.max(St.tail-3,St.text),ft=Math.min(St.tail+3,St.text)-Qe;st>0?(St.tail+=st,St.text+=st):ft>0&&(St.tail-=ft,St.text-=ft)}St.tail+=Et,St.head+=Et}else ze=Ye=lt*Ne(Ve,Tt),St.text=Ae+Ye;St.text+=Et,Ye+=Et,ze+=Et,f["_"+$e+"padplus"]=lt/2+ze,f["_"+$e+"padminus"]=lt/2-ze,f["_"+$e+"size"]=lt,f["_"+$e+"shift"]=Ye}if(qe)te.remove();else{var Be=0,je=0;if(f.align!=="left"&&(Be=(ae-he)*(f.align==="center"?.5:1)),f.valign!=="top"&&(je=(be-fe)*(f.valign==="middle"?.5:1)),Ee)De.select("svg").attr({x:ee+Be-1,y:ee+je}).call(t.setClipUrl,oe?D:null,g);else{var at=ee+je-Se.top,ot=ee+Be-Se.left;me.call(r.positionText,ot,at).call(t.setClipUrl,oe?D:null,g)}ue.select("rect").call(t.setRect,ee,ee,ae,be),re.call(t.setRect,J/2,J/2,Ie-J,Te-J),te.call(t.setTranslate,Math.round(G.x.text-Ie/2),Math.round(G.y.text-Te/2)),W.attr({transform:"rotate("+U+","+G.x.text+","+G.y.text+")"});var xt,yt=function(_t,gt){j.selectAll(".annotation-arrow-g").remove();var Ct=G.x.head,dt=G.y.head,vt=G.x.tail+_t,At=G.y.tail+gt,Bt=G.x.text+_t,jt=G.y.text+gt,Ut=w.rotationXYMatrix(U,Bt,jt),tn=w.apply2DTransform(Ut),Xt=w.apply2DTransform2(Ut),Qt=+re.attr("width"),Gt=+re.attr("height"),vn=Bt-.5*Qt,Tn=vn+Qt,dn=jt-.5*Gt,Yt=dn+Gt,ln=[[vn,dn,vn,Yt],[vn,Yt,Tn,Yt],[Tn,Yt,Tn,dn],[Tn,dn,vn,dn]].map(Xt);if(!ln.reduce(function(ar,Kn){return ar^!!w.segmentsIntersect(Ct,dt,Ct+1e6,dt+1e6,Kn[0],Kn[1],Kn[2],Kn[3])},!1)){ln.forEach(function(ar){var Kn=w.segmentsIntersect(vt,At,Ct,dt,ar[0],ar[1],ar[2],ar[3]);Kn&&(vt=Kn.x,At=Kn.y)});var nn=f.arrowwidth,fn=f.arrowcolor,mn=f.arrowside,xn=j.append("g").style({opacity:s.opacity(fn)}).classed("annotation-arrow-g",!0),Pn=xn.append("path").attr("d","M"+vt+","+At+"L"+Ct+","+dt).style("stroke-width",nn+"px").call(s.stroke,s.rgb(fn));if(u(Pn,mn,f),P.annotationPosition&&Pn.node().parentNode&&!y){var Dn=Ct,En=dt;if(f.standoff){var Fn=Math.sqrt(Math.pow(Ct-vt,2)+Math.pow(dt-At,2));Dn+=f.standoff*(vt-Ct)/Fn,En+=f.standoff*(At-dt)/Fn}var er,ir,fr=xn.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(vt-Dn)+","+(At-En),transform:v(Dn,En)}).style("stroke-width",nn+6+"px").call(s.stroke,"rgba(0,0,0,0)").call(s.fill,"rgba(0,0,0,0)");o.init({element:fr.node(),gd:g,prepFn:function(){var ar=t.getTranslate(te);er=ar.x,ir=ar.y,m&&m.autorange&&z(m._name+".autorange",!0),T&&T.autorange&&z(T._name+".autorange",!0)},moveFn:function(ar,Kn){var wr=tn(er,ir),Ht=wr[0]+ar,sn=wr[1]+Kn;te.call(t.setTranslate,Ht,sn),B("x",c(m,ar,"x",C,f)),B("y",c(T,Kn,"y",C,f)),f.axref===f.xref&&B("ax",c(m,ar,"ax",C,f)),f.ayref===f.yref&&B("ay",c(T,Kn,"ay",C,f)),xn.attr("transform",v(ar,Kn)),W.attr({transform:"rotate("+U+","+Ht+","+sn+")"})},doneFn:function(){k.call("_guiRelayout",g,Y());var ar=document.querySelector(".js-notes-box-panel");ar&&ar.redraw(ar.selectedObj)}})}}};f.showarrow&&yt(0,0),Z&&o.init({element:te.node(),gd:g,prepFn:function(){xt=W.attr("transform")},moveFn:function(_t,gt){var Ct="pointer";if(f.showarrow)f.axref===f.xref?B("ax",c(m,_t,"ax",C,f)):B("ax",f.ax+_t),f.ayref===f.yref?B("ay",c(T,gt,"ay",C.w,f)):B("ay",f.ay+gt),yt(_t,gt);else{if(y)return;var dt,vt;if(m)dt=c(m,_t,"x",C,f);else{var At=f._xsize/C.w,Bt=f.x+(f._xshift-f.xshift)/C.w-At/2;dt=o.align(Bt+_t/C.w,At,0,1,f.xanchor)}if(T)vt=c(T,gt,"y",C,f);else{var jt=f._ysize/C.h,Ut=f.y-(f._yshift+f.yshift)/C.h-jt/2;vt=o.align(Ut-gt/C.h,jt,0,1,f.yanchor)}B("x",dt),B("y",vt),m&&T||(Ct=o.getCursor(m?.5:dt,T?.5:vt,f.xanchor,f.yanchor))}W.attr({transform:v(_t,gt)+xt}),n(te,Ct)},clickFn:function(_t,gt){f.captureevents&&g.emit("plotly_clickannotation",_e(gt))},doneFn:function(){n(te),k.call("_guiRelayout",g,Y());var _t=document.querySelector(".js-notes-box-panel");_t&&_t.redraw(_t.selectedObj)}})}}}R.exports={draw:function(g){var f=g._fullLayout;f._infolayer.selectAll(".annotation").remove();for(var x=0;x=0,y=a.indexOf("end")>=0,m=c.backoff*g+r.standoff,T=b.backoff*f+r.startstandoff;if(d.nodeName==="line"){n={x:+t.attr("x1"),y:+t.attr("y1")},o={x:+t.attr("x2"),y:+t.attr("y2")};var p=n.x-o.x,M=n.y-o.y;if(u=(l=Math.atan2(M,p))+Math.PI,m&&T&&m+T>Math.sqrt(p*p+M*M))return void j();if(m){if(m*m>p*p+M*M)return void j();var A=m*Math.cos(l),C=m*Math.sin(l);o.x+=A,o.y+=C,t.attr({x2:o.x,y2:o.y})}if(T){if(T*T>p*p+M*M)return void j();var P=T*Math.cos(l),O=T*Math.sin(l);n.x-=P,n.y-=O,t.attr({x1:n.x,y1:n.y})}}else if(d.nodeName==="path"){var z=d.getTotalLength(),B="";if(z1){r=!0;break}}r?w.fullLayout._infolayer.select(".annotation-"+w.id+'[data-index="'+t+'"]').remove():(a._pdata=k(w.glplot.cameraParams,[v.xaxis.r2l(a.x)*h[0],v.yaxis.r2l(a.y)*h[1],v.zaxis.r2l(a.z)*h[2]]),_(w.graphDiv,a,t,w.id,a._xa,a._ya))}}},2468:function(R,E,e){var _=e(73972),k=e(71828);R.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:e(26997)}}},layoutAttributes:e(26997),handleDefaults:e(20226),includeBasePlot:function(i,w){var v=_.subplotsRegistry.gl3d;if(v)for(var h=v.attrRegex,s=Object.keys(i),t=0;t=0)))return a;if(u===3)o[u]>1&&(o[u]=1);else if(o[u]>=1)return a}var d=Math.round(255*o[0])+", "+Math.round(255*o[1])+", "+Math.round(255*o[2]);return l?"rgba("+d+", "+o[3]+")":"rgb("+d+")"}w.tinyRGB=function(a){var r=a.toRgb();return"rgb("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+")"},w.rgb=function(a){return w.tinyRGB(_(a))},w.opacity=function(a){return a?_(a).getAlpha():0},w.addOpacity=function(a,r){var n=_(a).toRgb();return"rgba("+Math.round(n.r)+", "+Math.round(n.g)+", "+Math.round(n.b)+", "+r+")"},w.combine=function(a,r){var n=_(a).toRgb();if(n.a===1)return _(a).toRgbString();var o=_(r||s).toRgb(),l=o.a===1?o:{r:255*(1-o.a)+o.r*o.a,g:255*(1-o.a)+o.g*o.a,b:255*(1-o.a)+o.b*o.a},u={r:l.r*(1-n.a)+n.r*n.a,g:l.g*(1-n.a)+n.g*n.a,b:l.b*(1-n.a)+n.b*n.a};return _(u).toRgbString()},w.contrast=function(a,r,n){var o=_(a);return o.getAlpha()!==1&&(o=_(w.combine(a,s))),(o.isDark()?r?o.lighten(r):s:n?o.darken(n):h).toString()},w.stroke=function(a,r){var n=_(r);a.style({stroke:w.tinyRGB(n),"stroke-opacity":n.getAlpha()})},w.fill=function(a,r){var n=_(r);a.style({fill:w.tinyRGB(n),"fill-opacity":n.getAlpha()})},w.clean=function(a){if(a&&typeof a=="object"){var r,n,o,l,u=Object.keys(a);for(r=0;r0?ft>=xt:ft<=xt));Be++)ft>_t&&ft0?ft>=xt:ft<=xt));Be++)ft>st[0]&&ft1){var ct=Math.pow(10,Math.floor(Math.log(wt)/Math.LN10));nt*=ct*s.roundUp(wt/ct,[2,5,10]),(Math.abs(he.start)/he.size+1e-6)%1<2e-6&&(rt.tick0=0)}rt.dtick=nt}rt.domain=Y?[Ye+ee/me.h,Ye+qe-ee/me.h]:[Ye+X/me.w,Ye+qe-X/me.w],rt.setScale(),O.attr("transform",t(Math.round(me.l),Math.round(me.t)));var lt,Tt=O.select("."+T.cbtitleunshift).attr("transform",t(-Math.round(me.l),-Math.round(me.t))),Et=rt.ticklabelposition,St=rt.title.font.size,Ft=O.select("."+T.cbaxis),zt=0,Je=0;function et(Ze,Qe){var st={propContainer:rt,propName:z._propPrefix+"title",traceIndex:z._traceIndex,_meta:z._meta,placeholder:de._dfltTitle.colorbar,containerGroup:O.select("."+T.cbtitle)},ft=Ze.charAt(0)==="h"?Ze.substr(1):"h"+Ze;O.selectAll("."+ft+",."+ft+"-math-group").remove(),l.draw(B,Ze,a(st,Qe||{}))}return s.syncOrAsync([i.previousPromises,function(){var Ze,Qe;(Y&&ht||!Y&&!ht)&&(xe==="top"&&(Ze=X+me.l+ve*re,Qe=ee+me.t+Ce*(1-Ye-qe)+3+.75*St),xe==="bottom"&&(Ze=X+me.l+ve*re,Qe=ee+me.t+Ce*(1-Ye)-3-.25*St),xe==="right"&&(Qe=ee+me.t+Ce*oe+3+.75*St,Ze=X+me.l+ve*Ye),et(rt._id+"title",{attributes:{x:Ze,y:Qe,"text-anchor":Y?"start":"middle"}}))},function(){if(!Y&&!ht||Y&&ht){var Ze,Qe=O.select("."+T.cbtitle),st=Qe.select("text"),ft=[-W/2,W/2],Be=Qe.select(".h"+rt._id+"title-math-group").node(),je=15.6;if(st.node()&&(je=parseInt(st.node().style.fontSize,10)*x),Be?(Ze=n.bBox(Be),Je=Ze.width,(zt=Ze.height)>je&&(ft[1]-=(zt-je)/2)):st.node()&&!st.classed(T.jsPlaceholder)&&(Ze=n.bBox(st.node()),Je=Ze.width,zt=Ze.height),Y){if(zt){if(zt+=5,xe==="top")rt.domain[1]-=zt/me.h,ft[1]*=-1;else{rt.domain[0]+=zt/me.h;var at=u.lineCount(st);ft[1]+=(1-at)*je}Qe.attr("transform",t(ft[0],ft[1])),rt.setScale()}}else Je&&(xe==="right"&&(rt.domain[0]+=(Je+St/2)/me.w),Qe.attr("transform",t(ft[0],ft[1])),rt.setScale())}O.selectAll("."+T.cbfills+",."+T.cblines).attr("transform",Y?t(0,Math.round(me.h*(1-rt.domain[1]))):t(Math.round(me.w*rt.domain[0]),0)),Ft.attr("transform",Y?t(0,Math.round(-me.t)):t(Math.round(-me.l),0));var ot=O.select("."+T.cbfills).selectAll("rect."+T.cbfill).attr("style","").data(ae);ot.enter().append("rect").classed(T.cbfill,!0).style("stroke","none"),ot.exit().remove();var xt=De.map(rt.c2p).map(Math.round).sort(function(dt,vt){return dt-vt});ot.each(function(dt,vt){var At=[vt===0?De[0]:(ae[vt]+ae[vt-1])/2,vt===ae.length-1?De[1]:(ae[vt]+ae[vt+1])/2].map(rt.c2p).map(Math.round);Y&&(At[1]=s.constrain(At[1]+(At[1]>At[0])?1:-1,xt[0],xt[1]));var Bt=_.select(this).attr(Y?"x":"y",Ae).attr(Y?"y":"x",_.min(At)).attr(Y?"width":"height",Math.max(Ie,2)).attr(Y?"height":"width",Math.max(_.max(At)-_.min(At),2));if(z._fillgradient)n.gradient(Bt,B,z._id,Y?"vertical":"horizontalreversed",z._fillgradient,"fill");else{var jt=Se(dt).replace("e-","");Bt.attr("fill",k(jt).toHexString())}});var yt=O.select("."+T.cblines).selectAll("path."+T.cbline).data(Me.color&&Me.width?be:[]);yt.enter().append("path").classed(T.cbline,!0),yt.exit().remove(),yt.each(function(dt){var vt=Ae,At=Math.round(rt.c2p(dt))+Me.width/2%1;_.select(this).attr("d","M"+(Y?vt+","+At:At+","+vt)+(Y?"h":"v")+Ie).call(n.lineGroupStyle,Me.width,Ee(dt),Me.dash)}),Ft.selectAll("g."+rt._id+"tick,path").remove();var _t=Ae+Ie+(W||0)/2-(z.ticks==="outside"?1:0),gt=v.calcTicks(rt),Ct=v.getTickSigns(rt)[2];return v.drawTicks(B,rt,{vals:rt.ticks==="inside"?v.clipEnds(rt,gt):gt,layer:Ft,path:v.makeTickPath(rt,_t,Ct),transFn:v.makeTransTickFn(rt)}),v.drawLabels(B,rt,{vals:gt,layer:Ft,transFn:v.makeTransTickLabelFn(rt),labelFns:v.makeLabelFns(rt,_t)})},function(){if(Y&&!ht||!Y&&ht){var Ze,Qe,st=rt.position||0,ft=rt._offset+rt._length/2;if(xe==="right")Qe=ft,Ze=me.l+ve*st+10+St*(rt.showticklabels?1:.5);else if(Ze=ft,xe==="bottom"&&(Qe=me.t+Ce*st+10+(Et.indexOf("inside")===-1?rt.tickfont.size:0)+(rt.ticks!=="intside"&&z.ticklen||0)),xe==="top"){var Be=we.text.split("
").length;Qe=me.t+Ce*st+10-Ie-x*St*Be}et((Y?"h":"v")+rt._id+"title",{avoid:{selection:_.select(B).selectAll("g."+rt._id+"tick"),side:xe,offsetTop:Y?0:me.t,offsetLeft:Y?me.l:0,maxShift:Y?de.width:de.height},attributes:{x:Ze,y:Qe,"text-anchor":"middle"},transform:{rotate:Y?-90:0,offset:0}})}},i.previousPromises,function(){var Ze,Qe=Ie+W/2;Et.indexOf("inside")===-1&&(Ze=n.bBox(Ft.node()),Qe+=Y?Ze.width:Ze.height),lt=Tt.select("text");var st=0,ft=Y&&xe==="top",Be=!Y&&xe==="right",je=0;if(lt.node()&&!lt.classed(T.jsPlaceholder)){var at,ot=Tt.select(".h"+rt._id+"title-math-group").node();ot&&(Y&&ht||!Y&&!ht)?(st=(Ze=n.bBox(ot)).width,at=Ze.height):(st=(Ze=n.bBox(Tt.node())).right-me.l-(Y?Ae:$e),at=Ze.bottom-me.t-(Y?$e:Ae),Y||xe!=="top"||(Qe+=Ze.height,je=Ze.height)),Be&&(lt.attr("transform",t(st/2+St/2,0)),st*=2),Qe=Math.max(Qe,Y?st:at)}var xt=2*(Y?X:ee)+Qe+Z+W/2,yt=0;!Y&&we.text&&J==="bottom"&&oe<=0&&(xt+=yt=xt/2,je+=yt),de._hColorbarMoveTitle=yt,de._hColorbarMoveCBTitle=je;var _t=Z+W,gt=(Y?Ae:$e)-_t/2-(Y?X:0),Ct=(Y?$e:Ae)-(Y?Ne:ee+je-yt);O.select("."+T.cbbg).attr("x",gt).attr("y",Ct).attr(Y?"width":"height",Math.max(xt-yt,2)).attr(Y?"height":"width",Math.max(Ne+_t,2)).call(o.fill,ie).call(o.stroke,z.bordercolor).style("stroke-width",Z);var dt=Be?Math.max(st-10,0):0;O.selectAll("."+T.cboutline).attr("x",(Y?Ae:$e+X)+dt).attr("y",(Y?$e+ee-Ne:Ae)+(ft?zt:0)).attr(Y?"width":"height",Math.max(Ie,2)).attr(Y?"height":"width",Math.max(Ne-(Y?2*ee+zt:2*X+dt),2)).call(o.stroke,z.outlinecolor).style({fill:"none","stroke-width":W});var vt=Y?ze*xt:0,At=Y?0:(1-Ue)*xt-je;if(vt=ce?me.l-vt:-vt,At=ue?me.t-At:-At,O.attr("transform",t(vt,At)),!Y&&(Z||k(ie).getAlpha()&&!k.equals(de.paper_bgcolor,ie))){var Bt=Ft.selectAll("text"),jt=Bt[0].length,Ut=O.select("."+T.cbbg).node(),tn=n.bBox(Ut),Xt=n.getTranslate(O);Bt.each(function(mn,xn){var Pn=jt-1;if(xn===0||xn===Pn){var Dn,En=n.bBox(this),Fn=n.getTranslate(this);if(xn===Pn){var er=En.right+Fn.x;(Dn=tn.right+Xt.x+$e-Z-2+re-er)>0&&(Dn=0)}else if(xn===0){var ir=En.left+Fn.x;(Dn=tn.left+Xt.x+$e+Z+2-ir)<0&&(Dn=0)}Dn&&(jt<3?this.setAttribute("transform","translate("+Dn+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var Qt={},Gt=y[te],vn=m[te],Tn=y[J],dn=m[J],Yt=xt-Ie;Y?(G==="pixels"?(Qt.y=oe,Qt.t=Ne*Tn,Qt.b=Ne*dn):(Qt.t=Qt.b=0,Qt.yt=oe+D*Tn,Qt.yb=oe-D*dn),j==="pixels"?(Qt.x=re,Qt.l=xt*Gt,Qt.r=xt*vn):(Qt.l=Yt*Gt,Qt.r=Yt*vn,Qt.xl=re-U*Gt,Qt.xr=re+U*vn)):(G==="pixels"?(Qt.x=re,Qt.l=Ne*Gt,Qt.r=Ne*vn):(Qt.l=Qt.r=0,Qt.xl=re+D*Gt,Qt.xr=re-D*vn),j==="pixels"?(Qt.y=1-oe,Qt.t=xt*Tn,Qt.b=xt*dn):(Qt.t=Yt*Tn,Qt.b=Yt*dn,Qt.yt=oe-U*Tn,Qt.yb=oe+U*dn));var ln=z.y<.5?"b":"t",nn=z.x<.5?"l":"r";B._fullLayout._reservedMargin[z._id]={};var fn={r:de.width-gt-vt,l:gt+Qt.r,b:de.height-Ct-At,t:Ct+Qt.b};ce&&ue?i.autoMargin(B,z._id,Qt):ce?B._fullLayout._reservedMargin[z._id][ln]=fn[ln]:ue||Y?B._fullLayout._reservedMargin[z._id][nn]=fn[nn]:B._fullLayout._reservedMargin[z._id][ln]=fn[ln]}],B)}(C,A,p);P&&P.then&&(p._promises||[]).push(P),p._context.edits.colorbarPosition&&function(O,z,B){var Y,D,G,U=z.orientation==="v",j=B._fullLayout._size;h.init({element:O.node(),gd:B,prepFn:function(){Y=O.attr("transform"),r(O)},moveFn:function(W,Z){O.attr("transform",Y+t(W,Z)),D=h.align((U?z._uFrac:z._vFrac)+W/j.w,U?z._thickFrac:z._lenFrac,0,1,z.xanchor),G=h.align((U?z._vFrac:1-z._uFrac)-Z/j.h,U?z._lenFrac:z._thickFrac,0,1,z.yanchor);var ie=h.getCursor(D,G,z.xanchor,z.yanchor);r(O,ie)},doneFn:function(){if(r(O),D!==void 0&&G!==void 0){var W={};W[z._propPrefix+"x"]=D,W[z._propPrefix+"y"]=G,z._traceIndex!==void 0?w.call("_guiRestyle",B,W,z._traceIndex):w.call("_guiRelayout",B,W)}}})}(C,A,p)}),M.exit().each(function(A){i.autoMargin(p,A._id)}).remove(),M.order()}}},76228:function(R,E,e){var _=e(71828);R.exports=function(k){return _.isPlainObject(k.colorbar)}},12311:function(R,E,e){R.exports={moduleType:"component",name:"colorbar",attributes:e(63583),supplyDefaults:e(62499),draw:e(98981).draw,hasColorbar:e(76228)}},50693:function(R,E,e){var _=e(63583),k=e(30587).counter,i=e(78607),w=e(63282).scales;function v(h){return"`"+h+"`"}i(w),R.exports=function(h,s){h=h||"";var t,a=(s=s||{}).cLetter||"c",r=("onlyIfNumerical"in s&&s.onlyIfNumerical,"noScale"in s?s.noScale:h==="marker.line"),n="showScaleDflt"in s?s.showScaleDflt:a==="z",o=typeof s.colorscaleDflt=="string"?w[s.colorscaleDflt]:null,l=s.editTypeOverride||"",u=h?h+".":"";"colorAttr"in s?(t=s.colorAttr,s.colorAttr):v(u+(t={z:"z",c:"color"}[a]));var d=a+"auto",c=a+"min",b=a+"max",g=a+"mid",f={};f[c]=f[b]=void 0;var x={};x[d]=!1;var y={};return t==="color"&&(y.color={valType:"color",arrayOk:!0,editType:l||"style"},s.anim&&(y.color.anim=!0)),y[d]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:f},y[c]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:x},y[b]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:x},y[g]={valType:"number",dflt:null,editType:"calc",impliedEdits:f},y.colorscale={valType:"colorscale",editType:"calc",dflt:o,impliedEdits:{autocolorscale:!1}},y.autocolorscale={valType:"boolean",dflt:s.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},y.reversescale={valType:"boolean",dflt:!1,editType:"plot"},r||(y.showscale={valType:"boolean",dflt:n,editType:"calc"},y.colorbar=_),s.noColorAxis||(y.coloraxis={valType:"subplotid",regex:k("coloraxis"),dflt:null,editType:"calc"}),y}},78803:function(R,E,e){var _=e(92770),k=e(71828),i=e(52075).extractOpts;R.exports=function(w,v,h){var s,t=w._fullLayout,a=h.vals,r=h.containerStr,n=r?k.nestedProperty(v,r).get():v,o=i(n),l=o.auto!==!1,u=o.min,d=o.max,c=o.mid,b=function(){return k.aggNums(Math.min,null,a)},g=function(){return k.aggNums(Math.max,null,a)};u===void 0?u=b():l&&(u=n._colorAx&&_(u)?Math.min(u,b()):b()),d===void 0?d=g():l&&(d=n._colorAx&&_(d)?Math.max(d,g()):g()),l&&c!==void 0&&(d-c>c-u?u=c-(d-c):d-c=0?t.colorscale.sequential:t.colorscale.sequentialminus,o._sync("colorscale",s))}},33046:function(R,E,e){var _=e(71828),k=e(52075).hasColorscale,i=e(52075).extractOpts;R.exports=function(w,v){function h(l,u){var d=l["_"+u];d!==void 0&&(l[u]=d)}function s(l,u){var d=u.container?_.nestedProperty(l,u.container).get():l;if(d)if(d.coloraxis)d._colorAx=v[d.coloraxis];else{var c=i(d),b=c.auto;(b||c.min===void 0)&&h(d,u.min),(b||c.max===void 0)&&h(d,u.max),c.autocolorscale&&h(d,"colorscale")}}for(var t=0;t=0;b--,g++){var f=u[b];c[g]=[1-f[0],f[1]]}return c}function o(u,d){d=d||{};for(var c=u.domain,b=u.range,g=b.length,f=new Array(g),x=0;x1.3333333333333333-h?v:h}},70461:function(R,E,e){var _=e(71828),k=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];R.exports=function(i,w,v,h){return i=v==="left"?0:v==="center"?1:v==="right"?2:_.constrain(Math.floor(3*i),0,2),w=h==="bottom"?0:h==="middle"?1:h==="top"?2:_.constrain(Math.floor(3*w),0,2),k[w][i]}},64505:function(R,E){E.selectMode=function(e){return e==="lasso"||e==="select"},E.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"},E.openMode=function(e){return e==="drawline"||e==="drawopenpath"},E.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"},E.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"},E.selectingOrDrawing=function(e){return E.freeMode(e)||E.rectMode(e)}},28569:function(R,E,e){var _=e(48956),k=e(57035),i=e(38520),w=e(71828).removeElement,v=e(85555),h=R.exports={};h.align=e(92807),h.getCursor=e(70461);var s=e(26041);function t(){var r=document.createElement("div");r.className="dragcover";var n=r.style;return n.position="fixed",n.left=0,n.right=0,n.top=0,n.bottom=0,n.zIndex=999999999,n.background="none",document.body.appendChild(r),r}function a(r){return _(r.changedTouches?r.changedTouches[0]:r,document.body)}h.unhover=s.wrapped,h.unhoverRaw=s.raw,h.init=function(r){var n,o,l,u,d,c,b,g,f=r.gd,x=1,y=f._context.doubleClickDelay,m=r.element;f._mouseDownTime||(f._mouseDownTime=0),m.style.pointerEvents="all",m.onmousedown=p,i?(m._ontouchstart&&m.removeEventListener("touchstart",m._ontouchstart),m._ontouchstart=p,m.addEventListener("touchstart",p,{passive:!1})):m.ontouchstart=p;var T=r.clampFn||function(C,P,O){return Math.abs(C)y&&(x=Math.max(x-1,1)),f._dragged)r.doneFn&&r.doneFn();else if(r.clickFn&&r.clickFn(x,c),!g){var P;try{P=new MouseEvent("click",C)}catch{var O=a(C);(P=document.createEvent("MouseEvents")).initMouseEvent("click",C.bubbles,C.cancelable,C.view,C.detail,C.screenX,C.screenY,O[0],O[1],C.ctrlKey,C.altKey,C.shiftKey,C.metaKey,C.button,C.relatedTarget)}b.dispatchEvent(P)}f._dragging=!1,f._dragged=!1}else f._dragged=!1}},h.coverSlip=t},26041:function(R,E,e){var _=e(11086),k=e(79990),i=e(24401).getGraphDiv,w=e(26675),v=R.exports={};v.wrapped=function(h,s,t){(h=i(h))._fullLayout&&k.clear(h._fullLayout._uid+w.HOVERID),v.raw(h,s,t)},v.raw=function(h,s){var t=h._fullLayout,a=h._hoverdata;s||(s={}),s.target&&!h._dragged&&_.triggerHandler(h,"plotly_beforehover",s)===!1||(t._hoverlayer.selectAll("g").remove(),t._hoverlayer.selectAll("line").remove(),t._hoverlayer.selectAll("circle").remove(),h._hoverdata=void 0,s.target&&a&&h.emit("plotly_unhover",{event:s,points:a}))}},79952:function(R,E){E.P={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},E.u={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}},91424:function(R,E,e){var _=e(39898),k=e(71828),i=k.numberFormat,w=e(92770),v=e(84267),h=e(73972),s=e(7901),t=e(21081),a=k.strTranslate,r=e(63893),n=e(77922),o=e(18783).LINE_SPACING,l=e(37822).DESELECTDIM,u=e(34098),d=e(39984),c=e(23469).appendArrayPointValue,b=R.exports={};function g(Ee,Se,he){var fe=Se.fillpattern,ae=fe&&b.getPatternAttr(fe.shape,0,"");if(ae){var be=b.getPatternAttr(fe.bgcolor,0,null),Ie=b.getPatternAttr(fe.fgcolor,0,null),Te=fe.fgopacity,Ne=b.getPatternAttr(fe.size,0,8),qe=b.getPatternAttr(fe.solidity,0,.3),ve=Se.uid;b.pattern(Ee,"point",he,ve,ae,Ne,qe,void 0,fe.fillmode,be,Ie,Te)}else Se.fillcolor&&Ee.call(s.fill,Se.fillcolor)}b.font=function(Ee,Se,he,fe){k.isPlainObject(Se)&&(fe=Se.color,he=Se.size,Se=Se.family),Se&&Ee.style("font-family",Se),he+1&&Ee.style("font-size",he+"px"),fe&&Ee.call(s.fill,fe)},b.setPosition=function(Ee,Se,he){Ee.attr("x",Se).attr("y",he)},b.setSize=function(Ee,Se,he){Ee.attr("width",Se).attr("height",he)},b.setRect=function(Ee,Se,he,fe,ae){Ee.call(b.setPosition,Se,he).call(b.setSize,fe,ae)},b.translatePoint=function(Ee,Se,he,fe){var ae=he.c2p(Ee.x),be=fe.c2p(Ee.y);return!!(w(ae)&&w(be)&&Se.node())&&(Se.node().nodeName==="text"?Se.attr("x",ae).attr("y",be):Se.attr("transform",a(ae,be)),!0)},b.translatePoints=function(Ee,Se,he){Ee.each(function(fe){var ae=_.select(this);b.translatePoint(fe,ae,Se,he)})},b.hideOutsideRangePoint=function(Ee,Se,he,fe,ae,be){Se.attr("display",he.isPtWithinRange(Ee,ae)&&fe.isPtWithinRange(Ee,be)?null:"none")},b.hideOutsideRangePoints=function(Ee,Se){if(Se._hasClipOnAxisFalse){var he=Se.xaxis,fe=Se.yaxis;Ee.each(function(ae){var be=ae[0].trace,Ie=be.xcalendar,Te=be.ycalendar,Ne=h.traceIs(be,"bar-like")?".bartext":".point,.textpoint";Ee.selectAll(Ne).each(function(qe){b.hideOutsideRangePoint(qe,_.select(this),he,fe,Ie,Te)})})}},b.crispRound=function(Ee,Se,he){return Se&&w(Se)?Ee._context.staticPlot?Se:Se<1?1:Math.round(Se):he||0},b.singleLineStyle=function(Ee,Se,he,fe,ae){Se.style("fill","none");var be=(((Ee||[])[0]||{}).trace||{}).line||{},Ie=he||be.width||0,Te=ae||be.dash||"";s.stroke(Se,fe||be.color),b.dashLine(Se,Te,Ie)},b.lineGroupStyle=function(Ee,Se,he,fe){Ee.style("fill","none").each(function(ae){var be=(((ae||[])[0]||{}).trace||{}).line||{},Ie=Se||be.width||0,Te=fe||be.dash||"";_.select(this).call(s.stroke,he||be.color).call(b.dashLine,Te,Ie)})},b.dashLine=function(Ee,Se,he){he=+he||0,Se=b.dashStyle(Se,he),Ee.style({"stroke-dasharray":Se,"stroke-width":he+"px"})},b.dashStyle=function(Ee,Se){Se=+Se||1;var he=Math.max(Se,3);return Ee==="solid"?Ee="":Ee==="dot"?Ee=he+"px,"+he+"px":Ee==="dash"?Ee=3*he+"px,"+3*he+"px":Ee==="longdash"?Ee=5*he+"px,"+5*he+"px":Ee==="dashdot"?Ee=3*he+"px,"+he+"px,"+he+"px,"+he+"px":Ee==="longdashdot"&&(Ee=5*he+"px,"+2*he+"px,"+he+"px,"+2*he+"px"),Ee},b.singleFillStyle=function(Ee,Se){var he=_.select(Ee.node());g(Ee,((he.data()[0]||[])[0]||{}).trace||{},Se)},b.fillGroupStyle=function(Ee,Se){Ee.style("stroke-width",0).each(function(he){var fe=_.select(this);he[0].trace&&g(fe,he[0].trace,Se)})};var f=e(90998);b.symbolNames=[],b.symbolFuncs=[],b.symbolBackOffs=[],b.symbolNeedLines={},b.symbolNoDot={},b.symbolNoFill={},b.symbolList=[],Object.keys(f).forEach(function(Ee){var Se=f[Ee],he=Se.n;b.symbolList.push(he,String(he),Ee,he+100,String(he+100),Ee+"-open"),b.symbolNames[he]=Ee,b.symbolFuncs[he]=Se.f,b.symbolBackOffs[he]=Se.backoff||0,Se.needLine&&(b.symbolNeedLines[he]=!0),Se.noDot?b.symbolNoDot[he]=!0:b.symbolList.push(he+200,String(he+200),Ee+"-dot",he+300,String(he+300),Ee+"-open-dot"),Se.noFill&&(b.symbolNoFill[he]=!0)});var x=b.symbolNames.length;function y(Ee,Se,he,fe){var ae=Ee%100;return b.symbolFuncs[ae](Se,he,fe)+(Ee>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}b.symbolNumber=function(Ee){if(w(Ee))Ee=+Ee;else if(typeof Ee=="string"){var Se=0;Ee.indexOf("-open")>0&&(Se=100,Ee=Ee.replace("-open","")),Ee.indexOf("-dot")>0&&(Se+=200,Ee=Ee.replace("-dot","")),(Ee=b.symbolNames.indexOf(Ee))>=0&&(Ee+=Se)}return Ee%100>=x||Ee>=400?0:Math.floor(Math.max(Ee,0))};var m={x1:1,x2:0,y1:0,y2:0},T={x1:0,x2:0,y1:1,y2:0},p=i("~f"),M={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:m},horizontalreversed:{node:"linearGradient",attrs:m,reversed:!0},vertical:{node:"linearGradient",attrs:T},verticalreversed:{node:"linearGradient",attrs:T,reversed:!0}};b.gradient=function(Ee,Se,he,fe,ae,be){for(var Ie=ae.length,Te=M[fe],Ne=new Array(Ie),qe=0;qe=100;var qe=De(Ee,he),ve=ee(Ee,he);Se.attr("d",y(Ne,Te,qe,ve))}var Ce,Ae,ze,Ue=!1;if(Ee.so)ze=Ie.outlierwidth,Ae=Ie.outliercolor,Ce=be.outliercolor;else{var Ve=(Ie||{}).width;ze=(Ee.mlw+1||Ve+1||(Ee.trace?(Ee.trace.marker.line||{}).width:0)+1)-1||0,Ae="mlc"in Ee?Ee.mlcc=fe.lineScale(Ee.mlc):k.isArrayOrTypedArray(Ie.color)?s.defaultLine:Ie.color,k.isArrayOrTypedArray(be.color)&&(Ce=s.defaultLine,Ue=!0),Ce="mc"in Ee?Ee.mcc=fe.markerScale(Ee.mc):be.color||"rgba(0,0,0,0)",fe.selectedColorFn&&(Ce=fe.selectedColorFn(Ee))}if(Ee.om)Se.call(s.stroke,Ce).style({"stroke-width":(ze||1)+"px",fill:"none"});else{Se.style("stroke-width",(Ee.isBlank?0:ze)+"px");var Ye=be.gradient,$e=Ee.mgt;$e?Ue=!0:$e=Ye&&Ye.type,k.isArrayOrTypedArray($e)&&($e=$e[0],M[$e]||($e=0));var rt=be.pattern,ht=rt&&b.getPatternAttr(rt.shape,Ee.i,"");if($e&&$e!=="none"){var nt=Ee.mgc;nt?Ue=!0:nt=Ye.color;var bt=he.uid;Ue&&(bt+="-"+Ee.i),b.gradient(Se,ae,bt,$e,[[0,nt],[1,Ce]],"fill")}else if(ht){var wt=b.getPatternAttr(rt.bgcolor,Ee.i,null),ct=b.getPatternAttr(rt.fgcolor,Ee.i,null),lt=rt.fgopacity,Tt=b.getPatternAttr(rt.size,Ee.i,8),Et=b.getPatternAttr(rt.solidity,Ee.i,.3),St=Ee.mcc||k.isArrayOrTypedArray(rt.shape)||k.isArrayOrTypedArray(rt.bgcolor)||k.isArrayOrTypedArray(rt.size)||k.isArrayOrTypedArray(rt.solidity),Ft=he.uid;St&&(Ft+="-"+Ee.i),b.pattern(Se,"point",ae,Ft,ht,Tt,Et,Ee.mcc,rt.fillmode,wt,ct,lt)}else s.fill(Se,Ce);ze&&s.stroke(Se,Ae)}},b.makePointStyleFns=function(Ee){var Se={},he=Ee.marker;return Se.markerScale=b.tryColorscale(he,""),Se.lineScale=b.tryColorscale(he,"line"),h.traceIs(Ee,"symbols")&&(Se.ms2mrc=u.isBubble(Ee)?d(Ee):function(){return(he.size||6)/2}),Ee.selectedpoints&&k.extendFlat(Se,b.makeSelectedPointStyleFns(Ee)),Se},b.makeSelectedPointStyleFns=function(Ee){var Se={},he=Ee.selected||{},fe=Ee.unselected||{},ae=Ee.marker||{},be=he.marker||{},Ie=fe.marker||{},Te=ae.opacity,Ne=be.opacity,qe=Ie.opacity,ve=Ne!==void 0,Ce=qe!==void 0;(k.isArrayOrTypedArray(Te)||ve||Ce)&&(Se.selectedOpacityFn=function(nt){var bt=nt.mo===void 0?ae.opacity:nt.mo;return nt.selected?ve?Ne:bt:Ce?qe:l*bt});var Ae=ae.color,ze=be.color,Ue=Ie.color;(ze||Ue)&&(Se.selectedColorFn=function(nt){var bt=nt.mcc||Ae;return nt.selected?ze||bt:Ue||bt});var Ve=ae.size,Ye=be.size,$e=Ie.size,rt=Ye!==void 0,ht=$e!==void 0;return h.traceIs(Ee,"symbols")&&(rt||ht)&&(Se.selectedSizeFn=function(nt){var bt=nt.mrc||Ve/2;return nt.selected?rt?Ye/2:bt:ht?$e/2:bt}),Se},b.makeSelectedTextStyleFns=function(Ee){var Se={},he=Ee.selected||{},fe=Ee.unselected||{},ae=Ee.textfont||{},be=he.textfont||{},Ie=fe.textfont||{},Te=ae.color,Ne=be.color,qe=Ie.color;return Se.selectedTextColorFn=function(ve){var Ce=ve.tc||Te;return ve.selected?Ne||Ce:qe||(Ne?Ce:s.addOpacity(Ce,l))},Se},b.selectedPointStyle=function(Ee,Se){if(Ee.size()&&Se.selectedpoints){var he=b.makeSelectedPointStyleFns(Se),fe=Se.marker||{},ae=[];he.selectedOpacityFn&&ae.push(function(be,Ie){be.style("opacity",he.selectedOpacityFn(Ie))}),he.selectedColorFn&&ae.push(function(be,Ie){s.fill(be,he.selectedColorFn(Ie))}),he.selectedSizeFn&&ae.push(function(be,Ie){var Te=Ie.mx||fe.symbol||0,Ne=he.selectedSizeFn(Ie);be.attr("d",y(b.symbolNumber(Te),Ne,De(Ie,Se),ee(Ie,Se))),Ie.mrc2=Ne}),ae.length&&Ee.each(function(be){for(var Ie=_.select(this),Te=0;Te0?he:0}function B(Ee,Se,he){return he&&(Ee=W(Ee)),Se?D(Ee[1]):Y(Ee[0])}function Y(Ee){var Se=_.round(Ee,2);return A=Se,Se}function D(Ee){var Se=_.round(Ee,2);return C=Se,Se}function G(Ee,Se,he,fe){var ae=Ee[0]-Se[0],be=Ee[1]-Se[1],Ie=he[0]-Se[0],Te=he[1]-Se[1],Ne=Math.pow(ae*ae+be*be,.25),qe=Math.pow(Ie*Ie+Te*Te,.25),ve=(qe*qe*ae-Ne*Ne*Ie)*fe,Ce=(qe*qe*be-Ne*Ne*Te)*fe,Ae=3*qe*(Ne+qe),ze=3*Ne*(Ne+qe);return[[Y(Se[0]+(Ae&&ve/Ae)),D(Se[1]+(Ae&&Ce/Ae))],[Y(Se[0]-(ze&&ve/ze)),D(Se[1]-(ze&&Ce/ze))]]}b.textPointStyle=function(Ee,Se,he){if(Ee.size()){var fe;if(Se.selectedpoints){var ae=b.makeSelectedTextStyleFns(Se);fe=ae.selectedTextColorFn}var be=Se.texttemplate,Ie=he._fullLayout;Ee.each(function(Te){var Ne=_.select(this),qe=be?k.extractOption(Te,Se,"txt","texttemplate"):k.extractOption(Te,Se,"tx","text");if(qe||qe===0){if(be){var ve=Se._module.formatLabels,Ce=ve?ve(Te,Se,Ie):{},Ae={};c(Ae,Se,Te.i);var ze=Se._meta||{};qe=k.texttemplateString(qe,Ce,Ie._d3locale,Ae,Te,ze)}var Ue=Te.tp||Se.textposition,Ve=z(Te,Se),Ye=fe?fe(Te):Te.tc||Se.textfont.color;Ne.call(b.font,Te.tf||Se.textfont.family,Ve,Ye).text(qe).call(r.convertToTspans,he).call(O,Ue,Ve,Te.mrc)}else Ne.remove()})}},b.selectedTextStyle=function(Ee,Se){if(Ee.size()&&Se.selectedpoints){var he=b.makeSelectedTextStyleFns(Se);Ee.each(function(fe){var ae=_.select(this),be=he.selectedTextColorFn(fe),Ie=fe.tp||Se.textposition,Te=z(fe,Se);s.fill(ae,be);var Ne=h.traceIs(Se,"bar-like");O(ae,Ie,Te,fe.mrc2||fe.mrc,Ne)})}},b.smoothopen=function(Ee,Se){if(Ee.length<3)return"M"+Ee.join("L");var he,fe="M"+Ee[0],ae=[];for(he=1;he=Ne||nt>=ve&&nt<=Ne)&&(bt<=Ce&&bt>=qe||bt>=Ce&&bt<=qe)&&(Ee=[nt,bt])}return Ee}b.steps=function(Ee){var Se=U[Ee]||j;return function(he){for(var fe="M"+Y(he[0][0])+","+D(he[0][1]),ae=he.length,be=1;be=1e4&&(b.savedBBoxes={},Z=0),he&&(b.savedBBoxes[he]=ze),Z++,k.extendFlat({},ze)},b.setClipUrl=function(Ee,Se,he){Ee.attr("clip-path",te(Se,he))},b.getTranslate=function(Ee){var Se=(Ee[Ee.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,function(he,fe,ae){return[fe,ae].join(" ")}).split(" ");return{x:+Se[0]||0,y:+Se[1]||0}},b.setTranslate=function(Ee,Se,he){var fe=Ee.attr?"attr":"getAttribute",ae=Ee.attr?"attr":"setAttribute",be=Ee[fe]("transform")||"";return Se=Se||0,he=he||0,be=be.replace(/(\btranslate\(.*?\);?)/,"").trim(),be=(be+=a(Se,he)).trim(),Ee[ae]("transform",be),be},b.getScale=function(Ee){var Se=(Ee[Ee.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,function(he,fe,ae){return[fe,ae].join(" ")}).split(" ");return{x:+Se[0]||1,y:+Se[1]||1}},b.setScale=function(Ee,Se,he){var fe=Ee.attr?"attr":"getAttribute",ae=Ee.attr?"attr":"setAttribute",be=Ee[fe]("transform")||"";return Se=Se||1,he=he||1,be=be.replace(/(\bscale\(.*?\);?)/,"").trim(),be=(be+="scale("+Se+","+he+")").trim(),Ee[ae]("transform",be),be};var J=/\s*sc.*/;b.setPointGroupScale=function(Ee,Se,he){if(Se=Se||1,he=he||1,Ee){var fe=Se===1&&he===1?"":"scale("+Se+","+he+")";Ee.each(function(){var ae=(this.getAttribute("transform")||"").replace(J,"");ae=(ae+=fe).trim(),this.setAttribute("transform",ae)})}};var X=/translate\([^)]*\)\s*$/;function ee(Ee,Se){var he;return Ee&&(he=Ee.mf),he===void 0&&(he=Se.marker&&Se.marker.standoff||0),Se._geo||Se._xA?he:-he}b.setTextPointsScale=function(Ee,Se,he){Ee&&Ee.each(function(){var fe,ae=_.select(this),be=ae.select("text");if(be.node()){var Ie=parseFloat(be.attr("x")||0),Te=parseFloat(be.attr("y")||0),Ne=(ae.attr("transform")||"").match(X);fe=Se===1&&he===1?[]:[a(Ie,Te),"scale("+Se+","+he+")",a(-Ie,-Te)],Ne&&fe.push(Ne),ae.attr("transform",fe.join(""))}})},b.getMarkerStandoff=ee;var re,oe,ue,ce,de,me,_e=Math.atan2,Me=Math.cos,we=Math.sin;function xe(Ee,Se){var he=Se[0],fe=Se[1];return[he*Me(Ee)-fe*we(Ee),he*we(Ee)+fe*Me(Ee)]}function De(Ee,Se){var he,fe,ae=Ee.ma;ae===void 0&&(ae=Se.marker.angle||0);var be=Se.marker.angleref;if(be==="previous"||be==="north"){if(Se._geo){var Ie=Se._geo.project(Ee.lonlat);he=Ie[0],fe=Ie[1]}else{var Te=Se._xA,Ne=Se._yA;if(!Te||!Ne)return 90;he=Te.c2p(Ee.x),fe=Ne.c2p(Ee.y)}if(Se._geo){var qe,ve=Ee.lonlat[0],Ce=Ee.lonlat[1],Ae=Se._geo.project([ve,Ce+1e-5]),ze=Se._geo.project([ve+1e-5,Ce]),Ue=_e(ze[1]-fe,ze[0]-he),Ve=_e(Ae[1]-fe,Ae[0]-he);if(be==="north")qe=ae/180*Math.PI;else if(be==="previous"){var Ye=ve/180*Math.PI,$e=Ce/180*Math.PI,rt=re/180*Math.PI,ht=oe/180*Math.PI,nt=rt-Ye,bt=Me(ht)*we(nt),wt=we(ht)*Me($e)-Me(ht)*we($e)*Me(nt);qe=-_e(bt,wt)-Math.PI,re=ve,oe=Ce}var ct=xe(Ue,[Me(qe),0]),lt=xe(Ve,[we(qe),0]);ae=_e(ct[1]+lt[1],ct[0]+lt[0])/Math.PI*180,be!=="previous"||me===Se.uid&&Ee.i===de+1||(ae=null)}if(be==="previous"&&!Se._geo)if(me===Se.uid&&Ee.i===de+1&&w(he)&&w(fe)){var Tt=he-ue,Et=fe-ce,St=Se.line&&Se.line.shape||"",Ft=St.slice(St.length-1);Ft==="h"&&(Et=0),Ft==="v"&&(Tt=0),ae+=_e(Et,Tt)/Math.PI*180+90}else ae=null}return ue=he,ce=fe,de=Ee.i,me=Se.uid,ae}b.getMarkerAngle=De},90998:function(R,E,e){var _,k,i,w,v=e(95616),h=e(39898).round,s="M0,0Z",t=Math.sqrt(2),a=Math.sqrt(3),r=Math.PI,n=Math.cos,o=Math.sin;function l(d){return d===null}function u(d,c,b){if(!(d&&d%360!=0||c))return b;if(i===d&&w===c&&_===b)return k;function g(B,Y){var D=n(B),G=o(B),U=Y[0],j=Y[1]+(c||0);return[U*D-j*G,U*G+j*D]}i=d,w=c,_=b;for(var f=d/180*r,x=0,y=0,m=v(b),T="",p=0;p0,o=v._context.staticPlot;h.each(function(l){var u,d=l[0].trace,c=d.error_x||{},b=d.error_y||{};d.ids&&(u=function(y){return y.id});var g=w.hasMarkers(d)&&d.marker.maxdisplayed>0;b.visible||c.visible||(l=[]);var f=_.select(this).selectAll("g.errorbar").data(l,u);if(f.exit().remove(),l.length){c.visible||f.selectAll("path.xerror").remove(),b.visible||f.selectAll("path.yerror").remove(),f.style("opacity",1);var x=f.enter().append("g").classed("errorbar",!0);n&&x.style("opacity",0).transition().duration(t.duration).style("opacity",1),i.setClipUrl(f,s.layerClipId,v),f.each(function(y){var m=_.select(this),T=function(O,z,B){var Y={x:z.c2p(O.x),y:B.c2p(O.y)};return O.yh!==void 0&&(Y.yh=B.c2p(O.yh),Y.ys=B.c2p(O.ys),k(Y.ys)||(Y.noYS=!0,Y.ys=B.c2p(O.ys,!0))),O.xh!==void 0&&(Y.xh=z.c2p(O.xh),Y.xs=z.c2p(O.xs),k(Y.xs)||(Y.noXS=!0,Y.xs=z.c2p(O.xs,!0))),Y}(y,a,r);if(!g||y.vis){var p,M=m.select("path.yerror");if(b.visible&&k(T.x)&&k(T.yh)&&k(T.ys)){var A=b.width;p="M"+(T.x-A)+","+T.yh+"h"+2*A+"m-"+A+",0V"+T.ys,T.noYS||(p+="m-"+A+",0h"+2*A),M.size()?n&&(M=M.transition().duration(t.duration).ease(t.easing)):M=m.append("path").style("vector-effect",o?"none":"non-scaling-stroke").classed("yerror",!0),M.attr("d",p)}else M.remove();var C=m.select("path.xerror");if(c.visible&&k(T.y)&&k(T.xh)&&k(T.xs)){var P=(c.copy_ystyle?b:c).width;p="M"+T.xh+","+(T.y-P)+"v"+2*P+"m0,-"+P+"H"+T.xs,T.noXS||(p+="m0,-"+P+"v"+2*P),C.size()?n&&(C=C.transition().duration(t.duration).ease(t.easing)):C=m.append("path").style("vector-effect",o?"none":"non-scaling-stroke").classed("xerror",!0),C.attr("d",p)}else C.remove()}})}})}},62662:function(R,E,e){var _=e(39898),k=e(7901);R.exports=function(i){i.each(function(w){var v=w[0].trace,h=v.error_y||{},s=v.error_x||{},t=_.select(this);t.selectAll("path.yerror").style("stroke-width",h.thickness+"px").call(k.stroke,h.color),s.copy_ystyle&&(s=h),t.selectAll("path.xerror").style("stroke-width",s.thickness+"px").call(k.stroke,s.color)})}},77914:function(R,E,e){var _=e(41940),k=e(528).hoverlabel,i=e(1426).extendFlat;R.exports={hoverlabel:{bgcolor:i({},k.bgcolor,{arrayOk:!0}),bordercolor:i({},k.bordercolor,{arrayOk:!0}),font:_({arrayOk:!0,editType:"none"}),align:i({},k.align,{arrayOk:!0}),namelength:i({},k.namelength,{arrayOk:!0}),editType:"none"}}},30732:function(R,E,e){var _=e(71828),k=e(73972);function i(w,v,h,s){s=s||_.identity,Array.isArray(w)&&(v[0][h]=s(w))}R.exports=function(w){var v=w.calcdata,h=w._fullLayout;function s(o){return function(l){return _.coerceHoverinfo({hoverinfo:l},{_module:o._module},h)}}for(var t=0;t=0&&a.indexae[0]._length||et<0||et>be[0]._length)return o.unhoverRaw(ce,de)}else Je="xpx"in de?de.xpx:ae[0]._length/2,et="ypx"in de?de.ypx:be[0]._length/2;if(de.pointerX=Je+ae[0]._offset,de.pointerY=et+be[0]._offset,ze="xval"in de?d.flat(we,de.xval):d.p2c(ae,Je),Ue="yval"in de?d.flat(we,de.yval):d.p2c(be,et),!k(ze[0])||!k(Ue[0]))return w.warn("Fx.hover failed",de,ce),o.unhoverRaw(ce,de)}var st=1/0;function ft(Ht,sn){for(Ye=0;YeTt&&(Et.splice(0,Tt),st=Et[0].distance),Se&&Ae!==0&&Et.length===0){lt.distance=Ae,lt.index=!1;var Nn=rt._module.hoverPoints(lt,wt,ct,"closest",{hoverLayer:xe._hoverlayer});if(Nn&&(Nn=Nn.filter(function($t){return $t.spikeDistance<=Ae})),Nn&&Nn.length){var jn,rr=Nn.filter(function($t){return $t.xa.showspikes&&$t.xa.spikesnap!=="hovered data"});if(rr.length){var Wt=rr[0];k(Wt.x0)&&k(Wt.y0)&&(jn=je(Wt),(!Ft.vLinePoint||Ft.vLinePoint.spikeDistance>jn.spikeDistance)&&(Ft.vLinePoint=jn))}var An=Nn.filter(function($t){return $t.ya.showspikes&&$t.ya.spikesnap!=="hovered data"});if(An.length){var Lt=An[0];k(Lt.x0)&&k(Lt.y0)&&(jn=je(Lt),(!Ft.hLinePoint||Ft.hLinePoint.spikeDistance>jn.spikeDistance)&&(Ft.hLinePoint=jn))}}}}}function Be(Ht,sn,gn){for(var bn,Cn=null,Yn=1/0,Nn=0;Nn0&&Math.abs(Ht.distance)Bt-1;jt--)Qt(Et[jt]);Et=Ut,yt()}var Gt=ce._hoverdata,vn=[],Tn=ie(ce),dn=te(ce);for(Ve=0;Ve1||Et.length>1)||ve==="closest"&&zt&&Et.length>1,fr=n.combine(xe.plot_bgcolor||n.background,xe.paper_bgcolor),ar=z(Et,{gd:ce,hovermode:ve,rotateLabels:ir,bgColor:fr,container:xe._hoverlayer,outerContainer:xe._paper.node(),commonLabelOpts:xe.hoverlabel,hoverdistance:xe.hoverdistance}),Kn=ar.hoverLabels;if(d.isUnifiedHover(ve)||(function(Ht,sn,gn,bn){var Cn,Yn,Nn,jn,rr,Wt,An,Lt=sn?"xa":"ya",$t=sn?"ya":"xa",rn=0,wn=1,kn=Ht.size(),Ln=new Array(kn),hn=0,Jt=bn.minX,en=bn.maxX,cn=bn.minY,pn=bn.maxY,On=function(vr){return vr*gn._invScaleX},Rn=function(vr){return vr*gn._invScaleY};function Wn(vr){var Er=vr[0],Jn=vr[vr.length-1];if(Yn=Er.pmin-Er.pos-Er.dp+Er.size,Nn=Jn.pos+Jn.dp+Jn.size-Er.pmax,Yn>.01){for(rr=vr.length-1;rr>=0;rr--)vr[rr].dp+=Yn;Cn=!1}if(!(Nn<.01)){if(Yn<-.01){for(rr=vr.length-1;rr>=0;rr--)vr[rr].dp-=Nn;Cn=!1}if(Cn){var br=0;for(jn=0;jnEr.pmax&&br++;for(jn=vr.length-1;jn>=0&&!(br<=0);jn--)(Wt=vr[jn]).pos>Er.pmax-1&&(Wt.del=!0,br--);for(jn=0;jn=0;rr--)vr[rr].dp-=Nn;for(jn=vr.length-1;jn>=0&&!(br<=0);jn--)(Wt=vr[jn]).pos+Wt.dp+Wt.size>Er.pmax&&(Wt.del=!0,br--)}}}for(Ht.each(function(vr){var Er=vr[Lt],Jn=vr[$t],br=Er._id.charAt(0)==="x",zr=Er.range;hn===0&&zr&&zr[0]>zr[1]!==br&&(wn=-1);var ti=0,xi=br?gn.width:gn.height;if(gn.hovermode==="x"||gn.hovermode==="y"){var gi,Ai,li=Y(vr,sn),zi=vr.anchor,Ro=zi==="end"?-1:1;if(zi==="middle")Ai=(gi=vr.crossPos+(br?Rn(li.y-vr.by/2):On(vr.bx/2+vr.tx2width/2)))+(br?Rn(vr.by):On(vr.bx));else if(br)Ai=(gi=vr.crossPos+Rn(p+li.y)-Rn(vr.by/2-p))+Rn(vr.by);else{var Va=On(Ro*p+li.x),Ko=Va+On(Ro*vr.bx);gi=vr.crossPos+Math.min(Va,Ko),Ai=vr.crossPos+Math.max(Va,Ko)}br?cn!==void 0&&pn!==void 0&&Math.min(Ai,pn)-Math.max(gi,cn)>1&&(Jn.side==="left"?(ti=Jn._mainLinePosition,xi=gn.width):xi=Jn._mainLinePosition):Jt!==void 0&&en!==void 0&&Math.min(Ai,en)-Math.max(gi,Jt)>1&&(Jn.side==="top"?(ti=Jn._mainLinePosition,xi=gn.height):xi=Jn._mainLinePosition)}Ln[hn++]=[{datum:vr,traceIndex:vr.trace.index,dp:0,pos:vr.pos,posref:vr.posref,size:vr.by*(br?y:1)/2,pmin:ti,pmax:xi}]}),Ln.sort(function(vr,Er){return vr[0].posref-Er[0].posref||wn*(Er[0].traceIndex-vr[0].traceIndex)});!Cn&&rn<=kn;){for(rn++,Cn=!0,jn=0;jn.01&&Xn.pmin===lr.pmin&&Xn.pmax===lr.pmax){for(rr=tr.length-1;rr>=0;rr--)tr[rr].dp+=Yn;for(Hn.push.apply(Hn,tr),Ln.splice(jn+1,1),An=0,rr=Hn.length-1;rr>=0;rr--)An+=Hn[rr].dp;for(Nn=An/Hn.length,rr=Hn.length-1;rr>=0;rr--)Hn[rr].dp-=Nn;Cn=!1}else jn++}Ln.forEach(Wn)}for(jn=Ln.length-1;jn>=0;jn--){var or=Ln[jn];for(rr=or.length-1;rr>=0;rr--){var sr=or[rr],gr=sr.datum;gr.offset=sr.dp,gr.del=sr.del}}}(Kn,ir,xe,ar.commonLabelBoundingBox),D(Kn,ir,xe._invScaleX,xe._invScaleY)),Me&&Me.tagName){var wr=u.getComponentMethod("annotations","hasClickToShow")(ce,vn);a(_.select(Me),wr?"pointer":"")}Me&&!_e&&function(Ht,sn,gn){if(!gn||gn.length!==Ht._hoverdata.length)return!0;for(var bn=gn.length-1;bn>=0;bn--){var Cn=gn[bn],Yn=Ht._hoverdata[bn];if(Cn.curveNumber!==Yn.curveNumber||String(Cn.pointNumber)!==String(Yn.pointNumber)||String(Cn.pointNumbers)!==String(Yn.pointNumbers))return!0}return!1}(ce,0,Gt)&&(Gt&&ce.emit("plotly_unhover",{event:de,points:Gt}),ce.emit("plotly_hover",{event:de,points:ce._hoverdata,xaxes:ae,yaxes:be,xvals:ze,yvals:Ue}))})(X,ee,re,oe,ue)})},E.loneHover=function(X,ee){var re=!0;Array.isArray(X)||(re=!1,X=[X]);var oe=ee.gd,ue=ie(oe),ce=te(oe),de=z(X.map(function(Me){var we=Me._x0||Me.x0||Me.x||0,xe=Me._x1||Me.x1||Me.x||0,De=Me._y0||Me.y0||Me.y||0,Ee=Me._y1||Me.y1||Me.y||0,Se=Me.eventData;if(Se){var he=Math.min(we,xe),fe=Math.max(we,xe),ae=Math.min(De,Ee),be=Math.max(De,Ee),Ie=Me.trace;if(u.traceIs(Ie,"gl3d")){var Te=oe._fullLayout[Ie.scene]._scene.container,Ne=Te.offsetLeft,qe=Te.offsetTop;he+=Ne,fe+=Ne,ae+=qe,be+=qe}Se.bbox={x0:he+ce,x1:fe+ce,y0:ae+ue,y1:be+ue},ee.inOut_bbox&&ee.inOut_bbox.push(Se.bbox)}else Se=!1;return{color:Me.color||n.defaultLine,x0:Me.x0||Me.x||0,x1:Me.x1||Me.x||0,y0:Me.y0||Me.y||0,y1:Me.y1||Me.y||0,xLabel:Me.xLabel,yLabel:Me.yLabel,zLabel:Me.zLabel,text:Me.text,name:Me.name,idealAlign:Me.idealAlign,borderColor:Me.borderColor,fontFamily:Me.fontFamily,fontSize:Me.fontSize,fontColor:Me.fontColor,nameLength:Me.nameLength,textAlign:Me.textAlign,trace:Me.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:Me.hovertemplate||!1,hovertemplateLabels:Me.hovertemplateLabels||!1,eventData:Se}}),{gd:oe,hovermode:"closest",rotateLabels:!1,bgColor:ee.bgColor||n.background,container:_.select(ee.container),outerContainer:ee.outerContainer||ee.container}).hoverLabels,me=0,_e=0;return de.sort(function(Me,we){return Me.y0-we.y0}).each(function(Me,we){var xe=Me.y0-Me.by/2;Me.offset=xe-5([\s\S]*)<\/extra>/;function z(X,ee){var re=ee.gd,oe=re._fullLayout,ue=ee.hovermode,ce=ee.rotateLabels,de=ee.bgColor,me=ee.container,_e=ee.outerContainer,Me=ee.commonLabelOpts||{};if(X.length===0)return[[]];var we=ee.fontFamily||c.HOVERFONT,xe=ee.fontSize||c.HOVERFONTSIZE,De=X[0],Ee=De.xa,Se=De.ya,he=ue.charAt(0),fe=he+"Label",ae=De[fe];if(ae===void 0&&Ee.type==="multicategory")for(var be=0;beoe.width-dn?(Qt=oe.width-dn,At.attr("d","M"+(dn-p)+",0L"+dn+","+Tn+p+"v"+Tn+(2*M+vn.height)+"H-"+dn+"V"+Tn+p+"H"+(dn-2*p)+"Z")):At.attr("d","M0,0L"+p+","+Tn+p+"H"+dn+"v"+Tn+(2*M+vn.height)+"H-"+dn+"V"+Tn+p+"H-"+p+"Z"),Ye.minX=Qt-dn,Ye.maxX=Qt+dn,Ee.side==="top"?(Ye.minY=Gt-(2*M+vn.height),Ye.maxY=Gt-M):(Ye.minY=Gt+M,Ye.maxY=Gt+(2*M+vn.height))}else{var Yt,ln,nn;Se.side==="right"?(Yt="start",ln=1,nn="",Qt=Ee._offset+Ee._length):(Yt="end",ln=-1,nn="-",Qt=Ee._offset),Gt=Se._offset+(De.y0+De.y1)/2,Bt.attr("text-anchor",Yt),At.attr("d","M0,0L"+nn+p+","+p+"V"+(M+vn.height/2)+"h"+nn+(2*M+vn.width)+"V-"+(M+vn.height/2)+"H"+nn+p+"V-"+p+"Z"),Ye.minY=Gt-(M+vn.height/2),Ye.maxY=Gt+(M+vn.height/2),Se.side==="right"?(Ye.minX=Qt+p,Ye.maxX=Qt+p+(2*M+vn.width)):(Ye.minX=Qt-p-(2*M+vn.width),Ye.maxX=Qt-p);var fn,mn=vn.height/2,xn=Te-vn.top-mn,Pn="clip"+oe._uid+"commonlabel"+Se._id;if(Qt=0?et:Ze+ft=0?Ze:gt+ft=0?zt:Je+Be=0?Je:Ct+Be=0,vt.idealAlign!=="top"&&er||!ir?er?(mn+=Pn/2,vt.anchor="start"):vt.anchor="middle":(mn-=Pn/2,vt.anchor="end"),vt.crossPos=mn;else{if(vt.pos=mn,er=fn+xn/2+fr<=Ne,ir=fn-xn/2-fr>=0,vt.idealAlign!=="left"&&er||!ir)if(er)fn+=xn/2,vt.anchor="start";else{vt.anchor="middle";var ar=fr/2,Kn=fn+ar-Ne,wr=fn-ar;Kn>0&&(fn-=Kn),wr<0&&(fn+=-wr)}else fn-=xn/2,vt.anchor="end";vt.crossPos=fn}Tn.attr("text-anchor",vt.anchor),Yt&&dn.attr("text-anchor",vt.anchor),At.attr("transform",v(fn,mn)+(ce?h(f):""))}),{hoverLabels:dt,commonLabelBoundingBox:Ye}}function B(X,ee,re,oe,ue,ce){var de="",me="";X.nameOverride!==void 0&&(X.name=X.nameOverride),X.name&&(X.trace._meta&&(X.name=w.templateString(X.name,X.trace._meta)),de=W(X.name,X.nameLength));var _e=re.charAt(0),Me=_e==="x"?"y":"x";X.zLabel!==void 0?(X.xLabel!==void 0&&(me+="x: "+X.xLabel+"
"),X.yLabel!==void 0&&(me+="y: "+X.yLabel+"
"),X.trace.type!=="choropleth"&&X.trace.type!=="choroplethmapbox"&&(me+=(me?"z: ":"")+X.zLabel)):ee&&X[_e+"Label"]===ue?me=X[Me+"Label"]||"":X.xLabel===void 0?X.yLabel!==void 0&&X.trace.type!=="scattercarpet"&&(me=X.yLabel):me=X.yLabel===void 0?X.xLabel:"("+X.xLabel+", "+X.yLabel+")",!X.text&&X.text!==0||Array.isArray(X.text)||(me+=(me?"
":"")+X.text),X.extraText!==void 0&&(me+=(me?"
":"")+X.extraText),ce&&me===""&&!X.hovertemplate&&(de===""&&ce.remove(),me=de);var we=X.hovertemplate||!1;if(we){var xe=X.hovertemplateLabels||X;X[_e+"Label"]!==ue&&(xe[_e+"other"]=xe[_e+"Val"],xe[_e+"otherLabel"]=xe[_e+"Label"]),me=(me=w.hovertemplateString(we,xe,oe._d3locale,X.eventData[0]||{},X.trace._meta)).replace(O,function(De,Ee){return de=W(Ee,X.nameLength),""})}return[me,de]}function Y(X,ee){var re=0,oe=X.offset;return ee&&(oe*=-T,re=X.offset*m),{x:re,y:oe}}function D(X,ee,re,oe){var ue=function(de){return de*re},ce=function(de){return de*oe};X.each(function(de){var me=_.select(this);if(de.del)return me.remove();var _e,Me,we,xe,De=me.select("text.nums"),Ee=de.anchor,Se=Ee==="end"?-1:1,he=(xe=(we=(Me={start:1,end:-1,middle:0}[(_e=de).anchor])*(p+M))+Me*(_e.txwidth+M),_e.anchor==="middle"&&(we-=_e.tx2width/2,xe+=_e.txwidth/2+M),{alignShift:Me,textShiftX:we,text2ShiftX:xe}),fe=Y(de,ee),ae=fe.x,be=fe.y,Ie=Ee==="middle";me.select("path").attr("d",Ie?"M-"+ue(de.bx/2+de.tx2width/2)+","+ce(be-de.by/2)+"h"+ue(de.bx)+"v"+ce(de.by)+"h-"+ue(de.bx)+"Z":"M0,0L"+ue(Se*p+ae)+","+ce(p+be)+"v"+ce(de.by/2-p)+"h"+ue(Se*de.bx)+"v-"+ce(de.by)+"H"+ue(Se*p+ae)+"V"+ce(be-p)+"Z");var Te=ae+he.textShiftX,Ne=be+de.ty0-de.by/2+M,qe=de.textAlign||"auto";qe!=="auto"&&(qe==="left"&&Ee!=="start"?(De.attr("text-anchor","start"),Te=Ie?-de.bx/2-de.tx2width/2+M:-de.bx-M):qe==="right"&&Ee!=="end"&&(De.attr("text-anchor","end"),Te=Ie?de.bx/2-de.tx2width/2-M:de.bx+M)),De.call(t.positionText,ue(Te),ce(Ne)),de.tx2width&&(me.select("text.name").call(t.positionText,ue(he.text2ShiftX+he.alignShift*M+ae),ce(be+de.ty0-de.by/2+M)),me.select("rect").call(r.setRect,ue(he.text2ShiftX+(he.alignShift-1)*de.tx2width/2+ae),ce(be-de.by/2-1),ue(de.tx2width),ce(de.by+2)))})}function G(X,ee){var re=X.index,oe=X.trace||{},ue=X.cd[0],ce=X.cd[re]||{};function de(De){return De||k(De)&&De===0}var me=Array.isArray(re)?function(De,Ee){var Se=w.castOption(ue,re,De);return de(Se)?Se:w.extractOption({},oe,"",Ee)}:function(De,Ee){return w.extractOption(ce,oe,De,Ee)};function _e(De,Ee,Se){var he=me(Ee,Se);de(he)&&(X[De]=he)}if(_e("hoverinfo","hi","hoverinfo"),_e("bgcolor","hbg","hoverlabel.bgcolor"),_e("borderColor","hbc","hoverlabel.bordercolor"),_e("fontFamily","htf","hoverlabel.font.family"),_e("fontSize","hts","hoverlabel.font.size"),_e("fontColor","htc","hoverlabel.font.color"),_e("nameLength","hnl","hoverlabel.namelength"),_e("textAlign","hta","hoverlabel.align"),X.posref=ee==="y"||ee==="closest"&&oe.orientation==="h"?X.xa._offset+(X.x0+X.x1)/2:X.ya._offset+(X.y0+X.y1)/2,X.x0=w.constrain(X.x0,0,X.xa._length),X.x1=w.constrain(X.x1,0,X.xa._length),X.y0=w.constrain(X.y0,0,X.ya._length),X.y1=w.constrain(X.y1,0,X.ya._length),X.xLabelVal!==void 0&&(X.xLabel="xLabel"in X?X.xLabel:l.hoverLabelText(X.xa,X.xLabelVal,oe.xhoverformat),X.xVal=X.xa.c2d(X.xLabelVal)),X.yLabelVal!==void 0&&(X.yLabel="yLabel"in X?X.yLabel:l.hoverLabelText(X.ya,X.yLabelVal,oe.yhoverformat),X.yVal=X.ya.c2d(X.yLabelVal)),X.zLabelVal!==void 0&&X.zLabel===void 0&&(X.zLabel=String(X.zLabelVal)),!(isNaN(X.xerr)||X.xa.type==="log"&&X.xerr<=0)){var Me=l.tickText(X.xa,X.xa.c2l(X.xerr),"hover").text;X.xerrneg!==void 0?X.xLabel+=" +"+Me+" / -"+l.tickText(X.xa,X.xa.c2l(X.xerrneg),"hover").text:X.xLabel+=" ± "+Me,ee==="x"&&(X.distance+=1)}if(!(isNaN(X.yerr)||X.ya.type==="log"&&X.yerr<=0)){var we=l.tickText(X.ya,X.ya.c2l(X.yerr),"hover").text;X.yerrneg!==void 0?X.yLabel+=" +"+we+" / -"+l.tickText(X.ya,X.ya.c2l(X.yerrneg),"hover").text:X.yLabel+=" ± "+we,ee==="y"&&(X.distance+=1)}var xe=X.hoverinfo||X.trace.hoverinfo;return xe&&xe!=="all"&&((xe=Array.isArray(xe)?xe:xe.split("+")).indexOf("x")===-1&&(X.xLabel=void 0),xe.indexOf("y")===-1&&(X.yLabel=void 0),xe.indexOf("z")===-1&&(X.zLabel=void 0),xe.indexOf("text")===-1&&(X.text=void 0),xe.indexOf("name")===-1&&(X.name=void 0)),X}function U(X,ee,re){var oe,ue,ce=re.container,de=re.fullLayout,me=de._size,_e=re.event,Me=!!ee.hLinePoint,we=!!ee.vLinePoint;if(ce.selectAll(".spikeline").remove(),we||Me){var xe=n.combine(de.plot_bgcolor,de.paper_bgcolor);if(Me){var De,Ee,Se=ee.hLinePoint;oe=Se&&Se.xa,(ue=Se&&Se.ya).spikesnap==="cursor"?(De=_e.pointerX,Ee=_e.pointerY):(De=oe._offset+Se.x,Ee=ue._offset+Se.y);var he,fe,ae=i.readability(Se.color,xe)<1.5?n.contrast(xe):Se.color,be=ue.spikemode,Ie=ue.spikethickness,Te=ue.spikecolor||ae,Ne=l.getPxPosition(X,ue);if(be.indexOf("toaxis")!==-1||be.indexOf("across")!==-1){if(be.indexOf("toaxis")!==-1&&(he=Ne,fe=De),be.indexOf("across")!==-1){var qe=ue._counterDomainMin,ve=ue._counterDomainMax;ue.anchor==="free"&&(qe=Math.min(qe,ue.position),ve=Math.max(ve,ue.position)),he=me.l+qe*me.w,fe=me.l+ve*me.w}ce.insert("line",":first-child").attr({x1:he,x2:fe,y1:Ee,y2:Ee,"stroke-width":Ie,stroke:Te,"stroke-dasharray":r.dashStyle(ue.spikedash,Ie)}).classed("spikeline",!0).classed("crisp",!0),ce.insert("line",":first-child").attr({x1:he,x2:fe,y1:Ee,y2:Ee,"stroke-width":Ie+2,stroke:xe}).classed("spikeline",!0).classed("crisp",!0)}be.indexOf("marker")!==-1&&ce.insert("circle",":first-child").attr({cx:Ne+(ue.side!=="right"?Ie:-Ie),cy:Ee,r:Ie,fill:Te}).classed("spikeline",!0)}if(we){var Ce,Ae,ze=ee.vLinePoint;oe=ze&&ze.xa,ue=ze&&ze.ya,oe.spikesnap==="cursor"?(Ce=_e.pointerX,Ae=_e.pointerY):(Ce=oe._offset+ze.x,Ae=ue._offset+ze.y);var Ue,Ve,Ye=i.readability(ze.color,xe)<1.5?n.contrast(xe):ze.color,$e=oe.spikemode,rt=oe.spikethickness,ht=oe.spikecolor||Ye,nt=l.getPxPosition(X,oe);if($e.indexOf("toaxis")!==-1||$e.indexOf("across")!==-1){if($e.indexOf("toaxis")!==-1&&(Ue=nt,Ve=Ae),$e.indexOf("across")!==-1){var bt=oe._counterDomainMin,wt=oe._counterDomainMax;oe.anchor==="free"&&(bt=Math.min(bt,oe.position),wt=Math.max(wt,oe.position)),Ue=me.t+(1-wt)*me.h,Ve=me.t+(1-bt)*me.h}ce.insert("line",":first-child").attr({x1:Ce,x2:Ce,y1:Ue,y2:Ve,"stroke-width":rt,stroke:ht,"stroke-dasharray":r.dashStyle(oe.spikedash,rt)}).classed("spikeline",!0).classed("crisp",!0),ce.insert("line",":first-child").attr({x1:Ce,x2:Ce,y1:Ue,y2:Ve,"stroke-width":rt+2,stroke:xe}).classed("spikeline",!0).classed("crisp",!0)}$e.indexOf("marker")!==-1&&ce.insert("circle",":first-child").attr({cx:Ce,cy:nt-(oe.side!=="top"?rt:-rt),r:rt,fill:ht}).classed("spikeline",!0)}}}function j(X,ee){return!ee||ee.vLinePoint!==X._spikepoints.vLinePoint||ee.hLinePoint!==X._spikepoints.hLinePoint}function W(X,ee){return t.plainText(X||"",{len:ee,allowedTags:["br","sub","sup","b","i","em"]})}function Z(X,ee,re){var oe=ee[X+"a"],ue=ee[X+"Val"],ce=ee.cd[0];if(oe.type==="category"||oe.type==="multicategory")ue=oe._categoriesMap[ue];else if(oe.type==="date"){var de=ee.trace[X+"periodalignment"];if(de){var me=ee.cd[ee.index],_e=me[X+"Start"];_e===void 0&&(_e=me[X]);var Me=me[X+"End"];Me===void 0&&(Me=me[X]);var we=Me-_e;de==="end"?ue+=we:de==="middle"&&(ue+=we/2)}ue=oe.d2c(ue)}return ce&&ce.t&&ce.t.posLetter===oe._id&&(re.boxmode!=="group"&&re.violinmode!=="group"||(ue+=ce.t.dPos)),ue}function ie(X){return X.offsetTop+X.clientTop}function te(X){return X.offsetLeft+X.clientLeft}function J(X,ee){var re=X._fullLayout,oe=ee.getBoundingClientRect(),ue=oe.left,ce=oe.top,de=ue+oe.width,me=ce+oe.height,_e=w.apply3DTransform(re._invTransform)(ue,ce),Me=w.apply3DTransform(re._invTransform)(de,me),we=_e[0],xe=_e[1],De=Me[0],Ee=Me[1];return{x:we,y:xe,width:De-we,height:Ee-xe,top:Math.min(xe,Ee),left:Math.min(we,De),right:Math.max(we,De),bottom:Math.max(xe,Ee)}}},38048:function(R,E,e){var _=e(71828),k=e(7901),i=e(23469).isUnifiedHover;R.exports=function(w,v,h,s){s=s||{};var t=v.legend;function a(r){s.font[r]||(s.font[r]=t?v.legend.font[r]:v.font[r])}v&&i(v.hovermode)&&(s.font||(s.font={}),a("size"),a("family"),a("color"),t?(s.bgcolor||(s.bgcolor=k.combine(v.legend.bgcolor,v.paper_bgcolor)),s.bordercolor||(s.bordercolor=v.legend.bordercolor)):s.bgcolor||(s.bgcolor=v.paper_bgcolor)),h("hoverlabel.bgcolor",s.bgcolor),h("hoverlabel.bordercolor",s.bordercolor),h("hoverlabel.namelength",s.namelength),_.coerceFont(h,"hoverlabel.font",s.font),h("hoverlabel.align",s.align)}},98212:function(R,E,e){var _=e(71828),k=e(528);R.exports=function(i,w){function v(h,s){return w[h]!==void 0?w[h]:_.coerce(i,w,k,h,s)}return v("clickmode"),v("hovermode")}},30211:function(R,E,e){var _=e(39898),k=e(71828),i=e(28569),w=e(23469),v=e(528),h=e(88335);R.exports={moduleType:"component",name:"fx",constants:e(26675),schema:{layout:v},attributes:e(77914),layoutAttributes:v,supplyLayoutGlobalDefaults:e(22774),supplyDefaults:e(54268),supplyLayoutDefaults:e(34938),calc:e(30732),getDistanceFunction:w.getDistanceFunction,getClosest:w.getClosest,inbox:w.inbox,quadrature:w.quadrature,appendArrayPointValue:w.appendArrayPointValue,castHoverOption:function(s,t,a){return k.castOption(s,t,"hoverlabel."+a)},castHoverinfo:function(s,t,a){return k.castOption(s,a,"hoverinfo",function(r){return k.coerceHoverinfo({hoverinfo:r},{_module:s._module},t)})},hover:h.hover,unhover:i.unhover,loneHover:h.loneHover,loneUnhover:function(s){var t=k.isD3Selection(s)?s:_.select(s);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()},click:e(75914)}},528:function(R,E,e){var _=e(26675),k=e(41940),i=k({editType:"none"});i.family.dflt=_.HOVERFONT,i.size.dflt=_.HOVERFONTSIZE,R.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:i,grouptitlefont:k({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}},34938:function(R,E,e){var _=e(71828),k=e(528),i=e(98212),w=e(38048);R.exports=function(v,h){function s(n,o){return _.coerce(v,h,k,n,o)}i(v,h)&&(s("hoverdistance"),s("spikedistance")),s("dragmode")==="select"&&s("selectdirection");var t=h._has("mapbox"),a=h._has("geo"),r=h._basePlotModules.length;h.dragmode==="zoom"&&((t||a)&&r===1||t&&a&&r===2)&&(h.dragmode="pan"),w(v,h,s),_.coerceFont(s,"hoverlabel.grouptitlefont",h.hoverlabel.font)}},22774:function(R,E,e){var _=e(71828),k=e(38048),i=e(528);R.exports=function(w,v){k(w,v,function(h,s){return _.coerce(w,v,i,h,s)})}},83312:function(R,E,e){var _=e(71828),k=e(30587).counter,i=e(27670).Y,w=e(85555).idRegex,v=e(44467),h={rows:{valType:"integer",min:1,editType:"plot"},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot"},columns:{valType:"integer",min:1,editType:"plot"},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[k("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[w.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[w.y.toString(),""],editType:"plot"},editType:"plot"},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot"},xgap:{valType:"number",min:0,max:1,editType:"plot"},ygap:{valType:"number",min:0,max:1,editType:"plot"},domain:i({name:"grid",editType:"plot",noGridCell:!0},{}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot"},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot"},editType:"plot"};function s(r,n,o){var l=n[o+"axes"],u=Object.keys((r._splomAxes||{})[o]||{});return Array.isArray(l)?l:u.length?u:void 0}function t(r,n,o,l,u,d){var c=n(r+"gap",o),b=n("domain."+r);n(r+"side",l);for(var g=new Array(u),f=b[0],x=(b[1]-f)/(u-c),y=x*(1-c),m=0;m1){b||g||f||O("pattern")==="independent"&&(b=!0),y._hasSubplotGrid=b;var p,M,A=O("roworder")==="top to bottom",C=b?.2:.1,P=b?.3:.1;x&&n._splomGridDflt&&(p=n._splomGridDflt.xside,M=n._splomGridDflt.yside),y._domains={x:t("x",O,C,p,T),y:t("y",O,P,M,m,A)}}else delete n.grid}function O(z,B){return _.coerce(o,y,h,z,B)}},contentDefaults:function(r,n){var o=n.grid;if(o&&o._domains){var l,u,d,c,b,g,f,x=r.grid||{},y=n._subplots,m=o._hasSubplotGrid,T=o.rows,p=o.columns,M=o.pattern==="independent",A=o._axisMap={};if(m){var C=x.subplots||[];g=o.subplots=new Array(T);var P=1;for(l=0;l1);if(M===!1&&(n.legend=void 0),(M!==!1||l.uirevision)&&(d("uirevision",n.uirevision),M!==!1)){d("borderwidth");var A,C,P,O=d("orientation")==="h",z=d("yref")==="paper",B=d("xref")==="paper",Y="left";if(O?(A=0,_.getComponentMethod("rangeslider","isVisible")(r.xaxis)?z?(C=1.1,P="bottom"):(C=1,P="top"):z?(C=-.1,P="top"):(C=0,P="bottom")):(C=1,P="auto",B?A=1.02:(A=1,Y="right")),k.coerce(l,u,{x:{valType:"number",editType:"legend",min:B?-2:0,max:B?3:1,dflt:A}},"x"),k.coerce(l,u,{y:{valType:"number",editType:"legend",min:z?-2:0,max:z?3:1,dflt:C}},"y"),d("traceorder",T),s.isGrouped(n.legend)&&d("tracegroupgap"),d("entrywidth"),d("entrywidthmode"),d("itemsizing"),d("itemwidth"),d("itemclick"),d("itemdoubleclick"),d("groupclick"),d("xanchor",Y),d("yanchor",P),d("valign"),k.noneOrAll(l,u,["x","y"]),d("title.text")){d("title.side",O?"left":"top");var D=k.extendFlat({},c,{size:k.bigFont(c.size)});k.coerceFont(d,"title.font",D)}}}}R.exports=function(a,r,n){var o,l=["legend"];for(o=0;o1)}var te=j.hiddenlabels||[];if(!(Z||j.showlegend&&ie.length))return G.selectAll("."+W).remove(),j._topdefs.select("#"+D).remove(),i.autoMargin(B,W);var J=k.ensureSingle(G,"g",W,function(_e){Z||_e.attr("pointer-events","all")}),X=k.ensureSingleById(j._topdefs,"clipPath",D,function(_e){_e.append("rect")}),ee=k.ensureSingle(J,"rect","bg",function(_e){_e.attr("shape-rendering","crispEdges")});ee.call(t.stroke,U.bordercolor).call(t.fill,U.bgcolor).style("stroke-width",U.borderwidth+"px");var re=k.ensureSingle(J,"g","scrollbox"),oe=U.title;if(U._titleWidth=0,U._titleHeight=0,oe.text){var ue=k.ensureSingle(re,"text",W+"titletext");ue.attr("text-anchor","start").call(s.font,oe.font).text(oe.text),C(ue,re,B,U,f)}else re.selectAll("."+W+"titletext").remove();var ce=k.ensureSingle(J,"rect","scrollbar",function(_e){_e.attr(n.scrollBarEnterAttrs).call(t.fill,n.scrollBarColor)}),de=re.selectAll("g.groups").data(ie);de.enter().append("g").attr("class","groups"),de.exit().remove();var me=de.selectAll("g.traces").data(k.identity);me.enter().append("g").attr("class","traces"),me.exit().remove(),me.style("opacity",function(_e){var Me=_e[0].trace;return w.traceIs(Me,"pie-like")?te.indexOf(_e[0].label)!==-1?.5:1:Me.visible==="legendonly"?.5:1}).each(function(){_.select(this).call(p,B,U)}).call(b,B,U).each(function(){Z||_.select(this).call(A,B,W)}),k.syncOrAsync([i.previousPromises,function(){return function(_e,Me,we,xe){var De=_e._fullLayout,Ee=z(xe);xe||(xe=De[Ee]);var Se=De._size,he=g.isVertical(xe),fe=g.isGrouped(xe),ae=xe.entrywidthmode==="fraction",be=xe.borderwidth,Ie=2*be,Te=n.itemGap,Ne=xe.itemwidth+2*Te,qe=2*(be+Te),ve=O(xe),Ce=xe.y<0||xe.y===0&&ve==="top",Ae=xe.y>1||xe.y===1&&ve==="bottom",ze=xe.tracegroupgap,Ue={};xe._maxHeight=Math.max(Ce||Ae?De.height/2:Se.h,30);var Ve=0;xe._width=0,xe._height=0;var Ye=function(Be){var je=0,at=0,ot=Be.title.side;return ot&&(ot.indexOf("left")!==-1&&(je=Be._titleWidth),ot.indexOf("top")!==-1&&(at=Be._titleHeight)),[je,at]}(xe);if(he)we.each(function(Be){var je=Be[0].height;s.setTranslate(this,be+Ye[0],be+Ye[1]+xe._height+je/2+Te),xe._height+=je,xe._width=Math.max(xe._width,Be[0].width)}),Ve=Ne+xe._width,xe._width+=Te+Ne+Ie,xe._height+=qe,fe&&(Me.each(function(Be,je){s.setTranslate(this,0,je*xe.tracegroupgap)}),xe._height+=(xe._lgroupsLength-1)*xe.tracegroupgap);else{var $e=P(xe),rt=xe.x<0||xe.x===0&&$e==="right",ht=xe.x>1||xe.x===1&&$e==="left",nt=Ae||Ce,bt=De.width/2;xe._maxWidth=Math.max(rt?nt&&$e==="left"?Se.l+Se.w:bt:ht?nt&&$e==="right"?Se.r+Se.w:bt:Se.w,2*Ne);var wt=0,ct=0;we.each(function(Be){var je=m(Be,xe,Ne);wt=Math.max(wt,je),ct+=je}),Ve=null;var lt=0;if(fe){var Tt=0,Et=0,St=0;Me.each(function(){var Be=0,je=0;_.select(this).selectAll("g.traces").each(function(ot){var xt=m(ot,xe,Ne),yt=ot[0].height;s.setTranslate(this,Ye[0],Ye[1]+be+Te+yt/2+je),je+=yt,Be=Math.max(Be,xt),Ue[ot[0].trace.legendgroup]=Be});var at=Be+Te;Et>0&&at+be+Et>xe._maxWidth?(lt=Math.max(lt,Et),Et=0,St+=Tt+ze,Tt=je):Tt=Math.max(Tt,je),s.setTranslate(this,Et,St),Et+=at}),xe._width=Math.max(lt,Et)+be,xe._height=St+Tt+qe}else{var Ft=we.size(),zt=ct+Ie+(Ft-1)*Te=xe._maxWidth&&(lt=Math.max(lt,Qe),et=0,Ze+=Je,xe._height+=Je,Je=0),s.setTranslate(this,Ye[0]+be+et,Ye[1]+be+Ze+je/2+Te),Qe=et+at+Te,et+=ot,Je=Math.max(Je,je)}),zt?(xe._width=et+Ie,xe._height=Je+qe):(xe._width=Math.max(lt,Qe)+Ie,xe._height+=Je+qe)}}xe._width=Math.ceil(Math.max(xe._width+Ye[0],xe._titleWidth+2*(be+n.titlePad))),xe._height=Math.ceil(Math.max(xe._height+Ye[1],xe._titleHeight+2*(be+n.itemGap))),xe._effHeight=Math.min(xe._height,xe._maxHeight);var st=_e._context.edits,ft=st.legendText||st.legendPosition;we.each(function(Be){var je=_.select(this).select("."+Ee+"toggle"),at=Be[0].height,ot=Be[0].trace.legendgroup,xt=m(Be,xe,Ne);fe&&ot!==""&&(xt=Ue[ot]);var yt=ft?Ne:Ve||xt;he||ae||(yt+=Te/2),s.setRect(je,0,-at/2,yt,at)})}(B,de,me,U)},function(){var _e,Me,we,xe,De=j._size,Ee=U.borderwidth,Se=U.xref==="paper",he=U.yref==="paper";if(!Z){var fe,ae;fe=Se?De.l+De.w*U.x-u[P(U)]*U._width:j.width*U.x-u[P(U)]*U._width,ae=he?De.t+De.h*(1-U.y)-u[O(U)]*U._effHeight:j.height*(1-U.y)-u[O(U)]*U._effHeight;var be=function(nt,bt,wt,ct){var lt=nt._fullLayout,Tt=lt[bt],Et=P(Tt),St=O(Tt),Ft=Tt.xref==="paper",zt=Tt.yref==="paper";nt._fullLayout._reservedMargin[bt]={};var Je=Tt.y<.5?"b":"t",et=Tt.x<.5?"l":"r",Ze={r:lt.width-wt,l:wt+Tt._width,b:lt.height-ct,t:ct+Tt._effHeight};if(Ft&&zt)return i.autoMargin(nt,bt,{x:Tt.x,y:Tt.y,l:Tt._width*u[Et],r:Tt._width*d[Et],b:Tt._effHeight*d[St],t:Tt._effHeight*u[St]});Ft?nt._fullLayout._reservedMargin[bt][Je]=Ze[Je]:zt||Tt.orientation==="v"?nt._fullLayout._reservedMargin[bt][et]=Ze[et]:nt._fullLayout._reservedMargin[bt][Je]=Ze[Je]}(B,W,fe,ae);if(be)return;if(j.margin.autoexpand){var Ie=fe,Te=ae;fe=Se?k.constrain(fe,0,j.width-U._width):Ie,ae=he?k.constrain(ae,0,j.height-U._effHeight):Te,fe!==Ie&&k.log("Constrain "+W+".x to make legend fit inside graph"),ae!==Te&&k.log("Constrain "+W+".y to make legend fit inside graph")}s.setTranslate(J,fe,ae)}if(ce.on(".drag",null),J.on("wheel",null),Z||U._height<=U._maxHeight||B._context.staticPlot){var Ne=U._effHeight;Z&&(Ne=U._height),ee.attr({width:U._width-Ee,height:Ne-Ee,x:Ee/2,y:Ee/2}),s.setTranslate(re,0,0),X.select("rect").attr({width:U._width-2*Ee,height:Ne-2*Ee,x:Ee,y:Ee}),s.setClipUrl(re,D,B),s.setRect(ce,0,0,0,0),delete U._scrollY}else{var qe,ve,Ce,Ae=Math.max(n.scrollBarMinHeight,U._effHeight*U._effHeight/U._height),ze=U._effHeight-Ae-2*n.scrollBarMargin,Ue=U._height-U._effHeight,Ve=ze/Ue,Ye=Math.min(U._scrollY||0,Ue);ee.attr({width:U._width-2*Ee+n.scrollBarWidth+n.scrollBarMargin,height:U._effHeight-Ee,x:Ee/2,y:Ee/2}),X.select("rect").attr({width:U._width-2*Ee+n.scrollBarWidth+n.scrollBarMargin,height:U._effHeight-2*Ee,x:Ee,y:Ee+Ye}),s.setClipUrl(re,D,B),ht(Ye,Ae,Ve),J.on("wheel",function(){ht(Ye=k.constrain(U._scrollY+_.event.deltaY/ze*Ue,0,Ue),Ae,Ve),Ye!==0&&Ye!==Ue&&_.event.preventDefault()});var $e=_.behavior.drag().on("dragstart",function(){var nt=_.event.sourceEvent;qe=nt.type==="touchstart"?nt.changedTouches[0].clientY:nt.clientY,Ce=Ye}).on("drag",function(){var nt=_.event.sourceEvent;nt.buttons===2||nt.ctrlKey||(ve=nt.type==="touchmove"?nt.changedTouches[0].clientY:nt.clientY,Ye=function(bt,wt,ct){var lt=(ct-wt)/Ve+bt;return k.constrain(lt,0,Ue)}(Ce,qe,ve),ht(Ye,Ae,Ve))});ce.call($e);var rt=_.behavior.drag().on("dragstart",function(){var nt=_.event.sourceEvent;nt.type==="touchstart"&&(qe=nt.changedTouches[0].clientY,Ce=Ye)}).on("drag",function(){var nt=_.event.sourceEvent;nt.type==="touchmove"&&(ve=nt.changedTouches[0].clientY,Ye=function(bt,wt,ct){var lt=(wt-ct)/Ve+bt;return k.constrain(lt,0,Ue)}(Ce,qe,ve),ht(Ye,Ae,Ve))});re.call(rt)}function ht(nt,bt,wt){U._scrollY=B._fullLayout[W]._scrollY=nt,s.setTranslate(re,0,-nt),s.setRect(ce,U._width,n.scrollBarMargin+nt*wt,n.scrollBarWidth,bt),X.select("rect").attr("y",Ee+nt)}B._context.edits.legendPosition&&(J.classed("cursor-move",!0),h.init({element:J.node(),gd:B,prepFn:function(){var nt=s.getTranslate(J);we=nt.x,xe=nt.y},moveFn:function(nt,bt){var wt=we+nt,ct=xe+bt;s.setTranslate(J,wt,ct),_e=h.align(wt,U._width,De.l,De.l+De.w,U.xanchor),Me=h.align(ct+U._height,-U._height,De.t+De.h,De.t,U.yanchor)},doneFn:function(){if(_e!==void 0&&Me!==void 0){var nt={};nt[W+".x"]=_e,nt[W+".y"]=Me,w.call("_guiRelayout",B,nt)}},clickFn:function(nt,bt){var wt=de.selectAll("g.traces").filter(function(){var ct=this.getBoundingClientRect();return bt.clientX>=ct.left&&bt.clientX<=ct.right&&bt.clientY>=ct.top&&bt.clientY<=ct.bottom});wt.size()>0&&T(B,J,wt,nt,bt)}}))}],B)}}function m(B,Y,D){var G=B[0],U=G.width,j=Y.entrywidthmode,W=G.trace.legendwidth||Y.entrywidth;return j==="fraction"?Y._maxWidth*W:D+(W||U)}function T(B,Y,D,G,U){var j=D.data()[0][0].trace,W={event:U,node:D.node(),curveNumber:j.index,expandedIndex:j._expandedIndex,data:B.data,layout:B.layout,frames:B._transitionData._frames,config:B._context,fullData:B._fullData,fullLayout:B._fullLayout};j._group&&(W.group=j._group),w.traceIs(j,"pie-like")&&(W.label=D.datum()[0].label),v.triggerHandler(B,"plotly_legendclick",W)!==!1&&(G===1?Y._clickTimeout=setTimeout(function(){B._fullLayout&&r(D,B,G)},B._context.doubleClickDelay):G===2&&(Y._clickTimeout&&clearTimeout(Y._clickTimeout),B._legendMouseDownTime=0,v.triggerHandler(B,"plotly_legenddoubleclick",W)!==!1&&r(D,B,G)))}function p(B,Y,D){var G,U,j=z(D),W=B.data()[0][0],Z=W.trace,ie=w.traceIs(Z,"pie-like"),te=!D._inHover&&Y._context.edits.legendText&&!ie,J=D._maxNameLength;W.groupTitle?(G=W.groupTitle.text,U=W.groupTitle.font):(U=D.font,D.entries?G=W.text:(G=ie?W.label:Z.name,Z._meta&&(G=k.templateString(G,Z._meta))));var X=k.ensureSingle(B,"text",j+"text");X.attr("text-anchor","start").call(s.font,U).text(te?M(G,J):G);var ee=D.itemwidth+2*n.itemGap;a.positionText(X,ee,0),te?X.call(a.makeEditable,{gd:Y,text:G}).call(C,B,Y,D).on("edit",function(re){this.text(M(re,J)).call(C,B,Y,D);var oe=W.trace._fullInput||{},ue={};if(w.hasTransform(oe,"groupby")){var ce=w.getTransformIndices(oe,"groupby"),de=ce[ce.length-1],me=k.keyedContainer(oe,"transforms["+de+"].styles","target","value.name");me.set(W.trace._group,re),ue=me.constructUpdate()}else ue.name=re;return w.call("_guiRestyle",Y,ue,Z.index)}):C(X,B,Y,D)}function M(B,Y){var D=Math.max(4,Y);if(B&&B.trim().length>=D/2)return B;for(var G=D-(B=B||"").length;G>0;G--)B+=" ";return B}function A(B,Y,D){var G,U=Y._context.doubleClickDelay,j=1,W=k.ensureSingle(B,"rect",D+"toggle",function(Z){Y._context.staticPlot||Z.style("cursor","pointer").attr("pointer-events","all"),Z.call(t.fill,"rgba(0,0,0,0)")});Y._context.staticPlot||(W.on("mousedown",function(){(G=new Date().getTime())-Y._legendMouseDownTimeU&&(j=Math.max(j-1,1)),T(Y,Z,B,j,_.event)}}))}function C(B,Y,D,G,U){G._inHover&&B.attr("data-notex",!0),a.convertToTspans(B,D,function(){(function(j,W,Z,ie){var te=j.data()[0][0];if(Z._inHover||!te||te.trace.showlegend){var J=j.select("g[class*=math-group]"),X=J.node(),ee=z(Z);Z||(Z=W._fullLayout[ee]);var re,oe,ue=Z.borderwidth,ce=(ie===f?Z.title.font:te.groupTitle?te.groupTitle.font:Z.font).size*l;if(X){var de=s.bBox(X);re=de.height,oe=de.width,ie===f?s.setTranslate(J,ue,ue+.75*re):s.setTranslate(J,0,.25*re)}else{var me="."+ee+(ie===f?"title":"")+"text",_e=j.select(me),Me=a.lineCount(_e),we=_e.node();if(re=ce*Me,oe=we?s.bBox(we).width:0,ie===f)Z.title.side==="left"&&(oe+=2*n.itemGap),a.positionText(_e,ue+n.titlePad,ue+ce);else{var xe=2*n.itemGap+Z.itemwidth;te.groupTitle&&(xe=n.itemGap,oe-=Z.itemwidth),a.positionText(_e,xe,-ce*((Me-1)/2-.3))}}ie===f?(Z._titleWidth=oe,Z._titleHeight=re):(te.lineHeight=ce,te.height=Math.max(re,16)+3,te.width=oe)}else j.remove()})(Y,D,G,U)})}function P(B){return k.isRightAnchor(B)?"right":k.isCenterAnchor(B)?"center":"left"}function O(B){return k.isBottomAnchor(B)?"bottom":k.isMiddleAnchor(B)?"middle":"top"}function z(B){return B._id||"legend"}R.exports=function(B,Y){if(Y)y(B,Y);else{var D=B._fullLayout,G=D._legends;D._infolayer.selectAll('[class^="legend"]').each(function(){var W=_.select(this),Z=W.attr("class").split(" ")[0];Z.match(x)&&G.indexOf(Z)===-1&&W.remove()});for(var U=0;UP&&(C=P)}M[h][0]._groupMinRank=C,M[h][0]._preGroupSort=h}var O=function(G,U){return G.trace.legendrank-U.trace.legendrank||G._preSort-U._preSort};for(M.forEach(function(G,U){G[0]._preGroupSort=U}),M.sort(function(G,U){return G[0]._groupMinRank-U[0]._groupMinRank||G[0]._preGroupSort-U[0]._preGroupSort}),h=0;hb?b:d}R.exports=function(d,c,b){var g=c._fullLayout;b||(b=g.legend);var f=b.itemsizing==="constant",x=b.itemwidth,y=(x+2*n.itemGap)/2,m=w(y,0),T=function(A,C,P,O){var z;if(A+1)z=A;else{if(!(C&&C.width>0))return 0;z=C.width}return f?O:Math.min(z,P)};function p(A,C,P){var O=A[0].trace,z=O.marker||{},B=z.line||{},Y=P?O.visible&&O.type===P:k.traceIs(O,"bar"),D=_.select(C).select("g.legendpoints").selectAll("path.legend"+P).data(Y?[A]:[]);D.enter().append("path").classed("legend"+P,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",m),D.exit().remove(),D.each(function(G){var U=_.select(this),j=G[0],W=T(j.mlw,z.line,5,2);U.style("stroke-width",W+"px");var Z=j.mcc;if(!b._inHover&&"mc"in j){var ie=s(z),te=ie.mid;te===void 0&&(te=(ie.max+ie.min)/2),Z=v.tryColorscale(z,"")(te)}var J=Z||j.mc||z.color,X=z.pattern,ee=X&&v.getPatternAttr(X.shape,0,"");if(ee){var re=v.getPatternAttr(X.bgcolor,0,null),oe=v.getPatternAttr(X.fgcolor,0,null),ue=X.fgopacity,ce=u(X.size,8,10),de=u(X.solidity,.5,1),me="legend-"+O.uid;U.call(v.pattern,"legend",c,me,ee,ce,de,Z,X.fillmode,re,oe,ue)}else U.call(h.fill,J);W&&h.stroke(U,j.mlc||B.color)})}function M(A,C,P){var O=A[0],z=O.trace,B=P?z.visible&&z.type===P:k.traceIs(z,P),Y=_.select(C).select("g.legendpoints").selectAll("path.legend"+P).data(B?[A]:[]);if(Y.enter().append("path").classed("legend"+P,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",m),Y.exit().remove(),Y.size()){var D=(z.marker||{}).line,G=T(r(D.width,O.pts),D,5,2),U=i.minExtend(z,{marker:{line:{width:G}}});U.marker.line.color=D.color;var j=i.minExtend(O,{trace:U});a(Y,j,U)}}d.each(function(A){var C=_.select(this),P=i.ensureSingle(C,"g","layers");P.style("opacity",A[0].trace.opacity);var O=b.valign,z=A[0].lineHeight,B=A[0].height;if(O!=="middle"&&z&&B){var Y={top:1,bottom:-1}[O]*(.5*(z-B+3));P.attr("transform",w(0,Y))}else P.attr("transform",null);P.selectAll("g.legendfill").data([A]).enter().append("g").classed("legendfill",!0),P.selectAll("g.legendlines").data([A]).enter().append("g").classed("legendlines",!0);var D=P.selectAll("g.legendsymbols").data([A]);D.enter().append("g").classed("legendsymbols",!0),D.selectAll("g.legendpoints").data([A]).enter().append("g").classed("legendpoints",!0)}).each(function(A){var C,P=A[0].trace,O=[];if(P.visible)switch(P.type){case"histogram2d":case"heatmap":O=[["M-15,-2V4H15V-2Z"]],C=!0;break;case"choropleth":case"choroplethmapbox":O=[["M-6,-6V6H6V-6Z"]],C=!0;break;case"densitymapbox":O=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],C="radial";break;case"cone":O=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],C=!1;break;case"streamtube":O=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],C=!1;break;case"surface":O=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],C=!0;break;case"mesh3d":O=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],C=!1;break;case"volume":O=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],C=!0;break;case"isosurface":O=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],C=!1}var z=_.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(O);z.enter().append("path").classed("legend3dandfriends",!0).attr("transform",m).style("stroke-miterlimit",1),z.exit().remove(),z.each(function(B,Y){var D,G=_.select(this),U=s(P),j=U.colorscale,W=U.reversescale;if(j){if(!C){var Z=j.length;D=Y===0?j[W?Z-1:0][1]:Y===1?j[W?0:Z-1][1]:j[Math.floor((Z-1)/2)][1]}}else{var ie=P.vertexcolor||P.facecolor||P.color;D=i.isArrayOrTypedArray(ie)?ie[Y]||ie[0]:ie}G.attr("d",B[0]),D?G.call(h.fill,D):G.call(function(te){if(te.size()){var J="legendfill-"+P.uid;v.gradient(te,c,J,o(W,C==="radial"),j,"fill")}})})}).each(function(A){var C=A[0].trace,P=C.type==="waterfall";if(A[0]._distinct&&P){var O=A[0].trace[A[0].dir].marker;return A[0].mc=O.color,A[0].mlw=O.line.width,A[0].mlc=O.line.color,p(A,this,"waterfall")}var z=[];C.visible&&P&&(z=A[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var B=_.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(z);B.enter().append("path").classed("legendwaterfall",!0).attr("transform",m).style("stroke-miterlimit",1),B.exit().remove(),B.each(function(Y){var D=_.select(this),G=C[Y[0]].marker,U=T(void 0,G.line,5,2);D.attr("d",Y[1]).style("stroke-width",U+"px").call(h.fill,G.color),U&&D.call(h.stroke,G.line.color)})}).each(function(A){p(A,this,"funnel")}).each(function(A){p(A,this)}).each(function(A){var C=A[0].trace,P=_.select(this).select("g.legendpoints").selectAll("path.legendbox").data(C.visible&&k.traceIs(C,"box-violin")?[A]:[]);P.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",m),P.exit().remove(),P.each(function(){var O=_.select(this);if(C.boxpoints!=="all"&&C.points!=="all"||h.opacity(C.fillcolor)!==0||h.opacity((C.line||{}).color)!==0){var z=T(void 0,C.line,5,2);O.style("stroke-width",z+"px").call(h.fill,C.fillcolor),z&&h.stroke(O,C.line.color)}else{var B=i.minExtend(C,{marker:{size:f?12:i.constrain(C.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});P.call(v.pointStyle,B,c)}})}).each(function(A){M(A,this,"funnelarea")}).each(function(A){M(A,this,"pie")}).each(function(A){var C,P,O=l(A),z=O.showFill,B=O.showLine,Y=O.showGradientLine,D=O.showGradientFill,G=O.anyFill,U=O.anyLine,j=A[0],W=j.trace,Z=s(W),ie=Z.colorscale,te=Z.reversescale,J=t.hasMarkers(W)||!G?"M5,0":U?"M5,-2":"M5,-3",X=_.select(this),ee=X.select(".legendfill").selectAll("path").data(z||D?[A]:[]);if(ee.enter().append("path").classed("js-fill",!0),ee.exit().remove(),ee.attr("d",J+"h"+x+"v6h-"+x+"z").call(function(ue){if(ue.size())if(z)v.fillGroupStyle(ue,c);else{var ce="legendfill-"+W.uid;v.gradient(ue,c,ce,o(te),ie,"fill")}}),B||Y){var re=T(void 0,W.line,10,5);P=i.minExtend(W,{line:{width:re}}),C=[i.minExtend(j,{trace:P})]}var oe=X.select(".legendlines").selectAll("path").data(B||Y?[C]:[]);oe.enter().append("path").classed("js-line",!0),oe.exit().remove(),oe.attr("d",J+(Y?"l"+x+",0.0001":"h"+x)).call(B?v.lineGroupStyle:function(ue){if(ue.size()){var ce="legendline-"+W.uid;v.lineGroupStyle(ue),v.gradient(ue,c,ce,o(te),ie,"stroke")}})}).each(function(A){var C,P,O=l(A),z=O.anyFill,B=O.anyLine,Y=O.showLine,D=O.showMarker,G=A[0],U=G.trace,j=!D&&!B&&!z&&t.hasText(U);function W(oe,ue,ce,de){var me=i.nestedProperty(U,oe).get(),_e=i.isArrayOrTypedArray(me)&&ue?ue(me):me;if(f&&_e&&de!==void 0&&(_e=de),ce){if(_ece[1])return ce[1]}return _e}function Z(oe){return G._distinct&&G.index&&oe[G.index]?oe[G.index]:oe[0]}if(D||j||Y){var ie={},te={};if(D){ie.mc=W("marker.color",Z),ie.mx=W("marker.symbol",Z),ie.mo=W("marker.opacity",i.mean,[.2,1]),ie.mlc=W("marker.line.color",Z),ie.mlw=W("marker.line.width",i.mean,[0,5],2),te.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var J=W("marker.size",i.mean,[2,16],12);ie.ms=J,te.marker.size=J}Y&&(te.line={width:W("line.width",Z,[0,10],5)}),j&&(ie.tx="Aa",ie.tp=W("textposition",Z),ie.ts=10,ie.tc=W("textfont.color",Z),ie.tf=W("textfont.family",Z)),C=[i.minExtend(G,ie)],(P=i.minExtend(U,te)).selectedpoints=null,P.texttemplate=null}var X=_.select(this).select("g.legendpoints"),ee=X.selectAll("path.scatterpts").data(D?C:[]);ee.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",m),ee.exit().remove(),ee.call(v.pointStyle,P,c),D&&(C[0].mrc=3);var re=X.selectAll("g.pointtext").data(j?C:[]);re.enter().append("g").classed("pointtext",!0).append("text").attr("transform",m),re.exit().remove(),re.selectAll("text").call(v.textPointStyle,P,c)}).each(function(A){var C=A[0].trace,P=_.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(C.visible&&C.type==="candlestick"?[A,A]:[]);P.enter().append("path").classed("legendcandle",!0).attr("d",function(O,z){return z?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",m).style("stroke-miterlimit",1),P.exit().remove(),P.each(function(O,z){var B=_.select(this),Y=C[z?"increasing":"decreasing"],D=T(void 0,Y.line,5,2);B.style("stroke-width",D+"px").call(h.fill,Y.fillcolor),D&&h.stroke(B,Y.line.color)})}).each(function(A){var C=A[0].trace,P=_.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(C.visible&&C.type==="ohlc"?[A,A]:[]);P.enter().append("path").classed("legendohlc",!0).attr("d",function(O,z){return z?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",m).style("stroke-miterlimit",1),P.exit().remove(),P.each(function(O,z){var B=_.select(this),Y=C[z?"increasing":"decreasing"],D=T(void 0,Y.line,5,2);B.style("fill","none").call(v.dashLine,Y.line.dash,D),D&&h.stroke(B,Y.line.color)})})}},42068:function(R,E,e){e(93348),R.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}},26023:function(R,E,e){var _=e(73972),k=e(74875),i=e(41675),w=e(24255),v=e(34031).eraseActiveShape,h=e(71828),s=h._,t=R.exports={};function a(g,f){var x,y,m=f.currentTarget,T=m.getAttribute("data-attr"),p=m.getAttribute("data-val")||!0,M=g._fullLayout,A={},C=i.list(g,null,!0),P=M._cartesianSpikesEnabled;if(T==="zoom"){var O,z=p==="in"?.5:2,B=(1+z)/2,Y=(1-z)/2;for(y=0;y1?(J=["toggleHover"],X=["resetViews"]):A?(te=["zoomInGeo","zoomOutGeo"],J=["hoverClosestGeo"],X=["resetGeo"]):M?(J=["hoverClosest3d"],X=["resetCameraDefault3d","resetCameraLastSave3d"]):B?(te=["zoomInMapbox","zoomOutMapbox"],J=["toggleHover"],X=["resetViewMapbox"]):O?J=["hoverClosestGl2d"]:C?J=["hoverClosestPie"]:G?(J=["hoverClosestCartesian","hoverCompareCartesian"],X=["resetViewSankey"]):J=["toggleHover"],p&&(J=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(function(me){for(var _e=0;_e0)){var c=function(g,f,x){for(var y=x.filter(function(M){return f[M].anchor===g._id}),m=0,T=0;T=we.max)_e=ue[Me+1];else if(me=we.pmax)_e=ue[Me+1];else if(meMe._length||Te+Ve<0)return;Ae=Ie+Ve,ze=Te+Ve;break;case De:if(Ue="col-resize",Ie+Ve>Me._length)return;Ae=Ie+Ve,ze=Te;break;case Ee:if(Ue="col-resize",Te+Ve<0)return;Ae=Ie,ze=Te+Ve;break;default:Ue="ew-resize",Ae=be,ze=be+Ve}if(ze=0;O--){var z=f.append("path").attr(y).style("opacity",O?.1:m).call(w.stroke,p).call(w.fill,T).call(v.dashLine,O?"solid":A,O?4+M:M);if(o(z,u,b),C){var B=h(u.layout,"selections",b);z.style({cursor:"move"});var Y={element:z.node(),plotinfo:g,gd:u,editHelpers:B,isActiveSelection:!0},D=_(x,u);k(D,z,Y)}else z.style("pointer-events",O?"all":"none");P[O]=z}var G=P[0];P[1].node().addEventListener("click",function(){return function(U,j){if(r(U)){var W=+j.node().getAttribute("data-index");if(W>=0){if(W===U._fullLayout._activeSelectionIndex)return void l(U);U._fullLayout._activeSelectionIndex=W,U._fullLayout._deactivateSelection=l,a(U)}}}(u,G)})}(u._fullLayout._selectionLayer)}function o(u,d,c){var b=c.xref+c.yref;v.setClipUrl(u,"clip"+d._fullLayout._uid+b,d)}function l(u){r(u)&&u._fullLayout._activeSelectionIndex>=0&&(i(u),delete u._fullLayout._activeSelectionIndex,a(u))}R.exports={draw:a,drawOne:n,activateLastSelection:function(u){if(r(u)){var d=u._fullLayout.selections.length-1;u._fullLayout._activeSelectionIndex=d,u._fullLayout._deactivateSelection=l,a(u)}}}},53777:function(R,E,e){var _=e(79952).P,k=e(1426).extendFlat;R.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:k({},_,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}},90849:function(R){R.exports=function(E,e,_){_("newselection.mode"),_("newselection.line.width")&&(_("newselection.line.color"),_("newselection.line.dash")),_("activeselection.fillcolor"),_("activeselection.opacity")}},35855:function(R,E,e){var _=e(64505).selectMode,k=e(51873).clearOutline,i=e(60165),w=i.readPaths,v=i.writePaths,h=i.fixDatesForPaths;R.exports=function(s,t){if(s.length){var a=s[0][0];if(a){var r=a.getAttribute("d"),n=t.gd,o=n._fullLayout.newselection,l=t.plotinfo,u=l.xaxis,d=l.yaxis,c=t.isActiveSelection,b=t.dragmode,g=(n.layout||{}).selections||[];if(!_(b)&&c!==void 0){var f=n._fullLayout._activeSelectionIndex;if(f-1,Ft=[];if(function(Qe){return Qe&&Array.isArray(Qe)&&Qe[0].hoverOnBox!==!0}(Et)){re(ve,Ce,Ve);var zt=function(Qe,st){var ft,Be,je=Qe[0],at=-1,ot=[];for(Be=0;Be0?function(Qe,st){var ft,Be,je,at=[];for(je=0;je0&&at.push(ft);if(at.length===1&&at[0]===st.searchInfo&&(Be=st.searchInfo.cd[0].trace).selectedpoints.length===st.pointNumbers.length){for(je=0;je1||(Be+=st.selectedpoints.length)>1))return!1;return Be===1}($e)&&(wt=me(zt))){for(Ye&&Ye.remove(),Tt=0;Tt<$e.length;Tt++)(rt=$e[Tt])._module.selectPoints(rt,!1);_e(Ce,$e),oe(Ve),St&&qe(Ce)}else{for(ct=ve.shiftKey&&(wt!==void 0?wt:me(zt)),ht=function(Qe,st,ft){return{pointNumber:Qe,searchInfo:st,subtract:!!ft}}(zt.pointNumber,zt.searchInfo,ct),nt=ee(Ve.selectionDefs.concat([ht])),Tt=0;Tt<$e.length;Tt++)if(bt=we($e[Tt]._module.selectPoints($e[Tt],nt),$e[Tt]),Ft.length)for(var Je=0;Je=0})(Ue)&&Ue._fullLayout._deactivateShape(Ue),function(bt){return bt._fullLayout._activeSelectionIndex>=0}(Ue)&&Ue._fullLayout._deactivateSelection(Ue);var Ve=Ue._fullLayout._zoomlayer,Ye=n(Ae),$e=l(Ae);if(Ye||$e){var rt,ht,nt=Ve.selectAll(".select-outline-"+ze.id);nt&&Ue._fullLayout._outlining&&(Ye&&(rt=y(nt,ve)),rt&&i.call("_guiRelayout",Ue,{shapes:rt}),$e&&!ie(ve)&&(ht=m(nt,ve)),ht&&(Ue._fullLayout._noEmitSelectedAtStart=!0,i.call("_guiRelayout",Ue,{selections:ht}).then(function(){Ce&&T(Ue)})),Ue._fullLayout._outlining=!1)}ze.selection={},ze.selection.selectionDefs=ve.selectionDefs=[],ze.selection.mergedPolygons=ve.mergedPolygons=[]}function ue(ve){return ve._id}function ce(ve,Ce,Ae,ze){if(!ve.calcdata)return[];var Ue,Ve,Ye,$e=[],rt=Ce.map(ue),ht=Ae.map(ue);for(Ye=0;Ye0?ze[0]:Ae;return!!Ce.selectedpoints&&Ce.selectedpoints.indexOf(Ue)>-1}function _e(ve,Ce,Ae){var ze,Ue;for(ze=0;ze-1&&Ce;if(!Ve&&Ce){var ln=fe(ve,!0);if(ln.length){var nn=ln[0].xref,fn=ln[0].yref;if(nn&&fn){var mn=Ie(ln);Te([P(ve,nn,"x"),P(ve,fn,"y")])(dn,mn)}}ve._fullLayout._noEmitSelectedAtStart?ve._fullLayout._noEmitSelectedAtStart=!1:Yt&&Ne(ve,dn),wt._reselect=!1}if(!Ve&&wt._deselect){var xn=wt._deselect;(function(Pn,Dn,En){for(var Fn=0;Fn=0)ct._fullLayout._deactivateShape(ct);else if(!ht){var mn=lt.clickmode;C.done(Tn).then(function(){if(C.clear(Tn),nn===2){for(Ut.remove(),je=0;je-1&&te(fn,ct,ze.xaxes,ze.yaxes,ze.subplot,ze,Ut),mn==="event"&&Ne(ct,void 0);h.click(ct,fn)}).catch(p.error)}},ze.doneFn=function(){Gt.remove(),C.done(Tn).then(function(){C.clear(Tn),!Tt&&Be&&ze.selectionDefs&&(Be.subtract=jt,ze.selectionDefs.push(Be),ze.mergedPolygons.length=0,[].push.apply(ze.mergedPolygons,ft)),(Tt||ht)&&oe(ze,Tt),ze.doneFnCompleted&&ze.doneFnCompleted(dn),nt&&Ne(ct,ot)}).catch(p.error)}},clearOutline:b,clearSelectionsCache:oe,selectOnClick:te}},89827:function(R,E,e){var _=e(50215),k=e(41940),i=e(82196).line,w=e(79952).P,v=e(1426).extendFlat,h=e(44467).templatedArray,s=(e(24695),e(5386).R),t=e(37281);R.exports=h("shape",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},xref:v({},_.xref,{}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},yref:v({},_.yref,{}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},yanchor:{valType:"any",editType:"calc+arraydraw"},y0:{valType:"any",editType:"calc+arraydraw"},y1:{valType:"any",editType:"calc+arraydraw"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:v({},i.color,{editType:"arraydraw"}),width:v({},i.width,{editType:"calc+arraydraw"}),dash:v({},w,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw"},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},label:{text:{valType:"string",dflt:"",editType:"arraydraw"},texttemplate:s({},{keys:Object.keys(t)}),font:k({editType:"calc+arraydraw",colorEditType:"arraydraw"}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],editType:"arraydraw"},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw"},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw"},editType:"arraydraw"},editType:"arraydraw"})},5627:function(R,E,e){var _=e(71828),k=e(89298),i=e(21459),w=e(30477);function v(a){return s(a.line.width,a.xsizemode,a.x0,a.x1,a.path,!1)}function h(a){return s(a.line.width,a.ysizemode,a.y0,a.y1,a.path,!0)}function s(a,r,n,o,l,u){var d=a/2,c=u;if(r==="pixel"){var b=l?w.extractPathCoords(l,u?i.paramIsY:i.paramIsX):[n,o],g=_.aggNums(Math.max,null,b),f=_.aggNums(Math.min,null,b),x=f<0?Math.abs(f)+d:d,y=g>0?g+d:d;return{ppad:d,ppadplus:c?x:y,ppadminus:c?y:x}}return{ppad:d}}function t(a,r,n,o,l){var u=a.type==="category"||a.type==="multicategory"?a.r2c:a.d2c;if(r!==void 0)return[u(r),u(n)];if(o){var d,c,b,g,f=1/0,x=-1/0,y=o.match(i.segmentRE);for(a.type==="date"&&(u=w.decodeDate(u)),d=0;dx&&(x=g)));return x>=f?[f,x]:void 0}}R.exports=function(a){var r=a._fullLayout,n=_.filterVisible(r.shapes);if(n.length&&a._fullData.length)for(var o=0;o=ue?ce-me:me-ce,-180/Math.PI*Math.atan2(_e,Me)}(x,m,y,T):0),A.call(function(ue){return ue.call(w.font,M).attr({}),i.convertToTspans(ue,r),ue});var X=function(ue,ce,de,me,_e,Me,we){var xe,De,Ee,Se,he=_e.label.textposition,fe=_e.label.textangle,ae=_e.label.padding,be=_e.type,Ie=Math.PI/180*Me,Te=Math.sin(Ie),Ne=Math.cos(Ie),qe=_e.label.xanchor,ve=_e.label.yanchor;if(be==="line"){he==="start"?(xe=ue,De=ce):he==="end"?(xe=de,De=me):(xe=(ue+de)/2,De=(ce+me)/2),qe==="auto"&&(qe=he==="start"?fe==="auto"?de>ue?"left":deue?"right":deue?"right":deue?"left":de1&&(xe.length!==2||xe[1][0]!=="Z")&&(G===0&&(xe[0][0]="M"),p[D]=xe,O(),z())}}()}}function ue(_e,Me){(function(we,xe){if(p.length)for(var De=0;DeDe?(he=we,Ie="y0",fe=De,Te="y1"):(he=De,Ie="y1",fe=we,Te="y0"),Je(ft),Qe(me,ce),function(Be,je,at){var ot=je.xref,xt=je.yref,yt=w.getFromId(at,ot),_t=w.getFromId(at,xt),gt="";ot==="paper"||yt.autorange||(gt+=ot),xt==="paper"||_t.autorange||(gt+=xt),r.setClipUrl(Be,gt?"clip"+at._fullLayout._uid+gt:null,at)}(ue,ce,oe),zt.moveFn=Ce==="move"?et:Ze,zt.altKey=ft.altKey)},doneFn:function(){g(oe)||(l(ue),st(me),y(ue,oe,ce),k.call("_guiRelayout",oe,_e.getUpdateObj()))},clickFn:function(){g(oe)||st(me)}};function Je(ft){if(g(oe))Ce=null;else if(Ye)Ce=ft.target.tagName==="path"?"move":ft.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var Be=zt.element.getBoundingClientRect(),je=Be.right-Be.left,at=Be.bottom-Be.top,ot=ft.clientX-Be.left,xt=ft.clientY-Be.top,yt=!$e&&je>Ae&&at>ze&&!ft.shiftKey?o.getCursor(ot/je,1-xt/at):"move";l(ue,yt),Ce=yt.split("-")[0]}}function et(ft,Be){if(ce.type==="path"){var je=function(xt){return xt},at=je,ot=je;Ue?rt("xanchor",ce.xanchor=Et(Ee+ft)):(at=function(xt){return Et(lt(xt)+ft)},nt&&nt.type==="date"&&(at=d.encodeDate(at))),Ve?rt("yanchor",ce.yanchor=St(Se+Be)):(ot=function(xt){return St(Tt(xt)+Be)},wt&&wt.type==="date"&&(ot=d.encodeDate(ot))),rt("path",ce.path=m(ve,at,ot))}else Ue?rt("xanchor",ce.xanchor=Et(Ee+ft)):(rt("x0",ce.x0=Et(Me+ft)),rt("x1",ce.x1=Et(xe+ft))),Ve?rt("yanchor",ce.yanchor=St(Se+Be)):(rt("y0",ce.y0=St(we+Be)),rt("y1",ce.y1=St(De+Be)));ue.attr("d",c(oe,ce)),Qe(me,ce),s(oe,de,ce,ht)}function Ze(ft,Be){if($e){var je=function(Qt){return Qt},at=je,ot=je;Ue?rt("xanchor",ce.xanchor=Et(Ee+ft)):(at=function(Qt){return Et(lt(Qt)+ft)},nt&&nt.type==="date"&&(at=d.encodeDate(at))),Ve?rt("yanchor",ce.yanchor=St(Se+Be)):(ot=function(Qt){return St(Tt(Qt)+Be)},wt&&wt.type==="date"&&(ot=d.encodeDate(ot))),rt("path",ce.path=m(ve,at,ot))}else if(Ye){if(Ce==="resize-over-start-point"){var xt=Me+ft,yt=Ve?we-Be:we+Be;rt("x0",ce.x0=Ue?xt:Et(xt)),rt("y0",ce.y0=Ve?yt:St(yt))}else if(Ce==="resize-over-end-point"){var _t=xe+ft,gt=Ve?De-Be:De+Be;rt("x1",ce.x1=Ue?_t:Et(_t)),rt("y1",ce.y1=Ve?gt:St(gt))}}else{var Ct=function(Qt){return Ce.indexOf(Qt)!==-1},dt=Ct("n"),vt=Ct("s"),At=Ct("w"),Bt=Ct("e"),jt=dt?he+Be:he,Ut=vt?fe+Be:fe,tn=At?ae+ft:ae,Xt=Bt?be+ft:be;Ve&&(dt&&(jt=he-Be),vt&&(Ut=fe-Be)),(!Ve&&Ut-jt>ze||Ve&&jt-Ut>ze)&&(rt(Ie,ce[Ie]=Ve?jt:St(jt)),rt(Te,ce[Te]=Ve?Ut:St(Ut))),Xt-tn>Ae&&(rt(Ne,ce[Ne]=Ue?tn:Et(tn)),rt(qe,ce[qe]=Ue?Xt:Et(Xt)))}ue.attr("d",c(oe,ce)),Qe(me,ce),s(oe,de,ce,ht)}function Qe(ft,Be){(Ue||Ve)&&function(){var je=Be.type!=="path",at=ft.selectAll(".visual-cue").data([0]);at.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var ot=lt(Ue?Be.xanchor:i.midRange(je?[Be.x0,Be.x1]:d.extractPathCoords(Be.path,u.paramIsX))),xt=Tt(Ve?Be.yanchor:i.midRange(je?[Be.y0,Be.y1]:d.extractPathCoords(Be.path,u.paramIsY)));if(ot=d.roundPositionForSharpStrokeRendering(ot,1),xt=d.roundPositionForSharpStrokeRendering(xt,1),Ue&&Ve){var yt="M"+(ot-1-1)+","+(xt-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";at.attr("d",yt)}else if(Ue){var _t="M"+(ot-1-1)+","+(xt-9-1)+"v18 h2 v-18 Z";at.attr("d",_t)}else{var gt="M"+(ot-9-1)+","+(xt-1-1)+"h18 v2 h-18 Z";at.attr("d",gt)}}()}function st(ft){ft.selectAll(".visual-cue").remove()}o.init(zt),Ft.node().onmousemove=Je}(p,X,C,M,z,te):C.editable===!0&&X.style("pointer-events",Z||a.opacity(G)*D<=.5?"stroke":"all");X.node().addEventListener("click",function(){return function(oe,ue){if(f(oe)){var ce=+ue.node().getAttribute("data-index");if(ce>=0){if(ce===oe._fullLayout._activeShapeIndex)return void T(oe);oe._fullLayout._activeShapeIndex=ce,oe._fullLayout._deactivateShape=T,b(oe)}}}(p,X)})}C._input&&C.visible!==!1&&(C.layer!=="below"?O(p._fullLayout._shapeUpperLayer):C.xref==="paper"||C.yref==="paper"?O(p._fullLayout._shapeLowerLayer):P._hadPlotinfo?O((P.mainplotinfo||P).shapelayer):O(p._fullLayout._shapeLowerLayer))}function y(p,M,A){var C=(A.xref+A.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");r.setClipUrl(p,C?"clip"+M._fullLayout._uid+C:null,M)}function m(p,M,A){return p.replace(u.segmentRE,function(C){var P=0,O=C.charAt(0),z=u.paramIsX[O],B=u.paramIsY[O],Y=u.numParams[O];return O+C.substr(1).replace(u.paramRE,function(D){return P>=Y||(z[P]?D=M(D):B[P]&&(D=A(D)),P++),D})})}function T(p){f(p)&&p._fullLayout._activeShapeIndex>=0&&(t(p),delete p._fullLayout._activeShapeIndex,b(p))}R.exports={draw:b,drawOne:x,eraseActiveShape:function(p){if(f(p)){t(p);var M=p._fullLayout._activeShapeIndex,A=(p.layout||{}).shapes||[];if(M0&&xJ&&(ee="X"),ee});return W>J&&(X=X.replace(/[\s,]*X.*/,""),k.log("Ignoring extra params in segment "+j)),Z+X})}(v,s,a);if(v.xsizemode==="pixel"){var x=s(v.xanchor);r=x+v.x0,n=x+v.x1}else r=s(v.x0),n=s(v.x1);if(v.ysizemode==="pixel"){var y=a(v.yanchor);o=y-v.y0,l=y-v.y1}else o=a(v.y0),l=a(v.y1);if(u==="line")return"M"+r+","+o+"L"+n+","+l;if(u==="rect")return"M"+r+","+o+"H"+n+"V"+l+"H"+r+"Z";var m=(r+n)/2,T=(o+l)/2,p=Math.abs(m-r),M=Math.abs(T-o),A="A"+p+","+M,C=m+p+","+T;return"M"+C+A+" 0 1,1 "+m+","+(T-M)+A+" 0 0,1 "+C+"Z"}},89853:function(R,E,e){var _=e(34031);R.exports={moduleType:"component",name:"shapes",layoutAttributes:e(89827),supplyLayoutDefaults:e(84726),supplyDrawNewShapeDefaults:e(45547),includeBasePlot:e(76325)("shapes"),calcAutorange:e(5627),draw:_.draw,drawOne:_.drawOne}},37281:function(R){function E(i,w){return w?w.d2l(i):i}function e(i,w){return w?w.l2d(i):i}function _(i,w){return E(i.x1,w)-E(i.x0,w)}function k(i,w,v){return E(i.y1,v)-E(i.y0,v)}R.exports={x0:function(i){return i.x0},x1:function(i){return i.x1},y0:function(i){return i.y0},y1:function(i){return i.y1},slope:function(i,w,v){return i.type!=="line"?void 0:k(i,0,v)/_(i,w)},dx:_,dy:k,width:function(i,w){return Math.abs(_(i,w))},height:function(i,w,v){return Math.abs(k(i,0,v))},length:function(i,w,v){return i.type!=="line"?void 0:Math.sqrt(Math.pow(_(i,w),2)+Math.pow(k(i,0,v),2))},xcenter:function(i,w){return e((E(i.x1,w)+E(i.x0,w))/2,w)},ycenter:function(i,w,v){return e((E(i.y1,v)+E(i.y0,v))/2,v)}}},75067:function(R,E,e){var _=e(41940),k=e(35025),i=e(1426).extendDeepAll,w=e(30962).overrideAll,v=e(85594),h=e(44467).templatedArray,s=e(98292),t=h("step",{visible:{valType:"boolean",dflt:!0},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}});R.exports=w(h("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:t,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:i(k({editType:"arraydraw"}),{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:v.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:_({})},font:_({}),activebgcolor:{valType:"color",dflt:s.gripBgActiveColor},bgcolor:{valType:"color",dflt:s.railBgColor},bordercolor:{valType:"color",dflt:s.railBorderColor},borderwidth:{valType:"number",min:0,dflt:s.railBorderWidth},ticklen:{valType:"number",min:0,dflt:s.tickLength},tickcolor:{valType:"color",dflt:s.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:s.minorTickLength}}),"arraydraw","from-root")},98292:function(R){R.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},12343:function(R,E,e){var _=e(71828),k=e(85501),i=e(75067),w=e(98292).name,v=i.steps;function h(t,a,r){function n(c,b){return _.coerce(t,a,i,c,b)}for(var o=k(t,a,{name:"steps",handleItemDefaults:s}),l=0,u=0;u0&&(W=W.transition().duration(B.transition.duration).ease(B.transition.easing)),W.attr("transform",h(j-.5*a.gripWidth,B._dims.currentValueTotalHeight))}}function A(z,B){var Y=z._dims;return Y.inputAreaStart+a.stepInset+(Y.inputAreaLength-2*a.stepInset)*Math.min(1,Math.max(0,B))}function C(z,B){var Y=z._dims;return Math.min(1,Math.max(0,(B-a.stepInset-Y.inputAreaStart)/(Y.inputAreaLength-2*a.stepInset-2*Y.inputAreaStart)))}function P(z,B,Y){var D=Y._dims,G=v.ensureSingle(z,"rect",a.railTouchRectClass,function(U){U.call(T,B,z,Y).style("pointer-events","all")});G.attr({width:D.inputAreaLength,height:Math.max(D.inputAreaWidth,a.tickOffset+Y.ticklen+D.labelHeight)}).call(i.fill,Y.bgcolor).attr("opacity",0),w.setTranslate(G,0,D.currentValueTotalHeight)}function O(z,B){var Y=B._dims,D=Y.inputAreaLength-2*a.railInset,G=v.ensureSingle(z,"rect",a.railRectClass);G.attr({width:D,height:a.railWidth,rx:a.railRadius,ry:a.railRadius,"shape-rendering":"crispEdges"}).call(i.stroke,B.bordercolor).call(i.fill,B.bgcolor).style("stroke-width",B.borderwidth+"px"),w.setTranslate(G,a.railInset,.5*(Y.inputAreaWidth-a.railWidth)+Y.currentValueTotalHeight)}R.exports=function(z){var B=z._context.staticPlot,Y=z._fullLayout,D=function(ie,te){for(var J=ie[a.name],X=[],ee=0;ee0?[0]:[]);function U(ie){ie._commandObserver&&(ie._commandObserver.remove(),delete ie._commandObserver),k.autoMargin(z,u(ie))}if(G.enter().append("g").classed(a.containerClassName,!0).style("cursor",B?null:"ew-resize"),G.exit().each(function(){_.select(this).selectAll("g."+a.groupClassName).each(U)}).remove(),D.length!==0){var j=G.selectAll("g."+a.groupClassName).data(D,d);j.enter().append("g").classed(a.groupClassName,!0),j.exit().each(U).remove();for(var W=0;W0||xe<0){var he={left:[-De,0],right:[De,0],top:[0,-De],bottom:[0,De]}[y.side];X.attr("transform",h(he[0],he[1]))}}}return W.call(Z),G&&(O?W.on(".opacity",null):(A=0,C=!0,W.text(f).on("mouseover.opacity",function(){_.select(this).transition().duration(r.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){_.select(this).transition().duration(r.HIDE_PLACEHOLDER).style("opacity",0)})),W.call(a.makeEditable,{gd:l}).on("edit",function(J){x!==void 0?w.call("_guiRestyle",l,g,J,x):w.call("_guiRelayout",l,g,J)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Z)}).on("input",function(J){this.text(J||" ").call(a.positionText,m.x,m.y)})),W.classed("js-placeholder",C),p}}},7163:function(R,E,e){var _=e(41940),k=e(22399),i=e(1426).extendFlat,w=e(30962).overrideAll,v=e(35025),h=e(44467).templatedArray,s=h("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});R.exports=w(h("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:s,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:i(v({editType:"arraydraw"}),{}),font:_({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:k.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},75909:function(R){R.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"◄",right:"►",up:"▲",down:"▼"}}},64897:function(R,E,e){var _=e(71828),k=e(85501),i=e(7163),w=e(75909).name,v=i.buttons;function h(t,a,r){function n(o,l){return _.coerce(t,a,i,o,l)}n("visible",k(t,a,{name:"buttons",handleItemDefaults:s}).length>0)&&(n("active"),n("direction"),n("type"),n("showactive"),n("x"),n("y"),_.noneOrAll(t,a,["x","y"]),n("xanchor"),n("yanchor"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),_.coerceFont(n,"font",r.font),n("bgcolor",r.paper_bgcolor),n("bordercolor"),n("borderwidth"))}function s(t,a){function r(n,o){return _.coerce(t,a,v,n,o)}r("visible",t.method==="skip"||Array.isArray(t.args))&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}R.exports=function(t,a){k(t,a,{name:w,handleItemDefaults:h})}},13689:function(R,E,e){var _=e(39898),k=e(74875),i=e(7901),w=e(91424),v=e(71828),h=e(63893),s=e(44467).arrayEditor,t=e(18783).LINE_SPACING,a=e(75909),r=e(25849);function n(A){return A._index}function o(A,C){return+A.attr(a.menuIndexAttrName)===C._index}function l(A,C,P,O,z,B,Y,D){C.active=Y,s(A.layout,a.name,C).applyUpdate("active",Y),C.type==="buttons"?d(A,O,null,null,C):C.type==="dropdown"&&(z.attr(a.menuIndexAttrName,"-1"),u(A,O,z,B,C),D||d(A,O,z,B,C))}function u(A,C,P,O,z){var B=v.ensureSingle(C,"g",a.headerClassName,function(W){W.style("pointer-events","all")}),Y=z._dims,D=z.active,G=z.buttons[D]||a.blankHeaderOpts,U={y:z.pad.t,yPad:0,x:z.pad.l,xPad:0,index:0},j={width:Y.headerWidth,height:Y.headerHeight};B.call(c,z,G,A).call(p,z,U,j),v.ensureSingle(C,"text",a.headerArrowClassName,function(W){W.attr("text-anchor","end").call(w.font,z.font).text(a.arrowSymbol[z.direction])}).attr({x:Y.headerWidth-a.arrowOffsetX+z.pad.l,y:Y.headerHeight/2+a.textOffsetY+z.pad.t}),B.on("click",function(){P.call(M,String(o(P,z)?-1:z._index)),d(A,C,P,O,z)}),B.on("mouseover",function(){B.call(x)}),B.on("mouseout",function(){B.call(y,z)}),w.setTranslate(C,Y.lx,Y.ly)}function d(A,C,P,O,z){P||(P=C).attr("pointer-events","all");var B=function(X){return+X.attr(a.menuIndexAttrName)==-1}(P)&&z.type!=="buttons"?[]:z.buttons,Y=z.type==="dropdown"?a.dropdownButtonClassName:a.buttonClassName,D=P.selectAll("g."+Y).data(v.filterVisible(B)),G=D.enter().append("g").classed(Y,!0),U=D.exit();z.type==="dropdown"?(G.attr("opacity","0").transition().attr("opacity","1"),U.transition().attr("opacity","0").remove()):U.remove();var j=0,W=0,Z=z._dims,ie=["up","down"].indexOf(z.direction)!==-1;z.type==="dropdown"&&(ie?W=Z.headerHeight+a.gapButtonHeader:j=Z.headerWidth+a.gapButtonHeader),z.type==="dropdown"&&z.direction==="up"&&(W=-a.gapButtonHeader+a.gapButton-Z.openHeight),z.type==="dropdown"&&z.direction==="left"&&(j=-a.gapButtonHeader+a.gapButton-Z.openWidth);var te={x:Z.lx+j+z.pad.l,y:Z.ly+W+z.pad.t,yPad:a.gapButton,xPad:a.gapButton,index:0},J={l:te.x+z.borderwidth,t:te.y+z.borderwidth};D.each(function(X,ee){var re=_.select(this);re.call(c,z,X,A).call(p,z,te),re.on("click",function(){_.event.defaultPrevented||(X.execute&&(X.args2&&z.active===ee?(l(A,z,0,C,P,O,-1),k.executeAPICommand(A,X.method,X.args2)):(l(A,z,0,C,P,O,ee),k.executeAPICommand(A,X.method,X.args))),A.emit("plotly_buttonclicked",{menu:z,button:X,active:z.active}))}),re.on("mouseover",function(){re.call(x)}),re.on("mouseout",function(){re.call(y,z),D.call(f,z)})}),D.call(f,z),ie?(J.w=Math.max(Z.openWidth,Z.headerWidth),J.h=te.y-J.t):(J.w=te.x-J.l,J.h=Math.max(Z.openHeight,Z.headerHeight)),J.direction=z.direction,O&&(D.size()?function(X,ee,re,oe,ue,ce){var de,me,_e,Me=ue.direction,we=Me==="up"||Me==="down",xe=ue._dims,De=ue.active;if(we)for(me=0,_e=0;_e0?[0]:[]);if(z.enter().append("g").classed(a.containerClassName,!0).style("cursor","pointer"),z.exit().each(function(){_.select(this).selectAll("g."+a.headerGroupClassName).each(O)}).remove(),P.length!==0){var B=z.selectAll("g."+a.headerGroupClassName).data(P,n);B.enter().append("g").classed(a.headerGroupClassName,!0);for(var Y=v.ensureSingle(z,"g",a.dropdownButtonGroupClassName,function(W){W.style("pointer-events","all")}),D=0;Dp,C=v.barLength+2*v.barPad,P=v.barWidth+2*v.barPad,O=c,z=g+f;z+P>n&&(z=n-P);var B=this.container.selectAll("rect.scrollbar-horizontal").data(A?[0]:[]);B.exit().on(".drag",null).remove(),B.enter().append("rect").classed("scrollbar-horizontal",!0).call(k.fill,v.barColor),A?(this.hbar=B.attr({rx:v.barRadius,ry:v.barRadius,x:O,y:z,width:C,height:P}),this._hbarXMin=O+C/2,this._hbarTranslateMax=p-C):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var Y=f>M,D=v.barWidth+2*v.barPad,G=v.barLength+2*v.barPad,U=c+b,j=g;U+D>r&&(U=r-D);var W=this.container.selectAll("rect.scrollbar-vertical").data(Y?[0]:[]);W.exit().on(".drag",null).remove(),W.enter().append("rect").classed("scrollbar-vertical",!0).call(k.fill,v.barColor),Y?(this.vbar=W.attr({rx:v.barRadius,ry:v.barRadius,x:U,y:j,width:D,height:G}),this._vbarYMin=j+G/2,this._vbarTranslateMax=M-G):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var Z=this.id,ie=o-.5,te=Y?l+D+.5:l+.5,J=u-.5,X=A?d+P+.5:d+.5,ee=a._topdefs.selectAll("#"+Z).data(A||Y?[0]:[]);if(ee.exit().remove(),ee.enter().append("clipPath").attr("id",Z).append("rect"),A||Y?(this._clipRect=ee.select("rect").attr({x:Math.floor(ie),y:Math.floor(J),width:Math.ceil(te)-Math.floor(ie),height:Math.ceil(X)-Math.floor(J)}),this.container.call(i.setClipUrl,Z,this.gd),this.bg.attr({x:c,y:g,width:b,height:f})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),A||Y){var re=_.behavior.drag().on("dragstart",function(){_.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(re);var oe=_.behavior.drag().on("dragstart",function(){_.event.sourceEvent.preventDefault(),_.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));A&&this.hbar.on(".drag",null).call(oe),Y&&this.vbar.on(".drag",null).call(oe)}this.setTranslate(s,t)},v.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},v.prototype._onBoxDrag=function(){var h=this.translateX,s=this.translateY;this.hbar&&(h-=_.event.dx),this.vbar&&(s-=_.event.dy),this.setTranslate(h,s)},v.prototype._onBoxWheel=function(){var h=this.translateX,s=this.translateY;this.hbar&&(h+=_.event.deltaY),this.vbar&&(s+=_.event.deltaY),this.setTranslate(h,s)},v.prototype._onBarDrag=function(){var h=this.translateX,s=this.translateY;if(this.hbar){var t=h+this._hbarXMin,a=t+this._hbarTranslateMax;h=(w.constrain(_.event.x,t,a)-t)/(a-t)*(this.position.w-this._box.w)}if(this.vbar){var r=s+this._vbarYMin,n=r+this._vbarTranslateMax;s=(w.constrain(_.event.y,r,n)-r)/(n-r)*(this.position.h-this._box.h)}this.setTranslate(h,s)},v.prototype.setTranslate=function(h,s){var t=this.position.w-this._box.w,a=this.position.h-this._box.h;if(h=w.constrain(h||0,0,t),s=w.constrain(s||0,0,a),this.translateX=h,this.translateY=s,this.container.call(i.setTranslate,this._box.l-this.position.l-h,this._box.t-this.position.t-s),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+h-.5),y:Math.floor(this.position.t+s-.5)}),this.hbar){var r=h/t;this.hbar.call(i.setTranslate,h+r*this._hbarTranslateMax,s)}if(this.vbar){var n=s/a;this.vbar.call(i.setTranslate,h,s+n*this._vbarTranslateMax)}}},18783:function(R){R.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}},24695:function(R){R.exports={axisRefDescription:function(E,e,_){return["If set to a",E,"axis id (e.g. *"+E+"* or","*"+E+"2*), the `"+E+"` position refers to a",E,"coordinate. If set to *paper*, the `"+E+"`","position refers to the distance from the",e,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",e,"("+_+"). If set to a",E,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",e,"of the domain of that axis: e.g.,","*"+E+"2 domain* refers to the domain of the second",E," axis and a",E,"position of 0.5 refers to the","point between the",e,"and the",_,"of the domain of the","second",E,"axis."].join(" ")}}},22372:function(R){R.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}},31562:function(R){R.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}},74808:function(R){R.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},29659:function(R){R.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}},87381:function(R){R.exports={circle:"●","circle-open":"○",square:"■","square-open":"□",diamond:"◆","diamond-open":"◇",cross:"+",x:"❌"}},37822:function(R){R.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},50606:function(R){R.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:24405875e-1,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"−"}},32396:function(R,E){E.CSS_DECLARATIONS=[["image-rendering","optimizeSpeed"],["image-rendering","-moz-crisp-edges"],["image-rendering","-o-crisp-edges"],["image-rendering","-webkit-optimize-contrast"],["image-rendering","optimize-contrast"],["image-rendering","crisp-edges"],["image-rendering","pixelated"]],E.STYLE=E.CSS_DECLARATIONS.map(function(e){return e.join(": ")+"; "}).join("")},77922:function(R,E){E.xmlns="http://www.w3.org/2000/xmlns/",E.svg="http://www.w3.org/2000/svg",E.xlink="http://www.w3.org/1999/xlink",E.svgAttrs={xmlns:E.svg,"xmlns:xlink":E.xlink}},8729:function(R,E,e){E.version=e(11506).version,e(7417),e(98847);for(var _=e(73972),k=E.register=_.register,i=e(10641),w=Object.keys(i),v=0;v",""," ",""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}},99863:function(R,E){E.isLeftAnchor=function(e){return e.xanchor==="left"||e.xanchor==="auto"&&e.x<=.3333333333333333},E.isCenterAnchor=function(e){return e.xanchor==="center"||e.xanchor==="auto"&&e.x>.3333333333333333&&e.x<.6666666666666666},E.isRightAnchor=function(e){return e.xanchor==="right"||e.xanchor==="auto"&&e.x>=.6666666666666666},E.isTopAnchor=function(e){return e.yanchor==="top"||e.yanchor==="auto"&&e.y>=.6666666666666666},E.isMiddleAnchor=function(e){return e.yanchor==="middle"||e.yanchor==="auto"&&e.y>.3333333333333333&&e.y<.6666666666666666},E.isBottomAnchor=function(e){return e.yanchor==="bottom"||e.yanchor==="auto"&&e.y<=.3333333333333333}},26348:function(R,E,e){var _=e(64872),k=_.mod,i=_.modHalf,w=Math.PI,v=2*w;function h(r){return Math.abs(r[1]-r[0])>v-1e-14}function s(r,n){return i(n-r,v)}function t(r,n){if(h(n))return!0;var o,l;n[0](l=k(l,v))&&(l+=v);var u=k(r,v),d=u+v;return u>=o&&u<=l||d>=o&&d<=l}function a(r,n,o,l,u,d,c){u=u||0,d=d||0;var b,g,f,x,y,m=h([o,l]);function T(C,P){return[C*Math.cos(P)+u,d-C*Math.sin(P)]}m?(b=0,g=w,f=v):o=u&&r<=d);var u,d},pathArc:function(r,n,o,l,u){return a(null,r,n,o,l,u,0)},pathSector:function(r,n,o,l,u){return a(null,r,n,o,l,u,1)},pathAnnulus:function(r,n,o,l,u,d){return a(r,n,o,l,u,d,1)}}},73627:function(R,E){var e=Array.isArray,_=ArrayBuffer,k=DataView;function i(h){return _.isView(h)&&!(h instanceof k)}function w(h){return e(h)||i(h)}function v(h,s,t){if(w(h)){if(w(h[0])){for(var a=t,r=0;rd.max?l.set(u):l.set(+o)}},integer:{coerceFunction:function(o,l,u,d){o%1||!_(o)||d.min!==void 0&&od.max?l.set(u):l.set(+o)}},string:{coerceFunction:function(o,l,u,d){if(typeof o!="string"){var c=typeof o=="number";d.strict!==!0&&c?l.set(String(o)):l.set(u)}else d.noBlank&&!o?l.set(u):l.set(o)}},color:{coerceFunction:function(o,l,u){k(o).isValid()?l.set(o):l.set(u)}},colorlist:{coerceFunction:function(o,l,u){Array.isArray(o)&&o.length&&o.every(function(d){return k(d).isValid()})?l.set(o):l.set(u)}},colorscale:{coerceFunction:function(o,l,u){l.set(w.get(o,u))}},angle:{coerceFunction:function(o,l,u){o==="auto"?l.set("auto"):_(o)?l.set(a(+o,360)):l.set(u)}},subplotid:{coerceFunction:function(o,l,u,d){var c=d.regex||t(u);typeof o=="string"&&c.test(o)?l.set(o):l.set(u)},validateFunction:function(o,l){var u=l.dflt;return o===u||typeof o=="string"&&!!t(u).test(o)}},flaglist:{coerceFunction:function(o,l,u,d){if((d.extras||[]).indexOf(o)===-1)if(typeof o=="string"){for(var c=o.split("+"),b=0;b=_&&B<=k?B:t}if(typeof B!="string"&&typeof B!="number")return t;B=String(B);var j=f(Y),W=B.charAt(0);!j||W!=="G"&&W!=="g"||(B=B.substr(1),Y="");var Z=j&&Y.substr(0,7)==="chinese",ie=B.match(Z?b:c);if(!ie)return t;var te=ie[1],J=ie[3]||"1",X=Number(ie[5]||1),ee=Number(ie[7]||0),re=Number(ie[9]||0),oe=Number(ie[11]||0);if(j){if(te.length===2)return t;var ue;te=Number(te);try{var ce=u.getComponentMethod("calendars","getCal")(Y);if(Z){var de=J.charAt(J.length-1)==="i";J=parseInt(J,10),ue=ce.newDate(te,ce.toMonthIndex(te,J,de),X)}else ue=ce.newDate(te,Number(J),X)}catch{return t}return ue?(ue.toJD()-l)*a+ee*r+re*n+oe*o:t}te=te.length===2?(Number(te)+2e3-g)%100+g:Number(te),J-=1;var me=new Date(Date.UTC(2e3,J,X,ee,re));return me.setUTCFullYear(te),me.getUTCMonth()!==J||me.getUTCDate()!==X?t:me.getTime()+oe*o},_=E.MIN_MS=E.dateTime2ms("-9999"),k=E.MAX_MS=E.dateTime2ms("9999-12-31 23:59:59.9999"),E.isDateTime=function(B,Y){return E.dateTime2ms(B,Y)!==t};var y=90*a,m=3*r,T=5*n;function p(B,Y,D,G,U){if((Y||D||G||U)&&(B+=" "+x(Y,2)+":"+x(D,2),(G||U)&&(B+=":"+x(G,2),U))){for(var j=4;U%10==0;)j-=1,U/=10;B+="."+x(U,j)}return B}E.ms2DateTime=function(B,Y,D){if(typeof B!="number"||!(B>=_&&B<=k))return t;Y||(Y=0);var G,U,j,W,Z,ie,te=Math.floor(10*h(B+.05,1)),J=Math.round(B-te/10);if(f(D)){var X=Math.floor(J/a)+l,ee=Math.floor(h(B,a));try{G=u.getComponentMethod("calendars","getCal")(D).fromJD(X).formatDate("yyyy-mm-dd")}catch{G=d("G%Y-%m-%d")(new Date(J))}if(G.charAt(0)==="-")for(;G.length<11;)G="-0"+G.substr(1);else for(;G.length<10;)G="0"+G;U=Y=_+a&&B<=k-a))return t;var Y=Math.floor(10*h(B+.05,1)),D=new Date(Math.round(B-Y/10));return p(i("%Y-%m-%d")(D),D.getHours(),D.getMinutes(),D.getSeconds(),10*D.getUTCMilliseconds()+Y)},E.cleanDate=function(B,Y,D){if(B===t)return Y;if(E.isJSDate(B)||typeof B=="number"&&isFinite(B)){if(f(D))return v.error("JS Dates and milliseconds are incompatible with world calendars",B),Y;if(!(B=E.ms2DateTimeLocal(+B))&&Y!==void 0)return Y}else if(!E.isDateTime(B,D))return v.error("unrecognized date",B),Y;return B};var M=/%\d?f/g,A=/%h/g,C={1:"1",2:"1",3:"2",4:"2"};function P(B,Y,D,G){B=B.replace(M,function(j){var W=Math.min(+j.charAt(1)||6,6);return(Y/1e3%1+2).toFixed(W).substr(2).replace(/0+$/,"")||"0"});var U=new Date(Math.floor(Y+.05));if(B=B.replace(A,function(){return C[D("%q")(U)]}),f(G))try{B=u.getComponentMethod("calendars","worldCalFmt")(B,Y,G)}catch{return"Invalid"}return D(B)(U)}var O=[59,59.9,59.99,59.999,59.9999];E.formatDate=function(B,Y,D,G,U,j){if(U=f(U)&&U,!Y)if(D==="y")Y=j.year;else if(D==="m")Y=j.month;else{if(D!=="d")return function(W,Z){var ie=h(W+.05,a),te=x(Math.floor(ie/r),2)+":"+x(h(Math.floor(ie/n),60),2);if(Z!=="M"){w(Z)||(Z=0);var J=(100+Math.min(h(W/o,60),O[Z])).toFixed(Z).substr(1);Z>0&&(J=J.replace(/0+$/,"").replace(/[\.]$/,"")),te+=":"+J}return te}(B,D)+` +`)).length,Pe=0;Pe127&&E<2048?String.fromCharCode(E>>6|192,63&E|128):String.fromCharCode(E>>12|224,E>>6&63|128,63&E|128),e!==null&&(K>I&&(R+=L.substring(I,K)),R+=e,I=K=Pe+1)}return K>I&&(R+=L.substring(I,L.length)),R},Hc=(Qg=function(){for(var L=new Date().valueOf(),I=0;L==new Date().valueOf();)I++;return L.toString(16)+I.toString(16)},function(){var L=typeof window<"u"?(window.screen.height*window.screen.width).toString(16):"0";return Qg()+"-"+Math.random().toString(16).replace(".","")+"-"+function(){var I,K,se=Cl,Pe=0,R=[];function E(e,_){var k,i=0;for(k=0;k<_.length;k++)i|=R[k]<<8*k;return e^i}for(I=0;I=4&&(Pe=E(Pe,R),R=[]);return R.length>0&&(Pe=E(Pe,R)),Pe.toString(16)}()+"-"+L+"-"+Qg()}),tT=function(L){return!!/(google web preview|baiduspider|yandexbot|bingbot|googlebot|yahoo! slurp|ahrefsbot|facebookexternalhit|facebookcatalog|applebot|semrushbot|duckduckbot|twitterbot|rogerbot|linkedinbot|mj12bot|sitebulb|bot.htm|bot.php|hubspot|crawler)/i.test(L)},Ob=function(L,I){var K=I.replace(/[[]/,"\\[").replace(/[\]]/,"\\]"),se=new RegExp("[\\?&]"+K+"=([^&#]*)").exec(L);if(se===null||se&&typeof se[1]!="string"&&se[1].length)return"";var Pe=se[1];try{Pe=decodeURIComponent(Pe)}catch{Ra.error("Skipping decoding for malformed query param: "+Pe)}return Pe.replace(/\+/g," ")},Ib=function(L,I){var K=L.match(new RegExp(I+"=([^&]*)"));return K?K[1]:null},Up=function(){function L(I){return I&&(I.preventDefault=L.preventDefault,I.stopPropagation=L.stopPropagation),I}return L.preventDefault=function(){this.returnValue=!1},L.stopPropagation=function(){this.cancelBubble=!0},function(I,K,se,Pe,R){if(I)if(I.addEventListener&&!Pe)I.addEventListener(K,se,!!R);else{var E="on"+K,e=I[E];I[E]=function(_,k,i){return function(w){if(w=w||L(window.event)){var v,h=!0;Bw(i)&&(v=i(w));var s=k.call(_,w);return v!==!1&&s!==!1||(h=!1),h}}}(I,se,e)}else Ra.error("No valid element provided to register_event")}}();function Ay(L,I){var K=function(){var se=ja.createElement("script");se.type="text/javascript",se.src=L,se.onload=function(E){return I(void 0,E)},se.onerror=function(E){return I(E)};var Pe,R=ja.querySelectorAll("body > script");R.length>0?(Pe=R[0].parentNode)===null||Pe===void 0||Pe.insertBefore(se,R[0]):ja.body.appendChild(se)};ja.body?K():ja.addEventListener("DOMContentLoaded",K)}var po={campaignParams:function(L){var I=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gclid","fbclid","msclkid"].concat(L||[]),K={};return ji(I,function(se){var Pe=Ob(ja.URL,se);Pe.length&&(K[se]=Pe)}),K},searchEngine:function(){var L=ja.referrer;return L?L.search("https?://(.*)google.([^/?]*)")===0?"google":L.search("https?://(.*)bing.com")===0?"bing":L.search("https?://(.*)yahoo.com")===0?"yahoo":L.search("https?://(.*)duckduckgo.com")===0?"duckduckgo":null:null},searchInfo:function(){var L=po.searchEngine(),I=L!="yahoo"?"q":"p",K={};if(L!==null){K.$search_engine=L;var se=Ob(ja.referrer,I);se.length&&(K.ph_keyword=se)}return K},browser:function(L,I,K){return I=I||"",K||Yi(L," OPR/")?Yi(L,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(L)?"BlackBerry":Yi(L,"IEMobile")||Yi(L,"WPDesktop")?"Internet Explorer Mobile":Yi(L,"SamsungBrowser/")?"Samsung Internet":Yi(L,"Edge")||Yi(L,"Edg/")?"Microsoft Edge":Yi(L,"FBIOS")?"Facebook Mobile":Yi(L,"Chrome")?"Chrome":Yi(L,"CriOS")?"Chrome iOS":Yi(L,"UCWEB")||Yi(L,"UCBrowser")?"UC Browser":Yi(L,"FxiOS")?"Firefox iOS":Yi(I,"Apple")?Yi(L,"Mobile")?"Mobile Safari":"Safari":Yi(L,"Android")?"Android Mobile":Yi(L,"Konqueror")?"Konqueror":Yi(L,"Firefox")?"Firefox":Yi(L,"MSIE")||Yi(L,"Trident/")?"Internet Explorer":Yi(L,"Gecko")?"Mozilla":""},browserVersion:function(L,I,K){var se={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/}[po.browser(L,I,K)];if(se===void 0)return null;var Pe=L.match(se);return Pe?parseFloat(Pe[Pe.length-2]):null},browserLanguage:function(){return df.language||df.userLanguage},os:function(L){if(/Windows/i.test(L)){if(/Phone/.test(L)||/WPDesktop/.test(L))return{os_name:"Windows Phone",os_version:""};var I=/Windows NT ([0-9.]+)/i.exec(L);return I&&I[1]?{os_name:"Windows",os_version:I[1]}:{os_name:"Windows",os_version:""}}if(/(iPhone|iPad|iPod)/.test(L)){var K=/OS (\d+)_(\d+)_?(\d+)?/i.exec(L);return K&&K[1]?{os_name:"iOS",os_version:[K[1],K[2],K[3]||"0"].join(".")}:{os_name:"iOS",os_version:""}}if(/Android/.test(L)){var se=/Android (\d+)\.(\d+)\.?(\d+)?/i.exec(L);return se&&se[1]?{os_name:"Android",os_version:[se[1],se[2],se[3]||"0"].join(".")}:{os_name:"Android",os_version:""}}if(/(BlackBerry|PlayBook|BB10)/i.test(L))return{os_name:"BlackBerry",os_version:""};if(/Mac/i.test(L)){var Pe=/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i.exec(L);return Pe&&Pe[1]?{os_name:"Mac OS X",os_version:[Pe[1],Pe[2],Pe[3]||"0"].join(".")}:{os_name:"Mac OS X",os_version:""}}return/Linux/.test(L)?{os_name:"Linux",os_version:""}:/CrOS/.test(L)?{os_name:"Chrome OS",os_version:""}:{os_name:"",os_version:""}},device:function(L){return/Windows Phone/i.test(L)||/WPDesktop/.test(L)?"Windows Phone":/iPad/.test(L)?"iPad":/iPod/.test(L)?"iPod Touch":/iPhone/.test(L)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(L)?"BlackBerry":/Android/.test(L)&&!/Mobile/.test(L)?"Android Tablet":/Android/.test(L)?"Android":""},deviceType:function(L){var I=this.device(L);return I==="iPad"||I==="Android Tablet"?"Tablet":I?"Mobile":"Desktop"},referrer:function(){return ja.referrer||"$direct"},referringDomain:function(){if(!ja.referrer)return"$direct";var L=ja.createElement("a");return L.href=ja.referrer,L.host},properties:function(){var L=po.os(Cl),I=L.os_name,K=L.os_version;return Eo(cm({$os:I,$os_version:K,$browser:po.browser(Cl,df.vendor,ai.opera),$device:po.device(Cl),$device_type:po.deviceType(Cl)}),{$current_url:ai==null?void 0:ai.location.href,$host:ai==null?void 0:ai.location.host,$pathname:ai==null?void 0:ai.location.pathname,$browser_version:po.browserVersion(Cl,df.vendor,ai.opera),$browser_language:po.browserLanguage(),$screen_height:ai==null?void 0:ai.screen.height,$screen_width:ai==null?void 0:ai.screen.width,$viewport_height:ai==null?void 0:ai.innerHeight,$viewport_width:ai==null?void 0:ai.innerWidth,$lib:"web",$lib_version:Cu.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:(Date.now=Date.now||function(){return+new Date},Date.now()/1e3)})},people_properties:function(){var L=po.os(Cl),I=L.os_name,K=L.os_version;return Eo(cm({$os:I,$os_version:K,$browser:po.browser(Cl,df.vendor,ai.opera)}),{$browser_version:po.browserVersion(Cl,df.vendor,ai.opera)})}};function m1(L){switch(_f(L.className)){case"string":return L.className;case"object":return("baseVal"in L.className?L.className.baseVal:null)||L.getAttribute("class")||"";default:return""}}function y1(L){var I="";return j0(L)&&!Hw(L)&&L.childNodes&&L.childNodes.length&&ji(L.childNodes,function(K){Vw(K)&&K.textContent&&(I+=um(K.textContent).split(/(\s+)/).filter(xh).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))}),um(I)}function Rb(L){return!!L&&L.nodeType===1}function wf(L,I){return!!L&&!!L.tagName&&L.tagName.toLowerCase()===I.toLowerCase()}function Vw(L){return!!L&&L.nodeType===3}function zb(L){return!!L&&L.nodeType===11}var ev=["a","button","form","input","select","textarea","label"];function j0(L){for(var I=L;I.parentNode&&!wf(I,"body");I=I.parentNode){var K=m1(I).split(" ");if(Yi(K,"ph-sensitive")||Yi(K,"ph-no-capture"))return!1}if(Yi(m1(L).split(" "),"ph-include"))return!0;var se=L.type||"";if(typeof se=="string")switch(se.toLowerCase()){case"hidden":case"password":return!1}var Pe=L.name||L.id||"";return!(typeof Pe=="string"&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(Pe.replace(/[^a-zA-Z0-9]/g,"")))}function Hw(L){return!!(wf(L,"input")&&!["button","checkbox","submit","reset"].includes(L.type)||wf(L,"select")||wf(L,"textarea")||L.getAttribute("contenteditable")==="true")}function xh(L){return!(L===null||iu(L)||typeof L=="string"&&(L=um(L),/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/.test((L||"").replace(/[- ]/g,""))||/(^\d{3}-?\d{2}-?\d{4}$)/.test(L)))}function Db(L){var I=y1(L);return xh(I="".concat(I," ").concat(qw(L)).trim())?I:""}function qw(L){var I="";return L&&L.childNodes&&L.childNodes.length&&ji(L.childNodes,function(K){var se;if(K&&((se=K.tagName)===null||se===void 0?void 0:se.toLowerCase())==="span")try{var Pe=y1(K);I="".concat(I," ").concat(Pe).trim(),K.childNodes&&K.childNodes.length&&(I="".concat(I," ").concat(qw(K)).trim())}catch(R){console.error(R)}}),I}var nT=function(){function L(I){Xo(this,L),this.clicks=[],this.enabled=I}return $o(L,[{key:"isRageClick",value:function(I,K,se){if(!this.enabled)return!1;var Pe=this.clicks[this.clicks.length-1];if(Pe&&Math.abs(I-Pe.x)+Math.abs(K-Pe.y)<30&&se-Pe.timestamp<1e3){if(this.clicks.push({x:I,y:K,timestamp:se}),this.clicks.length===3)return!0}else this.clicks=[{x:I,y:K,timestamp:se}];return!1}}]),L}(),rT=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,Mu={is_supported:function(){return!0},error:function(L){Ra.error("cookieStore error: "+L)},get:function(L){try{for(var I=L+"=",K=document.cookie.split(";"),se=0;se-1&&!K&&(se.toLowerCase()==="a"||se.toLowerCase()==="button"?Pe.$el_text=Db(L):Pe.$el_text=y1(L));var R=m1(L);R.length>0&&(Pe.classes=R.split(" ").filter(function(k){return k!==""})),ji(L.attributes,function(k){var i;Hw(L)&&["name","id","class"].indexOf(k.name)===-1||!I&&xh(k.value)&&(typeof(i=k.name)!="string"||i.substring(0,10)!=="_ngcontent"&&i.substring(0,7)!=="_nghost")&&(Pe["attr__"+k.name]=k.value)});for(var E=1,e=1,_=L;_=this._previousElementSibling(_);)E++,_.tagName===L.tagName&&e++;return Pe.nth_child=E,Pe.nth_of_type=e,Pe},_getDefaultProperties:function(L){return{$event_type:L,$ce_version:1}},_extractCustomPropertyValue:function(L){var I=[];return ji(document.querySelectorAll(L.css_selector),function(K){var se;["input","select"].indexOf(K.tagName.toLowerCase())>-1?se=K.value:K.textContent&&(se=K.textContent),xh(se)&&I.push(se)}),I.join(", ")},_getCustomProperties:function(L){var I=this,K={};return ji(this._customProperties,function(se){ji(se.event_selectors,function(Pe){ji(document.querySelectorAll(Pe),function(R){Yi(L,R)&&j0(R)&&(K[se.name]=I._extractCustomPropertyValue(se))})})}),K},_getEventTarget:function(L){return L.target===void 0?L.srcElement||null:(I=L.target)!==null&&I!==void 0&&I.shadowRoot?L.composedPath()[0]||null:L.target||null;var I},_captureEvent:function(L,I){var K,se=this,Pe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"$autocapture",R=this._getEventTarget(L);if(Vw(R)&&(R=R.parentNode||null),Pe==="$autocapture"&&L.type==="click"&&L instanceof MouseEvent&&(K=this.rageclicks)!==null&&K!==void 0&&K.isRageClick(L.clientX,L.clientY,new Date().getTime())&&this._captureEvent(L,I,"$rageclick"),R&&function(h,s){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;if(!h||wf(h,"html")||!Rb(h))return!1;if(t!=null&&t.url_allowlist){var a=window.location.href,r=t.url_allowlist;if(r&&!r.some(function(y){return a.match(y)}))return!1}if(t!=null&&t.dom_event_allowlist){var n=t.dom_event_allowlist;if(n&&!n.some(function(y){return s.type===y}))return!1}if(t!=null&&t.element_allowlist){var o=t.element_allowlist;if(o&&!o.some(function(y){return h.tagName.toLowerCase()===y}))return!1}if(t!=null&&t.css_selector_allowlist){var l=t.css_selector_allowlist;if(l&&!l.some(function(y){return h.matches(y)}))return!1}for(var u=!1,d=[h],c=!0,b=h;b.parentNode&&!wf(b,"body");)if(zb(b.parentNode))d.push(b.parentNode.host),b=b.parentNode.host;else{if(!(c=b.parentNode||!1))break;if(ev.indexOf(c.tagName.toLowerCase())>-1)u=!0;else{var g=window.getComputedStyle(c);g&&g.getPropertyValue("cursor")==="pointer"&&(u=!0)}d.push(c),b=c}var f=window.getComputedStyle(h);if(f&&f.getPropertyValue("cursor")==="pointer"&&s.type==="click")return!0;var x=h.tagName.toLowerCase();switch(x){case"html":return!1;case"form":return s.type==="submit";case"input":case"select":case"textarea":return s.type==="change"||s.type==="click";default:return u?s.type==="click":s.type==="click"&&(ev.indexOf(x)>-1||h.getAttribute("contenteditable")==="true")}}(R,L,this.config)){for(var E=[R],e=R;e.parentNode&&!wf(e,"body");)zb(e.parentNode)?(E.push(e.parentNode.host),e=e.parentNode.host):(E.push(e.parentNode),e=e.parentNode);var _,k=[],i={},w=!1;if(ji(E,function(h){var s=j0(h);h.tagName.toLowerCase()==="a"&&(_=h.getAttribute("href"),_=s&&xh(_)&&_),Yi(m1(h).split(" "),"ph-no-capture")&&(w=!0),k.push(se._getPropertiesFromElement(h,I.get_config("mask_all_element_attributes"),I.get_config("mask_all_text")));var t=se._getAugmentPropertiesFromElement(h);Eo(i,t)}),I.get_config("mask_all_text")||(R.tagName.toLowerCase()==="a"||R.tagName.toLowerCase()==="button"?k[0].$el_text=Db(R):k[0].$el_text=y1(R)),_&&(k[0].attr__href=_),w)return!1;var v=Eo(this._getDefaultProperties(L.type),{$elements:k},this._getCustomProperties(E),i);return I.capture(Pe,v),!0}},_navigate:function(L){window.location.href=L},_addDomEventHandlers:function(L){var I=this,K=function(se){se=se||window.event,I._captureEvent(se,L)};Up(document,"submit",K,!1,!0),Up(document,"change",K,!1,!0),Up(document,"click",K,!1,!0)},_customProperties:[],rageclicks:null,config:void 0,init:function(L){var I;typeof L.__autocapture!="boolean"&&(this.config=L.__autocapture),(I=this.config)!==null&&I!==void 0&&I.url_allowlist&&(this.config.url_allowlist=this.config.url_allowlist.map(function(K){return new RegExp(K)})),this.rageclicks=new nT(L.get_config("rageclick"))},afterDecideResponse:function(L,I){this._setIsAutocaptureEnabled(I);var K=I.get_config("token");this._initializedTokens.indexOf(K)>-1?Ra.log('autocapture already initialized for token "'+K+'"'):(I.persistence&&I.persistence.register(yi({},Fb,!!L.autocapture_opt_out)),this._initializedTokens.push(K),L&&L.config&&L.config.enable_collect_everything&&this._isAutocaptureEnabled?(L.custom_properties&&(this._customProperties=L.custom_properties),this._addDomEventHandlers(I)):I.__autocapture=!1)},enabledForProject:function(L,I,K){if(!L)return!0;I=iu(I)?10:I,K=iu(K)?10:K;for(var se=0,Pe=0;Pe1&&arguments[1]!==void 0?arguments[1]:{};if(!this.getFlags())return console.warn('getFeatureFlag for key "'+I+`" failed. Feature flags didn't load in time.`),!1;var se=this.getFlagVariants()[I];return!K.send_event&&"send_event"in K||this.flagCallReported[I]||(this.flagCallReported[I]=!0,this.instance.capture("$feature_flag_called",{$feature_flag:I,$feature_flag_response:se})),se}},{key:"getFeatureFlagPayload",value:function(I){return this.getFlagPayloads()[I]}},{key:"isFeatureEnabled",value:function(I){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.getFlags()?!!this.getFeatureFlag(I,K):(console.warn('isFeatureEnabled for key "'+I+`" failed. Feature flags didn't load in time.`),!1)}},{key:"addFeatureFlagsHandler",value:function(I){this.featureFlagEventHandlers.push(I)}},{key:"removeFeatureFlagsHandler",value:function(I){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(function(K){return K!==I})}},{key:"receivedFeatureFlags",value:function(I){this.instance.decideEndpointWasHit=!0;var K=this.getFlagVariants(),se=this.getFlagPayloads();(function(Pe,R){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},_=Pe.featureFlags,k=Pe.featureFlagPayloads;if(_)if(Array.isArray(_)){var i,w={};if(_)for(var v=0;v<_.length;v++)w[_[v]]=!0;R&&R.register((yi(i={},rv,_),yi(i,bh,w),i))}else{var h,s=_,t=k;Pe.errorsWhileComputingFlags&&(s=hi(hi({},E),s),t=hi(hi({},e),t)),R&&R.register((yi(h={},rv,Object.keys(Hb(s))),yi(h,bh,s||{}),yi(h,Vb,t||{}),h))}})(I,this.instance.persistence,K,se),this._fireFeatureFlagsCallbacks()}},{key:"override",value:function(I){if(this._override_warning=!1,I===!1)this.instance.persistence.unregister(_0);else if(Array.isArray(I)){for(var K={},se=0;se1&&arguments[1]!==void 0&&arguments[1],Pe=this.instance.get_property(dm);if(Pe&&!se)return I(Pe);this.instance._send_request("".concat(this.instance.get_config("api_host"),"/api/early_access_features/?token=").concat(this.instance.get_config("token")),{},{method:"GET"},function(R){var E=R.earlyAccessFeatures;return K.instance.persistence.register(yi({},dm,E)),I(E)})}},{key:"_prepareFeatureFlagsForCallbacks",value:function(){var I=this.getFlags(),K=this.getFlagVariants();return{flags:I.filter(function(se){return K[se]}),flagVariants:Object.keys(K).filter(function(se){return K[se]}).reduce(function(se,Pe){return se[Pe]=K[Pe],se},{})}}},{key:"_fireFeatureFlagsCallbacks",value:function(){var I=this._prepareFeatureFlagsForCallbacks(),K=I.flags,se=I.flagVariants;this.featureFlagEventHandlers.forEach(function(Pe){return Pe(K,se)})}},{key:"setPersonPropertiesForFlags",value:function(I){var K=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],se=this.instance.get_property(_h)||{};this.instance.register(yi({},_h,hi(hi({},se),I))),K&&this.instance.reloadFeatureFlags()}},{key:"resetPersonPropertiesForFlags",value:function(){this.instance.unregister(_h)}},{key:"setGroupPropertiesForFlags",value:function(I){var K=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],se=this.instance.get_property(Ac)||{};Object.keys(se).length!==0&&Object.keys(se).forEach(function(Pe){se[Pe]=hi(hi({},se[Pe]),I[Pe]),delete I[Pe]}),this.instance.register(yi({},Ac,hi(hi({},se),I))),K&&this.instance.reloadFeatureFlags()}},{key:"resetGroupPropertiesForFlags",value:function(I){if(I){var K=this.instance.get_property(Ac)||{};this.instance.register(yi({},Ac,hi(hi({},K),{},yi({},I,{}))))}else this.instance.unregister(Ac)}}]),L}(),dT="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJibGFjayIvPgo8cGF0aCBkPSJNOCAwSDE2TDAgMTZWOEw4IDBaIiBmaWxsPSIjMkQyRDJEIi8+CjxwYXRoIGQ9Ik0xNiA4VjE2SDhMMTYgOFoiIGZpbGw9IiMyRDJEMkQiLz4KPC9zdmc+Cg==",qb=2,gT=4,vT=6,mT="rrweb/console@1",ku,yT="/e/";(function(L){L[L.Mutation=0]="Mutation",L[L.MouseMove=1]="MouseMove",L[L.MouseInteraction=2]="MouseInteraction",L[L.Scroll=3]="Scroll",L[L.ViewportResize=4]="ViewportResize",L[L.Input=5]="Input",L[L.TouchMove=6]="TouchMove",L[L.MediaInteraction=7]="MediaInteraction",L[L.StyleSheetRule=8]="StyleSheetRule",L[L.CanvasMutation=9]="CanvasMutation",L[L.Font=10]="Font",L[L.Log=11]="Log",L[L.Drag=12]="Drag",L[L.StyleDeclaration=13]="StyleDeclaration"})(ku||(ku={}));var xT=[ku.MouseMove,ku.MouseInteraction,ku.Scroll,ku.ViewportResize,ku.Input,ku.TouchMove,ku.MediaInteraction,ku.Drag],bT=function(){function L(I){Xo(this,L),yi(this,"lastActivityTimestamp",Date.now()),yi(this,"isIdle",!1),this.instance=I,this.captureStarted=!1,this.snapshots=[],this.emit=!1,this.endpoint=yT,this.stopRrweb=void 0,this.windowId=null,this.sessionId=null,this.receivedDecide=!1}return $o(L,[{key:"startRecordingIfEnabled",value:function(){this.isRecordingEnabled()?this.startCaptureAndTrySendingQueuedSnapshots():this.stopRecording()}},{key:"started",value:function(){return this.captureStarted}},{key:"stopRecording",value:function(){this.captureStarted&&this.stopRrweb&&(this.stopRrweb(),this.stopRrweb=void 0,this.captureStarted=!1)}},{key:"isRecordingEnabled",value:function(){var I=!!this.instance.get_property(hm),K=!this.instance.get_config("disable_session_recording");return I&&K}},{key:"isConsoleLogCaptureEnabled",value:function(){var I=!!this.instance.get_property(Bb),K=this.instance.get_config("enable_recording_console_log");return K??I}},{key:"getRecordingVersion",value:function(){var I,K=this.instance.get_property(Nb);return((I=this.instance.get_config("session_recording"))===null||I===void 0?void 0:I.recorderVersion)||K||"v1"}},{key:"afterDecideResponse",value:function(I){var K,se,Pe,R,E,e;this.receivedDecide=!0,this.instance.persistence&&this.instance.persistence.register((yi(E={},hm,!!I.sessionRecording),yi(E,Bb,(Pe=I.sessionRecording)===null||Pe===void 0?void 0:Pe.consoleLogRecordingEnabled),yi(E,Nb,(R=I.sessionRecording)===null||R===void 0?void 0:R.recorderVersion),E)),(K=I.sessionRecording)!==null&&K!==void 0&&K.endpoint&&(this.endpoint=(e=I.sessionRecording)===null||e===void 0?void 0:e.endpoint),(se=I.sessionRecording)!==null&&se!==void 0&&se.recorderVersion&&(this.recorderVersion=I.sessionRecording.recorderVersion),this.startRecordingIfEnabled()}},{key:"startCaptureAndTrySendingQueuedSnapshots",value:function(){var I=this;this.receivedDecide&&(this.emit=!0,this.snapshots.forEach(function(K){return I._captureSnapshot(K)})),this._startCapture()}},{key:"_startCapture",value:function(){var I=this;if(Object.assign!==void 0&&!this.captureStarted&&!this.instance.get_config("disable_session_recording")){this.captureStarted=!0,this.instance.sessionManager.checkAndGetSessionAndWindowId();var K=this.getRecordingVersion()==="v2"?"recorder-v2.js":"recorder.js";this.instance.__loaded_recorder_version!==this.getRecordingVersion()?Ay(this.instance.get_config("api_host")+"/static/".concat(K,"?v=").concat(Cu.LIB_VERSION),function(se){if(se)return Ra.error("Could not load ".concat(K),se);I._onScriptLoaded()}):this._onScriptLoaded()}}},{key:"_isInteractiveEvent",value:function(I){var K;return I.type===3&&xT.indexOf((K=I.data)===null||K===void 0?void 0:K.source)!==-1}},{key:"_updateWindowAndSessionIds",value:function(I){var K=this._isInteractiveEvent(I);if(K||this.isIdle||I.timestamp-this.lastActivityTimestamp>3e5&&(this.isIdle=!0),K&&(this.lastActivityTimestamp=I.timestamp,this.isIdle&&(this.isIdle=!1,this._tryTakeFullSnapshot())),!this.isIdle){var se=this.instance.sessionManager.checkAndGetSessionAndWindowId(!K,I.timestamp),Pe=se.windowId,R=se.sessionId;[qb,gT].indexOf(I.type)!==-1||this.windowId===Pe&&this.sessionId===R||this._tryTakeFullSnapshot(),this.windowId=Pe,this.sessionId=R}}},{key:"_tryTakeFullSnapshot",value:function(){if(!this.captureStarted)return!1;try{var I;return(I=this.rrwebRecord)===null||I===void 0||I.takeFullSnapshot(),!0}catch(K){return Ra.error("Error taking full snapshot.",K),!1}}},{key:"_onScriptLoaded",value:function(){var I=this,K={blockClass:"ph-no-capture",blockSelector:void 0,ignoreClass:"ph-ignore-input",maskTextClass:"ph-mask",maskTextSelector:void 0,maskAllInputs:!0,maskInputOptions:{},maskInputFn:void 0,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0};this.rrwebRecord=window.rrweb?window.rrweb.record:window.rrwebRecord;for(var se=this.instance.get_config("session_recording"),Pe=0,R=Object.entries(se||{});Pe10&&(se.data.payload.payload=se.data.payload.payload.slice(0,10),se.data.payload.payload.push("...[truncated]"));for(var Pe=[],R=0;R2e3?Pe.push(se.data.payload.payload[R].slice(0,2e3)+"...[truncated]"):Pe.push(se.data.payload.payload[R]);return se.data.payload.payload=Pe,se}return se}(function(se){if(se&&_f(se)==="object"){var Pe=JSON.stringify(se);if(Pe.length>5e6){var R,E=Wc(Pe.matchAll(/data:([\w\/\-\.]+);(\w+),([^)"]*)/gim));try{for(E.s();!(R=E.n()).done;){var e=R.value;Pe=e[1].toLocaleLowerCase().slice(0,6)==="image/"?Pe.replace(e[0],dT):Pe.replace(e[0],"")}}catch(_){E.e(_)}finally{E.f()}}return JSON.parse(Pe)}return se}(I)),this._updateWindowAndSessionIds(I),!this.isIdle){var K={$snapshot_data:I,$session_id:this.sessionId,$window_id:this.windowId};this.instance._captureMetrics.incr("rrweb-record"),this.instance._captureMetrics.incr("rrweb-record-".concat(I.type)),this.emit?this._captureSnapshot(K):this.snapshots.push(K)}}},{key:"_captureSnapshot",value:function(I){this.instance.capture("$snapshot",I,{transport:"XHR",method:"POST",endpoint:this.endpoint,_noTruncate:!0,_batchKey:"sessionRecording",_metrics:{rrweb_full_snapshot:I.$snapshot_data.type===qb}})}}]),L}(),_u={entryType:0,timeOrigin:1,name:2,startTime:3,redirectStart:4,redirectEnd:5,workerStart:6,fetchStart:7,domainLookupStart:8,domainLookupEnd:9,connectStart:10,secureConnectionStart:11,connectEnd:12,requestStart:13,responseStart:14,responseEnd:15,decodedBodySize:16,encodedBodySize:17,initiatorType:18,nextHopProtocol:19,renderBlockingStatus:20,responseStatus:21,transferSize:22,element:23,renderTime:24,loadTime:25,size:26,id:27,url:28,domComplete:29,domContentLoadedEvent:30,domInteractive:31,loadEventEnd:32,loadEventStart:33,redirectCount:34,navigationType:35,unloadEventEnd:36,unloadEventStart:37,duration:39,timestamp:40},_T=["first-input","navigation","paint","resource"],wT=["/s/","/e/"],kT=function(){function L(I){Xo(this,L),yi(this,"_forceAllowLocalhost",!1),this.instance=I}return $o(L,[{key:"startObservingIfEnabled",value:function(){this.isEnabled()?this.startObserving():this.stopObserving()}},{key:"startObserving",value:function(){var I=this;if(!this.observer)if(!Yk.includes(location.hostname)||this._forceAllowLocalhost)try{this.observer=new PerformanceObserver(function(se){se.getEntries().forEach(function(Pe){I._capturePerformanceEvent(Pe)})});var K=PerformanceObserver.supportedEntryTypes.filter(function(se){return _T.includes(se)});K.forEach(function(se){var Pe;(Pe=I.observer)===null||Pe===void 0||Pe.observe({type:se,buffered:!0})})}catch(se){console.error("PostHog failed to start performance observer",se),this.stopObserving()}else Ra.log("PostHog Peformance observer not started because we are on localhost.")}},{key:"stopObserving",value:function(){this.observer&&(this.observer.disconnect(),this.observer=void 0)}},{key:"isObserving",value:function(){return!!this.observer}},{key:"isEnabled",value:function(){var I,K;return(I=(K=this.instance.get_config("capture_performance"))!==null&&K!==void 0?K:this.remoteEnabled)!==null&&I!==void 0&&I}},{key:"afterDecideResponse",value:function(I){this.remoteEnabled=I.capturePerformance||!1,this.isEnabled()&&this.startObserving()}},{key:"_capturePerformanceEvent",value:function(I){if(I.name.indexOf(this.instance.get_config("api_host"))===0){var K=I.name.replace(this.instance.get_config("api_host"),"");if(wT.find(function(h){return K.indexOf(h)===0}))return}var se={url:I.name},Pe=this.instance.get_config("session_recording");if(Pe.maskNetworkRequestFn&&(se=Pe.maskNetworkRequestFn(se)),se){var R=I.toJSON();R.name=se.url;var E={},e=Math.floor(Date.now()-performance.now());for(var _ in E[_u.timeOrigin]=e,E[_u.timestamp]=Math.floor(e+I.startTime),_u)R[_]!==void 0&&(E[_u[_]]=R[_]);if(this.capturePerformanceEvent(E),TT(I)){var k,i=Wc(I.serverTiming||[]);try{for(i.s();!(k=i.n()).done;){var w,v=k.value;this.capturePerformanceEvent((yi(w={},_u.timeOrigin,e),yi(w,_u.timestamp,Math.floor(e+I.startTime)),yi(w,_u.name,v.name),yi(w,_u.duration,v.duration),yi(w,_u.entryType,"serverTiming"),w))}}catch(h){i.e(h)}finally{i.f()}}}}},{key:"capturePerformanceEvent",value:function(I){var K,se=I[_u.timestamp];(K=this.instance.sessionRecording)===null||K===void 0||K.onRRwebEmit({type:6,data:{plugin:"posthog/network@1",payload:I},timestamp:se})}}]),L}(),TT=function(L){return L.entryType==="navigation"||L.entryType==="resource"},AT=function(){function L(I){Xo(this,L),this.instance=I,this.instance.decideEndpointWasHit=this.instance._hasBootstrappedFeatureFlags()}return $o(L,[{key:"call",value:function(){var I=this,K=B1(JSON.stringify({token:this.instance.get_config("token"),distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups(),person_properties:this.instance.get_property(_h),group_properties:this.instance.get_property(Ac)}));this.instance._send_request("".concat(this.instance.get_config("api_host"),"/decide/?v=3"),{data:K,verbose:!0},{method:"POST"},function(se){return I.parseDecideResponse(se)})}},{key:"parseDecideResponse",value:function(I){var K,se,Pe=this;if((I==null?void 0:I.status)!==0){if(this.instance.decideEndpointWasHit=!0,!document||!document.body)return console.log("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(function(){Pe.parseDecideResponse(I)},500);if(this.instance.toolbar.afterDecideResponse(I),(K=this.instance.sessionRecording)===null||K===void 0||K.afterDecideResponse(I),Ec.afterDecideResponse(I,this.instance),(se=this.instance.webPerformance)===null||se===void 0||se.afterDecideResponse(I),this.instance.featureFlags.receivedFeatureFlags(I),this.instance.compression={},I.supportedCompression&&!this.instance.get_config("disable_compression")){var R,E={},e=Wc(I.supportedCompression);try{for(e.s();!(R=e.n()).done;)E[R.value]=!0}catch(v){e.e(v)}finally{e.f()}this.instance.compression=E}if(I.siteApps)if(this.instance.get_config("opt_in_site_apps")){var _,k=this.instance.get_config("api_host"),i=Wc(I.siteApps);try{var w=function(){var v=_.value,h=v.id,s=v.url,t=[k,k[k.length-1]==="/"&&s[0]==="/"?s.substring(1):s].join("");window["__$$ph_site_app_".concat(h)]=Pe.instance,Ay(t,function(a){a&&console.error("Error while initializing PostHog app with config id ".concat(h),a)})};for(i.s();!(_=i.n()).done;)w()}catch(v){i.e(v)}finally{i.f()}}else I.siteApps.length>0&&console.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}else console.error("Failed to fetch feature flags from PostHog.")}}]),L}(),MT=["https://app.posthog.com","https://eu.posthog.com"],ST=["source"],ET=function(){function L(I){Xo(this,L),this.instance=I}return $o(L,[{key:"afterDecideResponse",value:function(I){var K=I.toolbarParams||I.editorParams||(I.toolbarVersion?{toolbarVersion:I.toolbarVersion}:{});I.isAuthenticated&&K.toolbarVersion&&K.toolbarVersion.indexOf("toolbar")===0&&this.loadToolbar(hi({},K))}},{key:"maybeLoadToolbar",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.location,K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,se=arguments.length>2&&arguments[2]!==void 0?arguments[2]:window.history;try{if(!K){try{window.localStorage.setItem("test","test"),window.localStorage.removeItem("test")}catch{return!1}K=window.localStorage}var Pe,R=Ib(I.hash,"__posthog")||Ib(I.hash,"state"),E=R?JSON.parse(decodeURIComponent(R)):null;return E&&E.action==="ph_authorize"?((Pe=E).source="url",Pe&&Object.keys(Pe).length>0&&(E.desiredHash?I.hash=E.desiredHash:se?se.replaceState("",document.title,I.pathname+I.search):I.hash="")):((Pe=JSON.parse(K.getItem("_postHogToolbarParams")||"{}")).source="localstorage",delete Pe.userIntent),!(!Pe.token||this.instance.get_config("token")!==Pe.token)&&(this.loadToolbar(Pe),!0)}catch{return!1}}},{key:"loadToolbar",value:function(I){var K=this;if(window._postHogToolbarLoaded)return!1;window._postHogToolbarLoaded=!0;var se=this.instance.get_config("api_host"),Pe=3e4*Math.floor(Date.now()/3e4),R="".concat(se).concat(se.endsWith("/")?"":"/","static/toolbar.js?_ts=").concat(Pe),E=!MT.includes(this.instance.get_config("api_host"))&&this.instance.get_config("advanced_disable_toolbar_metrics"),e=hi(hi({token:this.instance.get_config("token")},I),{},{apiURL:se},E?{instrument:!1}:{});e.source;var _=Gk(e,ST);return window.localStorage.setItem("_postHogToolbarParams",JSON.stringify(_)),Ay(R,function(k){k?Ra.error("Failed to load toolbar",k):(window.ph_load_toolbar||window.ph_load_editor)(e,K.instance)}),Up(window,"turbolinks:load",function(){window._postHogToolbarLoaded=!1,K.loadToolbar(e)}),!0}},{key:"_loadEditor",value:function(I){return this.loadToolbar(I)}},{key:"maybeLoadEditor",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.location,K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,se=arguments.length>2&&arguments[2]!==void 0?arguments[2]:window.history;return this.maybeLoadToolbar(I,K,se)}}]),L}(),$w=function(){function L(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:3e3;Xo(this,L),this.isPolling=!0,this._event_queue=[],this._empty_queue_count=0,this._poller=void 0,this._pollInterval=I}return $o(L,[{key:"setPollInterval",value:function(I){this._pollInterval=I,this.isPolling&&this.poll()}},{key:"poll",value:function(){}},{key:"unload",value:function(){}},{key:"getTime",value:function(){return new Date().getTime()}}]),L}(),CT=function(L){Rw(K,$w);var I=zw(K);function K(se,Pe){var R,E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:3e3;return Xo(this,K),(R=I.call(this,E)).handlePollRequest=Pe,R.captureMetrics=se,R}return $o(K,[{key:"enqueue",value:function(se,Pe,R){this.captureMetrics.incr("batch-enqueue"),this._event_queue.push({url:se,data:Pe,options:R}),this.isPolling||(this.isPolling=!0,this.poll())}},{key:"poll",value:function(){var se=this;clearTimeout(this._poller),this._poller=setTimeout(function(){if(se._event_queue.length>0){var Pe=se.formatQueue(),R=function(e){var _=Pe[e],k=_.url,i=_.data,w=_.options;ji(i,function(v,h){i[h].offset=Math.abs(i[h].timestamp-se.getTime()),delete i[h].timestamp}),se.handlePollRequest(k,i,w),se.captureMetrics.incr("batch-requests"),se.captureMetrics.incr("batch-requests-".concat(k.slice(k.length-2))),se.captureMetrics.incr("batch-handle",i.length),se.captureMetrics.incr("batch-handle-".concat(k.slice(k.length-2)),i.length)};for(var E in Pe)R(E);se._event_queue.length=0,se._empty_queue_count=0}else se._empty_queue_count++;se._empty_queue_count>4&&(se.isPolling=!1,se._empty_queue_count=0),se.isPolling&&se.poll()},this._pollInterval)}},{key:"updateUnloadMetrics",value:function(){var se=this.formatQueue();for(var Pe in se){var R=se[Pe],E=R.url,e=R.data;this.captureMetrics.incr("batch-unload-requests"),this.captureMetrics.incr("batch-unload-requests-".concat(E.slice(E.length-2))),this.captureMetrics.incr("batch-unload",e.length),this.captureMetrics.incr("batch-unload-".concat(E.slice(E.length-2)),e.length)}}},{key:"unload",value:function(){var se=this;clearTimeout(this._poller);var Pe=this._event_queue.length>0?this.formatQueue():{};this._event_queue.length=0;var R=Object.values(Pe);[].concat(sm(R.filter(function(E){return E.url.indexOf("/e")===0})),sm(R.filter(function(E){return E.url.indexOf("/e")!==0}))).map(function(E){var e=E.url,_=E.data,k=E.options;se.handlePollRequest(e,_,hi(hi({},k),{},{transport:"sendBeacon"}))})}},{key:"formatQueue",value:function(){var se={};return ji(this._event_queue,function(Pe){var R=Pe.url,E=Pe.data,e=Pe.options,_=(e?e._batchKey:null)||R;se[_]===void 0&&(se[_]={data:[],url:R,options:e}),e&&se[_].options&&se[_].options._metrics&&!se[_].options._metrics.rrweb_full_snapshot&&(se[_].options._metrics.rrweb_full_snapshot=e._metrics.rrweb_full_snapshot),se[_].data.push(E)}),se}}]),K}(),LT=function(){function L(I){Xo(this,L),this.enabled=I,this.metrics={}}return $o(L,[{key:"incr",value:function(I){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.enabled&&(I="phjs-".concat(I),this.metrics[I]=(this.metrics[I]||0)+K)}},{key:"decr",value:function(I){this.enabled&&(I="phjs-".concat(I),this.metrics[I]=(this.metrics[I]||0)-1)}}]),L}(),hl=Uint8Array,gs=Uint16Array,Dh=Uint32Array,Ey=new hl([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Cy=new hl([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Gb=new hl([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Kw=function(L,I){for(var K=new gs(31),se=0;se<31;++se)K[se]=I+=1<>>1|(21845&ha)<<1;ff=(61680&(ff=(52428&ff)>>>2|(13107&ff)<<2))>>>4|(3855&ff)<<4,mm[ha]=((65280&ff)>>>8|(255&ff)<<8)>>>1}var Vp=function(L,I,K){for(var se=L.length,Pe=0,R=new gs(I);Pe>>_]=k}else for(E=new gs(se),Pe=0;Pe>>15-L[Pe];return E},Cf=new hl(288);for(ha=0;ha<144;++ha)Cf[ha]=8;for(ha=144;ha<256;++ha)Cf[ha]=9;for(ha=256;ha<280;++ha)Cf[ha]=7;for(ha=280;ha<288;++ha)Cf[ha]=8;var x1=new hl(32);for(ha=0;ha<32;++ha)x1[ha]=5;var eu,OT=Vp(Cf,9,0),IT=Vp(x1,5,0),Qw=function(L){return(L/8>>0)+(7&L&&1)},e5=function(L,I,K){(I==null||I<0)&&(I=0),(K==null||K>L.length)&&(K=L.length);var se=new(L instanceof gs?gs:L instanceof Dh?Dh:hl)(K-I);return se.set(L.subarray(I,K)),se},qu=function(L,I,K){K<<=7&I;var se=I/8>>0;L[se]|=K,L[se+1]|=K>>>8},Ap=function(L,I,K){K<<=7&I;var se=I/8>>0;L[se]|=K,L[se+1]|=K>>>8,L[se+2]|=K>>>16},iv=function(L,I){for(var K=[],se=0;sev&&(v=R[se].s);var h=new gs(v+1),s=RT(K[i-1],h,0);if(s>I){se=0;var t=0,a=s-I,r=1<I))break;t+=r-(1<>>=a;t>0;){var o=R[se].s;h[o]=0&&t;--se){var l=R[se].s;h[l]==I&&(--h[l],++t)}s=I}return[new hl(h),s]},RT=function L(I,K,se){return I.s==-1?Math.max(L(I.l,K,se+1),L(I.r,K,se+1)):K[I.s]=se},Zb=function(L){for(var I=L.length;I&&!L[--I];);for(var K=new gs(++I),se=0,Pe=L[0],R=1,E=function(_){K[se++]=_},e=1;e<=I;++e)if(L[e]==Pe&&e!=I)++R;else{if(!Pe&&R>2){for(;R>138;R-=138)E(32754);R>2&&(E(R>10?R-11<<5|28690:R-3<<5|12305),R=0)}else if(R>3){for(E(Pe),--R;R>6;R-=6)E(8304);R>2&&(E(R-3<<5|8208),R=0)}for(;R--;)E(Pe);R=1,Pe=L[e]}return[K.subarray(0,se),I]},Mp=function(L,I){for(var K=0,se=0;se>>8,L[Pe+2]=255^L[Pe],L[Pe+3]=255^L[Pe+1];for(var R=0;R4&&!f[Gb[y-1]];--y);var m,T,p,M,A=k+5<<3,C=Mp(Pe,Cf)+Mp(R,x1)+E,P=Mp(Pe,v)+Mp(R,t)+E+14+3*y+Mp(c,f)+(2*c[16]+3*c[17]+7*c[18]);if(A<=C&&A<=P)return V0(I,i,L.subarray(_,_+k));if(qu(I,i,1+(P15&&(qu(I,i,Y[b]>>>5&127),i+=Y[b]>>>12)}}}else m=OT,T=Cf,p=IT,M=x1;for(b=0;b255){D=se[b]>>>18&31,Ap(I,i,m[D+257]),i+=T[D+257],D>7&&(qu(I,i,se[b]>>>23&31),i+=Ey[D]);var G=31&se[b];Ap(I,i,p[G]),i+=M[G],G>3&&(Ap(I,i,se[b]>>>5&8191),i+=Cy[G])}else Ap(I,i,m[se[b]]),i+=T[se[b]];return Ap(I,i,m[256]),i+T[256]},zT=new Dh([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),DT=new hl(0),FT=function(){for(var L=new Dh(256),I=0;I<256;++I){for(var K=I,se=9;--se;)K=(1&K&&3988292384)^K>>>1;L[I]=K}return L}(),BT=function(){var L=4294967295;return{p:function(I){for(var K=L,se=0;se>>8;L=K},d:function(){return 4294967295^L}}},NT=function(L,I,K,se,Pe){return function(R,E,e,_,k,i){var w=R.length,v=new hl(_+w+5*(1+Math.floor(w/7e3))+k),h=v.subarray(_,v.length-k),s=0;if(!E||w<8)for(var t=0;t<=w;t+=65535){var a=t+65535;a>>13,o=8191&r,l=(1<7e3||p>24576)&&z>423){s=Yb(R,h,0,f,x,y,T,p,A,t-A,s),p=m=T=0,A=t;for(var B=0;B<286;++B)x[B]=0;for(B=0;B<30;++B)y[B]=0}var Y=2,D=0,G=o,U=P-O&32767;if(z>2&&C==g(t-U))for(var j=Math.min(n,z)-1,W=Math.min(32767,t),Z=Math.min(258,z);U<=W&&--G&&P!=O;){if(R[t+Y]==R[t+Y-U]){for(var ie=0;ieY){if(Y=ie,D=U,ie>j)break;var te=Math.min(U,ie-2),J=0;for(B=0;BJ&&(J=ee,O=X)}}}U+=(P=O)-(O=u[P])+32768&32767}if(D){f[p++]=268435456|vm[Y]<<18|Wb[D];var re=31&vm[Y],oe=31&Wb[D];T+=Ey[re]+Cy[oe],++x[257+re],++y[oe],M=t+Y,++m}else f[p++]=R[t],++x[R[t]]}}s=Yb(R,h,i,f,x,y,T,p,A,t-A,s),i||(s=V0(h,s,DT))}return e5(v,0,_+Qw(s)+k)}(L,I.level==null?6:I.level,I.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(L.length)))):12+I.mem,K,se,!Pe)},ym=function(L,I,K){for(;K;++I)L[I]=K,K>>>=8},jT=function(L,I){var K=I.filename;if(L[0]=31,L[1]=139,L[2]=8,L[8]=I.level<2?4:I.level==9?2:0,L[9]=3,I.mtime!=0&&ym(L,4,Math.floor(new Date(I.mtime||Date.now())/1e3)),K){L[3]=8;for(var se=0;se<=K.length;++se)L[se+10]=K.charCodeAt(se)}},UT=function(L){return 10+(L.filename&&L.filename.length+1||0)};function VT(L,I){I===void 0&&(I={});var K=BT(),se=L.length;K.p(L);var Pe=NT(L,I,UT(I),8),R=Pe.length;return jT(Pe,I),ym(Pe,R-8,K.d()),ym(Pe,R-4,se),Pe}function HT(L,I){var K=L.length;if(!I&&typeof TextEncoder<"u")return new TextEncoder().encode(L);for(var se=new hl(L.length+(L.length>>>1)),Pe=0,R=function(k){se[Pe++]=k},E=0;Ese.length){var e=new hl(Pe+8+(K-E<<1));e.set(se),se=e}var _=L.charCodeAt(E);_<128||I?R(_):_<2048?(R(192|_>>>6),R(128|63&_)):_>55295&&_<57344?(R(240|(_=65536+(1047552&_)|1023&L.charCodeAt(++E))>>>18),R(128|_>>>12&63),R(128|_>>>6&63),R(128|63&_)):(R(224|_>>>12),R(128|_>>>6&63),R(128|63&_))}return e5(se,0,Pe)}(function(L){L.GZipJS="gzip-js",L.LZ64="lz64",L.Base64="base64"})(eu||(eu={}));var od,Ly,Co,qT=function(L,I,K){var se=I||{};se.ip=K.ip?1:0,se._=new Date().getTime().toString(),se.ver=Cu.LIB_VERSION;var Pe=L.split("?");if(Pe.length>1){var R,E=Wc(Pe[1].split("&"));try{for(E.s();!(R=E.n()).done;){var e=R.value.split("=")[0];se[e]&&delete se[e]}}catch(k){E.e(k)}finally{E.f()}}var _=L.indexOf("?")>-1?"&":"?";return L+_+function(k){var i,w,v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"&",h=[];return ji(k,function(s,t){i=encodeURIComponent(s.toString()),w=encodeURIComponent(t),h[h.length]=w+"="+i}),h.join(v)}(se)},Py=function L(I,K){if(K.blob&&I.buffer)return new Blob([I.buffer],{type:"text/plain"});if(K.sendBeacon||K.blob){var se=L(I,{method:"POST"});return new Blob([se],{type:"application/x-www-form-urlencoded"})}if(K.method!=="POST")return null;var Pe,R;return Pe=Array.isArray(I)||(R=I,Object.prototype.toString.call(R)==="[object Uint8Array]")?"data="+encodeURIComponent(I):"data="+encodeURIComponent(I.data),"compression"in I&&I.compression&&(Pe+="&compression="+I.compression),Pe},t5=function(L){var I=L.url,K=L.data,se=L.headers,Pe=L.options,R=L.captureMetrics,E=L.callback,e=L.retriesPerformedSoFar,_=L.retryQueue,k=L.onXHRError,i=L.timeout,w=i===void 0?1e4:i,v=new XMLHttpRequest;v.open(Pe.method||"GET",I,!0);var h=Py(K,Pe);R.incr("_send_request"),R.incr("_send_request_inflight"),ji(se,function(s,t){v.setRequestHeader(t,s)}),Pe.method!=="POST"||Pe.blob||v.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),v.timeout=w,v.withCredentials=!0,v.onreadystatechange=function(){if(v.readyState===4)if(R.incr("xhr-response"),R.incr("xhr-response-".concat(v.status)),R.decr("_send_request_inflight"),v.status===200){if(E){var s;try{s=JSON.parse(v.responseText)}catch(t){return void Ra.error(t)}E(s)}}else typeof k=="function"&&k(v),[401,403,404,500].indexOf(v.status)<0&&_.enqueue({url:I,data:K,options:Pe,headers:se,retriesPerformedSoFar:(e||0)+1,callback:E}),E&&E({status:0})},v.send(h)},GT=function(L){Rw(K,$w);var I=zw(K);function K(se,Pe){var R;return Xo(this,K),(R=I.call(this)).captureMetrics=se,R.isPolling=!1,R.queue=[],R.areWeOnline=!0,R.onXHRError=Pe,typeof window<"u"&&"onLine"in window.navigator&&(R.areWeOnline=window.navigator.onLine,window.addEventListener("online",function(){R._handleWeAreNowOnline()}),window.addEventListener("offline",function(){R.areWeOnline=!1})),R}return $o(K,[{key:"enqueue",value:function(se){var Pe=se.retriesPerformedSoFar||0;if(!(Pe>=10)){var R=3e3*Math.pow(2,Pe),E=new Date(Date.now()+R);console.warn("Enqueued failed request for retry in ".concat(R)),this.queue.push({retryAt:E,requestData:se}),this.isPolling||(this.isPolling=!0,this.poll())}}},{key:"poll",value:function(){var se=this;this._poller&&clearTimeout(this._poller),this._poller=setTimeout(function(){se.areWeOnline&&se.queue.length>0&&se.flush(),se.poll()},this._pollInterval)}},{key:"flush",value:function(){var se=new Date(Date.now()),Pe=this.queue.filter(function(_){return _.retryAt0){this.queue=this.queue.filter(function(_){return _.retryAt>=se});var R,E=Wc(Pe);try{for(E.s();!(R=E.n()).done;){var e=R.value.requestData;this._executeXhrRequest(e)}}catch(_){E.e(_)}finally{E.f()}}}},{key:"unload",value:function(){this._poller&&(clearTimeout(this._poller),this._poller=void 0);var se,Pe=Wc(this.queue);try{for(Pe.s();!(se=Pe.n()).done;){var R=se.value.requestData,E=R.url,e=R.data,_=R.options;try{window.navigator.sendBeacon(E,Py(e,hi(hi({},_),{},{sendBeacon:!0})))}catch(k){Cu.DEBUG&&console.error(k)}}}catch(k){Pe.e(k)}finally{Pe.f()}this.queue=[]}},{key:"_executeXhrRequest",value:function(se){var Pe=se.url,R=se.data,E=se.options,e=se.headers,_=se.callback,k=se.retriesPerformedSoFar;t5({url:Pe,data:R||{},options:E||{},headers:e||{},retriesPerformedSoFar:k||0,callback:_,captureMetrics:this.captureMetrics,retryQueue:this,onXHRError:this.onXHRError})}},{key:"_handleWeAreNowOnline",value:function(){this.areWeOnline=!0,this.flush()}}]),K}(),WT=18e5,ZT=864e5,YT=function(){function L(I,K){Xo(this,L),this.config=I,this.persistence=K,this._windowId=void 0,this._sessionId=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null;var se=I.persistence_name||I.token;if(this.window_id_storage_key="ph_"+se+"_window_id",this.primary_window_exists_storage_key="ph_"+se+"_primary_window_exists",this._canUseSessionStorage()){var Pe=Lo.parse(this.window_id_storage_key),R=Lo.parse(this.primary_window_exists_storage_key);Pe&&!R?this._windowId=Pe:Lo.remove(this.window_id_storage_key),Lo.set(this.primary_window_exists_storage_key,!0)}this._listenToReloadWindow()}return $o(L,[{key:"_canUseSessionStorage",value:function(){return this.config.persistence!=="memory"&&!this.persistence.disabled&&Lo.is_supported()}},{key:"_setWindowId",value:function(I){I!==this._windowId&&(this._windowId=I,this._canUseSessionStorage()&&Lo.set(this.window_id_storage_key,I))}},{key:"_getWindowId",value:function(){return this._windowId?this._windowId:this._canUseSessionStorage()?Lo.parse(this.window_id_storage_key):null}},{key:"_setSessionId",value:function(I,K,se){I===this._sessionId&&K===this._sessionActivityTimestamp&&se===this._sessionStartTimestamp||(this._sessionStartTimestamp=se,this._sessionActivityTimestamp=K,this._sessionId=I,this.persistence.register(yi({},pm,[K,I,se])))}},{key:"_getSessionId",value:function(){if(this._sessionId&&this._sessionActivityTimestamp&&this._sessionStartTimestamp)return[this._sessionActivityTimestamp,this._sessionId,this._sessionStartTimestamp];var I=this.persistence.props[pm];return Array.isArray(I)&&I.length===2&&I.push(I[0]),I||[0,null,0]}},{key:"resetSessionId",value:function(){this._setSessionId(null,null,null)}},{key:"_listenToReloadWindow",value:function(){var I=this;window.addEventListener("beforeunload",function(){I._canUseSessionStorage()&&Lo.remove(I.primary_window_exists_storage_key)})}},{key:"checkAndGetSessionAndWindowId",value:function(){var I=arguments.length>0&&arguments[0]!==void 0&&arguments[0],K=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:null)||new Date().getTime(),se=D1(this._getSessionId(),3),Pe=se[0],R=se[1],E=se[2],e=this._getWindowId(),_=E&&E>0&&Math.abs(K-E)>ZT;!R||!I&&Math.abs(K-Pe)>WT||_?(R=Hc(),e=Hc(),E=K):e||(e=Hc());var k=Pe===0||!I||_?K:Pe,i=E===0?new Date().getTime():E;return this._setWindowId(e),this._setSessionId(R,k,i),{sessionId:R,windowId:e}}}]),L}(),XT=$o(function L(I,K,se,Pe){Xo(this,L),this.name="posthog-js",this.setupOnce=function(R){R(function(E){var e,_,k;if(E.level!=="error"||!I.__loaded)return E;E.tags||(E.tags={});var i=I.config.ui_host||I.config.api_host;E.tags["PostHog Person URL"]=i+"/person/"+I.get_distinct_id(),I.sessionRecordingStarted()&&(E.tags["PostHog Recording URL"]=i+"/recordings/"+I.sessionManager.checkAndGetSessionAndWindowId(!0).sessionId);var w=((e=E.exception)===null||e===void 0?void 0:e.values)||[],v={$sentry_event_id:E.event_id,$sentry_exception:E.exception,$sentry_exception_message:(_=w[0])===null||_===void 0?void 0:_.value,$sentry_exception_type:(k=w[0])===null||k===void 0?void 0:k.type,$sentry_tags:E.tags};return K&&se&&(v.$sentry_url=(Pe||"https://sentry.io/organizations/")+K+"/issues/?project="+se+"&query="+E.event_id),I.capture("$exception",v),E})}}),$T=function(L){var I=function(K,se){K.event.userId||K.event.anonymousId===L.get_distinct_id()||L.reset(),K.event.userId&&K.event.userId!==L.get_distinct_id()&&(L.register({distinct_id:K.event.userId}),L.reloadFeatureFlags());var Pe=L._calculate_event_properties(se,K.event.properties);return K.event.properties=Object.assign({},Pe,K.event.properties),K};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:function(K){return I(K,K.event.event)},page:function(K){return I(K,"$pageview")},identify:function(K){return I(K,"$identify")},screen:function(K){return I(K,"$screen")}}},KT=function(){function L(){Xo(this,L),yi(this,"_seenFirstPageView",!1)}return $o(L,[{key:"onPageview",value:function(){this._seenFirstPageView&&(this._pageViewId=Hc()),this._seenFirstPageView=!0}},{key:"getPageViewId",value:function(){return this._pageViewId||(this._pageViewId=Hc()),this._pageViewId}}]),L}();(function(L){L[L.INIT_MODULE=0]="INIT_MODULE",L[L.INIT_SNIPPET=1]="INIT_SNIPPET"})(od||(od={}));var xm=function(){},w0={},Bs="posthog",H0=ai.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,n5=!H0&&Cl.indexOf("MSIE")===-1&&Cl.indexOf("Mozilla")===-1,Xb=function(){var L,I,K;return{api_host:"https://app.posthog.com",api_method:"POST",api_transport:"XHR",ui_host:null,token:"",autocapture:!0,rageclick:!0,cross_subdomain_cookie:(ja==null||(L=ja.location)===null||L===void 0||(I=L.hostname)===null||I===void 0?void 0:I.indexOf("herokuapp.com"))===-1,persistence:"cookie",persistence_name:"",cookie_name:"",loaded:xm,store_google:!0,custom_campaign_params:[],save_referrer:!0,test:!1,verbose:!1,img:!1,capture_pageview:!0,capture_pageleave:!0,debug:!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_cookie:!1,enable_recording_console_log:void 0,secure_cookie:(ai==null||(K=ai.location)===null||K===void 0?void 0:K.protocol)==="https:",ip:!0,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_capturing_persistence_type:"localStorage",opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_blacklist:[],respect_dnt:!1,sanitize_properties:null,xhr_headers:{},inapp_protocol:"//",inapp_link_new_window:!1,request_batching:!0,properties_string_max_length:65535,session_recording:{blockClass:"ph-no-capture",blockSelector:null,ignoreClass:"ph-ignore-input",maskAllInputs:!0,maskInputOptions:{},maskInputFn:null,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0},mask_all_element_attributes:!1,mask_all_text:!1,advanced_disable_decide:!1,advanced_disable_toolbar_metrics:!1,on_xhr_error:function(se){var Pe="Bad HTTP status: "+se.status+" "+se.statusText;console.error(Pe)},get_device_id:function(se){return se},_onCapture:xm,_capture_metrics:!1,capture_performance:void 0,name:"posthog",callback_fn:"posthog._jsc",bootstrap:{},disable_compression:!1}},bm=function(L,I,K,se){var Pe,R=K!==Bs&&Co?K?Co[K]:void 0:Co,E={initComplete:!1,syncCode:!1},e=function(_){return function(k){E[_]||(E[_]=!0,E.initComplete&&E.syncCode&&(se==null||se(k)))}};if(R&&Ly===od.INIT_MODULE)Pe=R;else{if(R&&!Yu(R))return void console.error("You have already initialized "+K);Pe=new Oy}return Pe._init(L,I,K,e("initComplete")),Pe.toolbar.maybeLoadToolbar(),Pe.sessionRecording=new bT(Pe),Pe.sessionRecording.startRecordingIfEnabled(),Pe.webPerformance=new kT(Pe),Pe.webPerformance.startObservingIfEnabled(),Pe.__autocapture=Pe.get_config("autocapture"),Ec._setIsAutocaptureEnabled(Pe),Ec._isAutocaptureEnabled&&(Pe.__autocapture=Pe.get_config("autocapture"),Ec.enabledForProject(Pe.get_config("token"),100,100)?Ec.isBrowserSupported()?Ec.init(Pe):(Pe.__autocapture=!1,Ra.log("Disabling Automatic Event Collection because this browser is not supported")):(Pe.__autocapture=!1,Ra.log("Not in active bucket: disabling Automatic Event Collection."))),Cu.DEBUG=Cu.DEBUG||Pe.get_config("debug"),R!==void 0&&Yu(R)&&(Pe._execute_array.call(Pe.people,R.people),Pe._execute_array(R)),e("syncCode")(Pe),Pe},Oy=function(){function L(){var I=this;Xo(this,L),this.config=Xb(),this.compression={},this.decideEndpointWasHit=!1,this.SentryIntegration=XT,this.segmentIntegration=function(){return $T(I)},this.__captureHooks=[],this.__request_queue=[],this.__loaded=!1,this.__loaded_recorder_version=void 0,this.__autocapture=void 0,this._jsc=function(){},this.people=new hT(this),this.featureFlags=new pT(this),this.feature_flags=this.featureFlags,this.toolbar=new ET(this),this.pageViewIdManager=new KT,this._captureMetrics=void 0,this._requestQueue=void 0,this._retryQueue=void 0,this.persistence=void 0,this.sessionPersistence=void 0,this.sessionManager=void 0}return $o(L,[{key:"init",value:function(I,K,se){if(iu(se))console.error("You must name your new library: init(token, config, name)");else{if(se!==Bs){var Pe=bm(I,K,se,function(R){Co[se]=R,R._loaded()});return Co[se]=Pe,Pe}console.error("You must initialize the main posthog object right after you include the PostHog js snippet")}}},{key:"_init",value:function(I){var K,se,Pe=this,R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},E=arguments.length>2?arguments[2]:void 0,e=arguments.length>3?arguments[3]:void 0;this.__loaded=!0,this.config={},this._triggered_notifs=[];var _,k={segmentRegister:!1,syncCode:!1},i=function(l){return function(){k[l]||(k[l]=!0,k.segmentRegister&&k.syncCode&&(e==null||e(Pe)))}};if(this.set_config(Eo({},Xb(),R,{name:E,token:I,callback_fn:(E===Bs?E:Bs+"."+E)+"._jsc"})),this._jsc=function(){},(ai!=null&&(K=ai.rrweb)!==null&&K!==void 0&&K.record||ai!=null&&ai.rrwebRecord)&&(this.__loaded_recorder_version=ai==null||(_=ai.rrweb)===null||_===void 0?void 0:_.version),this._captureMetrics=new LT(this.get_config("_capture_metrics")),this._requestQueue=new CT(this._captureMetrics,this._handle_queued_event.bind(this)),this._retryQueue=new GT(this._captureMetrics,this.get_config("on_xhr_error")),this.__captureHooks=[],this.__request_queue=[],this.persistence=new jb(this.config),this.sessionManager=new YT(this.config,this.persistence),this.sessionPersistence=this.config.persistence==="sessionStorage"?this.persistence:new jb(hi(hi({},this.config),{},{persistence:"sessionStorage"})),this._gdpr_init(),R.segment?(this.config.get_device_id=function(){return R.segment.user().anonymousId()},R.segment.user().id()&&(this.register({distinct_id:R.segment.user().id()}),this.persistence.set_user_state("identified")),R.segment.register(this.segmentIntegration()).then(i("segmentRegister"))):i("segmentRegister")(),((se=R.bootstrap)===null||se===void 0?void 0:se.distinctID)!==void 0){var w,v,h=this.get_config("get_device_id")(Hc()),s=(w=R.bootstrap)!==null&&w!==void 0&&w.isIdentifiedID?h:R.bootstrap.distinctID;this.persistence.set_user_state((v=R.bootstrap)!==null&&v!==void 0&&v.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:R.bootstrap.distinctID,$device_id:s})}if(this._hasBootstrappedFeatureFlags()){var t,a,r=Object.keys(((t=R.bootstrap)===null||t===void 0?void 0:t.featureFlags)||{}).filter(function(l){var u,d;return!((u=R.bootstrap)===null||u===void 0||(d=u.featureFlags)===null||d===void 0||!d[l])}).reduce(function(l,u){var d,c;return l[u]=((d=R.bootstrap)===null||d===void 0||(c=d.featureFlags)===null||c===void 0?void 0:c[u])||!1,l},{}),n=Object.keys(((a=R.bootstrap)===null||a===void 0?void 0:a.featureFlagPayloads)||{}).filter(function(l){return r[l]}).reduce(function(l,u){var d,c,b,g;return(d=R.bootstrap)!==null&&d!==void 0&&(c=d.featureFlagPayloads)!==null&&c!==void 0&&c[u]&&(l[u]=(b=R.bootstrap)===null||b===void 0||(g=b.featureFlagPayloads)===null||g===void 0?void 0:g[u]),l},{});this.featureFlags.receivedFeatureFlags({featureFlags:r,featureFlagPayloads:n})}if(!this.get_distinct_id()){var o=this.get_config("get_device_id")(Hc());this.register_once({distinct_id:o,$device_id:o},""),this.persistence.set_user_state("anonymous")}ai.addEventListener&&ai.addEventListener("onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this)),i("syncCode")()}},{key:"_loaded",value:function(){this.featureFlags.setReloadingPaused(!0);try{this.get_config("loaded")(this)}catch(I){console.error("`loaded` function failed",I)}this._start_queue_if_opted_in(),this.get_config("capture_pageview")&&this.capture("$pageview",{},{send_instantly:!0}),this.get_config("advanced_disable_decide")||new AT(this).call(),this.featureFlags.resetRequestQueue(),this.featureFlags.setReloadingPaused(!1)}},{key:"_start_queue_if_opted_in",value:function(){this.has_opted_out_capturing()||this.get_config("request_batching")&&this._requestQueue.poll()}},{key:"_dom_loaded",value:function(){var I=this;this.has_opted_out_capturing()||Ju(this.__request_queue,function(K){I._send_request.apply(I,sm(K))}),this.__request_queue=[],this._start_queue_if_opted_in()}},{key:"_prepare_callback",value:function(I,K){if(iu(I))return null;if(H0)return function(E){I(E,K)};var se=this._jsc,Pe=""+Math.floor(1e8*Math.random()),R=this.get_config("callback_fn")+"["+Pe+"]";return se[Pe]=function(E){delete se[Pe],I(E,K)},R}},{key:"_handle_unload",value:function(){this.get_config("request_batching")?(this.get_config("capture_pageview")&&this.get_config("capture_pageleave")&&this.capture("$pageleave"),this.get_config("_capture_metrics")&&(this._requestQueue.updateUnloadMetrics(),this.capture("$capture_metrics",this._captureMetrics.metrics)),this._requestQueue.unload(),this._retryQueue.unload()):this.get_config("capture_pageview")&&this.get_config("capture_pageleave")&&this.capture("$pageleave",null,{transport:"sendBeacon"})}},{key:"_handle_queued_event",value:function(I,K,se){var Pe=JSON.stringify(K);this.__compress_and_send_json_request(I,Pe,se||w0,xm)}},{key:"__compress_and_send_json_request",value:function(I,K,se,Pe){var R,E=function(i,w,v){return i===eu.LZ64?[{data:ll.compressToBase64(w),compression:eu.LZ64},v]:i===eu.GZipJS?[VT(HT(w),{mtime:0}),hi(hi({},v),{},{blob:!0,urlQueryArgs:{compression:eu.GZipJS}})]:[{data:B1(w)},v]}((R=this.compression)[eu.GZipJS]?eu.GZipJS:R[eu.LZ64]?eu.LZ64:eu.Base64,K,se),e=D1(E,2),_=e[0],k=e[1];this._send_request(I,_,k,Pe)}},{key:"_send_request",value:function(I,K,se,Pe){if(n5)this.__request_queue.push([I,K,se,Pe]);else{var R={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")};se=Eo(R,se||{}),H0||(se.method="GET");var E="sendBeacon"in ai.navigator&&se.transport==="sendBeacon";if(I=qT(I,se.urlQueryArgs||{},{ip:this.get_config("ip")}),Vc(K)&&this.get_config("img")){var e=ja.createElement("img");e.src=I,ja.body.appendChild(e)}else if(E)try{ai.navigator.sendBeacon(I,Py(K,hi(hi({},se),{},{sendBeacon:!0})))}catch(w){this.get_config("debug")&&console.error(w)}else if(H0)try{t5({url:I,data:K,headers:this.get_config("xhr_headers"),options:se,captureMetrics:this._captureMetrics,callback:Pe,retriesPerformedSoFar:0,retryQueue:this._retryQueue,onXHRError:this.get_config("on_xhr_error")})}catch(w){console.error(w)}else{var _,k=ja.createElement("script");k.type="text/javascript",k.async=!0,k.defer=!0,k.src=I;var i=ja.getElementsByTagName("script")[0];(_=i.parentNode)===null||_===void 0||_.insertBefore(k,i)}}}},{key:"_execute_array",value:function(I){var K,se=this,Pe=[],R=[],E=[];Ju(I,function(_){_&&(K=_[0],Yu(K)?E.push(_):typeof _=="function"?_.call(se):Yu(_)&&K==="alias"?Pe.push(_):Yu(_)&&K.indexOf("capture")!==-1&&typeof se[K]=="function"?E.push(_):R.push(_))});var e=function(_,k){Ju(_,function(i){if(Yu(i[0])){var w=k;ji(i,function(v){w=w[v[0]].apply(w,v.slice(1))})}else this[i[0]].apply(this,i.slice(1))},k)};e(Pe,this),e(R,this),e(E,this)}},{key:"_hasBootstrappedFeatureFlags",value:function(){var I,K;return((I=this.config.bootstrap)===null||I===void 0?void 0:I.featureFlags)&&Object.keys((K=this.config.bootstrap)===null||K===void 0?void 0:K.featureFlags).length>0||!1}},{key:"push",value:function(I){this._execute_array([I])}},{key:"capture",value:function(I,K){var se=arguments.length>2&&arguments[2]!==void 0?arguments[2]:w0;if(this.__loaded&&!Xw(this,!1)){this._captureMetrics.incr("capture"),I==="$snapshot"&&this._captureMetrics.incr("snapshot");var Pe=(se=se||w0).transport;if(Pe&&(se.transport=Pe),iu(I)||typeof I!="string")console.error("No event name provided to posthog.capture");else if(!tT(Cl)){this.sessionPersistence.update_search_keyword(),this.get_config("store_google")&&this.sessionPersistence.update_campaign_params(),this.get_config("save_referrer")&&this.sessionPersistence.update_referrer_info();var R={event:I,properties:this._calculate_event_properties(I,K||{})};I==="$identify"&&(R.$set=se.$set,R.$set_once=se.$set_once),(R=Uw(R,se._noTruncate?null:this.get_config("properties_string_max_length"))).timestamp=se.timestamp||new Date,this.get_config("debug")&&Ra.log("PostHog.js send",R);var E=JSON.stringify(R),e=this.get_config("api_host")+(se.endpoint||"/e/"),_=se!==w0;return!this.get_config("request_batching")||_&&!se._batchKey||se.send_instantly?this.__compress_and_send_json_request(e,E,se):this._requestQueue.enqueue(e,R,se),this._invokeCaptureHooks(I,R),R}}}},{key:"_addCaptureHook",value:function(I){this.__captureHooks.push(I)}},{key:"_invokeCaptureHooks",value:function(I,K){this.config._onCapture(I,K),ji(this.__captureHooks,function(se){return se(I)})}},{key:"_calculate_event_properties",value:function(I,K){var se,Pe=this.persistence.remove_event_timer(I),R=hi({},K);if(R.token=this.get_config("token"),I==="$snapshot"){var E=hi(hi({},this.persistence.properties()),this.sessionPersistence.properties());return R.distinct_id=E.distinct_id,R}var e=po.properties();if(this.sessionManager){var _=this.sessionManager.checkAndGetSessionAndWindowId(),k=_.sessionId,i=_.windowId;R.$session_id=k,R.$window_id=i}if((se=this.webPerformance)!==null&&se!==void 0&&se.isEnabled&&(I==="$pageview"&&this.pageViewIdManager.onPageview(),R=Eo(R,{$pageview_id:this.pageViewIdManager.getPageViewId()})),I==="$performance_event"){var w=this.persistence.properties();return R.distinct_id=w.distinct_id,R.$current_url=e.$current_url,R}if(Pe!==void 0){var v=new Date().getTime()-Pe;R.$duration=parseFloat((v/1e3).toFixed(3))}R=Eo({},po.properties(),this.persistence.properties(),this.sessionPersistence.properties(),R);var h=this.get_config("property_blacklist");Yu(h)?ji(h,function(t){delete R[t]}):console.error("Invalid value for property_blacklist config: "+h);var s=this.get_config("sanitize_properties");return s&&(R=s(R,I)),R}},{key:"register",value:function(I,K){this.persistence.register(I,K)}},{key:"register_once",value:function(I,K,se){this.persistence.register_once(I,K,se)}},{key:"register_for_session",value:function(I){this.sessionPersistence.register(I)}},{key:"unregister",value:function(I){this.persistence.unregister(I)}},{key:"unregister_for_session",value:function(I){this.sessionPersistence.unregister(I)}},{key:"_register_single",value:function(I,K){this.register(yi({},I,K))}},{key:"getFeatureFlag",value:function(I,K){return this.featureFlags.getFeatureFlag(I,K)}},{key:"getFeatureFlagPayload",value:function(I){var K=this.featureFlags.getFeatureFlagPayload(I);try{return JSON.parse(K)}catch{return K}}},{key:"isFeatureEnabled",value:function(I,K){return this.featureFlags.isFeatureEnabled(I,K)}},{key:"reloadFeatureFlags",value:function(){this.featureFlags.reloadFeatureFlags()}},{key:"updateEarlyAccessFeatureEnrollment",value:function(I,K){this.featureFlags.updateEarlyAccessFeatureEnrollment(I,K)}},{key:"getEarlyAccessFeatures",value:function(I){var K=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return this.featureFlags.getEarlyAccessFeatures(I,K)}},{key:"onFeatureFlags",value:function(I){return this.featureFlags.onFeatureFlags(I)}},{key:"identify",value:function(I,K,se){if(I){this._captureMetrics.incr("identify");var Pe=this.get_distinct_id();if(this.register({$user_id:I}),!this.get_property("$device_id")){var R=Pe;this.register_once({$had_persisted_distinct_id:!0,$device_id:R},"")}I!==Pe&&I!==this.get_property(U0)&&(this.unregister(U0),this.register({distinct_id:I}));var E=this.persistence.get_user_state()==="anonymous";I!==Pe&&E?(this.persistence.set_user_state("identified"),this.capture("$identify",{distinct_id:I,$anon_distinct_id:Pe},{$set:K||{},$set_once:se||{}}),this.featureFlags.setAnonymousDistinctId(Pe)):(K&&this.people.set(K),se&&this.people.set_once(se)),I!==Pe&&this.reloadFeatureFlags()}else console.error("Unique user id has not been set in posthog.identify")}},{key:"group",value:function(I,K,se){if(I&&K){this._captureMetrics.incr("group");var Pe=this.getGroups();Pe[I]!==K&&this.resetGroupPropertiesForFlags(I),this.register({$groups:hi(hi({},Pe),{},yi({},I,K))}),se&&(this.capture("$groupidentify",{$group_type:I,$group_key:K,$group_set:se}),this.setGroupPropertiesForFlags(yi({},I,se))),Pe[I]===K||se||this.reloadFeatureFlags()}else console.error("posthog.group requires a group type and group key")}},{key:"resetGroups",value:function(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}},{key:"setPersonPropertiesForFlags",value:function(I){var K=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.featureFlags.setPersonPropertiesForFlags(I,K)}},{key:"resetPersonPropertiesForFlags",value:function(){this.featureFlags.resetPersonPropertiesForFlags()}},{key:"setGroupPropertiesForFlags",value:function(I){var K=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.featureFlags.setGroupPropertiesForFlags(I,K)}},{key:"resetGroupPropertiesForFlags",value:function(I){this.featureFlags.resetGroupPropertiesForFlags(I)}},{key:"reset",value:function(I){var K=this.get_property("$device_id");this.persistence.clear(),this.sessionPersistence.clear(),this.persistence.set_user_state("anonymous"),this.sessionManager.resetSessionId();var se=this.get_config("get_device_id")(Hc());this.register_once({distinct_id:se,$device_id:I?se:K},"")}},{key:"get_distinct_id",value:function(){return this.get_property("distinct_id")}},{key:"getGroups",value:function(){return this.get_property("$groups")||{}}},{key:"alias",value:function(I,K){return I===this.get_property(Gw)?(Ra.critical("Attempting to create alias for existing People user - aborting."),-2):(iu(K)&&(K=this.get_distinct_id()),I!==K?(this._register_single(U0,I),this.capture("$create_alias",{alias:I,distinct_id:K})):(console.error("alias matches current distinct_id - skipping api call."),this.identify(I),-1))}},{key:"set_config",value:function(I){var K=hi({},this.config);Vc(I)&&(Eo(this.config,I),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),this.sessionPersistence&&this.sessionPersistence.update_config(this.config),$a.is_supported()&&$a.get("ph_debug")==="true"&&(this.config.debug=!0),this.get_config("debug")&&(Cu.DEBUG=!0),this.sessionRecording&&I.disable_session_recording!==void 0&&K.disable_session_recording!==I.disable_session_recording&&(I.disable_session_recording?this.sessionRecording.stopRecording():this.sessionRecording.startRecordingIfEnabled()))}},{key:"startSessionRecording",value:function(){this.set_config({disable_session_recording:!1})}},{key:"stopSessionRecording",value:function(){this.set_config({disable_session_recording:!0})}},{key:"sessionRecordingStarted",value:function(){var I;return!((I=this.sessionRecording)===null||I===void 0||!I.started())}},{key:"loadToolbar",value:function(I){return this.toolbar.loadToolbar(I)}},{key:"get_config",value:function(I){var K;return(K=this.config)===null||K===void 0?void 0:K[I]}},{key:"get_property",value:function(I){return this.persistence.props[I]}},{key:"getSessionProperty",value:function(I){return this.sessionPersistence.props[I]}},{key:"toString",value:function(){var I,K=(I=this.get_config("name"))!==null&&I!==void 0?I:Bs;return K!==Bs&&(K=Bs+"."+K),K}},{key:"_gdpr_init",value:function(){this.get_config("opt_out_capturing_persistence_type")==="localStorage"&&$a.is_supported()&&(!this.has_opted_in_capturing()&&this.has_opted_in_capturing({persistence_type:"cookie"})&&this.opt_in_capturing({enable_persistence:!1}),!this.has_opted_out_capturing()&&this.has_opted_out_capturing({persistence_type:"cookie"})&&this.opt_out_capturing({clear_persistence:!1}),this.clear_opt_in_out_capturing({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_capturing()?this._gdpr_update_persistence({clear_persistence:!0}):this.has_opted_in_capturing()||!this.get_config("opt_out_capturing_by_default")&&!Mu.get("ph_optout")||(Mu.remove("ph_optout"),this.opt_out_capturing({clear_persistence:this.get_config("opt_out_persistence_by_default")}))}},{key:"_gdpr_update_persistence",value:function(I){var K;if(I&&I.clear_persistence)K=!0;else{if(!I||!I.enable_persistence)return;K=!1}this.get_config("disable_persistence")||this.persistence.disabled===K||this.persistence.set_disabled(K),this.get_config("disable_persistence")||this.sessionPersistence.disabled===K||this.sessionPersistence.set_disabled(K)}},{key:"_gdpr_call_func",value:function(I,K){return K=Eo({capture:this.capture.bind(this),persistence_type:this.get_config("opt_out_capturing_persistence_type"),cookie_prefix:this.get_config("opt_out_capturing_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),secure_cookie:this.get_config("secure_cookie")},K||{}),$a.is_supported()||K.persistence_type!=="localStorage"||(K.persistence_type="cookie"),I(this.get_config("token"),{capture:K.capture,captureEventName:K.capture_event_name,captureProperties:K.capture_properties,persistenceType:K.persistence_type,persistencePrefix:K.cookie_prefix,cookieExpiration:K.cookie_expiration,crossSubdomainCookie:K.cross_subdomain_cookie,secureCookie:K.secure_cookie})}},{key:"opt_in_capturing",value:function(I){I=Eo({enable_persistence:!0},I||{}),this._gdpr_call_func(lT,I),this._gdpr_update_persistence(I)}},{key:"opt_out_capturing",value:function(I){var K=Eo({clear_persistence:!0},I||{});this._gdpr_call_func(uT,K),this._gdpr_update_persistence(K)}},{key:"has_opted_in_capturing",value:function(I){return this._gdpr_call_func(cT,I)}},{key:"has_opted_out_capturing",value:function(I){return this._gdpr_call_func(Ww,I)}},{key:"clear_opt_in_out_capturing",value:function(I){var K=Eo({enable_persistence:!0},I??{});this._gdpr_call_func(fT,K),this._gdpr_update_persistence(K)}},{key:"debug",value:function(I){I===!1?(ai.console.log("You've disabled debug mode."),localStorage&&localStorage.removeItem("ph_debug"),this.set_config({debug:!1})):(ai.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),localStorage&&localStorage.setItem("ph_debug","true"),this.set_config({debug:!0}))}},{key:"decodeLZ64",value:function(I){return ll.decompressFromBase64(I||null)}}]),L}();(function(L,I){for(var K=0;K:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var i in k){var w=i.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");_.addStyleRule(w,k[i])}},98222:function(R,E,e){R.exports=e(82887)},27206:function(R,E,e){R.exports=e(60822)},59893:function(R,E,e){R.exports=e(23381)},5224:function(R,E,e){R.exports=e(83832)},59509:function(R,E,e){R.exports=e(72201)},75557:function(R,E,e){R.exports=e(91815)},40338:function(R,E,e){R.exports=e(21462)},35080:function(R,E,e){R.exports=e(51319)},61396:function(R,E,e){R.exports=e(57516)},40549:function(R,E,e){R.exports=e(98128)},49866:function(R,E,e){R.exports=e(99442)},36089:function(R,E,e){R.exports=e(93740)},19548:function(R,E,e){R.exports=e(8729)},35831:function(R,E,e){R.exports=e(93814)},61039:function(R,E,e){R.exports=e(14382)},97040:function(R,E,e){R.exports=e(51759)},77986:function(R,E,e){R.exports=e(10421)},24296:function(R,E,e){R.exports=e(43102)},58872:function(R,E,e){R.exports=e(92165)},29626:function(R,E,e){R.exports=e(3325)},65591:function(R,E,e){R.exports=e(36071)},69738:function(R,E,e){R.exports=e(43905)},92650:function(R,E,e){R.exports=e(35902)},35630:function(R,E,e){R.exports=e(69816)},73434:function(R,E,e){R.exports=e(94507)},27909:function(R,E,e){var _=e(19548);_.register([e(27206),e(5224),e(58872),e(65591),e(69738),e(92650),e(49866),e(25743),e(6197),e(97040),e(85461),e(73434),e(54201),e(81299),e(47645),e(35630),e(77986),e(83043),e(93005),e(96881),e(4534),e(50581),e(40549),e(77900),e(47582),e(35080),e(21641),e(17280),e(5861),e(29626),e(10021),e(65317),e(96268),e(61396),e(35831),e(16122),e(46163),e(40344),e(40338),e(48131),e(36089),e(55334),e(75557),e(19440),e(99488),e(59893),e(97393),e(98222),e(61039),e(24296),e(66398),e(59509)]),R.exports=_},46163:function(R,E,e){R.exports=e(15154)},96881:function(R,E,e){R.exports=e(64943)},50581:function(R,E,e){R.exports=e(21164)},55334:function(R,E,e){R.exports=e(54186)},65317:function(R,E,e){R.exports=e(94873)},10021:function(R,E,e){R.exports=e(67618)},54201:function(R,E,e){R.exports=e(58810)},5861:function(R,E,e){R.exports=e(20593)},16122:function(R,E,e){R.exports=e(29396)},83043:function(R,E,e){R.exports=e(13551)},48131:function(R,E,e){R.exports=e(46858)},47582:function(R,E,e){R.exports=e(17988)},21641:function(R,E,e){R.exports=e(68868)},96268:function(R,E,e){R.exports=e(20467)},19440:function(R,E,e){R.exports=e(91271)},99488:function(R,E,e){R.exports=e(21461)},97393:function(R,E,e){R.exports=e(85956)},25743:function(R,E,e){R.exports=e(52979)},66398:function(R,E,e){R.exports=e(32275)},17280:function(R,E,e){R.exports=e(6419)},77900:function(R,E,e){R.exports=e(61510)},81299:function(R,E,e){R.exports=e(87619)},93005:function(R,E,e){R.exports=e(93601)},40344:function(R,E,e){R.exports=e(96595)},47645:function(R,E,e){R.exports=e(70954)},6197:function(R,E,e){R.exports=e(47462)},4534:function(R,E,e){R.exports=e(17659)},85461:function(R,E,e){R.exports=e(19990)},82884:function(R){R.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]},50215:function(R,E,e){var _=e(82884),k=e(41940),i=e(85555),w=e(44467).templatedArray;e(24695),R.exports=w("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:k({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:_.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:_.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",i.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",i.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",i.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",i.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:k({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},3749:function(R,E,e){var _=e(71828),k=e(89298),i=e(92605).draw;function w(h){var s=h._fullLayout;_.filterVisible(s.annotations).forEach(function(t){var a=k.getFromId(h,t.xref),r=k.getFromId(h,t.yref),n=k.getRefType(t.xref),o=k.getRefType(t.yref);t._extremes={},n==="range"&&v(t,a),o==="range"&&v(t,r)})}function v(h,s){var t,a=s._id,r=a.charAt(0),n=h[r],o=h["a"+r],l=h[r+"ref"],u=h["a"+r+"ref"],d=h["_"+r+"padplus"],c=h["_"+r+"padminus"],b={x:1,y:-1}[r]*h[r+"shift"],g=3*h.arrowsize*h.arrowwidth||0,f=g+b,x=g-b,y=3*h.startarrowsize*h.arrowwidth||0,m=y+b,T=y-b;if(u===l){var p=k.findExtremes(s,[s.r2c(n)],{ppadplus:f,ppadminus:x}),M=k.findExtremes(s,[s.r2c(o)],{ppadplus:Math.max(d,m),ppadminus:Math.max(c,T)});t={min:[p.min[0],M.min[0]],max:[p.max[0],M.max[0]]}}else m=o?m+o:m,T=o?T-o:T,t=k.findExtremes(s,[s.r2c(n)],{ppadplus:Math.max(d,f,m),ppadminus:Math.max(c,x,T)});h._extremes[a]=t}R.exports=function(h){var s=h._fullLayout;if(_.filterVisible(s.annotations).length&&h._fullData.length)return _.syncOrAsync([i,w],h)}},44317:function(R,E,e){var _=e(71828),k=e(73972),i=e(44467).arrayEditor;function w(h,s){var t,a,r,n,o,l,u,d=h._fullLayout.annotations,c=[],b=[],g=[],f=(s||[]).length;for(t=0;t0||t.explicitOff.length>0},onClick:function(h,s){var t,a,r=w(h,s),n=r.on,o=r.off.concat(r.explicitOff),l={},u=h._fullLayout.annotations;if(n.length||o.length){for(t=0;t.6666666666666666?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[gt]}for(var qe=!1,ve=["x","y"],Ce=0;Ce1)&&(ht===rt?((zt=nt.r2fraction(f["a"+$e]))<0||zt>1)&&(qe=!0):qe=!0),Ae=nt._offset+nt.r2p(f[$e]),Ve=.5}else{var Je=Ft==="domain";$e==="x"?(Ue=f[$e],Ae=Je?nt._offset+nt._length*Ue:Ae=C.l+C.w*Ue):(Ue=1-f[$e],Ae=Je?nt._offset+nt._length*Ue:Ae=C.t+C.h*Ue),Ve=f.showarrow?.5:Ue}if(f.showarrow){St.head=Ae;var et=f["a"+$e];if(Ye=wt*Ne(.5,f.xanchor)-ct*Ne(.5,f.yanchor),ht===rt){var Ze=h.getRefType(ht);Ze==="domain"?($e==="y"&&(et=1-et),St.tail=nt._offset+nt._length*et):Ze==="paper"?$e==="y"?(et=1-et,St.tail=C.t+C.h*et):St.tail=C.l+C.w*et:St.tail=nt._offset+nt.r2p(et),ze=Ye}else St.tail=Ae+et,ze=Ye+et;St.text=St.tail+Ye;var Qe=A[$e==="x"?"width":"height"];if(rt==="paper"&&(St.head=w.constrain(St.head,1,Qe-1)),ht==="pixel"){var st=-Math.max(St.tail-3,St.text),ft=Math.min(St.tail+3,St.text)-Qe;st>0?(St.tail+=st,St.text+=st):ft>0&&(St.tail-=ft,St.text-=ft)}St.tail+=Et,St.head+=Et}else ze=Ye=lt*Ne(Ve,Tt),St.text=Ae+Ye;St.text+=Et,Ye+=Et,ze+=Et,f["_"+$e+"padplus"]=lt/2+ze,f["_"+$e+"padminus"]=lt/2-ze,f["_"+$e+"size"]=lt,f["_"+$e+"shift"]=Ye}if(qe)te.remove();else{var Be=0,je=0;if(f.align!=="left"&&(Be=(ae-he)*(f.align==="center"?.5:1)),f.valign!=="top"&&(je=(be-fe)*(f.valign==="middle"?.5:1)),Ee)De.select("svg").attr({x:ee+Be-1,y:ee+je}).call(t.setClipUrl,oe?D:null,g);else{var at=ee+je-Se.top,ot=ee+Be-Se.left;me.call(r.positionText,ot,at).call(t.setClipUrl,oe?D:null,g)}ue.select("rect").call(t.setRect,ee,ee,ae,be),re.call(t.setRect,J/2,J/2,Ie-J,Te-J),te.call(t.setTranslate,Math.round(G.x.text-Ie/2),Math.round(G.y.text-Te/2)),W.attr({transform:"rotate("+U+","+G.x.text+","+G.y.text+")"});var xt,yt=function(_t,gt){j.selectAll(".annotation-arrow-g").remove();var Ct=G.x.head,dt=G.y.head,vt=G.x.tail+_t,At=G.y.tail+gt,Bt=G.x.text+_t,jt=G.y.text+gt,Ut=w.rotationXYMatrix(U,Bt,jt),tn=w.apply2DTransform(Ut),Xt=w.apply2DTransform2(Ut),Qt=+re.attr("width"),Gt=+re.attr("height"),vn=Bt-.5*Qt,Tn=vn+Qt,dn=jt-.5*Gt,Yt=dn+Gt,ln=[[vn,dn,vn,Yt],[vn,Yt,Tn,Yt],[Tn,Yt,Tn,dn],[Tn,dn,vn,dn]].map(Xt);if(!ln.reduce(function(ar,Kn){return ar^!!w.segmentsIntersect(Ct,dt,Ct+1e6,dt+1e6,Kn[0],Kn[1],Kn[2],Kn[3])},!1)){ln.forEach(function(ar){var Kn=w.segmentsIntersect(vt,At,Ct,dt,ar[0],ar[1],ar[2],ar[3]);Kn&&(vt=Kn.x,At=Kn.y)});var nn=f.arrowwidth,fn=f.arrowcolor,mn=f.arrowside,xn=j.append("g").style({opacity:s.opacity(fn)}).classed("annotation-arrow-g",!0),Pn=xn.append("path").attr("d","M"+vt+","+At+"L"+Ct+","+dt).style("stroke-width",nn+"px").call(s.stroke,s.rgb(fn));if(u(Pn,mn,f),P.annotationPosition&&Pn.node().parentNode&&!y){var Dn=Ct,En=dt;if(f.standoff){var Fn=Math.sqrt(Math.pow(Ct-vt,2)+Math.pow(dt-At,2));Dn+=f.standoff*(vt-Ct)/Fn,En+=f.standoff*(At-dt)/Fn}var er,ir,fr=xn.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(vt-Dn)+","+(At-En),transform:v(Dn,En)}).style("stroke-width",nn+6+"px").call(s.stroke,"rgba(0,0,0,0)").call(s.fill,"rgba(0,0,0,0)");o.init({element:fr.node(),gd:g,prepFn:function(){var ar=t.getTranslate(te);er=ar.x,ir=ar.y,m&&m.autorange&&z(m._name+".autorange",!0),T&&T.autorange&&z(T._name+".autorange",!0)},moveFn:function(ar,Kn){var wr=tn(er,ir),Ht=wr[0]+ar,sn=wr[1]+Kn;te.call(t.setTranslate,Ht,sn),B("x",c(m,ar,"x",C,f)),B("y",c(T,Kn,"y",C,f)),f.axref===f.xref&&B("ax",c(m,ar,"ax",C,f)),f.ayref===f.yref&&B("ay",c(T,Kn,"ay",C,f)),xn.attr("transform",v(ar,Kn)),W.attr({transform:"rotate("+U+","+Ht+","+sn+")"})},doneFn:function(){k.call("_guiRelayout",g,Y());var ar=document.querySelector(".js-notes-box-panel");ar&&ar.redraw(ar.selectedObj)}})}}};f.showarrow&&yt(0,0),Z&&o.init({element:te.node(),gd:g,prepFn:function(){xt=W.attr("transform")},moveFn:function(_t,gt){var Ct="pointer";if(f.showarrow)f.axref===f.xref?B("ax",c(m,_t,"ax",C,f)):B("ax",f.ax+_t),f.ayref===f.yref?B("ay",c(T,gt,"ay",C.w,f)):B("ay",f.ay+gt),yt(_t,gt);else{if(y)return;var dt,vt;if(m)dt=c(m,_t,"x",C,f);else{var At=f._xsize/C.w,Bt=f.x+(f._xshift-f.xshift)/C.w-At/2;dt=o.align(Bt+_t/C.w,At,0,1,f.xanchor)}if(T)vt=c(T,gt,"y",C,f);else{var jt=f._ysize/C.h,Ut=f.y-(f._yshift+f.yshift)/C.h-jt/2;vt=o.align(Ut-gt/C.h,jt,0,1,f.yanchor)}B("x",dt),B("y",vt),m&&T||(Ct=o.getCursor(m?.5:dt,T?.5:vt,f.xanchor,f.yanchor))}W.attr({transform:v(_t,gt)+xt}),n(te,Ct)},clickFn:function(_t,gt){f.captureevents&&g.emit("plotly_clickannotation",_e(gt))},doneFn:function(){n(te),k.call("_guiRelayout",g,Y());var _t=document.querySelector(".js-notes-box-panel");_t&&_t.redraw(_t.selectedObj)}})}}}R.exports={draw:function(g){var f=g._fullLayout;f._infolayer.selectAll(".annotation").remove();for(var x=0;x=0,y=a.indexOf("end")>=0,m=c.backoff*g+r.standoff,T=b.backoff*f+r.startstandoff;if(d.nodeName==="line"){n={x:+t.attr("x1"),y:+t.attr("y1")},o={x:+t.attr("x2"),y:+t.attr("y2")};var p=n.x-o.x,M=n.y-o.y;if(u=(l=Math.atan2(M,p))+Math.PI,m&&T&&m+T>Math.sqrt(p*p+M*M))return void j();if(m){if(m*m>p*p+M*M)return void j();var A=m*Math.cos(l),C=m*Math.sin(l);o.x+=A,o.y+=C,t.attr({x2:o.x,y2:o.y})}if(T){if(T*T>p*p+M*M)return void j();var P=T*Math.cos(l),O=T*Math.sin(l);n.x-=P,n.y-=O,t.attr({x1:n.x,y1:n.y})}}else if(d.nodeName==="path"){var z=d.getTotalLength(),B="";if(z1){r=!0;break}}r?w.fullLayout._infolayer.select(".annotation-"+w.id+'[data-index="'+t+'"]').remove():(a._pdata=k(w.glplot.cameraParams,[v.xaxis.r2l(a.x)*h[0],v.yaxis.r2l(a.y)*h[1],v.zaxis.r2l(a.z)*h[2]]),_(w.graphDiv,a,t,w.id,a._xa,a._ya))}}},2468:function(R,E,e){var _=e(73972),k=e(71828);R.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:e(26997)}}},layoutAttributes:e(26997),handleDefaults:e(20226),includeBasePlot:function(i,w){var v=_.subplotsRegistry.gl3d;if(v)for(var h=v.attrRegex,s=Object.keys(i),t=0;t=0)))return a;if(u===3)o[u]>1&&(o[u]=1);else if(o[u]>=1)return a}var d=Math.round(255*o[0])+", "+Math.round(255*o[1])+", "+Math.round(255*o[2]);return l?"rgba("+d+", "+o[3]+")":"rgb("+d+")"}w.tinyRGB=function(a){var r=a.toRgb();return"rgb("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+")"},w.rgb=function(a){return w.tinyRGB(_(a))},w.opacity=function(a){return a?_(a).getAlpha():0},w.addOpacity=function(a,r){var n=_(a).toRgb();return"rgba("+Math.round(n.r)+", "+Math.round(n.g)+", "+Math.round(n.b)+", "+r+")"},w.combine=function(a,r){var n=_(a).toRgb();if(n.a===1)return _(a).toRgbString();var o=_(r||s).toRgb(),l=o.a===1?o:{r:255*(1-o.a)+o.r*o.a,g:255*(1-o.a)+o.g*o.a,b:255*(1-o.a)+o.b*o.a},u={r:l.r*(1-n.a)+n.r*n.a,g:l.g*(1-n.a)+n.g*n.a,b:l.b*(1-n.a)+n.b*n.a};return _(u).toRgbString()},w.contrast=function(a,r,n){var o=_(a);return o.getAlpha()!==1&&(o=_(w.combine(a,s))),(o.isDark()?r?o.lighten(r):s:n?o.darken(n):h).toString()},w.stroke=function(a,r){var n=_(r);a.style({stroke:w.tinyRGB(n),"stroke-opacity":n.getAlpha()})},w.fill=function(a,r){var n=_(r);a.style({fill:w.tinyRGB(n),"fill-opacity":n.getAlpha()})},w.clean=function(a){if(a&&typeof a=="object"){var r,n,o,l,u=Object.keys(a);for(r=0;r0?ft>=xt:ft<=xt));Be++)ft>_t&&ft0?ft>=xt:ft<=xt));Be++)ft>st[0]&&ft1){var ct=Math.pow(10,Math.floor(Math.log(wt)/Math.LN10));nt*=ct*s.roundUp(wt/ct,[2,5,10]),(Math.abs(he.start)/he.size+1e-6)%1<2e-6&&(rt.tick0=0)}rt.dtick=nt}rt.domain=Y?[Ye+ee/me.h,Ye+qe-ee/me.h]:[Ye+X/me.w,Ye+qe-X/me.w],rt.setScale(),O.attr("transform",t(Math.round(me.l),Math.round(me.t)));var lt,Tt=O.select("."+T.cbtitleunshift).attr("transform",t(-Math.round(me.l),-Math.round(me.t))),Et=rt.ticklabelposition,St=rt.title.font.size,Ft=O.select("."+T.cbaxis),zt=0,Je=0;function et(Ze,Qe){var st={propContainer:rt,propName:z._propPrefix+"title",traceIndex:z._traceIndex,_meta:z._meta,placeholder:de._dfltTitle.colorbar,containerGroup:O.select("."+T.cbtitle)},ft=Ze.charAt(0)==="h"?Ze.substr(1):"h"+Ze;O.selectAll("."+ft+",."+ft+"-math-group").remove(),l.draw(B,Ze,a(st,Qe||{}))}return s.syncOrAsync([i.previousPromises,function(){var Ze,Qe;(Y&&ht||!Y&&!ht)&&(xe==="top"&&(Ze=X+me.l+ve*re,Qe=ee+me.t+Ce*(1-Ye-qe)+3+.75*St),xe==="bottom"&&(Ze=X+me.l+ve*re,Qe=ee+me.t+Ce*(1-Ye)-3-.25*St),xe==="right"&&(Qe=ee+me.t+Ce*oe+3+.75*St,Ze=X+me.l+ve*Ye),et(rt._id+"title",{attributes:{x:Ze,y:Qe,"text-anchor":Y?"start":"middle"}}))},function(){if(!Y&&!ht||Y&&ht){var Ze,Qe=O.select("."+T.cbtitle),st=Qe.select("text"),ft=[-W/2,W/2],Be=Qe.select(".h"+rt._id+"title-math-group").node(),je=15.6;if(st.node()&&(je=parseInt(st.node().style.fontSize,10)*x),Be?(Ze=n.bBox(Be),Je=Ze.width,(zt=Ze.height)>je&&(ft[1]-=(zt-je)/2)):st.node()&&!st.classed(T.jsPlaceholder)&&(Ze=n.bBox(st.node()),Je=Ze.width,zt=Ze.height),Y){if(zt){if(zt+=5,xe==="top")rt.domain[1]-=zt/me.h,ft[1]*=-1;else{rt.domain[0]+=zt/me.h;var at=u.lineCount(st);ft[1]+=(1-at)*je}Qe.attr("transform",t(ft[0],ft[1])),rt.setScale()}}else Je&&(xe==="right"&&(rt.domain[0]+=(Je+St/2)/me.w),Qe.attr("transform",t(ft[0],ft[1])),rt.setScale())}O.selectAll("."+T.cbfills+",."+T.cblines).attr("transform",Y?t(0,Math.round(me.h*(1-rt.domain[1]))):t(Math.round(me.w*rt.domain[0]),0)),Ft.attr("transform",Y?t(0,Math.round(-me.t)):t(Math.round(-me.l),0));var ot=O.select("."+T.cbfills).selectAll("rect."+T.cbfill).attr("style","").data(ae);ot.enter().append("rect").classed(T.cbfill,!0).style("stroke","none"),ot.exit().remove();var xt=De.map(rt.c2p).map(Math.round).sort(function(dt,vt){return dt-vt});ot.each(function(dt,vt){var At=[vt===0?De[0]:(ae[vt]+ae[vt-1])/2,vt===ae.length-1?De[1]:(ae[vt]+ae[vt+1])/2].map(rt.c2p).map(Math.round);Y&&(At[1]=s.constrain(At[1]+(At[1]>At[0])?1:-1,xt[0],xt[1]));var Bt=_.select(this).attr(Y?"x":"y",Ae).attr(Y?"y":"x",_.min(At)).attr(Y?"width":"height",Math.max(Ie,2)).attr(Y?"height":"width",Math.max(_.max(At)-_.min(At),2));if(z._fillgradient)n.gradient(Bt,B,z._id,Y?"vertical":"horizontalreversed",z._fillgradient,"fill");else{var jt=Se(dt).replace("e-","");Bt.attr("fill",k(jt).toHexString())}});var yt=O.select("."+T.cblines).selectAll("path."+T.cbline).data(Me.color&&Me.width?be:[]);yt.enter().append("path").classed(T.cbline,!0),yt.exit().remove(),yt.each(function(dt){var vt=Ae,At=Math.round(rt.c2p(dt))+Me.width/2%1;_.select(this).attr("d","M"+(Y?vt+","+At:At+","+vt)+(Y?"h":"v")+Ie).call(n.lineGroupStyle,Me.width,Ee(dt),Me.dash)}),Ft.selectAll("g."+rt._id+"tick,path").remove();var _t=Ae+Ie+(W||0)/2-(z.ticks==="outside"?1:0),gt=v.calcTicks(rt),Ct=v.getTickSigns(rt)[2];return v.drawTicks(B,rt,{vals:rt.ticks==="inside"?v.clipEnds(rt,gt):gt,layer:Ft,path:v.makeTickPath(rt,_t,Ct),transFn:v.makeTransTickFn(rt)}),v.drawLabels(B,rt,{vals:gt,layer:Ft,transFn:v.makeTransTickLabelFn(rt),labelFns:v.makeLabelFns(rt,_t)})},function(){if(Y&&!ht||!Y&&ht){var Ze,Qe,st=rt.position||0,ft=rt._offset+rt._length/2;if(xe==="right")Qe=ft,Ze=me.l+ve*st+10+St*(rt.showticklabels?1:.5);else if(Ze=ft,xe==="bottom"&&(Qe=me.t+Ce*st+10+(Et.indexOf("inside")===-1?rt.tickfont.size:0)+(rt.ticks!=="intside"&&z.ticklen||0)),xe==="top"){var Be=we.text.split("
").length;Qe=me.t+Ce*st+10-Ie-x*St*Be}et((Y?"h":"v")+rt._id+"title",{avoid:{selection:_.select(B).selectAll("g."+rt._id+"tick"),side:xe,offsetTop:Y?0:me.t,offsetLeft:Y?me.l:0,maxShift:Y?de.width:de.height},attributes:{x:Ze,y:Qe,"text-anchor":"middle"},transform:{rotate:Y?-90:0,offset:0}})}},i.previousPromises,function(){var Ze,Qe=Ie+W/2;Et.indexOf("inside")===-1&&(Ze=n.bBox(Ft.node()),Qe+=Y?Ze.width:Ze.height),lt=Tt.select("text");var st=0,ft=Y&&xe==="top",Be=!Y&&xe==="right",je=0;if(lt.node()&&!lt.classed(T.jsPlaceholder)){var at,ot=Tt.select(".h"+rt._id+"title-math-group").node();ot&&(Y&&ht||!Y&&!ht)?(st=(Ze=n.bBox(ot)).width,at=Ze.height):(st=(Ze=n.bBox(Tt.node())).right-me.l-(Y?Ae:$e),at=Ze.bottom-me.t-(Y?$e:Ae),Y||xe!=="top"||(Qe+=Ze.height,je=Ze.height)),Be&&(lt.attr("transform",t(st/2+St/2,0)),st*=2),Qe=Math.max(Qe,Y?st:at)}var xt=2*(Y?X:ee)+Qe+Z+W/2,yt=0;!Y&&we.text&&J==="bottom"&&oe<=0&&(xt+=yt=xt/2,je+=yt),de._hColorbarMoveTitle=yt,de._hColorbarMoveCBTitle=je;var _t=Z+W,gt=(Y?Ae:$e)-_t/2-(Y?X:0),Ct=(Y?$e:Ae)-(Y?Ne:ee+je-yt);O.select("."+T.cbbg).attr("x",gt).attr("y",Ct).attr(Y?"width":"height",Math.max(xt-yt,2)).attr(Y?"height":"width",Math.max(Ne+_t,2)).call(o.fill,ie).call(o.stroke,z.bordercolor).style("stroke-width",Z);var dt=Be?Math.max(st-10,0):0;O.selectAll("."+T.cboutline).attr("x",(Y?Ae:$e+X)+dt).attr("y",(Y?$e+ee-Ne:Ae)+(ft?zt:0)).attr(Y?"width":"height",Math.max(Ie,2)).attr(Y?"height":"width",Math.max(Ne-(Y?2*ee+zt:2*X+dt),2)).call(o.stroke,z.outlinecolor).style({fill:"none","stroke-width":W});var vt=Y?ze*xt:0,At=Y?0:(1-Ue)*xt-je;if(vt=ce?me.l-vt:-vt,At=ue?me.t-At:-At,O.attr("transform",t(vt,At)),!Y&&(Z||k(ie).getAlpha()&&!k.equals(de.paper_bgcolor,ie))){var Bt=Ft.selectAll("text"),jt=Bt[0].length,Ut=O.select("."+T.cbbg).node(),tn=n.bBox(Ut),Xt=n.getTranslate(O);Bt.each(function(mn,xn){var Pn=jt-1;if(xn===0||xn===Pn){var Dn,En=n.bBox(this),Fn=n.getTranslate(this);if(xn===Pn){var er=En.right+Fn.x;(Dn=tn.right+Xt.x+$e-Z-2+re-er)>0&&(Dn=0)}else if(xn===0){var ir=En.left+Fn.x;(Dn=tn.left+Xt.x+$e+Z+2-ir)<0&&(Dn=0)}Dn&&(jt<3?this.setAttribute("transform","translate("+Dn+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var Qt={},Gt=y[te],vn=m[te],Tn=y[J],dn=m[J],Yt=xt-Ie;Y?(G==="pixels"?(Qt.y=oe,Qt.t=Ne*Tn,Qt.b=Ne*dn):(Qt.t=Qt.b=0,Qt.yt=oe+D*Tn,Qt.yb=oe-D*dn),j==="pixels"?(Qt.x=re,Qt.l=xt*Gt,Qt.r=xt*vn):(Qt.l=Yt*Gt,Qt.r=Yt*vn,Qt.xl=re-U*Gt,Qt.xr=re+U*vn)):(G==="pixels"?(Qt.x=re,Qt.l=Ne*Gt,Qt.r=Ne*vn):(Qt.l=Qt.r=0,Qt.xl=re+D*Gt,Qt.xr=re-D*vn),j==="pixels"?(Qt.y=1-oe,Qt.t=xt*Tn,Qt.b=xt*dn):(Qt.t=Yt*Tn,Qt.b=Yt*dn,Qt.yt=oe-U*Tn,Qt.yb=oe+U*dn));var ln=z.y<.5?"b":"t",nn=z.x<.5?"l":"r";B._fullLayout._reservedMargin[z._id]={};var fn={r:de.width-gt-vt,l:gt+Qt.r,b:de.height-Ct-At,t:Ct+Qt.b};ce&&ue?i.autoMargin(B,z._id,Qt):ce?B._fullLayout._reservedMargin[z._id][ln]=fn[ln]:ue||Y?B._fullLayout._reservedMargin[z._id][nn]=fn[nn]:B._fullLayout._reservedMargin[z._id][ln]=fn[ln]}],B)}(C,A,p);P&&P.then&&(p._promises||[]).push(P),p._context.edits.colorbarPosition&&function(O,z,B){var Y,D,G,U=z.orientation==="v",j=B._fullLayout._size;h.init({element:O.node(),gd:B,prepFn:function(){Y=O.attr("transform"),r(O)},moveFn:function(W,Z){O.attr("transform",Y+t(W,Z)),D=h.align((U?z._uFrac:z._vFrac)+W/j.w,U?z._thickFrac:z._lenFrac,0,1,z.xanchor),G=h.align((U?z._vFrac:1-z._uFrac)-Z/j.h,U?z._lenFrac:z._thickFrac,0,1,z.yanchor);var ie=h.getCursor(D,G,z.xanchor,z.yanchor);r(O,ie)},doneFn:function(){if(r(O),D!==void 0&&G!==void 0){var W={};W[z._propPrefix+"x"]=D,W[z._propPrefix+"y"]=G,z._traceIndex!==void 0?w.call("_guiRestyle",B,W,z._traceIndex):w.call("_guiRelayout",B,W)}}})}(C,A,p)}),M.exit().each(function(A){i.autoMargin(p,A._id)}).remove(),M.order()}}},76228:function(R,E,e){var _=e(71828);R.exports=function(k){return _.isPlainObject(k.colorbar)}},12311:function(R,E,e){R.exports={moduleType:"component",name:"colorbar",attributes:e(63583),supplyDefaults:e(62499),draw:e(98981).draw,hasColorbar:e(76228)}},50693:function(R,E,e){var _=e(63583),k=e(30587).counter,i=e(78607),w=e(63282).scales;function v(h){return"`"+h+"`"}i(w),R.exports=function(h,s){h=h||"";var t,a=(s=s||{}).cLetter||"c",r=("onlyIfNumerical"in s&&s.onlyIfNumerical,"noScale"in s?s.noScale:h==="marker.line"),n="showScaleDflt"in s?s.showScaleDflt:a==="z",o=typeof s.colorscaleDflt=="string"?w[s.colorscaleDflt]:null,l=s.editTypeOverride||"",u=h?h+".":"";"colorAttr"in s?(t=s.colorAttr,s.colorAttr):v(u+(t={z:"z",c:"color"}[a]));var d=a+"auto",c=a+"min",b=a+"max",g=a+"mid",f={};f[c]=f[b]=void 0;var x={};x[d]=!1;var y={};return t==="color"&&(y.color={valType:"color",arrayOk:!0,editType:l||"style"},s.anim&&(y.color.anim=!0)),y[d]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:f},y[c]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:x},y[b]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:x},y[g]={valType:"number",dflt:null,editType:"calc",impliedEdits:f},y.colorscale={valType:"colorscale",editType:"calc",dflt:o,impliedEdits:{autocolorscale:!1}},y.autocolorscale={valType:"boolean",dflt:s.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},y.reversescale={valType:"boolean",dflt:!1,editType:"plot"},r||(y.showscale={valType:"boolean",dflt:n,editType:"calc"},y.colorbar=_),s.noColorAxis||(y.coloraxis={valType:"subplotid",regex:k("coloraxis"),dflt:null,editType:"calc"}),y}},78803:function(R,E,e){var _=e(92770),k=e(71828),i=e(52075).extractOpts;R.exports=function(w,v,h){var s,t=w._fullLayout,a=h.vals,r=h.containerStr,n=r?k.nestedProperty(v,r).get():v,o=i(n),l=o.auto!==!1,u=o.min,d=o.max,c=o.mid,b=function(){return k.aggNums(Math.min,null,a)},g=function(){return k.aggNums(Math.max,null,a)};u===void 0?u=b():l&&(u=n._colorAx&&_(u)?Math.min(u,b()):b()),d===void 0?d=g():l&&(d=n._colorAx&&_(d)?Math.max(d,g()):g()),l&&c!==void 0&&(d-c>c-u?u=c-(d-c):d-c=0?t.colorscale.sequential:t.colorscale.sequentialminus,o._sync("colorscale",s))}},33046:function(R,E,e){var _=e(71828),k=e(52075).hasColorscale,i=e(52075).extractOpts;R.exports=function(w,v){function h(l,u){var d=l["_"+u];d!==void 0&&(l[u]=d)}function s(l,u){var d=u.container?_.nestedProperty(l,u.container).get():l;if(d)if(d.coloraxis)d._colorAx=v[d.coloraxis];else{var c=i(d),b=c.auto;(b||c.min===void 0)&&h(d,u.min),(b||c.max===void 0)&&h(d,u.max),c.autocolorscale&&h(d,"colorscale")}}for(var t=0;t=0;b--,g++){var f=u[b];c[g]=[1-f[0],f[1]]}return c}function o(u,d){d=d||{};for(var c=u.domain,b=u.range,g=b.length,f=new Array(g),x=0;x1.3333333333333333-h?v:h}},70461:function(R,E,e){var _=e(71828),k=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];R.exports=function(i,w,v,h){return i=v==="left"?0:v==="center"?1:v==="right"?2:_.constrain(Math.floor(3*i),0,2),w=h==="bottom"?0:h==="middle"?1:h==="top"?2:_.constrain(Math.floor(3*w),0,2),k[w][i]}},64505:function(R,E){E.selectMode=function(e){return e==="lasso"||e==="select"},E.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"},E.openMode=function(e){return e==="drawline"||e==="drawopenpath"},E.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"},E.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"},E.selectingOrDrawing=function(e){return E.freeMode(e)||E.rectMode(e)}},28569:function(R,E,e){var _=e(48956),k=e(57035),i=e(38520),w=e(71828).removeElement,v=e(85555),h=R.exports={};h.align=e(92807),h.getCursor=e(70461);var s=e(26041);function t(){var r=document.createElement("div");r.className="dragcover";var n=r.style;return n.position="fixed",n.left=0,n.right=0,n.top=0,n.bottom=0,n.zIndex=999999999,n.background="none",document.body.appendChild(r),r}function a(r){return _(r.changedTouches?r.changedTouches[0]:r,document.body)}h.unhover=s.wrapped,h.unhoverRaw=s.raw,h.init=function(r){var n,o,l,u,d,c,b,g,f=r.gd,x=1,y=f._context.doubleClickDelay,m=r.element;f._mouseDownTime||(f._mouseDownTime=0),m.style.pointerEvents="all",m.onmousedown=p,i?(m._ontouchstart&&m.removeEventListener("touchstart",m._ontouchstart),m._ontouchstart=p,m.addEventListener("touchstart",p,{passive:!1})):m.ontouchstart=p;var T=r.clampFn||function(C,P,O){return Math.abs(C)y&&(x=Math.max(x-1,1)),f._dragged)r.doneFn&&r.doneFn();else if(r.clickFn&&r.clickFn(x,c),!g){var P;try{P=new MouseEvent("click",C)}catch{var O=a(C);(P=document.createEvent("MouseEvents")).initMouseEvent("click",C.bubbles,C.cancelable,C.view,C.detail,C.screenX,C.screenY,O[0],O[1],C.ctrlKey,C.altKey,C.shiftKey,C.metaKey,C.button,C.relatedTarget)}b.dispatchEvent(P)}f._dragging=!1,f._dragged=!1}else f._dragged=!1}},h.coverSlip=t},26041:function(R,E,e){var _=e(11086),k=e(79990),i=e(24401).getGraphDiv,w=e(26675),v=R.exports={};v.wrapped=function(h,s,t){(h=i(h))._fullLayout&&k.clear(h._fullLayout._uid+w.HOVERID),v.raw(h,s,t)},v.raw=function(h,s){var t=h._fullLayout,a=h._hoverdata;s||(s={}),s.target&&!h._dragged&&_.triggerHandler(h,"plotly_beforehover",s)===!1||(t._hoverlayer.selectAll("g").remove(),t._hoverlayer.selectAll("line").remove(),t._hoverlayer.selectAll("circle").remove(),h._hoverdata=void 0,s.target&&a&&h.emit("plotly_unhover",{event:s,points:a}))}},79952:function(R,E){E.P={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},E.u={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}},91424:function(R,E,e){var _=e(39898),k=e(71828),i=k.numberFormat,w=e(92770),v=e(84267),h=e(73972),s=e(7901),t=e(21081),a=k.strTranslate,r=e(63893),n=e(77922),o=e(18783).LINE_SPACING,l=e(37822).DESELECTDIM,u=e(34098),d=e(39984),c=e(23469).appendArrayPointValue,b=R.exports={};function g(Ee,Se,he){var fe=Se.fillpattern,ae=fe&&b.getPatternAttr(fe.shape,0,"");if(ae){var be=b.getPatternAttr(fe.bgcolor,0,null),Ie=b.getPatternAttr(fe.fgcolor,0,null),Te=fe.fgopacity,Ne=b.getPatternAttr(fe.size,0,8),qe=b.getPatternAttr(fe.solidity,0,.3),ve=Se.uid;b.pattern(Ee,"point",he,ve,ae,Ne,qe,void 0,fe.fillmode,be,Ie,Te)}else Se.fillcolor&&Ee.call(s.fill,Se.fillcolor)}b.font=function(Ee,Se,he,fe){k.isPlainObject(Se)&&(fe=Se.color,he=Se.size,Se=Se.family),Se&&Ee.style("font-family",Se),he+1&&Ee.style("font-size",he+"px"),fe&&Ee.call(s.fill,fe)},b.setPosition=function(Ee,Se,he){Ee.attr("x",Se).attr("y",he)},b.setSize=function(Ee,Se,he){Ee.attr("width",Se).attr("height",he)},b.setRect=function(Ee,Se,he,fe,ae){Ee.call(b.setPosition,Se,he).call(b.setSize,fe,ae)},b.translatePoint=function(Ee,Se,he,fe){var ae=he.c2p(Ee.x),be=fe.c2p(Ee.y);return!!(w(ae)&&w(be)&&Se.node())&&(Se.node().nodeName==="text"?Se.attr("x",ae).attr("y",be):Se.attr("transform",a(ae,be)),!0)},b.translatePoints=function(Ee,Se,he){Ee.each(function(fe){var ae=_.select(this);b.translatePoint(fe,ae,Se,he)})},b.hideOutsideRangePoint=function(Ee,Se,he,fe,ae,be){Se.attr("display",he.isPtWithinRange(Ee,ae)&&fe.isPtWithinRange(Ee,be)?null:"none")},b.hideOutsideRangePoints=function(Ee,Se){if(Se._hasClipOnAxisFalse){var he=Se.xaxis,fe=Se.yaxis;Ee.each(function(ae){var be=ae[0].trace,Ie=be.xcalendar,Te=be.ycalendar,Ne=h.traceIs(be,"bar-like")?".bartext":".point,.textpoint";Ee.selectAll(Ne).each(function(qe){b.hideOutsideRangePoint(qe,_.select(this),he,fe,Ie,Te)})})}},b.crispRound=function(Ee,Se,he){return Se&&w(Se)?Ee._context.staticPlot?Se:Se<1?1:Math.round(Se):he||0},b.singleLineStyle=function(Ee,Se,he,fe,ae){Se.style("fill","none");var be=(((Ee||[])[0]||{}).trace||{}).line||{},Ie=he||be.width||0,Te=ae||be.dash||"";s.stroke(Se,fe||be.color),b.dashLine(Se,Te,Ie)},b.lineGroupStyle=function(Ee,Se,he,fe){Ee.style("fill","none").each(function(ae){var be=(((ae||[])[0]||{}).trace||{}).line||{},Ie=Se||be.width||0,Te=fe||be.dash||"";_.select(this).call(s.stroke,he||be.color).call(b.dashLine,Te,Ie)})},b.dashLine=function(Ee,Se,he){he=+he||0,Se=b.dashStyle(Se,he),Ee.style({"stroke-dasharray":Se,"stroke-width":he+"px"})},b.dashStyle=function(Ee,Se){Se=+Se||1;var he=Math.max(Se,3);return Ee==="solid"?Ee="":Ee==="dot"?Ee=he+"px,"+he+"px":Ee==="dash"?Ee=3*he+"px,"+3*he+"px":Ee==="longdash"?Ee=5*he+"px,"+5*he+"px":Ee==="dashdot"?Ee=3*he+"px,"+he+"px,"+he+"px,"+he+"px":Ee==="longdashdot"&&(Ee=5*he+"px,"+2*he+"px,"+he+"px,"+2*he+"px"),Ee},b.singleFillStyle=function(Ee,Se){var he=_.select(Ee.node());g(Ee,((he.data()[0]||[])[0]||{}).trace||{},Se)},b.fillGroupStyle=function(Ee,Se){Ee.style("stroke-width",0).each(function(he){var fe=_.select(this);he[0].trace&&g(fe,he[0].trace,Se)})};var f=e(90998);b.symbolNames=[],b.symbolFuncs=[],b.symbolBackOffs=[],b.symbolNeedLines={},b.symbolNoDot={},b.symbolNoFill={},b.symbolList=[],Object.keys(f).forEach(function(Ee){var Se=f[Ee],he=Se.n;b.symbolList.push(he,String(he),Ee,he+100,String(he+100),Ee+"-open"),b.symbolNames[he]=Ee,b.symbolFuncs[he]=Se.f,b.symbolBackOffs[he]=Se.backoff||0,Se.needLine&&(b.symbolNeedLines[he]=!0),Se.noDot?b.symbolNoDot[he]=!0:b.symbolList.push(he+200,String(he+200),Ee+"-dot",he+300,String(he+300),Ee+"-open-dot"),Se.noFill&&(b.symbolNoFill[he]=!0)});var x=b.symbolNames.length;function y(Ee,Se,he,fe){var ae=Ee%100;return b.symbolFuncs[ae](Se,he,fe)+(Ee>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}b.symbolNumber=function(Ee){if(w(Ee))Ee=+Ee;else if(typeof Ee=="string"){var Se=0;Ee.indexOf("-open")>0&&(Se=100,Ee=Ee.replace("-open","")),Ee.indexOf("-dot")>0&&(Se+=200,Ee=Ee.replace("-dot","")),(Ee=b.symbolNames.indexOf(Ee))>=0&&(Ee+=Se)}return Ee%100>=x||Ee>=400?0:Math.floor(Math.max(Ee,0))};var m={x1:1,x2:0,y1:0,y2:0},T={x1:0,x2:0,y1:1,y2:0},p=i("~f"),M={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:m},horizontalreversed:{node:"linearGradient",attrs:m,reversed:!0},vertical:{node:"linearGradient",attrs:T},verticalreversed:{node:"linearGradient",attrs:T,reversed:!0}};b.gradient=function(Ee,Se,he,fe,ae,be){for(var Ie=ae.length,Te=M[fe],Ne=new Array(Ie),qe=0;qe=100;var qe=De(Ee,he),ve=ee(Ee,he);Se.attr("d",y(Ne,Te,qe,ve))}var Ce,Ae,ze,Ue=!1;if(Ee.so)ze=Ie.outlierwidth,Ae=Ie.outliercolor,Ce=be.outliercolor;else{var Ve=(Ie||{}).width;ze=(Ee.mlw+1||Ve+1||(Ee.trace?(Ee.trace.marker.line||{}).width:0)+1)-1||0,Ae="mlc"in Ee?Ee.mlcc=fe.lineScale(Ee.mlc):k.isArrayOrTypedArray(Ie.color)?s.defaultLine:Ie.color,k.isArrayOrTypedArray(be.color)&&(Ce=s.defaultLine,Ue=!0),Ce="mc"in Ee?Ee.mcc=fe.markerScale(Ee.mc):be.color||"rgba(0,0,0,0)",fe.selectedColorFn&&(Ce=fe.selectedColorFn(Ee))}if(Ee.om)Se.call(s.stroke,Ce).style({"stroke-width":(ze||1)+"px",fill:"none"});else{Se.style("stroke-width",(Ee.isBlank?0:ze)+"px");var Ye=be.gradient,$e=Ee.mgt;$e?Ue=!0:$e=Ye&&Ye.type,k.isArrayOrTypedArray($e)&&($e=$e[0],M[$e]||($e=0));var rt=be.pattern,ht=rt&&b.getPatternAttr(rt.shape,Ee.i,"");if($e&&$e!=="none"){var nt=Ee.mgc;nt?Ue=!0:nt=Ye.color;var bt=he.uid;Ue&&(bt+="-"+Ee.i),b.gradient(Se,ae,bt,$e,[[0,nt],[1,Ce]],"fill")}else if(ht){var wt=b.getPatternAttr(rt.bgcolor,Ee.i,null),ct=b.getPatternAttr(rt.fgcolor,Ee.i,null),lt=rt.fgopacity,Tt=b.getPatternAttr(rt.size,Ee.i,8),Et=b.getPatternAttr(rt.solidity,Ee.i,.3),St=Ee.mcc||k.isArrayOrTypedArray(rt.shape)||k.isArrayOrTypedArray(rt.bgcolor)||k.isArrayOrTypedArray(rt.size)||k.isArrayOrTypedArray(rt.solidity),Ft=he.uid;St&&(Ft+="-"+Ee.i),b.pattern(Se,"point",ae,Ft,ht,Tt,Et,Ee.mcc,rt.fillmode,wt,ct,lt)}else s.fill(Se,Ce);ze&&s.stroke(Se,Ae)}},b.makePointStyleFns=function(Ee){var Se={},he=Ee.marker;return Se.markerScale=b.tryColorscale(he,""),Se.lineScale=b.tryColorscale(he,"line"),h.traceIs(Ee,"symbols")&&(Se.ms2mrc=u.isBubble(Ee)?d(Ee):function(){return(he.size||6)/2}),Ee.selectedpoints&&k.extendFlat(Se,b.makeSelectedPointStyleFns(Ee)),Se},b.makeSelectedPointStyleFns=function(Ee){var Se={},he=Ee.selected||{},fe=Ee.unselected||{},ae=Ee.marker||{},be=he.marker||{},Ie=fe.marker||{},Te=ae.opacity,Ne=be.opacity,qe=Ie.opacity,ve=Ne!==void 0,Ce=qe!==void 0;(k.isArrayOrTypedArray(Te)||ve||Ce)&&(Se.selectedOpacityFn=function(nt){var bt=nt.mo===void 0?ae.opacity:nt.mo;return nt.selected?ve?Ne:bt:Ce?qe:l*bt});var Ae=ae.color,ze=be.color,Ue=Ie.color;(ze||Ue)&&(Se.selectedColorFn=function(nt){var bt=nt.mcc||Ae;return nt.selected?ze||bt:Ue||bt});var Ve=ae.size,Ye=be.size,$e=Ie.size,rt=Ye!==void 0,ht=$e!==void 0;return h.traceIs(Ee,"symbols")&&(rt||ht)&&(Se.selectedSizeFn=function(nt){var bt=nt.mrc||Ve/2;return nt.selected?rt?Ye/2:bt:ht?$e/2:bt}),Se},b.makeSelectedTextStyleFns=function(Ee){var Se={},he=Ee.selected||{},fe=Ee.unselected||{},ae=Ee.textfont||{},be=he.textfont||{},Ie=fe.textfont||{},Te=ae.color,Ne=be.color,qe=Ie.color;return Se.selectedTextColorFn=function(ve){var Ce=ve.tc||Te;return ve.selected?Ne||Ce:qe||(Ne?Ce:s.addOpacity(Ce,l))},Se},b.selectedPointStyle=function(Ee,Se){if(Ee.size()&&Se.selectedpoints){var he=b.makeSelectedPointStyleFns(Se),fe=Se.marker||{},ae=[];he.selectedOpacityFn&&ae.push(function(be,Ie){be.style("opacity",he.selectedOpacityFn(Ie))}),he.selectedColorFn&&ae.push(function(be,Ie){s.fill(be,he.selectedColorFn(Ie))}),he.selectedSizeFn&&ae.push(function(be,Ie){var Te=Ie.mx||fe.symbol||0,Ne=he.selectedSizeFn(Ie);be.attr("d",y(b.symbolNumber(Te),Ne,De(Ie,Se),ee(Ie,Se))),Ie.mrc2=Ne}),ae.length&&Ee.each(function(be){for(var Ie=_.select(this),Te=0;Te0?he:0}function B(Ee,Se,he){return he&&(Ee=W(Ee)),Se?D(Ee[1]):Y(Ee[0])}function Y(Ee){var Se=_.round(Ee,2);return A=Se,Se}function D(Ee){var Se=_.round(Ee,2);return C=Se,Se}function G(Ee,Se,he,fe){var ae=Ee[0]-Se[0],be=Ee[1]-Se[1],Ie=he[0]-Se[0],Te=he[1]-Se[1],Ne=Math.pow(ae*ae+be*be,.25),qe=Math.pow(Ie*Ie+Te*Te,.25),ve=(qe*qe*ae-Ne*Ne*Ie)*fe,Ce=(qe*qe*be-Ne*Ne*Te)*fe,Ae=3*qe*(Ne+qe),ze=3*Ne*(Ne+qe);return[[Y(Se[0]+(Ae&&ve/Ae)),D(Se[1]+(Ae&&Ce/Ae))],[Y(Se[0]-(ze&&ve/ze)),D(Se[1]-(ze&&Ce/ze))]]}b.textPointStyle=function(Ee,Se,he){if(Ee.size()){var fe;if(Se.selectedpoints){var ae=b.makeSelectedTextStyleFns(Se);fe=ae.selectedTextColorFn}var be=Se.texttemplate,Ie=he._fullLayout;Ee.each(function(Te){var Ne=_.select(this),qe=be?k.extractOption(Te,Se,"txt","texttemplate"):k.extractOption(Te,Se,"tx","text");if(qe||qe===0){if(be){var ve=Se._module.formatLabels,Ce=ve?ve(Te,Se,Ie):{},Ae={};c(Ae,Se,Te.i);var ze=Se._meta||{};qe=k.texttemplateString(qe,Ce,Ie._d3locale,Ae,Te,ze)}var Ue=Te.tp||Se.textposition,Ve=z(Te,Se),Ye=fe?fe(Te):Te.tc||Se.textfont.color;Ne.call(b.font,Te.tf||Se.textfont.family,Ve,Ye).text(qe).call(r.convertToTspans,he).call(O,Ue,Ve,Te.mrc)}else Ne.remove()})}},b.selectedTextStyle=function(Ee,Se){if(Ee.size()&&Se.selectedpoints){var he=b.makeSelectedTextStyleFns(Se);Ee.each(function(fe){var ae=_.select(this),be=he.selectedTextColorFn(fe),Ie=fe.tp||Se.textposition,Te=z(fe,Se);s.fill(ae,be);var Ne=h.traceIs(Se,"bar-like");O(ae,Ie,Te,fe.mrc2||fe.mrc,Ne)})}},b.smoothopen=function(Ee,Se){if(Ee.length<3)return"M"+Ee.join("L");var he,fe="M"+Ee[0],ae=[];for(he=1;he=Ne||nt>=ve&&nt<=Ne)&&(bt<=Ce&&bt>=qe||bt>=Ce&&bt<=qe)&&(Ee=[nt,bt])}return Ee}b.steps=function(Ee){var Se=U[Ee]||j;return function(he){for(var fe="M"+Y(he[0][0])+","+D(he[0][1]),ae=he.length,be=1;be=1e4&&(b.savedBBoxes={},Z=0),he&&(b.savedBBoxes[he]=ze),Z++,k.extendFlat({},ze)},b.setClipUrl=function(Ee,Se,he){Ee.attr("clip-path",te(Se,he))},b.getTranslate=function(Ee){var Se=(Ee[Ee.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,function(he,fe,ae){return[fe,ae].join(" ")}).split(" ");return{x:+Se[0]||0,y:+Se[1]||0}},b.setTranslate=function(Ee,Se,he){var fe=Ee.attr?"attr":"getAttribute",ae=Ee.attr?"attr":"setAttribute",be=Ee[fe]("transform")||"";return Se=Se||0,he=he||0,be=be.replace(/(\btranslate\(.*?\);?)/,"").trim(),be=(be+=a(Se,he)).trim(),Ee[ae]("transform",be),be},b.getScale=function(Ee){var Se=(Ee[Ee.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,function(he,fe,ae){return[fe,ae].join(" ")}).split(" ");return{x:+Se[0]||1,y:+Se[1]||1}},b.setScale=function(Ee,Se,he){var fe=Ee.attr?"attr":"getAttribute",ae=Ee.attr?"attr":"setAttribute",be=Ee[fe]("transform")||"";return Se=Se||1,he=he||1,be=be.replace(/(\bscale\(.*?\);?)/,"").trim(),be=(be+="scale("+Se+","+he+")").trim(),Ee[ae]("transform",be),be};var J=/\s*sc.*/;b.setPointGroupScale=function(Ee,Se,he){if(Se=Se||1,he=he||1,Ee){var fe=Se===1&&he===1?"":"scale("+Se+","+he+")";Ee.each(function(){var ae=(this.getAttribute("transform")||"").replace(J,"");ae=(ae+=fe).trim(),this.setAttribute("transform",ae)})}};var X=/translate\([^)]*\)\s*$/;function ee(Ee,Se){var he;return Ee&&(he=Ee.mf),he===void 0&&(he=Se.marker&&Se.marker.standoff||0),Se._geo||Se._xA?he:-he}b.setTextPointsScale=function(Ee,Se,he){Ee&&Ee.each(function(){var fe,ae=_.select(this),be=ae.select("text");if(be.node()){var Ie=parseFloat(be.attr("x")||0),Te=parseFloat(be.attr("y")||0),Ne=(ae.attr("transform")||"").match(X);fe=Se===1&&he===1?[]:[a(Ie,Te),"scale("+Se+","+he+")",a(-Ie,-Te)],Ne&&fe.push(Ne),ae.attr("transform",fe.join(""))}})},b.getMarkerStandoff=ee;var re,oe,ue,ce,de,me,_e=Math.atan2,Me=Math.cos,we=Math.sin;function xe(Ee,Se){var he=Se[0],fe=Se[1];return[he*Me(Ee)-fe*we(Ee),he*we(Ee)+fe*Me(Ee)]}function De(Ee,Se){var he,fe,ae=Ee.ma;ae===void 0&&(ae=Se.marker.angle||0);var be=Se.marker.angleref;if(be==="previous"||be==="north"){if(Se._geo){var Ie=Se._geo.project(Ee.lonlat);he=Ie[0],fe=Ie[1]}else{var Te=Se._xA,Ne=Se._yA;if(!Te||!Ne)return 90;he=Te.c2p(Ee.x),fe=Ne.c2p(Ee.y)}if(Se._geo){var qe,ve=Ee.lonlat[0],Ce=Ee.lonlat[1],Ae=Se._geo.project([ve,Ce+1e-5]),ze=Se._geo.project([ve+1e-5,Ce]),Ue=_e(ze[1]-fe,ze[0]-he),Ve=_e(Ae[1]-fe,Ae[0]-he);if(be==="north")qe=ae/180*Math.PI;else if(be==="previous"){var Ye=ve/180*Math.PI,$e=Ce/180*Math.PI,rt=re/180*Math.PI,ht=oe/180*Math.PI,nt=rt-Ye,bt=Me(ht)*we(nt),wt=we(ht)*Me($e)-Me(ht)*we($e)*Me(nt);qe=-_e(bt,wt)-Math.PI,re=ve,oe=Ce}var ct=xe(Ue,[Me(qe),0]),lt=xe(Ve,[we(qe),0]);ae=_e(ct[1]+lt[1],ct[0]+lt[0])/Math.PI*180,be!=="previous"||me===Se.uid&&Ee.i===de+1||(ae=null)}if(be==="previous"&&!Se._geo)if(me===Se.uid&&Ee.i===de+1&&w(he)&&w(fe)){var Tt=he-ue,Et=fe-ce,St=Se.line&&Se.line.shape||"",Ft=St.slice(St.length-1);Ft==="h"&&(Et=0),Ft==="v"&&(Tt=0),ae+=_e(Et,Tt)/Math.PI*180+90}else ae=null}return ue=he,ce=fe,de=Ee.i,me=Se.uid,ae}b.getMarkerAngle=De},90998:function(R,E,e){var _,k,i,w,v=e(95616),h=e(39898).round,s="M0,0Z",t=Math.sqrt(2),a=Math.sqrt(3),r=Math.PI,n=Math.cos,o=Math.sin;function l(d){return d===null}function u(d,c,b){if(!(d&&d%360!=0||c))return b;if(i===d&&w===c&&_===b)return k;function g(B,Y){var D=n(B),G=o(B),U=Y[0],j=Y[1]+(c||0);return[U*D-j*G,U*G+j*D]}i=d,w=c,_=b;for(var f=d/180*r,x=0,y=0,m=v(b),T="",p=0;p0,o=v._context.staticPlot;h.each(function(l){var u,d=l[0].trace,c=d.error_x||{},b=d.error_y||{};d.ids&&(u=function(y){return y.id});var g=w.hasMarkers(d)&&d.marker.maxdisplayed>0;b.visible||c.visible||(l=[]);var f=_.select(this).selectAll("g.errorbar").data(l,u);if(f.exit().remove(),l.length){c.visible||f.selectAll("path.xerror").remove(),b.visible||f.selectAll("path.yerror").remove(),f.style("opacity",1);var x=f.enter().append("g").classed("errorbar",!0);n&&x.style("opacity",0).transition().duration(t.duration).style("opacity",1),i.setClipUrl(f,s.layerClipId,v),f.each(function(y){var m=_.select(this),T=function(O,z,B){var Y={x:z.c2p(O.x),y:B.c2p(O.y)};return O.yh!==void 0&&(Y.yh=B.c2p(O.yh),Y.ys=B.c2p(O.ys),k(Y.ys)||(Y.noYS=!0,Y.ys=B.c2p(O.ys,!0))),O.xh!==void 0&&(Y.xh=z.c2p(O.xh),Y.xs=z.c2p(O.xs),k(Y.xs)||(Y.noXS=!0,Y.xs=z.c2p(O.xs,!0))),Y}(y,a,r);if(!g||y.vis){var p,M=m.select("path.yerror");if(b.visible&&k(T.x)&&k(T.yh)&&k(T.ys)){var A=b.width;p="M"+(T.x-A)+","+T.yh+"h"+2*A+"m-"+A+",0V"+T.ys,T.noYS||(p+="m-"+A+",0h"+2*A),M.size()?n&&(M=M.transition().duration(t.duration).ease(t.easing)):M=m.append("path").style("vector-effect",o?"none":"non-scaling-stroke").classed("yerror",!0),M.attr("d",p)}else M.remove();var C=m.select("path.xerror");if(c.visible&&k(T.y)&&k(T.xh)&&k(T.xs)){var P=(c.copy_ystyle?b:c).width;p="M"+T.xh+","+(T.y-P)+"v"+2*P+"m0,-"+P+"H"+T.xs,T.noXS||(p+="m0,-"+P+"v"+2*P),C.size()?n&&(C=C.transition().duration(t.duration).ease(t.easing)):C=m.append("path").style("vector-effect",o?"none":"non-scaling-stroke").classed("xerror",!0),C.attr("d",p)}else C.remove()}})}})}},62662:function(R,E,e){var _=e(39898),k=e(7901);R.exports=function(i){i.each(function(w){var v=w[0].trace,h=v.error_y||{},s=v.error_x||{},t=_.select(this);t.selectAll("path.yerror").style("stroke-width",h.thickness+"px").call(k.stroke,h.color),s.copy_ystyle&&(s=h),t.selectAll("path.xerror").style("stroke-width",s.thickness+"px").call(k.stroke,s.color)})}},77914:function(R,E,e){var _=e(41940),k=e(528).hoverlabel,i=e(1426).extendFlat;R.exports={hoverlabel:{bgcolor:i({},k.bgcolor,{arrayOk:!0}),bordercolor:i({},k.bordercolor,{arrayOk:!0}),font:_({arrayOk:!0,editType:"none"}),align:i({},k.align,{arrayOk:!0}),namelength:i({},k.namelength,{arrayOk:!0}),editType:"none"}}},30732:function(R,E,e){var _=e(71828),k=e(73972);function i(w,v,h,s){s=s||_.identity,Array.isArray(w)&&(v[0][h]=s(w))}R.exports=function(w){var v=w.calcdata,h=w._fullLayout;function s(o){return function(l){return _.coerceHoverinfo({hoverinfo:l},{_module:o._module},h)}}for(var t=0;t=0&&a.indexae[0]._length||et<0||et>be[0]._length)return o.unhoverRaw(ce,de)}else Je="xpx"in de?de.xpx:ae[0]._length/2,et="ypx"in de?de.ypx:be[0]._length/2;if(de.pointerX=Je+ae[0]._offset,de.pointerY=et+be[0]._offset,ze="xval"in de?d.flat(we,de.xval):d.p2c(ae,Je),Ue="yval"in de?d.flat(we,de.yval):d.p2c(be,et),!k(ze[0])||!k(Ue[0]))return w.warn("Fx.hover failed",de,ce),o.unhoverRaw(ce,de)}var st=1/0;function ft(Ht,sn){for(Ye=0;YeTt&&(Et.splice(0,Tt),st=Et[0].distance),Se&&Ae!==0&&Et.length===0){lt.distance=Ae,lt.index=!1;var Nn=rt._module.hoverPoints(lt,wt,ct,"closest",{hoverLayer:xe._hoverlayer});if(Nn&&(Nn=Nn.filter(function($t){return $t.spikeDistance<=Ae})),Nn&&Nn.length){var jn,rr=Nn.filter(function($t){return $t.xa.showspikes&&$t.xa.spikesnap!=="hovered data"});if(rr.length){var Wt=rr[0];k(Wt.x0)&&k(Wt.y0)&&(jn=je(Wt),(!Ft.vLinePoint||Ft.vLinePoint.spikeDistance>jn.spikeDistance)&&(Ft.vLinePoint=jn))}var An=Nn.filter(function($t){return $t.ya.showspikes&&$t.ya.spikesnap!=="hovered data"});if(An.length){var Lt=An[0];k(Lt.x0)&&k(Lt.y0)&&(jn=je(Lt),(!Ft.hLinePoint||Ft.hLinePoint.spikeDistance>jn.spikeDistance)&&(Ft.hLinePoint=jn))}}}}}function Be(Ht,sn,gn){for(var bn,Cn=null,Yn=1/0,Nn=0;Nn0&&Math.abs(Ht.distance)Bt-1;jt--)Qt(Et[jt]);Et=Ut,yt()}var Gt=ce._hoverdata,vn=[],Tn=ie(ce),dn=te(ce);for(Ve=0;Ve1||Et.length>1)||ve==="closest"&&zt&&Et.length>1,fr=n.combine(xe.plot_bgcolor||n.background,xe.paper_bgcolor),ar=z(Et,{gd:ce,hovermode:ve,rotateLabels:ir,bgColor:fr,container:xe._hoverlayer,outerContainer:xe._paper.node(),commonLabelOpts:xe.hoverlabel,hoverdistance:xe.hoverdistance}),Kn=ar.hoverLabels;if(d.isUnifiedHover(ve)||(function(Ht,sn,gn,bn){var Cn,Yn,Nn,jn,rr,Wt,An,Lt=sn?"xa":"ya",$t=sn?"ya":"xa",rn=0,wn=1,kn=Ht.size(),Ln=new Array(kn),hn=0,Jt=bn.minX,en=bn.maxX,cn=bn.minY,pn=bn.maxY,On=function(vr){return vr*gn._invScaleX},Rn=function(vr){return vr*gn._invScaleY};function Wn(vr){var Er=vr[0],Jn=vr[vr.length-1];if(Yn=Er.pmin-Er.pos-Er.dp+Er.size,Nn=Jn.pos+Jn.dp+Jn.size-Er.pmax,Yn>.01){for(rr=vr.length-1;rr>=0;rr--)vr[rr].dp+=Yn;Cn=!1}if(!(Nn<.01)){if(Yn<-.01){for(rr=vr.length-1;rr>=0;rr--)vr[rr].dp-=Nn;Cn=!1}if(Cn){var br=0;for(jn=0;jnEr.pmax&&br++;for(jn=vr.length-1;jn>=0&&!(br<=0);jn--)(Wt=vr[jn]).pos>Er.pmax-1&&(Wt.del=!0,br--);for(jn=0;jn=0;rr--)vr[rr].dp-=Nn;for(jn=vr.length-1;jn>=0&&!(br<=0);jn--)(Wt=vr[jn]).pos+Wt.dp+Wt.size>Er.pmax&&(Wt.del=!0,br--)}}}for(Ht.each(function(vr){var Er=vr[Lt],Jn=vr[$t],br=Er._id.charAt(0)==="x",zr=Er.range;hn===0&&zr&&zr[0]>zr[1]!==br&&(wn=-1);var ti=0,xi=br?gn.width:gn.height;if(gn.hovermode==="x"||gn.hovermode==="y"){var gi,Ai,li=Y(vr,sn),zi=vr.anchor,Ro=zi==="end"?-1:1;if(zi==="middle")Ai=(gi=vr.crossPos+(br?Rn(li.y-vr.by/2):On(vr.bx/2+vr.tx2width/2)))+(br?Rn(vr.by):On(vr.bx));else if(br)Ai=(gi=vr.crossPos+Rn(p+li.y)-Rn(vr.by/2-p))+Rn(vr.by);else{var Va=On(Ro*p+li.x),Ko=Va+On(Ro*vr.bx);gi=vr.crossPos+Math.min(Va,Ko),Ai=vr.crossPos+Math.max(Va,Ko)}br?cn!==void 0&&pn!==void 0&&Math.min(Ai,pn)-Math.max(gi,cn)>1&&(Jn.side==="left"?(ti=Jn._mainLinePosition,xi=gn.width):xi=Jn._mainLinePosition):Jt!==void 0&&en!==void 0&&Math.min(Ai,en)-Math.max(gi,Jt)>1&&(Jn.side==="top"?(ti=Jn._mainLinePosition,xi=gn.height):xi=Jn._mainLinePosition)}Ln[hn++]=[{datum:vr,traceIndex:vr.trace.index,dp:0,pos:vr.pos,posref:vr.posref,size:vr.by*(br?y:1)/2,pmin:ti,pmax:xi}]}),Ln.sort(function(vr,Er){return vr[0].posref-Er[0].posref||wn*(Er[0].traceIndex-vr[0].traceIndex)});!Cn&&rn<=kn;){for(rn++,Cn=!0,jn=0;jn.01&&Xn.pmin===lr.pmin&&Xn.pmax===lr.pmax){for(rr=tr.length-1;rr>=0;rr--)tr[rr].dp+=Yn;for(Hn.push.apply(Hn,tr),Ln.splice(jn+1,1),An=0,rr=Hn.length-1;rr>=0;rr--)An+=Hn[rr].dp;for(Nn=An/Hn.length,rr=Hn.length-1;rr>=0;rr--)Hn[rr].dp-=Nn;Cn=!1}else jn++}Ln.forEach(Wn)}for(jn=Ln.length-1;jn>=0;jn--){var or=Ln[jn];for(rr=or.length-1;rr>=0;rr--){var sr=or[rr],gr=sr.datum;gr.offset=sr.dp,gr.del=sr.del}}}(Kn,ir,xe,ar.commonLabelBoundingBox),D(Kn,ir,xe._invScaleX,xe._invScaleY)),Me&&Me.tagName){var wr=u.getComponentMethod("annotations","hasClickToShow")(ce,vn);a(_.select(Me),wr?"pointer":"")}Me&&!_e&&function(Ht,sn,gn){if(!gn||gn.length!==Ht._hoverdata.length)return!0;for(var bn=gn.length-1;bn>=0;bn--){var Cn=gn[bn],Yn=Ht._hoverdata[bn];if(Cn.curveNumber!==Yn.curveNumber||String(Cn.pointNumber)!==String(Yn.pointNumber)||String(Cn.pointNumbers)!==String(Yn.pointNumbers))return!0}return!1}(ce,0,Gt)&&(Gt&&ce.emit("plotly_unhover",{event:de,points:Gt}),ce.emit("plotly_hover",{event:de,points:ce._hoverdata,xaxes:ae,yaxes:be,xvals:ze,yvals:Ue}))})(X,ee,re,oe,ue)})},E.loneHover=function(X,ee){var re=!0;Array.isArray(X)||(re=!1,X=[X]);var oe=ee.gd,ue=ie(oe),ce=te(oe),de=z(X.map(function(Me){var we=Me._x0||Me.x0||Me.x||0,xe=Me._x1||Me.x1||Me.x||0,De=Me._y0||Me.y0||Me.y||0,Ee=Me._y1||Me.y1||Me.y||0,Se=Me.eventData;if(Se){var he=Math.min(we,xe),fe=Math.max(we,xe),ae=Math.min(De,Ee),be=Math.max(De,Ee),Ie=Me.trace;if(u.traceIs(Ie,"gl3d")){var Te=oe._fullLayout[Ie.scene]._scene.container,Ne=Te.offsetLeft,qe=Te.offsetTop;he+=Ne,fe+=Ne,ae+=qe,be+=qe}Se.bbox={x0:he+ce,x1:fe+ce,y0:ae+ue,y1:be+ue},ee.inOut_bbox&&ee.inOut_bbox.push(Se.bbox)}else Se=!1;return{color:Me.color||n.defaultLine,x0:Me.x0||Me.x||0,x1:Me.x1||Me.x||0,y0:Me.y0||Me.y||0,y1:Me.y1||Me.y||0,xLabel:Me.xLabel,yLabel:Me.yLabel,zLabel:Me.zLabel,text:Me.text,name:Me.name,idealAlign:Me.idealAlign,borderColor:Me.borderColor,fontFamily:Me.fontFamily,fontSize:Me.fontSize,fontColor:Me.fontColor,nameLength:Me.nameLength,textAlign:Me.textAlign,trace:Me.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:Me.hovertemplate||!1,hovertemplateLabels:Me.hovertemplateLabels||!1,eventData:Se}}),{gd:oe,hovermode:"closest",rotateLabels:!1,bgColor:ee.bgColor||n.background,container:_.select(ee.container),outerContainer:ee.outerContainer||ee.container}).hoverLabels,me=0,_e=0;return de.sort(function(Me,we){return Me.y0-we.y0}).each(function(Me,we){var xe=Me.y0-Me.by/2;Me.offset=xe-5([\s\S]*)<\/extra>/;function z(X,ee){var re=ee.gd,oe=re._fullLayout,ue=ee.hovermode,ce=ee.rotateLabels,de=ee.bgColor,me=ee.container,_e=ee.outerContainer,Me=ee.commonLabelOpts||{};if(X.length===0)return[[]];var we=ee.fontFamily||c.HOVERFONT,xe=ee.fontSize||c.HOVERFONTSIZE,De=X[0],Ee=De.xa,Se=De.ya,he=ue.charAt(0),fe=he+"Label",ae=De[fe];if(ae===void 0&&Ee.type==="multicategory")for(var be=0;beoe.width-dn?(Qt=oe.width-dn,At.attr("d","M"+(dn-p)+",0L"+dn+","+Tn+p+"v"+Tn+(2*M+vn.height)+"H-"+dn+"V"+Tn+p+"H"+(dn-2*p)+"Z")):At.attr("d","M0,0L"+p+","+Tn+p+"H"+dn+"v"+Tn+(2*M+vn.height)+"H-"+dn+"V"+Tn+p+"H-"+p+"Z"),Ye.minX=Qt-dn,Ye.maxX=Qt+dn,Ee.side==="top"?(Ye.minY=Gt-(2*M+vn.height),Ye.maxY=Gt-M):(Ye.minY=Gt+M,Ye.maxY=Gt+(2*M+vn.height))}else{var Yt,ln,nn;Se.side==="right"?(Yt="start",ln=1,nn="",Qt=Ee._offset+Ee._length):(Yt="end",ln=-1,nn="-",Qt=Ee._offset),Gt=Se._offset+(De.y0+De.y1)/2,Bt.attr("text-anchor",Yt),At.attr("d","M0,0L"+nn+p+","+p+"V"+(M+vn.height/2)+"h"+nn+(2*M+vn.width)+"V-"+(M+vn.height/2)+"H"+nn+p+"V-"+p+"Z"),Ye.minY=Gt-(M+vn.height/2),Ye.maxY=Gt+(M+vn.height/2),Se.side==="right"?(Ye.minX=Qt+p,Ye.maxX=Qt+p+(2*M+vn.width)):(Ye.minX=Qt-p-(2*M+vn.width),Ye.maxX=Qt-p);var fn,mn=vn.height/2,xn=Te-vn.top-mn,Pn="clip"+oe._uid+"commonlabel"+Se._id;if(Qt=0?et:Ze+ft=0?Ze:gt+ft=0?zt:Je+Be=0?Je:Ct+Be=0,vt.idealAlign!=="top"&&er||!ir?er?(mn+=Pn/2,vt.anchor="start"):vt.anchor="middle":(mn-=Pn/2,vt.anchor="end"),vt.crossPos=mn;else{if(vt.pos=mn,er=fn+xn/2+fr<=Ne,ir=fn-xn/2-fr>=0,vt.idealAlign!=="left"&&er||!ir)if(er)fn+=xn/2,vt.anchor="start";else{vt.anchor="middle";var ar=fr/2,Kn=fn+ar-Ne,wr=fn-ar;Kn>0&&(fn-=Kn),wr<0&&(fn+=-wr)}else fn-=xn/2,vt.anchor="end";vt.crossPos=fn}Tn.attr("text-anchor",vt.anchor),Yt&&dn.attr("text-anchor",vt.anchor),At.attr("transform",v(fn,mn)+(ce?h(f):""))}),{hoverLabels:dt,commonLabelBoundingBox:Ye}}function B(X,ee,re,oe,ue,ce){var de="",me="";X.nameOverride!==void 0&&(X.name=X.nameOverride),X.name&&(X.trace._meta&&(X.name=w.templateString(X.name,X.trace._meta)),de=W(X.name,X.nameLength));var _e=re.charAt(0),Me=_e==="x"?"y":"x";X.zLabel!==void 0?(X.xLabel!==void 0&&(me+="x: "+X.xLabel+"
"),X.yLabel!==void 0&&(me+="y: "+X.yLabel+"
"),X.trace.type!=="choropleth"&&X.trace.type!=="choroplethmapbox"&&(me+=(me?"z: ":"")+X.zLabel)):ee&&X[_e+"Label"]===ue?me=X[Me+"Label"]||"":X.xLabel===void 0?X.yLabel!==void 0&&X.trace.type!=="scattercarpet"&&(me=X.yLabel):me=X.yLabel===void 0?X.xLabel:"("+X.xLabel+", "+X.yLabel+")",!X.text&&X.text!==0||Array.isArray(X.text)||(me+=(me?"
":"")+X.text),X.extraText!==void 0&&(me+=(me?"
":"")+X.extraText),ce&&me===""&&!X.hovertemplate&&(de===""&&ce.remove(),me=de);var we=X.hovertemplate||!1;if(we){var xe=X.hovertemplateLabels||X;X[_e+"Label"]!==ue&&(xe[_e+"other"]=xe[_e+"Val"],xe[_e+"otherLabel"]=xe[_e+"Label"]),me=(me=w.hovertemplateString(we,xe,oe._d3locale,X.eventData[0]||{},X.trace._meta)).replace(O,function(De,Ee){return de=W(Ee,X.nameLength),""})}return[me,de]}function Y(X,ee){var re=0,oe=X.offset;return ee&&(oe*=-T,re=X.offset*m),{x:re,y:oe}}function D(X,ee,re,oe){var ue=function(de){return de*re},ce=function(de){return de*oe};X.each(function(de){var me=_.select(this);if(de.del)return me.remove();var _e,Me,we,xe,De=me.select("text.nums"),Ee=de.anchor,Se=Ee==="end"?-1:1,he=(xe=(we=(Me={start:1,end:-1,middle:0}[(_e=de).anchor])*(p+M))+Me*(_e.txwidth+M),_e.anchor==="middle"&&(we-=_e.tx2width/2,xe+=_e.txwidth/2+M),{alignShift:Me,textShiftX:we,text2ShiftX:xe}),fe=Y(de,ee),ae=fe.x,be=fe.y,Ie=Ee==="middle";me.select("path").attr("d",Ie?"M-"+ue(de.bx/2+de.tx2width/2)+","+ce(be-de.by/2)+"h"+ue(de.bx)+"v"+ce(de.by)+"h-"+ue(de.bx)+"Z":"M0,0L"+ue(Se*p+ae)+","+ce(p+be)+"v"+ce(de.by/2-p)+"h"+ue(Se*de.bx)+"v-"+ce(de.by)+"H"+ue(Se*p+ae)+"V"+ce(be-p)+"Z");var Te=ae+he.textShiftX,Ne=be+de.ty0-de.by/2+M,qe=de.textAlign||"auto";qe!=="auto"&&(qe==="left"&&Ee!=="start"?(De.attr("text-anchor","start"),Te=Ie?-de.bx/2-de.tx2width/2+M:-de.bx-M):qe==="right"&&Ee!=="end"&&(De.attr("text-anchor","end"),Te=Ie?de.bx/2-de.tx2width/2-M:de.bx+M)),De.call(t.positionText,ue(Te),ce(Ne)),de.tx2width&&(me.select("text.name").call(t.positionText,ue(he.text2ShiftX+he.alignShift*M+ae),ce(be+de.ty0-de.by/2+M)),me.select("rect").call(r.setRect,ue(he.text2ShiftX+(he.alignShift-1)*de.tx2width/2+ae),ce(be-de.by/2-1),ue(de.tx2width),ce(de.by+2)))})}function G(X,ee){var re=X.index,oe=X.trace||{},ue=X.cd[0],ce=X.cd[re]||{};function de(De){return De||k(De)&&De===0}var me=Array.isArray(re)?function(De,Ee){var Se=w.castOption(ue,re,De);return de(Se)?Se:w.extractOption({},oe,"",Ee)}:function(De,Ee){return w.extractOption(ce,oe,De,Ee)};function _e(De,Ee,Se){var he=me(Ee,Se);de(he)&&(X[De]=he)}if(_e("hoverinfo","hi","hoverinfo"),_e("bgcolor","hbg","hoverlabel.bgcolor"),_e("borderColor","hbc","hoverlabel.bordercolor"),_e("fontFamily","htf","hoverlabel.font.family"),_e("fontSize","hts","hoverlabel.font.size"),_e("fontColor","htc","hoverlabel.font.color"),_e("nameLength","hnl","hoverlabel.namelength"),_e("textAlign","hta","hoverlabel.align"),X.posref=ee==="y"||ee==="closest"&&oe.orientation==="h"?X.xa._offset+(X.x0+X.x1)/2:X.ya._offset+(X.y0+X.y1)/2,X.x0=w.constrain(X.x0,0,X.xa._length),X.x1=w.constrain(X.x1,0,X.xa._length),X.y0=w.constrain(X.y0,0,X.ya._length),X.y1=w.constrain(X.y1,0,X.ya._length),X.xLabelVal!==void 0&&(X.xLabel="xLabel"in X?X.xLabel:l.hoverLabelText(X.xa,X.xLabelVal,oe.xhoverformat),X.xVal=X.xa.c2d(X.xLabelVal)),X.yLabelVal!==void 0&&(X.yLabel="yLabel"in X?X.yLabel:l.hoverLabelText(X.ya,X.yLabelVal,oe.yhoverformat),X.yVal=X.ya.c2d(X.yLabelVal)),X.zLabelVal!==void 0&&X.zLabel===void 0&&(X.zLabel=String(X.zLabelVal)),!(isNaN(X.xerr)||X.xa.type==="log"&&X.xerr<=0)){var Me=l.tickText(X.xa,X.xa.c2l(X.xerr),"hover").text;X.xerrneg!==void 0?X.xLabel+=" +"+Me+" / -"+l.tickText(X.xa,X.xa.c2l(X.xerrneg),"hover").text:X.xLabel+=" ± "+Me,ee==="x"&&(X.distance+=1)}if(!(isNaN(X.yerr)||X.ya.type==="log"&&X.yerr<=0)){var we=l.tickText(X.ya,X.ya.c2l(X.yerr),"hover").text;X.yerrneg!==void 0?X.yLabel+=" +"+we+" / -"+l.tickText(X.ya,X.ya.c2l(X.yerrneg),"hover").text:X.yLabel+=" ± "+we,ee==="y"&&(X.distance+=1)}var xe=X.hoverinfo||X.trace.hoverinfo;return xe&&xe!=="all"&&((xe=Array.isArray(xe)?xe:xe.split("+")).indexOf("x")===-1&&(X.xLabel=void 0),xe.indexOf("y")===-1&&(X.yLabel=void 0),xe.indexOf("z")===-1&&(X.zLabel=void 0),xe.indexOf("text")===-1&&(X.text=void 0),xe.indexOf("name")===-1&&(X.name=void 0)),X}function U(X,ee,re){var oe,ue,ce=re.container,de=re.fullLayout,me=de._size,_e=re.event,Me=!!ee.hLinePoint,we=!!ee.vLinePoint;if(ce.selectAll(".spikeline").remove(),we||Me){var xe=n.combine(de.plot_bgcolor,de.paper_bgcolor);if(Me){var De,Ee,Se=ee.hLinePoint;oe=Se&&Se.xa,(ue=Se&&Se.ya).spikesnap==="cursor"?(De=_e.pointerX,Ee=_e.pointerY):(De=oe._offset+Se.x,Ee=ue._offset+Se.y);var he,fe,ae=i.readability(Se.color,xe)<1.5?n.contrast(xe):Se.color,be=ue.spikemode,Ie=ue.spikethickness,Te=ue.spikecolor||ae,Ne=l.getPxPosition(X,ue);if(be.indexOf("toaxis")!==-1||be.indexOf("across")!==-1){if(be.indexOf("toaxis")!==-1&&(he=Ne,fe=De),be.indexOf("across")!==-1){var qe=ue._counterDomainMin,ve=ue._counterDomainMax;ue.anchor==="free"&&(qe=Math.min(qe,ue.position),ve=Math.max(ve,ue.position)),he=me.l+qe*me.w,fe=me.l+ve*me.w}ce.insert("line",":first-child").attr({x1:he,x2:fe,y1:Ee,y2:Ee,"stroke-width":Ie,stroke:Te,"stroke-dasharray":r.dashStyle(ue.spikedash,Ie)}).classed("spikeline",!0).classed("crisp",!0),ce.insert("line",":first-child").attr({x1:he,x2:fe,y1:Ee,y2:Ee,"stroke-width":Ie+2,stroke:xe}).classed("spikeline",!0).classed("crisp",!0)}be.indexOf("marker")!==-1&&ce.insert("circle",":first-child").attr({cx:Ne+(ue.side!=="right"?Ie:-Ie),cy:Ee,r:Ie,fill:Te}).classed("spikeline",!0)}if(we){var Ce,Ae,ze=ee.vLinePoint;oe=ze&&ze.xa,ue=ze&&ze.ya,oe.spikesnap==="cursor"?(Ce=_e.pointerX,Ae=_e.pointerY):(Ce=oe._offset+ze.x,Ae=ue._offset+ze.y);var Ue,Ve,Ye=i.readability(ze.color,xe)<1.5?n.contrast(xe):ze.color,$e=oe.spikemode,rt=oe.spikethickness,ht=oe.spikecolor||Ye,nt=l.getPxPosition(X,oe);if($e.indexOf("toaxis")!==-1||$e.indexOf("across")!==-1){if($e.indexOf("toaxis")!==-1&&(Ue=nt,Ve=Ae),$e.indexOf("across")!==-1){var bt=oe._counterDomainMin,wt=oe._counterDomainMax;oe.anchor==="free"&&(bt=Math.min(bt,oe.position),wt=Math.max(wt,oe.position)),Ue=me.t+(1-wt)*me.h,Ve=me.t+(1-bt)*me.h}ce.insert("line",":first-child").attr({x1:Ce,x2:Ce,y1:Ue,y2:Ve,"stroke-width":rt,stroke:ht,"stroke-dasharray":r.dashStyle(oe.spikedash,rt)}).classed("spikeline",!0).classed("crisp",!0),ce.insert("line",":first-child").attr({x1:Ce,x2:Ce,y1:Ue,y2:Ve,"stroke-width":rt+2,stroke:xe}).classed("spikeline",!0).classed("crisp",!0)}$e.indexOf("marker")!==-1&&ce.insert("circle",":first-child").attr({cx:Ce,cy:nt-(oe.side!=="top"?rt:-rt),r:rt,fill:ht}).classed("spikeline",!0)}}}function j(X,ee){return!ee||ee.vLinePoint!==X._spikepoints.vLinePoint||ee.hLinePoint!==X._spikepoints.hLinePoint}function W(X,ee){return t.plainText(X||"",{len:ee,allowedTags:["br","sub","sup","b","i","em"]})}function Z(X,ee,re){var oe=ee[X+"a"],ue=ee[X+"Val"],ce=ee.cd[0];if(oe.type==="category"||oe.type==="multicategory")ue=oe._categoriesMap[ue];else if(oe.type==="date"){var de=ee.trace[X+"periodalignment"];if(de){var me=ee.cd[ee.index],_e=me[X+"Start"];_e===void 0&&(_e=me[X]);var Me=me[X+"End"];Me===void 0&&(Me=me[X]);var we=Me-_e;de==="end"?ue+=we:de==="middle"&&(ue+=we/2)}ue=oe.d2c(ue)}return ce&&ce.t&&ce.t.posLetter===oe._id&&(re.boxmode!=="group"&&re.violinmode!=="group"||(ue+=ce.t.dPos)),ue}function ie(X){return X.offsetTop+X.clientTop}function te(X){return X.offsetLeft+X.clientLeft}function J(X,ee){var re=X._fullLayout,oe=ee.getBoundingClientRect(),ue=oe.left,ce=oe.top,de=ue+oe.width,me=ce+oe.height,_e=w.apply3DTransform(re._invTransform)(ue,ce),Me=w.apply3DTransform(re._invTransform)(de,me),we=_e[0],xe=_e[1],De=Me[0],Ee=Me[1];return{x:we,y:xe,width:De-we,height:Ee-xe,top:Math.min(xe,Ee),left:Math.min(we,De),right:Math.max(we,De),bottom:Math.max(xe,Ee)}}},38048:function(R,E,e){var _=e(71828),k=e(7901),i=e(23469).isUnifiedHover;R.exports=function(w,v,h,s){s=s||{};var t=v.legend;function a(r){s.font[r]||(s.font[r]=t?v.legend.font[r]:v.font[r])}v&&i(v.hovermode)&&(s.font||(s.font={}),a("size"),a("family"),a("color"),t?(s.bgcolor||(s.bgcolor=k.combine(v.legend.bgcolor,v.paper_bgcolor)),s.bordercolor||(s.bordercolor=v.legend.bordercolor)):s.bgcolor||(s.bgcolor=v.paper_bgcolor)),h("hoverlabel.bgcolor",s.bgcolor),h("hoverlabel.bordercolor",s.bordercolor),h("hoverlabel.namelength",s.namelength),_.coerceFont(h,"hoverlabel.font",s.font),h("hoverlabel.align",s.align)}},98212:function(R,E,e){var _=e(71828),k=e(528);R.exports=function(i,w){function v(h,s){return w[h]!==void 0?w[h]:_.coerce(i,w,k,h,s)}return v("clickmode"),v("hovermode")}},30211:function(R,E,e){var _=e(39898),k=e(71828),i=e(28569),w=e(23469),v=e(528),h=e(88335);R.exports={moduleType:"component",name:"fx",constants:e(26675),schema:{layout:v},attributes:e(77914),layoutAttributes:v,supplyLayoutGlobalDefaults:e(22774),supplyDefaults:e(54268),supplyLayoutDefaults:e(34938),calc:e(30732),getDistanceFunction:w.getDistanceFunction,getClosest:w.getClosest,inbox:w.inbox,quadrature:w.quadrature,appendArrayPointValue:w.appendArrayPointValue,castHoverOption:function(s,t,a){return k.castOption(s,t,"hoverlabel."+a)},castHoverinfo:function(s,t,a){return k.castOption(s,a,"hoverinfo",function(r){return k.coerceHoverinfo({hoverinfo:r},{_module:s._module},t)})},hover:h.hover,unhover:i.unhover,loneHover:h.loneHover,loneUnhover:function(s){var t=k.isD3Selection(s)?s:_.select(s);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()},click:e(75914)}},528:function(R,E,e){var _=e(26675),k=e(41940),i=k({editType:"none"});i.family.dflt=_.HOVERFONT,i.size.dflt=_.HOVERFONTSIZE,R.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:i,grouptitlefont:k({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}},34938:function(R,E,e){var _=e(71828),k=e(528),i=e(98212),w=e(38048);R.exports=function(v,h){function s(n,o){return _.coerce(v,h,k,n,o)}i(v,h)&&(s("hoverdistance"),s("spikedistance")),s("dragmode")==="select"&&s("selectdirection");var t=h._has("mapbox"),a=h._has("geo"),r=h._basePlotModules.length;h.dragmode==="zoom"&&((t||a)&&r===1||t&&a&&r===2)&&(h.dragmode="pan"),w(v,h,s),_.coerceFont(s,"hoverlabel.grouptitlefont",h.hoverlabel.font)}},22774:function(R,E,e){var _=e(71828),k=e(38048),i=e(528);R.exports=function(w,v){k(w,v,function(h,s){return _.coerce(w,v,i,h,s)})}},83312:function(R,E,e){var _=e(71828),k=e(30587).counter,i=e(27670).Y,w=e(85555).idRegex,v=e(44467),h={rows:{valType:"integer",min:1,editType:"plot"},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot"},columns:{valType:"integer",min:1,editType:"plot"},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[k("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[w.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[w.y.toString(),""],editType:"plot"},editType:"plot"},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot"},xgap:{valType:"number",min:0,max:1,editType:"plot"},ygap:{valType:"number",min:0,max:1,editType:"plot"},domain:i({name:"grid",editType:"plot",noGridCell:!0},{}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot"},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot"},editType:"plot"};function s(r,n,o){var l=n[o+"axes"],u=Object.keys((r._splomAxes||{})[o]||{});return Array.isArray(l)?l:u.length?u:void 0}function t(r,n,o,l,u,d){var c=n(r+"gap",o),b=n("domain."+r);n(r+"side",l);for(var g=new Array(u),f=b[0],x=(b[1]-f)/(u-c),y=x*(1-c),m=0;m1){b||g||f||O("pattern")==="independent"&&(b=!0),y._hasSubplotGrid=b;var p,M,A=O("roworder")==="top to bottom",C=b?.2:.1,P=b?.3:.1;x&&n._splomGridDflt&&(p=n._splomGridDflt.xside,M=n._splomGridDflt.yside),y._domains={x:t("x",O,C,p,T),y:t("y",O,P,M,m,A)}}else delete n.grid}function O(z,B){return _.coerce(o,y,h,z,B)}},contentDefaults:function(r,n){var o=n.grid;if(o&&o._domains){var l,u,d,c,b,g,f,x=r.grid||{},y=n._subplots,m=o._hasSubplotGrid,T=o.rows,p=o.columns,M=o.pattern==="independent",A=o._axisMap={};if(m){var C=x.subplots||[];g=o.subplots=new Array(T);var P=1;for(l=0;l1);if(M===!1&&(n.legend=void 0),(M!==!1||l.uirevision)&&(d("uirevision",n.uirevision),M!==!1)){d("borderwidth");var A,C,P,O=d("orientation")==="h",z=d("yref")==="paper",B=d("xref")==="paper",Y="left";if(O?(A=0,_.getComponentMethod("rangeslider","isVisible")(r.xaxis)?z?(C=1.1,P="bottom"):(C=1,P="top"):z?(C=-.1,P="top"):(C=0,P="bottom")):(C=1,P="auto",B?A=1.02:(A=1,Y="right")),k.coerce(l,u,{x:{valType:"number",editType:"legend",min:B?-2:0,max:B?3:1,dflt:A}},"x"),k.coerce(l,u,{y:{valType:"number",editType:"legend",min:z?-2:0,max:z?3:1,dflt:C}},"y"),d("traceorder",T),s.isGrouped(n.legend)&&d("tracegroupgap"),d("entrywidth"),d("entrywidthmode"),d("itemsizing"),d("itemwidth"),d("itemclick"),d("itemdoubleclick"),d("groupclick"),d("xanchor",Y),d("yanchor",P),d("valign"),k.noneOrAll(l,u,["x","y"]),d("title.text")){d("title.side",O?"left":"top");var D=k.extendFlat({},c,{size:k.bigFont(c.size)});k.coerceFont(d,"title.font",D)}}}}R.exports=function(a,r,n){var o,l=["legend"];for(o=0;o1)}var te=j.hiddenlabels||[];if(!(Z||j.showlegend&&ie.length))return G.selectAll("."+W).remove(),j._topdefs.select("#"+D).remove(),i.autoMargin(B,W);var J=k.ensureSingle(G,"g",W,function(_e){Z||_e.attr("pointer-events","all")}),X=k.ensureSingleById(j._topdefs,"clipPath",D,function(_e){_e.append("rect")}),ee=k.ensureSingle(J,"rect","bg",function(_e){_e.attr("shape-rendering","crispEdges")});ee.call(t.stroke,U.bordercolor).call(t.fill,U.bgcolor).style("stroke-width",U.borderwidth+"px");var re=k.ensureSingle(J,"g","scrollbox"),oe=U.title;if(U._titleWidth=0,U._titleHeight=0,oe.text){var ue=k.ensureSingle(re,"text",W+"titletext");ue.attr("text-anchor","start").call(s.font,oe.font).text(oe.text),C(ue,re,B,U,f)}else re.selectAll("."+W+"titletext").remove();var ce=k.ensureSingle(J,"rect","scrollbar",function(_e){_e.attr(n.scrollBarEnterAttrs).call(t.fill,n.scrollBarColor)}),de=re.selectAll("g.groups").data(ie);de.enter().append("g").attr("class","groups"),de.exit().remove();var me=de.selectAll("g.traces").data(k.identity);me.enter().append("g").attr("class","traces"),me.exit().remove(),me.style("opacity",function(_e){var Me=_e[0].trace;return w.traceIs(Me,"pie-like")?te.indexOf(_e[0].label)!==-1?.5:1:Me.visible==="legendonly"?.5:1}).each(function(){_.select(this).call(p,B,U)}).call(b,B,U).each(function(){Z||_.select(this).call(A,B,W)}),k.syncOrAsync([i.previousPromises,function(){return function(_e,Me,we,xe){var De=_e._fullLayout,Ee=z(xe);xe||(xe=De[Ee]);var Se=De._size,he=g.isVertical(xe),fe=g.isGrouped(xe),ae=xe.entrywidthmode==="fraction",be=xe.borderwidth,Ie=2*be,Te=n.itemGap,Ne=xe.itemwidth+2*Te,qe=2*(be+Te),ve=O(xe),Ce=xe.y<0||xe.y===0&&ve==="top",Ae=xe.y>1||xe.y===1&&ve==="bottom",ze=xe.tracegroupgap,Ue={};xe._maxHeight=Math.max(Ce||Ae?De.height/2:Se.h,30);var Ve=0;xe._width=0,xe._height=0;var Ye=function(Be){var je=0,at=0,ot=Be.title.side;return ot&&(ot.indexOf("left")!==-1&&(je=Be._titleWidth),ot.indexOf("top")!==-1&&(at=Be._titleHeight)),[je,at]}(xe);if(he)we.each(function(Be){var je=Be[0].height;s.setTranslate(this,be+Ye[0],be+Ye[1]+xe._height+je/2+Te),xe._height+=je,xe._width=Math.max(xe._width,Be[0].width)}),Ve=Ne+xe._width,xe._width+=Te+Ne+Ie,xe._height+=qe,fe&&(Me.each(function(Be,je){s.setTranslate(this,0,je*xe.tracegroupgap)}),xe._height+=(xe._lgroupsLength-1)*xe.tracegroupgap);else{var $e=P(xe),rt=xe.x<0||xe.x===0&&$e==="right",ht=xe.x>1||xe.x===1&&$e==="left",nt=Ae||Ce,bt=De.width/2;xe._maxWidth=Math.max(rt?nt&&$e==="left"?Se.l+Se.w:bt:ht?nt&&$e==="right"?Se.r+Se.w:bt:Se.w,2*Ne);var wt=0,ct=0;we.each(function(Be){var je=m(Be,xe,Ne);wt=Math.max(wt,je),ct+=je}),Ve=null;var lt=0;if(fe){var Tt=0,Et=0,St=0;Me.each(function(){var Be=0,je=0;_.select(this).selectAll("g.traces").each(function(ot){var xt=m(ot,xe,Ne),yt=ot[0].height;s.setTranslate(this,Ye[0],Ye[1]+be+Te+yt/2+je),je+=yt,Be=Math.max(Be,xt),Ue[ot[0].trace.legendgroup]=Be});var at=Be+Te;Et>0&&at+be+Et>xe._maxWidth?(lt=Math.max(lt,Et),Et=0,St+=Tt+ze,Tt=je):Tt=Math.max(Tt,je),s.setTranslate(this,Et,St),Et+=at}),xe._width=Math.max(lt,Et)+be,xe._height=St+Tt+qe}else{var Ft=we.size(),zt=ct+Ie+(Ft-1)*Te=xe._maxWidth&&(lt=Math.max(lt,Qe),et=0,Ze+=Je,xe._height+=Je,Je=0),s.setTranslate(this,Ye[0]+be+et,Ye[1]+be+Ze+je/2+Te),Qe=et+at+Te,et+=ot,Je=Math.max(Je,je)}),zt?(xe._width=et+Ie,xe._height=Je+qe):(xe._width=Math.max(lt,Qe)+Ie,xe._height+=Je+qe)}}xe._width=Math.ceil(Math.max(xe._width+Ye[0],xe._titleWidth+2*(be+n.titlePad))),xe._height=Math.ceil(Math.max(xe._height+Ye[1],xe._titleHeight+2*(be+n.itemGap))),xe._effHeight=Math.min(xe._height,xe._maxHeight);var st=_e._context.edits,ft=st.legendText||st.legendPosition;we.each(function(Be){var je=_.select(this).select("."+Ee+"toggle"),at=Be[0].height,ot=Be[0].trace.legendgroup,xt=m(Be,xe,Ne);fe&&ot!==""&&(xt=Ue[ot]);var yt=ft?Ne:Ve||xt;he||ae||(yt+=Te/2),s.setRect(je,0,-at/2,yt,at)})}(B,de,me,U)},function(){var _e,Me,we,xe,De=j._size,Ee=U.borderwidth,Se=U.xref==="paper",he=U.yref==="paper";if(!Z){var fe,ae;fe=Se?De.l+De.w*U.x-u[P(U)]*U._width:j.width*U.x-u[P(U)]*U._width,ae=he?De.t+De.h*(1-U.y)-u[O(U)]*U._effHeight:j.height*(1-U.y)-u[O(U)]*U._effHeight;var be=function(nt,bt,wt,ct){var lt=nt._fullLayout,Tt=lt[bt],Et=P(Tt),St=O(Tt),Ft=Tt.xref==="paper",zt=Tt.yref==="paper";nt._fullLayout._reservedMargin[bt]={};var Je=Tt.y<.5?"b":"t",et=Tt.x<.5?"l":"r",Ze={r:lt.width-wt,l:wt+Tt._width,b:lt.height-ct,t:ct+Tt._effHeight};if(Ft&&zt)return i.autoMargin(nt,bt,{x:Tt.x,y:Tt.y,l:Tt._width*u[Et],r:Tt._width*d[Et],b:Tt._effHeight*d[St],t:Tt._effHeight*u[St]});Ft?nt._fullLayout._reservedMargin[bt][Je]=Ze[Je]:zt||Tt.orientation==="v"?nt._fullLayout._reservedMargin[bt][et]=Ze[et]:nt._fullLayout._reservedMargin[bt][Je]=Ze[Je]}(B,W,fe,ae);if(be)return;if(j.margin.autoexpand){var Ie=fe,Te=ae;fe=Se?k.constrain(fe,0,j.width-U._width):Ie,ae=he?k.constrain(ae,0,j.height-U._effHeight):Te,fe!==Ie&&k.log("Constrain "+W+".x to make legend fit inside graph"),ae!==Te&&k.log("Constrain "+W+".y to make legend fit inside graph")}s.setTranslate(J,fe,ae)}if(ce.on(".drag",null),J.on("wheel",null),Z||U._height<=U._maxHeight||B._context.staticPlot){var Ne=U._effHeight;Z&&(Ne=U._height),ee.attr({width:U._width-Ee,height:Ne-Ee,x:Ee/2,y:Ee/2}),s.setTranslate(re,0,0),X.select("rect").attr({width:U._width-2*Ee,height:Ne-2*Ee,x:Ee,y:Ee}),s.setClipUrl(re,D,B),s.setRect(ce,0,0,0,0),delete U._scrollY}else{var qe,ve,Ce,Ae=Math.max(n.scrollBarMinHeight,U._effHeight*U._effHeight/U._height),ze=U._effHeight-Ae-2*n.scrollBarMargin,Ue=U._height-U._effHeight,Ve=ze/Ue,Ye=Math.min(U._scrollY||0,Ue);ee.attr({width:U._width-2*Ee+n.scrollBarWidth+n.scrollBarMargin,height:U._effHeight-Ee,x:Ee/2,y:Ee/2}),X.select("rect").attr({width:U._width-2*Ee+n.scrollBarWidth+n.scrollBarMargin,height:U._effHeight-2*Ee,x:Ee,y:Ee+Ye}),s.setClipUrl(re,D,B),ht(Ye,Ae,Ve),J.on("wheel",function(){ht(Ye=k.constrain(U._scrollY+_.event.deltaY/ze*Ue,0,Ue),Ae,Ve),Ye!==0&&Ye!==Ue&&_.event.preventDefault()});var $e=_.behavior.drag().on("dragstart",function(){var nt=_.event.sourceEvent;qe=nt.type==="touchstart"?nt.changedTouches[0].clientY:nt.clientY,Ce=Ye}).on("drag",function(){var nt=_.event.sourceEvent;nt.buttons===2||nt.ctrlKey||(ve=nt.type==="touchmove"?nt.changedTouches[0].clientY:nt.clientY,Ye=function(bt,wt,ct){var lt=(ct-wt)/Ve+bt;return k.constrain(lt,0,Ue)}(Ce,qe,ve),ht(Ye,Ae,Ve))});ce.call($e);var rt=_.behavior.drag().on("dragstart",function(){var nt=_.event.sourceEvent;nt.type==="touchstart"&&(qe=nt.changedTouches[0].clientY,Ce=Ye)}).on("drag",function(){var nt=_.event.sourceEvent;nt.type==="touchmove"&&(ve=nt.changedTouches[0].clientY,Ye=function(bt,wt,ct){var lt=(wt-ct)/Ve+bt;return k.constrain(lt,0,Ue)}(Ce,qe,ve),ht(Ye,Ae,Ve))});re.call(rt)}function ht(nt,bt,wt){U._scrollY=B._fullLayout[W]._scrollY=nt,s.setTranslate(re,0,-nt),s.setRect(ce,U._width,n.scrollBarMargin+nt*wt,n.scrollBarWidth,bt),X.select("rect").attr("y",Ee+nt)}B._context.edits.legendPosition&&(J.classed("cursor-move",!0),h.init({element:J.node(),gd:B,prepFn:function(){var nt=s.getTranslate(J);we=nt.x,xe=nt.y},moveFn:function(nt,bt){var wt=we+nt,ct=xe+bt;s.setTranslate(J,wt,ct),_e=h.align(wt,U._width,De.l,De.l+De.w,U.xanchor),Me=h.align(ct+U._height,-U._height,De.t+De.h,De.t,U.yanchor)},doneFn:function(){if(_e!==void 0&&Me!==void 0){var nt={};nt[W+".x"]=_e,nt[W+".y"]=Me,w.call("_guiRelayout",B,nt)}},clickFn:function(nt,bt){var wt=de.selectAll("g.traces").filter(function(){var ct=this.getBoundingClientRect();return bt.clientX>=ct.left&&bt.clientX<=ct.right&&bt.clientY>=ct.top&&bt.clientY<=ct.bottom});wt.size()>0&&T(B,J,wt,nt,bt)}}))}],B)}}function m(B,Y,D){var G=B[0],U=G.width,j=Y.entrywidthmode,W=G.trace.legendwidth||Y.entrywidth;return j==="fraction"?Y._maxWidth*W:D+(W||U)}function T(B,Y,D,G,U){var j=D.data()[0][0].trace,W={event:U,node:D.node(),curveNumber:j.index,expandedIndex:j._expandedIndex,data:B.data,layout:B.layout,frames:B._transitionData._frames,config:B._context,fullData:B._fullData,fullLayout:B._fullLayout};j._group&&(W.group=j._group),w.traceIs(j,"pie-like")&&(W.label=D.datum()[0].label),v.triggerHandler(B,"plotly_legendclick",W)!==!1&&(G===1?Y._clickTimeout=setTimeout(function(){B._fullLayout&&r(D,B,G)},B._context.doubleClickDelay):G===2&&(Y._clickTimeout&&clearTimeout(Y._clickTimeout),B._legendMouseDownTime=0,v.triggerHandler(B,"plotly_legenddoubleclick",W)!==!1&&r(D,B,G)))}function p(B,Y,D){var G,U,j=z(D),W=B.data()[0][0],Z=W.trace,ie=w.traceIs(Z,"pie-like"),te=!D._inHover&&Y._context.edits.legendText&&!ie,J=D._maxNameLength;W.groupTitle?(G=W.groupTitle.text,U=W.groupTitle.font):(U=D.font,D.entries?G=W.text:(G=ie?W.label:Z.name,Z._meta&&(G=k.templateString(G,Z._meta))));var X=k.ensureSingle(B,"text",j+"text");X.attr("text-anchor","start").call(s.font,U).text(te?M(G,J):G);var ee=D.itemwidth+2*n.itemGap;a.positionText(X,ee,0),te?X.call(a.makeEditable,{gd:Y,text:G}).call(C,B,Y,D).on("edit",function(re){this.text(M(re,J)).call(C,B,Y,D);var oe=W.trace._fullInput||{},ue={};if(w.hasTransform(oe,"groupby")){var ce=w.getTransformIndices(oe,"groupby"),de=ce[ce.length-1],me=k.keyedContainer(oe,"transforms["+de+"].styles","target","value.name");me.set(W.trace._group,re),ue=me.constructUpdate()}else ue.name=re;return w.call("_guiRestyle",Y,ue,Z.index)}):C(X,B,Y,D)}function M(B,Y){var D=Math.max(4,Y);if(B&&B.trim().length>=D/2)return B;for(var G=D-(B=B||"").length;G>0;G--)B+=" ";return B}function A(B,Y,D){var G,U=Y._context.doubleClickDelay,j=1,W=k.ensureSingle(B,"rect",D+"toggle",function(Z){Y._context.staticPlot||Z.style("cursor","pointer").attr("pointer-events","all"),Z.call(t.fill,"rgba(0,0,0,0)")});Y._context.staticPlot||(W.on("mousedown",function(){(G=new Date().getTime())-Y._legendMouseDownTimeU&&(j=Math.max(j-1,1)),T(Y,Z,B,j,_.event)}}))}function C(B,Y,D,G,U){G._inHover&&B.attr("data-notex",!0),a.convertToTspans(B,D,function(){(function(j,W,Z,ie){var te=j.data()[0][0];if(Z._inHover||!te||te.trace.showlegend){var J=j.select("g[class*=math-group]"),X=J.node(),ee=z(Z);Z||(Z=W._fullLayout[ee]);var re,oe,ue=Z.borderwidth,ce=(ie===f?Z.title.font:te.groupTitle?te.groupTitle.font:Z.font).size*l;if(X){var de=s.bBox(X);re=de.height,oe=de.width,ie===f?s.setTranslate(J,ue,ue+.75*re):s.setTranslate(J,0,.25*re)}else{var me="."+ee+(ie===f?"title":"")+"text",_e=j.select(me),Me=a.lineCount(_e),we=_e.node();if(re=ce*Me,oe=we?s.bBox(we).width:0,ie===f)Z.title.side==="left"&&(oe+=2*n.itemGap),a.positionText(_e,ue+n.titlePad,ue+ce);else{var xe=2*n.itemGap+Z.itemwidth;te.groupTitle&&(xe=n.itemGap,oe-=Z.itemwidth),a.positionText(_e,xe,-ce*((Me-1)/2-.3))}}ie===f?(Z._titleWidth=oe,Z._titleHeight=re):(te.lineHeight=ce,te.height=Math.max(re,16)+3,te.width=oe)}else j.remove()})(Y,D,G,U)})}function P(B){return k.isRightAnchor(B)?"right":k.isCenterAnchor(B)?"center":"left"}function O(B){return k.isBottomAnchor(B)?"bottom":k.isMiddleAnchor(B)?"middle":"top"}function z(B){return B._id||"legend"}R.exports=function(B,Y){if(Y)y(B,Y);else{var D=B._fullLayout,G=D._legends;D._infolayer.selectAll('[class^="legend"]').each(function(){var W=_.select(this),Z=W.attr("class").split(" ")[0];Z.match(x)&&G.indexOf(Z)===-1&&W.remove()});for(var U=0;UP&&(C=P)}M[h][0]._groupMinRank=C,M[h][0]._preGroupSort=h}var O=function(G,U){return G.trace.legendrank-U.trace.legendrank||G._preSort-U._preSort};for(M.forEach(function(G,U){G[0]._preGroupSort=U}),M.sort(function(G,U){return G[0]._groupMinRank-U[0]._groupMinRank||G[0]._preGroupSort-U[0]._preGroupSort}),h=0;hb?b:d}R.exports=function(d,c,b){var g=c._fullLayout;b||(b=g.legend);var f=b.itemsizing==="constant",x=b.itemwidth,y=(x+2*n.itemGap)/2,m=w(y,0),T=function(A,C,P,O){var z;if(A+1)z=A;else{if(!(C&&C.width>0))return 0;z=C.width}return f?O:Math.min(z,P)};function p(A,C,P){var O=A[0].trace,z=O.marker||{},B=z.line||{},Y=P?O.visible&&O.type===P:k.traceIs(O,"bar"),D=_.select(C).select("g.legendpoints").selectAll("path.legend"+P).data(Y?[A]:[]);D.enter().append("path").classed("legend"+P,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",m),D.exit().remove(),D.each(function(G){var U=_.select(this),j=G[0],W=T(j.mlw,z.line,5,2);U.style("stroke-width",W+"px");var Z=j.mcc;if(!b._inHover&&"mc"in j){var ie=s(z),te=ie.mid;te===void 0&&(te=(ie.max+ie.min)/2),Z=v.tryColorscale(z,"")(te)}var J=Z||j.mc||z.color,X=z.pattern,ee=X&&v.getPatternAttr(X.shape,0,"");if(ee){var re=v.getPatternAttr(X.bgcolor,0,null),oe=v.getPatternAttr(X.fgcolor,0,null),ue=X.fgopacity,ce=u(X.size,8,10),de=u(X.solidity,.5,1),me="legend-"+O.uid;U.call(v.pattern,"legend",c,me,ee,ce,de,Z,X.fillmode,re,oe,ue)}else U.call(h.fill,J);W&&h.stroke(U,j.mlc||B.color)})}function M(A,C,P){var O=A[0],z=O.trace,B=P?z.visible&&z.type===P:k.traceIs(z,P),Y=_.select(C).select("g.legendpoints").selectAll("path.legend"+P).data(B?[A]:[]);if(Y.enter().append("path").classed("legend"+P,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",m),Y.exit().remove(),Y.size()){var D=(z.marker||{}).line,G=T(r(D.width,O.pts),D,5,2),U=i.minExtend(z,{marker:{line:{width:G}}});U.marker.line.color=D.color;var j=i.minExtend(O,{trace:U});a(Y,j,U)}}d.each(function(A){var C=_.select(this),P=i.ensureSingle(C,"g","layers");P.style("opacity",A[0].trace.opacity);var O=b.valign,z=A[0].lineHeight,B=A[0].height;if(O!=="middle"&&z&&B){var Y={top:1,bottom:-1}[O]*(.5*(z-B+3));P.attr("transform",w(0,Y))}else P.attr("transform",null);P.selectAll("g.legendfill").data([A]).enter().append("g").classed("legendfill",!0),P.selectAll("g.legendlines").data([A]).enter().append("g").classed("legendlines",!0);var D=P.selectAll("g.legendsymbols").data([A]);D.enter().append("g").classed("legendsymbols",!0),D.selectAll("g.legendpoints").data([A]).enter().append("g").classed("legendpoints",!0)}).each(function(A){var C,P=A[0].trace,O=[];if(P.visible)switch(P.type){case"histogram2d":case"heatmap":O=[["M-15,-2V4H15V-2Z"]],C=!0;break;case"choropleth":case"choroplethmapbox":O=[["M-6,-6V6H6V-6Z"]],C=!0;break;case"densitymapbox":O=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],C="radial";break;case"cone":O=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],C=!1;break;case"streamtube":O=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],C=!1;break;case"surface":O=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],C=!0;break;case"mesh3d":O=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],C=!1;break;case"volume":O=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],C=!0;break;case"isosurface":O=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],C=!1}var z=_.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(O);z.enter().append("path").classed("legend3dandfriends",!0).attr("transform",m).style("stroke-miterlimit",1),z.exit().remove(),z.each(function(B,Y){var D,G=_.select(this),U=s(P),j=U.colorscale,W=U.reversescale;if(j){if(!C){var Z=j.length;D=Y===0?j[W?Z-1:0][1]:Y===1?j[W?0:Z-1][1]:j[Math.floor((Z-1)/2)][1]}}else{var ie=P.vertexcolor||P.facecolor||P.color;D=i.isArrayOrTypedArray(ie)?ie[Y]||ie[0]:ie}G.attr("d",B[0]),D?G.call(h.fill,D):G.call(function(te){if(te.size()){var J="legendfill-"+P.uid;v.gradient(te,c,J,o(W,C==="radial"),j,"fill")}})})}).each(function(A){var C=A[0].trace,P=C.type==="waterfall";if(A[0]._distinct&&P){var O=A[0].trace[A[0].dir].marker;return A[0].mc=O.color,A[0].mlw=O.line.width,A[0].mlc=O.line.color,p(A,this,"waterfall")}var z=[];C.visible&&P&&(z=A[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var B=_.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(z);B.enter().append("path").classed("legendwaterfall",!0).attr("transform",m).style("stroke-miterlimit",1),B.exit().remove(),B.each(function(Y){var D=_.select(this),G=C[Y[0]].marker,U=T(void 0,G.line,5,2);D.attr("d",Y[1]).style("stroke-width",U+"px").call(h.fill,G.color),U&&D.call(h.stroke,G.line.color)})}).each(function(A){p(A,this,"funnel")}).each(function(A){p(A,this)}).each(function(A){var C=A[0].trace,P=_.select(this).select("g.legendpoints").selectAll("path.legendbox").data(C.visible&&k.traceIs(C,"box-violin")?[A]:[]);P.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",m),P.exit().remove(),P.each(function(){var O=_.select(this);if(C.boxpoints!=="all"&&C.points!=="all"||h.opacity(C.fillcolor)!==0||h.opacity((C.line||{}).color)!==0){var z=T(void 0,C.line,5,2);O.style("stroke-width",z+"px").call(h.fill,C.fillcolor),z&&h.stroke(O,C.line.color)}else{var B=i.minExtend(C,{marker:{size:f?12:i.constrain(C.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});P.call(v.pointStyle,B,c)}})}).each(function(A){M(A,this,"funnelarea")}).each(function(A){M(A,this,"pie")}).each(function(A){var C,P,O=l(A),z=O.showFill,B=O.showLine,Y=O.showGradientLine,D=O.showGradientFill,G=O.anyFill,U=O.anyLine,j=A[0],W=j.trace,Z=s(W),ie=Z.colorscale,te=Z.reversescale,J=t.hasMarkers(W)||!G?"M5,0":U?"M5,-2":"M5,-3",X=_.select(this),ee=X.select(".legendfill").selectAll("path").data(z||D?[A]:[]);if(ee.enter().append("path").classed("js-fill",!0),ee.exit().remove(),ee.attr("d",J+"h"+x+"v6h-"+x+"z").call(function(ue){if(ue.size())if(z)v.fillGroupStyle(ue,c);else{var ce="legendfill-"+W.uid;v.gradient(ue,c,ce,o(te),ie,"fill")}}),B||Y){var re=T(void 0,W.line,10,5);P=i.minExtend(W,{line:{width:re}}),C=[i.minExtend(j,{trace:P})]}var oe=X.select(".legendlines").selectAll("path").data(B||Y?[C]:[]);oe.enter().append("path").classed("js-line",!0),oe.exit().remove(),oe.attr("d",J+(Y?"l"+x+",0.0001":"h"+x)).call(B?v.lineGroupStyle:function(ue){if(ue.size()){var ce="legendline-"+W.uid;v.lineGroupStyle(ue),v.gradient(ue,c,ce,o(te),ie,"stroke")}})}).each(function(A){var C,P,O=l(A),z=O.anyFill,B=O.anyLine,Y=O.showLine,D=O.showMarker,G=A[0],U=G.trace,j=!D&&!B&&!z&&t.hasText(U);function W(oe,ue,ce,de){var me=i.nestedProperty(U,oe).get(),_e=i.isArrayOrTypedArray(me)&&ue?ue(me):me;if(f&&_e&&de!==void 0&&(_e=de),ce){if(_ece[1])return ce[1]}return _e}function Z(oe){return G._distinct&&G.index&&oe[G.index]?oe[G.index]:oe[0]}if(D||j||Y){var ie={},te={};if(D){ie.mc=W("marker.color",Z),ie.mx=W("marker.symbol",Z),ie.mo=W("marker.opacity",i.mean,[.2,1]),ie.mlc=W("marker.line.color",Z),ie.mlw=W("marker.line.width",i.mean,[0,5],2),te.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var J=W("marker.size",i.mean,[2,16],12);ie.ms=J,te.marker.size=J}Y&&(te.line={width:W("line.width",Z,[0,10],5)}),j&&(ie.tx="Aa",ie.tp=W("textposition",Z),ie.ts=10,ie.tc=W("textfont.color",Z),ie.tf=W("textfont.family",Z)),C=[i.minExtend(G,ie)],(P=i.minExtend(U,te)).selectedpoints=null,P.texttemplate=null}var X=_.select(this).select("g.legendpoints"),ee=X.selectAll("path.scatterpts").data(D?C:[]);ee.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",m),ee.exit().remove(),ee.call(v.pointStyle,P,c),D&&(C[0].mrc=3);var re=X.selectAll("g.pointtext").data(j?C:[]);re.enter().append("g").classed("pointtext",!0).append("text").attr("transform",m),re.exit().remove(),re.selectAll("text").call(v.textPointStyle,P,c)}).each(function(A){var C=A[0].trace,P=_.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(C.visible&&C.type==="candlestick"?[A,A]:[]);P.enter().append("path").classed("legendcandle",!0).attr("d",function(O,z){return z?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",m).style("stroke-miterlimit",1),P.exit().remove(),P.each(function(O,z){var B=_.select(this),Y=C[z?"increasing":"decreasing"],D=T(void 0,Y.line,5,2);B.style("stroke-width",D+"px").call(h.fill,Y.fillcolor),D&&h.stroke(B,Y.line.color)})}).each(function(A){var C=A[0].trace,P=_.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(C.visible&&C.type==="ohlc"?[A,A]:[]);P.enter().append("path").classed("legendohlc",!0).attr("d",function(O,z){return z?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",m).style("stroke-miterlimit",1),P.exit().remove(),P.each(function(O,z){var B=_.select(this),Y=C[z?"increasing":"decreasing"],D=T(void 0,Y.line,5,2);B.style("fill","none").call(v.dashLine,Y.line.dash,D),D&&h.stroke(B,Y.line.color)})})}},42068:function(R,E,e){e(93348),R.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}},26023:function(R,E,e){var _=e(73972),k=e(74875),i=e(41675),w=e(24255),v=e(34031).eraseActiveShape,h=e(71828),s=h._,t=R.exports={};function a(g,f){var x,y,m=f.currentTarget,T=m.getAttribute("data-attr"),p=m.getAttribute("data-val")||!0,M=g._fullLayout,A={},C=i.list(g,null,!0),P=M._cartesianSpikesEnabled;if(T==="zoom"){var O,z=p==="in"?.5:2,B=(1+z)/2,Y=(1-z)/2;for(y=0;y1?(J=["toggleHover"],X=["resetViews"]):A?(te=["zoomInGeo","zoomOutGeo"],J=["hoverClosestGeo"],X=["resetGeo"]):M?(J=["hoverClosest3d"],X=["resetCameraDefault3d","resetCameraLastSave3d"]):B?(te=["zoomInMapbox","zoomOutMapbox"],J=["toggleHover"],X=["resetViewMapbox"]):O?J=["hoverClosestGl2d"]:C?J=["hoverClosestPie"]:G?(J=["hoverClosestCartesian","hoverCompareCartesian"],X=["resetViewSankey"]):J=["toggleHover"],p&&(J=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(function(me){for(var _e=0;_e0)){var c=function(g,f,x){for(var y=x.filter(function(M){return f[M].anchor===g._id}),m=0,T=0;T=we.max)_e=ue[Me+1];else if(me=we.pmax)_e=ue[Me+1];else if(meMe._length||Te+Ve<0)return;Ae=Ie+Ve,ze=Te+Ve;break;case De:if(Ue="col-resize",Ie+Ve>Me._length)return;Ae=Ie+Ve,ze=Te;break;case Ee:if(Ue="col-resize",Te+Ve<0)return;Ae=Ie,ze=Te+Ve;break;default:Ue="ew-resize",Ae=be,ze=be+Ve}if(ze=0;O--){var z=f.append("path").attr(y).style("opacity",O?.1:m).call(w.stroke,p).call(w.fill,T).call(v.dashLine,O?"solid":A,O?4+M:M);if(o(z,u,b),C){var B=h(u.layout,"selections",b);z.style({cursor:"move"});var Y={element:z.node(),plotinfo:g,gd:u,editHelpers:B,isActiveSelection:!0},D=_(x,u);k(D,z,Y)}else z.style("pointer-events",O?"all":"none");P[O]=z}var G=P[0];P[1].node().addEventListener("click",function(){return function(U,j){if(r(U)){var W=+j.node().getAttribute("data-index");if(W>=0){if(W===U._fullLayout._activeSelectionIndex)return void l(U);U._fullLayout._activeSelectionIndex=W,U._fullLayout._deactivateSelection=l,a(U)}}}(u,G)})}(u._fullLayout._selectionLayer)}function o(u,d,c){var b=c.xref+c.yref;v.setClipUrl(u,"clip"+d._fullLayout._uid+b,d)}function l(u){r(u)&&u._fullLayout._activeSelectionIndex>=0&&(i(u),delete u._fullLayout._activeSelectionIndex,a(u))}R.exports={draw:a,drawOne:n,activateLastSelection:function(u){if(r(u)){var d=u._fullLayout.selections.length-1;u._fullLayout._activeSelectionIndex=d,u._fullLayout._deactivateSelection=l,a(u)}}}},53777:function(R,E,e){var _=e(79952).P,k=e(1426).extendFlat;R.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:k({},_,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}},90849:function(R){R.exports=function(E,e,_){_("newselection.mode"),_("newselection.line.width")&&(_("newselection.line.color"),_("newselection.line.dash")),_("activeselection.fillcolor"),_("activeselection.opacity")}},35855:function(R,E,e){var _=e(64505).selectMode,k=e(51873).clearOutline,i=e(60165),w=i.readPaths,v=i.writePaths,h=i.fixDatesForPaths;R.exports=function(s,t){if(s.length){var a=s[0][0];if(a){var r=a.getAttribute("d"),n=t.gd,o=n._fullLayout.newselection,l=t.plotinfo,u=l.xaxis,d=l.yaxis,c=t.isActiveSelection,b=t.dragmode,g=(n.layout||{}).selections||[];if(!_(b)&&c!==void 0){var f=n._fullLayout._activeSelectionIndex;if(f-1,Ft=[];if(function(Qe){return Qe&&Array.isArray(Qe)&&Qe[0].hoverOnBox!==!0}(Et)){re(ve,Ce,Ve);var zt=function(Qe,st){var ft,Be,je=Qe[0],at=-1,ot=[];for(Be=0;Be0?function(Qe,st){var ft,Be,je,at=[];for(je=0;je0&&at.push(ft);if(at.length===1&&at[0]===st.searchInfo&&(Be=st.searchInfo.cd[0].trace).selectedpoints.length===st.pointNumbers.length){for(je=0;je1||(Be+=st.selectedpoints.length)>1))return!1;return Be===1}($e)&&(wt=me(zt))){for(Ye&&Ye.remove(),Tt=0;Tt<$e.length;Tt++)(rt=$e[Tt])._module.selectPoints(rt,!1);_e(Ce,$e),oe(Ve),St&&qe(Ce)}else{for(ct=ve.shiftKey&&(wt!==void 0?wt:me(zt)),ht=function(Qe,st,ft){return{pointNumber:Qe,searchInfo:st,subtract:!!ft}}(zt.pointNumber,zt.searchInfo,ct),nt=ee(Ve.selectionDefs.concat([ht])),Tt=0;Tt<$e.length;Tt++)if(bt=we($e[Tt]._module.selectPoints($e[Tt],nt),$e[Tt]),Ft.length)for(var Je=0;Je=0})(Ue)&&Ue._fullLayout._deactivateShape(Ue),function(bt){return bt._fullLayout._activeSelectionIndex>=0}(Ue)&&Ue._fullLayout._deactivateSelection(Ue);var Ve=Ue._fullLayout._zoomlayer,Ye=n(Ae),$e=l(Ae);if(Ye||$e){var rt,ht,nt=Ve.selectAll(".select-outline-"+ze.id);nt&&Ue._fullLayout._outlining&&(Ye&&(rt=y(nt,ve)),rt&&i.call("_guiRelayout",Ue,{shapes:rt}),$e&&!ie(ve)&&(ht=m(nt,ve)),ht&&(Ue._fullLayout._noEmitSelectedAtStart=!0,i.call("_guiRelayout",Ue,{selections:ht}).then(function(){Ce&&T(Ue)})),Ue._fullLayout._outlining=!1)}ze.selection={},ze.selection.selectionDefs=ve.selectionDefs=[],ze.selection.mergedPolygons=ve.mergedPolygons=[]}function ue(ve){return ve._id}function ce(ve,Ce,Ae,ze){if(!ve.calcdata)return[];var Ue,Ve,Ye,$e=[],rt=Ce.map(ue),ht=Ae.map(ue);for(Ye=0;Ye0?ze[0]:Ae;return!!Ce.selectedpoints&&Ce.selectedpoints.indexOf(Ue)>-1}function _e(ve,Ce,Ae){var ze,Ue;for(ze=0;ze-1&&Ce;if(!Ve&&Ce){var ln=fe(ve,!0);if(ln.length){var nn=ln[0].xref,fn=ln[0].yref;if(nn&&fn){var mn=Ie(ln);Te([P(ve,nn,"x"),P(ve,fn,"y")])(dn,mn)}}ve._fullLayout._noEmitSelectedAtStart?ve._fullLayout._noEmitSelectedAtStart=!1:Yt&&Ne(ve,dn),wt._reselect=!1}if(!Ve&&wt._deselect){var xn=wt._deselect;(function(Pn,Dn,En){for(var Fn=0;Fn=0)ct._fullLayout._deactivateShape(ct);else if(!ht){var mn=lt.clickmode;C.done(Tn).then(function(){if(C.clear(Tn),nn===2){for(Ut.remove(),je=0;je-1&&te(fn,ct,ze.xaxes,ze.yaxes,ze.subplot,ze,Ut),mn==="event"&&Ne(ct,void 0);h.click(ct,fn)}).catch(p.error)}},ze.doneFn=function(){Gt.remove(),C.done(Tn).then(function(){C.clear(Tn),!Tt&&Be&&ze.selectionDefs&&(Be.subtract=jt,ze.selectionDefs.push(Be),ze.mergedPolygons.length=0,[].push.apply(ze.mergedPolygons,ft)),(Tt||ht)&&oe(ze,Tt),ze.doneFnCompleted&&ze.doneFnCompleted(dn),nt&&Ne(ct,ot)}).catch(p.error)}},clearOutline:b,clearSelectionsCache:oe,selectOnClick:te}},89827:function(R,E,e){var _=e(50215),k=e(41940),i=e(82196).line,w=e(79952).P,v=e(1426).extendFlat,h=e(44467).templatedArray,s=(e(24695),e(5386).R),t=e(37281);R.exports=h("shape",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},xref:v({},_.xref,{}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},yref:v({},_.yref,{}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},yanchor:{valType:"any",editType:"calc+arraydraw"},y0:{valType:"any",editType:"calc+arraydraw"},y1:{valType:"any",editType:"calc+arraydraw"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:v({},i.color,{editType:"arraydraw"}),width:v({},i.width,{editType:"calc+arraydraw"}),dash:v({},w,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw"},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},label:{text:{valType:"string",dflt:"",editType:"arraydraw"},texttemplate:s({},{keys:Object.keys(t)}),font:k({editType:"calc+arraydraw",colorEditType:"arraydraw"}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],editType:"arraydraw"},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw"},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw"},editType:"arraydraw"},editType:"arraydraw"})},5627:function(R,E,e){var _=e(71828),k=e(89298),i=e(21459),w=e(30477);function v(a){return s(a.line.width,a.xsizemode,a.x0,a.x1,a.path,!1)}function h(a){return s(a.line.width,a.ysizemode,a.y0,a.y1,a.path,!0)}function s(a,r,n,o,l,u){var d=a/2,c=u;if(r==="pixel"){var b=l?w.extractPathCoords(l,u?i.paramIsY:i.paramIsX):[n,o],g=_.aggNums(Math.max,null,b),f=_.aggNums(Math.min,null,b),x=f<0?Math.abs(f)+d:d,y=g>0?g+d:d;return{ppad:d,ppadplus:c?x:y,ppadminus:c?y:x}}return{ppad:d}}function t(a,r,n,o,l){var u=a.type==="category"||a.type==="multicategory"?a.r2c:a.d2c;if(r!==void 0)return[u(r),u(n)];if(o){var d,c,b,g,f=1/0,x=-1/0,y=o.match(i.segmentRE);for(a.type==="date"&&(u=w.decodeDate(u)),d=0;dx&&(x=g)));return x>=f?[f,x]:void 0}}R.exports=function(a){var r=a._fullLayout,n=_.filterVisible(r.shapes);if(n.length&&a._fullData.length)for(var o=0;o=ue?ce-me:me-ce,-180/Math.PI*Math.atan2(_e,Me)}(x,m,y,T):0),A.call(function(ue){return ue.call(w.font,M).attr({}),i.convertToTspans(ue,r),ue});var X=function(ue,ce,de,me,_e,Me,we){var xe,De,Ee,Se,he=_e.label.textposition,fe=_e.label.textangle,ae=_e.label.padding,be=_e.type,Ie=Math.PI/180*Me,Te=Math.sin(Ie),Ne=Math.cos(Ie),qe=_e.label.xanchor,ve=_e.label.yanchor;if(be==="line"){he==="start"?(xe=ue,De=ce):he==="end"?(xe=de,De=me):(xe=(ue+de)/2,De=(ce+me)/2),qe==="auto"&&(qe=he==="start"?fe==="auto"?de>ue?"left":deue?"right":deue?"right":deue?"left":de1&&(xe.length!==2||xe[1][0]!=="Z")&&(G===0&&(xe[0][0]="M"),p[D]=xe,O(),z())}}()}}function ue(_e,Me){(function(we,xe){if(p.length)for(var De=0;DeDe?(he=we,Ie="y0",fe=De,Te="y1"):(he=De,Ie="y1",fe=we,Te="y0"),Je(ft),Qe(me,ce),function(Be,je,at){var ot=je.xref,xt=je.yref,yt=w.getFromId(at,ot),_t=w.getFromId(at,xt),gt="";ot==="paper"||yt.autorange||(gt+=ot),xt==="paper"||_t.autorange||(gt+=xt),r.setClipUrl(Be,gt?"clip"+at._fullLayout._uid+gt:null,at)}(ue,ce,oe),zt.moveFn=Ce==="move"?et:Ze,zt.altKey=ft.altKey)},doneFn:function(){g(oe)||(l(ue),st(me),y(ue,oe,ce),k.call("_guiRelayout",oe,_e.getUpdateObj()))},clickFn:function(){g(oe)||st(me)}};function Je(ft){if(g(oe))Ce=null;else if(Ye)Ce=ft.target.tagName==="path"?"move":ft.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var Be=zt.element.getBoundingClientRect(),je=Be.right-Be.left,at=Be.bottom-Be.top,ot=ft.clientX-Be.left,xt=ft.clientY-Be.top,yt=!$e&&je>Ae&&at>ze&&!ft.shiftKey?o.getCursor(ot/je,1-xt/at):"move";l(ue,yt),Ce=yt.split("-")[0]}}function et(ft,Be){if(ce.type==="path"){var je=function(xt){return xt},at=je,ot=je;Ue?rt("xanchor",ce.xanchor=Et(Ee+ft)):(at=function(xt){return Et(lt(xt)+ft)},nt&&nt.type==="date"&&(at=d.encodeDate(at))),Ve?rt("yanchor",ce.yanchor=St(Se+Be)):(ot=function(xt){return St(Tt(xt)+Be)},wt&&wt.type==="date"&&(ot=d.encodeDate(ot))),rt("path",ce.path=m(ve,at,ot))}else Ue?rt("xanchor",ce.xanchor=Et(Ee+ft)):(rt("x0",ce.x0=Et(Me+ft)),rt("x1",ce.x1=Et(xe+ft))),Ve?rt("yanchor",ce.yanchor=St(Se+Be)):(rt("y0",ce.y0=St(we+Be)),rt("y1",ce.y1=St(De+Be)));ue.attr("d",c(oe,ce)),Qe(me,ce),s(oe,de,ce,ht)}function Ze(ft,Be){if($e){var je=function(Qt){return Qt},at=je,ot=je;Ue?rt("xanchor",ce.xanchor=Et(Ee+ft)):(at=function(Qt){return Et(lt(Qt)+ft)},nt&&nt.type==="date"&&(at=d.encodeDate(at))),Ve?rt("yanchor",ce.yanchor=St(Se+Be)):(ot=function(Qt){return St(Tt(Qt)+Be)},wt&&wt.type==="date"&&(ot=d.encodeDate(ot))),rt("path",ce.path=m(ve,at,ot))}else if(Ye){if(Ce==="resize-over-start-point"){var xt=Me+ft,yt=Ve?we-Be:we+Be;rt("x0",ce.x0=Ue?xt:Et(xt)),rt("y0",ce.y0=Ve?yt:St(yt))}else if(Ce==="resize-over-end-point"){var _t=xe+ft,gt=Ve?De-Be:De+Be;rt("x1",ce.x1=Ue?_t:Et(_t)),rt("y1",ce.y1=Ve?gt:St(gt))}}else{var Ct=function(Qt){return Ce.indexOf(Qt)!==-1},dt=Ct("n"),vt=Ct("s"),At=Ct("w"),Bt=Ct("e"),jt=dt?he+Be:he,Ut=vt?fe+Be:fe,tn=At?ae+ft:ae,Xt=Bt?be+ft:be;Ve&&(dt&&(jt=he-Be),vt&&(Ut=fe-Be)),(!Ve&&Ut-jt>ze||Ve&&jt-Ut>ze)&&(rt(Ie,ce[Ie]=Ve?jt:St(jt)),rt(Te,ce[Te]=Ve?Ut:St(Ut))),Xt-tn>Ae&&(rt(Ne,ce[Ne]=Ue?tn:Et(tn)),rt(qe,ce[qe]=Ue?Xt:Et(Xt)))}ue.attr("d",c(oe,ce)),Qe(me,ce),s(oe,de,ce,ht)}function Qe(ft,Be){(Ue||Ve)&&function(){var je=Be.type!=="path",at=ft.selectAll(".visual-cue").data([0]);at.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var ot=lt(Ue?Be.xanchor:i.midRange(je?[Be.x0,Be.x1]:d.extractPathCoords(Be.path,u.paramIsX))),xt=Tt(Ve?Be.yanchor:i.midRange(je?[Be.y0,Be.y1]:d.extractPathCoords(Be.path,u.paramIsY)));if(ot=d.roundPositionForSharpStrokeRendering(ot,1),xt=d.roundPositionForSharpStrokeRendering(xt,1),Ue&&Ve){var yt="M"+(ot-1-1)+","+(xt-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";at.attr("d",yt)}else if(Ue){var _t="M"+(ot-1-1)+","+(xt-9-1)+"v18 h2 v-18 Z";at.attr("d",_t)}else{var gt="M"+(ot-9-1)+","+(xt-1-1)+"h18 v2 h-18 Z";at.attr("d",gt)}}()}function st(ft){ft.selectAll(".visual-cue").remove()}o.init(zt),Ft.node().onmousemove=Je}(p,X,C,M,z,te):C.editable===!0&&X.style("pointer-events",Z||a.opacity(G)*D<=.5?"stroke":"all");X.node().addEventListener("click",function(){return function(oe,ue){if(f(oe)){var ce=+ue.node().getAttribute("data-index");if(ce>=0){if(ce===oe._fullLayout._activeShapeIndex)return void T(oe);oe._fullLayout._activeShapeIndex=ce,oe._fullLayout._deactivateShape=T,b(oe)}}}(p,X)})}C._input&&C.visible!==!1&&(C.layer!=="below"?O(p._fullLayout._shapeUpperLayer):C.xref==="paper"||C.yref==="paper"?O(p._fullLayout._shapeLowerLayer):P._hadPlotinfo?O((P.mainplotinfo||P).shapelayer):O(p._fullLayout._shapeLowerLayer))}function y(p,M,A){var C=(A.xref+A.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");r.setClipUrl(p,C?"clip"+M._fullLayout._uid+C:null,M)}function m(p,M,A){return p.replace(u.segmentRE,function(C){var P=0,O=C.charAt(0),z=u.paramIsX[O],B=u.paramIsY[O],Y=u.numParams[O];return O+C.substr(1).replace(u.paramRE,function(D){return P>=Y||(z[P]?D=M(D):B[P]&&(D=A(D)),P++),D})})}function T(p){f(p)&&p._fullLayout._activeShapeIndex>=0&&(t(p),delete p._fullLayout._activeShapeIndex,b(p))}R.exports={draw:b,drawOne:x,eraseActiveShape:function(p){if(f(p)){t(p);var M=p._fullLayout._activeShapeIndex,A=(p.layout||{}).shapes||[];if(M0&&xJ&&(ee="X"),ee});return W>J&&(X=X.replace(/[\s,]*X.*/,""),k.log("Ignoring extra params in segment "+j)),Z+X})}(v,s,a);if(v.xsizemode==="pixel"){var x=s(v.xanchor);r=x+v.x0,n=x+v.x1}else r=s(v.x0),n=s(v.x1);if(v.ysizemode==="pixel"){var y=a(v.yanchor);o=y-v.y0,l=y-v.y1}else o=a(v.y0),l=a(v.y1);if(u==="line")return"M"+r+","+o+"L"+n+","+l;if(u==="rect")return"M"+r+","+o+"H"+n+"V"+l+"H"+r+"Z";var m=(r+n)/2,T=(o+l)/2,p=Math.abs(m-r),M=Math.abs(T-o),A="A"+p+","+M,C=m+p+","+T;return"M"+C+A+" 0 1,1 "+m+","+(T-M)+A+" 0 0,1 "+C+"Z"}},89853:function(R,E,e){var _=e(34031);R.exports={moduleType:"component",name:"shapes",layoutAttributes:e(89827),supplyLayoutDefaults:e(84726),supplyDrawNewShapeDefaults:e(45547),includeBasePlot:e(76325)("shapes"),calcAutorange:e(5627),draw:_.draw,drawOne:_.drawOne}},37281:function(R){function E(i,w){return w?w.d2l(i):i}function e(i,w){return w?w.l2d(i):i}function _(i,w){return E(i.x1,w)-E(i.x0,w)}function k(i,w,v){return E(i.y1,v)-E(i.y0,v)}R.exports={x0:function(i){return i.x0},x1:function(i){return i.x1},y0:function(i){return i.y0},y1:function(i){return i.y1},slope:function(i,w,v){return i.type!=="line"?void 0:k(i,0,v)/_(i,w)},dx:_,dy:k,width:function(i,w){return Math.abs(_(i,w))},height:function(i,w,v){return Math.abs(k(i,0,v))},length:function(i,w,v){return i.type!=="line"?void 0:Math.sqrt(Math.pow(_(i,w),2)+Math.pow(k(i,0,v),2))},xcenter:function(i,w){return e((E(i.x1,w)+E(i.x0,w))/2,w)},ycenter:function(i,w,v){return e((E(i.y1,v)+E(i.y0,v))/2,v)}}},75067:function(R,E,e){var _=e(41940),k=e(35025),i=e(1426).extendDeepAll,w=e(30962).overrideAll,v=e(85594),h=e(44467).templatedArray,s=e(98292),t=h("step",{visible:{valType:"boolean",dflt:!0},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}});R.exports=w(h("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:t,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:i(k({editType:"arraydraw"}),{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:v.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:_({})},font:_({}),activebgcolor:{valType:"color",dflt:s.gripBgActiveColor},bgcolor:{valType:"color",dflt:s.railBgColor},bordercolor:{valType:"color",dflt:s.railBorderColor},borderwidth:{valType:"number",min:0,dflt:s.railBorderWidth},ticklen:{valType:"number",min:0,dflt:s.tickLength},tickcolor:{valType:"color",dflt:s.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:s.minorTickLength}}),"arraydraw","from-root")},98292:function(R){R.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},12343:function(R,E,e){var _=e(71828),k=e(85501),i=e(75067),w=e(98292).name,v=i.steps;function h(t,a,r){function n(c,b){return _.coerce(t,a,i,c,b)}for(var o=k(t,a,{name:"steps",handleItemDefaults:s}),l=0,u=0;u0&&(W=W.transition().duration(B.transition.duration).ease(B.transition.easing)),W.attr("transform",h(j-.5*a.gripWidth,B._dims.currentValueTotalHeight))}}function A(z,B){var Y=z._dims;return Y.inputAreaStart+a.stepInset+(Y.inputAreaLength-2*a.stepInset)*Math.min(1,Math.max(0,B))}function C(z,B){var Y=z._dims;return Math.min(1,Math.max(0,(B-a.stepInset-Y.inputAreaStart)/(Y.inputAreaLength-2*a.stepInset-2*Y.inputAreaStart)))}function P(z,B,Y){var D=Y._dims,G=v.ensureSingle(z,"rect",a.railTouchRectClass,function(U){U.call(T,B,z,Y).style("pointer-events","all")});G.attr({width:D.inputAreaLength,height:Math.max(D.inputAreaWidth,a.tickOffset+Y.ticklen+D.labelHeight)}).call(i.fill,Y.bgcolor).attr("opacity",0),w.setTranslate(G,0,D.currentValueTotalHeight)}function O(z,B){var Y=B._dims,D=Y.inputAreaLength-2*a.railInset,G=v.ensureSingle(z,"rect",a.railRectClass);G.attr({width:D,height:a.railWidth,rx:a.railRadius,ry:a.railRadius,"shape-rendering":"crispEdges"}).call(i.stroke,B.bordercolor).call(i.fill,B.bgcolor).style("stroke-width",B.borderwidth+"px"),w.setTranslate(G,a.railInset,.5*(Y.inputAreaWidth-a.railWidth)+Y.currentValueTotalHeight)}R.exports=function(z){var B=z._context.staticPlot,Y=z._fullLayout,D=function(ie,te){for(var J=ie[a.name],X=[],ee=0;ee0?[0]:[]);function U(ie){ie._commandObserver&&(ie._commandObserver.remove(),delete ie._commandObserver),k.autoMargin(z,u(ie))}if(G.enter().append("g").classed(a.containerClassName,!0).style("cursor",B?null:"ew-resize"),G.exit().each(function(){_.select(this).selectAll("g."+a.groupClassName).each(U)}).remove(),D.length!==0){var j=G.selectAll("g."+a.groupClassName).data(D,d);j.enter().append("g").classed(a.groupClassName,!0),j.exit().each(U).remove();for(var W=0;W0||xe<0){var he={left:[-De,0],right:[De,0],top:[0,-De],bottom:[0,De]}[y.side];X.attr("transform",h(he[0],he[1]))}}}return W.call(Z),G&&(O?W.on(".opacity",null):(A=0,C=!0,W.text(f).on("mouseover.opacity",function(){_.select(this).transition().duration(r.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){_.select(this).transition().duration(r.HIDE_PLACEHOLDER).style("opacity",0)})),W.call(a.makeEditable,{gd:l}).on("edit",function(J){x!==void 0?w.call("_guiRestyle",l,g,J,x):w.call("_guiRelayout",l,g,J)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Z)}).on("input",function(J){this.text(J||" ").call(a.positionText,m.x,m.y)})),W.classed("js-placeholder",C),p}}},7163:function(R,E,e){var _=e(41940),k=e(22399),i=e(1426).extendFlat,w=e(30962).overrideAll,v=e(35025),h=e(44467).templatedArray,s=h("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});R.exports=w(h("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:s,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:i(v({editType:"arraydraw"}),{}),font:_({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:k.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},75909:function(R){R.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"◄",right:"►",up:"▲",down:"▼"}}},64897:function(R,E,e){var _=e(71828),k=e(85501),i=e(7163),w=e(75909).name,v=i.buttons;function h(t,a,r){function n(o,l){return _.coerce(t,a,i,o,l)}n("visible",k(t,a,{name:"buttons",handleItemDefaults:s}).length>0)&&(n("active"),n("direction"),n("type"),n("showactive"),n("x"),n("y"),_.noneOrAll(t,a,["x","y"]),n("xanchor"),n("yanchor"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),_.coerceFont(n,"font",r.font),n("bgcolor",r.paper_bgcolor),n("bordercolor"),n("borderwidth"))}function s(t,a){function r(n,o){return _.coerce(t,a,v,n,o)}r("visible",t.method==="skip"||Array.isArray(t.args))&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}R.exports=function(t,a){k(t,a,{name:w,handleItemDefaults:h})}},13689:function(R,E,e){var _=e(39898),k=e(74875),i=e(7901),w=e(91424),v=e(71828),h=e(63893),s=e(44467).arrayEditor,t=e(18783).LINE_SPACING,a=e(75909),r=e(25849);function n(A){return A._index}function o(A,C){return+A.attr(a.menuIndexAttrName)===C._index}function l(A,C,P,O,z,B,Y,D){C.active=Y,s(A.layout,a.name,C).applyUpdate("active",Y),C.type==="buttons"?d(A,O,null,null,C):C.type==="dropdown"&&(z.attr(a.menuIndexAttrName,"-1"),u(A,O,z,B,C),D||d(A,O,z,B,C))}function u(A,C,P,O,z){var B=v.ensureSingle(C,"g",a.headerClassName,function(W){W.style("pointer-events","all")}),Y=z._dims,D=z.active,G=z.buttons[D]||a.blankHeaderOpts,U={y:z.pad.t,yPad:0,x:z.pad.l,xPad:0,index:0},j={width:Y.headerWidth,height:Y.headerHeight};B.call(c,z,G,A).call(p,z,U,j),v.ensureSingle(C,"text",a.headerArrowClassName,function(W){W.attr("text-anchor","end").call(w.font,z.font).text(a.arrowSymbol[z.direction])}).attr({x:Y.headerWidth-a.arrowOffsetX+z.pad.l,y:Y.headerHeight/2+a.textOffsetY+z.pad.t}),B.on("click",function(){P.call(M,String(o(P,z)?-1:z._index)),d(A,C,P,O,z)}),B.on("mouseover",function(){B.call(x)}),B.on("mouseout",function(){B.call(y,z)}),w.setTranslate(C,Y.lx,Y.ly)}function d(A,C,P,O,z){P||(P=C).attr("pointer-events","all");var B=function(X){return+X.attr(a.menuIndexAttrName)==-1}(P)&&z.type!=="buttons"?[]:z.buttons,Y=z.type==="dropdown"?a.dropdownButtonClassName:a.buttonClassName,D=P.selectAll("g."+Y).data(v.filterVisible(B)),G=D.enter().append("g").classed(Y,!0),U=D.exit();z.type==="dropdown"?(G.attr("opacity","0").transition().attr("opacity","1"),U.transition().attr("opacity","0").remove()):U.remove();var j=0,W=0,Z=z._dims,ie=["up","down"].indexOf(z.direction)!==-1;z.type==="dropdown"&&(ie?W=Z.headerHeight+a.gapButtonHeader:j=Z.headerWidth+a.gapButtonHeader),z.type==="dropdown"&&z.direction==="up"&&(W=-a.gapButtonHeader+a.gapButton-Z.openHeight),z.type==="dropdown"&&z.direction==="left"&&(j=-a.gapButtonHeader+a.gapButton-Z.openWidth);var te={x:Z.lx+j+z.pad.l,y:Z.ly+W+z.pad.t,yPad:a.gapButton,xPad:a.gapButton,index:0},J={l:te.x+z.borderwidth,t:te.y+z.borderwidth};D.each(function(X,ee){var re=_.select(this);re.call(c,z,X,A).call(p,z,te),re.on("click",function(){_.event.defaultPrevented||(X.execute&&(X.args2&&z.active===ee?(l(A,z,0,C,P,O,-1),k.executeAPICommand(A,X.method,X.args2)):(l(A,z,0,C,P,O,ee),k.executeAPICommand(A,X.method,X.args))),A.emit("plotly_buttonclicked",{menu:z,button:X,active:z.active}))}),re.on("mouseover",function(){re.call(x)}),re.on("mouseout",function(){re.call(y,z),D.call(f,z)})}),D.call(f,z),ie?(J.w=Math.max(Z.openWidth,Z.headerWidth),J.h=te.y-J.t):(J.w=te.x-J.l,J.h=Math.max(Z.openHeight,Z.headerHeight)),J.direction=z.direction,O&&(D.size()?function(X,ee,re,oe,ue,ce){var de,me,_e,Me=ue.direction,we=Me==="up"||Me==="down",xe=ue._dims,De=ue.active;if(we)for(me=0,_e=0;_e0?[0]:[]);if(z.enter().append("g").classed(a.containerClassName,!0).style("cursor","pointer"),z.exit().each(function(){_.select(this).selectAll("g."+a.headerGroupClassName).each(O)}).remove(),P.length!==0){var B=z.selectAll("g."+a.headerGroupClassName).data(P,n);B.enter().append("g").classed(a.headerGroupClassName,!0);for(var Y=v.ensureSingle(z,"g",a.dropdownButtonGroupClassName,function(W){W.style("pointer-events","all")}),D=0;Dp,C=v.barLength+2*v.barPad,P=v.barWidth+2*v.barPad,O=c,z=g+f;z+P>n&&(z=n-P);var B=this.container.selectAll("rect.scrollbar-horizontal").data(A?[0]:[]);B.exit().on(".drag",null).remove(),B.enter().append("rect").classed("scrollbar-horizontal",!0).call(k.fill,v.barColor),A?(this.hbar=B.attr({rx:v.barRadius,ry:v.barRadius,x:O,y:z,width:C,height:P}),this._hbarXMin=O+C/2,this._hbarTranslateMax=p-C):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var Y=f>M,D=v.barWidth+2*v.barPad,G=v.barLength+2*v.barPad,U=c+b,j=g;U+D>r&&(U=r-D);var W=this.container.selectAll("rect.scrollbar-vertical").data(Y?[0]:[]);W.exit().on(".drag",null).remove(),W.enter().append("rect").classed("scrollbar-vertical",!0).call(k.fill,v.barColor),Y?(this.vbar=W.attr({rx:v.barRadius,ry:v.barRadius,x:U,y:j,width:D,height:G}),this._vbarYMin=j+G/2,this._vbarTranslateMax=M-G):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var Z=this.id,ie=o-.5,te=Y?l+D+.5:l+.5,J=u-.5,X=A?d+P+.5:d+.5,ee=a._topdefs.selectAll("#"+Z).data(A||Y?[0]:[]);if(ee.exit().remove(),ee.enter().append("clipPath").attr("id",Z).append("rect"),A||Y?(this._clipRect=ee.select("rect").attr({x:Math.floor(ie),y:Math.floor(J),width:Math.ceil(te)-Math.floor(ie),height:Math.ceil(X)-Math.floor(J)}),this.container.call(i.setClipUrl,Z,this.gd),this.bg.attr({x:c,y:g,width:b,height:f})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),A||Y){var re=_.behavior.drag().on("dragstart",function(){_.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(re);var oe=_.behavior.drag().on("dragstart",function(){_.event.sourceEvent.preventDefault(),_.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));A&&this.hbar.on(".drag",null).call(oe),Y&&this.vbar.on(".drag",null).call(oe)}this.setTranslate(s,t)},v.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},v.prototype._onBoxDrag=function(){var h=this.translateX,s=this.translateY;this.hbar&&(h-=_.event.dx),this.vbar&&(s-=_.event.dy),this.setTranslate(h,s)},v.prototype._onBoxWheel=function(){var h=this.translateX,s=this.translateY;this.hbar&&(h+=_.event.deltaY),this.vbar&&(s+=_.event.deltaY),this.setTranslate(h,s)},v.prototype._onBarDrag=function(){var h=this.translateX,s=this.translateY;if(this.hbar){var t=h+this._hbarXMin,a=t+this._hbarTranslateMax;h=(w.constrain(_.event.x,t,a)-t)/(a-t)*(this.position.w-this._box.w)}if(this.vbar){var r=s+this._vbarYMin,n=r+this._vbarTranslateMax;s=(w.constrain(_.event.y,r,n)-r)/(n-r)*(this.position.h-this._box.h)}this.setTranslate(h,s)},v.prototype.setTranslate=function(h,s){var t=this.position.w-this._box.w,a=this.position.h-this._box.h;if(h=w.constrain(h||0,0,t),s=w.constrain(s||0,0,a),this.translateX=h,this.translateY=s,this.container.call(i.setTranslate,this._box.l-this.position.l-h,this._box.t-this.position.t-s),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+h-.5),y:Math.floor(this.position.t+s-.5)}),this.hbar){var r=h/t;this.hbar.call(i.setTranslate,h+r*this._hbarTranslateMax,s)}if(this.vbar){var n=s/a;this.vbar.call(i.setTranslate,h,s+n*this._vbarTranslateMax)}}},18783:function(R){R.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}},24695:function(R){R.exports={axisRefDescription:function(E,e,_){return["If set to a",E,"axis id (e.g. *"+E+"* or","*"+E+"2*), the `"+E+"` position refers to a",E,"coordinate. If set to *paper*, the `"+E+"`","position refers to the distance from the",e,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",e,"("+_+"). If set to a",E,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",e,"of the domain of that axis: e.g.,","*"+E+"2 domain* refers to the domain of the second",E," axis and a",E,"position of 0.5 refers to the","point between the",e,"and the",_,"of the domain of the","second",E,"axis."].join(" ")}}},22372:function(R){R.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}},31562:function(R){R.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}},74808:function(R){R.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},29659:function(R){R.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}},87381:function(R){R.exports={circle:"●","circle-open":"○",square:"■","square-open":"□",diamond:"◆","diamond-open":"◇",cross:"+",x:"❌"}},37822:function(R){R.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},50606:function(R){R.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:24405875e-1,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"−"}},32396:function(R,E){E.CSS_DECLARATIONS=[["image-rendering","optimizeSpeed"],["image-rendering","-moz-crisp-edges"],["image-rendering","-o-crisp-edges"],["image-rendering","-webkit-optimize-contrast"],["image-rendering","optimize-contrast"],["image-rendering","crisp-edges"],["image-rendering","pixelated"]],E.STYLE=E.CSS_DECLARATIONS.map(function(e){return e.join(": ")+"; "}).join("")},77922:function(R,E){E.xmlns="http://www.w3.org/2000/xmlns/",E.svg="http://www.w3.org/2000/svg",E.xlink="http://www.w3.org/1999/xlink",E.svgAttrs={xmlns:E.svg,"xmlns:xlink":E.xlink}},8729:function(R,E,e){E.version=e(11506).version,e(7417),e(98847);for(var _=e(73972),k=E.register=_.register,i=e(10641),w=Object.keys(i),v=0;v",""," ",""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}},99863:function(R,E){E.isLeftAnchor=function(e){return e.xanchor==="left"||e.xanchor==="auto"&&e.x<=.3333333333333333},E.isCenterAnchor=function(e){return e.xanchor==="center"||e.xanchor==="auto"&&e.x>.3333333333333333&&e.x<.6666666666666666},E.isRightAnchor=function(e){return e.xanchor==="right"||e.xanchor==="auto"&&e.x>=.6666666666666666},E.isTopAnchor=function(e){return e.yanchor==="top"||e.yanchor==="auto"&&e.y>=.6666666666666666},E.isMiddleAnchor=function(e){return e.yanchor==="middle"||e.yanchor==="auto"&&e.y>.3333333333333333&&e.y<.6666666666666666},E.isBottomAnchor=function(e){return e.yanchor==="bottom"||e.yanchor==="auto"&&e.y<=.3333333333333333}},26348:function(R,E,e){var _=e(64872),k=_.mod,i=_.modHalf,w=Math.PI,v=2*w;function h(r){return Math.abs(r[1]-r[0])>v-1e-14}function s(r,n){return i(n-r,v)}function t(r,n){if(h(n))return!0;var o,l;n[0](l=k(l,v))&&(l+=v);var u=k(r,v),d=u+v;return u>=o&&u<=l||d>=o&&d<=l}function a(r,n,o,l,u,d,c){u=u||0,d=d||0;var b,g,f,x,y,m=h([o,l]);function T(C,P){return[C*Math.cos(P)+u,d-C*Math.sin(P)]}m?(b=0,g=w,f=v):o=u&&r<=d);var u,d},pathArc:function(r,n,o,l,u){return a(null,r,n,o,l,u,0)},pathSector:function(r,n,o,l,u){return a(null,r,n,o,l,u,1)},pathAnnulus:function(r,n,o,l,u,d){return a(r,n,o,l,u,d,1)}}},73627:function(R,E){var e=Array.isArray,_=ArrayBuffer,k=DataView;function i(h){return _.isView(h)&&!(h instanceof k)}function w(h){return e(h)||i(h)}function v(h,s,t){if(w(h)){if(w(h[0])){for(var a=t,r=0;rd.max?l.set(u):l.set(+o)}},integer:{coerceFunction:function(o,l,u,d){o%1||!_(o)||d.min!==void 0&&od.max?l.set(u):l.set(+o)}},string:{coerceFunction:function(o,l,u,d){if(typeof o!="string"){var c=typeof o=="number";d.strict!==!0&&c?l.set(String(o)):l.set(u)}else d.noBlank&&!o?l.set(u):l.set(o)}},color:{coerceFunction:function(o,l,u){k(o).isValid()?l.set(o):l.set(u)}},colorlist:{coerceFunction:function(o,l,u){Array.isArray(o)&&o.length&&o.every(function(d){return k(d).isValid()})?l.set(o):l.set(u)}},colorscale:{coerceFunction:function(o,l,u){l.set(w.get(o,u))}},angle:{coerceFunction:function(o,l,u){o==="auto"?l.set("auto"):_(o)?l.set(a(+o,360)):l.set(u)}},subplotid:{coerceFunction:function(o,l,u,d){var c=d.regex||t(u);typeof o=="string"&&c.test(o)?l.set(o):l.set(u)},validateFunction:function(o,l){var u=l.dflt;return o===u||typeof o=="string"&&!!t(u).test(o)}},flaglist:{coerceFunction:function(o,l,u,d){if((d.extras||[]).indexOf(o)===-1)if(typeof o=="string"){for(var c=o.split("+"),b=0;b=_&&B<=k?B:t}if(typeof B!="string"&&typeof B!="number")return t;B=String(B);var j=f(Y),W=B.charAt(0);!j||W!=="G"&&W!=="g"||(B=B.substr(1),Y="");var Z=j&&Y.substr(0,7)==="chinese",ie=B.match(Z?b:c);if(!ie)return t;var te=ie[1],J=ie[3]||"1",X=Number(ie[5]||1),ee=Number(ie[7]||0),re=Number(ie[9]||0),oe=Number(ie[11]||0);if(j){if(te.length===2)return t;var ue;te=Number(te);try{var ce=u.getComponentMethod("calendars","getCal")(Y);if(Z){var de=J.charAt(J.length-1)==="i";J=parseInt(J,10),ue=ce.newDate(te,ce.toMonthIndex(te,J,de),X)}else ue=ce.newDate(te,Number(J),X)}catch{return t}return ue?(ue.toJD()-l)*a+ee*r+re*n+oe*o:t}te=te.length===2?(Number(te)+2e3-g)%100+g:Number(te),J-=1;var me=new Date(Date.UTC(2e3,J,X,ee,re));return me.setUTCFullYear(te),me.getUTCMonth()!==J||me.getUTCDate()!==X?t:me.getTime()+oe*o},_=E.MIN_MS=E.dateTime2ms("-9999"),k=E.MAX_MS=E.dateTime2ms("9999-12-31 23:59:59.9999"),E.isDateTime=function(B,Y){return E.dateTime2ms(B,Y)!==t};var y=90*a,m=3*r,T=5*n;function p(B,Y,D,G,U){if((Y||D||G||U)&&(B+=" "+x(Y,2)+":"+x(D,2),(G||U)&&(B+=":"+x(G,2),U))){for(var j=4;U%10==0;)j-=1,U/=10;B+="."+x(U,j)}return B}E.ms2DateTime=function(B,Y,D){if(typeof B!="number"||!(B>=_&&B<=k))return t;Y||(Y=0);var G,U,j,W,Z,ie,te=Math.floor(10*h(B+.05,1)),J=Math.round(B-te/10);if(f(D)){var X=Math.floor(J/a)+l,ee=Math.floor(h(B,a));try{G=u.getComponentMethod("calendars","getCal")(D).fromJD(X).formatDate("yyyy-mm-dd")}catch{G=d("G%Y-%m-%d")(new Date(J))}if(G.charAt(0)==="-")for(;G.length<11;)G="-0"+G.substr(1);else for(;G.length<10;)G="0"+G;U=Y=_+a&&B<=k-a))return t;var Y=Math.floor(10*h(B+.05,1)),D=new Date(Math.round(B-Y/10));return p(i("%Y-%m-%d")(D),D.getHours(),D.getMinutes(),D.getSeconds(),10*D.getUTCMilliseconds()+Y)},E.cleanDate=function(B,Y,D){if(B===t)return Y;if(E.isJSDate(B)||typeof B=="number"&&isFinite(B)){if(f(D))return v.error("JS Dates and milliseconds are incompatible with world calendars",B),Y;if(!(B=E.ms2DateTimeLocal(+B))&&Y!==void 0)return Y}else if(!E.isDateTime(B,D))return v.error("unrecognized date",B),Y;return B};var M=/%\d?f/g,A=/%h/g,C={1:"1",2:"1",3:"2",4:"2"};function P(B,Y,D,G){B=B.replace(M,function(j){var W=Math.min(+j.charAt(1)||6,6);return(Y/1e3%1+2).toFixed(W).substr(2).replace(/0+$/,"")||"0"});var U=new Date(Math.floor(Y+.05));if(B=B.replace(A,function(){return C[D("%q")(U)]}),f(G))try{B=u.getComponentMethod("calendars","worldCalFmt")(B,Y,G)}catch{return"Invalid"}return D(B)(U)}var O=[59,59.9,59.99,59.999,59.9999];E.formatDate=function(B,Y,D,G,U,j){if(U=f(U)&&U,!Y)if(D==="y")Y=j.year;else if(D==="m")Y=j.month;else{if(D!=="d")return function(W,Z){var ie=h(W+.05,a),te=x(Math.floor(ie/r),2)+":"+x(h(Math.floor(ie/n),60),2);if(Z!=="M"){w(Z)||(Z=0);var J=(100+Math.min(h(W/o,60),O[Z])).toFixed(Z).substr(1);Z>0&&(J=J.replace(/0+$/,"").replace(/[\.]$/,"")),te+=":"+J}return te}(B,D)+` `+P(j.dayMonthYear,B,G,U);Y=j.dayMonth+` `+j.year}return P(Y,B,G,U)};var z=3*a;E.incrementMonth=function(B,Y,D){D=f(D)&&D;var G=h(B,a);if(B=Math.round(B-G),D)try{var U=Math.round(B/a)+l,j=u.getComponentMethod("calendars","getCal")(D),W=j.fromJD(U);return Y%12?j.add(W,Y,"m"):j.add(W,Y/12,"y"),(W.toJD()-l)*a+G}catch{v.error("invalid ms "+B+" in calendar "+D)}var Z=new Date(B+z);return Z.setUTCMonth(Z.getUTCMonth()+Y)+G-z},E.findExactDates=function(B,Y){for(var D,G,U=0,j=0,W=0,Z=0,ie=f(Y)&&u.getComponentMethod("calendars","getCal")(Y),te=0;te0&&p[M+1][0]<0)return M;return null}switch(d=y==="RUS"||y==="FJI"?function(p){var M;if(T(p)===null)M=p;else for(M=new Array(p.length),g=0;gM?A[C++]=[p[g][0]+360,p[g][1]]:g===M?(A[C++]=p[g],A[C++]=[p[g][0],-90]):A[C++]=p[g];var P=r.tester(A);P.pts.pop(),m.push(P)}:function(p){m.push(r.tester(p))},f.type){case"MultiPolygon":for(c=0;cD&&(D=j,z=U)}else z=B;return w.default(z).geometry.coordinates}(P),A.fIn=p,A.fOut=P,f.push(P)}else s.log(["Location",A.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete g[M]}switch(c.type){case"FeatureCollection":var m=c.features;for(b=0;b100?(clearInterval(M),T("Unexpected error while fetching from "+y)):void p++},50)})}for(var f=0;f0&&(w.push(v),v=[])}return v.length>0&&w.push(v),w},E.makeLine=function(k){return k.length===1?{type:"LineString",coordinates:k[0]}:{type:"MultiLineString",coordinates:k}},E.makePolygon=function(k){if(k.length===1)return{type:"Polygon",coordinates:k};for(var i=new Array(k.length),w=0;w1||m<0||m>1?null:{x:s+d*m,y:t+g*m}}function h(s,t,a,r,n){var o=r*s+n*t;if(o<0)return r*r+n*n;if(o>a){var l=r-s,u=n-t;return l*l+u*u}var d=r*t-n*s;return d*d/a}E.segmentsIntersect=v,E.segmentDistance=function(s,t,a,r,n,o,l,u){if(v(s,t,a,r,n,o,l,u))return 0;var d=a-s,c=r-t,b=l-n,g=u-o,f=d*d+c*c,x=b*b+g*g,y=Math.min(h(d,c,f,n-s,o-t),h(d,c,f,l-s,u-t),h(b,g,x,s-n,t-o),h(b,g,x,a-n,r-o));return Math.sqrt(y)},E.getTextLocation=function(s,t,a,r){if(s===k&&r===i||(_={},k=s,i=r),_[a])return _[a];var n=s.getPointAtLength(w(a-r/2,t)),o=s.getPointAtLength(w(a+r/2,t)),l=Math.atan((o.y-n.y)/(o.x-n.x)),u=s.getPointAtLength(w(a,t)),d={x:(4*u.x+n.x+o.x)/6,y:(4*u.y+n.y+o.y)/6,theta:l};return _[a]=d,d},E.clearLocationCache=function(){k=null},E.getVisibleSegment=function(s,t,a){var r,n,o=t.left,l=t.right,u=t.top,d=t.bottom,c=0,b=s.getTotalLength(),g=b;function f(y){var m=s.getPointAtLength(y);y===0?r=m:y===b&&(n=m);var T=m.xl?m.x-l:0,p=m.yd?m.y-d:0;return Math.sqrt(T*T+p*p)}for(var x=f(c);x;){if((c+=x+a)>g)return;x=f(c)}for(x=f(g);x;){if(c>(g-=x+a))return;x=f(g)}return{min:c,max:g,len:g-c,total:b,isClosed:c===0&&g===b&&Math.abs(r.x-n.x)<.1&&Math.abs(r.y-n.y)<.1}},E.findPointOnPath=function(s,t,a,r){for(var n,o,l,u=(r=r||{}).pathLength||s.getTotalLength(),d=r.tolerance||.001,c=r.iterationLimit||30,b=s.getPointAtLength(0)[a]>s.getPointAtLength(u)[a]?-1:1,g=0,f=0,x=u;g0?x=n:f=n,g++}return o}},81697:function(R,E,e){var _=e(92770),k=e(84267),i=e(25075),w=e(21081),v=e(22399).defaultLine,h=e(73627).isArrayOrTypedArray,s=i(v);function t(n,o){var l=n;return l[3]*=o,l}function a(n){if(_(n))return s;var o=i(n);return o.length?o:s}function r(n){return _(n)?n:1}R.exports={formatColor:function(n,o,l){var u,d,c,b,g,f=n.color,x=h(f),y=h(o),m=w.extractOpts(n),T=[];if(u=m.colorscale!==void 0?w.makeColorScaleFuncFromTrace(n):a,d=x?function(M,A){return M[A]===void 0?s:i(u(M[A]))}:a,c=y?function(M,A){return M[A]===void 0?1:r(M[A])}:r,x||y)for(var p=0;p1?(_*E+_*e)/_:E+e,i=String(k).length;if(i>16){var w=String(e).length;if(i>=String(E).length+w){var v=parseFloat(k).toPrecision(12);v.indexOf("e+")===-1&&(k=+v)}}return k}},71828:function(R,E,e){var _=e(39898),k=e(84096).g0,i=e(60721).WU,w=e(92770),v=e(50606),h=v.FP_SAFE,s=-h,t=v.BADNUM,a=R.exports={};a.adjustFormat=function(X){return!X||/^\d[.]\df/.test(X)||/[.]\d%/.test(X)?X:X==="0.f"?"~f":/^\d%/.test(X)?"~%":/^\ds/.test(X)?"~s":!/^[~,.0$]/.test(X)&&/[&fps]/.test(X)?"~"+X:X};var r={};a.warnBadFormat=function(X){var ee=String(X);r[ee]||(r[ee]=1,a.warn('encountered bad format: "'+ee+'"'))},a.noFormat=function(X){return String(X)},a.numberFormat=function(X){var ee;try{ee=i(a.adjustFormat(X))}catch{return a.warnBadFormat(X),a.noFormat}return ee},a.nestedProperty=e(65487),a.keyedContainer=e(66636),a.relativeAttr=e(6962),a.isPlainObject=e(41965),a.toLogRange=e(58163),a.relinkPrivateKeys=e(51332);var n=e(73627);a.isTypedArray=n.isTypedArray,a.isArrayOrTypedArray=n.isArrayOrTypedArray,a.isArray1D=n.isArray1D,a.ensureArray=n.ensureArray,a.concat=n.concat,a.maxRowLength=n.maxRowLength,a.minRowLength=n.minRowLength;var o=e(64872);a.mod=o.mod,a.modHalf=o.modHalf;var l=e(96554);a.valObjectMeta=l.valObjectMeta,a.coerce=l.coerce,a.coerce2=l.coerce2,a.coerceFont=l.coerceFont,a.coercePattern=l.coercePattern,a.coerceHoverinfo=l.coerceHoverinfo,a.coerceSelectionMarkerOpacity=l.coerceSelectionMarkerOpacity,a.validate=l.validate;var u=e(41631);a.dateTime2ms=u.dateTime2ms,a.isDateTime=u.isDateTime,a.ms2DateTime=u.ms2DateTime,a.ms2DateTimeLocal=u.ms2DateTimeLocal,a.cleanDate=u.cleanDate,a.isJSDate=u.isJSDate,a.formatDate=u.formatDate,a.incrementMonth=u.incrementMonth,a.dateTick0=u.dateTick0,a.dfltRange=u.dfltRange,a.findExactDates=u.findExactDates,a.MIN_MS=u.MIN_MS,a.MAX_MS=u.MAX_MS;var d=e(65888);a.findBin=d.findBin,a.sorterAsc=d.sorterAsc,a.sorterDes=d.sorterDes,a.distinctVals=d.distinctVals,a.roundUp=d.roundUp,a.sort=d.sort,a.findIndexOfMin=d.findIndexOfMin,a.sortObjectKeys=e(78607);var c=e(80038);a.aggNums=c.aggNums,a.len=c.len,a.mean=c.mean,a.median=c.median,a.midRange=c.midRange,a.variance=c.variance,a.stdev=c.stdev,a.interp=c.interp;var b=e(35657);a.init2dArray=b.init2dArray,a.transposeRagged=b.transposeRagged,a.dot=b.dot,a.translationMatrix=b.translationMatrix,a.rotationMatrix=b.rotationMatrix,a.rotationXYMatrix=b.rotationXYMatrix,a.apply3DTransform=b.apply3DTransform,a.apply2DTransform=b.apply2DTransform,a.apply2DTransform2=b.apply2DTransform2,a.convertCssMatrix=b.convertCssMatrix,a.inverseTransformMatrix=b.inverseTransformMatrix;var g=e(26348);a.deg2rad=g.deg2rad,a.rad2deg=g.rad2deg,a.angleDelta=g.angleDelta,a.angleDist=g.angleDist,a.isFullCircle=g.isFullCircle,a.isAngleInsideSector=g.isAngleInsideSector,a.isPtInsideSector=g.isPtInsideSector,a.pathArc=g.pathArc,a.pathSector=g.pathSector,a.pathAnnulus=g.pathAnnulus;var f=e(99863);a.isLeftAnchor=f.isLeftAnchor,a.isCenterAnchor=f.isCenterAnchor,a.isRightAnchor=f.isRightAnchor,a.isTopAnchor=f.isTopAnchor,a.isMiddleAnchor=f.isMiddleAnchor,a.isBottomAnchor=f.isBottomAnchor;var x=e(87642);a.segmentsIntersect=x.segmentsIntersect,a.segmentDistance=x.segmentDistance,a.getTextLocation=x.getTextLocation,a.clearLocationCache=x.clearLocationCache,a.getVisibleSegment=x.getVisibleSegment,a.findPointOnPath=x.findPointOnPath;var y=e(1426);a.extendFlat=y.extendFlat,a.extendDeep=y.extendDeep,a.extendDeepAll=y.extendDeepAll,a.extendDeepNoArrays=y.extendDeepNoArrays;var m=e(47769);a.log=m.log,a.warn=m.warn,a.error=m.error;var T=e(30587);a.counterRegex=T.counter;var p=e(79990);a.throttle=p.throttle,a.throttleDone=p.done,a.clearThrottle=p.clear;var M=e(24401);function A(X){var ee={};for(var re in X)for(var oe=X[re],ue=0;ueh||X=ee)&&w(X)&&X>=0&&X%1==0},a.noop=e(64213),a.identity=e(23389),a.repeat=function(X,ee){for(var re=new Array(ee),oe=0;oere?Math.max(re,Math.min(ee,X)):Math.max(ee,Math.min(re,X))},a.bBoxIntersect=function(X,ee,re){return re=re||0,X.left<=ee.right+re&&ee.left<=X.right+re&&X.top<=ee.bottom+re&&ee.top<=X.bottom+re},a.simpleMap=function(X,ee,re,oe,ue){for(var ce=X.length,de=new Array(ce),me=0;me=Math.pow(2,re)?ue>10?(a.warn("randstr failed uniqueness"),_e):X(ee,re,oe,(ue||0)+1):_e},a.OptionControl=function(X,ee){X||(X={}),ee||(ee="opt");var re={optionList:[],_newoption:function(oe){oe[ee]=X,re[oe.name]=oe,re.optionList.push(oe)}};return re["_"+ee]=X,re},a.smooth=function(X,ee){if((ee=Math.round(ee)||0)<2)return X;var re,oe,ue,ce,de=X.length,me=2*de,_e=2*ee-1,Me=new Array(_e),we=new Array(de);for(re=0;re<_e;re++)Me[re]=(1-Math.cos(Math.PI*(re+1)/ee))/(2*ee);for(re=0;re=me&&(ue-=me*Math.floor(ue/me)),ue<0?ue=-1-ue:ue>=de&&(ue=me-1-ue),ce+=X[ue]*Me[oe];we[re]=ce}return we},a.syncOrAsync=function(X,ee,re){var oe;function ue(){return a.syncOrAsync(X,ee,re)}for(;X.length;)if((oe=(0,X.splice(0,1)[0])(ee))&&oe.then)return oe.then(ue);return re&&re(ee)},a.stripTrailingSlash=function(X){return X.substr(-1)==="/"?X.substr(0,X.length-1):X},a.noneOrAll=function(X,ee,re){if(X){var oe,ue=!1,ce=!0;for(oe=0;oe0?ue:0})},a.fillArray=function(X,ee,re,oe){if(oe=oe||a.identity,a.isArrayOrTypedArray(X))for(var ue=0;ue1?ue+de[1]:"";if(ce&&(de.length>1||me.length>4||re))for(;oe.test(me);)me=me.replace(oe,"$1"+ce+"$2");return me+_e},a.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var Y=/^\w*$/;a.templateString=function(X,ee){var re={};return X.replace(a.TEMPLATE_STRING_REGEX,function(oe,ue){var ce;return Y.test(ue)?ce=ee[ue]:(re[ue]=re[ue]||a.nestedProperty(ee,ue).get,ce=re[ue]()),a.isValidTextValue(ce)?ce:""})};var D={max:10,count:0,name:"hovertemplate"};a.hovertemplateString=function(){return Z.apply(D,arguments)};var G={max:10,count:0,name:"texttemplate"};a.texttemplateString=function(){return Z.apply(G,arguments)};var U=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/,j={max:10,count:0,name:"texttemplate",parseMultDiv:!0};a.texttemplateStringForShapes=function(){return Z.apply(j,arguments)};var W=/^[:|\|]/;function Z(X,ee,re){var oe=this,ue=arguments;ee||(ee={});var ce={};return X.replace(a.TEMPLATE_STRING_REGEX,function(de,me,_e){var Me=me==="_xother"||me==="_yother",we=me==="_xother_"||me==="_yother_",xe=me==="xother_"||me==="yother_",De=me==="xother"||me==="yother"||Me||xe||we,Ee=me;(Me||we)&&(Ee=Ee.substring(1)),(xe||we)&&(Ee=Ee.substring(0,Ee.length-1));var Se,he,fe,ae=null,be=null;if(oe.parseMultDiv){var Ie=function(ve){var Ce=ve.match(U);return Ce?{key:Ce[1],op:Ce[2],number:Number(Ce[3])}:{key:ve,op:null,number:null}}(Ee);Ee=Ie.key,ae=Ie.op,be=Ie.number}if(De){if((Se=ee[Ee])===void 0)return""}else for(fe=3;fe=48&&de<=57,Me=me>=48&&me<=57;if(_e&&(oe=10*oe+de-48),Me&&(ue=10*ue+me-48),!_e||!Me){if(oe!==ue)return oe-ue;if(de!==me)return de-me}}return ue-oe};var ie=2e9;a.seedPseudoRandom=function(){ie=2e9},a.pseudoRandom=function(){var X=ie;return ie=(69069*ie+1)%4294967296,Math.abs(ie-X)<429496729?a.pseudoRandom():ie/4294967296},a.fillText=function(X,ee,re){var oe=Array.isArray(re)?function(de){re.push(de)}:function(de){re.text=de},ue=a.extractOption(X,ee,"htx","hovertext");if(a.isValidTextValue(ue))return oe(ue);var ce=a.extractOption(X,ee,"tx","text");return a.isValidTextValue(ce)?oe(ce):void 0},a.isValidTextValue=function(X){return X||X===0},a.formatPercent=function(X,ee){ee=ee||0;for(var re=(Math.round(100*X*Math.pow(10,ee))*Math.pow(.1,ee)).toFixed(ee)+"%",oe=0;oe1&&(Me=1):Me=0,a.strTranslate(ue-Me*(re+de),ce-Me*(oe+me))+a.strScale(Me)+(_e?"rotate("+_e+(ee?"":" "+re+" "+oe)+")":"")},a.setTransormAndDisplay=function(X,ee){X.attr("transform",a.getTextTransform(ee)),X.style("display",ee.scale?null:"none")},a.ensureUniformFontSize=function(X,ee){var re=a.extendFlat({},ee);return re.size=Math.max(ee.size,X._fullLayout.uniformtext.minsize||0),re},a.join2=function(X,ee,re){var oe=X.length;return oe>1?X.slice(0,-1).join(ee)+re+X[oe-1]:X.join(ee)},a.bigFont=function(X){return Math.round(1.2*X)};var te=a.getFirefoxVersion(),J=te!==null&&te<86;a.getPositionFromD3Event=function(){return J?[_.event.layerX,_.event.layerY]:[_.event.offsetX,_.event.offsetY]}},41965:function(R){R.exports=function(E){return window&&window.process&&window.process.versions?Object.prototype.toString.call(E)==="[object Object]":Object.prototype.toString.call(E)==="[object Object]"&&Object.getPrototypeOf(E).hasOwnProperty("hasOwnProperty")}},66636:function(R,E,e){var _=e(65487),k=/^\w*$/;R.exports=function(i,w,v,h){var s,t,a;v=v||"name",h=h||"value";var r={};w&&w.length?(a=_(i,w),t=a.get()):t=i,w=w||"";var n={};if(t)for(s=0;s2)return r[d]=2|r[d],l.set(u,null);if(o){for(s=d;s1){var v=["LOG:"];for(w=0;w1){var h=[];for(w=0;w"),"long")}},i.warn=function(){var w;if(_.logging>0){var v=["WARN:"];for(w=0;w0){var h=[];for(w=0;w"),"stick")}},i.error=function(){var w;if(_.logging>0){var v=["ERROR:"];for(w=0;w0){var h=[];for(w=0;w"),"stick")}}},77310:function(R,E,e){var _=e(39898);R.exports=function(k,i,w){var v=k.selectAll("g."+w.replace(/\s/g,".")).data(i,function(s){return s[0].trace.uid});v.exit().remove(),v.enter().append("g").attr("class",w),v.order();var h=k.classed("rangeplot")?"nodeRangePlot3":"node3";return v.each(function(s){s[0][h]=_.select(this)}),v}},35657:function(R,E,e){var _=e(79576);E.init2dArray=function(k,i){for(var w=new Array(k),v=0;ve/2?E-Math.round(E/e)*e:E}}},65487:function(R,E,e){var _=e(92770),k=e(73627).isArrayOrTypedArray;function i(r,n){return function(){var o,l,u,d,c,b=r;for(d=0;d/g),l=0;lt||g===k||gr||c&&n(d))}:function(d,c){var b=d[0],g=d[1];if(b===k||bt||g===k||gr)return!1;var f,x,y,m,T,p=h.length,M=h[0][0],A=h[0][1],C=0;for(f=1;fMath.max(x,M)||g>Math.max(y,A)))if(gl||Math.abs(_(a,d))>s)return!0;return!1},i.filter=function(w,v){var h=[w[0]],s=0,t=0;function a(r){w.push(r);var n=h.length,o=s;h.splice(t+1);for(var l=o+1;l1&&a(w.pop()),{addPt:a,raw:w,filtered:h}}},79749:function(R,E,e){var _=e(58617),k=e(98580);R.exports=function(i,w,v){var h=i._fullLayout,s=!0;return h._glcanvas.each(function(t){if(t.regl)t.regl.preloadCachedCode(v);else if(!t.pick||h._has("parcoords")){try{t.regl=k({canvas:this,attributes:{antialias:!t.pick,preserveDrawingBuffer:!0},pixelRatio:i._context.plotGlPixelRatio||e.g.devicePixelRatio,extensions:w||[],cachedCode:v||{}})}catch{s=!1}t.regl||(s=!1),s&&this.addEventListener("webglcontextlost",function(a){i&&i.emit&&i.emit("plotly_webglcontextlost",{event:a,layer:t.key})},!1)}}),s||_({container:h._glcontainer.node()}),s}},45142:function(R,E,e){var _=e(92770),k=e(35791);R.exports=function(i){var w;if(typeof(w=i&&i.hasOwnProperty("userAgent")?i.userAgent:function(){var n;return typeof navigator<"u"&&(n=navigator.userAgent),n&&n.headers&&typeof n.headers["user-agent"]=="string"&&(n=n.headers["user-agent"]),n}())!="string")return!0;var v=k({ua:{headers:{"user-agent":w}},tablet:!0,featureDetect:!1});if(!v){for(var h=w.split(" "),s=1;s-1;t--){var a=h[t];if(a.substr(0,8)==="Version/"){var r=a.substr(8).split(".")[0];if(_(r)&&(r=+r),r>=13)return!0}}}return v}},75138:function(R){R.exports=function(E,e){if(e instanceof RegExp){for(var _=e.toString(),k=0;kk.queueLength&&(w.undoQueue.queue.shift(),w.undoQueue.index--))},startSequence:function(w){w.undoQueue=w.undoQueue||{index:0,queue:[],sequence:!1},w.undoQueue.sequence=!0,w.undoQueue.beginSequence=!0},stopSequence:function(w){w.undoQueue=w.undoQueue||{index:0,queue:[],sequence:!1},w.undoQueue.sequence=!1,w.undoQueue.beginSequence=!1},undo:function(w){var v,h;if(!(w.undoQueue===void 0||isNaN(w.undoQueue.index)||w.undoQueue.index<=0)){for(w.undoQueue.index--,v=w.undoQueue.queue[w.undoQueue.index],w.undoQueue.inSequence=!0,h=0;h=w.undoQueue.queue.length)){for(v=w.undoQueue.queue[w.undoQueue.index],w.undoQueue.inSequence=!0,h=0;hn}function a(r,n){return r>=n}E.findBin=function(r,n,o){if(_(n.start))return o?Math.ceil((r-n.start)/n.size-v)-1:Math.floor((r-n.start)/n.size+v);var l,u,d=0,c=n.length,b=0,g=c>1?(n[c-1]-n[0])/(c-1):1;for(u=g>=0?o?h:s:o?a:t,r+=g*v*(o?-1:1)*(g>=0?1:-1);d90&&k.log("Long binary search..."),d-1},E.sorterAsc=function(r,n){return r-n},E.sorterDes=function(r,n){return n-r},E.distinctVals=function(r){var n,o=r.slice();for(o.sort(E.sorterAsc),n=o.length-1;n>-1&&o[n]===w;n--);for(var l,u=o[n]-o[0]||1,d=u/(n||1)/1e4,c=[],b=0;b<=n;b++){var g=o[b],f=g-l;l===void 0?(c.push(g),l=g):f>d&&(u=Math.min(u,f),c.push(g),l=g)}return{vals:c,minDiff:u}},E.roundUp=function(r,n,o){for(var l,u=0,d=n.length-1,c=0,b=o?0:1,g=o?1:0,f=o?Math.ceil:Math.floor;u0&&(l=1),o&&l)return r.sort(n)}return l?r:r.reverse()},E.findIndexOfMin=function(r,n){n=n||i;for(var o,l=1/0,u=0;uv.length)&&(h=v.length),_(w)||(w=!1),k(v[0])){for(t=new Array(h),s=0;si.length-1)return i[i.length-1];var v=w%1;return v*i[Math.ceil(w)]+(1-v)*i[Math.floor(w)]}},78614:function(R,E,e){var _=e(25075);R.exports=function(k){return k?_(k):[0,0,0,1]}},3883:function(R,E,e){var _=e(32396),k=e(91424),i=e(71828),w=null;R.exports=function(){if(w!==null)return w;w=!1;var v=i.isIE()||i.isSafari()||i.isIOS();if(window.navigator.userAgent&&!v){var h=Array.from(_.CSS_DECLARATIONS).reverse(),s=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof s=="function")w=h.some(function(r){return s.apply(null,r)});else{var t=k.tester.append("image").attr("style",_.STYLE),a=window.getComputedStyle(t.node()).imageRendering;w=h.some(function(r){var n=r[1];return a===n||a===n.toLowerCase()}),t.remove()}}return w}},63893:function(R,E,e){var _=e(39898),k=e(71828),i=k.strTranslate,w=e(77922),v=e(18783).LINE_SPACING,h=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;E.convertToTspans=function(B,Y,D){var G=B.text(),U=!B.attr("data-notex")&&Y&&Y._context.typesetMath&&typeof MathJax<"u"&&G.match(h),j=_.select(B.node().parentNode);if(!j.empty()){var W=B.attr("class")?B.attr("class").split(" ")[0]:"text";return W+="-math",j.selectAll("svg."+W).remove(),j.selectAll("g."+W+"-group").remove(),B.style("display",null).attr({"data-unformatted":G,"data-math":"N"}),U?(Y&&Y._promises||[]).push(new Promise(function(ie){B.style("display","none");var te=parseInt(B.node().style.fontSize,10),J={fontSize:te};(function(X,ee,re){var oe,ue,ce,de,me=parseInt((MathJax.version||"").split(".")[0]);if(me===2||me===3){var _e=function(){var we="math-output-"+k.randstr({},64),xe=(de=_.select("body").append("div").attr({id:we}).style({visibility:"hidden",position:"absolute","font-size":ee.fontSize+"px"}).text(X.replace(s,"\\lt ").replace(t,"\\gt "))).node();return me===2?MathJax.Hub.Typeset(xe):MathJax.typeset([xe])},Me=function(){var we=de.select(me===2?".MathJax_SVG":".MathJax"),xe=!we.empty()&&de.select("svg").node();if(xe){var De,Ee=xe.getBoundingClientRect();De=me===2?_.select("body").select("#MathJax_SVG_glyphs"):we.select("defs"),re(we,De,Ee)}else k.log("There was an error in the tex syntax.",X),re();de.remove()};me===2?MathJax.Hub.Queue(function(){return ue=k.extendDeepAll({},MathJax.Hub.config),ce=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:a},displayAlign:"left"})},function(){if((oe=MathJax.Hub.config.menuSettings.renderer)!=="SVG")return MathJax.Hub.setRenderer("SVG")},_e,Me,function(){if(oe!=="SVG")return MathJax.Hub.setRenderer(oe)},function(){return ce!==void 0&&(MathJax.Hub.processSectionDelay=ce),MathJax.Hub.Config(ue)}):me===3&&(ue=k.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=a,(oe=MathJax.config.startup.output)!=="svg"&&(MathJax.config.startup.output="svg"),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){_e(),Me(),oe!=="svg"&&(MathJax.config.startup.output=oe),MathJax.config=ue}))}else k.warn("No MathJax version:",MathJax.version)})(U[2],J,function(X,ee,re){j.selectAll("svg."+W).remove(),j.selectAll("g."+W+"-group").remove();var oe=X&&X.select("svg");if(!oe||!oe.node())return Z(),void ie();var ue=j.append("g").classed(W+"-group",!0).attr({"pointer-events":"none","data-unformatted":G,"data-math":"Y"});ue.node().appendChild(oe.node()),ee&&ee.node()&&oe.node().insertBefore(ee.node().cloneNode(!0),oe.node().firstChild);var ce=re.width,de=re.height;oe.attr({class:W,height:de,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var me=B.node().style.fill||"black",_e=oe.select("g");_e.attr({fill:me,stroke:me});var Me=_e.node().getBoundingClientRect(),we=Me.width,xe=Me.height;(we>ce||xe>de)&&(oe.style("overflow","hidden"),we=(Me=oe.node().getBoundingClientRect()).width,xe=Me.height);var De=+B.attr("x"),Ee=+B.attr("y"),Se=-(te||B.node().getBoundingClientRect().height)/4;if(W[0]==="y")ue.attr({transform:"rotate("+[-90,De,Ee]+")"+i(-we/2,Se-xe/2)});else if(W[0]==="l")Ee=Se-xe/2;else if(W[0]==="a"&&W.indexOf("atitle")!==0)De=0,Ee=Se;else{var he=B.attr("text-anchor");De-=we*(he==="middle"?.5:he==="end"?1:0),Ee=Ee+Se-xe/2}oe.attr({x:De,y:Ee}),D&&D.call(B,ue),ie(ue)})})):Z(),B}function Z(){j.empty()||(W=B.attr("class")+"-math",j.select("svg."+W).remove()),B.text("").style("white-space","pre");var ie=function(te,J){J=J.replace(d," ");var X,ee=!1,re=[],oe=-1;function ue(){oe++;var Ie=document.createElementNS(w.svg,"tspan");_.select(Ie).attr({class:"line",dy:oe*v+"em"}),te.appendChild(Ie),X=Ie;var Te=re;if(re=[{node:Ie}],Te.length>1)for(var Ne=1;Ne doesnt match end tag <"+Ie+">. Pretending it did match.",J),X=re[re.length-1].node}else k.log("Ignoring unexpected end tag .",J)}g.test(J)?ue():(X=te,re=[{node:te}]);for(var _e=J.split(c),Me=0;Me<_e.length;Me++){var we=_e[Me],xe=we.match(b),De=xe&&xe[2].toLowerCase(),Ee=r[De];if(De==="br")ue();else if(Ee===void 0)de(X,C(we));else if(xe[1])me(De);else{var Se=xe[4],he={type:De},fe=T(Se,f);if(fe?(fe=fe.replace(p,"$1 fill:"),Ee&&(fe+=";"+Ee)):Ee&&(fe=Ee),fe&&(he.style=fe),De==="a"){ee=!0;var ae=T(Se,x);if(ae){var be=P(ae);be&&(he.href=be,he.target=T(Se,y)||"_blank",he.popup=T(Se,m))}}ce(he)}}return ee}(B.node(),G);ie&&B.style("pointer-events","all"),E.positionText(B),D&&D.call(B)}};var s=/(<|<|<)/g,t=/(>|>|>)/g,a=[["$","$"],["\\(","\\)"]],r={sup:"font-size:70%",sub:"font-size:70%",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},n={sub:"0.3em",sup:"-0.6em"},o={sub:"-0.21em",sup:"0.42em"},l="​",u=["http:","https:","mailto:","",void 0,":"],d=E.NEWLINES=/(\r\n?|\n)/g,c=/(<[^<>]*>)/,b=/<(\/?)([^ >]*)(\s+(.*))?>/i,g=//i;E.BR_TAG_ALL=//gi;var f=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,x=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,y=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,m=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function T(B,Y){if(!B)return null;var D=B.match(Y),G=D&&(D[3]||D[4]);return G&&C(G)}var p=/(^|;)\s*color:/;E.plainText=function(B,Y){for(var D=(Y=Y||{}).len!==void 0&&Y.len!==-1?Y.len:1/0,G=Y.allowedTags!==void 0?Y.allowedTags:["br"],U=B.split(c),j=[],W="",Z=0,ie=0;ie3?j.push(te.substr(0,re-3)+"..."):j.push(te.substr(0,re));break}W=""}}return j.join("")};var M={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},A=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function C(B){return B.replace(A,function(Y,D){return(D.charAt(0)==="#"?function(G){if(!(G>1114111)){var U=String.fromCodePoint;if(U)return U(G);var j=String.fromCharCode;return G<=65535?j(G):j(55232+(G>>10),G%1024+56320)}}(D.charAt(1)==="x"?parseInt(D.substr(2),16):parseInt(D.substr(1),10)):M[D])||Y})}function P(B){var Y=encodeURI(decodeURI(B)),D=document.createElement("a"),G=document.createElement("a");D.href=B,G.href=Y;var U=D.protocol,j=G.protocol;return u.indexOf(U)!==-1&&u.indexOf(j)!==-1?Y:""}function O(B,Y,D){var G,U,j,W=D.horizontalAlign,Z=D.verticalAlign||"top",ie=B.node().getBoundingClientRect(),te=Y.node().getBoundingClientRect();return U=Z==="bottom"?function(){return ie.bottom-G.height}:Z==="middle"?function(){return ie.top+(ie.height-G.height)/2}:function(){return ie.top},j=W==="right"?function(){return ie.right-G.width}:W==="center"?function(){return ie.left+(ie.width-G.width)/2}:function(){return ie.left},function(){G=this.node().getBoundingClientRect();var J=j()-te.left,X=U()-te.top,ee=D.gd||{};if(D.gd){ee._fullLayout._calcInverseTransform(ee);var re=k.apply3DTransform(ee._fullLayout._invTransform)(J,X);J=re[0],X=re[1]}return this.style({top:X+"px",left:J+"px","z-index":1e3}),this}}E.convertEntities=C,E.sanitizeHTML=function(B){B=B.replace(d," ");for(var Y=document.createElement("p"),D=Y,G=[],U=B.split(c),j=0;jv.ts+i?t():v.timer=setTimeout(function(){t(),v.timer=null},i)},E.done=function(k){var i=e[k];return i&&i.timer?new Promise(function(w){var v=i.onDone;i.onDone=function(){v&&v(),w(),i.onDone=null}}):Promise.resolve()},E.clear=function(k){if(k)_(e[k]),delete e[k];else for(var i in e)E.clear(i)}},58163:function(R,E,e){var _=e(92770);R.exports=function(k,i){if(k>0)return Math.log(k)/Math.LN10;var w=Math.log(Math.min(i[0],i[1]))/Math.LN10;return _(w)||(w=Math.log(Math.max(i[0],i[1]))/Math.LN10-6),w}},90973:function(R,E,e){var _=R.exports={},k=e(78776).locationmodeToLayer,i=e(96892).zL;_.getTopojsonName=function(w){return[w.scope.replace(/ /g,"-"),"_",w.resolution.toString(),"m"].join("")},_.getTopojsonPath=function(w,v){return w+v+".json"},_.getTopojsonFeatures=function(w,v){var h=k[w.locationmode],s=v.objects[h];return i(v,s).features}},37815:function(R){R.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},92177:function(R){R.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}},14458:function(R,E,e){var _=e(73972);R.exports=function(k){for(var i,w,v=_.layoutArrayContainers,h=_.layoutArrayRegexes,s=k.split("[")[0],t=0;t0&&w.log("Clearing previous rejected promises from queue."),x._promises=[]},E.cleanLayout=function(x){var y,m;x||(x={}),x.xaxis1&&(x.xaxis||(x.xaxis=x.xaxis1),delete x.xaxis1),x.yaxis1&&(x.yaxis||(x.yaxis=x.yaxis1),delete x.yaxis1),x.scene1&&(x.scene||(x.scene=x.scene1),delete x.scene1);var T=(v.subplotsRegistry.cartesian||{}).attrRegex,p=(v.subplotsRegistry.polar||{}).attrRegex,M=(v.subplotsRegistry.ternary||{}).attrRegex,A=(v.subplotsRegistry.gl3d||{}).attrRegex,C=Object.keys(x);for(y=0;y3?(re.x=1.02,re.xanchor="left"):re.x<-2&&(re.x=-.02,re.xanchor="right"),re.y>3?(re.y=1.02,re.yanchor="bottom"):re.y<-2&&(re.y=-.02,re.yanchor="top")),o(x),x.dragmode==="rotate"&&(x.dragmode="orbit"),s.clean(x),x.template&&x.template.layout&&E.cleanLayout(x.template.layout),x},E.cleanData=function(x){for(var y=0;y0)return x.substr(0,y)}E.hasParent=function(x,y){for(var m=g(y);m;){if(m in x)return!0;m=g(m)}return!1};var f=["x","y","z"];E.clearAxisTypes=function(x,y,m){for(var T=0;T1&&i.warn("Full array edits are incompatible with other edits",l);var x=r[""][""];if(s(x))a.set(null);else{if(!Array.isArray(x))return i.warn("Unrecognized full array edit value",l,x),!0;a.set(x)}return!b&&(u(g,f),d(t),!0)}var y,m,T,p,M,A,C,P,O=Object.keys(r).map(Number).sort(w),z=a.get(),B=z||[],Y=o(f,l).get(),D=[],G=-1,U=B.length;for(y=0;yB.length-(C?0:1))i.warn("index out of range",l,T);else if(A!==void 0)M.length>1&&i.warn("Insertion & removal are incompatible with edits to the same index.",l,T),s(A)?D.push(T):C?(A==="add"&&(A={}),B.splice(T,0,A),Y&&Y.splice(T,0,{})):i.warn("Unrecognized full object edit value",l,T,A),G===-1&&(G=T);else for(m=0;m=0;y--)B.splice(D[y],1),Y&&Y.splice(D[y],1);if(B.length?z||a.set(B):a.set(null),b)return!1;if(u(g,f),c!==k){var j;if(G===-1)j=O;else{for(U=Math.max(B.length,U),j=[],y=0;y=G);y++)j.push(T);for(y=G;y=ae.data.length||Ne<-ae.data.length)throw new Error(Ie+" must be valid indices for gd.data.");if(be.indexOf(Ne,Te+1)>-1||Ne>=0&&be.indexOf(-ae.data.length+Ne)>-1||Ne<0&&be.indexOf(ae.data.length+Ne)>-1)throw new Error("each index in "+Ie+" must be unique.")}}function z(ae,be,Ie){if(!Array.isArray(ae.data))throw new Error("gd.data must be an array.");if(be===void 0)throw new Error("currentIndices is a required argument.");if(Array.isArray(be)||(be=[be]),O(ae,be,"currentIndices"),Ie===void 0||Array.isArray(Ie)||(Ie=[Ie]),Ie!==void 0&&O(ae,Ie,"newIndices"),Ie!==void 0&&be.length!==Ie.length)throw new Error("current and new indices must be of equal length.")}function B(ae,be,Ie,Te,Ne){(function(Ye,$e,rt,ht){var nt=w.isPlainObject(ht);if(!Array.isArray(Ye.data))throw new Error("gd.data must be an array");if(!w.isPlainObject($e))throw new Error("update must be a key:value object");if(rt===void 0)throw new Error("indices must be an integer or array of integers");for(var bt in O(Ye,rt,"indices"),$e){if(!Array.isArray($e[bt])||$e[bt].length!==rt.length)throw new Error("attribute "+bt+" must be an array of length equal to indices array length");if(nt&&(!(bt in ht)||!Array.isArray(ht[bt])||ht[bt].length!==$e[bt].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object")}})(ae,be,Ie,Te);for(var qe=function(Ye,$e,rt,ht){var nt,bt,wt,ct,lt,Tt=w.isPlainObject(ht),Et=[];for(var St in Array.isArray(rt)||(rt=[rt]),rt=P(rt,Ye.data.length-1),$e)for(var Ft=0;Ft-1&&Ie.indexOf("grouptitlefont")===-1?Ce(Ie,Ie.replace("titlefont","title.font")):Ie.indexOf("titleposition")>-1?Ce(Ie,Ie.replace("titleposition","title.position")):Ie.indexOf("titleside")>-1?Ce(Ie,Ie.replace("titleside","title.side")):Ie.indexOf("titleoffset")>-1&&Ce(Ie,Ie.replace("titleoffset","title.offset")):Ce(Ie,Ie.replace("title","title.text"));function Ce(Ae,ze){ae[ze]=ae[Ae],delete ae[Ae]}}function ie(ae,be,Ie){ae=w.getGraphDiv(ae),f.clearPromiseQueue(ae);var Te={};if(typeof be=="string")Te[be]=Ie;else{if(!w.isPlainObject(be))return w.warn("Relayout fail.",be,Ie),Promise.reject();Te=w.extendFlat({},be)}Object.keys(Te).length&&(ae.changed=!0);var Ne=oe(ae,Te),qe=Ne.flags;qe.calc&&(ae.calcdata=void 0);var ve=[r.previousPromises];qe.layoutReplot?ve.push(x.layoutReplot):Object.keys(Te).length&&(te(ae,qe,Ne)||r.supplyDefaults(ae),qe.legend&&ve.push(x.doLegend),qe.layoutstyle&&ve.push(x.layoutStyles),qe.axrange&&J(ve,Ne.rangesAltered),qe.ticks&&ve.push(x.doTicksRelayout),qe.modebar&&ve.push(x.doModeBar),qe.camera&&ve.push(x.doCamera),qe.colorbars&&ve.push(x.doColorBars),ve.push(p)),ve.push(r.rehover,r.redrag,r.reselect),s.add(ae,ie,[ae,Ne.undoit],ie,[ae,Ne.redoit]);var Ce=w.syncOrAsync(ve,ae);return Ce&&Ce.then||(Ce=Promise.resolve(ae)),Ce.then(function(){return ae.emit("plotly_relayout",Ne.eventData),ae})}function te(ae,be,Ie){var Te=ae._fullLayout;if(!be.axrange)return!1;for(var Ne in be)if(Ne!=="axrange"&&be[Ne])return!1;for(var qe in Ie.rangesAltered){var ve=n.id2name(qe),Ce=ae.layout[ve],Ae=Te[ve];if(Ae.autorange=Ce.autorange,Ce.range&&(Ae.range=Ce.range.slice()),Ae.cleanRange(),Ae._matchGroup){for(var ze in Ae._matchGroup)if(ze!==qe){var Ue=Te[n.id2name(ze)];Ue.autorange=Ae.autorange,Ue.range=Ae.range.slice(),Ue._input.range=Ae.range.slice()}}}return!0}function J(ae,be){var Ie=be?function(Te){var Ne=[];for(var qe in be){var ve=n.getFromId(Te,qe);if(Ne.push(qe),(ve.ticklabelposition||"").indexOf("inside")!==-1&&ve._anchorAxis&&Ne.push(ve._anchorAxis._id),ve._matchGroup)for(var Ce in ve._matchGroup)be[Ce]||Ne.push(Ce)}return n.draw(Te,Ne,{skipTitle:!0})}:function(Te){return n.draw(Te,"redraw")};ae.push(c,x.doAutoRangeAndConstraints,Ie,x.drawData,x.finalDraw)}var X=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,ee=/^[xyz]axis[0-9]*\.autorange$/,re=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function oe(ae,be){var Ie,Te,Ne,qe=ae.layout,ve=ae._fullLayout,Ce=ve._guiEditing,Ae=U(ve._preGUI,Ce),ze=Object.keys(be),Ue=n.list(ae),Ve=w.extendDeepAll({},be),Ye={};for(Z(be),ze=Object.keys(be),Te=0;Te0&&typeof Ft.parts[Je]!="string";)Je--;var et=Ft.parts[Je],Ze=Ft.parts[Je-1]+"."+et,Qe=Ft.parts.slice(0,Je).join("."),st=v(ae.layout,Qe).get(),ft=v(ve,Qe).get(),Be=Ft.get();if(zt!==void 0){bt[St]=zt,wt[St]=et==="reverse"?zt:G(Be);var je=a.getLayoutValObject(ve,Ft.parts);if(je&&je.impliedEdits&&zt!==null)for(var at in je.impliedEdits)ct(w.relativeAttr(St,at),je.impliedEdits[at]);if(["width","height"].indexOf(St)!==-1)if(zt){ct("autosize",null);var ot=St==="height"?"width":"height";ct(ot,ve[ot])}else ve[St]=ae._initialAutoSize[St];else if(St==="autosize")ct("width",zt?null:ve.width),ct("height",zt?null:ve.height);else if(Ze.match(X))Et(Ze),v(ve,Qe+"._inputRange").set(null);else if(Ze.match(ee)){Et(Ze),v(ve,Qe+"._inputRange").set(null);var xt=v(ve,Qe).get();xt._inputDomain&&(xt._input.domain=xt._inputDomain.slice())}else Ze.match(re)&&v(ve,Qe+"._inputDomain").set(null);if(et==="type"){lt=st;var yt=ft.type==="linear"&&zt==="log",_t=ft.type==="log"&&zt==="linear";if(yt||_t){if(lt&<.range)if(ft.autorange)yt&&(lt.range=lt.range[1]>lt.range[0]?[1,2]:[2,1]);else{var gt=lt.range[0],Ct=lt.range[1];yt?(gt<=0&&Ct<=0&&ct(Qe+".autorange",!0),gt<=0?gt=Ct/1e6:Ct<=0&&(Ct=gt/1e6),ct(Qe+".range[0]",Math.log(gt)/Math.LN10),ct(Qe+".range[1]",Math.log(Ct)/Math.LN10)):(ct(Qe+".range[0]",Math.pow(10,gt)),ct(Qe+".range[1]",Math.pow(10,Ct)))}else ct(Qe+".autorange",!0);Array.isArray(ve._subplots.polar)&&ve._subplots.polar.length&&ve[Ft.parts[0]]&&Ft.parts[1]==="radialaxis"&&delete ve[Ft.parts[0]]._subplot.viewInitial["radialaxis.range"],t.getComponentMethod("annotations","convertCoords")(ae,ft,zt,ct),t.getComponentMethod("images","convertCoords")(ae,ft,zt,ct)}else ct(Qe+".autorange",!0),ct(Qe+".range",null);v(ve,Qe+"._inputRange").set(null)}else if(et.match(m)){var dt=v(ve,St).get(),vt=(zt||{}).type;vt&&vt!=="-"||(vt="linear"),t.getComponentMethod("annotations","convertCoords")(ae,dt,vt,ct),t.getComponentMethod("images","convertCoords")(ae,dt,vt,ct)}var At=g.containerArrayMatch(St);if(At){Ie=At.array,Te=At.index;var Bt=At.property,jt=je||{editType:"calc"};Te!==""&&Bt===""&&(g.isAddVal(zt)?wt[St]=null:g.isRemoveVal(zt)?wt[St]=(v(qe,Ie).get()||[])[Te]:w.warn("unrecognized full object value",be)),y.update(nt,jt),Ye[Ie]||(Ye[Ie]={});var Ut=Ye[Ie][Te];Ut||(Ut=Ye[Ie][Te]={}),Ut[Bt]=zt,delete be[St]}else et==="reverse"?(st.range?st.range.reverse():(ct(Qe+".autorange",!0),st.range=[1,0]),ft.autorange?nt.calc=!0:nt.plot=!0):(St==="dragmode"&&(zt===!1&&Be!==!1||zt!==!1&&Be===!1)||ve._has("scatter-like")&&ve._has("regl")&&St==="dragmode"&&(zt==="lasso"||zt==="select")&&Be!=="lasso"&&Be!=="select"||ve._has("gl2d")?nt.plot=!0:je?y.update(nt,je):nt.calc=!0,Ft.set(zt))}}for(Ie in Ye)g.applyContainerArrayChanges(ae,Ae(qe,Ie),Ye[Ie],nt,Ae)||(nt.plot=!0);for(var tn in Tt){var Xt=(lt=n.getFromId(ae,tn))&<._constraintGroup;if(Xt)for(var Qt in nt.calc=!0,Xt)Tt[Qt]||(n.getFromId(ae,Qt)._constraintShrinkable=!0)}return(ue(ae)||be.height||be.width)&&(nt.plot=!0),(nt.plot||nt.calc)&&(nt.layoutReplot=!0),{flags:nt,rangesAltered:Tt,undoit:wt,redoit:bt,eventData:Ve}}function ue(ae){var be=ae._fullLayout,Ie=be.width,Te=be.height;return ae.layout.autosize&&r.plotAutoSize(ae,ae.layout,be),be.width!==Ie||be.height!==Te}function ce(ae,be,Ie,Te){ae=w.getGraphDiv(ae),f.clearPromiseQueue(ae),w.isPlainObject(be)||(be={}),w.isPlainObject(Ie)||(Ie={}),Object.keys(be).length&&(ae.changed=!0),Object.keys(Ie).length&&(ae.changed=!0);var Ne=f.coerceTraceIndices(ae,Te),qe=W(ae,w.extendFlat({},be),Ne),ve=qe.flags,Ce=oe(ae,w.extendFlat({},Ie)),Ae=Ce.flags;(ve.calc||Ae.calc)&&(ae.calcdata=void 0),ve.clearAxisTypes&&f.clearAxisTypes(ae,Ne,Ie);var ze=[];Ae.layoutReplot?ze.push(x.layoutReplot):ve.fullReplot?ze.push(E._doPlot):(ze.push(r.previousPromises),te(ae,Ae,Ce)||r.supplyDefaults(ae),ve.style&&ze.push(x.doTraceStyle),(ve.colorbars||Ae.colorbars)&&ze.push(x.doColorBars),Ae.legend&&ze.push(x.doLegend),Ae.layoutstyle&&ze.push(x.layoutStyles),Ae.axrange&&J(ze,Ce.rangesAltered),Ae.ticks&&ze.push(x.doTicksRelayout),Ae.modebar&&ze.push(x.doModeBar),Ae.camera&&ze.push(x.doCamera),ze.push(p)),ze.push(r.rehover,r.redrag,r.reselect),s.add(ae,ce,[ae,qe.undoit,Ce.undoit,qe.traces],ce,[ae,qe.redoit,Ce.redoit,qe.traces]);var Ue=w.syncOrAsync(ze,ae);return Ue&&Ue.then||(Ue=Promise.resolve(ae)),Ue.then(function(){return ae.emit("plotly_update",{data:qe.eventData,layout:Ce.eventData}),ae})}function de(ae){return function(be){be._fullLayout._guiEditing=!0;var Ie=ae.apply(null,arguments);return be._fullLayout._guiEditing=!1,Ie}}var me=[{pattern:/^hiddenlabels/,attr:"legend.uirevision"},{pattern:/^((x|y)axis\d*)\.((auto)?range|title\.text)/},{pattern:/axis\d*\.showspikes$/,attr:"modebar.uirevision"},{pattern:/(hover|drag)mode$/,attr:"modebar.uirevision"},{pattern:/^(scene\d*)\.camera/},{pattern:/^(geo\d*)\.(projection|center|fitbounds)/},{pattern:/^(ternary\d*\.[abc]axis)\.(min|title\.text)$/},{pattern:/^(polar\d*\.radialaxis)\.((auto)?range|angle|title\.text)/},{pattern:/^(polar\d*\.angularaxis)\.rotation/},{pattern:/^(mapbox\d*)\.(center|zoom|bearing|pitch)/},{pattern:/^legend\.(x|y)$/,attr:"editrevision"},{pattern:/^(shapes|annotations)/,attr:"editrevision"},{pattern:/^title\.text$/,attr:"editrevision"}],_e=[{pattern:/^selectedpoints$/,attr:"selectionrevision"},{pattern:/(^|value\.)visible$/,attr:"legend.uirevision"},{pattern:/^dimensions\[\d+\]\.constraintrange/},{pattern:/^node\.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value\.)name$/},{pattern:/colorbar\.title\.text$/},{pattern:/colorbar\.(x|y)$/,attr:"editrevision"}];function Me(ae,be){for(var Ie=0;Ie1;)if(Te.pop(),(Ie=v(be,Te.join(".")+".uirevision").get())!==void 0)return Ie;return be.uirevision}function xe(ae,be){for(var Ie=0;Ie=Ne.length?Ne[0]:Ne[ze]:Ne}function Ce(ze){return Array.isArray(qe)?ze>=qe.length?qe[0]:qe[ze]:qe}function Ae(ze,Ue){var Ve=0;return function(){if(ze&&++Ve===Ue)return ze()}}return Te._frameWaitingCnt===void 0&&(Te._frameWaitingCnt=0),new Promise(function(ze,Ue){function Ve(){ae.emit("plotly_animating"),Te._lastFrameAt=-1/0,Te._timeToNext=0,Te._runningTransitions=0,Te._currentFrame=null;var St=function(){Te._animationRaf=window.requestAnimationFrame(St),Date.now()-Te._lastFrameAt>Te._timeToNext&&function(){Te._currentFrame&&Te._currentFrame.onComplete&&Te._currentFrame.onComplete();var Ft=Te._currentFrame=Te._frameQueue.shift();if(Ft){var zt=Ft.name?Ft.name.toString():null;ae._fullLayout._currentFrame=zt,Te._lastFrameAt=Date.now(),Te._timeToNext=Ft.frameOpts.duration,r.transition(ae,Ft.frame.data,Ft.frame.layout,f.coerceTraceIndices(ae,Ft.frame.traces),Ft.frameOpts,Ft.transitionOpts).then(function(){Ft.onComplete&&Ft.onComplete()}),ae.emit("plotly_animatingframe",{name:zt,frame:Ft.frame,animation:{frame:Ft.frameOpts,transition:Ft.transitionOpts}})}else ae.emit("plotly_animated"),window.cancelAnimationFrame(Te._animationRaf),Te._animationRaf=null}()};St()}var Ye,$e,rt=0;function ht(St){return Array.isArray(Ne)?rt>=Ne.length?St.transitionOpts=Ne[rt]:St.transitionOpts=Ne[0]:St.transitionOpts=Ne,rt++,St}var nt=[],bt=be==null,wt=Array.isArray(be);if(bt||wt||!w.isPlainObject(be)){if(bt||["string","number"].indexOf(typeof be)!==-1)for(Ye=0;Ye0&&TtTt)&&Et.push($e);nt=Et}}nt.length>0?function(St){if(St.length!==0){for(var Ft=0;Ft=0;Te--)if(w.isPlainObject(be[Te])){var Ye=be[Te].name,$e=(Ae[Ye]||Ve[Ye]||{}).name,rt=be[Te].name,ht=Ae[$e]||Ve[$e];$e&&rt&&typeof rt=="number"&&ht&&T<5&&(T++,w.warn('addFrames: overwriting frame "'+(Ae[$e]||Ve[$e]).name+'" with a frame whose name of type "number" also equates to "'+$e+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),T===5&&w.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),Ve[Ye]={name:Ye},Ue.push({frame:r.supplyFrameDefaults(be[Te]),index:Ie&&Ie[Te]!==void 0&&Ie[Te]!==null?Ie[Te]:ze+Te})}Ue.sort(function(St,Ft){return St.index>Ft.index?-1:St.index=0;Te--){if(typeof(Ne=Ue[Te].frame).name=="number"&&w.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!Ne.name)for(;Ae[Ne.name="frame "+ae._transitionData._counter++];);if(Ae[Ne.name]){for(qe=0;qe=0;Ie--)Te=be[Ie],qe.push({type:"delete",index:Te}),ve.unshift({type:"insert",index:Te,value:Ne[Te]});var Ce=r.modifyFrames,Ae=r.modifyFrames,ze=[ae,ve],Ue=[ae,qe];return s&&s.add(ae,Ce,ze,Ae,Ue),r.modifyFrames(ae,qe)},E.addTraces=function ae(be,Ie,Te){be=w.getGraphDiv(be);var Ne,qe,ve=[],Ce=E.deleteTraces,Ae=ae,ze=[be,ve],Ue=[be,Ie];for(function(Ve,Ye,$e){var rt,ht;if(!Array.isArray(Ve.data))throw new Error("gd.data must be an array.");if(Ye===void 0)throw new Error("traces must be defined.");for(Array.isArray(Ye)||(Ye=[Ye]),rt=0;rt=0&&Ue=0&&Ue=O.length)return!1;if(p.dimensions===2){if(A++,M.length===A)return p;var z=M[A];if(!f(z))return!1;p=O[P][z]}else p=O[P]}else p=O}}return p}function f(p){return p===Math.round(p)&&p>=0}function x(){var p,M,A={};for(p in a(A,w),_.subplotsRegistry)if((M=_.subplotsRegistry[p]).layoutAttributes)if(Array.isArray(M.attr))for(var C=0;C=z.length)return!1;C=(A=(_.transformsRegistry[z[B].type]||{}).attributes)&&A[M[2]],O=3}else{var Y=p._module;if(Y||(Y=(_.modules[p.type||i.type.dflt]||{})._module),!Y)return!1;if(!(C=(A=Y.attributes)&&A[P])){var D=Y.basePlotModule;D&&D.attributes&&(C=D.attributes[P])}C||(C=i[P])}return g(C,M,O)},E.getLayoutValObject=function(p,M){var A=function(C,P){var O,z,B,Y,D=C._basePlotModules;if(D){var G;for(O=0;O=r&&(a._input||{})._templateitemname;o&&(n=r);var l,u=t+"["+n+"]";function d(){l={},o&&(l[u]={},l[u][i]=o)}function c(g,f){o?_.nestedProperty(l[u],g).set(f):l[u+"."+g]=f}function b(){var g=l;return d(),g}return d(),{modifyBase:function(g,f){l[g]=f},modifyItem:c,getUpdateObj:b,applyUpdate:function(g,f){g&&c(g,f);var x=b();for(var y in x)_.nestedProperty(s,y).set(x[y])}}}},61549:function(R,E,e){var _=e(39898),k=e(73972),i=e(74875),w=e(71828),v=e(63893),h=e(33306),s=e(7901),t=e(91424),a=e(92998),r=e(64168),n=e(89298),o=e(18783),l=e(99082),u=l.enforce,d=l.clean,c=e(71739).doAutoRange,b="start";function g(T,p,M){for(var A=0;A=T[1]||C[1]<=T[0])&&P[0]p[0])return!0}return!1}function f(T){var p,M,A,C,P,O,z=T._fullLayout,B=z._size,Y=B.p,D=n.list(T,"",!0);if(z._paperdiv.style({width:T._context.responsive&&z.autosize&&!T._context._hasZeroWidth&&!T.layout.width?"100%":z.width+"px",height:T._context.responsive&&z.autosize&&!T._context._hasZeroHeight&&!T.layout.height?"100%":z.height+"px"}).selectAll(".main-svg").call(t.setSize,z.width,z.height),T._context.setBackground(T,z.paper_bgcolor),E.drawMainTitle(T),r.manage(T),!z._has("cartesian"))return i.previousPromises(T);function G(Ve,Ye,$e){var rt=Ve._lw/2;return Ve._id.charAt(0)==="x"?Ye?$e==="top"?Ye._offset-Y-rt:Ye._offset+Ye._length+Y+rt:B.t+B.h*(1-(Ve.position||0))+rt%1:Ye?$e==="right"?Ye._offset+Ye._length+Y+rt:Ye._offset-Y-rt:B.l+B.w*(Ve.position||0)+rt%1}for(p=0;p.5?"t":"b",te=G._fullLayout.margin[ie],J=0;return U.yref==="paper"?J=j+U.pad.t+U.pad.b:U.yref==="container"&&(J=function(X,ee,re,oe,ue){var ce=0;return re==="middle"&&(ce+=ue/2),X==="t"?(re==="top"&&(ce+=ue),ce+=oe-ee*oe):(re==="bottom"&&(ce+=ue),ce+=ee*oe),ce}(ie,W,Z,G._fullLayout.height,j)+U.pad.t+U.pad.b),J>te?J:0}(T,M,Y);D>0&&(function(G,U,j,W){var Z="title.automargin",ie=G._fullLayout.title,te=ie.y>.5?"t":"b",J={x:ie.x,y:ie.y,t:0,b:0},X={};ie.yref==="paper"&&function(ee,re,oe,ue,ce){var de=re.yref==="paper"?ee._fullLayout._size.h:ee._fullLayout.height,me=w.isTopAnchor(re)?ue:ue-ce,_e=oe==="b"?de-me:me;return!(w.isTopAnchor(re)&&oe==="t"||w.isBottomAnchor(re)&&oe==="b")&&_eB?m.push({code:"unused",traceType:A,templateCount:z,dataCount:B}):B>z&&m.push({code:"reused",traceType:A,templateCount:z,dataCount:B})}}else m.push({code:"data"});if(function Y(D,G){for(var U in D)if(U.charAt(0)!=="_"){var j=D[U],W=l(D,U,G);k(j)?(Array.isArray(D)&&j._template===!1&&j.templateitemname&&m.push({code:"missing",path:W,templateitemname:j.templateitemname}),Y(j,W)):Array.isArray(j)&&u(j)&&Y(j,W)}}({data:p,layout:T},""),m.length)return m.map(d)}},403:function(R,E,e){var _=e(92770),k=e(72391),i=e(74875),w=e(71828),v=e(25095),h=e(5900),s=e(70942),t=e(11506).version,a={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};R.exports=function(r,n){var o,l,u,d;function c(B){return!(B in n)||w.validate(n[B],a[B])}if(n=n||{},w.isPlainObject(r)?(o=r.data||[],l=r.layout||{},u=r.config||{},d={}):(r=w.getGraphDiv(r),o=w.extendDeep([],r.data),l=w.extendDeep({},r.layout),u=r._context,d=r._fullLayout||{}),!c("width")&&n.width!==null||!c("height")&&n.height!==null)throw new Error("Height and width should be pixel values.");if(!c("format"))throw new Error("Export format is not "+w.join2(a.format.values,", "," or ")+".");var b={};function g(B,Y){return w.coerce(n,b,a,B,Y)}var f=g("format"),x=g("width"),y=g("height"),m=g("scale"),T=g("setBackground"),p=g("imageDataOnly"),M=document.createElement("div");M.style.position="absolute",M.style.left="-5000px",document.body.appendChild(M);var A=w.extendFlat({},l);x?A.width=x:n.width===null&&_(d.width)&&(A.width=d.width),y?A.height=y:n.height===null&&_(d.height)&&(A.height=d.height);var C=w.extendFlat({},u,{_exportedPlot:!0,staticPlot:!0,setBackground:T}),P=v.getRedrawFunc(M);function O(){return new Promise(function(B){setTimeout(B,v.getDelay(M._fullLayout))})}function z(){return new Promise(function(B,Y){var D=h(M,f,m),G=M._fullLayout.width,U=M._fullLayout.height;function j(){k.purge(M),document.body.removeChild(M)}if(f==="full-json"){var W=i.graphJson(M,!1,"keepdata","object",!0,!0);return W.version=t,W=JSON.stringify(W),j(),B(p?W:v.encodeJSON(W))}if(j(),f==="svg")return B(p?D:v.encodeSVG(D));var Z=document.createElement("canvas");Z.id=w.randstr(),s({format:f,width:G,height:U,scale:m,canvas:Z,svg:D,promise:!0}).then(B).catch(Y)})}return new Promise(function(B,Y){k.newPlot(M,o,A,C).then(P).then(O).then(z).then(function(D){B(function(G){return p?G.replace(v.IMAGE_URL_PREFIX,""):G}(D))}).catch(function(D){Y(D)})})}},84936:function(R,E,e){var _=e(71828),k=e(74875),i=e(86281),w=e(72075).dfltConfig,v=_.isPlainObject,h=Array.isArray,s=_.isArrayOrTypedArray;function t(c,b,g,f,x,y){y=y||[];for(var m=Object.keys(c),T=0;TC.length&&f.push(n("unused",x,M.concat(C.length)));var D,G,U,j,W,Z=C.length,ie=Array.isArray(Y);if(ie&&(Z=Math.min(Z,Y.length)),P.dimensions===2)for(G=0;GC[G].length&&f.push(n("unused",x,M.concat(G,C[G].length)));var te=C[G].length;for(D=0;D<(ie?Math.min(te,Y[G].length):te);D++)U=ie?Y[G][D]:Y,j=A[G][D],W=C[G][D],_.validate(j,U)?W!==j&&W!==+j&&f.push(n("dynamic",x,M.concat(G,D),j,W)):f.push(n("value",x,M.concat(G,D),j))}else f.push(n("array",x,M.concat(G),A[G]));else for(G=0;G1&&y.push(n("object","layout"))),k.supplyDefaults(m);for(var T=m._fullData,p=g.length,M=0;M0&&Math.round(l)===l))return{vals:a};n=l}for(var u=s.calendar,d=r==="start",c=r==="end",b=h[t+"period0"],g=i(b,u)||0,f=[],x=[],y=[],m=a.length,T=0;TC;)A=w(A,-n,u);for(;A<=C;)A=w(A,n,u);M=w(A,-n,u)}else{for(A=g+(p=Math.round((C-g)/o))*o;A>C;)A-=o;for(;A<=C;)A+=o;M=A-o}f[T]=d?M:c?A:(M+A)/2,x[T]=M,y[T]=A}return{vals:f,starts:x,ends:y}}},89502:function(R){R.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},71739:function(R,E,e){var _=e(39898),k=e(92770),i=e(71828),w=e(50606).FP_SAFE,v=e(73972),h=e(91424),s=e(41675),t=s.getFromId,a=s.isLinked;function r(y,m){var T,p,M=[],A=y._fullLayout,C=o(A,m,0),P=o(A,m,1),O=u(y,m),z=O.min,B=O.max;if(z.length===0||B.length===0)return i.simpleMap(m.range,m.r2l);var Y=z[0].val,D=B[0].val;for(T=1;T0&&((te=oe-C(j)-P(W))>ue?J/te>ce&&(Z=j,ie=W,ce=J/te):J/oe>ce&&(Z={val:j.val,nopad:1},ie={val:W.val,nopad:1},ce=J/oe));if(Y===D){var de=Y-1,me=Y+1;if(ee)if(Y===0)M=[0,1];else{var _e=(Y>0?B:z).reduce(function(we,xe){return Math.max(we,P(xe))},0),Me=Y/(1-Math.min(.5,_e/oe));M=Y>0?[0,Me]:[Me,0]}else M=re?[Math.max(0,de),Math.max(1,me)]:[de,me]}else ee?(Z.val>=0&&(Z={val:0,nopad:1}),ie.val<=0&&(ie={val:0,nopad:1})):re&&(Z.val-ce*C(Z)<0&&(Z={val:0,nopad:1}),ie.val<=0&&(ie={val:1,nopad:1})),ce=(ie.val-Z.val-n(m,j.val,W.val))/(oe-C(Z)-P(ie)),M=[Z.val-ce*C(Z),ie.val+ce*P(ie)];return G&&M.reverse(),i.simpleMap(M,m.l2r||Number)}function n(y,m,T){var p=0;if(y.rangebreaks)for(var M=y.locateBreaks(m,T),A=0;A0?T.ppadplus:T.ppadminus)||T.ppad||0),ee=J((y._m>0?T.ppadminus:T.ppadplus)||T.ppad||0),re=J(T.vpadplus||T.vpad),oe=J(T.vpadminus||T.vpad);if(!ie){if(B=1/0,Y=-1/0,Z)for(p=0;p0&&(B=M),M>Y&&M-w&&(B=M),M>Y&&M=de;p--)ce(p);return{min:D,max:G,opts:T}},concatExtremes:u};var l=3;function u(y,m,T){var p,M,A,C=m._id,P=y._fullData,O=y._fullLayout,z=[],B=[];function Y(W,Z){for(p=0;p=T&&(z.extrapad||!C)){P=!1;break}M(m,z.val)&&z.pad<=T&&(C||!z.extrapad)&&(y.splice(O,1),O--)}if(P){var B=A&&m===0;y.push({val:m,pad:B?0:T,extrapad:!B&&C})}}function g(y){return k(y)&&Math.abs(y)=m}},89298:function(R,E,e){var _=e(39898),k=e(92770),i=e(74875),w=e(73972),v=e(71828),h=v.strTranslate,s=e(63893),t=e(92998),a=e(7901),r=e(91424),n=e(13838),o=e(66287),l=e(50606),u=l.ONEMAXYEAR,d=l.ONEAVGYEAR,c=l.ONEMINYEAR,b=l.ONEMAXQUARTER,g=l.ONEAVGQUARTER,f=l.ONEMINQUARTER,x=l.ONEMAXMONTH,y=l.ONEAVGMONTH,m=l.ONEMINMONTH,T=l.ONEWEEK,p=l.ONEDAY,M=p/2,A=l.ONEHOUR,C=l.ONEMIN,P=l.ONESEC,O=l.MINUS_SIGN,z=l.BADNUM,B={K:"zeroline"},Y={K:"gridline",L:"path"},D={K:"minor-gridline",L:"path"},G={K:"tick",L:"path"},U={K:"tick",L:"text"},j={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},W=e(18783),Z=W.MID_SHIFT,ie=W.CAP_SHIFT,te=W.LINE_SPACING,J=W.OPPOSITE_SIDE,X=R.exports={};X.setConvert=e(21994);var ee=e(4322),re=e(41675),oe=re.idSort,ue=re.isLinked;X.id2name=re.id2name,X.name2id=re.name2id,X.cleanId=re.cleanId,X.list=re.list,X.listIds=re.listIds,X.getFromId=re.getFromId,X.getFromTrace=re.getFromTrace;var ce=e(71739);X.getAutoRange=ce.getAutoRange,X.findExtremes=ce.findExtremes;var de=1e-4;function me(Be){var je=(Be[1]-Be[0])*de;return[Be[0]-je,Be[1]+je]}X.coerceRef=function(Be,je,at,ot,xt,yt){var _t=ot.charAt(ot.length-1),gt=at._fullLayout._subplots[_t+"axis"],Ct=ot+"ref",dt={};return xt||(xt=gt[0]||(typeof yt=="string"?yt:yt[0])),yt||(yt=xt),gt=gt.concat(gt.map(function(vt){return vt+" domain"})),dt[Ct]={valType:"enumerated",values:gt.concat(yt?typeof yt=="string"?[yt]:yt:[]),dflt:xt},v.coerce(Be,je,dt,Ct)},X.getRefType=function(Be){return Be===void 0?Be:Be==="paper"?"paper":Be==="pixel"?"pixel":/( domain)$/.test(Be)?"domain":"range"},X.coercePosition=function(Be,je,at,ot,xt,yt){var _t,gt;if(X.getRefType(ot)!=="range")_t=v.ensureNumber,gt=at(xt,yt);else{var Ct=X.getFromId(je,ot);gt=at(xt,yt=Ct.fraction2r(yt)),_t=Ct.cleanPos}Be[xt]=_t(gt)},X.cleanPosition=function(Be,je,at){return(at==="paper"||at==="pixel"?v.ensureNumber:X.getFromId(je,at).cleanPos)(Be)},X.redrawComponents=function(Be,je){je=je||X.listIds(Be);var at=Be._fullLayout;function ot(xt,yt,_t,gt){for(var Ct=w.getComponentMethod(xt,yt),dt={},vt=0;vtat&&vt2e-6||((at-Be._forceTick0)/Be._minDtick%1+1.000001)%1>2e-6)&&(Be._minDtick=0)):Be._minDtick=0},X.saveRangeInitial=function(Be,je){for(var at=X.list(Be,"",!0),ot=!1,xt=0;xt.3*xn||fn(vn)||fn(Tn))){var Pn=Gt.dtick/2;Xt+=Xt+Pn.8){var Yt=Number(Gt.substr(1));dn.exactYears>.8&&Yt%12==0?Xt=X.tickIncrement(Xt,"M6","reverse")+1.5*p:dn.exactMonths>.8?Xt=X.tickIncrement(Xt,"M1","reverse")+15.5*p:Xt-=M;var ln=X.tickIncrement(Xt,Gt);if(ln<=vn)return ln}return Xt}(tn,Be,Ut,gt,xt)),jt=tn;jt<=Ct;)jt=X.tickIncrement(jt,Ut,!1,xt);return{start:je.c2r(tn,0,xt),end:je.c2r(jt,0,xt),size:Ut,_dataSpan:Ct-gt}},X.prepMinorTicks=function(Be,je,at){if(!je.minor.dtick){delete Be.dtick;var ot,xt=je.dtick&&k(je._tmin);if(xt){var yt=X.tickIncrement(je._tmin,je.dtick,!0);ot=[je._tmin,.99*yt+.01*je._tmin]}else{var _t=v.simpleMap(je.range,je.r2l);ot=[_t[0],.8*_t[0]+.2*_t[1]]}if(Be.range=v.simpleMap(ot,je.l2r),Be._isMinor=!0,X.prepTicks(Be,at),xt){var gt=k(je.dtick),Ct=k(Be.dtick),dt=gt?je.dtick:+je.dtick.substring(1),vt=Ct?Be.dtick:+Be.dtick.substring(1);gt&&Ct?xe(dt,vt)?dt===2*T&&vt===2*p&&(Be.dtick=T):dt===2*T&&vt===3*p?Be.dtick=T:dt!==T||(je._input.minor||{}).nticks?De(dt/vt,2.5)?Be.dtick=dt/2:Be.dtick=dt:Be.dtick=p:String(je.dtick).charAt(0)==="M"?Ct?Be.dtick="M1":xe(dt,vt)?dt>=12&&vt===2&&(Be.dtick="M3"):Be.dtick=je.dtick:String(Be.dtick).charAt(0)==="L"?String(je.dtick).charAt(0)==="L"?xe(dt,vt)||(Be.dtick=De(dt/vt,2.5)?je.dtick/2:je.dtick):Be.dtick="D1":Be.dtick==="D2"&&+je.dtick>1&&(Be.dtick=1)}Be.range=je.range}je.minor._tick0Init===void 0&&(Be.tick0=je.tick0)},X.prepTicks=function(Be,je){var at=v.simpleMap(Be.range,Be.r2l,void 0,void 0,je);if(Be.tickmode==="auto"||!Be.dtick){var ot,xt=Be.nticks;xt||(Be.type==="category"||Be.type==="multicategory"?(ot=Be.tickfont?v.bigFont(Be.tickfont.size||12):15,xt=Be._length/ot):(ot=Be._id.charAt(0)==="y"?40:80,xt=v.constrain(Be._length/ot,4,9)+1),Be._name==="radialaxis"&&(xt*=2)),Be.minor&&Be.minor.tickmode!=="array"||Be.tickmode==="array"&&(xt*=100),Be._roughDTick=Math.abs(at[1]-at[0])/xt,X.autoTicks(Be,Be._roughDTick),Be._minDtick>0&&Be.dtick<2*Be._minDtick&&(Be.dtick=Be._minDtick,Be.tick0=Be.l2r(Be._forceTick0))}Be.ticklabelmode==="period"&&function(yt){var _t;function gt(){return!(k(yt.dtick)||yt.dtick.charAt(0)!=="M")}var Ct=gt(),dt=X.getTickFormat(yt);if(dt){var vt=yt._dtickInit!==yt.dtick;/%[fLQsSMX]/.test(dt)||(/%[HI]/.test(dt)?(_t=A,vt&&!Ct&&yt.dtick=(Qt?0:1);Gt--){var vn=!Gt;Gt?(Be._dtickInit=Be.dtick,Be._tick0Init=Be.tick0):(Be.minor._dtickInit=Be.minor.dtick,Be.minor._tick0Init=Be.minor.tick0);var Tn=Gt?Be:v.extendFlat({},Be,Be.minor);if(vn?X.prepMinorTicks(Tn,Be,je):X.prepTicks(Tn,je),Tn.tickmode!=="array")if(Tn.tickmode!=="sync"){var dn=me(Ct),Yt=dn[0],ln=dn[1],nn=k(Tn.dtick),fn=xt==="log"&&!(nn||Tn.dtick.charAt(0)==="L"),mn=X.tickFirst(Tn,je);if(Gt){if(Be._tmin=mn,mn=ln:En<=ln;En=X.tickIncrement(En,Fn,dt,yt)){if(Gt&&xn++,Tn.rangebreaks&&!dt){if(En=At)break}if(tn.length>Bt||En===Dn)break;Dn=En;var er={value:En};Gt?(fn&&En!==(0|En)&&(er.simpleLabel=!0),_t>1&&xn%_t&&(er.skipLabel=!0),tn.push(er)):(er.minor=!0,Xt.push(er))}}else tn=[],jt=he(Be);else Gt?(tn=[],jt=fe(Be)):(Xt=[],Ut=fe(Be))}if(Qt&&!(Be.minor.ticks==="inside"&&Be.ticks==="outside"||Be.minor.ticks==="outside"&&Be.ticks==="inside")){for(var ir=tn.map(function(Lt){return Lt.value}),fr=[],ar=0;ar0?(Ln=wn-1,hn=wn):(Ln=wn,hn=wn);var Jt,en=Lt[Ln].value,cn=Lt[hn].value,pn=Math.abs(cn-en),On=rn||pn,Rn=0;On>=c?Rn=pn>=c&&pn<=u?pn:d:rn===g&&On>=f?Rn=pn>=f&&pn<=b?pn:g:On>=m?Rn=pn>=m&&pn<=x?pn:y:rn===T&&On>=T?Rn=T:On>=p?Rn=p:rn===M&&On>=M?Rn=M:rn===A&&On>=A&&(Rn=A),Rn>=pn&&(Rn=pn,Jt=!0);var Wn=kn+Rn;if($t.rangebreaks&&Rn>0){for(var Hn=0,tr=0;tr<84;tr++){var Xn=(tr+.5)/84;$t.maskBreaks(kn*(1-Xn)+Xn*Wn)!==z&&Hn++}(Rn*=Hn/84)||(Lt[wn].drop=!0),Jt&&pn>T&&(Rn=pn)}(Rn>0||wn===0)&&(Lt[wn].periodX=kn+Rn/2)}}(tn,Be,Be._definedDelta),Be.rangebreaks){var gn=Be._id.charAt(0)==="y",bn=1;Be.tickmode==="auto"&&(bn=Be.tickfont?Be.tickfont.size:12);var Cn=NaN;for(at=tn.length-1;at>-1;at--)if(tn[at].drop)tn.splice(at,1);else{tn[at].value=Ze(tn[at].value,Be);var Yn=Be.c2p(tn[at].value);(gn?Cn>Yn-bn:CnAt||jnAt&&(Nn.periodX=At),jn10||ot.substr(5)!=="01-01"?Be._tickround="d":Be._tickround=+je.substr(1)%12==0?"y":"m";else if(je>=p&&xt<=10||je>=15*p)Be._tickround="d";else if(je>=C&&xt<=16||je>=A)Be._tickround="M";else if(je>=P&&xt<=19||je>=C)Be._tickround="S";else{var yt=Be.l2r(at+je).replace(/^-/,"").length;Be._tickround=Math.max(xt,yt)-20,Be._tickround<0&&(Be._tickround=4)}}else if(k(je)||je.charAt(0)==="L"){var _t=Be.range.map(Be.r2d||Number);k(je)||(je=Number(je.substr(1))),Be._tickround=2-Math.floor(Math.log(je)/Math.LN10+.01);var gt=Math.max(Math.abs(_t[0]),Math.abs(_t[1])),Ct=Math.floor(Math.log(gt)/Math.LN10+.01),dt=Be.minexponent===void 0?3:Be.minexponent;Math.abs(Ct)>dt&&(Ve(Be.exponentformat)&&!Ye(Ct)?Be._tickexponent=3*Math.round((Ct-1)/3):Be._tickexponent=Ct)}else Be._tickround=null}function ze(Be,je,at){var ot=Be.tickfont||{};return{x:je,dx:0,dy:0,text:at||"",fontSize:ot.size,font:ot.family,fontColor:ot.color}}X.autoTicks=function(Be,je,at){var ot;function xt(At){return Math.pow(At,Math.floor(Math.log(je)/Math.LN10))}if(Be.type==="date"){Be.tick0=v.dateTick0(Be.calendar,0);var yt=2*je;if(yt>d)je/=d,ot=xt(10),Be.dtick="M"+12*Ce(je,ot,ae);else if(yt>y)je/=y,Be.dtick="M"+Ce(je,1,be);else if(yt>p){if(Be.dtick=Ce(je,p,Be._hasDayOfWeekBreaks?[1,2,7,14]:Te),!at){var _t=X.getTickFormat(Be),gt=Be.ticklabelmode==="period";gt&&(Be._rawTick0=Be.tick0),/%[uVW]/.test(_t)?Be.tick0=v.dateTick0(Be.calendar,2):Be.tick0=v.dateTick0(Be.calendar,1),gt&&(Be._dowTick0=Be.tick0)}}else yt>A?Be.dtick=Ce(je,A,be):yt>C?Be.dtick=Ce(je,C,Ie):yt>P?Be.dtick=Ce(je,P,Ie):(ot=xt(10),Be.dtick=Ce(je,ot,ae))}else if(Be.type==="log"){Be.tick0=0;var Ct=v.simpleMap(Be.range,Be.r2l);if(Be._isMinor&&(je*=1.5),je>.7)Be.dtick=Math.ceil(je);else if(Math.abs(Ct[1]-Ct[0])<1){var dt=1.5*Math.abs((Ct[1]-Ct[0])/je);je=Math.abs(Math.pow(10,Ct[1])-Math.pow(10,Ct[0]))/dt,ot=xt(10),Be.dtick="L"+Ce(je,ot,ae)}else Be.dtick=je>.3?"D2":"D1"}else Be.type==="category"||Be.type==="multicategory"?(Be.tick0=0,Be.dtick=Math.ceil(Math.max(je,1))):et(Be)?(Be.tick0=0,ot=1,Be.dtick=Ce(je,ot,ve)):(Be.tick0=0,ot=xt(10),Be.dtick=Ce(je,ot,ae));if(Be.dtick===0&&(Be.dtick=1),!k(Be.dtick)&&typeof Be.dtick!="string"){var vt=Be.dtick;throw Be.dtick=1,"ax.dtick error: "+String(vt)}},X.tickIncrement=function(Be,je,at,ot){var xt=at?-1:1;if(k(je))return v.increment(Be,xt*je);var yt=je.charAt(0),_t=xt*Number(je.substr(1));if(yt==="M")return v.incrementMonth(Be,_t,ot);if(yt==="L")return Math.log(Math.pow(10,Be)+_t)/Math.LN10;if(yt==="D"){var gt=je==="D2"?qe:Ne,Ct=Be+.01*xt,dt=v.roundUp(v.mod(Ct,1),gt,at);return Math.floor(Ct)+Math.log(_.round(Math.pow(10,dt),1))/Math.LN10}throw"unrecognized dtick "+String(je)},X.tickFirst=function(Be,je){var at=Be.r2l||Number,ot=v.simpleMap(Be.range,at,void 0,void 0,je),xt=ot[1] ")}else Xt._prevDateHead=Yt,ln+="
"+Yt;Qt.text=ln}(Be,yt,at,gt):Ct==="log"?function(Xt,Qt,Gt,vn,Tn){var dn=Xt.dtick,Yt=Qt.x,ln=Xt.tickformat,nn=typeof dn=="string"&&dn.charAt(0);if(Tn==="never"&&(Tn=""),vn&&nn!=="L"&&(dn="L3",nn="L"),ln||nn==="L")Qt.text=$e(Math.pow(10,Yt),Xt,Tn,vn);else if(k(dn)||nn==="D"&&v.mod(Yt+.01,1)<.1){var fn=Math.round(Yt),mn=Math.abs(fn),xn=Xt.exponentformat;xn==="power"||Ve(xn)&&Ye(fn)?(Qt.text=fn===0?1:fn===1?"10":"10"+(fn>1?"":O)+mn+"",Qt.fontSize*=1.25):(xn==="e"||xn==="E")&&mn>2?Qt.text="1"+xn+(fn>0?"+":O)+mn:(Qt.text=$e(Math.pow(10,Yt),Xt,"","fakehover"),dn==="D1"&&Xt._id.charAt(0)==="y"&&(Qt.dy-=Qt.fontSize/6))}else{if(nn!=="D")throw"unrecognized dtick "+String(dn);Qt.text=String(Math.round(Math.pow(10,v.mod(Yt,1)))),Qt.fontSize*=.75}if(Xt.dtick==="D1"){var Pn=String(Qt.text).charAt(0);Pn!=="0"&&Pn!=="1"||(Xt._id.charAt(0)==="y"?Qt.dx-=Qt.fontSize/4:(Qt.dy+=Qt.fontSize/2,Qt.dx+=(Xt.range[1]>Xt.range[0]?1:-1)*Qt.fontSize*(Yt<0?.5:.25)))}}(Be,yt,0,gt,jt):Ct==="category"?function(Xt,Qt){var Gt=Xt._categories[Math.round(Qt.x)];Gt===void 0&&(Gt=""),Qt.text=String(Gt)}(Be,yt):Ct==="multicategory"?function(Xt,Qt,Gt){var vn=Math.round(Qt.x),Tn=Xt._categories[vn]||[],dn=Tn[1]===void 0?"":String(Tn[1]),Yt=Tn[0]===void 0?"":String(Tn[0]);Gt?Qt.text=Yt+" - "+dn:(Qt.text=dn,Qt.text2=Yt)}(Be,yt,at):et(Be)?function(Xt,Qt,Gt,vn,Tn){if(Xt.thetaunit!=="radians"||Gt)Qt.text=$e(Qt.x,Xt,Tn,vn);else{var dn=Qt.x/180;if(dn===0)Qt.text="0";else{var Yt=function(nn){function fn(Dn,En){return Math.abs(Dn-En)<=1e-6}var mn=function(Dn){for(var En=1;!fn(Math.round(Dn*En)/En,Dn);)En*=10;return En}(nn),xn=nn*mn,Pn=Math.abs(function Dn(En,Fn){return fn(Fn,0)?En:Dn(Fn,En%Fn)}(xn,mn));return[Math.round(xn/Pn),Math.round(mn/Pn)]}(dn);if(Yt[1]>=100)Qt.text=$e(v.deg2rad(Qt.x),Xt,Tn,vn);else{var ln=Qt.x<0;Yt[1]===1?Yt[0]===1?Qt.text="π":Qt.text=Yt[0]+"π":Qt.text=["",Yt[0],"","⁄","",Yt[1],"","π"].join(""),ln&&(Qt.text=O+Qt.text)}}}}(Be,yt,at,gt,jt):function(Xt,Qt,Gt,vn,Tn){Tn==="never"?Tn="":Xt.showexponent==="all"&&Math.abs(Qt.x/Xt.dtick)<1e-6&&(Tn="hide"),Qt.text=$e(Qt.x,Xt,Tn,vn)}(Be,yt,0,gt,jt),ot||(Be.tickprefix&&!Bt(Be.showtickprefix)&&(yt.text=Be.tickprefix+yt.text),Be.ticksuffix&&!Bt(Be.showticksuffix)&&(yt.text+=Be.ticksuffix)),Be.labelalias&&Be.labelalias.hasOwnProperty(yt.text)){var Ut=Be.labelalias[yt.text];typeof Ut=="string"&&(yt.text=Ut)}if(Be.tickson==="boundaries"||Be.showdividers){var tn=function(Xt){var Qt=Be.l2p(Xt);return Qt>=0&&Qt<=Be._length?Xt:null};yt.xbnd=[tn(yt.x-.5),tn(yt.x+Be.dtick-.5)]}return yt},X.hoverLabelText=function(Be,je,at){at&&(Be=v.extendFlat({},Be,{hoverformat:at}));var ot=Array.isArray(je)?je[0]:je,xt=Array.isArray(je)?je[1]:void 0;if(xt!==void 0&&xt!==ot)return X.hoverLabelText(Be,ot,at)+" - "+X.hoverLabelText(Be,xt,at);var yt=Be.type==="log"&&ot<=0,_t=X.tickText(Be,Be.c2l(yt?-ot:ot),"hover").text;return yt?ot===0?"0":O+_t:_t};var Ue=["f","p","n","μ","m","","k","M","G","T"];function Ve(Be){return Be==="SI"||Be==="B"}function Ye(Be){return Be>14||Be<-15}function $e(Be,je,at,ot){var xt=Be<0,yt=je._tickround,_t=at||je.exponentformat||"B",gt=je._tickexponent,Ct=X.getTickFormat(je),dt=je.separatethousands;if(ot){var vt={exponentformat:_t,minexponent:je.minexponent,dtick:je.showexponent==="none"?je.dtick:k(Be)&&Math.abs(Be)||1,range:je.showexponent==="none"?je.range.map(je.r2d):[0,Be||1]};Ae(vt),yt=(Number(vt._tickround)||0)+4,gt=vt._tickexponent,je.hoverformat&&(Ct=je.hoverformat)}if(Ct)return je._numFormat(Ct)(Be).replace(/-/g,O);var At,Bt=Math.pow(10,-yt)/2;if(_t==="none"&&(gt=0),(Be=Math.abs(Be))"+At+"":_t==="B"&>===9?Be+="B":Ve(_t)&&(Be+=Ue[gt/3+5])),xt?O+Be:Be}function rt(Be,je){if(Be){var at=Object.keys(j).reduce(function(ot,xt){return je.indexOf(xt)!==-1&&j[xt].forEach(function(yt){ot[yt]=1}),ot},{});Object.keys(Be).forEach(function(ot){at[ot]||(ot.length===1?Be[ot]=0:delete Be[ot])})}}function ht(Be,je){for(var at=[],ot={},xt=0;xt1&&at=xt.min&&Be=0,Qt=vt(Bt,jt[1])<=0;return(Ut||Xt)&&(tn||Qt)}if(Be.tickformatstops&&Be.tickformatstops.length>0)switch(Be.type){case"date":case"linear":for(je=0;je=_t(xt)))){at=ot;break}break;case"log":for(je=0;je=0&&xt.unshift(xt.splice(dt,1).shift())}});var _t={false:{left:0,right:0}};return v.syncOrAsync(xt.map(function(gt){return function(){if(gt){var Ct=X.getFromId(Be,gt);at||(at={}),at.axShifts=_t,at.overlayingShiftedAx=yt;var dt=X.drawOne(Be,Ct,at);return Ct._shiftPusher&&ft(Ct,Ct._fullDepth||0,_t,!0),Ct._r=Ct.range.slice(),Ct._rl=v.simpleMap(Ct._r,Ct.r2l),dt}}}))},X.drawOne=function(Be,je,at){var ot,xt,yt,_t=(at=at||{}).axShifts||{},gt=at.overlayingShiftedAx||[];je.setScale();var Ct=Be._fullLayout,dt=je._id,vt=dt.charAt(0),At=X.counterLetter(dt),Bt=Ct._plots[je._mainSubplot];if(Bt){if(je._shiftPusher=je.autoshift||gt.indexOf(je._id)!==-1||gt.indexOf(je.overlaying)!==-1,je._shiftPusher&je.anchor==="free"){var jt=je.linewidth/2||0;je.ticks==="inside"&&(jt+=je.ticklen),ft(je,jt,_t,!0),ft(je,je.shift||0,_t,!1)}at.skipTitle===!0&&je._shift!==void 0||(je._shift=function(hn,Jt){return hn.autoshift?Jt[hn.overlaying][hn.side]:hn.shift||0}(je,_t));var Ut=Bt[vt+"axislayer"],tn=je._mainLinePosition,Xt=tn+=je._shift,Qt=je._mainMirrorPosition,Gt=je._vals=X.calcTicks(je),vn=[je.mirror,Xt,Qt].join("_");for(ot=0;ot0?hn.bottom-Rn:0,Wn))));var Hn=0,tr=0;if(je._shiftPusher&&(Hn=Math.max(Wn,hn.height>0?pn==="l"?Rn-hn.left:hn.right-Rn:0),je.title.text!==Ct._dfltTitle[vt]&&(tr=(je._titleStandoff||0)+(je._titleScoot||0),pn==="l"&&(tr+=wt(je))),je._fullDepth=Math.max(Hn,tr)),je.automargin){Jt={x:0,y:0,r:0,l:0,t:0,b:0};var Xn=[0,1],lr=typeof je._shift=="number"?je._shift:0;if(vt==="x"){if(pn==="b"?Jt[pn]=je._depth:(Jt[pn]=je._depth=Math.max(hn.width>0?Rn-hn.top:0,Wn),Xn.reverse()),hn.width>0){var or=hn.right-(je._offset+je._length);or>0&&(Jt.xr=1,Jt.r=or);var sr=je._offset-hn.left;sr>0&&(Jt.xl=0,Jt.l=sr)}}else if(pn==="l"?(je._depth=Math.max(hn.height>0?Rn-hn.left:0,Wn),Jt[pn]=je._depth-lr):(je._depth=Math.max(hn.height>0?hn.right-Rn:0,Wn),Jt[pn]=je._depth+lr,Xn.reverse()),hn.height>0){var gr=hn.bottom-(je._offset+je._length);gr>0&&(Jt.yb=0,Jt.b=gr);var vr=je._offset-hn.top;vr>0&&(Jt.yt=1,Jt.t=vr)}Jt[At]=je.anchor==="free"?je.position:je._anchorAxis.domain[Xn[0]],je.title.text!==Ct._dfltTitle[vt]&&(Jt[pn]+=wt(je)+(je.title.standoff||0)),je.mirror&&je.anchor!=="free"&&((en={x:0,y:0,r:0,l:0,t:0,b:0})[On]=je.linewidth,je.mirror&&je.mirror!==!0&&(en[On]+=Wn),je.mirror===!0||je.mirror==="ticks"?en[At]=je._anchorAxis.domain[Xn[1]]:je.mirror!=="all"&&je.mirror!=="allticks"||(en[At]=[je._counterDomainMin,je._counterDomainMax][Xn[1]]))}kn&&(cn=w.getComponentMethod("rangeslider","autoMarginOpts")(Be,je)),typeof je.automargin=="string"&&(rt(Jt,je.automargin),rt(en,je.automargin)),i.autoMargin(Be,Tt(je),Jt),i.autoMargin(Be,Et(je),en),i.autoMargin(Be,St(je),cn)}),v.syncOrAsync(rn)}}function Ln(hn){var Jt=dt+(hn||"tick");return Tn[Jt]||(Tn[Jt]=function(en,cn){var pn,On,Rn,Wn;return en._selections[cn].size()?(pn=1/0,On=-1/0,Rn=1/0,Wn=-1/0,en._selections[cn].each(function(){var Hn=lt(this),tr=r.bBox(Hn.node().parentNode);pn=Math.min(pn,tr.top),On=Math.max(On,tr.bottom),Rn=Math.min(Rn,tr.left),Wn=Math.max(Wn,tr.right)})):(pn=0,On=0,Rn=0,Wn=0),{top:pn,bottom:On,left:Rn,right:Wn,height:On-pn,width:Wn-Rn}}(je,Jt)),Tn[Jt]}},X.getTickSigns=function(Be,je){var at=Be._id.charAt(0),ot={x:"top",y:"right"}[at],xt=Be.side===ot?1:-1,yt=[-1,1,xt,-xt];return(je?(Be.minor||{}).ticks:Be.ticks)!=="inside"==(at==="x")&&(yt=yt.map(function(_t){return-_t})),Be.side&&yt.push({l:-1,t:-1,r:1,b:1}[Be.side.charAt(0)]),yt},X.makeTransTickFn=function(Be){return Be._id.charAt(0)==="x"?function(je){return h(Be._offset+Be.l2p(je.x),0)}:function(je){return h(0,Be._offset+Be.l2p(je.x))}},X.makeTransTickLabelFn=function(Be){var je=function(xt){var yt=xt.ticklabelposition||"",_t=function(Qt){return yt.indexOf(Qt)!==-1},gt=_t("top"),Ct=_t("left"),dt=_t("right"),vt=_t("bottom"),At=_t("inside"),Bt=vt||Ct||gt||dt;if(!Bt&&!At)return[0,0];var jt=xt.side,Ut=Bt?(xt.tickwidth||0)/2:0,tn=3,Xt=xt.tickfont?xt.tickfont.size:12;return(vt||gt)&&(Ut+=Xt*ie,tn+=(xt.linewidth||0)/2),(Ct||dt)&&(Ut+=(xt.linewidth||0)/2,tn+=3),At&&jt==="top"&&(tn-=Xt*(1-ie)),(Ct||gt)&&(Ut=-Ut),jt!=="bottom"&&jt!=="right"||(tn=-tn),[Bt?Ut:0,At?tn:0]}(Be),at=je[0],ot=je[1];return Be._id.charAt(0)==="x"?function(xt){return h(at+Be._offset+Be.l2p(nt(xt)),ot)}:function(xt){return h(ot,at+Be._offset+Be.l2p(nt(xt)))}},X.makeTickPath=function(Be,je,at,ot){ot||(ot={});var xt=ot.minor;if(xt&&!Be.minor)return"";var yt=ot.len!==void 0?ot.len:xt?Be.minor.ticklen:Be.ticklen,_t=Be._id.charAt(0),gt=(Be.linewidth||1)/2;return _t==="x"?"M0,"+(je+gt*at)+"v"+yt*at:"M"+(je+gt*at)+",0h"+yt*at},X.makeLabelFns=function(Be,je,at){var ot=Be.ticklabelposition||"",xt=function(xn){return ot.indexOf(xn)!==-1},yt=xt("top"),_t=xt("left"),gt=xt("right"),Ct=xt("bottom")||_t||yt||gt,dt=xt("inside"),vt=ot==="inside"&&Be.ticks==="inside"||!dt&&Be.ticks==="outside"&&Be.tickson!=="boundaries",At=0,Bt=0,jt=vt?Be.ticklen:0;if(dt?jt*=-1:Ct&&(jt=0),vt&&(At+=jt,at)){var Ut=v.deg2rad(at);At=jt*Math.cos(Ut)+1,Bt=jt*Math.sin(Ut)}Be.showticklabels&&(vt||Be.showline)&&(At+=.2*Be.tickfont.size);var tn,Xt,Qt,Gt,vn,Tn={labelStandoff:At+=(Be.linewidth||1)/2*(dt?-1:1),labelShift:Bt},dn=0,Yt=Be.side,ln=Be._id.charAt(0),nn=Be.tickangle;if(ln==="x")Gt=(vn=!dt&&Yt==="bottom"||dt&&Yt==="top")?1:-1,dt&&(Gt*=-1),tn=Bt*Gt,Xt=je+At*Gt,Qt=vn?1:-.2,Math.abs(nn)===90&&(dt?Qt+=Z:Qt=nn===-90&&Yt==="bottom"?ie:nn===90&&Yt==="top"?Z:.5,dn=Z/2*(nn/90)),Tn.xFn=function(xn){return xn.dx+tn+dn*xn.fontSize},Tn.yFn=function(xn){return xn.dy+Xt+xn.fontSize*Qt},Tn.anchorFn=function(xn,Pn){if(Ct){if(_t)return"end";if(gt)return"start"}return k(Pn)&&Pn!==0&&Pn!==180?Pn*Gt<0!==dt?"end":"start":"middle"},Tn.heightFn=function(xn,Pn,Dn){return Pn<-60||Pn>60?-.5*Dn:Be.side==="top"!==dt?-Dn:0};else if(ln==="y"){if(Gt=(vn=!dt&&Yt==="left"||dt&&Yt==="right")?1:-1,dt&&(Gt*=-1),tn=At,Xt=Bt*Gt,Qt=0,dt||Math.abs(nn)!==90||(Qt=nn===-90&&Yt==="left"||nn===90&&Yt==="right"?ie:.5),dt){var fn=k(nn)?+nn:0;if(fn!==0){var mn=v.deg2rad(fn);dn=Math.abs(Math.sin(mn))*ie*Gt,Qt=0}}Tn.xFn=function(xn){return xn.dx+je-(tn+xn.fontSize*Qt)*Gt+dn*xn.fontSize},Tn.yFn=function(xn){return xn.dy+Xt+xn.fontSize*Z},Tn.anchorFn=function(xn,Pn){return k(Pn)&&Math.abs(Pn)===90?"middle":vn?"end":"start"},Tn.heightFn=function(xn,Pn,Dn){return Be.side==="right"&&(Pn*=-1),Pn<-30?-Dn:Pn<30?-.5*Dn:0}}return Tn},X.drawTicks=function(Be,je,at){at=at||{};var ot=je._id+"tick",xt=[].concat(je.minor&&je.minor.ticks?at.vals.filter(function(_t){return _t.minor&&!_t.noTick}):[]).concat(je.ticks?at.vals.filter(function(_t){return!_t.minor&&!_t.noTick}):[]),yt=at.layer.selectAll("path."+ot).data(xt,bt);yt.exit().remove(),yt.enter().append("path").classed(ot,1).classed("ticks",1).classed("crisp",at.crisp!==!1).each(function(_t){return a.stroke(_.select(this),_t.minor?je.minor.tickcolor:je.tickcolor)}).style("stroke-width",function(_t){return r.crispRound(Be,_t.minor?je.minor.tickwidth:je.tickwidth,1)+"px"}).attr("d",at.path).style("display",null),st(je,[G]),yt.attr("transform",at.transFn)},X.drawGrid=function(Be,je,at){if(at=at||{},je.tickmode!=="sync"){var ot=je._id+"grid",xt=je.minor&&je.minor.showgrid,yt=xt?at.vals.filter(function(Qt){return Qt.minor}):[],_t=je.showgrid?at.vals.filter(function(Qt){return!Qt.minor}):[],gt=at.counterAxis;if(gt&&X.shouldShowZeroLine(Be,je,gt))for(var Ct=je.tickmode==="array",dt=0;dt<_t.length;dt++){var vt=_t[dt].x;if(Ct?!vt:Math.abs(vt)=0;Ut--){var tn=Ut?Bt:jt;if(tn){var Xt=tn.selectAll("path."+ot).data(Ut?_t:yt,bt);Xt.exit().remove(),Xt.enter().append("path").classed(ot,1).classed("crisp",at.crisp!==!1),Xt.attr("transform",at.transFn).attr("d",at.path).each(function(Qt){return a.stroke(_.select(this),Qt.minor?je.minor.gridcolor:je.gridcolor||"#ddd")}).style("stroke-dasharray",function(Qt){return r.dashStyle(Qt.minor?je.minor.griddash:je.griddash,Qt.minor?je.minor.gridwidth:je.gridwidth)}).style("stroke-width",function(Qt){return(Qt.minor?At:je._gw)+"px"}).style("display",null),typeof at.path=="function"&&Xt.attr("d",at.path)}}st(je,[Y,D])}},X.drawZeroLine=function(Be,je,at){at=at||at;var ot=je._id+"zl",xt=X.shouldShowZeroLine(Be,je,at.counterAxis),yt=at.layer.selectAll("path."+ot).data(xt?[{x:0,id:je._id}]:[]);yt.exit().remove(),yt.enter().append("path").classed(ot,1).classed("zl",1).classed("crisp",at.crisp!==!1).each(function(){at.layer.selectAll("path").sort(function(_t,gt){return oe(_t.id,gt.id)})}),yt.attr("transform",at.transFn).attr("d",at.path).call(a.stroke,je.zerolinecolor||a.defaultLine).style("stroke-width",r.crispRound(Be,je.zerolinewidth,je._gw||1)+"px").style("display",null),st(je,[B])},X.drawLabels=function(Be,je,at){at=at||{};var ot=Be._fullLayout,xt=je._id,yt=xt.charAt(0),_t=at.cls||xt+"tick",gt=at.vals.filter(function(Gt){return Gt.text}),Ct=at.labelFns,dt=at.secondary?0:je.tickangle,vt=(je._prevTickAngles||{})[_t],At=at.layer.selectAll("g."+_t).data(je.showticklabels?gt:[],bt),Bt=[];function jt(Gt,vn){Gt.each(function(Tn){var dn=_.select(this),Yt=dn.select(".text-math-group"),ln=Ct.anchorFn(Tn,vn),nn=at.transFn.call(dn.node(),Tn)+(k(vn)&&+vn!=0?" rotate("+vn+","+Ct.xFn(Tn)+","+(Ct.yFn(Tn)-Tn.fontSize/2)+")":""),fn=s.lineCount(dn),mn=te*Tn.fontSize,xn=Ct.heightFn(Tn,k(vn)?+vn:0,(fn-1)*mn);if(xn&&(nn+=h(0,xn)),Yt.empty()){var Pn=dn.select("text");Pn.attr({transform:nn,"text-anchor":ln}),Pn.style("opacity",1),je._adjustTickLabelsOverflow&&je._adjustTickLabelsOverflow()}else{var Dn=r.bBox(Yt.node()).width*{end:-.5,start:.5}[ln];Yt.attr("transform",nn+h(Dn,0))}})}At.enter().append("g").classed(_t,1).append("text").attr("text-anchor","middle").each(function(Gt){var vn=_.select(this),Tn=Be._promises.length;vn.call(s.positionText,Ct.xFn(Gt),Ct.yFn(Gt)).call(r.font,Gt.font,Gt.fontSize,Gt.fontColor).text(Gt.text).call(s.convertToTspans,Be),Be._promises[Tn]?Bt.push(Be._promises.pop().then(function(){jt(vn,dt)})):jt(vn,dt)}),st(je,[U]),At.exit().remove(),at.repositionOnUpdate&&At.each(function(Gt){_.select(this).select("text").call(s.positionText,Ct.xFn(Gt),Ct.yFn(Gt))}),je._adjustTickLabelsOverflow=function(){var Gt=je.ticklabeloverflow;if(Gt&&Gt!=="allow"){var vn=Gt.indexOf("hide")!==-1,Tn=je._id.charAt(0)==="x",dn=0,Yt=Tn?Be._fullLayout.width:Be._fullLayout.height;if(Gt.indexOf("domain")!==-1){var ln=v.simpleMap(je.range,je.r2l);dn=je.l2p(ln[0])+je._offset,Yt=je.l2p(ln[1])+je._offset}var nn=Math.min(dn,Yt),fn=Math.max(dn,Yt),mn=je.side,xn=1/0,Pn=-1/0;for(var Dn in At.each(function(er){var ir=_.select(this);if(ir.select(".text-math-group").empty()){var fr=r.bBox(ir.node()),ar=0;Tn?(fr.right>fn||fr.leftfn||fr.top+(je.tickangle?0:er.fontSize/4)je["_visibleLabelMin_"+ln._id]?Fn.style("display","none"):fn.K!=="tick"||nn||Fn.style("display",null)})})})})},jt(At,vt+1?vt:dt);var Ut=null;je._selections&&(je._selections[_t]=At);var tn=[function(){return Bt.length&&Promise.all(Bt)}];je.automargin&&ot._redrawFromAutoMarginCount&&vt===90?(Ut=90,tn.push(function(){jt(At,vt)})):tn.push(function(){if(jt(At,dt),gt.length&&yt==="x"&&!k(dt)&&(je.type!=="log"||String(je.dtick).charAt(0)!=="D")){Ut=0;var Gt,vn=0,Tn=[];if(At.each(function(ir){vn=Math.max(vn,ir.fontSize);var fr=je.l2p(ir.x),ar=lt(this),Kn=r.bBox(ar.node());Tn.push({top:0,bottom:10,height:10,left:fr-Kn.width/2,right:fr+Kn.width/2+2,width:Kn.width+2})}),je.tickson!=="boundaries"&&!je.showdividers||at.secondary){var dn=gt.length,Yt=Math.abs((gt[dn-1].x-gt[0].x)*je._m)/(dn-1),ln=je.ticklabelposition||"",nn=function(ir){return ln.indexOf(ir)!==-1},fn=nn("top"),mn=nn("left"),xn=nn("right"),Pn=nn("bottom")||mn||fn||xn?(je.tickwidth||0)+6:0,Dn=Yt<2.5*vn||je.type==="multicategory"||je._name==="realaxis";for(Gt=0;Gt1)for(gt=1;gt2*p}(l,n))return"date";var g=o.autotypenumbers!=="strict";return function(f,x){for(var y=f.length,m=a(y),T=0,p=0,M={},A=0;A2*T}(l,g)?"category":function(f,x){for(var y=f.length,m=0;m=2){var p,M,A="";if(T.length===2){for(p=0;p<2;p++)if(M=g(T[p])){A=u;break}}var C=m("pattern",A);if(C===u)for(p=0;p<2;p++)(M=g(T[p]))&&(x.bounds[p]=T[p]=M-1);if(C)for(p=0;p<2;p++)switch(M=T[p],C){case u:if(!_(M)||(M=+M)!==Math.floor(M)||M<0||M>=7)return void(x.enabled=!1);x.bounds[p]=T[p]=M;break;case d:if(!_(M)||(M=+M)<0||M>24)return void(x.enabled=!1);x.bounds[p]=T[p]=M}if(y.autorange===!1){var P=y.range;if(P[0]P[1])return void(x.enabled=!1)}else if(T[0]>P[0]&&T[1]s?1:-1:+(w.substr(1)||1)-+(v.substr(1)||1)},E.ref2id=function(w){return!!/^[xyz]/.test(w)&&w.split(" ")[0]},E.isLinked=function(w,v){return i(v,w._axisMatchGroups)||i(v,w._axisConstraintGroups)}},15258:function(R){R.exports=function(E,e,_,k){if(e.type==="category"){var i,w=E.categoryarray,v=Array.isArray(w)&&w.length>0;v&&(i="array");var h,s=_("categoryorder",i);s==="array"&&(h=_("categoryarray")),v||s!=="array"||(s=e.categoryorder="trace"),s==="trace"?e._initialCategories=[]:s==="array"?e._initialCategories=h.slice():(h=function(t,a){var r,n,o,l=a.dataAttr||t._id.charAt(0),u={};if(a.axData)r=a.axData;else for(r=[],n=0;nf?x.substr(f):y.substr(g))+m:x+y+c*b:m}function u(c,b){for(var g=b._size,f=g.h/g.w,x={},y=Object.keys(c),m=0;ms*O)||D){for(g=0;gee&&ceJ&&(J=ce);p/=(J-te)/(2*X),te=y.l2r(te),J=y.l2r(J),y.range=y._input.range=W=0?Math.min(ce,.9):1/(1/Math.max(ce,-.3)+3.222))}function W(ce,de,me,_e,Me){return ce.append("path").attr("class","zoombox").style({fill:de>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",s(me,_e)).attr("d",Me+"Z")}function Z(ce,de,me){return ce.append("path").attr("class","zoombox-corners").style({fill:a.background,stroke:a.defaultLine,"stroke-width":1,opacity:0}).attr("transform",s(de,me)).attr("d","M0,0Z")}function ie(ce,de,me,_e,Me,we){ce.attr("d",_e+"M"+me.l+","+me.t+"v"+me.h+"h"+me.w+"v-"+me.h+"h-"+me.w+"Z"),te(ce,de,Me,we)}function te(ce,de,me,_e){me||(ce.transition().style("fill",_e>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),de.transition().style("opacity",1).duration(200))}function J(ce){_.select(ce).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function X(ce){z&&ce.data&&ce._context.showTips&&(k.notifier(k._(ce,"Double-click to zoom back out"),"long"),z=!1)}function ee(ce){var de=Math.floor(Math.min(ce.b-ce.t,ce.r-ce.l,O)/2);return"M"+(ce.l-3.5)+","+(ce.t-.5+de)+"h3v"+-de+"h"+de+"v-3h-"+(de+3)+"ZM"+(ce.r+3.5)+","+(ce.t-.5+de)+"h-3v"+-de+"h"+-de+"v-3h"+(de+3)+"ZM"+(ce.r+3.5)+","+(ce.b+.5-de)+"h-3v"+de+"h"+-de+"v3h"+(de+3)+"ZM"+(ce.l-3.5)+","+(ce.b+.5-de)+"h3v"+de+"h"+de+"v3h-"+(de+3)+"Z"}function re(ce,de,me,_e,Me){for(var we,xe,De,Ee,Se=!1,he={},fe={},ae=(Me||{}).xaHash,be=(Me||{}).yaHash,Ie=0;Ie=0)nn._fullLayout._deactivateShape(nn);else{var fn=nn._fullLayout.clickmode;if(J(nn),Yt!==2||Tt||Xt(),lt)fn.indexOf("select")>-1&&M(ln,nn,ae,be,de.id,ot),fn.indexOf("event")>-1&&n.click(nn,ln,de.id);else if(Yt===1&&Tt){var mn=xe?Se:Ee,xn=xe==="s"||De==="w"?0:1,Pn=mn._name+".range["+xn+"]",Dn=function(er,ir){var fr,ar=er.range[ir],Kn=Math.abs(ar-er.range[1-ir]);return er.type==="date"?ar:er.type==="log"?(fr=Math.ceil(Math.max(0,-Math.log(Kn)/Math.LN10))+3,i("."+fr+"g")(Math.pow(10,ar))):(fr=Math.floor(Math.log(Math.abs(ar))/Math.LN10)-Math.floor(Math.log(Kn)/Math.LN10)+4,i("."+String(fr)+"g")(ar))}(mn,xn),En="left",Fn="middle";if(mn.fixedrange)return;xe?(Fn=xe==="n"?"top":"bottom",mn.side==="right"&&(En="right")):De==="e"&&(En="right"),nn._context.showAxisRangeEntryBoxes&&_.select(Ft).call(t.makeEditable,{gd:nn,immediate:!0,background:nn._fullLayout.paper_bgcolor,text:String(Dn),fill:mn.tickfont?mn.tickfont.color:"#444",horizontalAlign:En,verticalAlign:Fn}).on("edit",function(er){var ir=mn.d2r(er);ir!==void 0&&h.call("_guiRelayout",nn,Pn,ir)})}}}function _t(Yt,ln){if(ce._transitioningWithDuration)return!1;var nn=Math.max(0,Math.min(Ne,bt*Yt+zt)),fn=Math.max(0,Math.min(qe,wt*ln+Je)),mn=Math.abs(nn-zt),xn=Math.abs(fn-Je);function Pn(){ft="",et.r=et.l,et.t=et.b,je.attr("d","M0,0Z")}if(et.l=Math.min(zt,nn),et.r=Math.max(zt,nn),et.t=Math.min(Je,fn),et.b=Math.max(Je,fn),ve.isSubplotConstrained)mn>O||xn>O?(ft="xy",mn/Ne>xn/qe?(xn=mn*qe/Ne,Je>fn?et.t=Je-xn:et.b=Je+xn):(mn=xn*Ne/qe,zt>nn?et.l=zt-mn:et.r=zt+mn),je.attr("d",ee(et))):Pn();else if(Ce.isSubplotConstrained)if(mn>O||xn>O){ft="xy";var Dn=Math.min(et.l/Ne,(qe-et.b)/qe),En=Math.max(et.r/Ne,(qe-et.t)/qe);et.l=Dn*Ne,et.r=En*Ne,et.b=(1-Dn)*qe,et.t=(1-En)*qe,je.attr("d",ee(et))}else Pn();else!ze||xn0){var Fn;if(Ce.isSubplotConstrained||!Ae&&ze.length===1){for(Fn=0;Fny[1]-.000244140625&&(w.domain=t),k.noneOrAll(i.domain,w.domain,t),w.tickmode==="sync"&&(w.tickmode="auto")}return v("layer"),w}},89426:function(R,E,e){var _=e(59652);R.exports=function(k,i,w,v,h){h||(h={});var s=h.tickSuffixDflt,t=_(k);w("tickprefix")&&w("showtickprefix",t),w("ticksuffix",s)&&w("showticksuffix",t)}},42449:function(R,E,e){var _=e(18783).FROM_BL;R.exports=function(k,i,w){w===void 0&&(w=_[k.constraintoward||"center"]);var v=[k.r2l(k.range[0]),k.r2l(k.range[1])],h=v[0]+(v[1]-v[0])*w;k.range=k._input.range=[k.l2r(h+(v[0]-h)*i),k.l2r(h+(v[1]-h)*i)],k.setScale()}},21994:function(R,E,e){var _=e(39898),k=e(84096).g0,i=e(71828),w=i.numberFormat,v=e(92770),h=i.cleanNumber,s=i.ms2DateTime,t=i.dateTime2ms,a=i.ensureNumber,r=i.isArrayOrTypedArray,n=e(50606),o=n.FP_SAFE,l=n.BADNUM,u=n.LOG_CLIP,d=n.ONEWEEK,c=n.ONEDAY,b=n.ONEHOUR,g=n.ONEMIN,f=n.ONESEC,x=e(41675),y=e(85555),m=y.HOUR_PATTERN,T=y.WEEKDAY_PATTERN;function p(A){return Math.pow(10,A)}function M(A){return A!=null}R.exports=function(A,C){C=C||{};var P=A._id||"x",O=P.charAt(0);function z(re,oe){if(re>0)return Math.log(re)/Math.LN10;if(re<=0&&oe&&A.range&&A.range.length===2){var ue=A.range[0],ce=A.range[1];return .5*(ue+ce-2*u*Math.abs(ue-ce))}return l}function B(re,oe,ue,ce){if((ce||{}).msUTC&&v(re))return+re;var de=t(re,ue||A.calendar);if(de===l){if(!v(re))return l;re=+re;var me=Math.floor(10*i.mod(re+.05,1)),_e=Math.round(re-me/10);de=t(new Date(_e))+me/10}return de}function Y(re,oe,ue){return s(re,oe,ue||A.calendar)}function D(re){return A._categories[Math.round(re)]}function G(re){if(M(re)){if(A._categoriesMap===void 0&&(A._categoriesMap={}),A._categoriesMap[re]!==void 0)return A._categoriesMap[re];A._categories.push(typeof re=="number"?String(re):re);var oe=A._categories.length-1;return A._categoriesMap[re]=oe,oe}return l}function U(re){if(A._categoriesMap)return A._categoriesMap[re]}function j(re){var oe=U(re);return oe!==void 0?oe:v(re)?+re:void 0}function W(re){return v(re)?+re:U(re)}function Z(re,oe,ue){return _.round(ue+oe*re,2)}function ie(re,oe,ue){return(re-ue)/oe}var te=function(re){return v(re)?Z(re,A._m,A._b):l},J=function(re){return ie(re,A._m,A._b)};if(A.rangebreaks){var X=O==="y";te=function(re){if(!v(re))return l;var oe=A._rangebreaks.length;if(!oe)return Z(re,A._m,A._b);var ue=X;A.range[0]>A.range[1]&&(ue=!ue);for(var ce=ue?-1:1,de=ce*re,me=0,_e=0;_ewe)){me=de<(Me+we)/2?_e:_e+1;break}me=_e+1}var xe=A._B[me]||0;return isFinite(xe)?Z(re,A._m2,xe):0},J=function(re){var oe=A._rangebreaks.length;if(!oe)return ie(re,A._m,A._b);for(var ue=0,ce=0;ceA._rangebreaks[ce].pmax&&(ue=ce+1);return ie(re,A._m2,A._B[ue])}}A.c2l=A.type==="log"?z:a,A.l2c=A.type==="log"?p:a,A.l2p=te,A.p2l=J,A.c2p=A.type==="log"?function(re,oe){return te(z(re,oe))}:te,A.p2c=A.type==="log"?function(re){return p(J(re))}:J,["linear","-"].indexOf(A.type)!==-1?(A.d2r=A.r2d=A.d2c=A.r2c=A.d2l=A.r2l=h,A.c2d=A.c2r=A.l2d=A.l2r=a,A.d2p=A.r2p=function(re){return A.l2p(h(re))},A.p2d=A.p2r=J,A.cleanPos=a):A.type==="log"?(A.d2r=A.d2l=function(re,oe){return z(h(re),oe)},A.r2d=A.r2c=function(re){return p(h(re))},A.d2c=A.r2l=h,A.c2d=A.l2r=a,A.c2r=z,A.l2d=p,A.d2p=function(re,oe){return A.l2p(A.d2r(re,oe))},A.p2d=function(re){return p(J(re))},A.r2p=function(re){return A.l2p(h(re))},A.p2r=J,A.cleanPos=a):A.type==="date"?(A.d2r=A.r2d=i.identity,A.d2c=A.r2c=A.d2l=A.r2l=B,A.c2d=A.c2r=A.l2d=A.l2r=Y,A.d2p=A.r2p=function(re,oe,ue){return A.l2p(B(re,0,ue))},A.p2d=A.p2r=function(re,oe,ue){return Y(J(re),oe,ue)},A.cleanPos=function(re){return i.cleanDate(re,l,A.calendar)}):A.type==="category"?(A.d2c=A.d2l=G,A.r2d=A.c2d=A.l2d=D,A.d2r=A.d2l_noadd=j,A.r2c=function(re){var oe=W(re);return oe!==void 0?oe:A.fraction2r(.5)},A.l2r=A.c2r=a,A.r2l=W,A.d2p=function(re){return A.l2p(A.r2c(re))},A.p2d=function(re){return D(J(re))},A.r2p=A.d2p,A.p2r=J,A.cleanPos=function(re){return typeof re=="string"&&re!==""?re:a(re)}):A.type==="multicategory"&&(A.r2d=A.c2d=A.l2d=D,A.d2r=A.d2l_noadd=j,A.r2c=function(re){var oe=j(re);return oe!==void 0?oe:A.fraction2r(.5)},A.r2c_just_indices=U,A.l2r=A.c2r=a,A.r2l=j,A.d2p=function(re){return A.l2p(A.r2c(re))},A.p2d=function(re){return D(J(re))},A.r2p=A.d2p,A.p2r=J,A.cleanPos=function(re){return Array.isArray(re)||typeof re=="string"&&re!==""?re:a(re)},A.setupMultiCategory=function(re){var oe,ue,ce=A._traceIndices,de=A._matchGroup;if(de&&A._categories.length===0){for(var me in de)if(me!==P){var _e=C[x.id2name(me)];ce=ce.concat(_e._traceIndices)}}var Me=[[0,{}],[0,{}]],we=[];for(oe=0;oeo&&(de[ue]=o),de[0]===de[1]){var _e=Math.max(1,Math.abs(1e-6*de[0]));de[0]-=_e,de[1]+=_e}}else i.nestedProperty(A,re).set(ce)},A.setScale=function(re){var oe=C._size;if(A.overlaying){var ue=x.getFromId({_fullLayout:C},A.overlaying);A.domain=ue.domain}var ce=re&&A._r?"_r":"range",de=A.calendar;A.cleanRange(ce);var me,_e,Me=A.r2l(A[ce][0],de),we=A.r2l(A[ce][1],de),xe=O==="y";if(xe?(A._offset=oe.t+(1-A.domain[1])*oe.h,A._length=oe.h*(A.domain[1]-A.domain[0]),A._m=A._length/(Me-we),A._b=-A._m*we):(A._offset=oe.l+A.domain[0]*oe.w,A._length=oe.w*(A.domain[1]-A.domain[0]),A._m=A._length/(we-Me),A._b=-A._m*Me),A._rangebreaks=[],A._lBreaks=0,A._m2=0,A._B=[],A.rangebreaks&&(A._rangebreaks=A.locateBreaks(Math.min(Me,we),Math.max(Me,we)),A._rangebreaks.length)){for(me=0;mewe&&(De=!De),De&&A._rangebreaks.reverse();var Ee=De?-1:1;for(A._m2=Ee*A._length/(Math.abs(we-Me)-A._lBreaks),A._B.push(-A._m2*(xe?we:Me)),me=0;mece&&(ce+=7,dece&&(ce+=24,de=ue&&de=ue&&re=Ce.min&&(TeCe.max&&(Ce.max=Ne),qe=!1)}qe&&_e.push({min:Te,max:Ne})}};for(ue=0;uet.duration?(function(){for(var m={},T=0;T rect").call(w.setTranslate,0,0).call(w.setScale,1,1),g.plot.call(w.setTranslate,f._offset,x._offset).call(w.setScale,1,1);var y=g.plot.selectAll(".scatterlayer .trace");y.selectAll(".point").call(w.setPointGroupScale,1,1),y.selectAll(".textpoint").call(w.setTextPointsScale,1,1),y.call(w.hideOutsideRangePoints,g)}function b(g,f){var x=g.plotinfo,y=x.xaxis,m=x.yaxis,T=y._length,p=m._length,M=!!g.xr1,A=!!g.yr1,C=[];if(M){var P=i.simpleMap(g.xr0,y.r2l),O=i.simpleMap(g.xr1,y.r2l),z=P[1]-P[0],B=O[1]-O[0];C[0]=(P[0]*(1-f)+f*O[0]-P[0])/(P[1]-P[0])*T,C[2]=T*(1-f+f*B/z),y.range[0]=y.l2r(P[0]*(1-f)+f*O[0]),y.range[1]=y.l2r(P[1]*(1-f)+f*O[1])}else C[0]=0,C[2]=T;if(A){var Y=i.simpleMap(g.yr0,m.r2l),D=i.simpleMap(g.yr1,m.r2l),G=Y[1]-Y[0],U=D[1]-D[0];C[1]=(Y[1]*(1-f)+f*D[1]-Y[1])/(Y[0]-Y[1])*p,C[3]=p*(1-f+f*U/G),m.range[0]=y.l2r(Y[0]*(1-f)+f*D[0]),m.range[1]=m.l2r(Y[1]*(1-f)+f*D[1])}else C[1]=0,C[3]=p;v.drawOne(h,y,{skipTitle:!0}),v.drawOne(h,m,{skipTitle:!0}),v.redrawComponents(h,[y._id,m._id]);var j=M?T/C[2]:1,W=A?p/C[3]:1,Z=M?C[0]:0,ie=A?C[1]:0,te=M?C[0]/C[2]*T:0,J=A?C[1]/C[3]*p:0,X=y._offset-te,ee=m._offset-J;x.clipRect.call(w.setTranslate,Z,ie).call(w.setScale,1/j,1/W),x.plot.call(w.setTranslate,X,ee).call(w.setScale,j,W),w.setPointGroupScale(x.zoomScalePts,1/j,1/W),w.setTextPointsScale(x.zoomScaleTxt,1/j,1/W)}v.redrawComponents(h)}},951:function(R,E,e){var _=e(73972).traceIs,k=e(4322);function i(v){return{v:"x",h:"y"}[v.orientation||"v"]}function w(v,h){var s=i(v),t=_(v,"box-violin"),a=_(v._fullInput||{},"candlestick");return t&&!a&&h===s&&v[s]===void 0&&v[s+"0"]===void 0}R.exports=function(v,h,s,t){s("autotypenumbers",t.autotypenumbersDflt),s("type",(t.splomStash||{}).type)==="-"&&(function(a,r){if(a.type==="-"){var n,o=a._id,l=o.charAt(0);o.indexOf("scene")!==-1&&(o=l);var u=function(m,T,p){for(var M=0;M0&&(A["_"+p+"axes"]||{})[T]||(A[p+"axis"]||p)===T&&(w(A,p)||(A[p]||[]).length||A[p+"0"]))return A}}(r,o,l);if(u)if(u.type!=="histogram"||l!=={v:"y",h:"x"}[u.orientation||"v"]){var d=l+"calendar",c=u[d],b={noMultiCategory:!_(u,"cartesian")||_(u,"noMultiCategory")};if(u.type==="box"&&u._hasPreCompStats&&l==={h:"x",v:"y"}[u.orientation||"v"]&&(b.noMultiCategory=!0),b.autotypenumbers=a.autotypenumbers,w(u,l)){var g=i(u),f=[];for(n=0;n0?".":"")+n;k.isPlainObject(o)?h(o,t,l,r+1):t(l,n,o)}})}E.manageCommandObserver=function(s,t,a,r){var n={},o=!0;t&&t._commandObserver&&(n=t._commandObserver),n.cache||(n.cache={}),n.lookupTable={};var l=E.hasSimpleAPICommandBindings(s,a,n.lookupTable);if(t&&t._commandObserver){if(l)return n;if(t._commandObserver.remove)return t._commandObserver.remove(),t._commandObserver=null,n}if(l){i(s,l,n.cache),n.check=function(){if(o){var c=i(s,l,n.cache);return c.changed&&r&&n.lookupTable[c.value]!==void 0&&(n.disable(),Promise.resolve(r({value:c.value,type:l.type,prop:l.prop,traces:l.traces,index:n.lookupTable[c.value]})).then(n.enable,n.enable)),c.changed}};for(var u=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],d=0;d0&&B<0&&(B+=360);var G=(B-z)/4;return{type:"Polygon",coordinates:[[[z,Y],[z,D],[z+G,D],[z+2*G,D],[z+3*G,D],[B,D],[B,Y],[B-G,Y],[B-2*G,Y],[B-3*G,Y],[z,Y]]]}}R.exports=function(C){return new p(C)},M.plot=function(C,P,O,z){var B=this;if(z)return B.update(C,P,!0);B._geoCalcData=C,B._fullLayout=P;var Y=P[this.id],D=[],G=!1;for(var U in x.layerNameToAdjective)if(U!=="frame"&&Y["show"+U]){G=!0;break}for(var j=!1,W=0;W0&&D._module.calcGeoJSON(Y,P)}if(!O){if(this.updateProjection(C,P))return;this.viewInitial&&this.scope===z.scope||this.saveViewInitial(z)}this.scope=z.scope,this.updateBaseLayers(P,z),this.updateDims(P,z),this.updateFx(P,z),o.generalUpdatePerTraceModule(this.graphDiv,this,C,z);var G=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=G.selectAll(".point"),this.dataPoints.text=G.selectAll("text"),this.dataPaths.line=G.selectAll(".js-line");var U=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=U.selectAll("path"),this._render()},M.updateProjection=function(C,P){var O=this.graphDiv,z=P[this.id],B=P._size,Y=z.domain,D=z.projection,G=z.lonaxis,U=z.lataxis,j=G._ax,W=U._ax,Z=this.projection=function(fe){var ae=fe.projection,be=ae.type,Ie=x.projNames[be];Ie="geo"+s.titleCase(Ie);for(var Te=(k[Ie]||v[Ie])(),Ne=fe._isSatellite?180*Math.acos(1/ae.distance)/Math.PI:fe._isClipped?x.lonaxisSpan[be]/2:null,qe=["center","rotate","parallels","clipExtent"],ve=function(ze){return ze?Te:[]},Ce=0;CeNe*Math.PI/180}return!1},Te.getPath=function(){return i().projection(Te)},Te.getBounds=function(ze){return Te.getPath().bounds(ze)},Te.precision(x.precision),fe._isSatellite&&Te.tilt(ae.tilt).distance(ae.distance),Ne&&Te.clipAngle(Ne-x.clipPad),Te}(z),ie=[[B.l+B.w*Y.x[0],B.t+B.h*(1-Y.y[1])],[B.l+B.w*Y.x[1],B.t+B.h*(1-Y.y[0])]],te=z.center||{},J=D.rotation||{},X=G.range||[],ee=U.range||[];if(z.fitbounds){j._length=ie[1][0]-ie[0][0],W._length=ie[1][1]-ie[0][1],j.range=u(O,j),W.range=u(O,W);var re=(j.range[0]+j.range[1])/2,oe=(W.range[0]+W.range[1])/2;if(z._isScoped)te={lon:re,lat:oe};else if(z._isClipped){te={lon:re,lat:oe},J={lon:re,lat:oe,roll:J.roll};var ue=D.type,ce=x.lonaxisSpan[ue]/2||180,de=x.lataxisSpan[ue]/2||90;X=[re-ce,re+ce],ee=[oe-de,oe+de]}else te={lon:re,lat:oe},J={lon:re,lat:J.lat,roll:J.roll}}Z.center([te.lon-J.lon,te.lat-J.lat]).rotate([-J.lon,-J.lat,J.roll]).parallels(D.parallels);var me=A(X,ee);Z.fitExtent(ie,me);var _e=this.bounds=Z.getBounds(me),Me=this.fitScale=Z.scale(),we=Z.translate();if(z.fitbounds){var xe=Z.getBounds(A(j.range,W.range)),De=Math.min((_e[1][0]-_e[0][0])/(xe[1][0]-xe[0][0]),(_e[1][1]-_e[0][1])/(xe[1][1]-xe[0][1]));isFinite(De)?Z.scale(De*Me):s.warn("Something went wrong during"+this.id+"fitbounds computations.")}else Z.scale(D.scale*Me);var Ee=this.midPt=[(_e[0][0]+_e[1][0])/2,(_e[0][1]+_e[1][1])/2];if(Z.translate([we[0]+(Ee[0]-we[0]),we[1]+(Ee[1]-we[1])]).clipExtent(_e),z._isAlbersUsa){var Se=Z([te.lon,te.lat]),he=Z.translate();Z.translate([he[0]-(Se[0]-he[0]),he[1]-(Se[1]-he[1])])}},M.updateBaseLayers=function(C,P){var O=this,z=O.topojson,B=O.layers,Y=O.basePaths;function D(Z){return Z==="lonaxis"||Z==="lataxis"}function G(Z){return!!x.lineLayers[Z]}function U(Z){return!!x.fillLayers[Z]}var j=(this.hasChoropleth?x.layersForChoropleth:x.layers).filter(function(Z){return G(Z)||U(Z)?P["show"+Z]:!D(Z)||P[Z].showgrid}),W=O.framework.selectAll(".layer").data(j,String);W.exit().each(function(Z){delete B[Z],delete Y[Z],_.select(this).remove()}),W.enter().append("g").attr("class",function(Z){return"layer "+Z}).each(function(Z){var ie=B[Z]=_.select(this);Z==="bg"?O.bgRect=ie.append("rect").style("pointer-events","all"):D(Z)?Y[Z]=ie.append("path").style("fill","none"):Z==="backplot"?ie.append("g").classed("choroplethlayer",!0):Z==="frontplot"?ie.append("g").classed("scatterlayer",!0):G(Z)?Y[Z]=ie.append("path").style("fill","none").style("stroke-miterlimit",2):U(Z)&&(Y[Z]=ie.append("path").style("stroke","none"))}),W.order(),W.each(function(Z){var ie=Y[Z],te=x.layerNameToAdjective[Z];Z==="frame"?ie.datum(x.sphereSVG):G(Z)||U(Z)?ie.datum(T(z,z.objects[Z])):D(Z)&&ie.datum(function(J,X,ee){var re,oe,ue,ce=X[J],de=x.scopeDefaults[X.scope];J==="lonaxis"?(re=de.lonaxisRange,oe=de.lataxisRange,ue=function(he,fe){return[he,fe]}):J==="lataxis"&&(re=de.lataxisRange,oe=de.lonaxisRange,ue=function(he,fe){return[fe,he]});var me={type:"linear",range:[re[0],re[1]-1e-6],tick0:ce.tick0,dtick:ce.dtick};l.setConvert(me,ee);var _e=l.calcTicks(me);X.isScoped||J!=="lonaxis"||_e.pop();for(var Me=_e.length,we=new Array(Me),xe=0;xe-1&&g(_.event,z,[O.xaxis],[O.yaxis],O.id,G),D.indexOf("event")>-1&&n.click(z,_.event))})}function U(j){return O.projection.invert([j[0]+O.xaxis._offset,j[1]+O.yaxis._offset])}},M.makeFramework=function(){var C=this,P=C.graphDiv,O=P._fullLayout,z="clip"+O._uid+C.id;C.clipDef=O._clips.append("clipPath").attr("id",z),C.clipRect=C.clipDef.append("rect"),C.framework=_.select(C.container).append("g").attr("class","geo "+C.id).call(r.setClipUrl,z,P),C.project=function(B){var Y=C.projection(B);return Y?[Y[0]-C.xaxis._offset,Y[1]-C.yaxis._offset]:[null,null]},C.xaxis={_id:"x",c2p:function(B){return C.project(B)[0]}},C.yaxis={_id:"y",c2p:function(B){return C.project(B)[1]}},C.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},l.setConvert(C.mockAxis,O)},M.saveViewInitial=function(C){var P,O=C.center||{},z=C.projection,B=z.rotation||{};this.viewInitial={fitbounds:C.fitbounds,"projection.scale":z.scale},P=C._isScoped?{"center.lon":O.lon,"center.lat":O.lat}:C._isClipped?{"projection.rotation.lon":B.lon,"projection.rotation.lat":B.lat}:{"center.lon":O.lon,"center.lat":O.lat,"projection.rotation.lon":B.lon},s.extendFlat(this.viewInitial,P)},M.render=function(C){this._hasMarkerAngles&&C?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},M._render=function(){var C,P=this.projection,O=P.getPath();function z(Y){var D=P(Y.lonlat);return D?t(D[0],D[1]):null}function B(Y){return P.isLonLatOverEdges(Y.lonlat)?"none":null}for(C in this.basePaths)this.basePaths[C].attr("d",O);for(C in this.dataPaths)this.dataPaths[C].attr("d",function(Y){return O(Y.geojson)});for(C in this.dataPoints)this.dataPoints[C].attr("display",B).attr("transform",z)}},44622:function(R,E,e){var _=e(27659).AU,k=e(71828).counterRegex,i=e(69082),w="geo",v=k(w),h={};h[w]={valType:"subplotid",dflt:w,editType:"calc"},R.exports={attr:w,name:w,idRoot:w,idRegex:v,attrRegex:v,attributes:h,layoutAttributes:e(77519),supplyLayoutDefaults:e(82161),plot:function(s){for(var t=s._fullLayout,a=s.calcdata,r=t._subplots[w],n=0;n0&&U<0&&(U+=360);var j,W,Z,ie=(G+U)/2;if(!b){var te=g?d.projRotate:[ie,0,0];j=r("projection.rotation.lon",te[0]),r("projection.rotation.lat",te[1]),r("projection.rotation.roll",te[2]),r("showcoastlines",!g&&T)&&(r("coastlinecolor"),r("coastlinewidth")),r("showocean",!!T&&void 0)&&r("oceancolor")}b?(W=-96.6,Z=38.7):(W=g?ie:j,Z=(D[0]+D[1])/2),r("center.lon",W),r("center.lat",Z),f&&(r("projection.tilt"),r("projection.distance")),x&&r("projection.parallels",d.projParallels||[0,60]),r("projection.scale"),r("showland",!!T&&void 0)&&r("landcolor"),r("showlakes",!!T&&void 0)&&r("lakecolor"),r("showrivers",!!T&&void 0)&&(r("rivercolor"),r("riverwidth")),r("showcountries",g&&u!=="usa"&&T)&&(r("countrycolor"),r("countrywidth")),(u==="usa"||u==="north america"&&l===50)&&(r("showsubunits",T),r("subunitcolor"),r("subunitwidth")),g||r("showframe",T)&&(r("framecolor"),r("framewidth")),r("bgcolor"),r("fitbounds")&&(delete a.projection.scale,g?(delete a.center.lon,delete a.center.lat):y?(delete a.center.lon,delete a.center.lat,delete a.projection.rotation.lon,delete a.projection.rotation.lat,delete a.lonaxis.range,delete a.lataxis.range):(delete a.center.lon,delete a.center.lat,delete a.projection.rotation.lon))}R.exports=function(t,a,r){k(t,a,r,{type:"geo",attributes:v,handleDefaults:s,fullData:r,partition:"y"})}},74455:function(R,E,e){var _=e(39898),k=e(71828),i=e(73972),w=Math.PI/180,v=180/Math.PI,h={cursor:"pointer"},s={cursor:"auto"};function t(g,f){return _.behavior.zoom().translate(f.translate()).scale(f.scale())}function a(g,f,x){var y=g.id,m=g.graphDiv,T=m.layout,p=T[y],M=m._fullLayout,A=M[y],C={},P={};function O(z,B){C[y+"."+z]=k.nestedProperty(p,z).get(),i.call("_storeDirectGUIEdit",T,M._preGUI,C);var Y=k.nestedProperty(A,z);Y.get()!==B&&(Y.set(B),k.nestedProperty(p,z).set(B),P[y+"."+z]=B)}x(O),O("projection.scale",f.scale()/g.fitScale),O("fitbounds",!1),m.emit("plotly_relayout",P)}function r(g,f){var x=t(0,f);function y(m){var T=f.invert(g.midPt);m("center.lon",T[0]),m("center.lat",T[1])}return x.on("zoomstart",function(){_.select(this).style(h)}).on("zoom",function(){f.scale(_.event.scale).translate(_.event.translate),g.render(!0);var m=f.invert(g.midPt);g.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":f.scale()/g.fitScale,"geo.center.lon":m[0],"geo.center.lat":m[1]})}).on("zoomend",function(){_.select(this).style(s),a(g,f,y)}),x}function n(g,f){var x,y,m,T,p,M,A,C,P,O=t(0,f);function z(Y){return f.invert(Y)}function B(Y){var D=f.rotate(),G=f.invert(g.midPt);Y("projection.rotation.lon",-D[0]),Y("center.lon",G[0]),Y("center.lat",G[1])}return O.on("zoomstart",function(){_.select(this).style(h),x=_.mouse(this),y=f.rotate(),m=f.translate(),T=y,p=z(x)}).on("zoom",function(){if(M=_.mouse(this),function(G){var U=z(G);if(!U)return!0;var j=f(U);return Math.abs(j[0]-G[0])>2||Math.abs(j[1]-G[1])>2}(x))return O.scale(f.scale()),void O.translate(f.translate());f.scale(_.event.scale),f.translate([m[0],_.event.translate[1]]),p?z(M)&&(C=z(M),A=[T[0]+(C[0]-p[0]),y[1],y[2]],f.rotate(A),T=A):p=z(x=M),P=!0,g.render(!0);var Y=f.rotate(),D=f.invert(g.midPt);g.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":f.scale()/g.fitScale,"geo.center.lon":D[0],"geo.center.lat":D[1],"geo.projection.rotation.lon":-Y[0]})}).on("zoomend",function(){_.select(this).style(s),P&&a(g,f,B)}),O}function o(g,f){var x;f.rotate(),f.scale();var y=t(0,f),m=function(A){for(var C=0,P=arguments.length,O=[];++CVe?(Te=(Ae>0?90:-90)-Ue,Ie=0):(Te=Math.asin(Ae/Ve)*v-Ue,Ie=Math.sqrt(Ve*Ve-Ae*Ae));var Ye=180-Te-2*Ue,$e=(Math.atan2(ze,Ce)-Math.atan2(ve,Ie))*v,rt=(Math.atan2(ze,Ce)-Math.atan2(ve,-Ie))*v;return u(ae[0],ae[1],Te,$e)<=u(ae[0],ae[1],Ye,rt)?[Te,$e,ae[2]]:[Ye,rt,ae[2]]}(Ee,x,ie);isFinite(Se[0])&&isFinite(Se[1])&&isFinite(Se[2])||(Se=ie),f.rotate(Se),ie=Se}}else x=l(f,W=we);m.of(this,arguments)({type:"zoom"})}),j=m.of(this,arguments),T++||j({type:"zoomstart"})}).on("zoomend",function(){var A;_.select(this).style(s),p.call(y,"zoom",null),A=m.of(this,arguments),--T||A({type:"zoomend"}),a(g,f,M)}).on("zoom.redraw",function(){g.render(!0);var A=f.rotate();g.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":f.scale()/g.fitScale,"geo.projection.rotation.lon":-A[0],"geo.projection.rotation.lat":-A[1]})}),_.rebind(y,m,"on")}function l(g,f){var x=g.invert(f);return x&&isFinite(x[0])&&isFinite(x[1])&&function(y){var m=y[0]*w,T=y[1]*w,p=Math.cos(T);return[p*Math.cos(m),p*Math.sin(m),Math.sin(T)]}(x)}function u(g,f,x,y){var m=d(x-g),T=d(y-f);return Math.sqrt(m*m+T*T)}function d(g){return(g%360+540)%360-180}function c(g,f,x){var y=x*w,m=g.slice(),T=f===0?1:0,p=f===2?1:2,M=Math.cos(y),A=Math.sin(y);return m[T]=g[T]*M-g[p]*A,m[p]=g[p]*M+g[T]*A,m}function b(g,f){for(var x=0,y=0,m=g.length;yMath.abs(b)?(r.boxEnd[1]=r.boxStart[1]+Math.abs(c)*O*(b>=0?1:-1),r.boxEnd[1]g[3]&&(r.boxEnd[1]=g[3],r.boxEnd[0]=r.boxStart[0]+(g[3]-r.boxStart[1])/Math.abs(O))):(r.boxEnd[0]=r.boxStart[0]+Math.abs(b)/O*(c>=0?1:-1),r.boxEnd[0]g[2]&&(r.boxEnd[0]=g[2],r.boxEnd[1]=r.boxStart[1]+(g[2]-r.boxStart[0])*Math.abs(O)))}}else r.boxEnabled?(c=r.boxStart[0]!==r.boxEnd[0],b=r.boxStart[1]!==r.boxEnd[1],c||b?(c&&(p(0,r.boxStart[0],r.boxEnd[0]),s.xaxis.autorange=!1),b&&(p(1,r.boxStart[1],r.boxEnd[1]),s.yaxis.autorange=!1),s.relayoutCallback()):s.glplot.setDirty(),r.boxEnabled=!1,r.boxInited=!1):r.boxInited&&(r.boxInited=!1);break;case"pan":r.boxEnabled=!1,r.boxInited=!1,l?(r.panning||(r.dragStart[0]=u,r.dragStart[1]=d),Math.abs(r.dragStart[0]-u).999&&(y="turntable"):y="turntable")}else y="turntable";o("dragmode",y),o("hovermode",l.getDfltFromLayout("hovermode"))}R.exports=function(r,n,o){var l=n._basePlotModules.length>1;w(r,n,o,{type:t,attributes:h,handleDefaults:a,fullLayout:n,font:n.font,fullData:o,getDfltFromLayout:function(u){if(!l)return _.validate(r[u],h[u])?r[u]:void 0},autotypenumbersDflt:n.autotypenumbers,paper_bgcolor:n.paper_bgcolor,calendar:n.calendar})}},65500:function(R,E,e){var _=e(77894),k=e(27670).Y,i=e(1426).extendFlat,w=e(71828).counterRegex;function v(h,s,t){return{x:{valType:"number",dflt:h,editType:"camera"},y:{valType:"number",dflt:s,editType:"camera"},z:{valType:"number",dflt:t,editType:"camera"},editType:"camera"}}R.exports={_arrayAttrRegexps:[w("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:i(v(0,0,1),{}),center:i(v(0,0,0),{}),eye:i(v(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:k({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0}},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"}},xaxis:_,yaxis:_,zaxis:_,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot",_deprecated:{cameraposition:{valType:"info_array",editType:"camera"}}}},13133:function(R,E,e){var _=e(78614),k=["xaxis","yaxis","zaxis"];function i(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}i.prototype.merge=function(w){for(var v=0;v<3;++v){var h=w[k[v]];h.visible?(this.enabled[v]=h.showspikes,this.colors[v]=_(h.spikecolor),this.drawSides[v]=h.spikesides,this.lineWidth[v]=h.spikethickness):(this.enabled[v]=!1,this.drawSides[v]=!1)}},R.exports=function(w){var v=new i;return v.merge(w),v}},96085:function(R,E,e){R.exports=function(v){for(var h=v.axesOptions,s=v.glplot.axesPixels,t=v.fullSceneLayout,a=[[],[],[]],r=0;r<3;++r){var n=t[i[r]];if(n._length=(s[r].hi-s[r].lo)*s[r].pixelsPerDataUnit/v.dataScale[r],Math.abs(n._length)===1/0||isNaN(n._length))a[r]=[];else{n._input_range=n.range.slice(),n.range[0]=s[r].lo/v.dataScale[r],n.range[1]=s[r].hi/v.dataScale[r],n._m=1/(v.dataScale[r]*s[r].pixelsPerDataUnit),n.range[0]===n.range[1]&&(n.range[0]-=1,n.range[1]+=1);var o=n.tickmode;if(n.tickmode==="auto"){n.tickmode="linear";var l=n.nticks||k.constrain(n._length/40,4,9);_.autoTicks(n,Math.abs(n.range[1]-n.range[0])/l)}for(var u=_.calcTicks(n,{msUTC:!0}),d=0;d/g," "));a[r]=u,n.tickmode=o}}for(h.ticks=a,r=0;r<3;++r)for(w[r]=.5*(v.glplot.bounds[0][r]+v.glplot.bounds[1][r]),d=0;d<2;++d)h.bounds[d][r]=v.glplot.bounds[d][r];v.contourLevels=function(c){for(var b=new Array(3),g=0;g<3;++g){for(var f=c[g],x=new Array(f.length),y=0;yz.deltaY?1.1:.9090909090909091,Y=M.glplot.getAspectratio();M.glplot.setAspectratio({x:B*Y.x,y:B*Y.y,z:B*Y.z})}O(M)}},!!s&&{passive:!1}),M.glplot.canvas.addEventListener("mousemove",function(){if(M.fullSceneLayout.dragmode!==!1&&M.camera.mouseListener.buttons!==0){var z=P();M.graphDiv.emit("plotly_relayouting",z)}}),M.staticMode||M.glplot.canvas.addEventListener("webglcontextlost",function(z){A&&A.emit&&A.emit("plotly_webglcontextlost",{event:z,layer:M.id})},!1)),M.glplot.oncontextloss=function(){M.recoverContext()},M.glplot.onrender=function(){M.render()},!0},y.render=function(){var M,A=this,C=A.graphDiv,P=A.svgContainer,O=A.container.getBoundingClientRect();C._fullLayout._calcInverseTransform(C);var z=C._fullLayout._invScaleX,B=C._fullLayout._invScaleY,Y=O.width*z,D=O.height*B;P.setAttributeNS(null,"viewBox","0 0 "+Y+" "+D),P.setAttributeNS(null,"width",Y),P.setAttributeNS(null,"height",D),g(A),A.glplot.axes.update(A.axesOptions);for(var G=Object.keys(A.traces),U=null,j=A.glplot.selection,W=0;W")):M.type==="isosurface"||M.type==="volume"?(ee.valueLabel=n.hoverLabelText(A._mockAxis,A._mockAxis.d2l(j.traceCoordinate[3]),M.valuehoverformat),ce.push("value: "+ee.valueLabel),j.textLabel&&ce.push(j.textLabel),te=ce.join("
")):te=j.textLabel;var de={x:j.traceCoordinate[0],y:j.traceCoordinate[1],z:j.traceCoordinate[2],data:J._input,fullData:J,curveNumber:J.index,pointNumber:X};o.appendArrayPointValue(de,J,X),M._module.eventData&&(de=J._module.eventData(de,j,J,{},X));var me={points:[de]};if(A.fullSceneLayout.hovermode){var _e=[];o.loneHover({trace:J,x:(.5+.5*ie[0]/ie[3])*Y,y:(.5-.5*ie[1]/ie[3])*D,xLabel:ee.xLabel,yLabel:ee.yLabel,zLabel:ee.zLabel,text:te,name:U.name,color:o.castHoverOption(J,X,"bgcolor")||U.color,borderColor:o.castHoverOption(J,X,"bordercolor"),fontFamily:o.castHoverOption(J,X,"font.family"),fontSize:o.castHoverOption(J,X,"font.size"),fontColor:o.castHoverOption(J,X,"font.color"),nameLength:o.castHoverOption(J,X,"namelength"),textAlign:o.castHoverOption(J,X,"align"),hovertemplate:a.castOption(J,X,"hovertemplate"),hovertemplateLabels:a.extendFlat({},de,ee),eventData:[de]},{container:P,gd:C,inOut_bbox:_e}),de.bbox=_e[0]}j.distance<5&&(j.buttons||f)?C.emit("plotly_click",me):C.emit("plotly_hover",me),this.oldEventData=me}else o.loneUnhover(P),this.oldEventData&&C.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;A.drawAnnotations(A)},y.recoverContext=function(){var M=this;M.glplot.dispose();var A=function(){M.glplot.gl.isContextLost()?requestAnimationFrame(A):M.initializeGLPlot()?M.plot.apply(M,M.plotArgs):a.error("Catastrophic and unrecoverable WebGL error. Context lost.")};requestAnimationFrame(A)};var T=["xaxis","yaxis","zaxis"];function p(M,A,C){for(var P=M.fullSceneLayout,O=0;O<3;O++){var z=T[O],B=z.charAt(0),Y=P[z],D=A[B],G=A[B+"calendar"],U=A["_"+B+"length"];if(a.isArrayOrTypedArray(D))for(var j,W=0;W<(U||D.length);W++)if(a.isArrayOrTypedArray(D[W]))for(var Z=0;ZJ[1][B])J[0][B]=-1,J[1][B]=1;else{var we=J[1][B]-J[0][B];J[0][B]-=we/32,J[1][B]+=we/32}if(D.autorange==="reversed"){var xe=J[0][B];J[0][B]=J[1][B],J[1][B]=xe}}else{var De=D.range;J[0][B]=D.r2l(De[0]),J[1][B]=D.r2l(De[1])}J[0][B]===J[1][B]&&(J[0][B]-=1,J[1][B]+=1),X[B]=J[1][B]-J[0][B],P.glplot.setBounds(B,{min:J[0][B]*Z[B],max:J[1][B]*Z[B]})}var Ee=U.aspectmode;if(Ee==="cube")te=[1,1,1];else if(Ee==="manual"){var Se=U.aspectratio;te=[Se.x,Se.y,Se.z]}else{if(Ee!=="auto"&&Ee!=="data")throw new Error("scene.js aspectRatio was not one of the enumerated types");var he=[1,1,1];for(B=0;B<3;++B){var fe=ee[G=(D=U[T[B]]).type];he[B]=Math.pow(fe.acc,1/fe.count)/Z[B]}te=Ee==="data"||Math.max.apply(null,he)/Math.min.apply(null,he)<=4?he:[1,1,1]}U.aspectratio.x=j.aspectratio.x=te[0],U.aspectratio.y=j.aspectratio.y=te[1],U.aspectratio.z=j.aspectratio.z=te[2],P.glplot.setAspectratio(U.aspectratio),P.viewInitial.aspectratio||(P.viewInitial.aspectratio={x:U.aspectratio.x,y:U.aspectratio.y,z:U.aspectratio.z}),P.viewInitial.aspectmode||(P.viewInitial.aspectmode=U.aspectmode);var ae=U.domain||null,be=A._size||null;if(ae&&be){var Ie=P.container.style;Ie.position="absolute",Ie.left=be.l+ae.x[0]*be.w+"px",Ie.top=be.t+(1-ae.y[1])*be.h+"px",Ie.width=be.w*(ae.x[1]-ae.x[0])+"px",Ie.height=be.h*(ae.y[1]-ae.y[0])+"px"}P.glplot.redraw()}},y.destroy=function(){var M=this;M.glplot&&(M.camera.mouseListener.enabled=!1,M.container.removeEventListener("wheel",M.camera.wheelListener),M.camera=null,M.glplot.dispose(),M.container.parentNode.removeChild(M.container),M.glplot=null)},y.getCamera=function(){var M,A=this;return A.camera.view.recalcMatrix(A.camera.view.lastT()),{up:{x:(M=A.camera).up[0],y:M.up[1],z:M.up[2]},center:{x:M.center[0],y:M.center[1],z:M.center[2]},eye:{x:M.eye[0],y:M.eye[1],z:M.eye[2]},projection:{type:M._ortho===!0?"orthographic":"perspective"}}},y.setViewport=function(M){var A,C=this,P=M.camera;C.camera.lookAt.apply(this,[[(A=P).eye.x,A.eye.y,A.eye.z],[A.center.x,A.center.y,A.center.z],[A.up.x,A.up.y,A.up.z]]),C.glplot.setAspectratio(M.aspectratio),P.projection.type==="orthographic"!==C.camera._ortho&&(C.glplot.redraw(),C.glplot.clearRGBA(),C.glplot.dispose(),C.initializeGLPlot())},y.isCameraChanged=function(M){var A=this.getCamera(),C=a.nestedProperty(M,this.id+".camera").get();function P(Y,D,G,U){var j=["up","center","eye"],W=["x","y","z"];return D[j[G]]&&Y[j[G]][W[U]]===D[j[G]][W[U]]}var O=!1;if(C===void 0)O=!0;else{for(var z=0;z<3;z++)for(var B=0;B<3;B++)if(!P(A,C,z,B)){O=!0;break}(!C.projection||A.projection&&A.projection.type!==C.projection.type)&&(O=!0)}return O},y.isAspectChanged=function(M){var A=this.glplot.getAspectratio(),C=a.nestedProperty(M,this.id+".aspectratio").get();return C===void 0||C.x!==A.x||C.y!==A.y||C.z!==A.z},y.saveLayout=function(M){var A,C,P,O,z,B,Y=this,D=Y.fullLayout,G=Y.isCameraChanged(M),U=Y.isAspectChanged(M),j=G||U;if(j){var W={};G&&(A=Y.getCamera(),P=(C=a.nestedProperty(M,Y.id+".camera")).get(),W[Y.id+".camera"]=P),U&&(O=Y.glplot.getAspectratio(),B=(z=a.nestedProperty(M,Y.id+".aspectratio")).get(),W[Y.id+".aspectratio"]=B),t.call("_storeDirectGUIEdit",M,D._preGUI,W),G&&(C.set(A),a.nestedProperty(D,Y.id+".camera").set(A)),U&&(z.set(O),a.nestedProperty(D,Y.id+".aspectratio").set(O),Y.glplot.redraw())}return j},y.updateFx=function(M,A){var C=this,P=C.camera;if(P)if(M==="orbit")P.mode="orbit",P.keyBindingMode="rotate";else if(M==="turntable"){P.up=[0,0,1],P.mode="turntable",P.keyBindingMode="rotate";var O=C.graphDiv,z=O._fullLayout,B=C.fullSceneLayout.camera,Y=B.up.x,D=B.up.y,G=B.up.z;if(G/Math.sqrt(Y*Y+D*D+G*G)<.999){var U=C.id+".camera.up",j={x:0,y:0,z:1},W={};W[U]=j;var Z=O.layout;t.call("_storeDirectGUIEdit",Z,z._preGUI,W),B.up=j,a.nestedProperty(Z,U).set(j)}}else P.keyBindingMode=M;C.fullSceneLayout.hovermode=A},y.toImage=function(M){var A=this;M||(M="png"),A.staticMode&&A.container.appendChild(_),A.glplot.redraw();var C=A.glplot.gl,P=C.drawingBufferWidth,O=C.drawingBufferHeight;C.bindFramebuffer(C.FRAMEBUFFER,null);var z=new Uint8Array(P*O*4);C.readPixels(0,0,P,O,C.RGBA,C.UNSIGNED_BYTE,z),function(U,j,W){for(var Z=0,ie=W-1;Z0)for(var X=255/J,ee=0;ee<3;++ee)U[te+ee]=Math.min(X*U[te+ee],255)}}(z,P,O);var B=document.createElement("canvas");B.width=P,B.height=O;var Y,D=B.getContext("2d",{willReadFrequently:!0}),G=D.createImageData(P,O);switch(G.data.set(z),D.putImageData(G,0,0),M){case"jpeg":Y=B.toDataURL("image/jpeg");break;case"webp":Y=B.toDataURL("image/webp");break;default:Y=B.toDataURL("image/png")}return A.staticMode&&A.container.removeChild(_),Y},y.setConvert=function(){for(var M=0;M<3;M++){var A=this.fullSceneLayout[T[M]];n.setConvert(A,this.fullLayout),A.setScale=a.noop}},y.make4thDimension=function(){var M=this,A=M.graphDiv._fullLayout;M._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},n.setConvert(M._mockAxis,A)},R.exports=x},90060:function(R){R.exports=function(E,e,_,k){k=k||E.length;for(var i=new Array(k),w=0;wOpenStreetMap contributors',w=['© Carto',i].join(" "),v=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),h={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:i,tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}]},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}]},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:w,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-positron",type:"raster",source:"plotly-carto-positron",minzoom:0,maxzoom:22}]},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:w,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-darkmatter",type:"raster",source:"plotly-carto-darkmatter",minzoom:0,maxzoom:22}]},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:v,tiles:["https://stamen-tiles.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}]},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:v,tiles:["https://stamen-tiles.a.ssl.fastly.net/toner/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}]},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),tiles:["https://stamen-tiles.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}]}},s=_(h);R.exports={requiredVersion:k,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:h,styleValuesNonMapbox:s,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install mapbox-gl@"+k+"."].join(` @@ -3637,7 +3637,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `).slice(2):` `+W.split(` `).map(function(ie){return" "+ie}).join(` -`)):W=z.stylize("[Circular]","special")),g(j)){if(U&&G.match(/^\d+$/))return W;(j=JSON.stringify(""+G)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(j=j.slice(1,-1),j=z.stylize(j,"name")):(j=j.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),j=z.stylize(j,"string"))}return j+": "+W}function l(z){return Array.isArray(z)}function u(z){return typeof z=="boolean"}function d(z){return z===null}function c(z){return typeof z=="number"}function b(z){return typeof z=="string"}function g(z){return z===void 0}function f(z){return x(z)&&p(z)==="[object RegExp]"}function x(z){return typeof z=="object"&&z!==null}function y(z){return x(z)&&p(z)==="[object Date]"}function m(z){return x(z)&&(p(z)==="[object Error]"||z instanceof Error)}function T(z){return typeof z=="function"}function p(z){return Object.prototype.toString.call(z)}function M(z){return z<10?"0"+z.toString(10):z.toString(10)}E.debuglog=function(z){if(z=z.toUpperCase(),!w[z])if(v.test(z)){var B=_.pid;w[z]=function(){var Y=E.format.apply(E,arguments);console.error("%s %d: %s",z,B,Y)}}else w[z]=function(){};return w[z]},E.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},E.types=e(4936),E.isArray=l,E.isBoolean=u,E.isNull=d,E.isNullOrUndefined=function(z){return z==null},E.isNumber=c,E.isString=b,E.isSymbol=function(z){return typeof z=="symbol"},E.isUndefined=g,E.isRegExp=f,E.types.isRegExp=f,E.isObject=x,E.isDate=y,E.types.isDate=y,E.isError=m,E.types.isNativeError=m,E.isFunction=T,E.isPrimitive=function(z){return z===null||typeof z=="boolean"||typeof z=="number"||typeof z=="string"||typeof z=="symbol"||z===void 0},E.isBuffer=e(45920);var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function C(z,B){return Object.prototype.hasOwnProperty.call(z,B)}E.log=function(){var z,B;console.log("%s - %s",(B=[M((z=new Date).getHours()),M(z.getMinutes()),M(z.getSeconds())].join(":"),[z.getDate(),A[z.getMonth()],B].join(" ")),E.format.apply(E,arguments))},E.inherits=e(42018),E._extend=function(z,B){if(!B||!x(B))return z;for(var Y=Object.keys(B),D=Y.length;D--;)z[Y[D]]=B[Y[D]];return z};var P=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function O(z,B){if(!z){var Y=new Error("Promise was rejected with a falsy value");Y.reason=z,z=Y}return B(z)}E.promisify=function(z){if(typeof z!="function")throw new TypeError('The "original" argument must be of type Function');if(P&&z[P]){var B;if(typeof(B=z[P])!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(B,P,{value:B,enumerable:!1,writable:!1,configurable:!0}),B}function B(){for(var Y,D,G=new Promise(function(W,Z){Y=W,D=Z}),U=[],j=0;j"u"?e.g:globalThis,t=k(),a=i("String.prototype.slice"),r={},n=Object.getPrototypeOf;h&&w&&n&&_(t,function(l){if(typeof s[l]=="function"){var u=new s[l];if(Symbol.toStringTag in u){var d=n(u),c=w(d,Symbol.toStringTag);if(!c){var b=n(d);c=w(b,Symbol.toStringTag)}r[l]=c.get}}});var o=e(9187);R.exports=function(l){return!!o(l)&&(h&&Symbol.toStringTag in l?function(u){var d=!1;return _(r,function(c,b){if(!d)try{var g=c.call(u);g===b&&(d=g)}catch{}}),d}(l):a(v(l),8,-1))}},3961:function(R,E,e){var _=e(63489),k=e(56131),i=_.instance();function w(n){this.local=this.regionalOptions[n||""]||this.regionalOptions[""]}w.prototype=new _.baseCalendar,k(w.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(n,o){if(typeof n=="string"){var l=n.match(h);return l?l[0]:""}var u=this._validateYear(n),d=n.month(),c=""+this.toChineseMonth(u,d);return o&&c.length<2&&(c="0"+c),this.isIntercalaryMonth(u,d)&&(c+="i"),c},monthNames:function(n){if(typeof n=="string"){var o=n.match(s);return o?o[0]:""}var l=this._validateYear(n),u=n.month(),d=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][this.toChineseMonth(l,u)-1];return this.isIntercalaryMonth(l,u)&&(d="闰"+d),d},monthNamesShort:function(n){if(typeof n=="string"){var o=n.match(t);return o?o[0]:""}var l=this._validateYear(n),u=n.month(),d=["一","二","三","四","五","六","七","八","九","十","十一","十二"][this.toChineseMonth(l,u)-1];return this.isIntercalaryMonth(l,u)&&(d="闰"+d),d},parseMonth:function(n,o){n=this._validateYear(n);var l,u=parseInt(o);if(isNaN(u))o[0]==="闰"&&(l=!0,o=o.substring(1)),o[o.length-1]==="月"&&(o=o.substring(0,o.length-1)),u=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(o);else{var d=o[o.length-1];l=d==="i"||d==="I"}return this.toMonthIndex(n,u,l)},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(n,o){if(n.year&&(n=n.year()),typeof n!="number"||n<1888||n>2111)throw o.replace(/\{0\}/,this.local.name);return n},toMonthIndex:function(n,o,l){var u=this.intercalaryMonth(n);if(l&&o!==u||o<1||o>12)throw _.local.invalidMonth.replace(/\{0\}/,this.local.name);return u?!l&&o<=u?o-1:o:o-1},toChineseMonth:function(n,o){n.year&&(o=(n=n.year()).month());var l=this.intercalaryMonth(n);if(o<0||o>(l?12:11))throw _.local.invalidMonth.replace(/\{0\}/,this.local.name);return l?o>13},isIntercalaryMonth:function(n,o){n.year&&(o=(n=n.year()).month());var l=this.intercalaryMonth(n);return!!l&&l===o},leapYear:function(n){return this.intercalaryMonth(n)!==0},weekOfYear:function(n,o,l){var u,d=this._validateYear(n,_.local.invalidyear),c=r[d-r[0]],b=c>>9&4095,g=c>>5&15,f=31&c;(u=i.newDate(b,g,f)).add(4-(u.dayOfWeek()||7),"d");var x=this.toJD(n,o,l)-u.toJD();return 1+Math.floor(x/7)},monthsInYear:function(n){return this.leapYear(n)?13:12},daysInMonth:function(n,o){n.year&&(o=n.month(),n=n.year()),n=this._validateYear(n);var l=a[n-a[0]];if(o>(l>>13?12:11))throw _.local.invalidMonth.replace(/\{0\}/,this.local.name);return l&1<<12-o?30:29},weekDay:function(n,o,l){return(this.dayOfWeek(n,o,l)||7)<6},toJD:function(n,o,l){var u=this._validate(n,c,l,_.local.invalidDate);n=this._validateYear(u.year()),o=u.month(),l=u.day();var d=this.isIntercalaryMonth(n,o),c=this.toChineseMonth(n,o),b=function(g,f,x,y,m){var T,p,M;if(typeof g=="object")p=g,T=f||{};else{var A;if(!(typeof g=="number"&&g>=1888&&g<=2111))throw new Error("Lunar year outside range 1888-2111");if(!(typeof f=="number"&&f>=1&&f<=12))throw new Error("Lunar month outside range 1 - 12");if(!(typeof x=="number"&&x>=1&&x<=30))throw new Error("Lunar day outside range 1 - 30");typeof y=="object"?(A=!1,T=y):(A=!!y,T={}),p={year:g,month:f,day:x,isIntercalary:A}}M=p.day-1;var C,P=a[p.year-a[0]],O=P>>13;C=O&&(p.month>O||p.isIntercalary)?p.month:p.month-1;for(var z=0;z>9&4095,(B>>5&15)-1,(31&B)+M);return T.year=Y.getFullYear(),T.month=1+Y.getMonth(),T.day=Y.getDate(),T}(n,c,l,d);return i.toJD(b.year,b.month,b.day)},fromJD:function(n){var o=i.fromJD(n),l=function(d,c,b,g){var f,x;if(typeof d=="object")f=d,x=c||{};else{if(!(typeof d=="number"&&d>=1888&&d<=2111))throw new Error("Solar year outside range 1888-2111");if(!(typeof c=="number"&&c>=1&&c<=12))throw new Error("Solar month outside range 1 - 12");if(!(typeof b=="number"&&b>=1&&b<=31))throw new Error("Solar day outside range 1 - 31");f={year:d,month:c,day:b},x={}}var y=r[f.year-r[0]],m=f.year<<9|f.month<<5|f.day;x.year=m>=y?f.year:f.year-1,y=r[x.year-r[0]];var T,p=new Date(y>>9&4095,(y>>5&15)-1,31&y),M=new Date(f.year,f.month-1,f.day);T=Math.round((M-p)/864e5);var A,C=a[x.year-a[0]];for(A=0;A<13;A++){var P=C&1<<12-A?30:29;if(T>13;return!O||A=2&&t<=6},extraInfo:function(v,h,s){var t=this._validate(v,h,s,_.local.invalidDate);return{century:w[Math.floor((t.year()-1)/100)+1]||""}},toJD:function(v,h,s){var t=this._validate(v,h,s,_.local.invalidDate);return v=t.year()+(t.year()<0?1:0),h=t.month(),(s=t.day())+(h>1?16:0)+(h>2?32*(h-2):0)+400*(v-1)+this.jdEpoch-1},fromJD:function(v){v=Math.floor(v+.5)-Math.floor(this.jdEpoch)-1;var h=Math.floor(v/400)+1;v-=400*(h-1),v+=v>15?16:0;var s=Math.floor(v/32)+1,t=v-32*(s-1)+1;return this.newDate(h<=0?h-1:h,s,t)}});var w={20:"Fruitbat",21:"Anchovy"};_.calendars.discworld=i},37715:function(R,E,e){var _=e(63489),k=e(56131);function i(w){this.local=this.regionalOptions[w||""]||this.regionalOptions[""]}i.prototype=new _.baseCalendar,k(i.prototype,{name:"Ethiopian",jdEpoch:17242205e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(w){var v=this._validate(w,this.minMonth,this.minDay,_.local.invalidYear);return(w=v.year()+(v.year()<0?1:0))%4==3||w%4==-1},monthsInYear:function(w){return this._validate(w,this.minMonth,this.minDay,_.local.invalidYear||_.regionalOptions[""].invalidYear),13},weekOfYear:function(w,v,h){var s=this.newDate(w,v,h);return s.add(-s.dayOfWeek(),"d"),Math.floor((s.dayOfYear()-1)/7)+1},daysInMonth:function(w,v){var h=this._validate(w,v,this.minDay,_.local.invalidMonth);return this.daysPerMonth[h.month()-1]+(h.month()===13&&this.leapYear(h.year())?1:0)},weekDay:function(w,v,h){return(this.dayOfWeek(w,v,h)||7)<6},toJD:function(w,v,h){var s=this._validate(w,v,h,_.local.invalidDate);return(w=s.year())<0&&w++,s.day()+30*(s.month()-1)+365*(w-1)+Math.floor(w/4)+this.jdEpoch-1},fromJD:function(w){var v=Math.floor(w)+.5-this.jdEpoch,h=Math.floor((v-Math.floor((v+366)/1461))/365)+1;h<=0&&h--,v=Math.floor(w)+.5-this.newDate(h,1,1).toJD();var s=Math.floor(v/30)+1,t=v-30*(s-1)+1;return this.newDate(h,s,t)}}),_.calendars.ethiopian=i},99384:function(R,E,e){var _=e(63489),k=e(56131);function i(v){this.local=this.regionalOptions[v||""]||this.regionalOptions[""]}function w(v,h){return v-h*Math.floor(v/h)}i.prototype=new _.baseCalendar,k(i.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(v){var h=this._validate(v,this.minMonth,this.minDay,_.local.invalidYear);return this._leapYear(h.year())},_leapYear:function(v){return w(7*(v=v<0?v+1:v)+1,19)<7},monthsInYear:function(v){return this._validate(v,this.minMonth,this.minDay,_.local.invalidYear),this._leapYear(v.year?v.year():v)?13:12},weekOfYear:function(v,h,s){var t=this.newDate(v,h,s);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(v){return v=this._validate(v,this.minMonth,this.minDay,_.local.invalidYear).year(),this.toJD(v===-1?1:v+1,7,1)-this.toJD(v,7,1)},daysInMonth:function(v,h){return v.year&&(h=v.month(),v=v.year()),this._validate(v,h,this.minDay,_.local.invalidMonth),h===12&&this.leapYear(v)||h===8&&w(this.daysInYear(v),10)===5?30:h===9&&w(this.daysInYear(v),10)===3?29:this.daysPerMonth[h-1]},weekDay:function(v,h,s){return this.dayOfWeek(v,h,s)!==6},extraInfo:function(v,h,s){var t=this._validate(v,h,s,_.local.invalidDate);return{yearType:(this.leapYear(t)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(t)%10-3]}},toJD:function(v,h,s){var t=this._validate(v,h,s,_.local.invalidDate);v=t.year(),h=t.month(),s=t.day();var a=v<=0?v+1:v,r=this.jdEpoch+this._delay1(a)+this._delay2(a)+s+1;if(h<7){for(var n=7;n<=this.monthsInYear(v);n++)r+=this.daysInMonth(v,n);for(n=1;n=this.toJD(h===-1?1:h+1,7,1);)h++;for(var s=vthis.toJD(h,s,this.daysInMonth(h,s));)s++;var t=v-this.toJD(h,s,1)+1;return this.newDate(h,s,t)}}),_.calendars.hebrew=i},43805:function(R,E,e){var _=e(63489),k=e(56131);function i(w){this.local=this.regionalOptions[w||""]||this.regionalOptions[""]}i.prototype=new _.baseCalendar,k(i.prototype,{name:"Islamic",jdEpoch:19484395e-1,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-khamīs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(w){return(11*this._validate(w,this.minMonth,this.minDay,_.local.invalidYear).year()+14)%30<11},weekOfYear:function(w,v,h){var s=this.newDate(w,v,h);return s.add(-s.dayOfWeek(),"d"),Math.floor((s.dayOfYear()-1)/7)+1},daysInYear:function(w){return this.leapYear(w)?355:354},daysInMonth:function(w,v){var h=this._validate(w,v,this.minDay,_.local.invalidMonth);return this.daysPerMonth[h.month()-1]+(h.month()===12&&this.leapYear(h.year())?1:0)},weekDay:function(w,v,h){return this.dayOfWeek(w,v,h)!==5},toJD:function(w,v,h){var s=this._validate(w,v,h,_.local.invalidDate);return w=s.year(),v=s.month(),w=w<=0?w+1:w,(h=s.day())+Math.ceil(29.5*(v-1))+354*(w-1)+Math.floor((3+11*w)/30)+this.jdEpoch-1},fromJD:function(w){w=Math.floor(w)+.5;var v=Math.floor((30*(w-this.jdEpoch)+10646)/10631);v=v<=0?v-1:v;var h=Math.min(12,Math.ceil((w-29-this.toJD(v,1,1))/29.5)+1),s=w-this.toJD(v,h,1)+1;return this.newDate(v,h,s)}}),_.calendars.islamic=i},88874:function(R,E,e){var _=e(63489),k=e(56131);function i(w){this.local=this.regionalOptions[w||""]||this.regionalOptions[""]}i.prototype=new _.baseCalendar,k(i.prototype,{name:"Julian",jdEpoch:17214235e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(w){var v=this._validate(w,this.minMonth,this.minDay,_.local.invalidYear);return(w=v.year()<0?v.year()+1:v.year())%4==0},weekOfYear:function(w,v,h){var s=this.newDate(w,v,h);return s.add(4-(s.dayOfWeek()||7),"d"),Math.floor((s.dayOfYear()-1)/7)+1},daysInMonth:function(w,v){var h=this._validate(w,v,this.minDay,_.local.invalidMonth);return this.daysPerMonth[h.month()-1]+(h.month()===2&&this.leapYear(h.year())?1:0)},weekDay:function(w,v,h){return(this.dayOfWeek(w,v,h)||7)<6},toJD:function(w,v,h){var s=this._validate(w,v,h,_.local.invalidDate);return w=s.year(),v=s.month(),h=s.day(),w<0&&w++,v<=2&&(w--,v+=12),Math.floor(365.25*(w+4716))+Math.floor(30.6001*(v+1))+h-1524.5},fromJD:function(w){var v=Math.floor(w+.5)+1524,h=Math.floor((v-122.1)/365.25),s=Math.floor(365.25*h),t=Math.floor((v-s)/30.6001),a=t-Math.floor(t<14?1:13),r=h-Math.floor(a>2?4716:4715),n=v-s-Math.floor(30.6001*t);return r<=0&&r--,this.newDate(r,a,n)}}),_.calendars.julian=i},83290:function(R,E,e){var _=e(63489),k=e(56131);function i(h){this.local=this.regionalOptions[h||""]||this.regionalOptions[""]}function w(h,s){return h-s*Math.floor(h/s)}function v(h,s){return w(h-1,s)+1}i.prototype=new _.baseCalendar,k(i.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(h){return this._validate(h,this.minMonth,this.minDay,_.local.invalidYear),!1},formatYear:function(h){h=this._validate(h,this.minMonth,this.minDay,_.local.invalidYear).year();var s=Math.floor(h/400);return h%=400,h+=h<0?400:0,s+"."+Math.floor(h/20)+"."+h%20},forYear:function(h){if((h=h.split(".")).length<3)throw"Invalid Mayan year";for(var s=0,t=0;t19||t>0&&a<0)throw"Invalid Mayan year";s=20*s+a}return s},monthsInYear:function(h){return this._validate(h,this.minMonth,this.minDay,_.local.invalidYear),18},weekOfYear:function(h,s,t){return this._validate(h,s,t,_.local.invalidDate),0},daysInYear:function(h){return this._validate(h,this.minMonth,this.minDay,_.local.invalidYear),360},daysInMonth:function(h,s){return this._validate(h,s,this.minDay,_.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(h,s,t){return this._validate(h,s,t,_.local.invalidDate).day()},weekDay:function(h,s,t){return this._validate(h,s,t,_.local.invalidDate),!0},extraInfo:function(h,s,t){var a=this._validate(h,s,t,_.local.invalidDate).toJD(),r=this._toHaab(a),n=this._toTzolkin(a);return{haabMonthName:this.local.haabMonths[r[0]-1],haabMonth:r[0],haabDay:r[1],tzolkinDayName:this.local.tzolkinMonths[n[0]-1],tzolkinDay:n[0],tzolkinTrecena:n[1]}},_toHaab:function(h){var s=w(8+(h-=this.jdEpoch)+340,365);return[Math.floor(s/20)+1,w(s,20)]},_toTzolkin:function(h){return[v(20+(h-=this.jdEpoch),20),v(h+4,13)]},toJD:function(h,s,t){var a=this._validate(h,s,t,_.local.invalidDate);return a.day()+20*a.month()+360*a.year()+this.jdEpoch},fromJD:function(h){h=Math.floor(h)+.5-this.jdEpoch;var s=Math.floor(h/360);h%=360,h+=h<0?360:0;var t=Math.floor(h/20),a=h%20;return this.newDate(s,t,a)}}),_.calendars.mayan=i},29108:function(R,E,e){var _=e(63489),k=e(56131);function i(v){this.local=this.regionalOptions[v||""]||this.regionalOptions[""]}i.prototype=new _.baseCalendar;var w=_.instance("gregorian");k(i.prototype,{name:"Nanakshahi",jdEpoch:22576735e-1,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(v){var h=this._validate(v,this.minMonth,this.minDay,_.local.invalidYear||_.regionalOptions[""].invalidYear);return w.leapYear(h.year()+(h.year()<1?1:0)+1469)},weekOfYear:function(v,h,s){var t=this.newDate(v,h,s);return t.add(1-(t.dayOfWeek()||7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(v,h){var s=this._validate(v,h,this.minDay,_.local.invalidMonth);return this.daysPerMonth[s.month()-1]+(s.month()===12&&this.leapYear(s.year())?1:0)},weekDay:function(v,h,s){return(this.dayOfWeek(v,h,s)||7)<6},toJD:function(v,h,s){var t=this._validate(v,h,s,_.local.invalidMonth);(v=t.year())<0&&v++;for(var a=t.day(),r=1;r=this.toJD(h+1,1,1);)h++;for(var s=v-Math.floor(this.toJD(h,1,1)+.5)+1,t=1;s>this.daysInMonth(h,t);)s-=this.daysInMonth(h,t),t++;return this.newDate(h,t,s)}}),_.calendars.nanakshahi=i},55422:function(R,E,e){var _=e(63489),k=e(56131);function i(w){this.local=this.regionalOptions[w||""]||this.regionalOptions[""]}i.prototype=new _.baseCalendar,k(i.prototype,{name:"Nepali",jdEpoch:17007095e-1,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(w){return this.daysInYear(w)!==this.daysPerYear},weekOfYear:function(w,v,h){var s=this.newDate(w,v,h);return s.add(-s.dayOfWeek(),"d"),Math.floor((s.dayOfYear()-1)/7)+1},daysInYear:function(w){if(w=this._validate(w,this.minMonth,this.minDay,_.local.invalidYear).year(),this.NEPALI_CALENDAR_DATA[w]===void 0)return this.daysPerYear;for(var v=0,h=this.minMonth;h<=12;h++)v+=this.NEPALI_CALENDAR_DATA[w][h];return v},daysInMonth:function(w,v){return w.year&&(v=w.month(),w=w.year()),this._validate(w,v,this.minDay,_.local.invalidMonth),this.NEPALI_CALENDAR_DATA[w]===void 0?this.daysPerMonth[v-1]:this.NEPALI_CALENDAR_DATA[w][v]},weekDay:function(w,v,h){return this.dayOfWeek(w,v,h)!==6},toJD:function(w,v,h){var s=this._validate(w,v,h,_.local.invalidDate);w=s.year(),v=s.month(),h=s.day();var t=_.instance(),a=0,r=v,n=w;this._createMissingCalendarData(w);var o=w-(r>9||r===9&&h>=this.NEPALI_CALENDAR_DATA[n][0]?56:57);for(v!==9&&(a=h,r--);r!==9;)r<=0&&(r=12,n--),a+=this.NEPALI_CALENDAR_DATA[n][r],r--;return v===9?(a+=h-this.NEPALI_CALENDAR_DATA[n][0])<0&&(a+=t.daysInYear(o)):a+=this.NEPALI_CALENDAR_DATA[n][9]-this.NEPALI_CALENDAR_DATA[n][0],t.newDate(o,1,1).add(a,"d").toJD()},fromJD:function(w){var v=_.instance().fromJD(w),h=v.year(),s=v.dayOfYear(),t=h+56;this._createMissingCalendarData(t);for(var a=9,r=this.NEPALI_CALENDAR_DATA[t][0],n=this.NEPALI_CALENDAR_DATA[t][a]-r+1;s>n;)++a>12&&(a=1,t++),n+=this.NEPALI_CALENDAR_DATA[t][a];var o=this.NEPALI_CALENDAR_DATA[t][a]-(n-s);return this.newDate(t,a,o)},_createMissingCalendarData:function(w){var v=this.daysPerMonth.slice(0);v.unshift(17);for(var h=w-1;h0?474:473))%2820+474+38)%2816<682},weekOfYear:function(v,h,s){var t=this.newDate(v,h,s);return t.add(-(t.dayOfWeek()+1)%7,"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(v,h){var s=this._validate(v,h,this.minDay,_.local.invalidMonth);return this.daysPerMonth[s.month()-1]+(s.month()===12&&this.leapYear(s.year())?1:0)},weekDay:function(v,h,s){return this.dayOfWeek(v,h,s)!==5},toJD:function(v,h,s){var t=this._validate(v,h,s,_.local.invalidDate);v=t.year(),h=t.month(),s=t.day();var a=v-(v>=0?474:473),r=474+w(a,2820);return s+(h<=7?31*(h-1):30*(h-1)+6)+Math.floor((682*r-110)/2816)+365*(r-1)+1029983*Math.floor(a/2820)+this.jdEpoch-1},fromJD:function(v){var h=(v=Math.floor(v)+.5)-this.toJD(475,1,1),s=Math.floor(h/1029983),t=w(h,1029983),a=2820;if(t!==1029982){var r=Math.floor(t/366),n=w(t,366);a=Math.floor((2134*r+2816*n+2815)/1028522)+r+1}var o=a+2820*s+474;o=o<=0?o-1:o;var l=v-this.toJD(o,1,1)+1,u=l<=186?Math.ceil(l/31):Math.ceil((l-6)/30),d=v-this.toJD(o,u,1)+1;return this.newDate(o,u,d)}}),_.calendars.persian=i,_.calendars.jalali=i},31320:function(R,E,e){var _=e(63489),k=e(56131),i=_.instance();function w(v){this.local=this.regionalOptions[v||""]||this.regionalOptions[""]}w.prototype=new _.baseCalendar,k(w.prototype,{name:"Taiwan",jdEpoch:24194025e-1,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(v){var h=this._validate(v,this.minMonth,this.minDay,_.local.invalidYear);return v=this._t2gYear(h.year()),i.leapYear(v)},weekOfYear:function(v,h,s){var t=this._validate(v,this.minMonth,this.minDay,_.local.invalidYear);return v=this._t2gYear(t.year()),i.weekOfYear(v,t.month(),t.day())},daysInMonth:function(v,h){var s=this._validate(v,h,this.minDay,_.local.invalidMonth);return this.daysPerMonth[s.month()-1]+(s.month()===2&&this.leapYear(s.year())?1:0)},weekDay:function(v,h,s){return(this.dayOfWeek(v,h,s)||7)<6},toJD:function(v,h,s){var t=this._validate(v,h,s,_.local.invalidDate);return v=this._t2gYear(t.year()),i.toJD(v,t.month(),t.day())},fromJD:function(v){var h=i.fromJD(v),s=this._g2tYear(h.year());return this.newDate(s,h.month(),h.day())},_t2gYear:function(v){return v+this.yearsOffset+(v>=-this.yearsOffset&&v<=-1?1:0)},_g2tYear:function(v){return v-this.yearsOffset-(v>=1&&v<=this.yearsOffset?1:0)}}),_.calendars.taiwan=w},51367:function(R,E,e){var _=e(63489),k=e(56131),i=_.instance();function w(v){this.local=this.regionalOptions[v||""]||this.regionalOptions[""]}w.prototype=new _.baseCalendar,k(w.prototype,{name:"Thai",jdEpoch:15230985e-1,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(v){var h=this._validate(v,this.minMonth,this.minDay,_.local.invalidYear);return v=this._t2gYear(h.year()),i.leapYear(v)},weekOfYear:function(v,h,s){var t=this._validate(v,this.minMonth,this.minDay,_.local.invalidYear);return v=this._t2gYear(t.year()),i.weekOfYear(v,t.month(),t.day())},daysInMonth:function(v,h){var s=this._validate(v,h,this.minDay,_.local.invalidMonth);return this.daysPerMonth[s.month()-1]+(s.month()===2&&this.leapYear(s.year())?1:0)},weekDay:function(v,h,s){return(this.dayOfWeek(v,h,s)||7)<6},toJD:function(v,h,s){var t=this._validate(v,h,s,_.local.invalidDate);return v=this._t2gYear(t.year()),i.toJD(v,t.month(),t.day())},fromJD:function(v){var h=i.fromJD(v),s=this._g2tYear(h.year());return this.newDate(s,h.month(),h.day())},_t2gYear:function(v){return v-this.yearsOffset-(v>=1&&v<=this.yearsOffset?1:0)},_g2tYear:function(v){return v+this.yearsOffset+(v>=-this.yearsOffset&&v<=-1?1:0)}}),_.calendars.thai=w},21457:function(R,E,e){var _=e(63489),k=e(56131);function i(v){this.local=this.regionalOptions[v||""]||this.regionalOptions[""]}i.prototype=new _.baseCalendar,k(i.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thalāthā’","Yawm al-Arba‘ā’","Yawm al-Khamīs","Yawm al-Jum‘a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(v){var h=this._validate(v,this.minMonth,this.minDay,_.local.invalidYear);return this.daysInYear(h.year())===355},weekOfYear:function(v,h,s){var t=this.newDate(v,h,s);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(v){for(var h=0,s=1;s<=12;s++)h+=this.daysInMonth(v,s);return h},daysInMonth:function(v,h){for(var s=this._validate(v,h,this.minDay,_.local.invalidMonth).toJD()-24e5+.5,t=0,a=0;as)return w[t]-w[t-1];t++}return 30},weekDay:function(v,h,s){return this.dayOfWeek(v,h,s)!==5},toJD:function(v,h,s){var t=this._validate(v,h,s,_.local.invalidDate),a=12*(t.year()-1)+t.month()-15292;return t.day()+w[a-1]-1+24e5-.5},fromJD:function(v){for(var h=v-24e5+.5,s=0,t=0;th);t++)s++;var a=s+15292,r=Math.floor((a-1)/12),n=r+1,o=a-12*r,l=h-w[s-1]+1;return this.newDate(n,o,l)},isValid:function(v,h,s){var t=_.baseCalendar.prototype.isValid.apply(this,arguments);return t&&(t=(v=v.year!=null?v.year:v)>=1276&&v<=1500),t},_validate:function(v,h,s,t){var a=_.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw t.replace(/\{0\}/,this.local.name);return a}}),_.calendars.ummalqura=i;var w=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]},63489:function(R,E,e){var _=e(56131);function k(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}function i(t,a,r,n){if(this._calendar=t,this._year=a,this._month=r,this._day=n,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(s.local.invalidDate||s.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function w(t,a){return"000000".substring(0,a-(t=""+t).length)+t}function v(){this.shortYearCutoff="+10"}function h(t){this.local=this.regionalOptions[t]||this.regionalOptions[""]}_(k.prototype,{instance:function(t,a){t=(t||"gregorian").toLowerCase(),a=a||"";var r=this._localCals[t+"-"+a];if(!r&&this.calendars[t]&&(r=new this.calendars[t](a),this._localCals[t+"-"+a]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,t);return r},newDate:function(t,a,r,n,o){return(n=(t!=null&&t.year?t.calendar():typeof n=="string"?this.instance(n,o):n)||this.instance()).newDate(t,a,r)},substituteDigits:function(t){return function(a){return(a+"").replace(/[0-9]/g,function(r){return t[r]})}},substituteChineseDigits:function(t,a){return function(r){for(var n="",o=0;r>0;){var l=r%10;n=(l===0?"":t[l]+a[o])+n,o++,r=Math.floor(r/10)}return n.indexOf(t[1]+a[1])===0&&(n=n.substr(1)),n||t[0]}}}),_(i.prototype,{newDate:function(t,a,r){return this._calendar.newDate(t??this,a,r)},year:function(t){return arguments.length===0?this._year:this.set(t,"y")},month:function(t){return arguments.length===0?this._month:this.set(t,"m")},day:function(t){return arguments.length===0?this._day:this.set(t,"d")},date:function(t,a,r){if(!this._calendar.isValid(t,a,r))throw(s.local.invalidDate||s.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=t,this._month=a,this._day=r,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(t,a){return this._calendar.add(this,t,a)},set:function(t,a){return this._calendar.set(this,t,a)},compareTo:function(t){if(this._calendar.name!==t._calendar.name)throw(s.local.differentCalendars||s.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,t._calendar.local.name);var a=this._year!==t._year?this._year-t._year:this._month!==t._month?this.monthOfYear()-t.monthOfYear():this._day-t._day;return a===0?0:a<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(t){return this._calendar.fromJD(t)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(t){return this._calendar.fromJSDate(t)},toString:function(){return(this.year()<0?"-":"")+w(Math.abs(this.year()),4)+"-"+w(this.month(),2)+"-"+w(this.day(),2)}}),_(v.prototype,{_validateLevel:0,newDate:function(t,a,r){return t==null?this.today():(t.year&&(this._validate(t,a,r,s.local.invalidDate||s.regionalOptions[""].invalidDate),r=t.day(),a=t.month(),t=t.year()),new i(this,t,a,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(t){return this._validate(t,this.minMonth,this.minDay,s.local.invalidYear||s.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(t){var a=this._validate(t,this.minMonth,this.minDay,s.local.invalidYear||s.regionalOptions[""].invalidYear);return(a.year()<0?"-":"")+w(Math.abs(a.year()),4)},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,s.local.invalidYear||s.regionalOptions[""].invalidYear),12},monthOfYear:function(t,a){var r=this._validate(t,a,this.minDay,s.local.invalidMonth||s.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(t,a){var r=(a+this.firstMonth-2*this.minMonth)%this.monthsInYear(t)+this.minMonth;return this._validate(t,r,this.minDay,s.local.invalidMonth||s.regionalOptions[""].invalidMonth),r},daysInYear:function(t){var a=this._validate(t,this.minMonth,this.minDay,s.local.invalidYear||s.regionalOptions[""].invalidYear);return this.leapYear(a)?366:365},dayOfYear:function(t,a,r){var n=this._validate(t,a,r,s.local.invalidDate||s.regionalOptions[""].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(t,a,r){var n=this._validate(t,a,r,s.local.invalidDate||s.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(t,a,r){return this._validate(t,a,r,s.local.invalidDate||s.regionalOptions[""].invalidDate),{}},add:function(t,a,r){return this._validate(t,this.minMonth,this.minDay,s.local.invalidDate||s.regionalOptions[""].invalidDate),this._correctAdd(t,this._add(t,a,r),a,r)},_add:function(t,a,r){if(this._validateLevel++,r==="d"||r==="w"){var n=t.toJD()+a*(r==="w"?this.daysInWeek():1),o=t.calendar().fromJD(n);return this._validateLevel--,[o.year(),o.month(),o.day()]}try{var l=t.year()+(r==="y"?a:0),u=t.monthOfYear()+(r==="m"?a:0);o=t.day(),r==="y"?(t.month()!==this.fromMonthOfYear(l,u)&&(u=this.newDate(l,t.month(),this.minDay).monthOfYear()),u=Math.min(u,this.monthsInYear(l)),o=Math.min(o,this.daysInMonth(l,this.fromMonthOfYear(l,u)))):r==="m"&&(function(c){for(;ub-1+c.minMonth;)l++,u-=b,b=c.monthsInYear(l)}(this),o=Math.min(o,this.daysInMonth(l,this.fromMonthOfYear(l,u))));var d=[l,this.fromMonthOfYear(l,u),o];return this._validateLevel--,d}catch(c){throw this._validateLevel--,c}},_correctAdd:function(t,a,r,n){if(!(this.hasYearZero||n!=="y"&&n!=="m"||a[0]!==0&&t.year()>0==a[0]>0)){var o={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],l=r<0?-1:1;a=this._add(t,r*o[0]+l*o[1],o[2])}return t.date(a[0],a[1],a[2])},set:function(t,a,r){this._validate(t,this.minMonth,this.minDay,s.local.invalidDate||s.regionalOptions[""].invalidDate);var n=r==="y"?a:t.year(),o=r==="m"?a:t.month(),l=r==="d"?a:t.day();return r!=="y"&&r!=="m"||(l=Math.min(l,this.daysInMonth(n,o))),t.date(n,o,l)},isValid:function(t,a,r){this._validateLevel++;var n=this.hasYearZero||t!==0;if(n){var o=this.newDate(t,a,this.minDay);n=a>=this.minMonth&&a-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),b=o-(c>2.5?4716:4715);return b<=0&&b--,this.newDate(b,c,d)},toJSDate:function(t,a,r){var n=this._validate(t,a,r,s.local.invalidDate||s.regionalOptions[""].invalidDate),o=new Date(n.year(),n.month()-1,n.day());return o.setHours(0),o.setMinutes(0),o.setSeconds(0),o.setMilliseconds(0),o.setHours(o.getHours()>12?o.getHours()+2:0),o},fromJSDate:function(t){return this.newDate(t.getFullYear(),t.getMonth()+1,t.getDate())}});var s=R.exports=new k;s.cdate=i,s.baseCalendar=v,s.calendars.gregorian=h},94338:function(R,E,e){var _=e(56131),k=e(63489);_(k.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),k.local=k.regionalOptions[""],_(k.cdate.prototype,{formatDate:function(i,w){return typeof i!="string"&&(w=i,i=""),this._calendar.formatDate(i||"",this,w)}}),_(k.baseCalendar.prototype,{UNIX_EPOCH:k.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:k.instance().jdEpoch,TICKS_PER_DAY:864e9,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(i,w,v){if(typeof i!="string"&&(v=w,w=i,i=""),!w)return"";if(w.calendar()!==this)throw k.local.invalidFormat||k.regionalOptions[""].invalidFormat;i=i||this.local.dateFormat;for(var h,s,t,a=(v=v||{}).dayNamesShort||this.local.dayNamesShort,r=v.dayNames||this.local.dayNames,n=v.monthNumbers||this.local.monthNumbers,o=v.monthNamesShort||this.local.monthNamesShort,l=v.monthNames||this.local.monthNames,u=(v.calculateWeek||this.local.calculateWeek,function(p,M){for(var A=1;T+A1}),d=function(p,M,A,C){var P=""+M;if(u(p,C))for(;P.length1},y=function(B,Y){var D=x(B,Y),G=[2,3,D?4:2,D?4:2,10,11,20]["oyYJ@!".indexOf(B)+1],U=new RegExp("^-?\\d{1,"+G+"}"),j=w.substring(C).match(U);if(!j)throw(k.local.missingNumberAt||k.regionalOptions[""].missingNumberAt).replace(/\{0\}/,C);return C+=j[0].length,parseInt(j[0],10)},m=this,T=function(){if(typeof r=="function"){x("m");var B=r.call(m,w.substring(C));return C+=B.length,B}return y("m")},p=function(B,Y,D,G){for(var U=x(B,G)?D:Y,j=0;j-1){d=1,c=b;for(var z=this.daysInMonth(u,d);c>z;z=this.daysInMonth(u,d))d++,c-=z}return l>-1?this.fromJD(l):this.newDate(u,d,c)},determineDate:function(i,w,v,h,s){v&&typeof v!="object"&&(s=h,h=v,v=null),typeof h!="string"&&(s=h,h="");var t=this;return w=w?w.newDate():null,i==null?w:typeof i=="string"?function(a){try{return t.parseDate(h,a,s)}catch{}for(var r=((a=a.toLowerCase()).match(/^c/)&&v?v.newDate():null)||t.today(),n=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,o=n.exec(a);o;)r.add(parseInt(o[1],10),o[2]||"d"),o=n.exec(a);return r}(i):typeof i=="number"?isNaN(i)||i===1/0||i===-1/0?w:t.today().add(i,"d"):t.newDate(i)}})},69862:function(){},40964:function(){},72077:function(R,E,e){var _=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],k=typeof globalThis>"u"?e.g:globalThis;R.exports=function(){for(var i=[],w=0;w<_.length;w++)typeof k[_[w]]=="function"&&(i[i.length]=_[w]);return i}},81684:function(R,E,e){function _(me,_e,Me){me.prototype=_e.prototype=Me,Me.constructor=me}function k(me,_e){var Me=Object.create(me.prototype);for(var we in _e)Me[we]=_e[we];return Me}function i(){}e.d(E,{sX:function(){return de},k4:function(){return te}});var w=.7,v=1/w,h="\\s*([+-]?\\d+)\\s*",s="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",t="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",a=/^#([0-9a-f]{3,8})$/,r=new RegExp("^rgb\\(".concat(h,",").concat(h,",").concat(h,"\\)$")),n=new RegExp("^rgb\\(".concat(t,",").concat(t,",").concat(t,"\\)$")),o=new RegExp("^rgba\\(".concat(h,",").concat(h,",").concat(h,",").concat(s,"\\)$")),l=new RegExp("^rgba\\(".concat(t,",").concat(t,",").concat(t,",").concat(s,"\\)$")),u=new RegExp("^hsl\\(".concat(s,",").concat(t,",").concat(t,"\\)$")),d=new RegExp("^hsla\\(".concat(s,",").concat(t,",").concat(t,",").concat(s,"\\)$")),c={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function b(){return this.rgb().formatHex()}function g(){return this.rgb().formatRgb()}function f(me){var _e,Me;return me=(me+"").trim().toLowerCase(),(_e=a.exec(me))?(Me=_e[1].length,_e=parseInt(_e[1],16),Me===6?x(_e):Me===3?new T(_e>>8&15|_e>>4&240,_e>>4&15|240&_e,(15&_e)<<4|15&_e,1):Me===8?y(_e>>24&255,_e>>16&255,_e>>8&255,(255&_e)/255):Me===4?y(_e>>12&15|_e>>8&240,_e>>8&15|_e>>4&240,_e>>4&15|240&_e,((15&_e)<<4|15&_e)/255):null):(_e=r.exec(me))?new T(_e[1],_e[2],_e[3],1):(_e=n.exec(me))?new T(255*_e[1]/100,255*_e[2]/100,255*_e[3]/100,1):(_e=o.exec(me))?y(_e[1],_e[2],_e[3],_e[4]):(_e=l.exec(me))?y(255*_e[1]/100,255*_e[2]/100,255*_e[3]/100,_e[4]):(_e=u.exec(me))?O(_e[1],_e[2]/100,_e[3]/100,1):(_e=d.exec(me))?O(_e[1],_e[2]/100,_e[3]/100,_e[4]):c.hasOwnProperty(me)?x(c[me]):me==="transparent"?new T(NaN,NaN,NaN,0):null}function x(me){return new T(me>>16&255,me>>8&255,255&me,1)}function y(me,_e,Me,we){return we<=0&&(me=_e=Me=NaN),new T(me,_e,Me,we)}function m(me,_e,Me,we){return arguments.length===1?((xe=me)instanceof i||(xe=f(xe)),xe?new T((xe=xe.rgb()).r,xe.g,xe.b,xe.opacity):new T):new T(me,_e,Me,we??1);var xe}function T(me,_e,Me,we){this.r=+me,this.g=+_e,this.b=+Me,this.opacity=+we}function p(){return"#".concat(P(this.r)).concat(P(this.g)).concat(P(this.b))}function M(){var me=A(this.opacity);return"".concat(me===1?"rgb(":"rgba(").concat(C(this.r),", ").concat(C(this.g),", ").concat(C(this.b)).concat(me===1?")":", ".concat(me,")"))}function A(me){return isNaN(me)?1:Math.max(0,Math.min(1,me))}function C(me){return Math.max(0,Math.min(255,Math.round(me)||0))}function P(me){return((me=C(me))<16?"0":"")+me.toString(16)}function O(me,_e,Me,we){return we<=0?me=_e=Me=NaN:Me<=0||Me>=1?me=_e=NaN:_e<=0&&(me=NaN),new B(me,_e,Me,we)}function z(me){if(me instanceof B)return new B(me.h,me.s,me.l,me.opacity);if(me instanceof i||(me=f(me)),!me)return new B;if(me instanceof B)return me;var _e=(me=me.rgb()).r/255,Me=me.g/255,we=me.b/255,xe=Math.min(_e,Me,we),De=Math.max(_e,Me,we),Ee=NaN,Se=De-xe,he=(De+xe)/2;return Se?(Ee=_e===De?(Me-we)/Se+6*(Me0&&he<1?0:Ee,new B(Ee,Se,he,me.opacity)}function B(me,_e,Me,we){this.h=+me,this.s=+_e,this.l=+Me,this.opacity=+we}function Y(me){return(me=(me||0)%360)<0?me+360:me}function D(me){return Math.max(0,Math.min(1,me||0))}function G(me,_e,Me){return 255*(me<60?_e+(Me-_e)*me/60:me<180?Me:me<240?_e+(Me-_e)*(240-me)/60:_e)}_(i,f,{copy:function(me){return Object.assign(new this.constructor,this,me)},displayable:function(){return this.rgb().displayable()},hex:b,formatHex:b,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return z(this).formatHsl()},formatRgb:g,toString:g}),_(T,m,k(i,{brighter:function(me){return me=me==null?v:Math.pow(v,me),new T(this.r*me,this.g*me,this.b*me,this.opacity)},darker:function(me){return me=me==null?w:Math.pow(w,me),new T(this.r*me,this.g*me,this.b*me,this.opacity)},rgb:function(){return this},clamp:function(){return new T(C(this.r),C(this.g),C(this.b),A(this.opacity))},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:p,formatHex:p,formatHex8:function(){return"#".concat(P(this.r)).concat(P(this.g)).concat(P(this.b)).concat(P(255*(isNaN(this.opacity)?1:this.opacity)))},formatRgb:M,toString:M})),_(B,function(me,_e,Me,we){return arguments.length===1?z(me):new B(me,_e,Me,we??1)},k(i,{brighter:function(me){return me=me==null?v:Math.pow(v,me),new B(this.h,this.s,this.l*me,this.opacity)},darker:function(me){return me=me==null?w:Math.pow(w,me),new B(this.h,this.s,this.l*me,this.opacity)},rgb:function(){var me=this.h%360+360*(this.h<0),_e=isNaN(me)||isNaN(this.s)?0:this.s,Me=this.l,we=Me+(Me<.5?Me:1-Me)*_e,xe=2*Me-we;return new T(G(me>=240?me-240:me+120,xe,we),G(me,xe,we),G(me<120?me+240:me-120,xe,we),this.opacity)},clamp:function(){return new B(Y(this.h),D(this.s),D(this.l),A(this.opacity))},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var me=A(this.opacity);return"".concat(me===1?"hsl(":"hsla(").concat(Y(this.h),", ").concat(100*D(this.s),"%, ").concat(100*D(this.l),"%").concat(me===1?")":", ".concat(me,")"))}}));var U=function(me){return function(){return me}};function j(me,_e){var Me=_e-me;return Me?function(we,xe){return function(De){return we+De*xe}}(me,Me):U(isNaN(me)?_e:me)}var W=function me(_e){var Me=function(xe){return(xe=+xe)==1?j:function(De,Ee){return Ee-De?function(Se,he,fe){return Se=Math.pow(Se,fe),he=Math.pow(he,fe)-Se,fe=1/fe,function(ae){return Math.pow(Se+ae*he,fe)}}(De,Ee,xe):U(isNaN(De)?Ee:De)}}(_e);function we(xe,De){var Ee=Me((xe=m(xe)).r,(De=m(De)).r),Se=Me(xe.g,De.g),he=Me(xe.b,De.b),fe=j(xe.opacity,De.opacity);return function(ae){return xe.r=Ee(ae),xe.g=Se(ae),xe.b=he(ae),xe.opacity=fe(ae),xe+""}}return we.gamma=me,we}(1);function Z(me,_e){var Me,we=_e?_e.length:0,xe=me?Math.min(we,me.length):0,De=new Array(xe),Ee=new Array(we);for(Me=0;MeDe&&(xe=_e.slice(De,xe),Se[Ee]?Se[Ee]+=xe:Se[++Ee]=xe),(Me=Me[0])===(we=we[0])?Se[Ee]?Se[Ee]+=we:Se[++Ee]=we:(Se[++Ee]=null,he.push({i:Ee,x:te(Me,we)})),De=re.lastIndex;return De<_e.length&&(xe=_e.slice(De),Se[Ee]?Se[Ee]+=xe:Se[++Ee]=xe),Se.length<2?he[0]?function(fe){return function(ae){return fe(ae)+""}}(he[0].x):function(fe){return function(){return fe}}(_e):(_e=he.length,function(fe){for(var ae,be=0;be<_e;++be)Se[(ae=he[be]).i]=ae.x(fe);return Se.join("")})}function ue(me,_e){_e||(_e=[]);var Me,we=me?Math.min(_e.length,me.length):0,xe=_e.slice();return function(De){for(Me=0;Me"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function a(u){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(c){return c.__proto__||Object.getPrototypeOf(c)},a(u)}var r=["AfterExport","AfterPlot","Animated","AnimatingFrame","AnimationInterrupted","AutoSize","BeforeExport","BeforeHover","ButtonClicked","Click","ClickAnnotation","Deselect","DoubleClick","Framework","Hover","LegendClick","LegendDoubleClick","Relayout","Relayouting","Restyle","Redraw","Selected","Selecting","SliderChange","SliderEnd","SliderStart","SunburstClick","Transitioning","TransitionInterrupted","Unhover","WebGlContextLost"],n=["plotly_restyle","plotly_redraw","plotly_relayout","plotly_relayouting","plotly_doubleclick","plotly_animated","plotly_sunburstclick"],o=typeof window<"u";function l(u){var d=function(c){i(g,c);var b=v(g);function g(f){var x;return e(this,g),x=b.call(this,f),x.p=Promise.resolve(),x.resizeHandler=null,x.handlers={},x.syncWindowResize=x.syncWindowResize.bind(s(x)),x.syncEventHandlers=x.syncEventHandlers.bind(s(x)),x.attachUpdateEvents=x.attachUpdateEvents.bind(s(x)),x.getRef=x.getRef.bind(s(x)),x.handleUpdate=x.handleUpdate.bind(s(x)),x.figureCallback=x.figureCallback.bind(s(x)),x.updatePlotly=x.updatePlotly.bind(s(x)),x}return k(g,[{key:"updatePlotly",value:function(x,y,m){var T=this;this.p=this.p.then(function(){if(!T.unmounting){if(!T.el)throw new Error("Missing element reference");return u.react(T.el,{data:T.props.data,layout:T.props.layout,config:T.props.config,frames:T.props.frames})}}).then(function(){T.unmounting||(T.syncWindowResize(x),T.syncEventHandlers(),T.figureCallback(y),m&&T.attachUpdateEvents())}).catch(function(p){T.props.onError&&T.props.onError(p)})}},{key:"componentDidMount",value:function(){this.unmounting=!1,this.updatePlotly(!0,this.props.onInitialized,!0)}},{key:"componentDidUpdate",value:function(x){this.unmounting=!1;var y=x.frames&&x.frames.length?x.frames.length:0,m=this.props.frames&&this.props.frames.length?this.props.frames.length:0,T=!(x.layout===this.props.layout&&x.data===this.props.data&&x.config===this.props.config&&m===y),p=x.revision!==void 0,M=x.revision!==this.props.revision;!T&&(!p||p&&!M)||this.updatePlotly(!1,this.props.onUpdate,!1)}},{key:"componentWillUnmount",value:function(){this.unmounting=!0,this.figureCallback(this.props.onPurge),this.resizeHandler&&o&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null),this.removeUpdateEvents(),u.purge(this.el)}},{key:"attachUpdateEvents",value:function(){var x=this;!this.el||!this.el.removeListener||n.forEach(function(y){x.el.on(y,x.handleUpdate)})}},{key:"removeUpdateEvents",value:function(){var x=this;!this.el||!this.el.removeListener||n.forEach(function(y){x.el.removeListener(y,x.handleUpdate)})}},{key:"handleUpdate",value:function(){this.figureCallback(this.props.onUpdate)}},{key:"figureCallback",value:function(x){if(typeof x=="function"){var y=this.el,m=y.data,T=y.layout,p=this.el._transitionData?this.el._transitionData._frames:null,M={data:m,layout:T,frames:p};x(M,this.el)}}},{key:"syncWindowResize",value:function(x){var y=this;o&&(this.props.useResizeHandler&&!this.resizeHandler?(this.resizeHandler=function(){return u.Plots.resize(y.el)},window.addEventListener("resize",this.resizeHandler),x&&this.resizeHandler()):!this.props.useResizeHandler&&this.resizeHandler&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null))}},{key:"getRef",value:function(x){this.el=x,this.props.debug&&o&&(window.gd=this.el)}},{key:"syncEventHandlers",value:function(){var x=this;r.forEach(function(y){var m=x.props["on"+y],T=x.handlers[y],p=!!T;m&&!p?x.addEventHandler(y,m):!m&&p?x.removeEventHandler(y):m&&p&&m!==T&&(x.removeEventHandler(y),x.addEventHandler(y,m))})}},{key:"addEventHandler",value:function(x,y){this.handlers[x]=y,this.el.on(this.getPlotlyEventName(x),this.handlers[x])}},{key:"removeEventHandler",value:function(x){this.el.removeListener(this.getPlotlyEventName(x),this.handlers[x]),delete this.handlers[x]}},{key:"getPlotlyEventName",value:function(x){return"plotly_"+x.toLowerCase()}},{key:"render",value:function(){return K.default.createElement("div",{id:this.props.divId,style:this.props.style,ref:this.getRef,className:this.props.className})}}]),g}(K.Component);return d.propTypes={data:se.default.arrayOf(se.default.object),config:se.default.object,layout:se.default.object,frames:se.default.arrayOf(se.default.object),revision:se.default.number,onInitialized:se.default.func,onPurge:se.default.func,onError:se.default.func,onUpdate:se.default.func,debug:se.default.bool,style:se.default.object,className:se.default.string,useResizeHandler:se.default.bool,divId:se.default.string},r.forEach(function(c){d.propTypes["on"+c]=se.default.func}),d.defaultProps={debug:!1,useResizeHandler:!1,data:[],style:{position:"relative",display:"inline-block"}},d}})(a5);const u7=ud(a5),Wu={sunIcon:{viewBox:"0 0 16 16",width:16,height:16,path:"M8 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0zm0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13zm8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5zM3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8zm10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0zm-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0zm9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707zM4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708z"},moonIcon:{viewBox:"0 0 25 25",width:25,height:25,path:"M21.752 15.002A9.718 9.718 0 0118 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 003 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 009.002-5.998z"},plotCsv:{width:900,height:900,path:"M170.666667 106.666667l0.192 736H906.666667v64H149.546667c-23.552 0-42.666667-19.093333-42.666667-42.666667L106.666667 106.666667h64z m686.506666 454.144l13.653334 16.362666a21.333333 21.333333 0 0 1-2.666667 30.058667l-171.157333 143.146667a21.333333 21.333333 0 0 1-21.546667 3.477333l-229.973333-91.285333-113.834667 94.997333a21.333333 21.333333 0 0 1-30.037333-2.709333l-13.653334-16.362667a21.333333 21.333333 0 0 1 2.688-30.058667l133.312-111.274666a21.333333 21.333333 0 0 1 21.546667-3.456l229.930667 91.264 151.68-126.826667a21.333333 21.333333 0 0 1 30.037333 2.666667z m-1.621333-417.962667l16.896 13.013333a21.333333 21.333333 0 0 1 3.925333 29.888L685.802667 433.706667a21.333333 21.333333 0 0 1-20.202667 8.085333l-226.794667-35.413333-150.186666 222.357333a21.333333 21.333333 0 0 1-27.477334 7.018667l-2.133333-1.28-17.685333-11.946667a21.333333 21.333333 0 0 1-5.738667-29.610667l165.354667-244.821333a21.333333 21.333333 0 0 1 20.992-9.130667L650.453333 374.613333l175.146667-227.882666a21.333333 21.333333 0 0 1 29.930667-3.904z"},addText:{path:"M896 928H128a32 32 0 0 1-32-32V128a32 32 0 0 1 32-32h768a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32z m-736-64h704v-704h-704z M704 352H320a32 32 0 0 1 0-64h384a32 32 0 0 1 0 64z M512 736a32 32 0 0 1-32-32V320a32 32 0 0 1 64 0v384a32 32 0 0 1-32 32z",width:950,height:950},changeTitle:{path:"M122.368 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384h-778.24c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H136.704c-26.112 0-47.104 20.992-47.104 47.104v688.128z M244.736 656.896h534.016v62.464H244.736z M373.76 358.4H307.2v219.136h-45.568V358.4H192v-41.472H373.76V358.4zM403.968 316.928h44.032v50.176h-44.032v-50.176z m0 67.072h44.032v194.048h-44.032V384zM576.512 541.184l8.704 31.744c-13.312 5.12-26.624 8.192-38.912 8.704-32.768 1.024-48.64-15.36-48.128-48.128V422.912h-26.624V384h26.624v-46.592l44.032-21.504V384h36.352v38.912h-36.352V532.48c-1.024 10.24 3.072 14.848 11.264 13.824 5.12 0 12.8-1.536 23.04-5.12zM619.008 316.928h44.032v260.608h-44.032V316.928zM813.056 509.952l41.472 12.8c-11.776 40.96-37.888 61.44-78.336 60.416-52.736-1.536-80.384-34.304-81.92-98.304 2.56-67.072 29.696-102.4 81.92-105.984 52.224 1.536 78.336 36.864 79.36 105.984v13.824h-117.248c3.584 30.208 15.872 45.568 37.888 46.592 19.968 0.512 32.256-11.264 36.864-35.328z m-72.704-51.712h70.656c-1.024-25.088-12.288-38.4-33.792-38.912-21.504 0.512-33.792 13.824-36.864 38.912z",width:920,height:900},changeColor:{path:"M8 3C5.79 3 4 4.79 4 7V14C4 15.1 4.9 16 6 16H9V20C9 21.1 9.9 22 11 22H13C14.1 22 15 21.1 15 20V16H18C19.1 16 20 15.1 20 14V3H8M8 5H12V7H14V5H15V9H17V5H18V10H6V7C6 5.9 6.9 5 8 5M6 14V12H18V14H6Z",width:22,height:22},uploadImage:{path:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5m-13.5-9L12 3m0 0l4.5 4.5M12 3v13.5",width:1024,height:1024},downloadCsv:{path:`M486.2,196.121h-13.164V132.59c0-0.399-0.064-0.795-0.116-1.2c-0.021-2.52-0.824-5-2.551-6.96L364.656,3.677 +`)):W=z.stylize("[Circular]","special")),g(j)){if(U&&G.match(/^\d+$/))return W;(j=JSON.stringify(""+G)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(j=j.slice(1,-1),j=z.stylize(j,"name")):(j=j.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),j=z.stylize(j,"string"))}return j+": "+W}function l(z){return Array.isArray(z)}function u(z){return typeof z=="boolean"}function d(z){return z===null}function c(z){return typeof z=="number"}function b(z){return typeof z=="string"}function g(z){return z===void 0}function f(z){return x(z)&&p(z)==="[object RegExp]"}function x(z){return typeof z=="object"&&z!==null}function y(z){return x(z)&&p(z)==="[object Date]"}function m(z){return x(z)&&(p(z)==="[object Error]"||z instanceof Error)}function T(z){return typeof z=="function"}function p(z){return Object.prototype.toString.call(z)}function M(z){return z<10?"0"+z.toString(10):z.toString(10)}E.debuglog=function(z){if(z=z.toUpperCase(),!w[z])if(v.test(z)){var B=_.pid;w[z]=function(){var Y=E.format.apply(E,arguments);console.error("%s %d: %s",z,B,Y)}}else w[z]=function(){};return w[z]},E.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},E.types=e(4936),E.isArray=l,E.isBoolean=u,E.isNull=d,E.isNullOrUndefined=function(z){return z==null},E.isNumber=c,E.isString=b,E.isSymbol=function(z){return typeof z=="symbol"},E.isUndefined=g,E.isRegExp=f,E.types.isRegExp=f,E.isObject=x,E.isDate=y,E.types.isDate=y,E.isError=m,E.types.isNativeError=m,E.isFunction=T,E.isPrimitive=function(z){return z===null||typeof z=="boolean"||typeof z=="number"||typeof z=="string"||typeof z=="symbol"||z===void 0},E.isBuffer=e(45920);var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function C(z,B){return Object.prototype.hasOwnProperty.call(z,B)}E.log=function(){var z,B;console.log("%s - %s",(B=[M((z=new Date).getHours()),M(z.getMinutes()),M(z.getSeconds())].join(":"),[z.getDate(),A[z.getMonth()],B].join(" ")),E.format.apply(E,arguments))},E.inherits=e(42018),E._extend=function(z,B){if(!B||!x(B))return z;for(var Y=Object.keys(B),D=Y.length;D--;)z[Y[D]]=B[Y[D]];return z};var P=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function O(z,B){if(!z){var Y=new Error("Promise was rejected with a falsy value");Y.reason=z,z=Y}return B(z)}E.promisify=function(z){if(typeof z!="function")throw new TypeError('The "original" argument must be of type Function');if(P&&z[P]){var B;if(typeof(B=z[P])!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(B,P,{value:B,enumerable:!1,writable:!1,configurable:!0}),B}function B(){for(var Y,D,G=new Promise(function(W,Z){Y=W,D=Z}),U=[],j=0;j"u"?e.g:globalThis,t=k(),a=i("String.prototype.slice"),r={},n=Object.getPrototypeOf;h&&w&&n&&_(t,function(l){if(typeof s[l]=="function"){var u=new s[l];if(Symbol.toStringTag in u){var d=n(u),c=w(d,Symbol.toStringTag);if(!c){var b=n(d);c=w(b,Symbol.toStringTag)}r[l]=c.get}}});var o=e(9187);R.exports=function(l){return!!o(l)&&(h&&Symbol.toStringTag in l?function(u){var d=!1;return _(r,function(c,b){if(!d)try{var g=c.call(u);g===b&&(d=g)}catch{}}),d}(l):a(v(l),8,-1))}},3961:function(R,E,e){var _=e(63489),k=e(56131),i=_.instance();function w(n){this.local=this.regionalOptions[n||""]||this.regionalOptions[""]}w.prototype=new _.baseCalendar,k(w.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(n,o){if(typeof n=="string"){var l=n.match(h);return l?l[0]:""}var u=this._validateYear(n),d=n.month(),c=""+this.toChineseMonth(u,d);return o&&c.length<2&&(c="0"+c),this.isIntercalaryMonth(u,d)&&(c+="i"),c},monthNames:function(n){if(typeof n=="string"){var o=n.match(s);return o?o[0]:""}var l=this._validateYear(n),u=n.month(),d=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][this.toChineseMonth(l,u)-1];return this.isIntercalaryMonth(l,u)&&(d="闰"+d),d},monthNamesShort:function(n){if(typeof n=="string"){var o=n.match(t);return o?o[0]:""}var l=this._validateYear(n),u=n.month(),d=["一","二","三","四","五","六","七","八","九","十","十一","十二"][this.toChineseMonth(l,u)-1];return this.isIntercalaryMonth(l,u)&&(d="闰"+d),d},parseMonth:function(n,o){n=this._validateYear(n);var l,u=parseInt(o);if(isNaN(u))o[0]==="闰"&&(l=!0,o=o.substring(1)),o[o.length-1]==="月"&&(o=o.substring(0,o.length-1)),u=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(o);else{var d=o[o.length-1];l=d==="i"||d==="I"}return this.toMonthIndex(n,u,l)},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(n,o){if(n.year&&(n=n.year()),typeof n!="number"||n<1888||n>2111)throw o.replace(/\{0\}/,this.local.name);return n},toMonthIndex:function(n,o,l){var u=this.intercalaryMonth(n);if(l&&o!==u||o<1||o>12)throw _.local.invalidMonth.replace(/\{0\}/,this.local.name);return u?!l&&o<=u?o-1:o:o-1},toChineseMonth:function(n,o){n.year&&(o=(n=n.year()).month());var l=this.intercalaryMonth(n);if(o<0||o>(l?12:11))throw _.local.invalidMonth.replace(/\{0\}/,this.local.name);return l?o>13},isIntercalaryMonth:function(n,o){n.year&&(o=(n=n.year()).month());var l=this.intercalaryMonth(n);return!!l&&l===o},leapYear:function(n){return this.intercalaryMonth(n)!==0},weekOfYear:function(n,o,l){var u,d=this._validateYear(n,_.local.invalidyear),c=r[d-r[0]],b=c>>9&4095,g=c>>5&15,f=31&c;(u=i.newDate(b,g,f)).add(4-(u.dayOfWeek()||7),"d");var x=this.toJD(n,o,l)-u.toJD();return 1+Math.floor(x/7)},monthsInYear:function(n){return this.leapYear(n)?13:12},daysInMonth:function(n,o){n.year&&(o=n.month(),n=n.year()),n=this._validateYear(n);var l=a[n-a[0]];if(o>(l>>13?12:11))throw _.local.invalidMonth.replace(/\{0\}/,this.local.name);return l&1<<12-o?30:29},weekDay:function(n,o,l){return(this.dayOfWeek(n,o,l)||7)<6},toJD:function(n,o,l){var u=this._validate(n,c,l,_.local.invalidDate);n=this._validateYear(u.year()),o=u.month(),l=u.day();var d=this.isIntercalaryMonth(n,o),c=this.toChineseMonth(n,o),b=function(g,f,x,y,m){var T,p,M;if(typeof g=="object")p=g,T=f||{};else{var A;if(!(typeof g=="number"&&g>=1888&&g<=2111))throw new Error("Lunar year outside range 1888-2111");if(!(typeof f=="number"&&f>=1&&f<=12))throw new Error("Lunar month outside range 1 - 12");if(!(typeof x=="number"&&x>=1&&x<=30))throw new Error("Lunar day outside range 1 - 30");typeof y=="object"?(A=!1,T=y):(A=!!y,T={}),p={year:g,month:f,day:x,isIntercalary:A}}M=p.day-1;var C,P=a[p.year-a[0]],O=P>>13;C=O&&(p.month>O||p.isIntercalary)?p.month:p.month-1;for(var z=0;z>9&4095,(B>>5&15)-1,(31&B)+M);return T.year=Y.getFullYear(),T.month=1+Y.getMonth(),T.day=Y.getDate(),T}(n,c,l,d);return i.toJD(b.year,b.month,b.day)},fromJD:function(n){var o=i.fromJD(n),l=function(d,c,b,g){var f,x;if(typeof d=="object")f=d,x=c||{};else{if(!(typeof d=="number"&&d>=1888&&d<=2111))throw new Error("Solar year outside range 1888-2111");if(!(typeof c=="number"&&c>=1&&c<=12))throw new Error("Solar month outside range 1 - 12");if(!(typeof b=="number"&&b>=1&&b<=31))throw new Error("Solar day outside range 1 - 31");f={year:d,month:c,day:b},x={}}var y=r[f.year-r[0]],m=f.year<<9|f.month<<5|f.day;x.year=m>=y?f.year:f.year-1,y=r[x.year-r[0]];var T,p=new Date(y>>9&4095,(y>>5&15)-1,31&y),M=new Date(f.year,f.month-1,f.day);T=Math.round((M-p)/864e5);var A,C=a[x.year-a[0]];for(A=0;A<13;A++){var P=C&1<<12-A?30:29;if(T>13;return!O||A=2&&t<=6},extraInfo:function(v,h,s){var t=this._validate(v,h,s,_.local.invalidDate);return{century:w[Math.floor((t.year()-1)/100)+1]||""}},toJD:function(v,h,s){var t=this._validate(v,h,s,_.local.invalidDate);return v=t.year()+(t.year()<0?1:0),h=t.month(),(s=t.day())+(h>1?16:0)+(h>2?32*(h-2):0)+400*(v-1)+this.jdEpoch-1},fromJD:function(v){v=Math.floor(v+.5)-Math.floor(this.jdEpoch)-1;var h=Math.floor(v/400)+1;v-=400*(h-1),v+=v>15?16:0;var s=Math.floor(v/32)+1,t=v-32*(s-1)+1;return this.newDate(h<=0?h-1:h,s,t)}});var w={20:"Fruitbat",21:"Anchovy"};_.calendars.discworld=i},37715:function(R,E,e){var _=e(63489),k=e(56131);function i(w){this.local=this.regionalOptions[w||""]||this.regionalOptions[""]}i.prototype=new _.baseCalendar,k(i.prototype,{name:"Ethiopian",jdEpoch:17242205e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(w){var v=this._validate(w,this.minMonth,this.minDay,_.local.invalidYear);return(w=v.year()+(v.year()<0?1:0))%4==3||w%4==-1},monthsInYear:function(w){return this._validate(w,this.minMonth,this.minDay,_.local.invalidYear||_.regionalOptions[""].invalidYear),13},weekOfYear:function(w,v,h){var s=this.newDate(w,v,h);return s.add(-s.dayOfWeek(),"d"),Math.floor((s.dayOfYear()-1)/7)+1},daysInMonth:function(w,v){var h=this._validate(w,v,this.minDay,_.local.invalidMonth);return this.daysPerMonth[h.month()-1]+(h.month()===13&&this.leapYear(h.year())?1:0)},weekDay:function(w,v,h){return(this.dayOfWeek(w,v,h)||7)<6},toJD:function(w,v,h){var s=this._validate(w,v,h,_.local.invalidDate);return(w=s.year())<0&&w++,s.day()+30*(s.month()-1)+365*(w-1)+Math.floor(w/4)+this.jdEpoch-1},fromJD:function(w){var v=Math.floor(w)+.5-this.jdEpoch,h=Math.floor((v-Math.floor((v+366)/1461))/365)+1;h<=0&&h--,v=Math.floor(w)+.5-this.newDate(h,1,1).toJD();var s=Math.floor(v/30)+1,t=v-30*(s-1)+1;return this.newDate(h,s,t)}}),_.calendars.ethiopian=i},99384:function(R,E,e){var _=e(63489),k=e(56131);function i(v){this.local=this.regionalOptions[v||""]||this.regionalOptions[""]}function w(v,h){return v-h*Math.floor(v/h)}i.prototype=new _.baseCalendar,k(i.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(v){var h=this._validate(v,this.minMonth,this.minDay,_.local.invalidYear);return this._leapYear(h.year())},_leapYear:function(v){return w(7*(v=v<0?v+1:v)+1,19)<7},monthsInYear:function(v){return this._validate(v,this.minMonth,this.minDay,_.local.invalidYear),this._leapYear(v.year?v.year():v)?13:12},weekOfYear:function(v,h,s){var t=this.newDate(v,h,s);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(v){return v=this._validate(v,this.minMonth,this.minDay,_.local.invalidYear).year(),this.toJD(v===-1?1:v+1,7,1)-this.toJD(v,7,1)},daysInMonth:function(v,h){return v.year&&(h=v.month(),v=v.year()),this._validate(v,h,this.minDay,_.local.invalidMonth),h===12&&this.leapYear(v)||h===8&&w(this.daysInYear(v),10)===5?30:h===9&&w(this.daysInYear(v),10)===3?29:this.daysPerMonth[h-1]},weekDay:function(v,h,s){return this.dayOfWeek(v,h,s)!==6},extraInfo:function(v,h,s){var t=this._validate(v,h,s,_.local.invalidDate);return{yearType:(this.leapYear(t)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(t)%10-3]}},toJD:function(v,h,s){var t=this._validate(v,h,s,_.local.invalidDate);v=t.year(),h=t.month(),s=t.day();var a=v<=0?v+1:v,r=this.jdEpoch+this._delay1(a)+this._delay2(a)+s+1;if(h<7){for(var n=7;n<=this.monthsInYear(v);n++)r+=this.daysInMonth(v,n);for(n=1;n=this.toJD(h===-1?1:h+1,7,1);)h++;for(var s=vthis.toJD(h,s,this.daysInMonth(h,s));)s++;var t=v-this.toJD(h,s,1)+1;return this.newDate(h,s,t)}}),_.calendars.hebrew=i},43805:function(R,E,e){var _=e(63489),k=e(56131);function i(w){this.local=this.regionalOptions[w||""]||this.regionalOptions[""]}i.prototype=new _.baseCalendar,k(i.prototype,{name:"Islamic",jdEpoch:19484395e-1,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-khamīs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(w){return(11*this._validate(w,this.minMonth,this.minDay,_.local.invalidYear).year()+14)%30<11},weekOfYear:function(w,v,h){var s=this.newDate(w,v,h);return s.add(-s.dayOfWeek(),"d"),Math.floor((s.dayOfYear()-1)/7)+1},daysInYear:function(w){return this.leapYear(w)?355:354},daysInMonth:function(w,v){var h=this._validate(w,v,this.minDay,_.local.invalidMonth);return this.daysPerMonth[h.month()-1]+(h.month()===12&&this.leapYear(h.year())?1:0)},weekDay:function(w,v,h){return this.dayOfWeek(w,v,h)!==5},toJD:function(w,v,h){var s=this._validate(w,v,h,_.local.invalidDate);return w=s.year(),v=s.month(),w=w<=0?w+1:w,(h=s.day())+Math.ceil(29.5*(v-1))+354*(w-1)+Math.floor((3+11*w)/30)+this.jdEpoch-1},fromJD:function(w){w=Math.floor(w)+.5;var v=Math.floor((30*(w-this.jdEpoch)+10646)/10631);v=v<=0?v-1:v;var h=Math.min(12,Math.ceil((w-29-this.toJD(v,1,1))/29.5)+1),s=w-this.toJD(v,h,1)+1;return this.newDate(v,h,s)}}),_.calendars.islamic=i},88874:function(R,E,e){var _=e(63489),k=e(56131);function i(w){this.local=this.regionalOptions[w||""]||this.regionalOptions[""]}i.prototype=new _.baseCalendar,k(i.prototype,{name:"Julian",jdEpoch:17214235e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(w){var v=this._validate(w,this.minMonth,this.minDay,_.local.invalidYear);return(w=v.year()<0?v.year()+1:v.year())%4==0},weekOfYear:function(w,v,h){var s=this.newDate(w,v,h);return s.add(4-(s.dayOfWeek()||7),"d"),Math.floor((s.dayOfYear()-1)/7)+1},daysInMonth:function(w,v){var h=this._validate(w,v,this.minDay,_.local.invalidMonth);return this.daysPerMonth[h.month()-1]+(h.month()===2&&this.leapYear(h.year())?1:0)},weekDay:function(w,v,h){return(this.dayOfWeek(w,v,h)||7)<6},toJD:function(w,v,h){var s=this._validate(w,v,h,_.local.invalidDate);return w=s.year(),v=s.month(),h=s.day(),w<0&&w++,v<=2&&(w--,v+=12),Math.floor(365.25*(w+4716))+Math.floor(30.6001*(v+1))+h-1524.5},fromJD:function(w){var v=Math.floor(w+.5)+1524,h=Math.floor((v-122.1)/365.25),s=Math.floor(365.25*h),t=Math.floor((v-s)/30.6001),a=t-Math.floor(t<14?1:13),r=h-Math.floor(a>2?4716:4715),n=v-s-Math.floor(30.6001*t);return r<=0&&r--,this.newDate(r,a,n)}}),_.calendars.julian=i},83290:function(R,E,e){var _=e(63489),k=e(56131);function i(h){this.local=this.regionalOptions[h||""]||this.regionalOptions[""]}function w(h,s){return h-s*Math.floor(h/s)}function v(h,s){return w(h-1,s)+1}i.prototype=new _.baseCalendar,k(i.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(h){return this._validate(h,this.minMonth,this.minDay,_.local.invalidYear),!1},formatYear:function(h){h=this._validate(h,this.minMonth,this.minDay,_.local.invalidYear).year();var s=Math.floor(h/400);return h%=400,h+=h<0?400:0,s+"."+Math.floor(h/20)+"."+h%20},forYear:function(h){if((h=h.split(".")).length<3)throw"Invalid Mayan year";for(var s=0,t=0;t19||t>0&&a<0)throw"Invalid Mayan year";s=20*s+a}return s},monthsInYear:function(h){return this._validate(h,this.minMonth,this.minDay,_.local.invalidYear),18},weekOfYear:function(h,s,t){return this._validate(h,s,t,_.local.invalidDate),0},daysInYear:function(h){return this._validate(h,this.minMonth,this.minDay,_.local.invalidYear),360},daysInMonth:function(h,s){return this._validate(h,s,this.minDay,_.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(h,s,t){return this._validate(h,s,t,_.local.invalidDate).day()},weekDay:function(h,s,t){return this._validate(h,s,t,_.local.invalidDate),!0},extraInfo:function(h,s,t){var a=this._validate(h,s,t,_.local.invalidDate).toJD(),r=this._toHaab(a),n=this._toTzolkin(a);return{haabMonthName:this.local.haabMonths[r[0]-1],haabMonth:r[0],haabDay:r[1],tzolkinDayName:this.local.tzolkinMonths[n[0]-1],tzolkinDay:n[0],tzolkinTrecena:n[1]}},_toHaab:function(h){var s=w(8+(h-=this.jdEpoch)+340,365);return[Math.floor(s/20)+1,w(s,20)]},_toTzolkin:function(h){return[v(20+(h-=this.jdEpoch),20),v(h+4,13)]},toJD:function(h,s,t){var a=this._validate(h,s,t,_.local.invalidDate);return a.day()+20*a.month()+360*a.year()+this.jdEpoch},fromJD:function(h){h=Math.floor(h)+.5-this.jdEpoch;var s=Math.floor(h/360);h%=360,h+=h<0?360:0;var t=Math.floor(h/20),a=h%20;return this.newDate(s,t,a)}}),_.calendars.mayan=i},29108:function(R,E,e){var _=e(63489),k=e(56131);function i(v){this.local=this.regionalOptions[v||""]||this.regionalOptions[""]}i.prototype=new _.baseCalendar;var w=_.instance("gregorian");k(i.prototype,{name:"Nanakshahi",jdEpoch:22576735e-1,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(v){var h=this._validate(v,this.minMonth,this.minDay,_.local.invalidYear||_.regionalOptions[""].invalidYear);return w.leapYear(h.year()+(h.year()<1?1:0)+1469)},weekOfYear:function(v,h,s){var t=this.newDate(v,h,s);return t.add(1-(t.dayOfWeek()||7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(v,h){var s=this._validate(v,h,this.minDay,_.local.invalidMonth);return this.daysPerMonth[s.month()-1]+(s.month()===12&&this.leapYear(s.year())?1:0)},weekDay:function(v,h,s){return(this.dayOfWeek(v,h,s)||7)<6},toJD:function(v,h,s){var t=this._validate(v,h,s,_.local.invalidMonth);(v=t.year())<0&&v++;for(var a=t.day(),r=1;r=this.toJD(h+1,1,1);)h++;for(var s=v-Math.floor(this.toJD(h,1,1)+.5)+1,t=1;s>this.daysInMonth(h,t);)s-=this.daysInMonth(h,t),t++;return this.newDate(h,t,s)}}),_.calendars.nanakshahi=i},55422:function(R,E,e){var _=e(63489),k=e(56131);function i(w){this.local=this.regionalOptions[w||""]||this.regionalOptions[""]}i.prototype=new _.baseCalendar,k(i.prototype,{name:"Nepali",jdEpoch:17007095e-1,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(w){return this.daysInYear(w)!==this.daysPerYear},weekOfYear:function(w,v,h){var s=this.newDate(w,v,h);return s.add(-s.dayOfWeek(),"d"),Math.floor((s.dayOfYear()-1)/7)+1},daysInYear:function(w){if(w=this._validate(w,this.minMonth,this.minDay,_.local.invalidYear).year(),this.NEPALI_CALENDAR_DATA[w]===void 0)return this.daysPerYear;for(var v=0,h=this.minMonth;h<=12;h++)v+=this.NEPALI_CALENDAR_DATA[w][h];return v},daysInMonth:function(w,v){return w.year&&(v=w.month(),w=w.year()),this._validate(w,v,this.minDay,_.local.invalidMonth),this.NEPALI_CALENDAR_DATA[w]===void 0?this.daysPerMonth[v-1]:this.NEPALI_CALENDAR_DATA[w][v]},weekDay:function(w,v,h){return this.dayOfWeek(w,v,h)!==6},toJD:function(w,v,h){var s=this._validate(w,v,h,_.local.invalidDate);w=s.year(),v=s.month(),h=s.day();var t=_.instance(),a=0,r=v,n=w;this._createMissingCalendarData(w);var o=w-(r>9||r===9&&h>=this.NEPALI_CALENDAR_DATA[n][0]?56:57);for(v!==9&&(a=h,r--);r!==9;)r<=0&&(r=12,n--),a+=this.NEPALI_CALENDAR_DATA[n][r],r--;return v===9?(a+=h-this.NEPALI_CALENDAR_DATA[n][0])<0&&(a+=t.daysInYear(o)):a+=this.NEPALI_CALENDAR_DATA[n][9]-this.NEPALI_CALENDAR_DATA[n][0],t.newDate(o,1,1).add(a,"d").toJD()},fromJD:function(w){var v=_.instance().fromJD(w),h=v.year(),s=v.dayOfYear(),t=h+56;this._createMissingCalendarData(t);for(var a=9,r=this.NEPALI_CALENDAR_DATA[t][0],n=this.NEPALI_CALENDAR_DATA[t][a]-r+1;s>n;)++a>12&&(a=1,t++),n+=this.NEPALI_CALENDAR_DATA[t][a];var o=this.NEPALI_CALENDAR_DATA[t][a]-(n-s);return this.newDate(t,a,o)},_createMissingCalendarData:function(w){var v=this.daysPerMonth.slice(0);v.unshift(17);for(var h=w-1;h0?474:473))%2820+474+38)%2816<682},weekOfYear:function(v,h,s){var t=this.newDate(v,h,s);return t.add(-(t.dayOfWeek()+1)%7,"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(v,h){var s=this._validate(v,h,this.minDay,_.local.invalidMonth);return this.daysPerMonth[s.month()-1]+(s.month()===12&&this.leapYear(s.year())?1:0)},weekDay:function(v,h,s){return this.dayOfWeek(v,h,s)!==5},toJD:function(v,h,s){var t=this._validate(v,h,s,_.local.invalidDate);v=t.year(),h=t.month(),s=t.day();var a=v-(v>=0?474:473),r=474+w(a,2820);return s+(h<=7?31*(h-1):30*(h-1)+6)+Math.floor((682*r-110)/2816)+365*(r-1)+1029983*Math.floor(a/2820)+this.jdEpoch-1},fromJD:function(v){var h=(v=Math.floor(v)+.5)-this.toJD(475,1,1),s=Math.floor(h/1029983),t=w(h,1029983),a=2820;if(t!==1029982){var r=Math.floor(t/366),n=w(t,366);a=Math.floor((2134*r+2816*n+2815)/1028522)+r+1}var o=a+2820*s+474;o=o<=0?o-1:o;var l=v-this.toJD(o,1,1)+1,u=l<=186?Math.ceil(l/31):Math.ceil((l-6)/30),d=v-this.toJD(o,u,1)+1;return this.newDate(o,u,d)}}),_.calendars.persian=i,_.calendars.jalali=i},31320:function(R,E,e){var _=e(63489),k=e(56131),i=_.instance();function w(v){this.local=this.regionalOptions[v||""]||this.regionalOptions[""]}w.prototype=new _.baseCalendar,k(w.prototype,{name:"Taiwan",jdEpoch:24194025e-1,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(v){var h=this._validate(v,this.minMonth,this.minDay,_.local.invalidYear);return v=this._t2gYear(h.year()),i.leapYear(v)},weekOfYear:function(v,h,s){var t=this._validate(v,this.minMonth,this.minDay,_.local.invalidYear);return v=this._t2gYear(t.year()),i.weekOfYear(v,t.month(),t.day())},daysInMonth:function(v,h){var s=this._validate(v,h,this.minDay,_.local.invalidMonth);return this.daysPerMonth[s.month()-1]+(s.month()===2&&this.leapYear(s.year())?1:0)},weekDay:function(v,h,s){return(this.dayOfWeek(v,h,s)||7)<6},toJD:function(v,h,s){var t=this._validate(v,h,s,_.local.invalidDate);return v=this._t2gYear(t.year()),i.toJD(v,t.month(),t.day())},fromJD:function(v){var h=i.fromJD(v),s=this._g2tYear(h.year());return this.newDate(s,h.month(),h.day())},_t2gYear:function(v){return v+this.yearsOffset+(v>=-this.yearsOffset&&v<=-1?1:0)},_g2tYear:function(v){return v-this.yearsOffset-(v>=1&&v<=this.yearsOffset?1:0)}}),_.calendars.taiwan=w},51367:function(R,E,e){var _=e(63489),k=e(56131),i=_.instance();function w(v){this.local=this.regionalOptions[v||""]||this.regionalOptions[""]}w.prototype=new _.baseCalendar,k(w.prototype,{name:"Thai",jdEpoch:15230985e-1,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(v){var h=this._validate(v,this.minMonth,this.minDay,_.local.invalidYear);return v=this._t2gYear(h.year()),i.leapYear(v)},weekOfYear:function(v,h,s){var t=this._validate(v,this.minMonth,this.minDay,_.local.invalidYear);return v=this._t2gYear(t.year()),i.weekOfYear(v,t.month(),t.day())},daysInMonth:function(v,h){var s=this._validate(v,h,this.minDay,_.local.invalidMonth);return this.daysPerMonth[s.month()-1]+(s.month()===2&&this.leapYear(s.year())?1:0)},weekDay:function(v,h,s){return(this.dayOfWeek(v,h,s)||7)<6},toJD:function(v,h,s){var t=this._validate(v,h,s,_.local.invalidDate);return v=this._t2gYear(t.year()),i.toJD(v,t.month(),t.day())},fromJD:function(v){var h=i.fromJD(v),s=this._g2tYear(h.year());return this.newDate(s,h.month(),h.day())},_t2gYear:function(v){return v-this.yearsOffset-(v>=1&&v<=this.yearsOffset?1:0)},_g2tYear:function(v){return v+this.yearsOffset+(v>=-this.yearsOffset&&v<=-1?1:0)}}),_.calendars.thai=w},21457:function(R,E,e){var _=e(63489),k=e(56131);function i(v){this.local=this.regionalOptions[v||""]||this.regionalOptions[""]}i.prototype=new _.baseCalendar,k(i.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thalāthā’","Yawm al-Arba‘ā’","Yawm al-Khamīs","Yawm al-Jum‘a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(v){var h=this._validate(v,this.minMonth,this.minDay,_.local.invalidYear);return this.daysInYear(h.year())===355},weekOfYear:function(v,h,s){var t=this.newDate(v,h,s);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(v){for(var h=0,s=1;s<=12;s++)h+=this.daysInMonth(v,s);return h},daysInMonth:function(v,h){for(var s=this._validate(v,h,this.minDay,_.local.invalidMonth).toJD()-24e5+.5,t=0,a=0;as)return w[t]-w[t-1];t++}return 30},weekDay:function(v,h,s){return this.dayOfWeek(v,h,s)!==5},toJD:function(v,h,s){var t=this._validate(v,h,s,_.local.invalidDate),a=12*(t.year()-1)+t.month()-15292;return t.day()+w[a-1]-1+24e5-.5},fromJD:function(v){for(var h=v-24e5+.5,s=0,t=0;th);t++)s++;var a=s+15292,r=Math.floor((a-1)/12),n=r+1,o=a-12*r,l=h-w[s-1]+1;return this.newDate(n,o,l)},isValid:function(v,h,s){var t=_.baseCalendar.prototype.isValid.apply(this,arguments);return t&&(t=(v=v.year!=null?v.year:v)>=1276&&v<=1500),t},_validate:function(v,h,s,t){var a=_.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw t.replace(/\{0\}/,this.local.name);return a}}),_.calendars.ummalqura=i;var w=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]},63489:function(R,E,e){var _=e(56131);function k(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}function i(t,a,r,n){if(this._calendar=t,this._year=a,this._month=r,this._day=n,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(s.local.invalidDate||s.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function w(t,a){return"000000".substring(0,a-(t=""+t).length)+t}function v(){this.shortYearCutoff="+10"}function h(t){this.local=this.regionalOptions[t]||this.regionalOptions[""]}_(k.prototype,{instance:function(t,a){t=(t||"gregorian").toLowerCase(),a=a||"";var r=this._localCals[t+"-"+a];if(!r&&this.calendars[t]&&(r=new this.calendars[t](a),this._localCals[t+"-"+a]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,t);return r},newDate:function(t,a,r,n,o){return(n=(t!=null&&t.year?t.calendar():typeof n=="string"?this.instance(n,o):n)||this.instance()).newDate(t,a,r)},substituteDigits:function(t){return function(a){return(a+"").replace(/[0-9]/g,function(r){return t[r]})}},substituteChineseDigits:function(t,a){return function(r){for(var n="",o=0;r>0;){var l=r%10;n=(l===0?"":t[l]+a[o])+n,o++,r=Math.floor(r/10)}return n.indexOf(t[1]+a[1])===0&&(n=n.substr(1)),n||t[0]}}}),_(i.prototype,{newDate:function(t,a,r){return this._calendar.newDate(t??this,a,r)},year:function(t){return arguments.length===0?this._year:this.set(t,"y")},month:function(t){return arguments.length===0?this._month:this.set(t,"m")},day:function(t){return arguments.length===0?this._day:this.set(t,"d")},date:function(t,a,r){if(!this._calendar.isValid(t,a,r))throw(s.local.invalidDate||s.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=t,this._month=a,this._day=r,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(t,a){return this._calendar.add(this,t,a)},set:function(t,a){return this._calendar.set(this,t,a)},compareTo:function(t){if(this._calendar.name!==t._calendar.name)throw(s.local.differentCalendars||s.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,t._calendar.local.name);var a=this._year!==t._year?this._year-t._year:this._month!==t._month?this.monthOfYear()-t.monthOfYear():this._day-t._day;return a===0?0:a<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(t){return this._calendar.fromJD(t)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(t){return this._calendar.fromJSDate(t)},toString:function(){return(this.year()<0?"-":"")+w(Math.abs(this.year()),4)+"-"+w(this.month(),2)+"-"+w(this.day(),2)}}),_(v.prototype,{_validateLevel:0,newDate:function(t,a,r){return t==null?this.today():(t.year&&(this._validate(t,a,r,s.local.invalidDate||s.regionalOptions[""].invalidDate),r=t.day(),a=t.month(),t=t.year()),new i(this,t,a,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(t){return this._validate(t,this.minMonth,this.minDay,s.local.invalidYear||s.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(t){var a=this._validate(t,this.minMonth,this.minDay,s.local.invalidYear||s.regionalOptions[""].invalidYear);return(a.year()<0?"-":"")+w(Math.abs(a.year()),4)},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,s.local.invalidYear||s.regionalOptions[""].invalidYear),12},monthOfYear:function(t,a){var r=this._validate(t,a,this.minDay,s.local.invalidMonth||s.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(t,a){var r=(a+this.firstMonth-2*this.minMonth)%this.monthsInYear(t)+this.minMonth;return this._validate(t,r,this.minDay,s.local.invalidMonth||s.regionalOptions[""].invalidMonth),r},daysInYear:function(t){var a=this._validate(t,this.minMonth,this.minDay,s.local.invalidYear||s.regionalOptions[""].invalidYear);return this.leapYear(a)?366:365},dayOfYear:function(t,a,r){var n=this._validate(t,a,r,s.local.invalidDate||s.regionalOptions[""].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(t,a,r){var n=this._validate(t,a,r,s.local.invalidDate||s.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(t,a,r){return this._validate(t,a,r,s.local.invalidDate||s.regionalOptions[""].invalidDate),{}},add:function(t,a,r){return this._validate(t,this.minMonth,this.minDay,s.local.invalidDate||s.regionalOptions[""].invalidDate),this._correctAdd(t,this._add(t,a,r),a,r)},_add:function(t,a,r){if(this._validateLevel++,r==="d"||r==="w"){var n=t.toJD()+a*(r==="w"?this.daysInWeek():1),o=t.calendar().fromJD(n);return this._validateLevel--,[o.year(),o.month(),o.day()]}try{var l=t.year()+(r==="y"?a:0),u=t.monthOfYear()+(r==="m"?a:0);o=t.day(),r==="y"?(t.month()!==this.fromMonthOfYear(l,u)&&(u=this.newDate(l,t.month(),this.minDay).monthOfYear()),u=Math.min(u,this.monthsInYear(l)),o=Math.min(o,this.daysInMonth(l,this.fromMonthOfYear(l,u)))):r==="m"&&(function(c){for(;ub-1+c.minMonth;)l++,u-=b,b=c.monthsInYear(l)}(this),o=Math.min(o,this.daysInMonth(l,this.fromMonthOfYear(l,u))));var d=[l,this.fromMonthOfYear(l,u),o];return this._validateLevel--,d}catch(c){throw this._validateLevel--,c}},_correctAdd:function(t,a,r,n){if(!(this.hasYearZero||n!=="y"&&n!=="m"||a[0]!==0&&t.year()>0==a[0]>0)){var o={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],l=r<0?-1:1;a=this._add(t,r*o[0]+l*o[1],o[2])}return t.date(a[0],a[1],a[2])},set:function(t,a,r){this._validate(t,this.minMonth,this.minDay,s.local.invalidDate||s.regionalOptions[""].invalidDate);var n=r==="y"?a:t.year(),o=r==="m"?a:t.month(),l=r==="d"?a:t.day();return r!=="y"&&r!=="m"||(l=Math.min(l,this.daysInMonth(n,o))),t.date(n,o,l)},isValid:function(t,a,r){this._validateLevel++;var n=this.hasYearZero||t!==0;if(n){var o=this.newDate(t,a,this.minDay);n=a>=this.minMonth&&a-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),b=o-(c>2.5?4716:4715);return b<=0&&b--,this.newDate(b,c,d)},toJSDate:function(t,a,r){var n=this._validate(t,a,r,s.local.invalidDate||s.regionalOptions[""].invalidDate),o=new Date(n.year(),n.month()-1,n.day());return o.setHours(0),o.setMinutes(0),o.setSeconds(0),o.setMilliseconds(0),o.setHours(o.getHours()>12?o.getHours()+2:0),o},fromJSDate:function(t){return this.newDate(t.getFullYear(),t.getMonth()+1,t.getDate())}});var s=R.exports=new k;s.cdate=i,s.baseCalendar=v,s.calendars.gregorian=h},94338:function(R,E,e){var _=e(56131),k=e(63489);_(k.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),k.local=k.regionalOptions[""],_(k.cdate.prototype,{formatDate:function(i,w){return typeof i!="string"&&(w=i,i=""),this._calendar.formatDate(i||"",this,w)}}),_(k.baseCalendar.prototype,{UNIX_EPOCH:k.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:k.instance().jdEpoch,TICKS_PER_DAY:864e9,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(i,w,v){if(typeof i!="string"&&(v=w,w=i,i=""),!w)return"";if(w.calendar()!==this)throw k.local.invalidFormat||k.regionalOptions[""].invalidFormat;i=i||this.local.dateFormat;for(var h,s,t,a=(v=v||{}).dayNamesShort||this.local.dayNamesShort,r=v.dayNames||this.local.dayNames,n=v.monthNumbers||this.local.monthNumbers,o=v.monthNamesShort||this.local.monthNamesShort,l=v.monthNames||this.local.monthNames,u=(v.calculateWeek||this.local.calculateWeek,function(p,M){for(var A=1;T+A1}),d=function(p,M,A,C){var P=""+M;if(u(p,C))for(;P.length1},y=function(B,Y){var D=x(B,Y),G=[2,3,D?4:2,D?4:2,10,11,20]["oyYJ@!".indexOf(B)+1],U=new RegExp("^-?\\d{1,"+G+"}"),j=w.substring(C).match(U);if(!j)throw(k.local.missingNumberAt||k.regionalOptions[""].missingNumberAt).replace(/\{0\}/,C);return C+=j[0].length,parseInt(j[0],10)},m=this,T=function(){if(typeof r=="function"){x("m");var B=r.call(m,w.substring(C));return C+=B.length,B}return y("m")},p=function(B,Y,D,G){for(var U=x(B,G)?D:Y,j=0;j-1){d=1,c=b;for(var z=this.daysInMonth(u,d);c>z;z=this.daysInMonth(u,d))d++,c-=z}return l>-1?this.fromJD(l):this.newDate(u,d,c)},determineDate:function(i,w,v,h,s){v&&typeof v!="object"&&(s=h,h=v,v=null),typeof h!="string"&&(s=h,h="");var t=this;return w=w?w.newDate():null,i==null?w:typeof i=="string"?function(a){try{return t.parseDate(h,a,s)}catch{}for(var r=((a=a.toLowerCase()).match(/^c/)&&v?v.newDate():null)||t.today(),n=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,o=n.exec(a);o;)r.add(parseInt(o[1],10),o[2]||"d"),o=n.exec(a);return r}(i):typeof i=="number"?isNaN(i)||i===1/0||i===-1/0?w:t.today().add(i,"d"):t.newDate(i)}})},69862:function(){},40964:function(){},72077:function(R,E,e){var _=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],k=typeof globalThis>"u"?e.g:globalThis;R.exports=function(){for(var i=[],w=0;w<_.length;w++)typeof k[_[w]]=="function"&&(i[i.length]=_[w]);return i}},81684:function(R,E,e){function _(me,_e,Me){me.prototype=_e.prototype=Me,Me.constructor=me}function k(me,_e){var Me=Object.create(me.prototype);for(var we in _e)Me[we]=_e[we];return Me}function i(){}e.d(E,{sX:function(){return de},k4:function(){return te}});var w=.7,v=1/w,h="\\s*([+-]?\\d+)\\s*",s="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",t="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",a=/^#([0-9a-f]{3,8})$/,r=new RegExp("^rgb\\(".concat(h,",").concat(h,",").concat(h,"\\)$")),n=new RegExp("^rgb\\(".concat(t,",").concat(t,",").concat(t,"\\)$")),o=new RegExp("^rgba\\(".concat(h,",").concat(h,",").concat(h,",").concat(s,"\\)$")),l=new RegExp("^rgba\\(".concat(t,",").concat(t,",").concat(t,",").concat(s,"\\)$")),u=new RegExp("^hsl\\(".concat(s,",").concat(t,",").concat(t,"\\)$")),d=new RegExp("^hsla\\(".concat(s,",").concat(t,",").concat(t,",").concat(s,"\\)$")),c={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function b(){return this.rgb().formatHex()}function g(){return this.rgb().formatRgb()}function f(me){var _e,Me;return me=(me+"").trim().toLowerCase(),(_e=a.exec(me))?(Me=_e[1].length,_e=parseInt(_e[1],16),Me===6?x(_e):Me===3?new T(_e>>8&15|_e>>4&240,_e>>4&15|240&_e,(15&_e)<<4|15&_e,1):Me===8?y(_e>>24&255,_e>>16&255,_e>>8&255,(255&_e)/255):Me===4?y(_e>>12&15|_e>>8&240,_e>>8&15|_e>>4&240,_e>>4&15|240&_e,((15&_e)<<4|15&_e)/255):null):(_e=r.exec(me))?new T(_e[1],_e[2],_e[3],1):(_e=n.exec(me))?new T(255*_e[1]/100,255*_e[2]/100,255*_e[3]/100,1):(_e=o.exec(me))?y(_e[1],_e[2],_e[3],_e[4]):(_e=l.exec(me))?y(255*_e[1]/100,255*_e[2]/100,255*_e[3]/100,_e[4]):(_e=u.exec(me))?O(_e[1],_e[2]/100,_e[3]/100,1):(_e=d.exec(me))?O(_e[1],_e[2]/100,_e[3]/100,_e[4]):c.hasOwnProperty(me)?x(c[me]):me==="transparent"?new T(NaN,NaN,NaN,0):null}function x(me){return new T(me>>16&255,me>>8&255,255&me,1)}function y(me,_e,Me,we){return we<=0&&(me=_e=Me=NaN),new T(me,_e,Me,we)}function m(me,_e,Me,we){return arguments.length===1?((xe=me)instanceof i||(xe=f(xe)),xe?new T((xe=xe.rgb()).r,xe.g,xe.b,xe.opacity):new T):new T(me,_e,Me,we??1);var xe}function T(me,_e,Me,we){this.r=+me,this.g=+_e,this.b=+Me,this.opacity=+we}function p(){return"#".concat(P(this.r)).concat(P(this.g)).concat(P(this.b))}function M(){var me=A(this.opacity);return"".concat(me===1?"rgb(":"rgba(").concat(C(this.r),", ").concat(C(this.g),", ").concat(C(this.b)).concat(me===1?")":", ".concat(me,")"))}function A(me){return isNaN(me)?1:Math.max(0,Math.min(1,me))}function C(me){return Math.max(0,Math.min(255,Math.round(me)||0))}function P(me){return((me=C(me))<16?"0":"")+me.toString(16)}function O(me,_e,Me,we){return we<=0?me=_e=Me=NaN:Me<=0||Me>=1?me=_e=NaN:_e<=0&&(me=NaN),new B(me,_e,Me,we)}function z(me){if(me instanceof B)return new B(me.h,me.s,me.l,me.opacity);if(me instanceof i||(me=f(me)),!me)return new B;if(me instanceof B)return me;var _e=(me=me.rgb()).r/255,Me=me.g/255,we=me.b/255,xe=Math.min(_e,Me,we),De=Math.max(_e,Me,we),Ee=NaN,Se=De-xe,he=(De+xe)/2;return Se?(Ee=_e===De?(Me-we)/Se+6*(Me0&&he<1?0:Ee,new B(Ee,Se,he,me.opacity)}function B(me,_e,Me,we){this.h=+me,this.s=+_e,this.l=+Me,this.opacity=+we}function Y(me){return(me=(me||0)%360)<0?me+360:me}function D(me){return Math.max(0,Math.min(1,me||0))}function G(me,_e,Me){return 255*(me<60?_e+(Me-_e)*me/60:me<180?Me:me<240?_e+(Me-_e)*(240-me)/60:_e)}_(i,f,{copy:function(me){return Object.assign(new this.constructor,this,me)},displayable:function(){return this.rgb().displayable()},hex:b,formatHex:b,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return z(this).formatHsl()},formatRgb:g,toString:g}),_(T,m,k(i,{brighter:function(me){return me=me==null?v:Math.pow(v,me),new T(this.r*me,this.g*me,this.b*me,this.opacity)},darker:function(me){return me=me==null?w:Math.pow(w,me),new T(this.r*me,this.g*me,this.b*me,this.opacity)},rgb:function(){return this},clamp:function(){return new T(C(this.r),C(this.g),C(this.b),A(this.opacity))},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:p,formatHex:p,formatHex8:function(){return"#".concat(P(this.r)).concat(P(this.g)).concat(P(this.b)).concat(P(255*(isNaN(this.opacity)?1:this.opacity)))},formatRgb:M,toString:M})),_(B,function(me,_e,Me,we){return arguments.length===1?z(me):new B(me,_e,Me,we??1)},k(i,{brighter:function(me){return me=me==null?v:Math.pow(v,me),new B(this.h,this.s,this.l*me,this.opacity)},darker:function(me){return me=me==null?w:Math.pow(w,me),new B(this.h,this.s,this.l*me,this.opacity)},rgb:function(){var me=this.h%360+360*(this.h<0),_e=isNaN(me)||isNaN(this.s)?0:this.s,Me=this.l,we=Me+(Me<.5?Me:1-Me)*_e,xe=2*Me-we;return new T(G(me>=240?me-240:me+120,xe,we),G(me,xe,we),G(me<120?me+240:me-120,xe,we),this.opacity)},clamp:function(){return new B(Y(this.h),D(this.s),D(this.l),A(this.opacity))},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var me=A(this.opacity);return"".concat(me===1?"hsl(":"hsla(").concat(Y(this.h),", ").concat(100*D(this.s),"%, ").concat(100*D(this.l),"%").concat(me===1?")":", ".concat(me,")"))}}));var U=function(me){return function(){return me}};function j(me,_e){var Me=_e-me;return Me?function(we,xe){return function(De){return we+De*xe}}(me,Me):U(isNaN(me)?_e:me)}var W=function me(_e){var Me=function(xe){return(xe=+xe)==1?j:function(De,Ee){return Ee-De?function(Se,he,fe){return Se=Math.pow(Se,fe),he=Math.pow(he,fe)-Se,fe=1/fe,function(ae){return Math.pow(Se+ae*he,fe)}}(De,Ee,xe):U(isNaN(De)?Ee:De)}}(_e);function we(xe,De){var Ee=Me((xe=m(xe)).r,(De=m(De)).r),Se=Me(xe.g,De.g),he=Me(xe.b,De.b),fe=j(xe.opacity,De.opacity);return function(ae){return xe.r=Ee(ae),xe.g=Se(ae),xe.b=he(ae),xe.opacity=fe(ae),xe+""}}return we.gamma=me,we}(1);function Z(me,_e){var Me,we=_e?_e.length:0,xe=me?Math.min(we,me.length):0,De=new Array(xe),Ee=new Array(we);for(Me=0;MeDe&&(xe=_e.slice(De,xe),Se[Ee]?Se[Ee]+=xe:Se[++Ee]=xe),(Me=Me[0])===(we=we[0])?Se[Ee]?Se[Ee]+=we:Se[++Ee]=we:(Se[++Ee]=null,he.push({i:Ee,x:te(Me,we)})),De=re.lastIndex;return De<_e.length&&(xe=_e.slice(De),Se[Ee]?Se[Ee]+=xe:Se[++Ee]=xe),Se.length<2?he[0]?function(fe){return function(ae){return fe(ae)+""}}(he[0].x):function(fe){return function(){return fe}}(_e):(_e=he.length,function(fe){for(var ae,be=0;be<_e;++be)Se[(ae=he[be]).i]=ae.x(fe);return Se.join("")})}function ue(me,_e){_e||(_e=[]);var Me,we=me?Math.min(_e.length,me.length):0,xe=_e.slice();return function(De){for(Me=0;Me"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function a(u){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(c){return c.__proto__||Object.getPrototypeOf(c)},a(u)}var r=["AfterExport","AfterPlot","Animated","AnimatingFrame","AnimationInterrupted","AutoSize","BeforeExport","BeforeHover","ButtonClicked","Click","ClickAnnotation","Deselect","DoubleClick","Framework","Hover","LegendClick","LegendDoubleClick","Relayout","Relayouting","Restyle","Redraw","Selected","Selecting","SliderChange","SliderEnd","SliderStart","SunburstClick","Transitioning","TransitionInterrupted","Unhover","WebGlContextLost"],n=["plotly_restyle","plotly_redraw","plotly_relayout","plotly_relayouting","plotly_doubleclick","plotly_animated","plotly_sunburstclick"],o=typeof window<"u";function l(u){var d=function(c){i(g,c);var b=v(g);function g(f){var x;return e(this,g),x=b.call(this,f),x.p=Promise.resolve(),x.resizeHandler=null,x.handlers={},x.syncWindowResize=x.syncWindowResize.bind(s(x)),x.syncEventHandlers=x.syncEventHandlers.bind(s(x)),x.attachUpdateEvents=x.attachUpdateEvents.bind(s(x)),x.getRef=x.getRef.bind(s(x)),x.handleUpdate=x.handleUpdate.bind(s(x)),x.figureCallback=x.figureCallback.bind(s(x)),x.updatePlotly=x.updatePlotly.bind(s(x)),x}return k(g,[{key:"updatePlotly",value:function(x,y,m){var T=this;this.p=this.p.then(function(){if(!T.unmounting){if(!T.el)throw new Error("Missing element reference");return u.react(T.el,{data:T.props.data,layout:T.props.layout,config:T.props.config,frames:T.props.frames})}}).then(function(){T.unmounting||(T.syncWindowResize(x),T.syncEventHandlers(),T.figureCallback(y),m&&T.attachUpdateEvents())}).catch(function(p){T.props.onError&&T.props.onError(p)})}},{key:"componentDidMount",value:function(){this.unmounting=!1,this.updatePlotly(!0,this.props.onInitialized,!0)}},{key:"componentDidUpdate",value:function(x){this.unmounting=!1;var y=x.frames&&x.frames.length?x.frames.length:0,m=this.props.frames&&this.props.frames.length?this.props.frames.length:0,T=!(x.layout===this.props.layout&&x.data===this.props.data&&x.config===this.props.config&&m===y),p=x.revision!==void 0,M=x.revision!==this.props.revision;!T&&(!p||p&&!M)||this.updatePlotly(!1,this.props.onUpdate,!1)}},{key:"componentWillUnmount",value:function(){this.unmounting=!0,this.figureCallback(this.props.onPurge),this.resizeHandler&&o&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null),this.removeUpdateEvents(),u.purge(this.el)}},{key:"attachUpdateEvents",value:function(){var x=this;!this.el||!this.el.removeListener||n.forEach(function(y){x.el.on(y,x.handleUpdate)})}},{key:"removeUpdateEvents",value:function(){var x=this;!this.el||!this.el.removeListener||n.forEach(function(y){x.el.removeListener(y,x.handleUpdate)})}},{key:"handleUpdate",value:function(){this.figureCallback(this.props.onUpdate)}},{key:"figureCallback",value:function(x){if(typeof x=="function"){var y=this.el,m=y.data,T=y.layout,p=this.el._transitionData?this.el._transitionData._frames:null,M={data:m,layout:T,frames:p};x(M,this.el)}}},{key:"syncWindowResize",value:function(x){var y=this;o&&(this.props.useResizeHandler&&!this.resizeHandler?(this.resizeHandler=function(){return u.Plots.resize(y.el)},window.addEventListener("resize",this.resizeHandler),x&&this.resizeHandler()):!this.props.useResizeHandler&&this.resizeHandler&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null))}},{key:"getRef",value:function(x){this.el=x,this.props.debug&&o&&(window.gd=this.el)}},{key:"syncEventHandlers",value:function(){var x=this;r.forEach(function(y){var m=x.props["on"+y],T=x.handlers[y],p=!!T;m&&!p?x.addEventHandler(y,m):!m&&p?x.removeEventHandler(y):m&&p&&m!==T&&(x.removeEventHandler(y),x.addEventHandler(y,m))})}},{key:"addEventHandler",value:function(x,y){this.handlers[x]=y,this.el.on(this.getPlotlyEventName(x),this.handlers[x])}},{key:"removeEventHandler",value:function(x){this.el.removeListener(this.getPlotlyEventName(x),this.handlers[x]),delete this.handlers[x]}},{key:"getPlotlyEventName",value:function(x){return"plotly_"+x.toLowerCase()}},{key:"render",value:function(){return K.default.createElement("div",{id:this.props.divId,style:this.props.style,ref:this.getRef,className:this.props.className})}}]),g}(K.Component);return d.propTypes={data:se.default.arrayOf(se.default.object),config:se.default.object,layout:se.default.object,frames:se.default.arrayOf(se.default.object),revision:se.default.number,onInitialized:se.default.func,onPurge:se.default.func,onError:se.default.func,onUpdate:se.default.func,debug:se.default.bool,style:se.default.object,className:se.default.string,useResizeHandler:se.default.bool,divId:se.default.string},r.forEach(function(c){d.propTypes["on"+c]=se.default.func}),d.defaultProps={debug:!1,useResizeHandler:!1,data:[],style:{position:"relative",display:"inline-block"}},d}})(o5);const c7=ud(o5);function f7({plotData:L,popup_data:I,current_text:K}){var _;let se=I.x,Pe=I.y,R=I.yref,E=((_=L==null?void 0:L.layout)==null?void 0:_.annotations)||[],e=-1;for(let k=0;kx!=null)),L.layout.dragmode="pan",K({...L,...l.update}),i.removeAllListeners("plotly_click")};I.text=I.text.replace(/\n/g,"
");let v,h=!1;if(I.annotation){console.log("data",I),v={x:I.annotation.x,y:I.annotation.y,yref:I.annotation.yref,yanchor:I.annotation.ya.x==I.annotation.x&&a.y==I.annotation.y&&a.yref==I.annotation.yref);console.log("ohlcAnnotationIndex",t),t==-1?_([...e,s.annotation]):(e[t]=s.annotation,_(e))}R([...k,s.annotation].filter(t=>t!=null)),L.layout.dragmode="pan",K({...L,...s.update}),Pe({});return}i.on("plotly_clickannotation",s=>{console.log("plotly_clickannotation",s);let t=s.annotation;if(t.text==null){console.log("annotation.text is undefined");return}console.log("annotation.text",t.text),t.text=t.text.replace(/
/g,` +`);let a={x:t.x,y:t.y,high:(t==null?void 0:t.high)??void 0,low:(t==null?void 0:t.low)??void 0,yanchor:t.y"u"?e.impl.options.imagePlaceholder=E.imagePlaceholder:e.impl.options.imagePlaceholder=c.imagePlaceholder,typeof c.cacheBust>"u"?e.impl.options.cacheBust=E.cacheBust:e.impl.options.cacheBust=c.cacheBust}function s(c,b){return _(c,b).then(K.makeImage).then(K.delay(100)).then(function(f){var x=g(c);return x.getContext("2d").drawImage(f,0,0),x});function g(f){var x=document.createElement("canvas");if(x.width=b.width||K.width(f),x.height=b.height||K.height(f),b.bgcolor){var y=x.getContext("2d");y.fillStyle=b.bgcolor,y.fillRect(0,0,x.width,x.height)}return x}}function t(c,b,g){if(!g&&b&&!b(c))return Promise.resolve();return Promise.resolve(c).then(f).then(function(m){return x(c,m,b)}).then(function(m){return y(c,m)});function f(m){return m instanceof HTMLCanvasElement?K.makeImage(m.toDataURL()):m.cloneNode(!1)}function x(m,T,p){var M=m.childNodes;if(M.length===0)return Promise.resolve(T);return A(T,K.asArray(M),p).then(function(){return T});function A(C,P,O){var z=Promise.resolve();return P.forEach(function(B){z=z.then(function(){return t(B,O)}).then(function(Y){Y&&C.appendChild(Y)})}),z}}function y(m,T){if(!(T instanceof Element))return T;return Promise.resolve().then(p).then(M).then(A).then(C).then(function(){return T});function p(){P(window.getComputedStyle(m),T.style);function P(O,z){O.cssText?z.cssText=O.cssText:B(O,z);function B(Y,D){K.asArray(Y).forEach(function(G){D.setProperty(G,Y.getPropertyValue(G),Y.getPropertyPriority(G))})}}}function M(){[":before",":after"].forEach(function(O){P(O)});function P(O){var z=window.getComputedStyle(m,O),B=z.getPropertyValue("content");if(B===""||B==="none")return;var Y=K.uid();T.className=T.className+" "+Y;var D=document.createElement("style");D.appendChild(G(Y,O,z)),T.appendChild(D);function G(U,j,W){var Z="."+U+":"+j,ie=W.cssText?te(W):J(W);return document.createTextNode(Z+"{"+ie+"}");function te(X){var ee=X.getPropertyValue("content");return X.cssText+" content: "+ee+";"}function J(X){return K.asArray(X).map(ee).join("; ")+";";function ee(re){return re+": "+X.getPropertyValue(re)+(X.getPropertyPriority(re)?" !important":"")}}}}}function A(){m instanceof HTMLTextAreaElement&&(T.innerHTML=m.value),m instanceof HTMLInputElement&&T.setAttribute("value",m.value)}function C(){T instanceof SVGElement&&(T.setAttribute("xmlns","http://www.w3.org/2000/svg"),T instanceof SVGRectElement&&["width","height"].forEach(function(P){var O=T.getAttribute(P);O&&T.style.setProperty(P,O)}))}}}function a(c){return Pe.resolveAll().then(function(b){var g=document.createElement("style");return c.appendChild(g),g.appendChild(document.createTextNode(b)),c})}function r(c){return R.inlineAll(c).then(function(){return c})}function n(c,b,g){return Promise.resolve(c).then(function(f){return f.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),new XMLSerializer().serializeToString(f)}).then(K.escapeXhtml).then(function(f){return''+f+""}).then(function(f){return''+f+""}).then(function(f){return"data:image/svg+xml;charset=utf-8,"+f})}function o(){return{escape:C,parseExtension:b,mimeType:g,dataAsUrl:A,isDataUrl:f,canvasToBlob:y,resolveUrl:m,getAndEncode:M,uid:T(),delay:P,asArray:O,escapeXhtml:z,makeImage:p,width:B,height:Y};function c(){var G="application/font-woff",U="image/jpeg";return{woff:G,woff2:G,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:U,jpeg:U,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"}}function b(G){var U=/\.([^\.\/]*?)$/g.exec(G);return U?U[1]:""}function g(G){var U=b(G).toLowerCase();return c()[U]||""}function f(G){return G.search(/^(data:)/)!==-1}function x(G){return new Promise(function(U){for(var j=window.atob(G.toDataURL().split(",")[1]),W=j.length,Z=new Uint8Array(W),ie=0;ie{if(L)return g7({fileHandle:L,blob:I})},g7=async({fileHandle:L,blob:I})=>{const K=await L.createWritable();await K.write(I),await K.close()},v7=[{description:"PNG Image",accept:{"image/png":[".png"]}},{description:"JPEG Image",accept:{"image/jpeg":[".jpeg"]}},{description:"SVG Image",accept:{"image/svg+xml":[".svg"]}}],h5=({filename:L,is_image:I})=>{try{if("showSaveFilePicker"in window){const K={suggestedName:L,types:I?v7:[{description:"CSV File",accept:{"image/csv":[".csv"]}}],excludeAcceptAllOption:!0};return showSaveFilePicker(K)}}catch(K){console.error(K)}return new Promise(K=>{K(null)})},Iy=(L,I,K)=>{try{if(K===null)throw new Error("Cannot access filesystem");return d7({fileHandle:K,blob:L})}catch(se){console.error("oops, something went wrong!",se);const Pe=URL.createObjectURL(L),R=document.createElement("a");R.setAttribute("href",Pe),R.setAttribute("download",I),R.style.visibility="hidden",document.body.appendChild(R),R.click(),document.body.removeChild(R)}return new Promise(se=>{se(!0)})};async function Jb(L,I){const K=L.data;let se=[];const Pe=[],R="title"in L.layout.xaxis&&L.layout.xaxis.title.text!==void 0?L.layout.xaxis.title.text:"x",E="title"in L.layout.yaxis&&L.layout.yaxis.title.text!==void 0?L.layout.yaxis.title.text:"y";return K.forEach(function(e){e.type==="candlestick"&&(se.length===0&&(se=["Date","Open","High","Low","Close"]),e.x.forEach(function(_,k){Pe.push([_,e.open[k],e.high[k],e.low[k],e.close[k]])})),["scatter","bar"].includes(e.type)&&(se.length===0&&se.push(R),se.push(e.name!==void 0?e.name:E),e.x.forEach(function(_,k){Pe[k]===void 0&&(Pe[k]=[_]),Pe[k].push(e.y[k])}))}),await m7(se,Pe,I)}async function m7(L,I,K){const se=L,Pe=I.map(k=>k.map(i=>i==null?"":typeof i=="object"?JSON.stringify(i):i.toString().replace(/"/g,'""'))),E=[se,...Pe].map(k=>k.join(",")).join(` +`),e=new Blob([E],{type:"text/csv;charset=utf-8;"}),_=`${window.title}.csv`;try{const k=await h5({filename:_});await sd("Saving CSV"),Eh(async function(){Iy(e,_,k).then(async function(){await new Promise(i=>setTimeout(i,1500)),k||K(!0),await sd("",!0)})},2)()}catch(k){console.error(k)}}function sd(L,I){const K=window.document.getElementById("loading"),se=window.document.getElementById("loading_text");return new Promise(Pe=>{I?K.classList.remove("show"):(se.innerHTML=L,K.classList.add("show"));const R=setInterval(function(){(I?!K.classList.contains("show"):K.classList.contains("show"))&&(clearInterval(R),Pe(!0))},.01)})}const Eh=(L,I)=>{let K;return function(){const se=this,Pe=arguments;clearTimeout(K),K=setTimeout(()=>L.apply(se,Pe),I)}},y7={yref:"paper",xref:"paper",x:1,y:0,text:"OpenBB Terminal",font_size:17,font_color:"gray",opacity:.5,xanchor:"right",yanchor:"bottom",yshift:-80,xshift:40};async function Qb(L,I,K=!1){const se=document.getElementById("plotlyChart");K&&(se.layout.annotations.push(y7),se.globals.cmd_idx!==void 0&&se.globals.cmd_src!==void 0&&(se.layout.annotations[se.globals.cmd_idx].text=se.globals.cmd_src),ds.relayout(se,{"title.text":se.globals.title,margin:se.globals.old_margin})),K||(se.globals.cmd_idx!==void 0&&se.globals.cmd_src!==void 0&&(se.layout.annotations[se.globals.cmd_idx].text=""),se.layout.annotations.splice(I,1),ds.relayout(se,{"title.text":"",margin:L}))}async function p5(L,I,K){const se=document.getElementById(L);if(["svg","pdf"].includes(K)){const Pe=document.getElementById("plotlyChart"),R=Pe.layout.margin,E=Pe.layout.annotations.length;await Qb(R,E,!0),ds.downloadImage(Pe,{format:"svg",height:Pe.clientHeight,width:Pe.clientWidth,filename:window.title}),await Qb(R,E,!1),await sd("",!0);return}Eh(async function(){f5.toBlob(se).then(function(Pe){Iy(Pe,I,null)})},2)()}async function e_(L,I,K,se){const Pe=document.getElementById(L),R=`${window.title}.png`;try{K(!0);const E=await h5({filename:R,is_image:!0});let e="png";if(E!==null&&(e=E.name.split(".").pop()),await sd(`Saving ${e.toUpperCase()}`),["svg","pdf"].includes(e)){await p5(L,R,e),I(!1),K(!1),E||se(!0);return}Eh(async function(){f5.toBlob(Pe).then(function(_){Iy(_,R,E).then(async function(){await sd("",!0),I(!1),K(!1),E||se(!0)})})},2)()}catch(E){console.error(E),I(!1),K(!1)}K(!1)}async function t_(L,I){try{if(L["xaxis.range[0]"]!==void 0){const K=L["xaxis.range[0]"],se=L["xaxis.range[1]"],Pe={},R=[];let E,e;const _=I.data.filter(w=>w.yaxis!==void 0),k=[...new Set(_.map(w=>w.yaxis||w.y!==void 0||w.type==="candlestick"))],i=w=>I.data.filter(v=>v.yaxis===w&&(v.y||v.type==="candlestick"));return k.forEach(w=>{if(typeof w!="string")return;const v=`yaxis${w.replace("y","")}`;let h=[],s=[],t=I.layout[v].type==="log";i(w).forEach(n=>{const o=n.x;t=I.layout[v].type==="log";let l=n.y!==void 0?n.y:[],u=n.type==="candlestick"?n.low:[],d=n.type==="candlestick"?n.high:[];t&&(l=l.map(Math.log10),n.type==="candlestick"&&(u=n.low.map(Math.log10),d=n.high.map(Math.log10)));const c=o.map((b,g)=>{let f=null;return b>=K&&b<=se&&(n.y!==void 0&&(f=l[g]),n.type==="candlestick"&&(h.push(u[g]),h.push(d[g]))),f});s=s.concat(c)}),s=s.filter(n=>n!=null),E=Math.min(...s),e=Math.max(...s),h.length>0&&(h=h.filter(n=>n!=null),E=Math.min(...h),e=Math.max(...h));const a=e,r=I.layout[v].fixedrange!==void 0&&v!=="yaxis"&&I.layout[v].fixedrange===!0;if(E!==void 0&&e!==void 0){const n=e-E;let o=.15;if(h.length>0&&(o=.3),E-=n*o,e+=n*o,r){if(I.layout[v].tickvals!==void 0){const u=a;let d=-3,c=Math.round(u*.2,d);const b=[2,5,6,7,8,9,10],g=[1,4,5,6,7,8,9];for(let y=0;yb[y]&&(d=-g[y],c=Math.round(u*.2,d));const f=[Math.floor(c),Math.floor(c*2),Math.floor(c*3),Math.floor(c*4)],x=[0,Math.floor(u*7)];Pe[`${v}.tickvals`]=f,Pe[`${v}.range`]=x,Pe[`${v}.tickformat`]=".2s";return}E=0,e=I.layout[v].range[1]}Pe[`${v}.range`]=[E,e],Pe[`${v}.fixedrange`]=!0,R.push(v)}}),{to_update:Pe,yaxis_fixedrange:R}}}catch(K){console.log(`Error in AutoScaling: ${K}`)}return{to_update:{},yaxis_fixedrange:[]}}function x7({open:L,onColorChange:I}){const[K,se]=In.useState(!1);function Pe(R){I(R)}return L&&!K&&se(!0),!L&&K&&se(!1),In.useEffect(()=>{if(K){let R=function(e){let _=0,k=0,i=0,w=0;document.getElementById(e.id+"_header")?document.getElementById(e.id+"_header").onmousedown=v:e.onmousedown=v;function v(t){t=t||window.event,t.preventDefault(),i=t.clientX,w=t.clientY,document.onmouseup=s,document.onmousemove=h}function h(t){t=t||window.event,t.preventDefault(),_=i-t.clientX,k=w-t.clientY,i=t.clientX,w=t.clientY,e.style.top=e.offsetTop-k+"px",e.style.left=e.offsetLeft-_+"px"}function s(){document.onmouseup=null,document.onmousemove=null}},E=document.getElementById("changecolor");E.style.display="block",E.style.width=null,R(E)}else document.getElementById("changecolor").style.display="none"},[K]),hr("div",{id:"changecolor",children:hr("div",{id:"changecolor_header",children:hr("input",{type:"color",id:"picked_color",value:"#00ACFF",onChange:R=>{let E=R.target.value;Pe(E)}})})})}const Wu={sunIcon:{viewBox:"0 0 16 16",width:16,height:16,path:"M8 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0zm0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13zm8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5zM3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8zm10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0zm-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0zm9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707zM4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708z"},moonIcon:{viewBox:"0 0 25 25",width:25,height:25,path:"M21.752 15.002A9.718 9.718 0 0118 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 003 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 009.002-5.998z"},plotCsv:{width:900,height:900,path:"M170.666667 106.666667l0.192 736H906.666667v64H149.546667c-23.552 0-42.666667-19.093333-42.666667-42.666667L106.666667 106.666667h64z m686.506666 454.144l13.653334 16.362666a21.333333 21.333333 0 0 1-2.666667 30.058667l-171.157333 143.146667a21.333333 21.333333 0 0 1-21.546667 3.477333l-229.973333-91.285333-113.834667 94.997333a21.333333 21.333333 0 0 1-30.037333-2.709333l-13.653334-16.362667a21.333333 21.333333 0 0 1 2.688-30.058667l133.312-111.274666a21.333333 21.333333 0 0 1 21.546667-3.456l229.930667 91.264 151.68-126.826667a21.333333 21.333333 0 0 1 30.037333 2.666667z m-1.621333-417.962667l16.896 13.013333a21.333333 21.333333 0 0 1 3.925333 29.888L685.802667 433.706667a21.333333 21.333333 0 0 1-20.202667 8.085333l-226.794667-35.413333-150.186666 222.357333a21.333333 21.333333 0 0 1-27.477334 7.018667l-2.133333-1.28-17.685333-11.946667a21.333333 21.333333 0 0 1-5.738667-29.610667l165.354667-244.821333a21.333333 21.333333 0 0 1 20.992-9.130667L650.453333 374.613333l175.146667-227.882666a21.333333 21.333333 0 0 1 29.930667-3.904z"},addText:{path:"M896 928H128a32 32 0 0 1-32-32V128a32 32 0 0 1 32-32h768a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32z m-736-64h704v-704h-704z M704 352H320a32 32 0 0 1 0-64h384a32 32 0 0 1 0 64z M512 736a32 32 0 0 1-32-32V320a32 32 0 0 1 64 0v384a32 32 0 0 1-32 32z",width:950,height:950},changeTitle:{path:"M122.368 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384h-778.24c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H136.704c-26.112 0-47.104 20.992-47.104 47.104v688.128z M244.736 656.896h534.016v62.464H244.736z M373.76 358.4H307.2v219.136h-45.568V358.4H192v-41.472H373.76V358.4zM403.968 316.928h44.032v50.176h-44.032v-50.176z m0 67.072h44.032v194.048h-44.032V384zM576.512 541.184l8.704 31.744c-13.312 5.12-26.624 8.192-38.912 8.704-32.768 1.024-48.64-15.36-48.128-48.128V422.912h-26.624V384h26.624v-46.592l44.032-21.504V384h36.352v38.912h-36.352V532.48c-1.024 10.24 3.072 14.848 11.264 13.824 5.12 0 12.8-1.536 23.04-5.12zM619.008 316.928h44.032v260.608h-44.032V316.928zM813.056 509.952l41.472 12.8c-11.776 40.96-37.888 61.44-78.336 60.416-52.736-1.536-80.384-34.304-81.92-98.304 2.56-67.072 29.696-102.4 81.92-105.984 52.224 1.536 78.336 36.864 79.36 105.984v13.824h-117.248c3.584 30.208 15.872 45.568 37.888 46.592 19.968 0.512 32.256-11.264 36.864-35.328z m-72.704-51.712h70.656c-1.024-25.088-12.288-38.4-33.792-38.912-21.504 0.512-33.792 13.824-36.864 38.912z",width:920,height:900},changeColor:{path:"M8 3C5.79 3 4 4.79 4 7V14C4 15.1 4.9 16 6 16H9V20C9 21.1 9.9 22 11 22H13C14.1 22 15 21.1 15 20V16H18C19.1 16 20 15.1 20 14V3H8M8 5H12V7H14V5H15V9H17V5H18V10H6V7C6 5.9 6.9 5 8 5M6 14V12H18V14H6Z",width:22,height:22},uploadImage:{path:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5m-13.5-9L12 3m0 0l4.5 4.5M12 3v13.5",width:1024,height:1024},downloadCsv:{path:`M486.2,196.121h-13.164V132.59c0-0.399-0.064-0.795-0.116-1.2c-0.021-2.52-0.824-5-2.551-6.96L364.656,3.677 c-0.031-0.034-0.064-0.044-0.085-0.075c-0.629-0.707-1.364-1.292-2.141-1.796c-0.231-0.157-0.462-0.286-0.704-0.419 c-0.672-0.365-1.386-0.672-2.121-0.893c-0.199-0.052-0.377-0.134-0.576-0.188C358.229,0.118,357.4,0,356.562,0H96.757 C84.893,0,75.256,9.649,75.256,21.502v174.613H62.093c-16.972,0-30.733,13.756-30.733,30.73v159.81 @@ -3653,8 +3656,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho c0,32.158,19.051,52.4,51.456,52.4c10.947,0,23.097-2.378,30.241-5.238l5.483,28.346c-6.672,3.34-21.674,6.919-41.208,6.919 C98.06,382.976,69.474,348.424,69.474,302.692z M451.534,520.962H96.757v-103.57h354.777V520.962z M427.518,380.583h-42.399 l-51.45-160.536h39.787l19.526,67.894c5.479,19.046,10.479,37.386,14.299,57.397h0.709c4.048-19.298,9.045-38.352,14.526-56.693 - l20.487-68.598h38.599L427.518,380.583z`,width:550,height:550,transform:"translate(4, 0)"},downloadImage:{path:"M22.71,6.29a1,1,0,0,0-1.42,0L20,7.59V2a1,1,0,0,0-2,0V7.59l-1.29-1.3a1,1,0,0,0-1.42,1.42l3,3a1,1,0,0,0,.33.21.94.94,0,0,0,.76,0,1,1,0,0,0,.33-.21l3-3A1,1,0,0,0,22.71,6.29ZM19,13a1,1,0,0,0-1,1v.38L16.52,12.9a2.79,2.79,0,0,0-3.93,0l-.7.7L9.41,11.12a2.85,2.85,0,0,0-3.93,0L4,12.6V7A1,1,0,0,1,5,6h8a1,1,0,0,0,0-2H5A3,3,0,0,0,2,7V19a3,3,0,0,0,3,3H17a3,3,0,0,0,3-3V14A1,1,0,0,0,19,13ZM5,20a1,1,0,0,1-1-1V15.43l2.9-2.9a.79.79,0,0,1,1.09,0l3.17,3.17,0,0L15.46,20Zm13-1a.89.89,0,0,1-.18.53L13.31,15l.7-.7a.77.77,0,0,1,1.1,0L18,17.21Z",width:21,height:21,transform:"translate(-2, -2)"}},c7={data:{candlestick:[{decreasing:{fillcolor:"#e4003a",line:{color:"#e4003a"}},increasing:{fillcolor:"#00ACFF",line:{color:"#00ACFF"}},type:"candlestick"}]},layout:{annotationdefaults:{showarrow:!1},autotypenumbers:"strict",colorway:["#ffed00","#ef7d00","#e4003a","#c13246","#822661","#48277c","#005ca9","#00aaff","#9b30d9","#af005f","#5f00af","#af87ff"],dragmode:"pan",font:{family:"Fira Code",size:18},hoverlabel:{align:"left"},mapbox:{style:"dark"},hovermode:"x",legend:{bgcolor:"rgba(0, 0, 0, 0)",x:.01,xanchor:"left",y:.99,yanchor:"top",font:{size:15}},paper_bgcolor:"#000000",plot_bgcolor:"#000000",xaxis:{automargin:!0,autorange:!0,rangeslider:{visible:!1},showgrid:!0,showline:!0,tickfont:{size:14},zeroline:!1,tick0:1,title:{standoff:20},linecolor:"#F5EFF3",mirror:!0,ticks:"outside"},yaxis:{anchor:"x",automargin:!0,fixedrange:!1,zeroline:!1,showgrid:!0,showline:!0,side:"right",tick0:.5,title:{standoff:20},gridcolor:"#283442",linecolor:"#F5EFF3",mirror:!0,ticks:"outside"}}},f7={data:{barpolar:[{marker:{line:{color:"white",width:.5},pattern:{fillmode:"overlay",size:10,solidity:.2}},type:"barpolar"}],bar:[{error_x:{color:"#2a3f5f"},error_y:{color:"#2a3f5f"},marker:{line:{color:"white",width:.5},pattern:{fillmode:"overlay",size:10,solidity:.2}},type:"bar"}],carpet:[{aaxis:{endlinecolor:"#2a3f5f",gridcolor:"#C8D4E3",linecolor:"#C8D4E3",minorgridcolor:"#C8D4E3",startlinecolor:"#2a3f5f"},baxis:{endlinecolor:"#2a3f5f",gridcolor:"#C8D4E3",linecolor:"#C8D4E3",minorgridcolor:"#C8D4E3",startlinecolor:"#2a3f5f"},type:"carpet"}],choropleth:[{colorbar:{outlinewidth:0,ticks:""},type:"choropleth"}],contourcarpet:[{colorbar:{outlinewidth:0,ticks:""},type:"contourcarpet"}],contour:[{colorbar:{outlinewidth:0,ticks:""},colorscale:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],type:"contour"}],heatmapgl:[{colorbar:{outlinewidth:0,ticks:""},colorscale:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],type:"heatmapgl"}],heatmap:[{colorbar:{outlinewidth:0,ticks:""},colorscale:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],type:"heatmap"}],histogram2dcontour:[{colorbar:{outlinewidth:0,ticks:""},colorscale:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],type:"histogram2dcontour"}],histogram2d:[{colorbar:{outlinewidth:0,ticks:""},colorscale:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],type:"histogram2d"}],histogram:[{marker:{pattern:{fillmode:"overlay",size:10,solidity:.2}},type:"histogram"}],mesh3d:[{colorbar:{outlinewidth:0,ticks:""},type:"mesh3d"}],parcoords:[{line:{colorbar:{outlinewidth:0,ticks:""}},type:"parcoords"}],pie:[{automargin:!0,type:"pie"}],scatter3d:[{line:{colorbar:{outlinewidth:0,ticks:""}},marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scatter3d"}],scattercarpet:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scattercarpet"}],scattergeo:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scattergeo"}],scattergl:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scattergl"}],scattermapbox:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scattermapbox"}],scatterpolargl:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scatterpolargl"}],scatterpolar:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scatterpolar"}],scatter:[{fillpattern:{fillmode:"overlay",size:10,solidity:.2},type:"scatter"}],scatterternary:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scatterternary"}],surface:[{colorbar:{outlinewidth:0,ticks:""},colorscale:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],type:"surface"}],table:[{cells:{fill:{color:"#EBF0F8"},line:{color:"white"}},header:{fill:{color:"#C8D4E3"},line:{color:"white"}},type:"table"}],candlestick:[{decreasing:{fillcolor:"#c80000",line:{color:"#990000"}},increasing:{fillcolor:"#009600",line:{color:"#007500"}},type:"candlestick"}]},layout:{annotationdefaults:{arrowcolor:"#2a3f5f",arrowhead:0,arrowwidth:1,showarrow:!1},autotypenumbers:"strict",coloraxis:{colorbar:{outlinewidth:0,ticks:""}},colorscale:{diverging:[[0,"#8e0152"],[.1,"#c51b7d"],[.2,"#de77ae"],[.3,"#f1b6da"],[.4,"#fde0ef"],[.5,"#f7f7f7"],[.6,"#e6f5d0"],[.7,"#b8e186"],[.8,"#7fbc41"],[.9,"#4d9221"],[1,"#276419"]],sequential:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],sequentialminus:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]]},colorway:["#254495","#c13246","#48277c","#e4003a","#ef7d00","#822661","#ffed00","#00aaff","#9b30d9","#af005f","#5f00af","#af87ff"],font:{color:"#2a3f5f"},geo:{bgcolor:"white",lakecolor:"white",landcolor:"white",showlakes:!0,showland:!0,subunitcolor:"#C8D4E3"},hoverlabel:{align:"left"},hovermode:"x",mapbox:{style:"light"},paper_bgcolor:"white",plot_bgcolor:"white",polar:{angularaxis:{gridcolor:"#EBF0F8",linecolor:"#EBF0F8",ticks:""},bgcolor:"white",radialaxis:{gridcolor:"#EBF0F8",linecolor:"#EBF0F8",ticks:""}},scene:{xaxis:{backgroundcolor:"white",gridcolor:"#DFE8F3",gridwidth:2,linecolor:"#EBF0F8",showbackground:!0,ticks:"",zerolinecolor:"#EBF0F8"},yaxis:{backgroundcolor:"white",gridcolor:"#DFE8F3",gridwidth:2,linecolor:"#EBF0F8",showbackground:!0,ticks:"",zerolinecolor:"#EBF0F8"},zaxis:{backgroundcolor:"white",gridcolor:"#DFE8F3",gridwidth:2,linecolor:"#EBF0F8",showbackground:!0,ticks:"",zerolinecolor:"#EBF0F8"}},shapedefaults:{line:{color:"#2a3f5f"}},ternary:{aaxis:{gridcolor:"#DFE8F3",linecolor:"#A2B1C6",ticks:""},baxis:{gridcolor:"#DFE8F3",linecolor:"#A2B1C6",ticks:""},bgcolor:"white",caxis:{gridcolor:"#DFE8F3",linecolor:"#A2B1C6",ticks:""}},title:{x:.05},xaxis:{automargin:!0,ticks:"outside",zerolinewidth:2,rangeslider:{visible:!1},showgrid:!0,showline:!0,tickfont:{size:15},title:{standoff:20},mirror:!0,zeroline:!1},yaxis:{automargin:!0,ticks:"outside",tickfont:{size:15},zerolinewidth:2,fixedrange:!1,title:{standoff:20},nticks:8,showgrid:!0,showline:!0,side:"right",mirror:!0,zeroline:!1},dragmode:"pan",legend:{bgcolor:"rgba(0, 0, 0, 0)",x:1.03,xanchor:"left",y:.99,yanchor:"top"}}};function Io(){return Io=Object.assign?Object.assign.bind():function(L){for(var I=1;IL.forEach(K=>h7(K,I))}function gd(...L){return In.useCallback(u5(...L),L)}function p7(L,I=[]){let K=[];function se(R,E){const e=In.createContext(E),_=K.length;K=[...K,E];function k(w){const{scope:v,children:h,...s}=w,t=(v==null?void 0:v[L][_])||e,a=In.useMemo(()=>s,Object.values(s));return In.createElement(t.Provider,{value:a},h)}function i(w,v){const h=(v==null?void 0:v[L][_])||e,s=In.useContext(h);if(s)return s;if(E!==void 0)return E;throw new Error(`\`${w}\` must be used within \`${R}\``)}return k.displayName=R+"Provider",[k,i]}const Pe=()=>{const R=K.map(E=>In.createContext(E));return function(e){const _=(e==null?void 0:e[L])||R;return In.useMemo(()=>({[`__scope${L}`]:{...e,[L]:_}}),[e,_])}};return Pe.scopeName=L,[se,d7(Pe,...I)]}function d7(...L){const I=L[0];if(L.length===1)return I;const K=()=>{const se=L.map(Pe=>({useScope:Pe(),scopeName:Pe.scopeName}));return function(R){const E=se.reduce((e,{useScope:_,scopeName:k})=>{const w=_(R)[`__scope${k}`];return{...e,...w}},{});return In.useMemo(()=>({[`__scope${I.scopeName}`]:E}),[E])}};return K.scopeName=I.scopeName,K}const _m=globalThis!=null&&globalThis.document?In.useLayoutEffect:()=>{},g7=R6["useId".toString()]||(()=>{});let v7=0;function av(L){const[I,K]=In.useState(g7());return _m(()=>{L||K(se=>se??String(v7++))},[L]),L||(I?`radix-${I}`:"")}function Lf(L){const I=In.useRef(L);return In.useEffect(()=>{I.current=L}),In.useMemo(()=>(...K)=>{var se;return(se=I.current)===null||se===void 0?void 0:se.call(I,...K)},[])}function m7({prop:L,defaultProp:I,onChange:K=()=>{}}){const[se,Pe]=y7({defaultProp:I,onChange:K}),R=L!==void 0,E=R?L:se,e=Lf(K),_=In.useCallback(k=>{if(R){const w=typeof k=="function"?k(L):k;w!==L&&e(w)}else Pe(k)},[R,L,Pe,e]);return[E,_]}function y7({defaultProp:L,onChange:I}){const K=In.useState(L),[se]=K,Pe=In.useRef(se),R=Lf(I);return In.useEffect(()=>{Pe.current!==se&&(R(se),Pe.current=se)},[se,Pe,R]),K}const Iy=In.forwardRef((L,I)=>{const{children:K,...se}=L,Pe=In.Children.toArray(K),R=Pe.find(b7);if(R){const E=R.props.children,e=Pe.map(_=>_===R?In.Children.count(E)>1?In.Children.only(null):In.isValidElement(E)?E.props.children:null:_);return In.createElement(wm,Io({},se,{ref:I}),In.isValidElement(E)?In.cloneElement(E,void 0,e):null)}return In.createElement(wm,Io({},se,{ref:I}),K)});Iy.displayName="Slot";const wm=In.forwardRef((L,I)=>{const{children:K,...se}=L;return In.isValidElement(K)?In.cloneElement(K,{..._7(se,K.props),ref:u5(I,K.ref)}):In.Children.count(K)>1?In.Children.only(null):null});wm.displayName="SlotClone";const x7=({children:L})=>In.createElement(In.Fragment,null,L);function b7(L){return In.isValidElement(L)&&L.type===x7}function _7(L,I){const K={...I};for(const se in I){const Pe=L[se],R=I[se];/^on[A-Z]/.test(se)?Pe&&R?K[se]=(...e)=>{R(...e),Pe(...e)}:Pe&&(K[se]=Pe):se==="style"?K[se]={...Pe,...R}:se==="className"&&(K[se]=[Pe,R].filter(Boolean).join(" "))}return{...L,...K}}const w7=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],jh=w7.reduce((L,I)=>{const K=In.forwardRef((se,Pe)=>{const{asChild:R,...E}=se,e=R?Iy:I;return In.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),In.createElement(e,Io({},E,{ref:Pe}))});return K.displayName=`Primitive.${I}`,{...L,[I]:K}},{});function k7(L,I){L&&wy.flushSync(()=>L.dispatchEvent(I))}function T7(L,I=globalThis==null?void 0:globalThis.document){const K=Lf(L);In.useEffect(()=>{const se=Pe=>{Pe.key==="Escape"&&K(Pe)};return I.addEventListener("keydown",se),()=>I.removeEventListener("keydown",se)},[K,I])}const km="dismissableLayer.update",A7="dismissableLayer.pointerDownOutside",M7="dismissableLayer.focusOutside";let Kb;const S7=In.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),E7=In.forwardRef((L,I)=>{var K;const{disableOutsidePointerEvents:se=!1,onEscapeKeyDown:Pe,onPointerDownOutside:R,onFocusOutside:E,onInteractOutside:e,onDismiss:_,...k}=L,i=In.useContext(S7),[w,v]=In.useState(null),h=(K=w==null?void 0:w.ownerDocument)!==null&&K!==void 0?K:globalThis==null?void 0:globalThis.document,[,s]=In.useState({}),t=gd(I,b=>v(b)),a=Array.from(i.layers),[r]=[...i.layersWithOutsidePointerEventsDisabled].slice(-1),n=a.indexOf(r),o=w?a.indexOf(w):-1,l=i.layersWithOutsidePointerEventsDisabled.size>0,u=o>=n,d=C7(b=>{const g=b.target,f=[...i.branches].some(x=>x.contains(g));!u||f||(R==null||R(b),e==null||e(b),b.defaultPrevented||_==null||_())},h),c=L7(b=>{const g=b.target;[...i.branches].some(x=>x.contains(g))||(E==null||E(b),e==null||e(b),b.defaultPrevented||_==null||_())},h);return T7(b=>{o===i.layers.size-1&&(Pe==null||Pe(b),!b.defaultPrevented&&_&&(b.preventDefault(),_()))},h),In.useEffect(()=>{if(w)return se&&(i.layersWithOutsidePointerEventsDisabled.size===0&&(Kb=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),i.layersWithOutsidePointerEventsDisabled.add(w)),i.layers.add(w),Jb(),()=>{se&&i.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Kb)}},[w,h,se,i]),In.useEffect(()=>()=>{w&&(i.layers.delete(w),i.layersWithOutsidePointerEventsDisabled.delete(w),Jb())},[w,i]),In.useEffect(()=>{const b=()=>s({});return document.addEventListener(km,b),()=>document.removeEventListener(km,b)},[]),In.createElement(jh.div,Io({},k,{ref:t,style:{pointerEvents:l?u?"auto":"none":void 0,...L.style},onFocusCapture:kf(L.onFocusCapture,c.onFocusCapture),onBlurCapture:kf(L.onBlurCapture,c.onBlurCapture),onPointerDownCapture:kf(L.onPointerDownCapture,d.onPointerDownCapture)}))});function C7(L,I=globalThis==null?void 0:globalThis.document){const K=Lf(L),se=In.useRef(!1),Pe=In.useRef(()=>{});return In.useEffect(()=>{const R=e=>{if(e.target&&!se.current){let i=function(){c5(A7,K,k,{discrete:!0})};var _=i;const k={originalEvent:e};e.pointerType==="touch"?(I.removeEventListener("click",Pe.current),Pe.current=i,I.addEventListener("click",Pe.current,{once:!0})):i()}se.current=!1},E=window.setTimeout(()=>{I.addEventListener("pointerdown",R)},0);return()=>{window.clearTimeout(E),I.removeEventListener("pointerdown",R),I.removeEventListener("click",Pe.current)}},[I,K]),{onPointerDownCapture:()=>se.current=!0}}function L7(L,I=globalThis==null?void 0:globalThis.document){const K=Lf(L),se=In.useRef(!1);return In.useEffect(()=>{const Pe=R=>{R.target&&!se.current&&c5(M7,K,{originalEvent:R},{discrete:!1})};return I.addEventListener("focusin",Pe),()=>I.removeEventListener("focusin",Pe)},[I,K]),{onFocusCapture:()=>se.current=!0,onBlurCapture:()=>se.current=!1}}function Jb(){const L=new CustomEvent(km);document.dispatchEvent(L)}function c5(L,I,K,{discrete:se}){const Pe=K.originalEvent.target,R=new CustomEvent(L,{bubbles:!1,cancelable:!0,detail:K});I&&Pe.addEventListener(L,I,{once:!0}),se?k7(Pe,R):Pe.dispatchEvent(R)}const ov="focusScope.autoFocusOnMount",sv="focusScope.autoFocusOnUnmount",Qb={bubbles:!1,cancelable:!0},P7=In.forwardRef((L,I)=>{const{loop:K=!1,trapped:se=!1,onMountAutoFocus:Pe,onUnmountAutoFocus:R,...E}=L,[e,_]=In.useState(null),k=Lf(Pe),i=Lf(R),w=In.useRef(null),v=gd(I,t=>_(t)),h=In.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;In.useEffect(()=>{if(se){let r=function(o){if(h.paused||!e)return;const l=o.target;e.contains(l)?w.current=l:gf(w.current,{select:!0})},n=function(o){h.paused||!e||e.contains(o.relatedTarget)||gf(w.current,{select:!0})};var t=r,a=n;return document.addEventListener("focusin",r),document.addEventListener("focusout",n),()=>{document.removeEventListener("focusin",r),document.removeEventListener("focusout",n)}}},[se,e,h.paused]),In.useEffect(()=>{if(e){t_.add(h);const t=document.activeElement;if(!e.contains(t)){const r=new CustomEvent(ov,Qb);e.addEventListener(ov,k),e.dispatchEvent(r),r.defaultPrevented||(O7(F7(f5(e)),{select:!0}),document.activeElement===t&&gf(e))}return()=>{e.removeEventListener(ov,k),setTimeout(()=>{const r=new CustomEvent(sv,Qb);e.addEventListener(sv,i),e.dispatchEvent(r),r.defaultPrevented||gf(t??document.body,{select:!0}),e.removeEventListener(sv,i),t_.remove(h)},0)}}},[e,k,i,h]);const s=In.useCallback(t=>{if(!K&&!se||h.paused)return;const a=t.key==="Tab"&&!t.altKey&&!t.ctrlKey&&!t.metaKey,r=document.activeElement;if(a&&r){const n=t.currentTarget,[o,l]=I7(n);o&&l?!t.shiftKey&&r===l?(t.preventDefault(),K&&gf(o,{select:!0})):t.shiftKey&&r===o&&(t.preventDefault(),K&&gf(l,{select:!0})):r===n&&t.preventDefault()}},[K,se,h.paused]);return In.createElement(jh.div,Io({tabIndex:-1},E,{ref:v,onKeyDown:s}))});function O7(L,{select:I=!1}={}){const K=document.activeElement;for(const se of L)if(gf(se,{select:I}),document.activeElement!==K)return}function I7(L){const I=f5(L),K=e_(I,L),se=e_(I.reverse(),L);return[K,se]}function f5(L){const I=[],K=document.createTreeWalker(L,NodeFilter.SHOW_ELEMENT,{acceptNode:se=>{const Pe=se.tagName==="INPUT"&&se.type==="hidden";return se.disabled||se.hidden||Pe?NodeFilter.FILTER_SKIP:se.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;K.nextNode();)I.push(K.currentNode);return I}function e_(L,I){for(const K of L)if(!R7(K,{upTo:I}))return K}function R7(L,{upTo:I}){if(getComputedStyle(L).visibility==="hidden")return!0;for(;L;){if(I!==void 0&&L===I)return!1;if(getComputedStyle(L).display==="none")return!0;L=L.parentElement}return!1}function z7(L){return L instanceof HTMLInputElement&&"select"in L}function gf(L,{select:I=!1}={}){if(L&&L.focus){const K=document.activeElement;L.focus({preventScroll:!0}),L!==K&&z7(L)&&I&&L.select()}}const t_=D7();function D7(){let L=[];return{add(I){const K=L[0];I!==K&&(K==null||K.pause()),L=n_(L,I),L.unshift(I)},remove(I){var K;L=n_(L,I),(K=L[0])===null||K===void 0||K.resume()}}}function n_(L,I){const K=[...L],se=K.indexOf(I);return se!==-1&&K.splice(se,1),K}function F7(L){return L.filter(I=>I.tagName!=="A")}function B7(L,I){return In.useReducer((K,se)=>{const Pe=I[K][se];return Pe??K},L)}const Ry=L=>{const{present:I,children:K}=L,se=N7(I),Pe=typeof K=="function"?K({present:se.isPresent}):In.Children.only(K),R=gd(se.ref,Pe.ref);return typeof K=="function"||se.isPresent?In.cloneElement(Pe,{ref:R}):null};Ry.displayName="Presence";function N7(L){const[I,K]=In.useState(),se=In.useRef({}),Pe=In.useRef(L),R=In.useRef("none"),E=L?"mounted":"unmounted",[e,_]=B7(E,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return In.useEffect(()=>{const k=k0(se.current);R.current=e==="mounted"?k:"none"},[e]),_m(()=>{const k=se.current,i=Pe.current;if(i!==L){const v=R.current,h=k0(k);L?_("MOUNT"):h==="none"||(k==null?void 0:k.display)==="none"?_("UNMOUNT"):_(i&&v!==h?"ANIMATION_OUT":"UNMOUNT"),Pe.current=L}},[L,_]),_m(()=>{if(I){const k=w=>{const h=k0(se.current).includes(w.animationName);w.target===I&&h&&wy.flushSync(()=>_("ANIMATION_END"))},i=w=>{w.target===I&&(R.current=k0(se.current))};return I.addEventListener("animationstart",i),I.addEventListener("animationcancel",k),I.addEventListener("animationend",k),()=>{I.removeEventListener("animationstart",i),I.removeEventListener("animationcancel",k),I.removeEventListener("animationend",k)}}else _("ANIMATION_END")},[I,_]),{isPresent:["mounted","unmountSuspended"].includes(e),ref:In.useCallback(k=>{k&&(se.current=getComputedStyle(k)),K(k)},[])}}function k0(L){return(L==null?void 0:L.animationName)||"none"}let lv=0;function j7(){In.useEffect(()=>{var L,I;const K=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(L=K[0])!==null&&L!==void 0?L:r_()),document.body.insertAdjacentElement("beforeend",(I=K[1])!==null&&I!==void 0?I:r_()),lv++,()=>{lv===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(se=>se.remove()),lv--}},[])}function r_(){const L=document.createElement("span");return L.setAttribute("data-radix-focus-guard",""),L.tabIndex=0,L.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",L}var Au=function(){return Au=Object.assign||function(I){for(var K,se=1,Pe=arguments.length;se"u")return rA;var I=iA(L),K=document.documentElement.clientWidth,se=window.innerWidth;return{left:I[0],top:I[1],right:I[2],gap:Math.max(0,se-K+I[2]-I[0])}},oA=g5(),sA=function(L,I,K,se){var Pe=L.left,R=L.top,E=L.right,e=L.gap;return K===void 0&&(K="margin"),` - .`.concat(V7,` { + l20.487-68.598h38.599L427.518,380.583z`,width:550,height:550,transform:"translate(4, 0)"},downloadImage:{path:"M22.71,6.29a1,1,0,0,0-1.42,0L20,7.59V2a1,1,0,0,0-2,0V7.59l-1.29-1.3a1,1,0,0,0-1.42,1.42l3,3a1,1,0,0,0,.33.21.94.94,0,0,0,.76,0,1,1,0,0,0,.33-.21l3-3A1,1,0,0,0,22.71,6.29ZM19,13a1,1,0,0,0-1,1v.38L16.52,12.9a2.79,2.79,0,0,0-3.93,0l-.7.7L9.41,11.12a2.85,2.85,0,0,0-3.93,0L4,12.6V7A1,1,0,0,1,5,6h8a1,1,0,0,0,0-2H5A3,3,0,0,0,2,7V19a3,3,0,0,0,3,3H17a3,3,0,0,0,3-3V14A1,1,0,0,0,19,13ZM5,20a1,1,0,0,1-1-1V15.43l2.9-2.9a.79.79,0,0,1,1.09,0l3.17,3.17,0,0L15.46,20Zm13-1a.89.89,0,0,1-.18.53L13.31,15l.7-.7a.77.77,0,0,1,1.1,0L18,17.21Z",width:21,height:21,transform:"translate(-2, -2)"}},b7={data:{candlestick:[{decreasing:{fillcolor:"#e4003a",line:{color:"#e4003a"}},increasing:{fillcolor:"#00ACFF",line:{color:"#00ACFF"}},type:"candlestick"}]},layout:{annotationdefaults:{showarrow:!1},autotypenumbers:"strict",colorway:["#ffed00","#ef7d00","#e4003a","#c13246","#822661","#48277c","#005ca9","#00aaff","#9b30d9","#af005f","#5f00af","#af87ff"],dragmode:"pan",font:{family:"Fira Code",size:18},hoverlabel:{align:"left"},mapbox:{style:"dark"},hovermode:"x",legend:{bgcolor:"rgba(0, 0, 0, 0)",x:.01,xanchor:"left",y:.99,yanchor:"top",font:{size:15}},paper_bgcolor:"#000000",plot_bgcolor:"#000000",xaxis:{automargin:!0,autorange:!0,rangeslider:{visible:!1},showgrid:!0,showline:!0,tickfont:{size:14},zeroline:!1,tick0:1,title:{standoff:20},linecolor:"#F5EFF3",mirror:!0,ticks:"outside"},yaxis:{anchor:"x",automargin:!0,fixedrange:!1,zeroline:!1,showgrid:!0,showline:!0,side:"right",tick0:.5,title:{standoff:20},gridcolor:"#283442",linecolor:"#F5EFF3",mirror:!0,ticks:"outside"}}},_7={data:{barpolar:[{marker:{line:{color:"white",width:.5},pattern:{fillmode:"overlay",size:10,solidity:.2}},type:"barpolar"}],bar:[{error_x:{color:"#2a3f5f"},error_y:{color:"#2a3f5f"},marker:{line:{color:"white",width:.5},pattern:{fillmode:"overlay",size:10,solidity:.2}},type:"bar"}],carpet:[{aaxis:{endlinecolor:"#2a3f5f",gridcolor:"#C8D4E3",linecolor:"#C8D4E3",minorgridcolor:"#C8D4E3",startlinecolor:"#2a3f5f"},baxis:{endlinecolor:"#2a3f5f",gridcolor:"#C8D4E3",linecolor:"#C8D4E3",minorgridcolor:"#C8D4E3",startlinecolor:"#2a3f5f"},type:"carpet"}],choropleth:[{colorbar:{outlinewidth:0,ticks:""},type:"choropleth"}],contourcarpet:[{colorbar:{outlinewidth:0,ticks:""},type:"contourcarpet"}],contour:[{colorbar:{outlinewidth:0,ticks:""},colorscale:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],type:"contour"}],heatmapgl:[{colorbar:{outlinewidth:0,ticks:""},colorscale:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],type:"heatmapgl"}],heatmap:[{colorbar:{outlinewidth:0,ticks:""},colorscale:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],type:"heatmap"}],histogram2dcontour:[{colorbar:{outlinewidth:0,ticks:""},colorscale:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],type:"histogram2dcontour"}],histogram2d:[{colorbar:{outlinewidth:0,ticks:""},colorscale:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],type:"histogram2d"}],histogram:[{marker:{pattern:{fillmode:"overlay",size:10,solidity:.2}},type:"histogram"}],mesh3d:[{colorbar:{outlinewidth:0,ticks:""},type:"mesh3d"}],parcoords:[{line:{colorbar:{outlinewidth:0,ticks:""}},type:"parcoords"}],pie:[{automargin:!0,type:"pie"}],scatter3d:[{line:{colorbar:{outlinewidth:0,ticks:""}},marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scatter3d"}],scattercarpet:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scattercarpet"}],scattergeo:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scattergeo"}],scattergl:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scattergl"}],scattermapbox:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scattermapbox"}],scatterpolargl:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scatterpolargl"}],scatterpolar:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scatterpolar"}],scatter:[{fillpattern:{fillmode:"overlay",size:10,solidity:.2},type:"scatter"}],scatterternary:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scatterternary"}],surface:[{colorbar:{outlinewidth:0,ticks:""},colorscale:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],type:"surface"}],table:[{cells:{fill:{color:"#EBF0F8"},line:{color:"white"}},header:{fill:{color:"#C8D4E3"},line:{color:"white"}},type:"table"}],candlestick:[{decreasing:{fillcolor:"#c80000",line:{color:"#990000"}},increasing:{fillcolor:"#009600",line:{color:"#007500"}},type:"candlestick"}]},layout:{annotationdefaults:{arrowcolor:"#2a3f5f",arrowhead:0,arrowwidth:1,showarrow:!1},autotypenumbers:"strict",coloraxis:{colorbar:{outlinewidth:0,ticks:""}},colorscale:{diverging:[[0,"#8e0152"],[.1,"#c51b7d"],[.2,"#de77ae"],[.3,"#f1b6da"],[.4,"#fde0ef"],[.5,"#f7f7f7"],[.6,"#e6f5d0"],[.7,"#b8e186"],[.8,"#7fbc41"],[.9,"#4d9221"],[1,"#276419"]],sequential:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],sequentialminus:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]]},colorway:["#254495","#c13246","#48277c","#e4003a","#ef7d00","#822661","#ffed00","#00aaff","#9b30d9","#af005f","#5f00af","#af87ff"],font:{color:"#2a3f5f"},geo:{bgcolor:"white",lakecolor:"white",landcolor:"white",showlakes:!0,showland:!0,subunitcolor:"#C8D4E3"},hoverlabel:{align:"left"},hovermode:"x",mapbox:{style:"light"},paper_bgcolor:"white",plot_bgcolor:"white",polar:{angularaxis:{gridcolor:"#EBF0F8",linecolor:"#EBF0F8",ticks:""},bgcolor:"white",radialaxis:{gridcolor:"#EBF0F8",linecolor:"#EBF0F8",ticks:""}},scene:{xaxis:{backgroundcolor:"white",gridcolor:"#DFE8F3",gridwidth:2,linecolor:"#EBF0F8",showbackground:!0,ticks:"",zerolinecolor:"#EBF0F8"},yaxis:{backgroundcolor:"white",gridcolor:"#DFE8F3",gridwidth:2,linecolor:"#EBF0F8",showbackground:!0,ticks:"",zerolinecolor:"#EBF0F8"},zaxis:{backgroundcolor:"white",gridcolor:"#DFE8F3",gridwidth:2,linecolor:"#EBF0F8",showbackground:!0,ticks:"",zerolinecolor:"#EBF0F8"}},shapedefaults:{line:{color:"#2a3f5f"}},ternary:{aaxis:{gridcolor:"#DFE8F3",linecolor:"#A2B1C6",ticks:""},baxis:{gridcolor:"#DFE8F3",linecolor:"#A2B1C6",ticks:""},bgcolor:"white",caxis:{gridcolor:"#DFE8F3",linecolor:"#A2B1C6",ticks:""}},title:{x:.05},xaxis:{automargin:!0,ticks:"outside",zerolinewidth:2,rangeslider:{visible:!1},showgrid:!0,showline:!0,tickfont:{size:15},title:{standoff:20},mirror:!0,zeroline:!1},yaxis:{automargin:!0,ticks:"outside",tickfont:{size:15},zerolinewidth:2,fixedrange:!1,title:{standoff:20},nticks:8,showgrid:!0,showline:!0,side:"right",mirror:!0,zeroline:!1},dragmode:"pan",legend:{bgcolor:"rgba(0, 0, 0, 0)",x:1.03,xanchor:"left",y:.99,yanchor:"top"}}};function Io(){return Io=Object.assign?Object.assign.bind():function(L){for(var I=1;IL.forEach(K=>w7(K,I))}function gd(...L){return In.useCallback(d5(...L),L)}function k7(L,I=[]){let K=[];function se(R,E){const e=In.createContext(E),_=K.length;K=[...K,E];function k(w){const{scope:v,children:h,...s}=w,t=(v==null?void 0:v[L][_])||e,a=In.useMemo(()=>s,Object.values(s));return In.createElement(t.Provider,{value:a},h)}function i(w,v){const h=(v==null?void 0:v[L][_])||e,s=In.useContext(h);if(s)return s;if(E!==void 0)return E;throw new Error(`\`${w}\` must be used within \`${R}\``)}return k.displayName=R+"Provider",[k,i]}const Pe=()=>{const R=K.map(E=>In.createContext(E));return function(e){const _=(e==null?void 0:e[L])||R;return In.useMemo(()=>({[`__scope${L}`]:{...e,[L]:_}}),[e,_])}};return Pe.scopeName=L,[se,T7(Pe,...I)]}function T7(...L){const I=L[0];if(L.length===1)return I;const K=()=>{const se=L.map(Pe=>({useScope:Pe(),scopeName:Pe.scopeName}));return function(R){const E=se.reduce((e,{useScope:_,scopeName:k})=>{const w=_(R)[`__scope${k}`];return{...e,...w}},{});return In.useMemo(()=>({[`__scope${I.scopeName}`]:E}),[E])}};return K.scopeName=I.scopeName,K}const _m=globalThis!=null&&globalThis.document?In.useLayoutEffect:()=>{},A7=R6["useId".toString()]||(()=>{});let M7=0;function av(L){const[I,K]=In.useState(A7());return _m(()=>{L||K(se=>se??String(M7++))},[L]),L||(I?`radix-${I}`:"")}function Lf(L){const I=In.useRef(L);return In.useEffect(()=>{I.current=L}),In.useMemo(()=>(...K)=>{var se;return(se=I.current)===null||se===void 0?void 0:se.call(I,...K)},[])}function S7({prop:L,defaultProp:I,onChange:K=()=>{}}){const[se,Pe]=E7({defaultProp:I,onChange:K}),R=L!==void 0,E=R?L:se,e=Lf(K),_=In.useCallback(k=>{if(R){const w=typeof k=="function"?k(L):k;w!==L&&e(w)}else Pe(k)},[R,L,Pe,e]);return[E,_]}function E7({defaultProp:L,onChange:I}){const K=In.useState(L),[se]=K,Pe=In.useRef(se),R=Lf(I);return In.useEffect(()=>{Pe.current!==se&&(R(se),Pe.current=se)},[se,Pe,R]),K}const Ry=In.forwardRef((L,I)=>{const{children:K,...se}=L,Pe=In.Children.toArray(K),R=Pe.find(L7);if(R){const E=R.props.children,e=Pe.map(_=>_===R?In.Children.count(E)>1?In.Children.only(null):In.isValidElement(E)?E.props.children:null:_);return In.createElement(wm,Io({},se,{ref:I}),In.isValidElement(E)?In.cloneElement(E,void 0,e):null)}return In.createElement(wm,Io({},se,{ref:I}),K)});Ry.displayName="Slot";const wm=In.forwardRef((L,I)=>{const{children:K,...se}=L;return In.isValidElement(K)?In.cloneElement(K,{...P7(se,K.props),ref:d5(I,K.ref)}):In.Children.count(K)>1?In.Children.only(null):null});wm.displayName="SlotClone";const C7=({children:L})=>In.createElement(In.Fragment,null,L);function L7(L){return In.isValidElement(L)&&L.type===C7}function P7(L,I){const K={...I};for(const se in I){const Pe=L[se],R=I[se];/^on[A-Z]/.test(se)?Pe&&R?K[se]=(...e)=>{R(...e),Pe(...e)}:Pe&&(K[se]=Pe):se==="style"?K[se]={...Pe,...R}:se==="className"&&(K[se]=[Pe,R].filter(Boolean).join(" "))}return{...L,...K}}const O7=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],jh=O7.reduce((L,I)=>{const K=In.forwardRef((se,Pe)=>{const{asChild:R,...E}=se,e=R?Ry:I;return In.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),In.createElement(e,Io({},E,{ref:Pe}))});return K.displayName=`Primitive.${I}`,{...L,[I]:K}},{});function I7(L,I){L&&wy.flushSync(()=>L.dispatchEvent(I))}function R7(L,I=globalThis==null?void 0:globalThis.document){const K=Lf(L);In.useEffect(()=>{const se=Pe=>{Pe.key==="Escape"&&K(Pe)};return I.addEventListener("keydown",se),()=>I.removeEventListener("keydown",se)},[K,I])}const km="dismissableLayer.update",z7="dismissableLayer.pointerDownOutside",D7="dismissableLayer.focusOutside";let n_;const F7=In.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),B7=In.forwardRef((L,I)=>{var K;const{disableOutsidePointerEvents:se=!1,onEscapeKeyDown:Pe,onPointerDownOutside:R,onFocusOutside:E,onInteractOutside:e,onDismiss:_,...k}=L,i=In.useContext(F7),[w,v]=In.useState(null),h=(K=w==null?void 0:w.ownerDocument)!==null&&K!==void 0?K:globalThis==null?void 0:globalThis.document,[,s]=In.useState({}),t=gd(I,b=>v(b)),a=Array.from(i.layers),[r]=[...i.layersWithOutsidePointerEventsDisabled].slice(-1),n=a.indexOf(r),o=w?a.indexOf(w):-1,l=i.layersWithOutsidePointerEventsDisabled.size>0,u=o>=n,d=N7(b=>{const g=b.target,f=[...i.branches].some(x=>x.contains(g));!u||f||(R==null||R(b),e==null||e(b),b.defaultPrevented||_==null||_())},h),c=j7(b=>{const g=b.target;[...i.branches].some(x=>x.contains(g))||(E==null||E(b),e==null||e(b),b.defaultPrevented||_==null||_())},h);return R7(b=>{o===i.layers.size-1&&(Pe==null||Pe(b),!b.defaultPrevented&&_&&(b.preventDefault(),_()))},h),In.useEffect(()=>{if(w)return se&&(i.layersWithOutsidePointerEventsDisabled.size===0&&(n_=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),i.layersWithOutsidePointerEventsDisabled.add(w)),i.layers.add(w),r_(),()=>{se&&i.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=n_)}},[w,h,se,i]),In.useEffect(()=>()=>{w&&(i.layers.delete(w),i.layersWithOutsidePointerEventsDisabled.delete(w),r_())},[w,i]),In.useEffect(()=>{const b=()=>s({});return document.addEventListener(km,b),()=>document.removeEventListener(km,b)},[]),In.createElement(jh.div,Io({},k,{ref:t,style:{pointerEvents:l?u?"auto":"none":void 0,...L.style},onFocusCapture:kf(L.onFocusCapture,c.onFocusCapture),onBlurCapture:kf(L.onBlurCapture,c.onBlurCapture),onPointerDownCapture:kf(L.onPointerDownCapture,d.onPointerDownCapture)}))});function N7(L,I=globalThis==null?void 0:globalThis.document){const K=Lf(L),se=In.useRef(!1),Pe=In.useRef(()=>{});return In.useEffect(()=>{const R=e=>{if(e.target&&!se.current){let i=function(){g5(z7,K,k,{discrete:!0})};var _=i;const k={originalEvent:e};e.pointerType==="touch"?(I.removeEventListener("click",Pe.current),Pe.current=i,I.addEventListener("click",Pe.current,{once:!0})):i()}se.current=!1},E=window.setTimeout(()=>{I.addEventListener("pointerdown",R)},0);return()=>{window.clearTimeout(E),I.removeEventListener("pointerdown",R),I.removeEventListener("click",Pe.current)}},[I,K]),{onPointerDownCapture:()=>se.current=!0}}function j7(L,I=globalThis==null?void 0:globalThis.document){const K=Lf(L),se=In.useRef(!1);return In.useEffect(()=>{const Pe=R=>{R.target&&!se.current&&g5(D7,K,{originalEvent:R},{discrete:!1})};return I.addEventListener("focusin",Pe),()=>I.removeEventListener("focusin",Pe)},[I,K]),{onFocusCapture:()=>se.current=!0,onBlurCapture:()=>se.current=!1}}function r_(){const L=new CustomEvent(km);document.dispatchEvent(L)}function g5(L,I,K,{discrete:se}){const Pe=K.originalEvent.target,R=new CustomEvent(L,{bubbles:!1,cancelable:!0,detail:K});I&&Pe.addEventListener(L,I,{once:!0}),se?I7(Pe,R):Pe.dispatchEvent(R)}const ov="focusScope.autoFocusOnMount",sv="focusScope.autoFocusOnUnmount",i_={bubbles:!1,cancelable:!0},U7=In.forwardRef((L,I)=>{const{loop:K=!1,trapped:se=!1,onMountAutoFocus:Pe,onUnmountAutoFocus:R,...E}=L,[e,_]=In.useState(null),k=Lf(Pe),i=Lf(R),w=In.useRef(null),v=gd(I,t=>_(t)),h=In.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;In.useEffect(()=>{if(se){let r=function(o){if(h.paused||!e)return;const l=o.target;e.contains(l)?w.current=l:gf(w.current,{select:!0})},n=function(o){h.paused||!e||e.contains(o.relatedTarget)||gf(w.current,{select:!0})};var t=r,a=n;return document.addEventListener("focusin",r),document.addEventListener("focusout",n),()=>{document.removeEventListener("focusin",r),document.removeEventListener("focusout",n)}}},[se,e,h.paused]),In.useEffect(()=>{if(e){o_.add(h);const t=document.activeElement;if(!e.contains(t)){const r=new CustomEvent(ov,i_);e.addEventListener(ov,k),e.dispatchEvent(r),r.defaultPrevented||(V7(Z7(v5(e)),{select:!0}),document.activeElement===t&&gf(e))}return()=>{e.removeEventListener(ov,k),setTimeout(()=>{const r=new CustomEvent(sv,i_);e.addEventListener(sv,i),e.dispatchEvent(r),r.defaultPrevented||gf(t??document.body,{select:!0}),e.removeEventListener(sv,i),o_.remove(h)},0)}}},[e,k,i,h]);const s=In.useCallback(t=>{if(!K&&!se||h.paused)return;const a=t.key==="Tab"&&!t.altKey&&!t.ctrlKey&&!t.metaKey,r=document.activeElement;if(a&&r){const n=t.currentTarget,[o,l]=H7(n);o&&l?!t.shiftKey&&r===l?(t.preventDefault(),K&&gf(o,{select:!0})):t.shiftKey&&r===o&&(t.preventDefault(),K&&gf(l,{select:!0})):r===n&&t.preventDefault()}},[K,se,h.paused]);return In.createElement(jh.div,Io({tabIndex:-1},E,{ref:v,onKeyDown:s}))});function V7(L,{select:I=!1}={}){const K=document.activeElement;for(const se of L)if(gf(se,{select:I}),document.activeElement!==K)return}function H7(L){const I=v5(L),K=a_(I,L),se=a_(I.reverse(),L);return[K,se]}function v5(L){const I=[],K=document.createTreeWalker(L,NodeFilter.SHOW_ELEMENT,{acceptNode:se=>{const Pe=se.tagName==="INPUT"&&se.type==="hidden";return se.disabled||se.hidden||Pe?NodeFilter.FILTER_SKIP:se.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;K.nextNode();)I.push(K.currentNode);return I}function a_(L,I){for(const K of L)if(!q7(K,{upTo:I}))return K}function q7(L,{upTo:I}){if(getComputedStyle(L).visibility==="hidden")return!0;for(;L;){if(I!==void 0&&L===I)return!1;if(getComputedStyle(L).display==="none")return!0;L=L.parentElement}return!1}function G7(L){return L instanceof HTMLInputElement&&"select"in L}function gf(L,{select:I=!1}={}){if(L&&L.focus){const K=document.activeElement;L.focus({preventScroll:!0}),L!==K&&G7(L)&&I&&L.select()}}const o_=W7();function W7(){let L=[];return{add(I){const K=L[0];I!==K&&(K==null||K.pause()),L=s_(L,I),L.unshift(I)},remove(I){var K;L=s_(L,I),(K=L[0])===null||K===void 0||K.resume()}}}function s_(L,I){const K=[...L],se=K.indexOf(I);return se!==-1&&K.splice(se,1),K}function Z7(L){return L.filter(I=>I.tagName!=="A")}function Y7(L,I){return In.useReducer((K,se)=>{const Pe=I[K][se];return Pe??K},L)}const zy=L=>{const{present:I,children:K}=L,se=X7(I),Pe=typeof K=="function"?K({present:se.isPresent}):In.Children.only(K),R=gd(se.ref,Pe.ref);return typeof K=="function"||se.isPresent?In.cloneElement(Pe,{ref:R}):null};zy.displayName="Presence";function X7(L){const[I,K]=In.useState(),se=In.useRef({}),Pe=In.useRef(L),R=In.useRef("none"),E=L?"mounted":"unmounted",[e,_]=Y7(E,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return In.useEffect(()=>{const k=k0(se.current);R.current=e==="mounted"?k:"none"},[e]),_m(()=>{const k=se.current,i=Pe.current;if(i!==L){const v=R.current,h=k0(k);L?_("MOUNT"):h==="none"||(k==null?void 0:k.display)==="none"?_("UNMOUNT"):_(i&&v!==h?"ANIMATION_OUT":"UNMOUNT"),Pe.current=L}},[L,_]),_m(()=>{if(I){const k=w=>{const h=k0(se.current).includes(w.animationName);w.target===I&&h&&wy.flushSync(()=>_("ANIMATION_END"))},i=w=>{w.target===I&&(R.current=k0(se.current))};return I.addEventListener("animationstart",i),I.addEventListener("animationcancel",k),I.addEventListener("animationend",k),()=>{I.removeEventListener("animationstart",i),I.removeEventListener("animationcancel",k),I.removeEventListener("animationend",k)}}else _("ANIMATION_END")},[I,_]),{isPresent:["mounted","unmountSuspended"].includes(e),ref:In.useCallback(k=>{k&&(se.current=getComputedStyle(k)),K(k)},[])}}function k0(L){return(L==null?void 0:L.animationName)||"none"}let lv=0;function $7(){In.useEffect(()=>{var L,I;const K=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(L=K[0])!==null&&L!==void 0?L:l_()),document.body.insertAdjacentElement("beforeend",(I=K[1])!==null&&I!==void 0?I:l_()),lv++,()=>{lv===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(se=>se.remove()),lv--}},[])}function l_(){const L=document.createElement("span");return L.setAttribute("data-radix-focus-guard",""),L.tabIndex=0,L.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",L}var Au=function(){return Au=Object.assign||function(I){for(var K,se=1,Pe=arguments.length;se"u")return pA;var I=dA(L),K=document.documentElement.clientWidth,se=window.innerWidth;return{left:I[0],top:I[1],right:I[2],gap:Math.max(0,se-K+I[2]-I[0])}},vA=b5(),mA=function(L,I,K,se){var Pe=L.left,R=L.top,E=L.right,e=L.gap;return K===void 0&&(K="margin"),` + .`.concat(J7,` { overflow: hidden `).concat(se,`; padding-right: `).concat(e,"px ").concat(se,`; } @@ -3688,17 +3691,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho } body { - `).concat(H7,": ").concat(e,`px; + `).concat(Q7,": ").concat(e,`px; } -`)},lA=function(L){var I=L.noRelative,K=L.noImportant,se=L.gapMode,Pe=se===void 0?"margin":se,R=In.useMemo(function(){return aA(Pe)},[Pe]);return In.createElement(oA,{styles:sA(R,!I,Pe,K?"":"!important")})},Tm=!1;if(typeof window<"u")try{var T0=Object.defineProperty({},"passive",{get:function(){return Tm=!0,!0}});window.addEventListener("test",T0,T0),window.removeEventListener("test",T0,T0)}catch{Tm=!1}var ih=Tm?{passive:!1}:!1,uA=function(L){return L.tagName==="TEXTAREA"},v5=function(L,I){var K=window.getComputedStyle(L);return K[I]!=="hidden"&&!(K.overflowY===K.overflowX&&!uA(L)&&K[I]==="visible")},cA=function(L){return v5(L,"overflowY")},fA=function(L){return v5(L,"overflowX")},a_=function(L,I){var K=I;do{typeof ShadowRoot<"u"&&K instanceof ShadowRoot&&(K=K.host);var se=m5(L,K);if(se){var Pe=y5(L,K),R=Pe[1],E=Pe[2];if(R>E)return!0}K=K.parentNode}while(K&&K!==document.body);return!1},hA=function(L){var I=L.scrollTop,K=L.scrollHeight,se=L.clientHeight;return[I,K,se]},pA=function(L){var I=L.scrollLeft,K=L.scrollWidth,se=L.clientWidth;return[I,K,se]},m5=function(L,I){return L==="v"?cA(I):fA(I)},y5=function(L,I){return L==="v"?hA(I):pA(I)},dA=function(L,I){return L==="h"&&I==="rtl"?-1:1},gA=function(L,I,K,se,Pe){var R=dA(L,window.getComputedStyle(I).direction),E=R*se,e=K.target,_=I.contains(e),k=!1,i=E>0,w=0,v=0;do{var h=y5(L,e),s=h[0],t=h[1],a=h[2],r=t-a-R*s;(s||r)&&m5(L,e)&&(w+=r,v+=s),e=e.parentNode}while(!_&&e!==document.body||_&&(I.contains(e)||I===e));return(i&&(Pe&&w===0||!Pe&&E>w)||!i&&(Pe&&v===0||!Pe&&-E>v))&&(k=!0),k},A0=function(L){return"changedTouches"in L?[L.changedTouches[0].clientX,L.changedTouches[0].clientY]:[0,0]},o_=function(L){return[L.deltaX,L.deltaY]},s_=function(L){return L&&"current"in L?L.current:L},vA=function(L,I){return L[0]===I[0]&&L[1]===I[1]},mA=function(L){return` +`)},yA=function(L){var I=L.noRelative,K=L.noImportant,se=L.gapMode,Pe=se===void 0?"margin":se,R=In.useMemo(function(){return gA(Pe)},[Pe]);return In.createElement(vA,{styles:mA(R,!I,Pe,K?"":"!important")})},Tm=!1;if(typeof window<"u")try{var T0=Object.defineProperty({},"passive",{get:function(){return Tm=!0,!0}});window.addEventListener("test",T0,T0),window.removeEventListener("test",T0,T0)}catch{Tm=!1}var ih=Tm?{passive:!1}:!1,xA=function(L){return L.tagName==="TEXTAREA"},_5=function(L,I){var K=window.getComputedStyle(L);return K[I]!=="hidden"&&!(K.overflowY===K.overflowX&&!xA(L)&&K[I]==="visible")},bA=function(L){return _5(L,"overflowY")},_A=function(L){return _5(L,"overflowX")},c_=function(L,I){var K=I;do{typeof ShadowRoot<"u"&&K instanceof ShadowRoot&&(K=K.host);var se=w5(L,K);if(se){var Pe=k5(L,K),R=Pe[1],E=Pe[2];if(R>E)return!0}K=K.parentNode}while(K&&K!==document.body);return!1},wA=function(L){var I=L.scrollTop,K=L.scrollHeight,se=L.clientHeight;return[I,K,se]},kA=function(L){var I=L.scrollLeft,K=L.scrollWidth,se=L.clientWidth;return[I,K,se]},w5=function(L,I){return L==="v"?bA(I):_A(I)},k5=function(L,I){return L==="v"?wA(I):kA(I)},TA=function(L,I){return L==="h"&&I==="rtl"?-1:1},AA=function(L,I,K,se,Pe){var R=TA(L,window.getComputedStyle(I).direction),E=R*se,e=K.target,_=I.contains(e),k=!1,i=E>0,w=0,v=0;do{var h=k5(L,e),s=h[0],t=h[1],a=h[2],r=t-a-R*s;(s||r)&&w5(L,e)&&(w+=r,v+=s),e=e.parentNode}while(!_&&e!==document.body||_&&(I.contains(e)||I===e));return(i&&(Pe&&w===0||!Pe&&E>w)||!i&&(Pe&&v===0||!Pe&&-E>v))&&(k=!0),k},A0=function(L){return"changedTouches"in L?[L.changedTouches[0].clientX,L.changedTouches[0].clientY]:[0,0]},f_=function(L){return[L.deltaX,L.deltaY]},h_=function(L){return L&&"current"in L?L.current:L},MA=function(L,I){return L[0]===I[0]&&L[1]===I[1]},SA=function(L){return` .block-interactivity-`.concat(L,` {pointer-events: none;} .allow-interactivity-`).concat(L,` {pointer-events: all;} -`)},yA=0,ah=[];function xA(L){var I=In.useRef([]),K=In.useRef([0,0]),se=In.useRef(),Pe=In.useState(yA++)[0],R=In.useState(function(){return g5()})[0],E=In.useRef(L);In.useEffect(function(){E.current=L},[L]),In.useEffect(function(){if(L.inert){document.body.classList.add("block-interactivity-".concat(Pe));var t=U7([L.lockRef.current],(L.shards||[]).map(s_),!0).filter(Boolean);return t.forEach(function(a){return a.classList.add("allow-interactivity-".concat(Pe))}),function(){document.body.classList.remove("block-interactivity-".concat(Pe)),t.forEach(function(a){return a.classList.remove("allow-interactivity-".concat(Pe))})}}},[L.inert,L.lockRef.current,L.shards]);var e=In.useCallback(function(t,a){if("touches"in t&&t.touches.length===2)return!E.current.allowPinchZoom;var r=A0(t),n=K.current,o="deltaX"in t?t.deltaX:n[0]-r[0],l="deltaY"in t?t.deltaY:n[1]-r[1],u,d=t.target,c=Math.abs(o)>Math.abs(l)?"h":"v";if("touches"in t&&c==="h"&&d.type==="range")return!1;var b=a_(c,d);if(!b)return!0;if(b?u=c:(u=c==="v"?"h":"v",b=a_(c,d)),!b)return!1;if(!se.current&&"changedTouches"in t&&(o||l)&&(se.current=u),!u)return!0;var g=se.current||u;return gA(g,a,t,g==="h"?o:l,!0)},[]),_=In.useCallback(function(t){var a=t;if(!(!ah.length||ah[ah.length-1]!==R)){var r="deltaY"in a?o_(a):A0(a),n=I.current.filter(function(u){return u.name===a.type&&u.target===a.target&&vA(u.delta,r)})[0];if(n&&n.should){a.cancelable&&a.preventDefault();return}if(!n){var o=(E.current.shards||[]).map(s_).filter(Boolean).filter(function(u){return u.contains(a.target)}),l=o.length>0?e(a,o[0]):!E.current.noIsolation;l&&a.cancelable&&a.preventDefault()}}},[]),k=In.useCallback(function(t,a,r,n){var o={name:t,delta:a,target:r,should:n};I.current.push(o),setTimeout(function(){I.current=I.current.filter(function(l){return l!==o})},1)},[]),i=In.useCallback(function(t){K.current=A0(t),se.current=void 0},[]),w=In.useCallback(function(t){k(t.type,o_(t),t.target,e(t,L.lockRef.current))},[]),v=In.useCallback(function(t){k(t.type,A0(t),t.target,e(t,L.lockRef.current))},[]);In.useEffect(function(){return ah.push(R),L.setCallbacks({onScrollCapture:w,onWheelCapture:w,onTouchMoveCapture:v}),document.addEventListener("wheel",_,ih),document.addEventListener("touchmove",_,ih),document.addEventListener("touchstart",i,ih),function(){ah=ah.filter(function(t){return t!==R}),document.removeEventListener("wheel",_,ih),document.removeEventListener("touchmove",_,ih),document.removeEventListener("touchstart",i,ih)}},[]);var h=L.removeScrollBar,s=L.inert;return In.createElement(In.Fragment,null,s?In.createElement(R,{styles:mA(Pe)}):null,h?In.createElement(lA,{gapMode:"margin"}):null)}const bA=$7(d5,xA);var x5=In.forwardRef(function(L,I){return In.createElement(N1,Au({},L,{ref:I,sideCar:bA}))});x5.classNames=N1.classNames;const _A=x5;var wA=function(L){if(typeof document>"u")return null;var I=Array.isArray(L)?L[0]:L;return I.ownerDocument.body},oh=new WeakMap,M0=new WeakMap,S0={},fv=0,b5=function(L){return L&&(L.host||b5(L.parentNode))},kA=function(L,I){return I.map(function(K){if(L.contains(K))return K;var se=b5(K);return se&&L.contains(se)?se:(console.error("aria-hidden",K,"in not contained inside",L,". Doing nothing"),null)}).filter(function(K){return!!K})},TA=function(L,I,K,se){var Pe=kA(I,Array.isArray(L)?L:[L]);S0[K]||(S0[K]=new WeakMap);var R=S0[K],E=[],e=new Set,_=new Set(Pe),k=function(w){!w||e.has(w)||(e.add(w),k(w.parentNode))};Pe.forEach(k);var i=function(w){!w||_.has(w)||Array.prototype.forEach.call(w.children,function(v){if(e.has(v))i(v);else{var h=v.getAttribute(se),s=h!==null&&h!=="false",t=(oh.get(v)||0)+1,a=(R.get(v)||0)+1;oh.set(v,t),R.set(v,a),E.push(v),t===1&&s&&M0.set(v,!0),a===1&&v.setAttribute(K,"true"),s||v.setAttribute(se,"true")}})};return i(I),e.clear(),fv++,function(){E.forEach(function(w){var v=oh.get(w)-1,h=R.get(w)-1;oh.set(w,v),R.set(w,h),v||(M0.has(w)||w.removeAttribute(se),M0.delete(w)),h||w.removeAttribute(K)}),fv--,fv||(oh=new WeakMap,oh=new WeakMap,M0=new WeakMap,S0={})}},AA=function(L,I,K){K===void 0&&(K="data-aria-hidden");var se=Array.from(Array.isArray(L)?L:[L]),Pe=I||wA(L);return Pe?(se.push.apply(se,Array.from(Pe.querySelectorAll("[aria-live]"))),TA(se,Pe,K,"aria-hidden")):function(){return null}};const _5="Dialog",[w5,S9]=p7(_5),[MA,ic]=w5(_5),SA=L=>{const{__scopeDialog:I,children:K,open:se,defaultOpen:Pe,onOpenChange:R,modal:E=!0}=L,e=In.useRef(null),_=In.useRef(null),[k=!1,i]=m7({prop:se,defaultProp:Pe,onChange:R});return In.createElement(MA,{scope:I,triggerRef:e,contentRef:_,contentId:av(),titleId:av(),descriptionId:av(),open:k,onOpenChange:i,onOpenToggle:In.useCallback(()=>i(w=>!w),[i]),modal:E},K)},EA="DialogPortal",[E9,k5]=w5(EA,{forceMount:void 0}),Am="DialogOverlay",CA=In.forwardRef((L,I)=>{const K=k5(Am,L.__scopeDialog),{forceMount:se=K.forceMount,...Pe}=L,R=ic(Am,L.__scopeDialog);return R.modal?In.createElement(Ry,{present:se||R.open},In.createElement(LA,Io({},Pe,{ref:I}))):null}),LA=In.forwardRef((L,I)=>{const{__scopeDialog:K,...se}=L,Pe=ic(Am,K);return In.createElement(_A,{as:Iy,allowPinchZoom:!0,shards:[Pe.contentRef]},In.createElement(jh.div,Io({"data-state":A5(Pe.open)},se,{ref:I,style:{pointerEvents:"auto",...se.style}})))}),sd="DialogContent",PA=In.forwardRef((L,I)=>{const K=k5(sd,L.__scopeDialog),{forceMount:se=K.forceMount,...Pe}=L,R=ic(sd,L.__scopeDialog);return In.createElement(Ry,{present:se||R.open},R.modal?In.createElement(OA,Io({},Pe,{ref:I})):In.createElement(IA,Io({},Pe,{ref:I})))}),OA=In.forwardRef((L,I)=>{const K=ic(sd,L.__scopeDialog),se=In.useRef(null),Pe=gd(I,K.contentRef,se);return In.useEffect(()=>{const R=se.current;if(R)return AA(R)},[]),In.createElement(T5,Io({},L,{ref:Pe,trapFocus:K.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:kf(L.onCloseAutoFocus,R=>{var E;R.preventDefault(),(E=K.triggerRef.current)===null||E===void 0||E.focus()}),onPointerDownOutside:kf(L.onPointerDownOutside,R=>{const E=R.detail.originalEvent,e=E.button===0&&E.ctrlKey===!0;(E.button===2||e)&&R.preventDefault()}),onFocusOutside:kf(L.onFocusOutside,R=>R.preventDefault())}))}),IA=In.forwardRef((L,I)=>{const K=ic(sd,L.__scopeDialog),se=In.useRef(!1);return In.createElement(T5,Io({},L,{ref:I,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:Pe=>{var R;if((R=L.onCloseAutoFocus)===null||R===void 0||R.call(L,Pe),!Pe.defaultPrevented){var E;se.current||(E=K.triggerRef.current)===null||E===void 0||E.focus(),Pe.preventDefault()}se.current=!1},onInteractOutside:Pe=>{var R,E;(R=L.onInteractOutside)===null||R===void 0||R.call(L,Pe),Pe.defaultPrevented||(se.current=!0);const e=Pe.target;((E=K.triggerRef.current)===null||E===void 0?void 0:E.contains(e))&&Pe.preventDefault()}}))}),T5=In.forwardRef((L,I)=>{const{__scopeDialog:K,trapFocus:se,onOpenAutoFocus:Pe,onCloseAutoFocus:R,...E}=L,e=ic(sd,K),_=In.useRef(null),k=gd(I,_);return j7(),In.createElement(In.Fragment,null,In.createElement(P7,{asChild:!0,loop:!0,trapped:se,onMountAutoFocus:Pe,onUnmountAutoFocus:R},In.createElement(E7,Io({role:"dialog",id:e.contentId,"aria-describedby":e.descriptionId,"aria-labelledby":e.titleId,"data-state":A5(e.open)},E,{ref:k,onDismiss:()=>e.onOpenChange(!1)}))),!1)}),RA="DialogTitle",zA=In.forwardRef((L,I)=>{const{__scopeDialog:K,...se}=L,Pe=ic(RA,K);return In.createElement(jh.h2,Io({id:Pe.titleId},se,{ref:I}))}),DA="DialogDescription",FA=In.forwardRef((L,I)=>{const{__scopeDialog:K,...se}=L,Pe=ic(DA,K);return In.createElement(jh.p,Io({id:Pe.descriptionId},se,{ref:I}))}),BA="DialogClose",NA=In.forwardRef((L,I)=>{const{__scopeDialog:K,...se}=L,Pe=ic(BA,K);return In.createElement(jh.button,Io({type:"button"},se,{ref:I,onClick:kf(L.onClick,()=>Pe.onOpenChange(!1))}))});function A5(L){return L?"open":"closed"}const jA=SA,UA=CA,VA=PA,HA=zA,qA=FA,l_=NA,u_=({title:L,titleId:I,...K})=>hr("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,...K,children:hr("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),M5={margin:"2px 0px 2px 10px",padding:"5px 2px 2px 5px"};function vd({open:L,close:I,title:K,description:se,children:Pe}){return Wr(jA,{open:L,onOpenChange:I,children:[hr(UA,{onClick:I,className:"_modal-overlay"}),Wr(VA,{className:"_modal",children:[hr(HA,{className:"_modal-title",children:K}),hr(qA,{className:"_modal_description",children:se}),hr(l_,{children:hr(u_,{})}),Pe,hr(l_,{className:"_modal-close",onClick:I,children:hr(u_,{className:"w-6 h-6"})})]})]})}const c_=new FileReader,GA={overlaying:"y",side:"left",tickfont:{size:12},tickpadding:5,showgrid:!1,showline:!1,showticklabels:!0,showlegend:!0,zeroline:!1,anchor:"x",type:"linear",autorange:!0};function WA({open:L,close:I,setLoading:K,addOverlay:se,plotlyData:Pe}){const[R,E]=In.useState("scatter"),[e,_]=In.useState("#FFDD00"),[k,i]=In.useState("#00ACFF"),[w,v]=In.useState("#FF0000"),[h,s]=In.useState(""),[t,a]=In.useState([]),[r,n]=In.useState([]),[o,l]=In.useState({}),[u,d]=In.useState({}),c=["x","open","high","low","close"];let b={scatter:"Scatter (Line)",candlestick:"Candlestick",bar:"Bar"};const[g,f]=In.useState({});function x(){I(),E("scatter"),s(""),a([]),n([]),l({}),f({})}function y(){var T,p;if(t.length==0){(T=document.getElementById("csv_file"))==null||T.focus(),(p=document.getElementById("csv_file"))==null||p.style.setProperty("border","1px solid red"),document.getElementById("csv_file_warning").style.display="block";return}const m=ZA({csvData:t,plotlyData:Pe,yaxisOptions:u,traceType:R,traceColor:e,traceName:h,options:g,increasingColor:k,decreasingColor:w});se(m),x()}return hr(vd,{title:"Overlay Chart",description:"Upload a CSV file to overlay a chart on the main chart.",open:L,close:I,children:Wr("div",{id:"popup_csv",className:"popup_content",children:[Wr("div",{children:[Wr("label",{htmlFor:"csv_file",children:[hr("b",{children:"CSV file:"}),hr("div",{id:"csv_file_warning",className:"popup_warning",style:{marginLeft:"80px",marginBottom:"10px"},children:"CSV file is required."})]}),hr("input",{onChange:m=>{var T,p;if(m.target.files){if(m.target.files[0].type!=="text/csv"){(T=document.getElementById("csv_file"))==null||T.focus(),(p=document.getElementById("csv_file"))==null||p.style.setProperty("border","1px solid red"),document.getElementById("csv_file_warning").style.display="block";return}}else return;r.length>0&&(n([]),l({}),f({}),E("scatter")),c_.onload=M=>{var G;if(!((G=M.target)!=null&&G.result)||typeof M.target.result!="string")return;let A=M.target.result.split(` -`).map(U=>U.replace(/\r/g,""));const C=A[0].split(","),P=C.map(U=>U.trim().toLowerCase());let O={};for(let U=0;UP.includes(U))&&E("candlestick"),P.includes("close")&&(f({...g,y:C[P.indexOf("close")]}),O.y=C[P.indexOf("close")]);let Y=[];for(let U=1;U2&&(j.test(U[0])?U.splice(0,2):j.test(U[U.length-2])&&U.splice(U.length-2,2),D=U.join("_").replace(/openbb_/g,""))}}catch(U){console.log(U)}s(D),f(O),n(C),a(Y)},c_.readAsText(m.target.files[0])},type:"file",id:"csv_file",accept:".csv",style:{marginLeft:10}})]}),Wr("div",{style:{marginTop:15},children:[hr("label",{htmlFor:"csv_trace_type",children:hr("b",{children:"Display data type:"})}),Wr("select",{onChange:m=>{E(m.target.value)},id:"csv_trace_type",style:M5,defaultValue:b[R],children:[R&&hr("option",{value:R,children:b[R]},R),Object.keys(b).map(m=>R!==m&&hr("option",{value:m,children:b[m]},m))]})]}),Wr("div",{style:{marginTop:12},children:[hr("label",{htmlFor:"csv_name",children:hr("b",{children:"Trace Name:"})}),hr("textarea",{id:"csv_name",value:h,onChange:m=>{s(m.target.value)},style:{padding:"5px 2px 2px 5px",width:"100%",maxWidth:"100%",maxHeight:200,marginTop:2},rows:2,cols:20,placeholder:"Enter a name to give this trace"})]}),r.length>0&&Wr(Sg,{children:[["scatter","bar"].includes(R)&&hr("div",{style:{marginTop:15,marginBottom:10},id:"csv_columns",className:"csv_column_container",children:["x","y"].map(m=>Wr("div",{style:{marginTop:10,display:"flex",alignItems:"center",justifyContent:"space-between"},children:[Wr("label",{htmlFor:`csv_${m}`,style:{width:"100px"},children:[m.toUpperCase()," Axis"]}),Wr("select",{onChange:T=>{l({...o,[m]:T.target.value}),f({...g,[m]:T.target.value})},id:`csv_${m}`,style:{width:"100%"},defaultValue:g[m],children:[g[m]&&hr("option",{value:g[m],children:g[m]},m),r.map(T=>hr("option",{value:T,children:T},T))]})]},m))}),R==="candlestick"&&hr("div",{id:"csv_columns",className:"csv_column_container",style:{marginTop:15},children:["x","open","high","low","close"].map(m=>Wr("div",{style:{marginTop:10,display:"flex",alignItems:"center",justifyContent:"space-between"},children:[hr("label",{htmlFor:`csv_${m}`,style:{width:"100px"},children:m.charAt(0).toUpperCase()+m.slice(1)}),Wr("select",{onChange:T=>{l({...o,[m]:T.target.value}),f({...g,[m]:T.target.value})},id:`csv_${m}`,style:{width:"100%"},children:[g[m]&&hr("option",{value:g[m],children:g[m]},m),r.map(T=>T!=g[T]&&hr("option",{value:T,children:T},T))]})]},m))}),Wr("div",{style:{marginTop:20},id:"csv_colors",children:[["scatter","bar"].includes(R)&&Wr("div",{children:[hr("label",{htmlFor:"csv_color",children:`${R.charAt(0).toUpperCase()}${R.slice(1)} color`}),hr("input",{type:"color",id:"csv_color",defaultValue:"#FFDD00",style:{margin:"2px 2px 2px 10px"},onChange:m=>{console.log(m.target.value),_(m.target.value)}})]}),R==="candlestick"&&Wr(Sg,{children:[hr("label",{htmlFor:"csv_increasing",children:"Increasing color"}),hr("input",{type:"color",id:"csv_increasing",defaultValue:"#00ACFF",style:{margin:"2px 0px 2px 10px"},onChange:m=>{i(m.target.value)}}),hr("label",{htmlFor:"csv_decreasing",style:{marginLeft:15},children:"Decreasing color"}),hr("input",{style:{margin:"2px 0px 2px 10px"},type:"color",id:"csv_decreasing",defaultValue:"#FF0000",onChange:m=>{v(m.target.value)}})]})]}),Wr("div",{style:{marginTop:20},id:"csv_plot_yaxis_options",children:[R!=="candlestick"&&Wr(Sg,{children:[hr("input",{type:"checkbox",id:"csv_percent_change",name:"csv_plot_yaxis_check",style:{marginBottom:2},onChange:m=>{d({...u,percentChange:m.target.checked,sameYaxis:!1})},checked:!u.sameYaxis&&u.percentChange}),hr("label",{htmlFor:"csv_percent_change",style:{marginLeft:5},children:"Plot as percent change from first value"}),hr("br",{})]}),hr("input",{style:{marginTop:2},type:"checkbox",id:"csv_same_yaxis",name:"csv_plot_yaxis_check",onChange:m=>{d({...u,sameYaxis:m.target.checked,percentChange:!1})},checked:!u.percentChange&&u.sameYaxis}),hr("label",{htmlFor:"csv_same_yaxis",style:{marginLeft:5},children:"Share Y-axis"}),R==="bar"&&Wr("div",{style:{marginTop:2},id:"csv_bar_orientation",children:[hr("input",{type:"checkbox",id:"csv_bar_horizontal",onChange:m=>{f({...g,orientation:m.target.checked?"h":"v"})}}),hr("label",{htmlFor:"csv_bar_horizontal",style:{marginLeft:5},children:"Plot horizontally"})]})]})]}),hr("br",{}),Wr("div",{style:{float:"right",marginTop:20},children:[hr("button",{className:"_btn-tertiary",id:"csv_cancel",onClick:x,children:"Cancel"}),hr("button",{className:"_btn",id:"csv_submit",onClick:y,children:"Submit"})]})]})})}function ZA({csvData:L,plotlyData:I,yaxisOptions:K,traceType:se,traceColor:Pe,traceName:R,options:E,increasingColor:e,decreasingColor:_}){let k=I.data[0];k.xaxis==null&&(k.xaxis="x"),k.yaxis==null&&(k.yaxis="y");let i=k.yaxis,w,h=Object.keys(I.layout).filter(r=>r.startsWith("yaxis")).map(r=>I.layout[r]).filter(r=>r.side=="left"&&(r.overlaying=="y"||r.fixedrange!=null&&r.fixedrange==!0)).length>0?" ":"";if(K.sameYaxis!==!0){const r=Object.keys(I.layout).filter(n=>n.startsWith("yaxis")).map(n=>I.layout[n]);w=`y${r.length+1}`,i=`yaxis${r.length+1}`,console.log(`yaxis: ${w} ${i}`),I.layout[i]={...GA,title:{text:R,font:{size:14},standoff:0},ticksuffix:h,layer:"below traces"}}else w=k.yaxis.replace("yaxis","y");const s={type:se,name:R,showlegend:!0,yaxis:w};let t={};if(["scatter","bar"].includes(se)){const r=L.findIndex(n=>n[E.y]!=null&&n[E.y]!=0);t={...s,x:L.map(n=>n[E.x]),y:L.map(function(n){return K.percentChange&&se==="scatter"?(n[E.y]-L[r][E.y])/L[r][E.y]:n[E.y]}),customdata:L.map(n=>n[E.y]),hovertemplate:"%{customdata:.2f}",connectgaps:!0,marker:{color:Pe}},se==="bar"&&(t.orientation=E.orientation,t.marker.opacity=.7,delete t.connectgaps,delete t.hovertemplate,delete t.customdata)}else se==="candlestick"&&(t={...s,x:L.map(r=>r[E.x]),open:L.map(r=>r[E.open]),high:L.map(r=>r[E.high]),low:L.map(r=>r[E.low]),close:L.map(r=>r[E.close]),increasing:{line:{color:e}},decreasing:{line:{color:_}}});return{...I,data:[...I.data,t]}}function YA({plotlyData:L,open:I,close:K,defaultTitle:se,updateTitle:Pe,updateAxesTitles:R}){const[E,e]=In.useState(se),_=Object.keys(L.layout||{}).filter(v=>v.startsWith("yaxis")&&L.layout[v].range!=null),k=Object.keys(L.layout||{}).filter(v=>{var h;return v.startsWith("xaxis")&&L.layout[v].showticklabels!=null&&((h=L.layout[v])==null?void 0:h.anchor)}),[i,w]=In.useState({});return hr(vd,{title:"Chart Titles",description:"Change the titles on the chart.",open:I,close:K,children:Wr("div",{id:"popup_title",className:"popup_content",children:[Wr("div",{style:{display:"flex",flexDirection:"column",gap:0},children:[Wr("div",{children:[hr("label",{htmlFor:"title_text",children:hr("b",{children:"Title:"})}),hr("textarea",{id:"title_text",style:{...M5,width:"100%",maxWidth:"100%",maxHeight:"200px",marginTop:"8px",marginLeft:"0px"},rows:2,cols:20,value:E,onChange:v=>e(v.target.value)})]}),hr("div",{id:"xaxis_div",className:"csv_column_container",style:{marginTop:5,marginBottom:-5},children:k.map((v,h)=>{var s,t;return Wr("div",{style:{marginTop:5,marginBottom:5},children:[hr("label",{htmlFor:`title_${v}`,children:h===0?hr("b",{children:"X axis:"}):Wr("b",{children:["X axis ",h+1,":"]})}),hr("input",{id:`title_${v}`,style:{marginLeft:"0px",padding:"5px 2px 2px 5px"},type:"text",defaultValue:((t=(s=L==null?void 0:L.layout[v])==null?void 0:s.title)==null?void 0:t.text)||"",onChange:a=>{w({...i,[v]:a.target.value})}})]},v)})}),hr("div",{id:"yaxis_div",className:"csv_column_container",style:{marginTop:5,marginBottom:5},children:_.map((v,h)=>{var s,t;return Wr("div",{style:{marginTop:10},children:[hr("label",{htmlFor:`title_${v}`,children:h===0?hr("b",{children:"Y axis:"}):Wr("b",{children:["Y axis ",h+1,":"]})}),hr("input",{id:`title_${v}`,style:{marginLeft:"0px",padding:"5px 2px 2px 5px"},type:"text",defaultValue:((t=(s=L==null?void 0:L.layout[v])==null?void 0:s.title)==null?void 0:t.text)||"",onChange:a=>{w({...i,[v]:a.target.value})}})]},v)})})]}),Wr("div",{style:{float:"right",marginTop:20},children:[hr("button",{className:"_btn-tertiary ph-capture",id:"title_cancel",onClick:K,children:"Cancel"}),hr("button",{className:"_btn ph-capture",id:"title_submit",onClick:()=>{Pe(E),R(i),K()},children:"Submit"})]})]})})}const f_={padding:"5px 2px 2px 5px",margin:"2px 0"};function XA({open:L,close:I,addAnnotation:K,deleteAnnotation:se,popupData:Pe}){var s,t,a,r,n;const R={text:"",color:"#0088CC",size:18,bordercolor:"#822661",yanchor:"above"},[E,e]=In.useState(R),[_,k]=In.useState(R);Pe&&Pe!==E&&Pe.annotation&&(Pe.annotation=(Pe==null?void 0:Pe.annotation)||{},e(Pe),k(Pe));function i(){console.log("closing"),e(R),k(R),I()}function w(o){console.log(o.target.id.replace("addtext_",""),o.target.value);const l=o.target.id.replace("addtext_",""),u=o.target.value;k({..._,[l]:u})}function v(){console.log("submitting",_),_.text!==""?(E!=null&&E.annotation&&k({..._,annotation:E.annotation}),K(_),I()):(document.getElementById("popup_textarea_warning").style.display="block",document.getElementById("addtext_text").style.border="1px solid red")}function h(){se(E),i()}return hr(vd,{title:"Add Text to Chart",description:"Change the titles on the chart.",open:L,close:i,children:Wr("div",{id:"popup_title",className:"popup_content",children:[Wr("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[Wr("div",{style:{marginBottom:20},children:[Wr("label",{htmlFor:"popup_text",children:[hr("b",{children:"Text:"}),hr("div",{id:"popup_textarea_warning",className:"popup_warning",children:"Text is required"})]}),hr("textarea",{id:"addtext_text",style:{...f_,width:"100%",maxWidth:"100%",maxHeight:"200px",marginTop:"8px"},rows:4,cols:50,placeholder:"Enter text here",onChange:w,defaultValue:((s=E==null?void 0:E.annotation)==null?void 0:s.text)||(_==null?void 0:_.text)})]}),Wr("div",{style:{display:"flex",gap:15,alignItems:"center",flexWrap:"wrap",columnCount:2,justifyContent:"space-between",marginBottom:20},children:[hr("label",{htmlFor:"addtext_color",children:hr("b",{children:"Font color"})}),hr("input",{type:"color",id:"addtext_color",style:{margin:"2px 2px 2px 15px"},defaultValue:((t=E==null?void 0:E.annotation)==null?void 0:t.color)||(_==null?void 0:_.color),onChange:w}),hr("label",{htmlFor:"addtext_bordercolor",style:{marginLeft:20},children:hr("b",{children:"Border color"})}),hr("input",{type:"color",id:"addtext_bordercolor",style:{margin:"2px 2px 10px 15px"},defaultValue:((a=E==null?void 0:E.annotation)==null?void 0:a.bordercolor)||(_==null?void 0:_.bordercolor),onChange:w}),hr("label",{htmlFor:"addtext_size",children:hr("b",{children:"Font size"})}),hr("input",{style:{...f_,width:"52px",margin:"0px 0px 0px 2px"},type:"number",id:"addtext_size",onChange:w,defaultValue:((r=E==null?void 0:E.annotation)==null?void 0:r.size)||(_==null?void 0:_.size)}),Wr("div",{children:[hr("label",{htmlFor:"addtext_yanchor",style:{marginRight:31},children:hr("b",{children:"Position"})}),Wr("select",{id:"addtext_yanchor",name:"yanchor",style:{width:"100px"},defaultValue:((n=E==null?void 0:E.annotation)==null?void 0:n.yanchor)||(_==null?void 0:_.yanchor),onChange:w,children:[hr("option",{value:"above",children:"Above"}),hr("option",{value:"below",children:"Below"})]})]})]})]}),Wr("div",{style:{float:"right",marginTop:20},children:[hr("button",{className:"_btn-tertiary ph-capture",id:"title_cancel",onClick:i,children:"Cancel"}),hr("button",{className:"_btn ph-capture",id:"title_delete",onClick:h,children:"Delete"}),hr("button",{className:"_btn ph-capture",id:"title_submit",onClick:v,children:"Submit"})]})]})})}function $A({plotData:L,popup_data:I,current_text:K}){var _;let se=I.x,Pe=I.y,R=I.yref,E=((_=L==null?void 0:L.layout)==null?void 0:_.annotations)||[],e=-1;for(let k=0;kx!=null)),L.layout.dragmode="pan",K({...L,...l.update}),i.removeAllListeners("plotly_click")};I.text=I.text.replace(/\n/g,"
");let v,h=!1;if(I.annotation){console.log("data",I),v={x:I.annotation.x,y:I.annotation.y,yref:I.annotation.yref,yanchor:I.annotation.ya.x==I.annotation.x&&a.y==I.annotation.y&&a.yref==I.annotation.yref);console.log("ohlcAnnotationIndex",t),t==-1?_([...e,s.annotation]):(e[t]=s.annotation,_(e))}R([...k,s.annotation].filter(t=>t!=null)),L.layout.dragmode="pan",K({...L,...s.update}),Pe({});return}i.on("plotly_clickannotation",s=>{console.log("plotly_clickannotation",s);let t=s.annotation;if(t.text==null){console.log("annotation.text is undefined");return}console.log("annotation.text",t.text),t.text=t.text.replace(/
/g,` -`);let a={x:t.x,y:t.y,high:(t==null?void 0:t.high)??void 0,low:(t==null?void 0:t.low)??void 0,yanchor:t.y'),!0):I?L.some(function(K){return I.includes(K)})||L.includes("*"):!0}var a9=function(I,K,se){se===void 0&&(se=!1);var Pe=K.alt,R=K.meta,E=K.mod,e=K.shift,_=K.ctrl,k=K.keys,i=I.key,w=I.code,v=I.ctrlKey,h=I.metaKey,s=I.shiftKey,t=I.altKey,a=Oc(w),r=i.toLowerCase();if(!se){if(Pe===!t&&r!=="alt"||e===!s&&r!=="shift")return!1;if(E){if(!h&&!v)return!1}else if(R===!h&&r!=="meta"&&r!=="os"||_===!v&&r!=="ctrl"&&r!=="control")return!1}return k&&k.length===1&&(k.includes(r)||k.includes(a))?!0:k?e9(k):!k},o9=In.createContext(void 0),s9=function(){return In.useContext(o9)};function P5(L,I){return L&&I&&typeof L=="object"&&typeof I=="object"?Object.keys(L).length===Object.keys(I).length&&Object.keys(L).reduce(function(K,se){return K&&P5(L[se],I[se])},!0):L===I}var l9=In.createContext({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),u9=function(){return In.useContext(l9)};function c9(L){var I=In.useRef(void 0);return P5(I.current,L)||(I.current=L),I.current}var p_=function(I){I.stopPropagation(),I.preventDefault(),I.stopImmediatePropagation()},f9=typeof window<"u"?In.useLayoutEffect:In.useEffect;function _c(L,I,K,se){var Pe=In.useRef(null),R=In.useRef(!1),E=K instanceof Array?se instanceof Array?void 0:se:K,e=L instanceof Array?L.join(E==null?void 0:E.splitKey):L,_=K instanceof Array?K:se instanceof Array?se:void 0,k=In.useCallback(I,_??[]),i=In.useRef(k);_?i.current=k:i.current=I;var w=c9(E),v=u9(),h=v.enabledScopes,s=s9();return f9(function(){if(!((w==null?void 0:w.enabled)===!1||!i9(h,w==null?void 0:w.scopes))){var t=function(l,u){var d;if(u===void 0&&(u=!1),!(r9(l)&&!L5(l,w==null?void 0:w.enableOnFormTags))&&!(w!=null&&w.ignoreEventWhen!=null&&w.ignoreEventWhen(l))){if(Pe.current!==null&&document.activeElement!==Pe.current&&!Pe.current.contains(document.activeElement)){p_(l);return}(d=l.target)!=null&&d.isContentEditable&&!(w!=null&&w.enableOnContentEditable)||hv(e,w==null?void 0:w.splitKey).forEach(function(c){var b,g=pv(c,w==null?void 0:w.combinationKey);if(a9(l,g,w==null?void 0:w.ignoreModifiers)||(b=g.keys)!=null&&b.includes("*")){if(u&&R.current)return;if(t9(l,g,w==null?void 0:w.preventDefault),!n9(l,g,w==null?void 0:w.enabled)){p_(l);return}i.current(l,g),u||(R.current=!0)}})}},a=function(l){l.key!==void 0&&(E5(Oc(l.code)),((w==null?void 0:w.keydown)===void 0&&(w==null?void 0:w.keyup)!==!0||w!=null&&w.keydown)&&t(l))},r=function(l){l.key!==void 0&&(C5(Oc(l.code)),R.current=!1,w!=null&&w.keyup&&t(l,!0))},n=Pe.current||(E==null?void 0:E.document)||document;return n.addEventListener("keyup",r),n.addEventListener("keydown",a),s&&hv(e,w==null?void 0:w.splitKey).forEach(function(o){return s.addHotkey(pv(o,w==null?void 0:w.combinationKey,w==null?void 0:w.description))}),function(){n.removeEventListener("keyup",r),n.removeEventListener("keydown",a),s&&hv(e,w==null?void 0:w.splitKey).forEach(function(o){return s.removeHotkey(pv(o,w==null?void 0:w.combinationKey,w==null?void 0:w.description))})}}},[e,w,h]),Pe}var O5={exports:{}};(function(L){(function(I){var K=o(),se=l(),Pe=u(),R=d(),E={imagePlaceholder:void 0,cacheBust:!1},e={toSvg:_,toPng:i,toJpeg:w,toBlob:v,toPixelData:k,impl:{fontFaces:Pe,images:R,util:K,inliner:se,options:{}}};L.exports=e;function _(c,b){return b=b||{},h(b),Promise.resolve(c).then(function(f){return t(f,b.filter,!0)}).then(a).then(r).then(g).then(function(f){return n(f,b.width||K.width(c),b.height||K.height(c))});function g(f){return b.bgcolor&&(f.style.backgroundColor=b.bgcolor),b.width&&(f.style.width=b.width+"px"),b.height&&(f.style.height=b.height+"px"),b.style&&Object.keys(b.style).forEach(function(x){f.style[x]=b.style[x]}),f}}function k(c,b){return s(c,b||{}).then(function(g){return g.getContext("2d").getImageData(0,0,K.width(c),K.height(c)).data})}function i(c,b){return s(c,b||{}).then(function(g){return g.toDataURL()})}function w(c,b){return b=b||{},s(c,b).then(function(g){return g.toDataURL("image/jpeg",b.quality||1)})}function v(c,b){return s(c,b||{}).then(K.canvasToBlob)}function h(c){typeof c.imagePlaceholder>"u"?e.impl.options.imagePlaceholder=E.imagePlaceholder:e.impl.options.imagePlaceholder=c.imagePlaceholder,typeof c.cacheBust>"u"?e.impl.options.cacheBust=E.cacheBust:e.impl.options.cacheBust=c.cacheBust}function s(c,b){return _(c,b).then(K.makeImage).then(K.delay(100)).then(function(f){var x=g(c);return x.getContext("2d").drawImage(f,0,0),x});function g(f){var x=document.createElement("canvas");if(x.width=b.width||K.width(f),x.height=b.height||K.height(f),b.bgcolor){var y=x.getContext("2d");y.fillStyle=b.bgcolor,y.fillRect(0,0,x.width,x.height)}return x}}function t(c,b,g){if(!g&&b&&!b(c))return Promise.resolve();return Promise.resolve(c).then(f).then(function(m){return x(c,m,b)}).then(function(m){return y(c,m)});function f(m){return m instanceof HTMLCanvasElement?K.makeImage(m.toDataURL()):m.cloneNode(!1)}function x(m,T,p){var M=m.childNodes;if(M.length===0)return Promise.resolve(T);return A(T,K.asArray(M),p).then(function(){return T});function A(C,P,O){var z=Promise.resolve();return P.forEach(function(B){z=z.then(function(){return t(B,O)}).then(function(Y){Y&&C.appendChild(Y)})}),z}}function y(m,T){if(!(T instanceof Element))return T;return Promise.resolve().then(p).then(M).then(A).then(C).then(function(){return T});function p(){P(window.getComputedStyle(m),T.style);function P(O,z){O.cssText?z.cssText=O.cssText:B(O,z);function B(Y,D){K.asArray(Y).forEach(function(G){D.setProperty(G,Y.getPropertyValue(G),Y.getPropertyPriority(G))})}}}function M(){[":before",":after"].forEach(function(O){P(O)});function P(O){var z=window.getComputedStyle(m,O),B=z.getPropertyValue("content");if(B===""||B==="none")return;var Y=K.uid();T.className=T.className+" "+Y;var D=document.createElement("style");D.appendChild(G(Y,O,z)),T.appendChild(D);function G(U,j,W){var Z="."+U+":"+j,ie=W.cssText?te(W):J(W);return document.createTextNode(Z+"{"+ie+"}");function te(X){var ee=X.getPropertyValue("content");return X.cssText+" content: "+ee+";"}function J(X){return K.asArray(X).map(ee).join("; ")+";";function ee(re){return re+": "+X.getPropertyValue(re)+(X.getPropertyPriority(re)?" !important":"")}}}}}function A(){m instanceof HTMLTextAreaElement&&(T.innerHTML=m.value),m instanceof HTMLInputElement&&T.setAttribute("value",m.value)}function C(){T instanceof SVGElement&&(T.setAttribute("xmlns","http://www.w3.org/2000/svg"),T instanceof SVGRectElement&&["width","height"].forEach(function(P){var O=T.getAttribute(P);O&&T.style.setProperty(P,O)}))}}}function a(c){return Pe.resolveAll().then(function(b){var g=document.createElement("style");return c.appendChild(g),g.appendChild(document.createTextNode(b)),c})}function r(c){return R.inlineAll(c).then(function(){return c})}function n(c,b,g){return Promise.resolve(c).then(function(f){return f.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),new XMLSerializer().serializeToString(f)}).then(K.escapeXhtml).then(function(f){return''+f+""}).then(function(f){return''+f+""}).then(function(f){return"data:image/svg+xml;charset=utf-8,"+f})}function o(){return{escape:C,parseExtension:b,mimeType:g,dataAsUrl:A,isDataUrl:f,canvasToBlob:y,resolveUrl:m,getAndEncode:M,uid:T(),delay:P,asArray:O,escapeXhtml:z,makeImage:p,width:B,height:Y};function c(){var G="application/font-woff",U="image/jpeg";return{woff:G,woff2:G,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:U,jpeg:U,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"}}function b(G){var U=/\.([^\.\/]*?)$/g.exec(G);return U?U[1]:""}function g(G){var U=b(G).toLowerCase();return c()[U]||""}function f(G){return G.search(/^(data:)/)!==-1}function x(G){return new Promise(function(U){for(var j=window.atob(G.toDataURL().split(",")[1]),W=j.length,Z=new Uint8Array(W),ie=0;ie{if(L)return d9({fileHandle:L,blob:I})},d9=async({fileHandle:L,blob:I})=>{const K=await L.createWritable();await K.write(I),await K.close()},g9=[{description:"PNG Image",accept:{"image/png":[".png"]}},{description:"JPEG Image",accept:{"image/jpeg":[".jpeg"]}},{description:"SVG Image",accept:{"image/svg+xml":[".svg"]}}],R5=({filename:L,is_image:I})=>{try{if("showSaveFilePicker"in window){const K={suggestedName:L,types:I?g9:[{description:"CSV File",accept:{"image/csv":[".csv"]}}],excludeAcceptAllOption:!0};return showSaveFilePicker(K)}}catch(K){console.error(K)}return new Promise(K=>{K(null)})},zy=(L,I,K)=>{try{if(K===null)throw new Error("Cannot access filesystem");return p9({fileHandle:K,blob:L})}catch(se){console.error("oops, something went wrong!",se);const Pe=URL.createObjectURL(L),R=document.createElement("a");R.setAttribute("href",Pe),R.setAttribute("download",I),R.style.visibility="hidden",document.body.appendChild(R),R.click(),document.body.removeChild(R)}return new Promise(se=>{se(!0)})};async function d_(L,I){const K=L.data;let se=[];const Pe=[],R="title"in L.layout.xaxis&&L.layout.xaxis.title.text!==void 0?L.layout.xaxis.title.text:"x",E="title"in L.layout.yaxis&&L.layout.yaxis.title.text!==void 0?L.layout.yaxis.title.text:"y";return K.forEach(function(e){e.type==="candlestick"&&(se.length===0&&(se=["Date","Open","High","Low","Close"]),e.x.forEach(function(_,k){Pe.push([_,e.open[k],e.high[k],e.low[k],e.close[k]])})),["scatter","bar"].includes(e.type)&&(se.length===0&&se.push(R),se.push(e.name!==void 0?e.name:E),e.x.forEach(function(_,k){Pe[k]===void 0&&(Pe[k]=[_]),Pe[k].push(e.y[k])}))}),await v9(se,Pe,I)}async function v9(L,I,K){const se=L,Pe=I.map(k=>k.map(i=>i==null?"":typeof i=="object"?JSON.stringify(i):i.toString().replace(/"/g,'""'))),E=[se,...Pe].map(k=>k.join(",")).join(` -`),e=new Blob([E],{type:"text/csv;charset=utf-8;"}),_=`${window.title}.csv`;try{const k=await R5({filename:_});await ld("Saving CSV"),Eh(async function(){zy(e,_,k).then(async function(){await new Promise(i=>setTimeout(i,1500)),k||K(!0),await ld("",!0)})},2)()}catch(k){console.error(k)}}function ld(L,I){const K=window.document.getElementById("loading"),se=window.document.getElementById("loading_text");return new Promise(Pe=>{I?K.classList.remove("show"):(se.innerHTML=L,K.classList.add("show"));const R=setInterval(function(){(I?!K.classList.contains("show"):K.classList.contains("show"))&&(clearInterval(R),Pe(!0))},.01)})}const Eh=(L,I)=>{let K;return function(){const se=this,Pe=arguments;clearTimeout(K),K=setTimeout(()=>L.apply(se,Pe),I)}},m9={yref:"paper",xref:"paper",x:1,y:0,text:"OpenBB Terminal",font_size:17,font_color:"gray",opacity:.5,xanchor:"right",yanchor:"bottom",yshift:-80,xshift:40};async function g_(L,I,K=!1){const se=document.getElementById("plotlyChart");K&&(se.layout.annotations.push(m9),se.globals.cmd_idx!==void 0&&se.globals.cmd_src!==void 0&&(se.layout.annotations[se.globals.cmd_idx].text=se.globals.cmd_src),ds.relayout(se,{"title.text":se.globals.title,margin:se.globals.old_margin})),K||(se.globals.cmd_idx!==void 0&&se.globals.cmd_src!==void 0&&(se.layout.annotations[se.globals.cmd_idx].text=""),se.layout.annotations.splice(I,1),ds.relayout(se,{"title.text":"",margin:L}))}async function z5(L,I,K){const se=document.getElementById(L);if(["svg","pdf"].includes(K)){const Pe=document.getElementById("plotlyChart"),R=Pe.layout.margin,E=Pe.layout.annotations.length;await g_(R,E,!0),ds.downloadImage(Pe,{format:"svg",height:Pe.clientHeight,width:Pe.clientWidth,filename:window.title}),await g_(R,E,!1),await ld("",!0);return}Eh(async function(){I5.toBlob(se).then(function(Pe){zy(Pe,I,null)})},2)()}async function v_(L,I,K,se){const Pe=document.getElementById(L),R=`${window.title}.png`;try{K(!0);const E=await R5({filename:R,is_image:!0});let e="png";if(E!==null&&(e=E.name.split(".").pop()),await ld(`Saving ${e.toUpperCase()}`),["svg","pdf"].includes(e)){await z5(L,R,e),I(!1),K(!1),E||se(!0);return}Eh(async function(){I5.toBlob(Pe).then(function(_){zy(_,R,E).then(async function(){await ld("",!0),I(!1),K(!1),E||se(!0)})})},2)()}catch(E){console.error(E),I(!1),K(!1)}K(!1)}function Cc(L=!0){return new Promise(I=>{window.MODEBAR||(window.MODEBAR=window.document.getElementsByClassName("modebar-container")[0],window.MODEBAR.style.cssText=`${window.MODEBAR.style.cssText}; display:flex;`),window.MODEBAR&&(window.MODEBAR.style.cssText.includes("display: none")||!L?window.MODEBAR.style.cssText=`${window.MODEBAR.style.cssText}; display:flex;`:window.MODEBAR.style.cssText=`${window.MODEBAR.style.cssText}; display:none;`,I(!0))})}function y9({setModal:L,changeTheme:I,autoScaling:K,Loading:se,changeColor:Pe,downloadFinished:R}){return _c("ctrl+shift+t",()=>{L({name:"titleDialog"})},{preventDefault:!0}),_c("ctrl+t",()=>{L({name:"textDialog"})},{preventDefault:!0}),_c("ctrl+o",()=>{L({name:"overlayChart"})},{preventDefault:!0}),_c(["ctrl+shift+h","ctrl+h"],()=>{Cc()},{preventDefault:!0}),_c("ctrl+e",()=>{Pe(!0)},{preventDefault:!0}),_c("ctrl+shift+s",async()=>{L({name:"downloadCsv"}),await d_(document.getElementById("plotlyChart"),R)},{preventDefault:!0}),_c("ctrl+s",async()=>{Cc(),v_("MainChart",Cc,se,R)},{preventDefault:!0}),_c("ctrl+w",()=>{window.close()},{preventDefault:!0}),{plotGlPixelRatio:1,scrollZoom:!0,responsive:!0,displaylogo:!1,displayModeBar:!0,modeBarButtonsToRemove:["lasso2d","select2d","downloadImage"],modeBarButtons:[[{name:"Download CSV (Ctrl+Shift+S)",icon:Wu.downloadCsv,click:async function(e){await d_(e,R)}},{name:"Download Chart as Image (Ctrl+S)",icon:Wu.downloadImage,click:async function(){Cc(),await v_("MainChart",Cc,se,R)}}],[{name:"Edit Color (Ctrl+E)",icon:Wu.changeColor,click:function(){Pe(!0)}},"drawline","drawopenpath","drawcircle","drawrect","eraseshape"],[{name:"Overlay chart from CSV (Ctrl+O)",icon:Wu.plotCsv,click:function(){L({name:"overlayChart"})}},{name:"Add Text (Ctrl+T)",icon:Wu.addText,click:function(){L({name:"textDialog",data:{text:""}})}},{name:"Change Titles (Ctrl+Shift+T)",icon:Wu.changeTitle,click:function(){L({name:"titleDialog"})}},{name:"Change Theme",icon:Wu.sunIcon,click:function(){I(!0)}}],["hoverClosestCartesian","hoverCompareCartesian","toggleSpikelines"],[{name:"Auto Scale (Ctrl+Shift+A)",icon:ds.Icons.autoscale,click:function(){K(!0)}},"zoomIn2d","zoomOut2d","autoScale2d","zoom2d","pan2d"]]}}async function m_(L,I){try{if(L["xaxis.range[0]"]!==void 0){const K=L["xaxis.range[0]"],se=L["xaxis.range[1]"],Pe={},R=[];let E,e;const _=I.data.filter(w=>w.yaxis!==void 0),k=[...new Set(_.map(w=>w.yaxis||w.y!==void 0||w.type==="candlestick"))],i=w=>I.data.filter(v=>v.yaxis===w&&(v.y||v.type==="candlestick"));return k.forEach(w=>{if(typeof w!="string")return;const v=`yaxis${w.replace("y","")}`;let h=[],s=[],t=I.layout[v].type==="log";i(w).forEach(n=>{const o=n.x;t=I.layout[v].type==="log";let l=n.y!==void 0?n.y:[],u=n.type==="candlestick"?n.low:[],d=n.type==="candlestick"?n.high:[];t&&(l=l.map(Math.log10),n.type==="candlestick"&&(u=n.low.map(Math.log10),d=n.high.map(Math.log10)));const c=o.map((b,g)=>{let f=null;return b>=K&&b<=se&&(n.y!==void 0&&(f=l[g]),n.type==="candlestick"&&(h.push(u[g]),h.push(d[g]))),f});s=s.concat(c)}),s=s.filter(n=>n!=null),E=Math.min(...s),e=Math.max(...s),h.length>0&&(h=h.filter(n=>n!=null),E=Math.min(...h),e=Math.max(...h));const a=e,r=I.layout[v].fixedrange!==void 0&&v!=="yaxis"&&I.layout[v].fixedrange===!0;if(E!==void 0&&e!==void 0){const n=e-E;let o=.15;if(h.length>0&&(o=.3),E-=n*o,e+=n*o,r){if(I.layout[v].tickvals!==void 0){const u=a;let d=-3,c=Math.round(u*.2,d);const b=[2,5,6,7,8,9,10],g=[1,4,5,6,7,8,9];for(let y=0;yb[y]&&(d=-g[y],c=Math.round(u*.2,d));const f=[Math.floor(c),Math.floor(c*2),Math.floor(c*3),Math.floor(c*4)],x=[0,Math.floor(u*7)];Pe[`${v}.tickvals`]=f,Pe[`${v}.range`]=x,Pe[`${v}.tickformat`]=".2s";return}E=0,e=I.layout[v].range[1]}Pe[`${v}.range`]=[E,e],Pe[`${v}.fixedrange`]=!0,R.push(v)}}),{to_update:Pe,yaxis_fixedrange:R}}}catch(K){console.log(`Error in AutoScaling: ${K}`)}return{to_update:{},yaxis_fixedrange:[]}}async function x9({plotData:L,volumeBars:I,setMaximizePlot:K}){const se=Object.keys(L.layout).filter(i=>i.startsWith("xaxis")).filter(i=>L.layout[i].showticklabels||L.layout[i].matches==null),Pe=L.data.filter(i=>{var w;return(w=i==null?void 0:i.name)==null?void 0:w.startsWith("Volume")});let R={},E=I||{old_nticks:{}};const e=window.innerWidth,_=window.innerHeight;let k=_>420&&e<920?8:_>420&&e<500?9:7;return e<750?(Pe.forEach(i=>{i.type=="bar"&&(i.opacity=1,i.marker.line.width=.09,I.yaxis==null&&(E.yaxis="yaxis"+i.yaxis.replace("y",""),R[E.yaxis+".tickfont.size"]=k,E.tickfont=L.layout[E.yaxis].tickfont||{},L.layout.margin.l-=40))}),se.forEach(i=>{var w;((w=I.old_nticks)==null?void 0:w[i])==null&&(R[i+".nticks"]=6,E.old_nticks[i]=L.layout[i].nticks||10)}),K(!0),await Cc()):window.MODEBAR.style.cssText.includes("display: none")&&(await Cc(!1),K(!1),I.old_nticks!=null&&se.forEach(i=>{I.old_nticks[i]!=null&&(R[i+".nticks"]=E.old_nticks[i],E.old_nticks[i]=void 0)}),I.yaxis!=null&&Pe.forEach(i=>{i.type=="bar"&&(i.opacity=.5,i.marker.line.width=.2,R[E.yaxis+".tickfont.size"]=E.tickfont.size+3,L.layout.margin.l+=40,E.yaxis=void 0)})),{volume_update:E,layout_update:R,plotData:L}}function b9({open:L,onColorChange:I}){const[K,se]=In.useState(!1);function Pe(R){I(R)}return L&&!K&&se(!0),!L&&K&&se(!1),In.useEffect(()=>{if(K){let R=function(e){let _=0,k=0,i=0,w=0;document.getElementById(e.id+"_header")?document.getElementById(e.id+"_header").onmousedown=v:e.onmousedown=v;function v(t){t=t||window.event,t.preventDefault(),i=t.clientX,w=t.clientY,document.onmouseup=s,document.onmousemove=h}function h(t){t=t||window.event,t.preventDefault(),_=i-t.clientX,k=w-t.clientY,i=t.clientX,w=t.clientY,e.style.top=e.offsetTop-k+"px",e.style.left=e.offsetLeft-_+"px"}function s(){document.onmouseup=null,document.onmousemove=null}},E=document.getElementById("changecolor");E.style.display="block",E.style.width=null,R(E)}else document.getElementById("changecolor").style.display="none"},[K]),hr("div",{id:"changecolor",children:hr("div",{id:"changecolor_header",children:hr("input",{type:"color",id:"picked_color",value:"#00ACFF",onChange:R=>{let E=R.target.value;Pe(E)}})})})}function D5(L){var I,K,se="";if(typeof L=="string"||typeof L=="number")se+=L;else if(typeof L=="object")if(Array.isArray(L))for(I=0;I{se.preventDefault(),window.pywry.open_file(K)},children:K})]})})}),hr("div",{style:{float:"right",marginTop:20},children:hr("button",{className:"_btn",style:{padding:"8px 16px",width:"100%"},onClick:I,children:"Close"})})]})})}function k9({title:L,content:I,open:K,close:se}){return hr(vd,{title:L,description:"",open:K,close:se,children:Wr("div",{id:"popup_title",className:"popup_content",style:{padding:"0px 2px 2px 5px",marginTop:5},children:[hr("div",{style:{display:"flex",flexDirection:"column",gap:0},children:hr("div",{children:hr("label",{htmlFor:"title_text",children:I})})}),hr("div",{style:{float:"right",marginTop:20},children:hr("button",{type:"button",className:"_btn",style:{padding:"8px 16px",width:"100%"},onClick:se,children:"Close"})})]})})}const T9=u7(r7);function F5(L,I){var se,Pe;I||(I=[(se=L[0])==null?void 0:se.x[L[0].x.length-1e3],(Pe=L[0])==null?void 0:Pe.x[L[0].x.length-1]]);const K=[];return L.forEach(R=>{const E={...R},e=["x","y","low","high","open","close","text","customdata"],_=R.x?R.x:[],k=[];for(let w=0;w<_.length;w++)_[w]>=I[0]&&_[w]<=I[1]&&k.push(w);e.forEach(w=>{R[w]&&Array.isArray(R[w])&&(E[w]=R[w].filter((v,h)=>k.includes(h)))}),["marker","line"].forEach(w=>{var v;(v=R[w])!=null&&v.color&&Array.isArray(R[w].color)&&(E[w]={...R[w]},E[w].color=R[w].color.filter((h,s)=>k.includes(s)))}),K.push(E)}),K.length===0?L:K}async function y_({event:L,figure:I}){var K,se;try{const Pe=I.data.filter(e=>e.x!==void 0&&e.x.length>0&&e.x[0]!==void 0);if(Pe.length===0)return I;const R=L?[L["xaxis.range[0]"],L["xaxis.range[1]"]]:[(K=Pe[0])==null?void 0:K.x[Pe[0].x.length-1e3],(se=Pe[0])==null?void 0:se.x[Pe[0].x.length-1]],E=F5(I.data,R);return I.data=E,I.layout.xaxis.range=R,I}catch(Pe){console.log("error",Pe)}}function A9({json:L,date:I,cmd:K,title:se,globals:Pe,theme:R,info:E}){var De,Ee,Se,he;const e=t7();In.useEffect(()=>{e&&e.capture("chart",E)},[]),L.layout.width=void 0,L.layout.height=void 0,(Ee=(De=L.layout)==null?void 0:De.title)!=null&&Ee.text&&(L.layout.title.text="");const[_,k]=In.useState(L),[i,w]=In.useState({}),[v,h]=In.useState(!1),[s,t]=In.useState(se),[a,r]=In.useState({}),[n,o]=In.useState(!1),[l,u]=In.useState({name:""}),[d,c]=In.useState(!1),[b,g]=In.useState(null),[f,x]=In.useState({old_nticks:{}}),[y,m]=In.useState(!1),[T,p]=In.useState(!1),[M,A]=In.useState(!1),[C,P]=In.useState(_),[O,z]=In.useState([]),[B,Y]=In.useState(!1),[D,G]=In.useState(!0),[U,j]=In.useState(!1),[W,Z]=In.useState(!1),[ie,te]=In.useState(!1),[J,X]=In.useState({}),[ee,re]=In.useState([]),[oe,ue]=In.useState({}),ce=()=>u({name:""});function de(fe){var be,Ie,Te,Ne,qe;console.log("onDeleteAnnotation",fe);const ae=(Ie=(be=C==null?void 0:C.layout)==null?void 0:be.annotations)==null?void 0:Ie.findIndex(ve=>ve.text===fe.text);console.log("index",ae),ae>-1&&((Ne=(Te=C==null?void 0:C.layout)==null?void 0:Te.annotations)==null||Ne.splice(ae,1),P({...C}),z((qe=C==null?void 0:C.layout)==null?void 0:qe.annotations))}function me(fe){KA({plotData:C,popupData:fe,setPlotData:P,setModal:u,setOnAnnotationClick:X,setAnnotations:z,onAnnotationClick:J,ohlcAnnotation:ee,setOhlcAnnotation:re,annotations:O,plotDiv:b})}In.useEffect(()=>{T&&(u({name:"downloadFinished"}),p(!1))},[T]),In.useEffect(()=>{a&&Object.keys(a).length>0&&(Object.keys(a).forEach(fe=>{C.layout[fe].title={...C.layout[fe].title||{},text:a[fe]},C.layout[fe].showticklabels=!0}),r({}))},[a]);function _e(fe){const ae=b.layout.shapes;if(!ae||ae.length===0)return;const be=ae[ae.length-1];be.line.color=fe,ds.update(b,{},{shapes:ae})}function Me(fe,ae=!1){const be=i[fe]||document.querySelector(`[data-title="${fe}"]`);ae?(be.style.border="transparent",be.style.boxShadow="none"):(be.style.border="1px solid rgba(0, 151, 222, 1.0)",be.style.borderRadius="5px",be.style.borderpadding="5px",be.style.boxShadow="0 0 5px rgba(0, 151, 222, 1.0)"),w({...i,[fe]:be})}function we(){const fe="Auto Scale (Ctrl+Shift+A)",ae=i[fe]||document.querySelector(`[data-title="${fe}"]`);let be=!0;ae.style.border==="transparent"?(b.removeAllListeners("plotly_relayout"),be=!1,b.on("plotly_relayout",Eh(async function(Ie){if(Ie["xaxis.range[0]"]!==void 0)if(M){const Te={..._};await y_({event:Ie,figure:Te}).then(async Ne=>{P(Ne),ds.react(b,Ne.data,Ne.layout);const qe=await m_(Ie,b);ue(qe.yaxis_fixedrange),ds.update(b,{},qe.to_update)})}else{const Te=await m_(Ie,b);ue(Te.yaxis_fixedrange),ds.update(b,{},Te.to_update)}},100))):(b.removeAllListeners("plotly_relayout"),oe.forEach(Ie=>{b.layout[Ie].fixedrange=!1}),ue({}),M&&b.on("plotly_relayout",Eh(async function(Ie){if(Ie["xaxis.range[0]"]===void 0)return;const Te={..._};await y_({event:Ie,figure:Te}).then(async Ne=>{P(Ne),ds.react(b,Ne.data,Ne.layout)})},100))),Me(fe,be)}function xe(){const fe="Edit Color (Ctrl+E)",ae=i[fe]||document.querySelector(`[data-title="${fe}"]`);let be=!0;ae.style.border==="transparent"&&(be=!1),te(!be),Me(fe,be)}return In.useEffect(()=>{U&&(console.log("activateAutoScale",!U),we(),j(!1))},[U]),In.useEffect(()=>{W&&(xe(),Z(!1))},[W]),In.useEffect(()=>{if(B)try{console.log("changeTheme",B);const fe=C==null?void 0:C.data.filter(qe=>{var ve;return(ve=qe==null?void 0:qe.name)==null?void 0:ve.startsWith("Volume")}),ae=!D;window.document.body.style.backgroundColor=ae?"#000":"#fff",C.layout.font={...C.layout.font||{},color:ae?"#fff":"#000"};const be=ae?Wu.sunIcon:Wu.moonIcon;document.querySelector('[data-title="Change Theme"]').getElementsByTagName("path")[0].setAttribute("d",be.path),document.querySelector('[data-title="Change Theme"]').getElementsByTagName("svg")[0].setAttribute("viewBox",be.viewBox);const Ne=ae?{"#009600":"#00ACFF","#c80000":"#e4003a"}:{"#e4003a":"#c80000","#00ACFF":"#009600"};fe.forEach(qe=>{qe.type==="bar"&&(qe.marker.color=qe.marker.color.map(ve=>Ne[ve]||ve))}),C.layout.template=ae?c7:f7,P({...C}),ds.react(b,C.data,C.layout),G(ae),Y(!1)}catch(fe){console.log("error",fe)}},[B]),In.useEffect(()=>{var fe,ae,be,Ie;if(n){G(!0),j(!1);const Te=["Download CSV","Download Chart as Image","Overlay chart from CSV","Add Text","Change Titles","Auto Scale (Ctrl+Shift+A)","Reset Axes"],Ne=document.querySelector('[data-title="Autoscale"]');Ne&&(Ne.getElementsByTagName("path")[0].setAttribute("d",ds.Icons.home.path),Ne.setAttribute("data-title","Reset Axes")),window.MODEBAR=document.getElementsByClassName("modebar-container")[0];const qe=window.MODEBAR.getElementsByClassName("modebar-btn");if(window.MODEBAR.style.cssText=`${window.MODEBAR.style.cssText}; display:flex;`,qe){const Ae={};for(let ze=0;ze0&&(P(Ue),x(Ve),ds.relayout(b,ze))}),R!=="dark"&&Y(!0);const ve=_.data.map(Ae=>Ae.type==="candlestick");if(((be=_.data[0])==null?void 0:be.x)!==void 0&&((Ie=_.data[0])==null?void 0:Ie.x.length)<=1e3||!ve.includes(!0))return;u({name:"alertDialog",data:{title:"Warning",content:`Data has been truncated to 1000 points for performance reasons. - Please use the zoom tool to see more data.`}});const Ce=F5(_.data);P({..._,data:Ce}),A(!0),j(!0)}},[n]),Wr("div",{className:"relative h-full",children:[d&&hr("div",{className:"absolute inset-0 flex items-center justify-center z-[100]",children:Wr("svg",{className:"animate-spin h-20 w-20 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[hr("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),hr("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8z"})]})}),Wr("div",{id:"loading",className:"saving",children:[hr("div",{id:"loading_text",className:"loading_text"}),hr("div",{id:"loader",className:"loader"})]}),hr(k9,{title:(Se=l==null?void 0:l.data)==null?void 0:Se.title,content:(he=l==null?void 0:l.data)==null?void 0:he.content,open:l.name==="alertDialog",close:ce}),hr(WA,{addOverlay:fe=>{console.log(fe),C.layout.showlegend=!0,P(fe),o(!1)},plotlyData:C,setLoading:c,open:l.name==="overlayChart",close:ce}),hr(YA,{updateTitle:fe=>t(fe),updateAxesTitles:fe=>r(fe),defaultTitle:s,plotlyData:C,open:l.name==="titleDialog",close:ce}),hr(XA,{popupData:l.name==="textDialog"?l==null?void 0:l.data:null,open:l.name==="textDialog",close:ce,addAnnotation:fe=>me(fe),deleteAnnotation:fe=>de(fe)}),hr(b9,{open:ie,onColorChange:_e}),hr(w9,{open:l.name==="downloadFinished",close:ce}),Wr("div",{className:"relative h-full",id:"MainChart",children:[Wr("div",{className:"_header relative gap-4 py-2 text-center text-xs flex items-center justify-between px-4 text-white",children:[hr("div",{className:"w-1/3",children:hr("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"40",fill:"none",viewBox:"0 0 64 40",children:hr("path",{fill:"#fff",d:"M61.283 3.965H33.608v27.757h25.699V19.826H37.561v-3.965H63.26V3.965h-1.977zM39.538 23.792h15.815v3.965H37.561v-3.965h1.977zM59.306 9.913v1.983H37.561V7.931h21.745v1.982zM33.606 0h-3.954v3.965H33.606V0zM25.7 3.966H0V15.86h25.7v3.965H3.953v11.896h25.7V3.966h-3.955zm0 21.808v1.983H7.907v-3.965h17.791v1.982zm0-15.86v1.982H3.953V7.931h21.745v1.982zM37.039 35.693v2.952l-.246-.246-.245-.245-.245-.247-.245-.246-.246-.246-.245-.245-.245-.247-.247-.246-.245-.246-.245-.246-.245-.246-.246-.246h-.49v3.936h.49v-3.198l.246.246.245.246.245.246.245.246.246.246.246.246.245.247.246.245.245.246.245.247.245.246.246.245.245.246h.245v-3.936h-.49zM44.938 37.17h-.491v-1.477h-2.944v3.937h3.93v-2.46h-.495zm-2.944-.246v-.739h1.962v.984h-1.962v-.245zm2.944.984v1.23h-2.944V37.66h2.944v.247zM52.835 37.17h-.49v-1.477h-2.946v3.937h3.925v-2.46h-.489zm-2.944-.246v-.739h1.963v.984h-1.965l.002-.245zm2.944.984v1.23H49.89V37.66h2.946v.247zM29.174 35.693H25.739v3.936H29.663v-.491H26.229v-.984h2.943v-.493H26.229v-1.476h3.434v-.492h-.489zM13.37 35.693H9.934v3.937h3.925v-3.937h-.49zm0 .738v2.709h-2.945v-2.955h2.943l.001.246zM21.276 35.693h-3.435v3.937h.491v-1.476h3.434v-2.461h-.49zm0 .738v1.23h-2.944v-1.476h2.944v.246z"})})}),hr("p",{className:"font-bold w-1/3 flex flex-col gap-0.5 items-center",children:s}),Wr("p",{className:"w-1/3 text-right text-xs",children:[new Intl.DateTimeFormat("en-GB",{dateStyle:"full",timeStyle:"long"}).format(I).replace(/:\d\d /," "),hr("br",{}),hr("span",{className:"text-grey-400",children:K})]})]}),hr("div",{className:_9("w-full sm:pb-12",{"h-[calc(100%-10px)]":y,"h-[calc(100%-50px)]":!y}),children:hr(T9,{onInitialized:()=>{if(!b){const fe=document.getElementById("plotlyChart");console.log("plot",fe),fe&&g(fe),fe.globals=Pe}n||o(!0)},className:"w-full h-full",divId:"plotlyChart",data:C.data,layout:C.layout,config:y9({setModal:u,changeTheme:Y,autoScaling:j,Loading:c,changeColor:Z,downloadFinished:p})})})]})]})}function M9(){const[L,I]=In.useState(null),[K,se]=In.useState({});In.useEffect(()=>{{const E=setInterval(()=>{if(window.json_data){const e=window.json_data;console.log(e),I(e),clearInterval(E)}},100);return()=>clearInterval(E)}},[]);const R=(E=>{var v,h,s,t;if(!E)return null;const e={added_traces:[],csv_yaxis_id:null,cmd_src_idx:null,cmd_idx:null,cmd_src:"",old_margin:null,title:""},_=(h=(v=E.layout)==null?void 0:v.title)==null?void 0:h.text.replace(/ -/g,"").replace(/-/g,"").replace(/|<\/b>/g,"").replace(/ /g,"_"),k=new Date().toISOString().slice(0,10).replace(/-/g,""),i=new Date().toISOString().slice(11,19).replace(/:/g,"");window.title=`openbb_${_}_${k}_${i}`,E.layout.annotations!==void 0&&E.layout.annotations.forEach(function(a){if(a.text!==void 0&&a.text[0]==="/"){e.cmd_src=a.text,e.cmd_idx=E.layout.annotations.indexOf(a),a.text="";const r=E.layout.margin;e.old_margin={...r},r.t!==void 0&&r.t>40&&(r.t=40),E.cmd==="/stocks/candle"&&(r.r-=50)}}),E.data.forEach(function(a){if(a.name!==void 0){const r=a.name.length;a.name=`${a.name} `,a.hoverlabel={namelength:r}}});const w=((t=(s=E.layout)==null?void 0:s.title)==null?void 0:t.text)||"Interactive Chart";return e.title=w,{data:E,date:new Date,globals:e,cmd:E.command_location,posthog:E.posthog,python_version:E.python_version,pywry_version:E.pywry_version,terminal_version:E.terminal_version,theme:E.theme,title:w}})(L);if(R){R.posthog.collect_logs&&!K&&se({api_host:"https://app.posthog.com",autocapture:{css_selector_allowlist:[".ph-capture"]},capture_pageview:!1,loaded:function(k){const i=(R==null?void 0:R.log_id)||"";i!==""&&i!=="REPLACE_ME"&&k.identify(i),k.onFeatureFlags(function(){k.isFeatureEnabled("record-pywry",{send_event:!1})||k.stopSessionRecording(),k.isFeatureEnabled("collect-logs-pywry",{send_event:!1})?k.has_opted_out_capturing()&&k.opt_in_capturing():k.opt_out_capturing()})}});const E={INFO:{command:R.cmd,title:R.title,date:R.date,python_version:R.python_version,pywry_version:R.pywry_version,terminal_version:R.terminal_version}},e=hr(A9,{json:R.data,date:R.date,cmd:R.cmd,title:R.title,globals:R.globals,theme:R.theme,info:E});return R.posthog.collect_logs&&K?hr(e7,{apiKey:"phc_vhssDAMod5qIplznQ75Kdgz4aB1qPFmeVmfEOZ4hkRw",options:K,children:e}):e}else return hr("div",{className:"absolute inset-0 flex items-center justify-center z-[100]",children:Wr("svg",{className:"animate-spin h-20 w-20 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[hr("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),hr("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8z"})]})})}qk.render(hr(C_.StrictMode,{children:hr(M9,{})}),document.getElementById("root")); +`)},EA=0,ah=[];function CA(L){var I=In.useRef([]),K=In.useRef([0,0]),se=In.useRef(),Pe=In.useState(EA++)[0],R=In.useState(function(){return b5()})[0],E=In.useRef(L);In.useEffect(function(){E.current=L},[L]),In.useEffect(function(){if(L.inert){document.body.classList.add("block-interactivity-".concat(Pe));var t=K7([L.lockRef.current],(L.shards||[]).map(h_),!0).filter(Boolean);return t.forEach(function(a){return a.classList.add("allow-interactivity-".concat(Pe))}),function(){document.body.classList.remove("block-interactivity-".concat(Pe)),t.forEach(function(a){return a.classList.remove("allow-interactivity-".concat(Pe))})}}},[L.inert,L.lockRef.current,L.shards]);var e=In.useCallback(function(t,a){if("touches"in t&&t.touches.length===2)return!E.current.allowPinchZoom;var r=A0(t),n=K.current,o="deltaX"in t?t.deltaX:n[0]-r[0],l="deltaY"in t?t.deltaY:n[1]-r[1],u,d=t.target,c=Math.abs(o)>Math.abs(l)?"h":"v";if("touches"in t&&c==="h"&&d.type==="range")return!1;var b=c_(c,d);if(!b)return!0;if(b?u=c:(u=c==="v"?"h":"v",b=c_(c,d)),!b)return!1;if(!se.current&&"changedTouches"in t&&(o||l)&&(se.current=u),!u)return!0;var g=se.current||u;return AA(g,a,t,g==="h"?o:l,!0)},[]),_=In.useCallback(function(t){var a=t;if(!(!ah.length||ah[ah.length-1]!==R)){var r="deltaY"in a?f_(a):A0(a),n=I.current.filter(function(u){return u.name===a.type&&u.target===a.target&&MA(u.delta,r)})[0];if(n&&n.should){a.cancelable&&a.preventDefault();return}if(!n){var o=(E.current.shards||[]).map(h_).filter(Boolean).filter(function(u){return u.contains(a.target)}),l=o.length>0?e(a,o[0]):!E.current.noIsolation;l&&a.cancelable&&a.preventDefault()}}},[]),k=In.useCallback(function(t,a,r,n){var o={name:t,delta:a,target:r,should:n};I.current.push(o),setTimeout(function(){I.current=I.current.filter(function(l){return l!==o})},1)},[]),i=In.useCallback(function(t){K.current=A0(t),se.current=void 0},[]),w=In.useCallback(function(t){k(t.type,f_(t),t.target,e(t,L.lockRef.current))},[]),v=In.useCallback(function(t){k(t.type,A0(t),t.target,e(t,L.lockRef.current))},[]);In.useEffect(function(){return ah.push(R),L.setCallbacks({onScrollCapture:w,onWheelCapture:w,onTouchMoveCapture:v}),document.addEventListener("wheel",_,ih),document.addEventListener("touchmove",_,ih),document.addEventListener("touchstart",i,ih),function(){ah=ah.filter(function(t){return t!==R}),document.removeEventListener("wheel",_,ih),document.removeEventListener("touchmove",_,ih),document.removeEventListener("touchstart",i,ih)}},[]);var h=L.removeScrollBar,s=L.inert;return In.createElement(In.Fragment,null,s?In.createElement(R,{styles:SA(Pe)}):null,h?In.createElement(yA,{gapMode:"margin"}):null)}const LA=oA(x5,CA);var T5=In.forwardRef(function(L,I){return In.createElement(N1,Au({},L,{ref:I,sideCar:LA}))});T5.classNames=N1.classNames;const PA=T5;var OA=function(L){if(typeof document>"u")return null;var I=Array.isArray(L)?L[0]:L;return I.ownerDocument.body},oh=new WeakMap,M0=new WeakMap,S0={},fv=0,A5=function(L){return L&&(L.host||A5(L.parentNode))},IA=function(L,I){return I.map(function(K){if(L.contains(K))return K;var se=A5(K);return se&&L.contains(se)?se:(console.error("aria-hidden",K,"in not contained inside",L,". Doing nothing"),null)}).filter(function(K){return!!K})},RA=function(L,I,K,se){var Pe=IA(I,Array.isArray(L)?L:[L]);S0[K]||(S0[K]=new WeakMap);var R=S0[K],E=[],e=new Set,_=new Set(Pe),k=function(w){!w||e.has(w)||(e.add(w),k(w.parentNode))};Pe.forEach(k);var i=function(w){!w||_.has(w)||Array.prototype.forEach.call(w.children,function(v){if(e.has(v))i(v);else{var h=v.getAttribute(se),s=h!==null&&h!=="false",t=(oh.get(v)||0)+1,a=(R.get(v)||0)+1;oh.set(v,t),R.set(v,a),E.push(v),t===1&&s&&M0.set(v,!0),a===1&&v.setAttribute(K,"true"),s||v.setAttribute(se,"true")}})};return i(I),e.clear(),fv++,function(){E.forEach(function(w){var v=oh.get(w)-1,h=R.get(w)-1;oh.set(w,v),R.set(w,h),v||(M0.has(w)||w.removeAttribute(se),M0.delete(w)),h||w.removeAttribute(K)}),fv--,fv||(oh=new WeakMap,oh=new WeakMap,M0=new WeakMap,S0={})}},zA=function(L,I,K){K===void 0&&(K="data-aria-hidden");var se=Array.from(Array.isArray(L)?L:[L]),Pe=I||OA(L);return Pe?(se.push.apply(se,Array.from(Pe.querySelectorAll("[aria-live]"))),RA(se,Pe,K,"aria-hidden")):function(){return null}};const M5="Dialog",[S5,S9]=k7(M5),[DA,ic]=S5(M5),FA=L=>{const{__scopeDialog:I,children:K,open:se,defaultOpen:Pe,onOpenChange:R,modal:E=!0}=L,e=In.useRef(null),_=In.useRef(null),[k=!1,i]=S7({prop:se,defaultProp:Pe,onChange:R});return In.createElement(DA,{scope:I,triggerRef:e,contentRef:_,contentId:av(),titleId:av(),descriptionId:av(),open:k,onOpenChange:i,onOpenToggle:In.useCallback(()=>i(w=>!w),[i]),modal:E},K)},BA="DialogPortal",[E9,E5]=S5(BA,{forceMount:void 0}),Am="DialogOverlay",NA=In.forwardRef((L,I)=>{const K=E5(Am,L.__scopeDialog),{forceMount:se=K.forceMount,...Pe}=L,R=ic(Am,L.__scopeDialog);return R.modal?In.createElement(zy,{present:se||R.open},In.createElement(jA,Io({},Pe,{ref:I}))):null}),jA=In.forwardRef((L,I)=>{const{__scopeDialog:K,...se}=L,Pe=ic(Am,K);return In.createElement(PA,{as:Ry,allowPinchZoom:!0,shards:[Pe.contentRef]},In.createElement(jh.div,Io({"data-state":L5(Pe.open)},se,{ref:I,style:{pointerEvents:"auto",...se.style}})))}),ld="DialogContent",UA=In.forwardRef((L,I)=>{const K=E5(ld,L.__scopeDialog),{forceMount:se=K.forceMount,...Pe}=L,R=ic(ld,L.__scopeDialog);return In.createElement(zy,{present:se||R.open},R.modal?In.createElement(VA,Io({},Pe,{ref:I})):In.createElement(HA,Io({},Pe,{ref:I})))}),VA=In.forwardRef((L,I)=>{const K=ic(ld,L.__scopeDialog),se=In.useRef(null),Pe=gd(I,K.contentRef,se);return In.useEffect(()=>{const R=se.current;if(R)return zA(R)},[]),In.createElement(C5,Io({},L,{ref:Pe,trapFocus:K.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:kf(L.onCloseAutoFocus,R=>{var E;R.preventDefault(),(E=K.triggerRef.current)===null||E===void 0||E.focus()}),onPointerDownOutside:kf(L.onPointerDownOutside,R=>{const E=R.detail.originalEvent,e=E.button===0&&E.ctrlKey===!0;(E.button===2||e)&&R.preventDefault()}),onFocusOutside:kf(L.onFocusOutside,R=>R.preventDefault())}))}),HA=In.forwardRef((L,I)=>{const K=ic(ld,L.__scopeDialog),se=In.useRef(!1);return In.createElement(C5,Io({},L,{ref:I,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:Pe=>{var R;if((R=L.onCloseAutoFocus)===null||R===void 0||R.call(L,Pe),!Pe.defaultPrevented){var E;se.current||(E=K.triggerRef.current)===null||E===void 0||E.focus(),Pe.preventDefault()}se.current=!1},onInteractOutside:Pe=>{var R,E;(R=L.onInteractOutside)===null||R===void 0||R.call(L,Pe),Pe.defaultPrevented||(se.current=!0);const e=Pe.target;((E=K.triggerRef.current)===null||E===void 0?void 0:E.contains(e))&&Pe.preventDefault()}}))}),C5=In.forwardRef((L,I)=>{const{__scopeDialog:K,trapFocus:se,onOpenAutoFocus:Pe,onCloseAutoFocus:R,...E}=L,e=ic(ld,K),_=In.useRef(null),k=gd(I,_);return $7(),In.createElement(In.Fragment,null,In.createElement(U7,{asChild:!0,loop:!0,trapped:se,onMountAutoFocus:Pe,onUnmountAutoFocus:R},In.createElement(B7,Io({role:"dialog",id:e.contentId,"aria-describedby":e.descriptionId,"aria-labelledby":e.titleId,"data-state":L5(e.open)},E,{ref:k,onDismiss:()=>e.onOpenChange(!1)}))),!1)}),qA="DialogTitle",GA=In.forwardRef((L,I)=>{const{__scopeDialog:K,...se}=L,Pe=ic(qA,K);return In.createElement(jh.h2,Io({id:Pe.titleId},se,{ref:I}))}),WA="DialogDescription",ZA=In.forwardRef((L,I)=>{const{__scopeDialog:K,...se}=L,Pe=ic(WA,K);return In.createElement(jh.p,Io({id:Pe.descriptionId},se,{ref:I}))}),YA="DialogClose",XA=In.forwardRef((L,I)=>{const{__scopeDialog:K,...se}=L,Pe=ic(YA,K);return In.createElement(jh.button,Io({type:"button"},se,{ref:I,onClick:kf(L.onClick,()=>Pe.onOpenChange(!1))}))});function L5(L){return L?"open":"closed"}const $A=FA,KA=NA,JA=UA,QA=GA,e9=ZA,p_=XA,d_=({title:L,titleId:I,...K})=>hr("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,...K,children:hr("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),P5={margin:"2px 0px 2px 10px",padding:"5px 2px 2px 5px"};function vd({open:L,close:I,title:K,description:se,children:Pe}){return Wr($A,{open:L,onOpenChange:I,children:[hr(KA,{onClick:I,className:"_modal-overlay"}),Wr(JA,{className:"_modal",children:[hr(QA,{className:"_modal-title",children:K}),hr(e9,{className:"_modal_description",children:se}),hr(p_,{children:hr(d_,{})}),Pe,hr(p_,{className:"_modal-close",onClick:I,children:hr(d_,{className:"w-6 h-6"})})]})]})}function t9({title:L,content:I,open:K,close:se}){return hr(vd,{title:L,description:"",open:K,close:se,children:Wr("div",{id:"popup_title",className:"popup_content",style:{padding:"0px 2px 2px 5px",marginTop:5},children:[hr("div",{style:{display:"flex",flexDirection:"column",gap:0},children:hr("div",{children:hr("label",{htmlFor:"title_text",children:I})})}),hr("div",{style:{float:"right",marginTop:20},children:hr("button",{type:"button",className:"_btn",style:{padding:"8px 16px",width:"100%"},onClick:se,children:"Close"})})]})})}function n9({open:L,close:I}){const K=window.download_path||"~/OpenBBUserData/exports";return hr(vd,{title:"Success",description:"",open:L,close:I,children:Wr("div",{id:"popup_title",className:"popup_content",style:{padding:"0px 2px 2px 5px",marginTop:5},children:[hr("div",{style:{display:"flex",flexDirection:"column",gap:0},children:hr("div",{children:Wr("label",{htmlFor:"title_text",children:[hr("b",{children:window.title})," has been downloaded to",hr("br",{}),hr("br",{}),hr("a",{style:{color:"#FFDD00",marginTop:15},href:`${K}`,onClick:se=>{se.preventDefault(),window.pywry.open_file(K)},children:K})]})})}),hr("div",{style:{float:"right",marginTop:20},children:hr("button",{className:"_btn",style:{padding:"8px 16px",width:"100%"},onClick:I,children:"Close"})})]})})}const g_=new FileReader,r9={overlaying:"y",side:"left",tickfont:{size:12},tickpadding:5,showgrid:!1,showline:!1,showticklabels:!0,showlegend:!0,zeroline:!1,anchor:"x",type:"linear",autorange:!0};function i9({open:L,close:I,setLoading:K,addOverlay:se,plotlyData:Pe}){const[R,E]=In.useState("scatter"),[e,_]=In.useState("#FFDD00"),[k,i]=In.useState("#00ACFF"),[w,v]=In.useState("#FF0000"),[h,s]=In.useState(""),[t,a]=In.useState([]),[r,n]=In.useState([]),[o,l]=In.useState({}),[u,d]=In.useState({}),c=["x","open","high","low","close"];let b={scatter:"Scatter (Line)",candlestick:"Candlestick",bar:"Bar"};const[g,f]=In.useState({});function x(){I(),E("scatter"),s(""),a([]),n([]),l({}),f({})}function y(){var T,p;if(t.length==0){(T=document.getElementById("csv_file"))==null||T.focus(),(p=document.getElementById("csv_file"))==null||p.style.setProperty("border","1px solid red"),document.getElementById("csv_file_warning").style.display="block";return}const m=a9({csvData:t,plotlyData:Pe,yaxisOptions:u,traceType:R,traceColor:e,traceName:h,options:g,increasingColor:k,decreasingColor:w});se(m),x()}return hr(vd,{title:"Overlay Chart",description:"Upload a CSV file to overlay a chart on the main chart.",open:L,close:I,children:Wr("div",{id:"popup_csv",className:"popup_content",children:[Wr("div",{children:[Wr("label",{htmlFor:"csv_file",children:[hr("b",{children:"CSV file:"}),hr("div",{id:"csv_file_warning",className:"popup_warning",style:{marginLeft:"80px",marginBottom:"10px"},children:"CSV file is required."})]}),hr("input",{onChange:m=>{var T,p;if(m.target.files){if(m.target.files[0].type!=="text/csv"){(T=document.getElementById("csv_file"))==null||T.focus(),(p=document.getElementById("csv_file"))==null||p.style.setProperty("border","1px solid red"),document.getElementById("csv_file_warning").style.display="block";return}}else return;r.length>0&&(n([]),l({}),f({}),E("scatter")),g_.onload=M=>{var G;if(!((G=M.target)!=null&&G.result)||typeof M.target.result!="string")return;let A=M.target.result.split(` +`).map(U=>U.replace(/\r/g,""));const C=A[0].split(","),P=C.map(U=>U.trim().toLowerCase());let O={};for(let U=0;UP.includes(U))&&E("candlestick"),P.includes("close")&&(f({...g,y:C[P.indexOf("close")]}),O.y=C[P.indexOf("close")]);let Y=[];for(let U=1;U2&&(j.test(U[0])?U.splice(0,2):j.test(U[U.length-2])&&U.splice(U.length-2,2),D=U.join("_").replace(/openbb_/g,""))}}catch(U){console.log(U)}s(D),f(O),n(C),a(Y)},g_.readAsText(m.target.files[0])},type:"file",id:"csv_file",accept:".csv",style:{marginLeft:10}})]}),Wr("div",{style:{marginTop:15},children:[hr("label",{htmlFor:"csv_trace_type",children:hr("b",{children:"Display data type:"})}),Wr("select",{onChange:m=>{E(m.target.value)},id:"csv_trace_type",style:P5,defaultValue:b[R],children:[R&&hr("option",{value:R,children:b[R]},R),Object.keys(b).map(m=>R!==m&&hr("option",{value:m,children:b[m]},m))]})]}),Wr("div",{style:{marginTop:12},children:[hr("label",{htmlFor:"csv_name",children:hr("b",{children:"Trace Name:"})}),hr("textarea",{id:"csv_name",value:h,onChange:m=>{s(m.target.value)},style:{padding:"5px 2px 2px 5px",width:"100%",maxWidth:"100%",maxHeight:200,marginTop:2},rows:2,cols:20,placeholder:"Enter a name to give this trace"})]}),r.length>0&&Wr(Sg,{children:[["scatter","bar"].includes(R)&&hr("div",{style:{marginTop:15,marginBottom:10},id:"csv_columns",className:"csv_column_container",children:["x","y"].map(m=>Wr("div",{style:{marginTop:10,display:"flex",alignItems:"center",justifyContent:"space-between"},children:[Wr("label",{htmlFor:`csv_${m}`,style:{width:"100px"},children:[m.toUpperCase()," Axis"]}),Wr("select",{onChange:T=>{l({...o,[m]:T.target.value}),f({...g,[m]:T.target.value})},id:`csv_${m}`,style:{width:"100%"},defaultValue:g[m],children:[g[m]&&hr("option",{value:g[m],children:g[m]},m),r.map(T=>hr("option",{value:T,children:T},T))]})]},m))}),R==="candlestick"&&hr("div",{id:"csv_columns",className:"csv_column_container",style:{marginTop:15},children:["x","open","high","low","close"].map(m=>Wr("div",{style:{marginTop:10,display:"flex",alignItems:"center",justifyContent:"space-between"},children:[hr("label",{htmlFor:`csv_${m}`,style:{width:"100px"},children:m.charAt(0).toUpperCase()+m.slice(1)}),Wr("select",{onChange:T=>{l({...o,[m]:T.target.value}),f({...g,[m]:T.target.value})},id:`csv_${m}`,style:{width:"100%"},children:[g[m]&&hr("option",{value:g[m],children:g[m]},m),r.map(T=>T!=g[T]&&hr("option",{value:T,children:T},T))]})]},m))}),Wr("div",{style:{marginTop:20},id:"csv_colors",children:[["scatter","bar"].includes(R)&&Wr("div",{children:[hr("label",{htmlFor:"csv_color",children:`${R.charAt(0).toUpperCase()}${R.slice(1)} color`}),hr("input",{type:"color",id:"csv_color",defaultValue:"#FFDD00",style:{margin:"2px 2px 2px 10px"},onChange:m=>{console.log(m.target.value),_(m.target.value)}})]}),R==="candlestick"&&Wr(Sg,{children:[hr("label",{htmlFor:"csv_increasing",children:"Increasing color"}),hr("input",{type:"color",id:"csv_increasing",defaultValue:"#00ACFF",style:{margin:"2px 0px 2px 10px"},onChange:m=>{i(m.target.value)}}),hr("label",{htmlFor:"csv_decreasing",style:{marginLeft:15},children:"Decreasing color"}),hr("input",{style:{margin:"2px 0px 2px 10px"},type:"color",id:"csv_decreasing",defaultValue:"#FF0000",onChange:m=>{v(m.target.value)}})]})]}),Wr("div",{style:{marginTop:20},id:"csv_plot_yaxis_options",children:[R!=="candlestick"&&Wr(Sg,{children:[hr("input",{type:"checkbox",id:"csv_percent_change",name:"csv_plot_yaxis_check",style:{marginBottom:2},onChange:m=>{d({...u,percentChange:m.target.checked,sameYaxis:!1})},checked:!u.sameYaxis&&u.percentChange}),hr("label",{htmlFor:"csv_percent_change",style:{marginLeft:5},children:"Plot as percent change from first value"}),hr("br",{})]}),hr("input",{style:{marginTop:2},type:"checkbox",id:"csv_same_yaxis",name:"csv_plot_yaxis_check",onChange:m=>{d({...u,sameYaxis:m.target.checked,percentChange:!1})},checked:!u.percentChange&&u.sameYaxis}),hr("label",{htmlFor:"csv_same_yaxis",style:{marginLeft:5},children:"Share Y-axis"}),R==="bar"&&Wr("div",{style:{marginTop:2},id:"csv_bar_orientation",children:[hr("input",{type:"checkbox",id:"csv_bar_horizontal",onChange:m=>{f({...g,orientation:m.target.checked?"h":"v"})}}),hr("label",{htmlFor:"csv_bar_horizontal",style:{marginLeft:5},children:"Plot horizontally"})]})]})]}),hr("br",{}),Wr("div",{style:{float:"right",marginTop:20},children:[hr("button",{className:"_btn-tertiary",id:"csv_cancel",onClick:x,children:"Cancel"}),hr("button",{className:"_btn",id:"csv_submit",onClick:y,children:"Submit"})]})]})})}function a9({csvData:L,plotlyData:I,yaxisOptions:K,traceType:se,traceColor:Pe,traceName:R,options:E,increasingColor:e,decreasingColor:_}){let k=I.data[0];k.xaxis==null&&(k.xaxis="x"),k.yaxis==null&&(k.yaxis="y");let i=k.yaxis,w,h=Object.keys(I.layout).filter(r=>r.startsWith("yaxis")).map(r=>I.layout[r]).filter(r=>r.side=="left"&&(r.overlaying=="y"||r.fixedrange!=null&&r.fixedrange==!0)).length>0?" ":"";if(K.sameYaxis!==!0){const r=Object.keys(I.layout).filter(n=>n.startsWith("yaxis")).map(n=>I.layout[n]);w=`y${r.length+1}`,i=`yaxis${r.length+1}`,console.log(`yaxis: ${w} ${i}`),I.layout[i]={...r9,title:{text:R,font:{size:14},standoff:0},ticksuffix:h,layer:"below traces"}}else w=k.yaxis.replace("yaxis","y");const s={type:se,name:R,showlegend:!0,yaxis:w};let t={};if(["scatter","bar"].includes(se)){const r=L.findIndex(n=>n[E.y]!=null&&n[E.y]!=0);t={...s,x:L.map(n=>n[E.x]),y:L.map(function(n){return K.percentChange&&se==="scatter"?(n[E.y]-L[r][E.y])/L[r][E.y]:n[E.y]}),customdata:L.map(n=>n[E.y]),hovertemplate:"%{customdata:.2f}",connectgaps:!0,marker:{color:Pe}},se==="bar"&&(t.orientation=E.orientation,t.marker.opacity=.7,delete t.connectgaps,delete t.hovertemplate,delete t.customdata)}else se==="candlestick"&&(t={...s,x:L.map(r=>r[E.x]),open:L.map(r=>r[E.open]),high:L.map(r=>r[E.high]),low:L.map(r=>r[E.low]),close:L.map(r=>r[E.close]),increasing:{line:{color:e}},decreasing:{line:{color:_}}});return{...I,data:[...I.data,t]}}const v_={padding:"5px 2px 2px 5px",margin:"2px 0"};function o9({open:L,close:I,addAnnotation:K,deleteAnnotation:se,popupData:Pe}){var s,t,a,r,n;const R={text:"",color:"#0088CC",size:18,bordercolor:"#822661",yanchor:"above"},[E,e]=In.useState(R),[_,k]=In.useState(R);Pe&&Pe!==E&&Pe.annotation&&(Pe.annotation=(Pe==null?void 0:Pe.annotation)||{},e(Pe),k(Pe));function i(){console.log("closing"),e(R),k(R),I()}function w(o){console.log(o.target.id.replace("addtext_",""),o.target.value);const l=o.target.id.replace("addtext_",""),u=o.target.value;k({..._,[l]:u})}function v(){console.log("submitting",_),_.text!==""?(E!=null&&E.annotation&&k({..._,annotation:E.annotation}),K(_),I()):(document.getElementById("popup_textarea_warning").style.display="block",document.getElementById("addtext_text").style.border="1px solid red")}function h(){se(E),i()}return hr(vd,{title:"Add Text to Chart",description:"Change the titles on the chart.",open:L,close:i,children:Wr("div",{id:"popup_title",className:"popup_content",children:[Wr("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[Wr("div",{style:{marginBottom:20},children:[Wr("label",{htmlFor:"popup_text",children:[hr("b",{children:"Text:"}),hr("div",{id:"popup_textarea_warning",className:"popup_warning",children:"Text is required"})]}),hr("textarea",{id:"addtext_text",style:{...v_,width:"100%",maxWidth:"100%",maxHeight:"200px",marginTop:"8px"},rows:4,cols:50,placeholder:"Enter text here",onChange:w,defaultValue:((s=E==null?void 0:E.annotation)==null?void 0:s.text)||(_==null?void 0:_.text)})]}),Wr("div",{style:{display:"flex",gap:15,alignItems:"center",flexWrap:"wrap",columnCount:2,justifyContent:"space-between",marginBottom:20},children:[hr("label",{htmlFor:"addtext_color",children:hr("b",{children:"Font color"})}),hr("input",{type:"color",id:"addtext_color",style:{margin:"2px 2px 2px 15px"},defaultValue:((t=E==null?void 0:E.annotation)==null?void 0:t.color)||(_==null?void 0:_.color),onChange:w}),hr("label",{htmlFor:"addtext_bordercolor",style:{marginLeft:20},children:hr("b",{children:"Border color"})}),hr("input",{type:"color",id:"addtext_bordercolor",style:{margin:"2px 2px 10px 15px"},defaultValue:((a=E==null?void 0:E.annotation)==null?void 0:a.bordercolor)||(_==null?void 0:_.bordercolor),onChange:w}),hr("label",{htmlFor:"addtext_size",children:hr("b",{children:"Font size"})}),hr("input",{style:{...v_,width:"52px",margin:"0px 0px 0px 2px"},type:"number",id:"addtext_size",onChange:w,defaultValue:((r=E==null?void 0:E.annotation)==null?void 0:r.size)||(_==null?void 0:_.size)}),Wr("div",{children:[hr("label",{htmlFor:"addtext_yanchor",style:{marginRight:31},children:hr("b",{children:"Position"})}),Wr("select",{id:"addtext_yanchor",name:"yanchor",style:{width:"100px"},defaultValue:((n=E==null?void 0:E.annotation)==null?void 0:n.yanchor)||(_==null?void 0:_.yanchor),onChange:w,children:[hr("option",{value:"above",children:"Above"}),hr("option",{value:"below",children:"Below"})]})]})]})]}),Wr("div",{style:{float:"right",marginTop:20},children:[hr("button",{className:"_btn-tertiary ph-capture",id:"title_cancel",onClick:i,children:"Cancel"}),hr("button",{className:"_btn ph-capture",id:"title_delete",onClick:h,children:"Delete"}),hr("button",{className:"_btn ph-capture",id:"title_submit",onClick:v,children:"Submit"})]})]})})}function s9({plotlyData:L,open:I,close:K,defaultTitle:se,updateTitle:Pe,updateAxesTitles:R}){const[E,e]=In.useState(se),_=Object.keys(L.layout||{}).filter(v=>v.startsWith("yaxis")&&L.layout[v].range!=null),k=Object.keys(L.layout||{}).filter(v=>{var h;return v.startsWith("xaxis")&&L.layout[v].showticklabels!=null&&((h=L.layout[v])==null?void 0:h.anchor)}),[i,w]=In.useState({});return hr(vd,{title:"Chart Titles",description:"Change the titles on the chart.",open:I,close:K,children:Wr("div",{id:"popup_title",className:"popup_content",children:[Wr("div",{style:{display:"flex",flexDirection:"column",gap:0},children:[Wr("div",{children:[hr("label",{htmlFor:"title_text",children:hr("b",{children:"Title:"})}),hr("textarea",{id:"title_text",style:{...P5,width:"100%",maxWidth:"100%",maxHeight:"200px",marginTop:"8px",marginLeft:"0px"},rows:2,cols:20,value:E,onChange:v=>e(v.target.value)})]}),hr("div",{id:"xaxis_div",className:"csv_column_container",style:{marginTop:5,marginBottom:-5},children:k.map((v,h)=>{var s,t;return Wr("div",{style:{marginTop:5,marginBottom:5},children:[hr("label",{htmlFor:`title_${v}`,children:h===0?hr("b",{children:"X axis:"}):Wr("b",{children:["X axis ",h+1,":"]})}),hr("input",{id:`title_${v}`,style:{marginLeft:"0px",padding:"5px 2px 2px 5px"},type:"text",defaultValue:((t=(s=L==null?void 0:L.layout[v])==null?void 0:s.title)==null?void 0:t.text)||"",onChange:a=>{w({...i,[v]:a.target.value})}})]},v)})}),hr("div",{id:"yaxis_div",className:"csv_column_container",style:{marginTop:5,marginBottom:5},children:_.map((v,h)=>{var s,t;return Wr("div",{style:{marginTop:10},children:[hr("label",{htmlFor:`title_${v}`,children:h===0?hr("b",{children:"Y axis:"}):Wr("b",{children:["Y axis ",h+1,":"]})}),hr("input",{id:`title_${v}`,style:{marginLeft:"0px",padding:"5px 2px 2px 5px"},type:"text",defaultValue:((t=(s=L==null?void 0:L.layout[v])==null?void 0:s.title)==null?void 0:t.text)||"",onChange:a=>{w({...i,[v]:a.target.value})}})]},v)})})]}),Wr("div",{style:{float:"right",marginTop:20},children:[hr("button",{className:"_btn-tertiary ph-capture",id:"title_cancel",onClick:K,children:"Cancel"}),hr("button",{className:"_btn ph-capture",id:"title_submit",onClick:()=>{Pe(E),R(i),K()},children:"Submit"})]})]})})}function Mm(){return Mm=Object.assign?Object.assign.bind():function(L){for(var I=1;I'),!0):I?L.some(function(K){return I.includes(K)})||L.includes("*"):!0}var g9=function(I,K,se){se===void 0&&(se=!1);var Pe=K.alt,R=K.meta,E=K.mod,e=K.shift,_=K.ctrl,k=K.keys,i=I.key,w=I.code,v=I.ctrlKey,h=I.metaKey,s=I.shiftKey,t=I.altKey,a=Oc(w),r=i.toLowerCase();if(!se){if(Pe===!t&&r!=="alt"||e===!s&&r!=="shift")return!1;if(E){if(!h&&!v)return!1}else if(R===!h&&r!=="meta"&&r!=="os"||_===!v&&r!=="ctrl"&&r!=="control")return!1}return k&&k.length===1&&(k.includes(r)||k.includes(a))?!0:k?c9(k):!k},v9=In.createContext(void 0),m9=function(){return In.useContext(v9)};function D5(L,I){return L&&I&&typeof L=="object"&&typeof I=="object"?Object.keys(L).length===Object.keys(I).length&&Object.keys(L).reduce(function(K,se){return K&&D5(L[se],I[se])},!0):L===I}var y9=In.createContext({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),x9=function(){return In.useContext(y9)};function b9(L){var I=In.useRef(void 0);return D5(I.current,L)||(I.current=L),I.current}var m_=function(I){I.stopPropagation(),I.preventDefault(),I.stopImmediatePropagation()},_9=typeof window<"u"?In.useLayoutEffect:In.useEffect;function _c(L,I,K,se){var Pe=In.useRef(null),R=In.useRef(!1),E=K instanceof Array?se instanceof Array?void 0:se:K,e=L instanceof Array?L.join(E==null?void 0:E.splitKey):L,_=K instanceof Array?K:se instanceof Array?se:void 0,k=In.useCallback(I,_??[]),i=In.useRef(k);_?i.current=k:i.current=I;var w=b9(E),v=x9(),h=v.enabledScopes,s=m9();return _9(function(){if(!((w==null?void 0:w.enabled)===!1||!d9(h,w==null?void 0:w.scopes))){var t=function(l,u){var d;if(u===void 0&&(u=!1),!(p9(l)&&!z5(l,w==null?void 0:w.enableOnFormTags))&&!(w!=null&&w.ignoreEventWhen!=null&&w.ignoreEventWhen(l))){if(Pe.current!==null&&document.activeElement!==Pe.current&&!Pe.current.contains(document.activeElement)){m_(l);return}(d=l.target)!=null&&d.isContentEditable&&!(w!=null&&w.enableOnContentEditable)||hv(e,w==null?void 0:w.splitKey).forEach(function(c){var b,g=pv(c,w==null?void 0:w.combinationKey);if(g9(l,g,w==null?void 0:w.ignoreModifiers)||(b=g.keys)!=null&&b.includes("*")){if(u&&R.current)return;if(f9(l,g,w==null?void 0:w.preventDefault),!h9(l,g,w==null?void 0:w.enabled)){m_(l);return}i.current(l,g),u||(R.current=!0)}})}},a=function(l){l.key!==void 0&&(I5(Oc(l.code)),((w==null?void 0:w.keydown)===void 0&&(w==null?void 0:w.keyup)!==!0||w!=null&&w.keydown)&&t(l))},r=function(l){l.key!==void 0&&(R5(Oc(l.code)),R.current=!1,w!=null&&w.keyup&&t(l,!0))},n=Pe.current||(E==null?void 0:E.document)||document;return n.addEventListener("keyup",r),n.addEventListener("keydown",a),s&&hv(e,w==null?void 0:w.splitKey).forEach(function(o){return s.addHotkey(pv(o,w==null?void 0:w.combinationKey,w==null?void 0:w.description))}),function(){n.removeEventListener("keyup",r),n.removeEventListener("keydown",a),s&&hv(e,w==null?void 0:w.splitKey).forEach(function(o){return s.removeHotkey(pv(o,w==null?void 0:w.combinationKey,w==null?void 0:w.description))})}}},[e,w,h]),Pe}function Cc(L=!0){return new Promise(I=>{window.MODEBAR||(window.MODEBAR=window.document.getElementsByClassName("modebar-container")[0],window.MODEBAR.style.cssText=`${window.MODEBAR.style.cssText}; display:flex;`),window.MODEBAR&&(window.MODEBAR.style.cssText.includes("display: none")||!L?window.MODEBAR.style.cssText=`${window.MODEBAR.style.cssText}; display:flex;`:window.MODEBAR.style.cssText=`${window.MODEBAR.style.cssText}; display:none;`,I(!0))})}function w9({setModal:L,changeTheme:I,autoScaling:K,Loading:se,changeColor:Pe,downloadFinished:R}){return _c("ctrl+shift+t",()=>{L({name:"titleDialog"})},{preventDefault:!0}),_c("ctrl+t",()=>{L({name:"textDialog"})},{preventDefault:!0}),_c("ctrl+o",()=>{L({name:"overlayChart"})},{preventDefault:!0}),_c(["ctrl+shift+h","ctrl+h"],()=>{Cc()},{preventDefault:!0}),_c("ctrl+e",()=>{Pe(!0)},{preventDefault:!0}),_c("ctrl+shift+s",async()=>{L({name:"downloadCsv"}),await Jb(document.getElementById("plotlyChart"),R)},{preventDefault:!0}),_c("ctrl+s",async()=>{Cc(),e_("MainChart",Cc,se,R)},{preventDefault:!0}),_c("ctrl+w",()=>{window.close()},{preventDefault:!0}),{plotGlPixelRatio:1,scrollZoom:!0,responsive:!0,displaylogo:!1,displayModeBar:!0,modeBarButtonsToRemove:["lasso2d","select2d","downloadImage"],modeBarButtons:[[{name:"Download CSV (Ctrl+Shift+S)",icon:Wu.downloadCsv,click:async function(e){await Jb(e,R)}},{name:"Download Chart as Image (Ctrl+S)",icon:Wu.downloadImage,click:async function(){Cc(),await e_("MainChart",Cc,se,R)}}],[{name:"Edit Color (Ctrl+E)",icon:Wu.changeColor,click:function(){Pe(!0)}},"drawline","drawopenpath","drawcircle","drawrect","eraseshape"],[{name:"Overlay chart from CSV (Ctrl+O)",icon:Wu.plotCsv,click:function(){L({name:"overlayChart"})}},{name:"Add Text (Ctrl+T)",icon:Wu.addText,click:function(){L({name:"textDialog",data:{text:""}})}},{name:"Change Titles (Ctrl+Shift+T)",icon:Wu.changeTitle,click:function(){L({name:"titleDialog"})}},{name:"Change Theme",icon:Wu.sunIcon,click:function(){I(!0)}}],["hoverClosestCartesian","hoverCompareCartesian","toggleSpikelines"],[{name:"Auto Scale (Ctrl+Shift+A)",icon:ds.Icons.autoscale,click:function(){K(!0)}},"zoomIn2d","zoomOut2d","autoScale2d","zoom2d","pan2d"]]}}async function k9({plotData:L,volumeBars:I,setMaximizePlot:K}){const se=Object.keys(L.layout).filter(i=>i.startsWith("xaxis")).filter(i=>L.layout[i].showticklabels||L.layout[i].matches==null),Pe=L.data.filter(i=>{var w;return(w=i==null?void 0:i.name)==null?void 0:w.startsWith("Volume")});let R={},E=I||{old_nticks:{}};const e=window.innerWidth,_=window.innerHeight;let k=_>420&&e<920?8:_>420&&e<500?9:7;return e<750?(Pe.forEach(i=>{i.type=="bar"&&(i.opacity=1,i.marker.line.width=.09,I.yaxis==null&&(E.yaxis="yaxis"+i.yaxis.replace("y",""),R[E.yaxis+".tickfont.size"]=k,E.tickfont=L.layout[E.yaxis].tickfont||{},L.layout.margin.l-=40))}),se.forEach(i=>{var w;((w=I.old_nticks)==null?void 0:w[i])==null&&(R[i+".nticks"]=6,E.old_nticks[i]=L.layout[i].nticks||10)}),K(!0),await Cc()):window.MODEBAR.style.cssText.includes("display: none")&&(await Cc(!1),K(!1),I.old_nticks!=null&&se.forEach(i=>{I.old_nticks[i]!=null&&(R[i+".nticks"]=E.old_nticks[i],E.old_nticks[i]=void 0)}),I.yaxis!=null&&Pe.forEach(i=>{i.type=="bar"&&(i.opacity=.5,i.marker.line.width=.2,R[E.yaxis+".tickfont.size"]=E.tickfont.size+3,L.layout.margin.l+=40,E.yaxis=void 0)})),{volume_update:E,layout_update:R,plotData:L}}const T9=c7(i7);function F5(L,I){var se,Pe;I||(I=[(se=L[0])==null?void 0:se.x[L[0].x.length-1e3],(Pe=L[0])==null?void 0:Pe.x[L[0].x.length-1]]);const K=[];return L.forEach(R=>{const E={...R},e=["x","y","low","high","open","close","text","customdata"],_=R.x?R.x:[],k=[];for(let w=0;w<_.length;w++)_[w]>=I[0]&&_[w]<=I[1]&&k.push(w);e.forEach(w=>{R[w]&&Array.isArray(R[w])&&(E[w]=R[w].filter((v,h)=>k.includes(h)))}),["marker","line"].forEach(w=>{var v;(v=R[w])!=null&&v.color&&Array.isArray(R[w].color)&&(E[w]={...R[w]},E[w].color=R[w].color.filter((h,s)=>k.includes(s)))}),K.push(E)}),K.length===0?L:K}async function y_({event:L,figure:I}){var K,se;try{const Pe=I.data.filter(e=>e.x!==void 0&&e.x.length>0&&e.x[0]!==void 0);if(Pe.length===0)return I;const R=L?[L["xaxis.range[0]"],L["xaxis.range[1]"]]:[(K=Pe[0])==null?void 0:K.x[Pe[0].x.length-1e3],(se=Pe[0])==null?void 0:se.x[Pe[0].x.length-1]],E=F5(I.data,R);return I.data=E,I.layout.xaxis.range=R,I}catch(Pe){console.log("error",Pe)}}function A9({json:L,date:I,cmd:K,title:se,globals:Pe,theme:R,info:E}){var De,Ee,Se,he;const e=t7();In.useEffect(()=>{e&&e.capture("chart",E)},[]),L.layout.width=void 0,L.layout.height=void 0,(Ee=(De=L.layout)==null?void 0:De.title)!=null&&Ee.text&&(L.layout.title.text="");const[_,k]=In.useState(L),[i,w]=In.useState({}),[v,h]=In.useState(!1),[s,t]=In.useState(se),[a,r]=In.useState({}),[n,o]=In.useState(!1),[l,u]=In.useState({name:""}),[d,c]=In.useState(!1),[b,g]=In.useState(null),[f,x]=In.useState({old_nticks:{}}),[y,m]=In.useState(!1),[T,p]=In.useState(!1),[M,A]=In.useState(!1),[C,P]=In.useState(_),[O,z]=In.useState([]),[B,Y]=In.useState(!1),[D,G]=In.useState(!0),[U,j]=In.useState(!1),[W,Z]=In.useState(!1),[ie,te]=In.useState(!1),[J,X]=In.useState({}),[ee,re]=In.useState([]),[oe,ue]=In.useState([]),ce=()=>u({name:""});function de(fe){var be,Ie,Te,Ne,qe;console.log("onDeleteAnnotation",fe);const ae=(Ie=(be=C==null?void 0:C.layout)==null?void 0:be.annotations)==null?void 0:Ie.findIndex(ve=>ve.text===fe.text);console.log("index",ae),ae>-1&&((Ne=(Te=C==null?void 0:C.layout)==null?void 0:Te.annotations)==null||Ne.splice(ae,1),P({...C}),z((qe=C==null?void 0:C.layout)==null?void 0:qe.annotations))}function me(fe){h7({plotData:C,popupData:fe,setPlotData:P,setModal:u,setOnAnnotationClick:X,setAnnotations:z,onAnnotationClick:J,ohlcAnnotation:ee,setOhlcAnnotation:re,annotations:O,plotDiv:b})}In.useEffect(()=>{T&&(u({name:"downloadFinished"}),p(!1))},[T]),In.useEffect(()=>{a&&Object.keys(a).length>0&&(Object.keys(a).forEach(fe=>{C.layout[fe].title={...C.layout[fe].title||{},text:a[fe]},C.layout[fe].showticklabels=!0}),r({}))},[a]);function _e(fe){const ae=b.layout.shapes;if(!ae||ae.length===0)return;const be=ae[ae.length-1];be.line.color=fe,ds.update(b,{},{shapes:ae})}function Me(fe,ae=!1){const be=i[fe]||document.querySelector(`[data-title="${fe}"]`);ae?(be.style.border="transparent",be.style.boxShadow="none"):(be.style.border="1px solid rgba(0, 151, 222, 1.0)",be.style.borderRadius="5px",be.style.borderpadding="5px",be.style.boxShadow="0 0 5px rgba(0, 151, 222, 1.0)"),w({...i,[fe]:be})}function we(){const fe="Auto Scale (Ctrl+Shift+A)",ae=i[fe]||document.querySelector(`[data-title="${fe}"]`);let be=!0;ae.style.border==="transparent"?(b.removeAllListeners("plotly_relayout"),be=!1,b.on("plotly_relayout",Eh(async function(Ie){if(Ie["xaxis.range[0]"]!==void 0)if(M){const Te={..._};await y_({event:Ie,figure:Te}).then(async Ne=>{P(Ne),ds.react(b,Ne.data,Ne.layout);const qe=await t_(Ie,b);ue(qe.yaxis_fixedrange),ds.update(b,{},qe.to_update)})}else{const Te=await t_(Ie,b);ue(Te.yaxis_fixedrange),ds.update(b,{},Te.to_update)}},100))):(b.removeAllListeners("plotly_relayout"),oe.forEach(Ie=>{b.layout[Ie].fixedrange=!1}),ue([]),M&&b.on("plotly_relayout",Eh(async function(Ie){if(Ie["xaxis.range[0]"]===void 0)return;const Te={..._};await y_({event:Ie,figure:Te}).then(async Ne=>{P(Ne),ds.react(b,Ne.data,Ne.layout)})},100))),Me(fe,be)}function xe(){const fe="Edit Color (Ctrl+E)",ae=i[fe]||document.querySelector(`[data-title="${fe}"]`);let be=!0;ae.style.border==="transparent"&&(be=!1),te(!be),Me(fe,be)}return In.useEffect(()=>{U&&(console.log("activateAutoScale",!U),we(),j(!1))},[U]),In.useEffect(()=>{W&&(xe(),Z(!1))},[W]),In.useEffect(()=>{if(B)try{console.log("changeTheme",B);const fe=C==null?void 0:C.data.filter(qe=>{var ve;return(ve=qe==null?void 0:qe.name)==null?void 0:ve.startsWith("Volume")}),ae=!D;window.document.body.style.backgroundColor=ae?"#000":"#fff",C.layout.font={...C.layout.font||{},color:ae?"#fff":"#000"};const be=ae?Wu.sunIcon:Wu.moonIcon;document.querySelector('[data-title="Change Theme"]').getElementsByTagName("path")[0].setAttribute("d",be.path),document.querySelector('[data-title="Change Theme"]').getElementsByTagName("svg")[0].setAttribute("viewBox",be.viewBox);const Ne=ae?{"#009600":"#00ACFF","#c80000":"#e4003a"}:{"#e4003a":"#c80000","#00ACFF":"#009600"};fe.forEach(qe=>{qe.type==="bar"&&(qe.marker.color=qe.marker.color.map(ve=>Ne[ve]||ve))}),C.layout.template=ae?b7:_7,P({...C}),ds.react(b,C.data,C.layout),G(ae),Y(!1)}catch(fe){console.log("error",fe)}},[B]),In.useEffect(()=>{var fe,ae,be,Ie;if(n){G(!0),j(!1);const Te=["Download CSV","Download Chart as Image","Overlay chart from CSV","Add Text","Change Titles","Auto Scale (Ctrl+Shift+A)","Reset Axes"],Ne=document.querySelector('[data-title="Autoscale"]');Ne&&(Ne.getElementsByTagName("path")[0].setAttribute("d",ds.Icons.home.path),Ne.setAttribute("data-title","Reset Axes")),window.MODEBAR=document.getElementsByClassName("modebar-container")[0];const qe=window.MODEBAR.getElementsByClassName("modebar-btn");if(window.MODEBAR.style.cssText=`${window.MODEBAR.style.cssText}; display:flex;`,qe){const Ae={};for(let ze=0;ze0&&(P(Ue),x(Ve),ds.relayout(b,ze))}),R!=="dark"&&Y(!0);const ve=_.data.map(Ae=>Ae.type==="candlestick");if(((be=_.data[0])==null?void 0:be.x)!==void 0&&((Ie=_.data[0])==null?void 0:Ie.x.length)<=1e3||!ve.includes(!0))return;u({name:"alertDialog",data:{title:"Warning",content:`Data has been truncated to 1000 points for performance reasons. + Please use the zoom tool to see more data.`}});const Ce=F5(_.data);P({..._,data:Ce}),A(!0),j(!0)}},[n]),Wr("div",{className:"relative h-full",children:[d&&hr("div",{className:"absolute inset-0 flex items-center justify-center z-[100]",children:Wr("svg",{className:"animate-spin h-20 w-20 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[hr("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),hr("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8z"})]})}),Wr("div",{id:"loading",className:"saving",children:[hr("div",{id:"loading_text",className:"loading_text"}),hr("div",{id:"loader",className:"loader"})]}),hr(t9,{title:(Se=l==null?void 0:l.data)==null?void 0:Se.title,content:(he=l==null?void 0:l.data)==null?void 0:he.content,open:l.name==="alertDialog",close:ce}),hr(i9,{addOverlay:fe=>{console.log(fe),C.layout.showlegend=!0,P(fe),o(!1)},plotlyData:C,setLoading:c,open:l.name==="overlayChart",close:ce}),hr(s9,{updateTitle:fe=>t(fe),updateAxesTitles:fe=>r(fe),defaultTitle:s,plotlyData:C,open:l.name==="titleDialog",close:ce}),hr(o9,{popupData:l.name==="textDialog"?l==null?void 0:l.data:null,open:l.name==="textDialog",close:ce,addAnnotation:fe=>me(fe),deleteAnnotation:fe=>de(fe)}),hr(x7,{open:ie,onColorChange:_e}),hr(n9,{open:l.name==="downloadFinished",close:ce}),Wr("div",{className:"relative h-full",id:"MainChart",children:[Wr("div",{className:"_header relative gap-4 py-2 text-center text-xs flex items-center justify-between px-4 text-white",children:[hr("div",{className:"w-1/3",children:hr("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"40",fill:"none",viewBox:"0 0 64 40",children:hr("path",{fill:"#fff",d:"M61.283 3.965H33.608v27.757h25.699V19.826H37.561v-3.965H63.26V3.965h-1.977zM39.538 23.792h15.815v3.965H37.561v-3.965h1.977zM59.306 9.913v1.983H37.561V7.931h21.745v1.982zM33.606 0h-3.954v3.965H33.606V0zM25.7 3.966H0V15.86h25.7v3.965H3.953v11.896h25.7V3.966h-3.955zm0 21.808v1.983H7.907v-3.965h17.791v1.982zm0-15.86v1.982H3.953V7.931h21.745v1.982zM37.039 35.693v2.952l-.246-.246-.245-.245-.245-.247-.245-.246-.246-.246-.245-.245-.245-.247-.247-.246-.245-.246-.245-.246-.245-.246-.246-.246h-.49v3.936h.49v-3.198l.246.246.245.246.245.246.245.246.246.246.246.246.245.247.246.245.245.246.245.247.245.246.246.245.245.246h.245v-3.936h-.49zM44.938 37.17h-.491v-1.477h-2.944v3.937h3.93v-2.46h-.495zm-2.944-.246v-.739h1.962v.984h-1.962v-.245zm2.944.984v1.23h-2.944V37.66h2.944v.247zM52.835 37.17h-.49v-1.477h-2.946v3.937h3.925v-2.46h-.489zm-2.944-.246v-.739h1.963v.984h-1.965l.002-.245zm2.944.984v1.23H49.89V37.66h2.946v.247zM29.174 35.693H25.739v3.936H29.663v-.491H26.229v-.984h2.943v-.493H26.229v-1.476h3.434v-.492h-.489zM13.37 35.693H9.934v3.937h3.925v-3.937h-.49zm0 .738v2.709h-2.945v-2.955h2.943l.001.246zM21.276 35.693h-3.435v3.937h.491v-1.476h3.434v-2.461h-.49zm0 .738v1.23h-2.944v-1.476h2.944v.246z"})})}),hr("p",{className:"font-bold w-1/3 flex flex-col gap-0.5 items-center",children:s}),Wr("p",{className:"w-1/3 text-right text-xs",children:[new Intl.DateTimeFormat("en-GB",{dateStyle:"full",timeStyle:"long"}).format(I).replace(/:\d\d /," "),hr("br",{}),hr("span",{className:"text-grey-400",children:K})]})]}),hr("div",{className:n7("w-full sm:pb-12",{"h-[calc(100%-10px)]":y,"h-[calc(100%-50px)]":!y}),children:hr(T9,{onInitialized:()=>{if(!b){const fe=document.getElementById("plotlyChart");console.log("plot",fe),fe&&g(fe),fe.globals=Pe}n||o(!0)},className:"w-full h-full",divId:"plotlyChart",data:C.data,layout:C.layout,config:w9({setModal:u,changeTheme:Y,autoScaling:j,Loading:c,changeColor:Z,downloadFinished:p})})})]})]})}function M9(){const[L,I]=In.useState(null),[K,se]=In.useState({});In.useEffect(()=>{{const E=setInterval(()=>{if(window.json_data){const e=window.json_data;console.log(e),I(e),clearInterval(E)}},100);return()=>clearInterval(E)}},[]);const R=(E=>{var v,h,s,t;if(!E)return null;const e={added_traces:[],csv_yaxis_id:null,cmd_src_idx:null,cmd_idx:null,cmd_src:"",old_margin:null,title:""},_=(h=(v=E.layout)==null?void 0:v.title)==null?void 0:h.text.replace(/ -/g,"").replace(/-/g,"").replace(/|<\/b>/g,"").replace(/ /g,"_"),k=new Date().toISOString().slice(0,10).replace(/-/g,""),i=new Date().toISOString().slice(11,19).replace(/:/g,"");window.title=`openbb_${_}_${k}_${i}`,E.layout.annotations!==void 0&&E.layout.annotations.forEach(function(a){if(a.text!==void 0&&a.text[0]==="/"){e.cmd_src=a.text,e.cmd_idx=E.layout.annotations.indexOf(a),a.text="";const r=E.layout.margin;e.old_margin={...r},r.t!==void 0&&r.t>40&&(r.t=40),E.cmd==="/stocks/candle"&&(r.r-=50)}}),E.data.forEach(function(a){if(a.name!==void 0){const r=a.name.length;a.name=`${a.name} `,a.hoverlabel={namelength:r}}});const w=((t=(s=E.layout)==null?void 0:s.title)==null?void 0:t.text)||"Interactive Chart";return e.title=w,{data:E,date:new Date,globals:e,cmd:E.command_location,posthog:E.posthog,python_version:E.python_version,pywry_version:E.pywry_version,terminal_version:E.terminal_version,theme:E.theme,title:w}})(L);if(R){R.posthog.collect_logs&&!K&&se({api_host:"https://app.posthog.com",autocapture:{css_selector_allowlist:[".ph-capture"]},capture_pageview:!1,loaded:function(k){const i=(R==null?void 0:R.log_id)||"";i!==""&&i!=="REPLACE_ME"&&k.identify(i),k.onFeatureFlags(function(){k.isFeatureEnabled("record-pywry",{send_event:!1})||k.stopSessionRecording(),k.isFeatureEnabled("collect-logs-pywry",{send_event:!1})?k.has_opted_out_capturing()&&k.opt_in_capturing():k.opt_out_capturing()})}});const E={INFO:{command:R.cmd,title:R.title,date:R.date,python_version:R.python_version,pywry_version:R.pywry_version,terminal_version:R.terminal_version}},e=hr(A9,{json:R.data,date:R.date,cmd:R.cmd,title:R.title,globals:R.globals,theme:R.theme,info:E});return R.posthog.collect_logs&&K?hr(e7,{apiKey:"phc_vhssDAMod5qIplznQ75Kdgz4aB1qPFmeVmfEOZ4hkRw",options:K,children:e}):e}else return hr("div",{className:"absolute inset-0 flex items-center justify-center z-[100]",children:Wr("svg",{className:"animate-spin h-20 w-20 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[hr("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),hr("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8z"})]})})}qk.render(hr(C_.StrictMode,{children:hr(M9,{})}),document.getElementById("root"));