From bb94cd4739c5df22f9b03ab85bd46a5e4ac40b0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= Date: Tue, 2 Jul 2024 15:39:54 +0200 Subject: [PATCH 001/168] add download page --- pages/16_Download_Section.py | 64 ++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 pages/16_Download_Section.py diff --git a/pages/16_Download_Section.py b/pages/16_Download_Section.py new file mode 100644 index 0000000..073ca63 --- /dev/null +++ b/pages/16_Download_Section.py @@ -0,0 +1,64 @@ +import streamlit as st + +from os.path import join, exists, isfile, basename +from os import listdir + +from src.common import page_setup +from io import StringIO, BytesIO +from zipfile import ZipFile, ZIP_DEFLATED + +# Define output folder here; all subfolders will be handled as downloadable +# directories +output_folder = 'your_folder_goes_here' + +def content(): + page_setup() + + dirpath = join(st.session_state["workspace"], output_folder) + + if exists(dirpath): + directories = sorted( + [entry for entry in listdir(dirpath) if not isfile(entry)] + ) + else: + directories = [] + + if len(directories) == 0: + st.error('No results to show yet. Please run a workflow first!') + return + + # Table Header + columns = st.columns((0.4, 0.6)) + columns[0].write('**Run**') + columns[1].write('**Download**') + + # Table Body + for i, directory in enumerate(directories): + st.divider() + columns = st.columns((0.4, 0.6)) + columns[0].empty().write(directory) + + with columns[1]: + button_placeholder = st.empty() + + clicked = button_placeholder.button('Prepare Download', key=i) + if clicked: + button_placeholder.empty() + with st.spinner(): + out_zip = join(dirpath, directory, 'output.zip') + if not exists(out_zip): + with ZipFile(out_zip, 'w', ZIP_DEFLATED) as zip_file: + for output in listdir(join(dirpath, directory)): + try: + with open(join(dirpath, directory, output), 'r') as f: + zip_file.writestr(basename(output), f.read()) + except: + continue + with open(out_zip, 'rb') as f: + button_placeholder.download_button( + "Download ⬇️", f, + file_name = f'{directory}.zip' + ) + +if __name__ == "__main__": + content() From 89d88e1ed67590f270b70e28e001ad4bedbbee33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= Date: Tue, 2 Jul 2024 15:55:15 +0200 Subject: [PATCH 002/168] comments --- pages/16_Download_Section.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pages/16_Download_Section.py b/pages/16_Download_Section.py index 073ca63..ea9de97 100644 --- a/pages/16_Download_Section.py +++ b/pages/16_Download_Section.py @@ -14,8 +14,10 @@ def content(): page_setup() + # Generate full path dirpath = join(st.session_state["workspace"], output_folder) - + + # Detect downloadable content if exists(dirpath): directories = sorted( [entry for entry in listdir(dirpath) if not isfile(entry)] @@ -23,6 +25,7 @@ def content(): else: directories = [] + # Show error if no content is available for download if len(directories) == 0: st.error('No results to show yet. Please run a workflow first!') return @@ -41,10 +44,12 @@ def content(): with columns[1]: button_placeholder = st.empty() + # Show placeholder button before download is prepared clicked = button_placeholder.button('Prepare Download', key=i) if clicked: button_placeholder.empty() with st.spinner(): + # Create ZIP file out_zip = join(dirpath, directory, 'output.zip') if not exists(out_zip): with ZipFile(out_zip, 'w', ZIP_DEFLATED) as zip_file: @@ -54,6 +59,7 @@ def content(): zip_file.writestr(basename(output), f.read()) except: continue + # Show download button after ZIP file was created with open(out_zip, 'rb') as f: button_placeholder.download_button( "Download ⬇️", f, From 5a1e3bcd72940b469ed2b889475c152f52ef9019 Mon Sep 17 00:00:00 2001 From: axelwalter Date: Wed, 3 Jul 2024 11:51:42 +0200 Subject: [PATCH 003/168] update dependencies --- environment.yml | 13 +++++-------- requirements.txt | 9 +++------ 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/environment.yml b/environment.yml index ef14bf4..5ec4ef0 100644 --- a/environment.yml +++ b/environment.yml @@ -3,15 +3,12 @@ name: streamlit-env channels: - conda-forge dependencies: - - python==3.10 - - plotly==5.18.0 - - pip==23.3 - - numpy==1.25.2 - - pandas==2.1.2 + - python==3.11 + - plotly==5.22.0 + - pip==24.0 + - numpy==1.26.4 # pandas and numpy are dependencies of pyopenms, however, pyopenms needs numpy<=1.26.4 - mono==6.12.0.90 - pip: # dependencies only available through pip # streamlit dependencies - - streamlit==1.29.0 - - streamlit-plotly-events==0.0.6 - - streamlit-aggrid==0.3.4.post3 + - streamlit==1.36.0 - captcha==0.5.0 diff --git a/requirements.txt b/requirements.txt index ac7acd6..11aa933 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,11 +1,8 @@ # the requirements.txt file is intended for deployment on streamlit cloud and if the simple container is built # note that it is much more restricted in terms of installing third-parties / etc. # preferably use the batteries included or simple docker file for local hosting -streamlit==1.34.0 -streamlit-plotly-events==0.0.6 -streamlit-aggrid==0.3.4.post3 -pandas==2.1.2 -numpy==1.25.2 -plotly==5.18.0 +streamlit==1.36.0 pyopenms==3.1.0 +numpy==1.26.4 # pandas and numpy are dependencies of pyopenms, however, pyopenms needs numpy<=1.26.4 +plotly==5.22.0 captcha==0.5.0 \ No newline at end of file From cc4e1a0f3185544390d1ed5c54b324066a4d7a23 Mon Sep 17 00:00:00 2001 From: axelwalter Date: Tue, 9 Jul 2024 11:26:36 +0200 Subject: [PATCH 004/168] update raw data viewer - remove plotly-events and aggrid - 2D peak map updating while zooming in - 3D peak map static plot on zoom selection of 2D plot - spectrum viewer, select spectrum from table, update top 5 m/z annotations zooming in - chromatogram viewer with BPC, TIC and XIC - every section in separate fragments --- hooks/hook-streamlit.py | 1 - "pages/11_\360\237\221\200_View_Raw_Data.py" | 87 +---- run_app_temp.spec | 1 - src/common.py | 70 ++-- src/plotting/.gitignore | 1 + src/plotting/BasePlotter.py | 58 ++++ src/plotting/MSExperimentPlotter.py | 214 ++++++++++++ src/view.py | 329 ++++++++++++------- win_exe_with_pyinstaller.md | 2 - 9 files changed, 551 insertions(+), 212 deletions(-) create mode 100644 src/plotting/.gitignore create mode 100644 src/plotting/BasePlotter.py create mode 100644 src/plotting/MSExperimentPlotter.py diff --git a/hooks/hook-streamlit.py b/hooks/hook-streamlit.py index 7cb4712..11bf2b6 100644 --- a/hooks/hook-streamlit.py +++ b/hooks/hook-streamlit.py @@ -2,7 +2,6 @@ datas = [] datas += copy_metadata("streamlit") -datas += copy_metadata("streamlit_plotly_events") datas += copy_metadata("pyopenms") datas += copy_metadata("captcha") datas += copy_metadata("pyarrow") diff --git "a/pages/11_\360\237\221\200_View_Raw_Data.py" "b/pages/11_\360\237\221\200_View_Raw_Data.py" index 9e68091..f2ae9c2 100755 --- "a/pages/11_\360\237\221\200_View_Raw_Data.py" +++ "b/pages/11_\360\237\221\200_View_Raw_Data.py" @@ -1,9 +1,8 @@ from pathlib import Path -from streamlit_plotly_events import plotly_events import streamlit as st -from src.common import page_setup, v_space, show_fig, save_params +from src.common import page_setup from src import view from src.captcha_ import captcha_control @@ -16,78 +15,24 @@ captcha_control() st.title("View raw MS data") -selected_file = st.selectbox( + +# File selection can not be in fragment since it influences the subsequent sections +cols = st.columns(3) +selected_file = cols[0].selectbox( "choose file", [f.name for f in Path(st.session_state.workspace, "mzML-files").iterdir()], + key="view_selected_file" ) if selected_file: - df = view.get_df(Path(st.session_state.workspace, "mzML-files", selected_file)) - df_MS1, df_MS2 = ( - df[df["mslevel"] == 1], - df[df["mslevel"] == 2], - ) - - if not df_MS1.empty: - tabs = st.tabs( - ["📈 Base peak chromatogram and MS1 spectra", "📈 Peak map and MS2 spectra"] - ) - with tabs[0]: - # BPC and MS1 spec - st.markdown("💡 Click a point in the BPC to show the MS1 spectrum.") - bpc_fig = view.plot_bpc(df_MS1) - - # Determine RT positions from clicks in BPC to show MS1 at this position - bpc_points = plotly_events(bpc_fig) - if bpc_points: - ms1_rt = bpc_points[0]["x"] - else: - ms1_rt = df_MS1.loc[0, "RT"] - - spec = df_MS1.loc[df_MS1["RT"] == ms1_rt].squeeze() + view.get_df(Path(st.session_state.workspace, "mzML-files", selected_file)) - title = f"MS1 spectrum @RT {spec['RT']}" - fig = view.plot_ms_spectrum( - spec, - title, - "#EF553B", - ) - show_fig(fig, title.replace(" ", "_")) - with tabs[1]: - c1, c2 = st.columns(2) - c1.number_input( - "2D map intensity cutoff", - 1000, - 1000000000, - params["2D-map-intensity-cutoff"], - 1000, - key="2D-map-intensity-cutoff", - ) - v_space(1, c2) - c2.markdown("💡 Click anywhere to show the closest MS2 spectrum.") - map2D = view.plot_2D_map( - df_MS1, - df_MS2, - st.session_state["2D-map-intensity-cutoff"], - ) - map_points = plotly_events(map2D) - # Determine RT and mz positions from clicks in the map to get closest MS2 spectrum - if not df_MS2.empty: - if map_points: - rt = map_points[0]["x"] - prec_mz = map_points[0]["y"] - else: - rt = df_MS2.iloc[0, 2] - prec_mz = df_MS2.iloc[0, 0] - spec = df_MS2.loc[ - ( - abs(df_MS2["RT"] - rt) + abs(df_MS2["precursormz"] - prec_mz) - ).idxmin(), - :, - ] - title = f"MS2 spectrum @precursor m/z {round(spec['precursormz'], 4)} @RT {round(spec['RT'], 2)}" - - ms2_fig = view.plot_ms_spectrum(spec, title, "#00CC96") - show_fig(ms2_fig, title.replace(" ", "_")) - -save_params(params) +tabs = st.tabs( + ["📈 Peak map (MS1)", "📈 Spectra (MS1 + MS2)", "📈 Chromatograms (MS1)"] +) +with tabs[0]: + view.view_peak_map() +with tabs[1]: + view.view_spectrum() +with tabs[2]: + view.view_bpc_tic() diff --git a/run_app_temp.spec b/run_app_temp.spec index 4ccd4bb..2afc7a4 100644 --- a/run_app_temp.spec +++ b/run_app_temp.spec @@ -12,7 +12,6 @@ a = Analysis( ("./myenv/Lib/site-packages/altair/vegalite/v5/schema/vega-lite-schema.json","./altair/vegalite/v5/schema/"), ("./myenv/Lib/site-packages/streamlit/static", "./streamlit/static"), ("./myenv/Lib/site-packages/streamlit/runtime", "./streamlit/runtime"), - ("./myenv/Lib/site-packages/streamlit_plotly_events", "./streamlit_plotly_events/"), ("./myenv/Lib/site-packages/pyopenms", "./pyopenms/"), ("./myenv/Lib/site-packages/captcha", "./captcha/"), ("./myenv/Lib/site-packages/pyarrow", "./pyarrow/"), diff --git a/src/common.py b/src/common.py index 6be9bfd..87c294d 100644 --- a/src/common.py +++ b/src/common.py @@ -269,7 +269,7 @@ def show_table(df: pd.DataFrame, download_name: str = "") -> None: return df -def show_fig(fig, download_name: str, container_width: bool = True) -> None: +def show_fig(fig, download_name: str, container_width: bool = True, selection_session_state_key: str = "") -> None: """ Displays a Plotly chart and adds a download button to the plot. @@ -277,32 +277,58 @@ def show_fig(fig, download_name: str, container_width: bool = True) -> None: fig (plotly.graph_objs._figure.Figure): The Plotly figure to display. download_name (str): The name for the downloaded file. container_width (bool, optional): If True, the figure will use the container width. Defaults to True. + selection_session_state_key (str, optional): If set, save the rectangular selection to session state with this key. Returns: None """ - # Display plotly chart using container width and removed controls except for download - st.plotly_chart( - fig, - use_container_width=container_width, - config={ - "displaylogo": False, - "modeBarButtonsToRemove": [ - "zoom", - "pan", - "select", - "lasso", - "zoomin", - "autoscale", - "zoomout", - "resetscale", - ], - "toImageButtonOptions": { - "filename": download_name, - "format": st.session_state["image-format"], + if not selection_session_state_key: + st.plotly_chart( + fig, + use_container_width=container_width, + config={ + "displaylogo": False, + "modeBarButtonsToRemove": [ + "zoom", + "pan", + "select", + "lasso", + "zoomin", + "autoscale", + "zoomout", + "resetscale", + ], + "toImageButtonOptions": { + "filename": download_name, + "format": st.session_state["image-format"], + }, }, - }, - ) + ) + else: + st.plotly_chart( + fig, + key=selection_session_state_key, + selection_mode=["points", "box"], + on_select="rerun", + config={ + "displaylogo": False, + "modeBarButtonsToRemove": [ + "zoom", + "pan", + "lasso", + "zoomin", + "autoscale", + "zoomout", + "resetscale", + "select" + ], + "toImageButtonOptions": { + "filename": download_name, + "format": st.session_state["image-format"], + }, + }, + use_container_width=True + ) def reset_directory(path: Path) -> None: diff --git a/src/plotting/.gitignore b/src/plotting/.gitignore new file mode 100644 index 0000000..763624e --- /dev/null +++ b/src/plotting/.gitignore @@ -0,0 +1 @@ +__pycache__/* \ No newline at end of file diff --git a/src/plotting/BasePlotter.py b/src/plotting/BasePlotter.py new file mode 100644 index 0000000..12a30f0 --- /dev/null +++ b/src/plotting/BasePlotter.py @@ -0,0 +1,58 @@ +from abc import ABC, abstractmethod +from dataclasses import dataclass +from enum import Enum +from typing import Literal, List +import numpy as np + +# A colorset suitable for color blindness +class Colors(str, Enum): + BLUE = "#4575B4" + RED = "#D73027" + LIGHTBLUE = "#91BFDB" + ORANGE = "#FC8D59" + PURPLE = "#7B2C65" + YELLOW = "#FCCF53" + DARKGRAY = "#555555" + LIGHTGRAY = "#BBBBBB" + + +@dataclass(kw_only=True) +class _BasePlotterConfig(ABC): + title: str = "1D Plot" + xlabel: str = "X-axis" + ylabel: str = "Y-axis" + height: int = 500 + width: int = 500 + relative_intensity: bool = False + show_legend: bool = True + + +# Abstract Class for Plotting +class _BasePlotter(ABC): + def __init__(self, config: _BasePlotterConfig) -> None: + self.config = config + self.fig = None # holds the figure object + + def updateConfig(self, **kwargs): + for key, value in kwargs.items(): + if hasattr(self.config, key): + setattr(self.config, key, value) + else: + raise ValueError(f"Invalid config setting: {key}") + + def _get_n_grayscale_colors(self, n: int) -> List[str]: + """Returns n evenly spaced grayscale colors in hex format.""" + hex_list = [] + for v in np.linspace(50, 200, n): + hex = "#" + for _ in range(3): + hex += f"{int(round(v)):02x}" + hex_list.append(hex) + return hex_list + + def plot(self, data, **kwargs): + return self._plot(data, **kwargs) + + @abstractmethod + def _plot(self, data, **kwargs): + pass \ No newline at end of file diff --git a/src/plotting/MSExperimentPlotter.py b/src/plotting/MSExperimentPlotter.py new file mode 100644 index 0000000..7cbf0fb --- /dev/null +++ b/src/plotting/MSExperimentPlotter.py @@ -0,0 +1,214 @@ +from dataclasses import dataclass +from typing import Literal, Union + +import matplotlib.pyplot as plt +import pandas as pd +import numpy as np +import plotly.graph_objects as go + +from .BasePlotter import Colors, _BasePlotter, _BasePlotterConfig + + +@dataclass(kw_only=True) +class MSExperimentPlotterConfig(_BasePlotterConfig): + bin_peaks: Union[Literal["auto"], bool] = "auto" + num_RT_bins: int = 50 + num_mz_bins: int = 50 + plot3D: bool = False + + +class MSExperimentPlotter(_BasePlotter): + def __init__(self, config: MSExperimentPlotterConfig, **kwargs) -> None: + """ + Initialize the MSExperimentPlotter with a given configuration and optional parameters. + + Args: + config (MSExperimentPlotterConfig): Configuration settings for the spectrum plotter. + **kwargs: Additional keyword arguments for customization. + """ + super().__init__(config=config, **kwargs) + + def _prepare_data(self, exp: pd.DataFrame) -> pd.DataFrame: + """Prepares data for plotting based on configuration (binning, relative intensity, hover text).""" + if self.config.bin_peaks == True or ( + exp.shape[0] > self.config.num_mz_bins * self.config.num_RT_bins + and self.config.bin_peaks == "auto" + ): + exp["mz"] = pd.cut(exp["mz"], bins=self.config.num_mz_bins) + exp["RT"] = pd.cut(exp["RT"], bins=self.config.num_RT_bins) + + # Group by x and y bins and calculate the mean intensity within each bin + exp = ( + exp.groupby(["mz", "RT"], observed=True) + .agg({"inty": "mean"}) + .reset_index() + ) + exp["mz"] = exp["mz"].apply(lambda interval: interval.mid).astype(float) + exp["RT"] = exp["RT"].apply(lambda interval: interval.mid).astype(float) + exp = exp.fillna(0) + else: + self.config.bin_peaks = False + + if self.config.relative_intensity: + exp["inty"] = exp["inty"] / max(exp["inty"]) * 100 + + exp["hover_text"] = exp.apply( + lambda x: f"m/z: {round(x['mz'], 6)}
RT: {round(x['RT'], 2)}
intensity: {int(x['inty'])}", + axis=1, + ) + + return exp.sort_values("inty") + + def _plotMatplotlib3D( + self, + exp: pd.DataFrame, + ) -> plt.Figure: + """Plot 3D peak map with mz, RT and intensity dimensions. Colored peaks based on intensity.""" + fig = plt.figure( + figsize=(self.config.width / 100, self.config.height / 100), + layout="constrained", + ) + ax = fig.add_subplot(111, projection="3d") + + if self.config.title: + ax.set_title(self.config.title, fontsize=12, loc="left") + ax.set_xlabel( + self.config.ylabel, + fontsize=9, + labelpad=-2, + color=Colors["DARKGRAY"], + style="italic", + ) + ax.set_ylabel( + self.config.xlabel, + fontsize=9, + labelpad=-2, + color=Colors["DARKGRAY"], + ) + ax.set_zlabel("intensity", fontsize=10, color=Colors["DARKGRAY"], labelpad=-2) + for axis in ("x", "y", "z"): + ax.tick_params(axis=axis, labelsize=8, pad=-2, colors=Colors["DARKGRAY"]) + + ax.set_box_aspect(aspect=None, zoom=0.88) + ax.ticklabel_format(axis="z", style="sci", useMathText=True, scilimits=(0,0)) + ax.grid(color="#FF0000", linewidth=0.8) + ax.xaxis.pane.fill = False + ax.yaxis.pane.fill = False + ax.zaxis.pane.fill = False + ax.view_init(elev=25, azim=-45, roll=0) + + # Plot lines to the bottom with colored based on inty + for i in range(len(exp)): + ax.plot( + [exp["RT"].iloc[i], exp["RT"].iloc[i]], + [exp["inty"].iloc[i], 0], + [exp["mz"].iloc[i], exp["mz"].iloc[i]], + zdir="x", + color=plt.cm.magma_r((exp["inty"].iloc[i] / exp["inty"].max())), + ) + return fig + + def _plotPlotly2D( + self, + exp: pd.DataFrame, + ) -> go.Figure: + """Plot 2D peak map with mz and RT dimensions. Colored peaks based on intensity.""" + layout = go.Layout( + title=dict(text=self.config.title), + xaxis=dict(title=self.config.xlabel), + yaxis=dict(title=self.config.ylabel), + showlegend=self.config.show_legend, + template="simple_white", + dragmode="select", + height=self.config.height, + width=self.config.width, + ) + fig = go.Figure(layout=layout) + fig.add_trace( + go.Scattergl( + name="peaks", + x=exp["RT"], + y=exp["mz"], + mode="markers", + marker=dict( + color=exp["inty"].apply(lambda x: np.log(x)), + colorscale="sunset", + size=8, + symbol="square", + colorbar=( + dict(thickness=8, outlinewidth=0, tickformat=".0e") + if self.config.show_legend + else None + ), + ), + hovertext=exp["hover_text"] if not self.config.bin_peaks else None, + hoverinfo="text", + showlegend=False, + ) + ) + return fig + + def _plot( + self, + exp: pd.DataFrame, + ) -> go.Figure: + """Prepares data and returns Plotly 2D plot or Matplotlib 3D plot.""" + exp = self._prepare_data(exp) + if self.config.plot3D: + return self._plotMatplotlib3D(exp) + return self._plotPlotly2D(exp) + +# ============================================================================= # +## FUNCTIONAL API ## +# ============================================================================= # + + +def plotMSExperiment( + exp: pd.DataFrame, + plot3D: bool = False, + relative_intensity: bool = False, + bin_peaks: Union[Literal["auto"], bool] = "auto", + num_RT_bins: int = 50, + num_mz_bins: int = 50, + width: int = 750, + height: int = 500, + title: str = "Peak Map", + xlabel: str = "RT (s)", + ylabel: str = "m/z", + show_legend: bool = False, +): + """ + Plots a Spectrum from an MSSpectrum object + + Args: + spectrum (pd.DataFrame): OpenMS MSSpectrum Object + plot3D: (bool = False, optional): Plot peak map 3D with peaks colored based on intensity. Disables colorbar legend. Works with "MATPLOTLIB" engine only. Defaults to False. + relative_intensity (bool, optional): If true, plot relative intensity values. Defaults to False. + bin_peaks: (Union[Literal["auto"], bool], optional): Bin peaks to reduce complexity and improve plotting speed. Hovertext disabled if activated. If set to "auto" any MSExperiment with more then num_RT_bins x num_mz_bins peaks will be binned. Defaults to "auto". + num_RT_bins: (int, optional): Number of bins in RT dimension. Defaults to 50. + num_mz_bins: (int, optional): Number of bins in m/z dimension. Defaults to 50. + width (int, optional): Width of plot. Defaults to 500px. + height (int, optional): Height of plot. Defaults to 500px. + title (str, optional): Plot title. Defaults to "Spectrum Plot". + xlabel (str, optional): X-axis label. Defaults to "m/z". + ylabel (str, optional): Y-axis label. Defaults to "intensity" or "ion mobility". + show_legend (int, optional): Show legend. Defaults to False. + + Returns: + Plot: The generated plot using the specified engine. + """ + config = MSExperimentPlotterConfig( + plot3D=plot3D, + relative_intensity=relative_intensity, + bin_peaks=bin_peaks, + num_RT_bins=num_RT_bins, + num_mz_bins=num_mz_bins, + width=width, + height=height, + title=title, + xlabel=xlabel, + ylabel=ylabel, + show_legend=show_legend, + ) + plotter = MSExperimentPlotter(config) + return plotter.plot(exp.copy()) \ No newline at end of file diff --git a/src/view.py b/src/view.py index 770b58d..1386b45 100644 --- a/src/view.py +++ b/src/view.py @@ -5,10 +5,12 @@ import plotly.graph_objects as go import streamlit as st import pyopenms as poms +from .plotting.MSExperimentPlotter import plotMSExperiment +from .common import show_fig from typing import Union -@st.cache_data + def get_df(file: Union[str, Path]) -> pd.DataFrame: """ Load a Mass Spectrometry (MS) experiment from a given mzML file and return @@ -25,131 +27,94 @@ def get_df(file: Union[str, Path]) -> pd.DataFrame: """ exp = poms.MSExperiment() poms.MzMLFile().load(str(file), exp) - df = exp.get_df() - # MSlevel for each scan - df.insert(0, "mslevel", [spec.getMSLevel() for spec in exp]) - # Precursor m/z for each scan - df.insert( - 0, - "precursormz", - [ - spec.getPrecursors()[0].getMZ() if spec.getPrecursors() else 0 - for spec in exp - ], + df_spectra = exp.get_df() + df_spectra["MS level"] = [spec.getMSLevel() for spec in exp] + precs = [] + for spec in exp: + p = spec.getPrecursors() + if p: + precs.append(p[0].getMZ()) + else: + precs.append(np.nan) + df_spectra["precursor m/z"] = precs + df_spectra["max intensity m/z"] = df_spectra.apply( + lambda x: x["mzarray"][x["intarray"].argmax()], axis=1 ) - if not df.empty: - return df - return pd.DataFrame() - - -@st.cache_resource -def plot_2D_map(df_ms1: pd.DataFrame, df_ms2: pd.DataFrame, cutoff: int) -> go.Figure: - """ - Plots a 2D peak map. + if not df_spectra.empty: + st.session_state["view_spectra"] = df_spectra + else: + st.session_state["view_spectra"] = pd.DataFrame() + exp_ms2 = poms.MSExperiment() + exp_ms1 = poms.MSExperiment() + for spec in exp: + if spec.getMSLevel() == 1: + exp_ms1.addSpectrum(spec) + elif spec.getMSLevel() == 2: + exp_ms2.addSpectrum(spec) + if not exp_ms1.empty(): + st.session_state["view_ms1"] = exp_ms1.get_df(long=True) + else: + st.session_state["view_ms1"] = pd.DataFrame() + if not exp_ms2.empty(): + st.session_state["view_ms2"] = exp_ms2.get_df(long=True) + else: + st.session_state["view_ms2"] = pd.DataFrame() - This function takes two dataframes (`df_ms1` and `df_ms2`) and a cutoff value (`cutoff`) as input, and - returns a plotly Figure object containing a 2D peak map. +def plot_bpc_tic() -> go.Figure: + """Plot the base peak and total ion chromatogram (TIC). - Args: - df_ms1 (pd.DataFrame): A pandas DataFrame containing the MS1 peak information. - df_ms2 (pd.DataFrame): A pandas DataFrame containing the MS2 peak information. - cutoff (int): The cutoff threshold for the intensity filter. - - Returns - ------- - fig : plotly.graph_objs._figure.Figure - The plotly Figure object containing the 2D peak map. + Returns: + A plotly Figure object containing the BPC and TIC plot. """ fig = go.Figure() - # Get all intensities in a 1D array - ints = np.concatenate([df_ms1.loc[index, "intarray"] for index in df_ms1.index]) - # Keep intensities over cutoff threshold - int_filter = ints > cutoff - ints = ints[int_filter] - # Based on the intensity filter, filter mz and RT values as well - mzs = np.concatenate([df_ms1.loc[index, "mzarray"] for index in df_ms1.index])[ - int_filter - ] - rts = np.concatenate( - [ - np.full(len(df_ms1.loc[index, "mzarray"]), df_ms1.loc[index, "RT"]) - for index in df_ms1.index - ] - )[int_filter] - # Sort in ascending order to plot highest intensities last - sort = np.argsort(ints) - ints = ints[sort] - mzs = mzs[sort] - rts = rts[sort] - # Use Scattergl (webgl) for efficient scatter plot - fig.add_trace( - go.Scattergl( - name="peaks", - x=rts, - y=mzs, - mode="markers", - marker_color=ints, - marker_symbol="square", + if st.session_state.view_tic: + df = st.session_state.view_ms1.groupby("RT").sum().reset_index() + fig.add_scatter( + x=df["RT"], + y=df["inty"], + mode="lines", + line=dict(color="#f24c5c", width=3), # OpenMS red + name="TIC", + showlegend=True, ) - ) - # Add MS2 precursors as green markers - fig.add_trace( - go.Scattergl( - name="peaks", - x=df_ms2["RT"], - y=df_ms2["precursormz"], - mode="markers", - marker_color="#00FF00", - marker_symbol="x", + if st.session_state.view_bpc: + df = st.session_state.view_ms1.groupby("RT").max().reset_index() + fig.add_scatter( + x=df["RT"], + y=df["inty"], + mode="lines", + line=dict(color="#2d3a9d", width=3), # OpenMS blue + name="BPC", + showlegend=True, ) - ) - fig.update_layout( - xaxis_title="retention time", - yaxis_title="m/z", - plot_bgcolor="rgb(255,255,255)", - showlegend=False, - ) - fig.layout.template = "plotly_white" - # Set color scale - color_scale = [ - (0.00, "rgba(233, 233, 233, 1.0)"), - (0.01, "rgba(243, 236, 166, 1.0)"), - (0.1, "rgba(255, 168, 0, 1.0)"), - (0.2, "rgba(191, 0, 191, 1.0)"), - (0.4, "rgba(68, 0, 206, 1.0)"), - (1.0, "rgba(33, 0, 101, 1.0)"), - ] - fig.update_traces( - marker_colorscale=color_scale, - hovertext=ints.round(), - selector={"type": 'scattergl'}, - ) - return fig + if st.session_state.view_eic: + df = st.session_state.view_ms1 + target_value = st.session_state.view_eic_mz.strip().replace(",", ".") + try: + target_value = float(target_value) + ppm_tolerance = st.session_state.view_eic_ppm + tolerance = (target_value * ppm_tolerance) / 1e6 + # Filter the DataFrame + df_eic = df[(df['mz'] >= target_value - tolerance) & (df['mz'] <= target_value + tolerance)] + if not df_eic.empty: + fig.add_scatter( + x=df_eic["RT"], + y=df_eic["inty"], + mode="lines", + line=dict(color="#f6bf26", width=3), + name="XIC", + showlegend=True, + ) + except: + st.error("Invalid m/z value.") -@st.cache_resource -def plot_bpc(df: pd.DataFrame) -> go.Figure: - """Plot the base peak chromatogram (BPC) from a given dataframe. - - Args: - df: A pandas DataFrame containing the data to be plotted. The DataFrame should - contain columns named 'RT' and 'intarray', representing the retention time - and intensity values, respectively, for each data point. - - Returns: - A plotly Figure object containing the BPC plot. - """ - intensity = np.array([max(intensity_array) for intensity_array in df["intarray"]]) - fig = px.line(df, x="RT", y=intensity) - fig.update_traces(line_color="#555FF5", line_width=3) - fig.update_traces(showlegend=False) fig.update_layout( - showlegend=False, - # title_text="base peak chromatogram (BPC)", + title=f"{st.session_state.view_selected_file}", xaxis_title="retention time (s)", - yaxis_title="intensity (cps)", + yaxis_title="intensity", plot_bgcolor="rgb(255,255,255)", - width=1000, + height=500, ) fig.layout.template = "plotly_white" return fig @@ -179,13 +144,147 @@ def create_spectra(x, y, zero=0): df = create_spectra(spec["mzarray"], spec["intarray"]) fig = px.line(df, x="mz", y="intensity") fig.update_traces(line_color=color) + fig.add_hline(0, line=dict(color="#DDDDDD"), line_width=3) fig.update_layout( showlegend=False, title_text=title, xaxis_title="m/z", yaxis_title="intensity", plot_bgcolor="rgb(255,255,255)", + dragmode="select", ) + # add annotations + top_indices = np.argsort(spec["intarray"])[-5:][::-1] + for index in top_indices: + mz = spec["mzarray"][index] + i = spec["intarray"][index] + fig.add_annotation( + dict( + x=mz, + y=i, + text=str(round(mz, 5)), + showarrow=False, + xanchor="left", + font=dict( + family="Open Sans Mono, monospace", + size=12, + color=color, + ), + ) + ) fig.layout.template = "plotly_white" - fig.update_yaxes(fixedrange=True) + # adjust x-axis limits to not cut peaks and annotations + x_values = [trace.x for trace in fig.data] + xmin = min([min(values) for values in x_values]) + xmax = max([max(values) for values in x_values]) + padding = 0.15 * (xmax - xmin) + fig.update_layout( + xaxis_range=[ + xmin - padding, + xmax + padding, + ] + ) return fig + + +@st.experimental_fragment +def view_peak_map(): + df = st.session_state.view_ms1 + if "view_peak_map_selection" in st.session_state: + box = st.session_state.view_peak_map_selection.selection.box + if box: + df = st.session_state.view_ms1.copy() + df = df[df["RT"] > box[0]["x"][0]] + df = df[df["mz"] > box[0]["y"][1]] + df = df[df["mz"] < box[0]["y"][0]] + df = df[df["RT"] < box[0]["x"][1]] + peak_map = plotMSExperiment( + df, plot3D=False, title=st.session_state.view_selected_file + ) + c1, c2 = st.columns(2) + with c1: + st.info( + "💡 Zoom in via rectangular selection for more details and 3D plot. Double click plot to zoom back out." + ) + show_fig( + peak_map, + f"peak_map_{st.session_state.view_selected_file}", + selection_session_state_key="view_peak_map_selection", + ) + with c2: + if df.shape[0] < 2500: + peak_map_3D = plotMSExperiment(df, plot3D=True, title="") + st.pyplot(peak_map_3D, use_container_width=True) + + +@st.experimental_fragment +def view_spectrum(): + cols = st.columns([0.34, 0.66]) + with cols[0]: + df = st.session_state.view_spectra.copy() + df["spectrum ID"] = df.index + 1 + event = st.dataframe( + df, + column_order=[ + "spectrum ID", + "RT", + "MS level", + "max intensity m/z", + "precursor m/z", + ], + selection_mode="single-row", + on_select="rerun", + use_container_width=True, + hide_index=True, + ) + rows = event.selection.rows + with cols[1]: + if rows: + df = st.session_state.view_spectra.iloc[rows[0]] + if "view_spectrum_selection" in st.session_state: + box = st.session_state.view_spectrum_selection.selection.box + if box: + mz_min, mz_max = sorted(box[0]["x"]) + mask = (df["mzarray"] > mz_min) & (df["mzarray"] < mz_max) + df["intarray"] = df["intarray"][mask] + df["mzarray"] = df["mzarray"][mask] + + if df["mzarray"].size > 0: + title = f"{st.session_state.view_selected_file} spec={rows[0]+1} mslevel={df['MS level']}" + if df["precursor m/z"] > 0: + title += f" precursor m/z: {round(df['precursor m/z'], 4)}" + fig = plot_ms_spectrum(df, title, "#2d3a9d") + show_fig(fig, title.replace(" ", "_"), True, "view_spectrum_selection") + else: + st.session_state.pop("view_spectrum_selection") + st.rerun() + else: + st.info("💡 Select rows in the spectrum table to display plot.") + + +@st.experimental_fragment() +def view_bpc_tic(): + cols = st.columns(5) + cols[0].checkbox( + "Total Ion Chromatogram (TIC)", True, key="view_tic", help="Plot TIC." + ) + cols[1].checkbox( + "Base Peak Chromatogram (BPC)", True, key="view_bpc", help="Plot BPC." + ) + cols[2].checkbox( + "Extracted Ion Chromatogram (EIC/XIC)", True, key="view_eic", help="Plot extracted ion chromatogram with specified m/z." + ) + cols[3].text_input( + "XIC m/z", + "235.1189", + help="m/z for XIC calculation.", + key="view_eic_mz", + ) + cols[4].number_input( + "XIC ppm tolerance", + 0.1, 50.0, 10.0, 1.0, + help="Tolerance for XIC calculation (ppm).", + key="view_eic_ppm" + ) + fig = plot_bpc_tic() + show_fig(fig, f"BPC-TIC-{st.session_state.view_selected_file}") diff --git a/win_exe_with_pyinstaller.md b/win_exe_with_pyinstaller.md index 729c158..e66eab0 100644 --- a/win_exe_with_pyinstaller.md +++ b/win_exe_with_pyinstaller.md @@ -63,7 +63,6 @@ like: \hooks\hook-streamlit.py
from PyInstaller.utils.hooks import copy_metadata datas = [] datas += copy_metadata('streamlit') -datas += copy_metadata('streamlit_plotly_events') datas += copy_metadata('pyopenms') # can add new package e-g datas += copy_metadata('captcha') @@ -112,7 +111,6 @@ datas=[ ("myenv/Lib/site-packages/altair/vegalite/v4/schema/vega-lite-schema.json","./altair/vegalite/v4/schema/"), ("myenv/Lib/site-packages/streamlit/static", "./streamlit/static"), ("myenv/Lib/site-packages/streamlit/runtime", "./streamlit/runtime"), - ("myenv/Lib/site-packages/streamlit_plotly_events", "./streamlit_plotly_events/"), ("myenv/Lib/site-packages/pyopenms", "./pyopenms/"), # Add new datas e-g we add in hook captcha ("myenv/Lib/site-packages/captcha", "./captcha/") From a55181867c1ca10715d709aa776a8fe4ae8d2e67 Mon Sep 17 00:00:00 2001 From: axelwalter Date: Tue, 9 Jul 2024 11:39:17 +0200 Subject: [PATCH 005/168] move captcha control to page_setup --- app.py | 64 +++++++------------- "pages/10_\360\237\223\201_File_Upload.py" | 6 -- "pages/11_\360\237\221\200_View_Raw_Data.py" | 24 +++----- pages/12_Simple_Workflow.py | 10 +-- pages/13_Run_subprocess.py | 6 -- pages/15_Workflow_with_mzML_files.py | 7 --- src/common.py | 9 +++ 7 files changed, 43 insertions(+), 83 deletions(-) diff --git a/app.py b/app.py index 738de4e..5d529be 100644 --- a/app.py +++ b/app.py @@ -18,27 +18,23 @@ None """ -import sys - from pathlib import Path import streamlit as st -from src.captcha_ import captcha_control from src.common import page_setup, save_params params = page_setup(page="main") +st.title("OpenMS Streamlit Template App") +st.markdown(""" +This repository contains a template app for OpenMS workflows in a web application using the **streamlit** framework. + +It serves as a foundation for apps ranging from simple workflows with **pyOpenMS** to complex workflows utilizing **OpenMS TOPP tools** with parallel execution. -def main(): - """ - Display main page content. - """ - st.title("OpenMS Streamlit Template App") - st.info(""" -This repository contains a template app for OpenMS workflows in a web application using the **streamlit** framework. It serves as a foundation for apps ranging from simple workflows with **pyOpenMS** to complex workflows utilizing **OpenMS TOPP tools** with parallel execution. It includes solutions for handling user data and parameters in workspaces as well as deployment with docker-compose. +It includes solutions for handling user data and parameters in workspaces as well as deployment with docker-compose. """) - st.subheader("Features") - st.markdown(""" +st.subheader("Features") +st.markdown(""" - Workspaces for user data with unique shareable IDs - Persistent parameters and input files within a workspace - Captcha control @@ -46,42 +42,26 @@ def main(): - framework for workflows with OpenMS TOPP tools - Deployment [with docker-compose](https://github.com/OpenMS/streamlit-deployment) """) - st.subheader("Quick Start") - if Path("OpenMS-App.zip").exists(): - st.markdown(""" +st.subheader("Quick Start") +if Path("OpenMS-App.zip").exists(): + st.markdown(""" Download the latest version for Windows here by clicking the button below. """) - with open("OpenMS-App.zip", "rb") as file: - st.download_button( - label="Download for Windows", - data=file, - file_name="OpenMS-App.zip", - mime="archive/zip", - type="primary", - ) - st.markdown(""" + with open("OpenMS-App.zip", "rb") as file: + st.download_button( + label="Download for Windows", + data=file, + file_name="OpenMS-App.zip", + mime="archive/zip", + type="primary", + ) + st.markdown(""" Extract the zip file and run the executable (.exe) file to launch the app. Since every dependency is compressed and packacked the app will take a while to launch (up to one minute). """) - st.markdown(""" +st.markdown(""" Check out the documentation for **users** and **developers** is included as pages indicated by the 📖 icon Try the example pages **📁 mzML file upload**, **👀 visualization** and **example workflows**. """) - save_params(params) - - -# Check if the script is run in local mode (e.g., "streamlit run app.py local") -if "local" in sys.argv: - # In local mode, run the main function without applying captcha - main() - -# If not in local mode, assume it's hosted/online mode -else: - # WORK LIKE MULTIPAGE APP - if "controllo" not in st.session_state or st.session_state["controllo"] is False: - # Apply captcha control to verify the user - captcha_control() - else: - # Run the main function - main() +save_params(params) \ No newline at end of file diff --git "a/pages/10_\360\237\223\201_File_Upload.py" "b/pages/10_\360\237\223\201_File_Upload.py" index e30fa2f..ec5892c 100755 --- "a/pages/10_\360\237\223\201_File_Upload.py" +++ "b/pages/10_\360\237\223\201_File_Upload.py" @@ -3,17 +3,11 @@ import streamlit as st import pandas as pd -from src.captcha_ import captcha_control from src.common import page_setup, save_params, v_space, show_table from src import fileupload params = page_setup() -# If run in hosted mode, show captcha as long as it has not been solved -if "controllo" not in st.session_state or params["controllo"] is False: - # Apply captcha by calling the captcha_control function - captcha_control() - st.title("File Upload") tabs = ["File Upload", "Example Data"] diff --git "a/pages/11_\360\237\221\200_View_Raw_Data.py" "b/pages/11_\360\237\221\200_View_Raw_Data.py" index f2ae9c2..fad276d 100755 --- "a/pages/11_\360\237\221\200_View_Raw_Data.py" +++ "b/pages/11_\360\237\221\200_View_Raw_Data.py" @@ -4,16 +4,10 @@ from src.common import page_setup from src import view -from src.captcha_ import captcha_control params = page_setup() -# If run in hosted mode, show captcha as long as it has not been solved -if "controllo" not in st.session_state or params["controllo"] is False: - # Apply captcha by calling the captcha_control function - captcha_control() - st.title("View raw MS data") # File selection can not be in fragment since it influences the subsequent sections @@ -27,12 +21,12 @@ view.get_df(Path(st.session_state.workspace, "mzML-files", selected_file)) -tabs = st.tabs( - ["📈 Peak map (MS1)", "📈 Spectra (MS1 + MS2)", "📈 Chromatograms (MS1)"] -) -with tabs[0]: - view.view_peak_map() -with tabs[1]: - view.view_spectrum() -with tabs[2]: - view.view_bpc_tic() + tabs = st.tabs( + ["📈 Peak map (MS1)", "📈 Spectra (MS1 + MS2)", "📈 Chromatograms (MS1)"] + ) + with tabs[0]: + view.view_peak_map() + with tabs[1]: + view.view_spectrum() + with tabs[2]: + view.view_bpc_tic() diff --git a/pages/12_Simple_Workflow.py b/pages/12_Simple_Workflow.py index ec55445..8084d85 100755 --- a/pages/12_Simple_Workflow.py +++ b/pages/12_Simple_Workflow.py @@ -2,16 +2,10 @@ from src.common import page_setup, save_params, show_table from src import simpleworkflow -from src.captcha_ import captcha_control # Page name "workflow" will show mzML file selector in sidebar params = page_setup() -# If run in hosted mode, show captcha as long as it has not been solved -if "controllo" not in st.session_state or params["controllo"] is False: - # Apply captcha by calling the captcha_control function - captcha_control() - st.title("Simple Workflow") st.markdown("Example for a simple workflow with quick execution times.") @@ -40,7 +34,9 @@ # Get a dataframe with x and y dimensions via time consuming (sleep) cached function # If the input has been given before, the function does not run again # Input x from local variable, input y from session state via key -df = simpleworkflow.generate_random_table(xdimension, st.session_state["example-y-dimension"]) +df = simpleworkflow.generate_random_table( + xdimension, st.session_state["example-y-dimension"] +) # Display dataframe via custom show_table function, which will render a download button as well show_table(df, download_name="random-table") diff --git a/pages/13_Run_subprocess.py b/pages/13_Run_subprocess.py index 30dd264..8b3c01c 100644 --- a/pages/13_Run_subprocess.py +++ b/pages/13_Run_subprocess.py @@ -5,17 +5,11 @@ from pathlib import Path from src.common import page_setup, save_params -from src.captcha_ import captcha_control from src.run_subprocess import run_subprocess # Page name "workflow" will show mzML file selector in sidebar params = page_setup() -# If run in hosted mode, show captcha as long as it has not been solved -if "controllo" not in st.session_state or params["controllo"] is False: - # Apply captcha by calling the captcha_control function - captcha_control() - st.title("Run subprocess") st.markdown( """ diff --git a/pages/15_Workflow_with_mzML_files.py b/pages/15_Workflow_with_mzML_files.py index 7bbaf52..a274023 100755 --- a/pages/15_Workflow_with_mzML_files.py +++ b/pages/15_Workflow_with_mzML_files.py @@ -6,17 +6,10 @@ from src.common import page_setup, save_params, show_fig, show_table from src import mzmlfileworkflow -from src.captcha_ import captcha_control - # Page name "workflow" will show mzML file selector in sidebar params = page_setup() -# If run in hosted mode, show captcha as long as it has not been solved -if "controllo" not in st.session_state or params["controllo"] is False: - # Apply captcha by calling the captcha_control function - captcha_control() - st.title("Workflow") st.markdown( """ diff --git a/src/common.py b/src/common.py index 87c294d..edb26b2 100644 --- a/src/common.py +++ b/src/common.py @@ -9,6 +9,8 @@ import streamlit as st import pandas as pd +from .captcha_ import captcha_control + # set these variables according to your project APP_NAME = "OpenMS Streamlit App" REPOSITORY_NAME = "streamlit-template" @@ -127,6 +129,13 @@ def page_setup(page: str = "") -> dict[str, Any]: # Render the sidebar params = render_sidebar(page) + + # If run in hosted mode, show captcha as long as it has not been solved + if not "local" in sys.argv: + if "controllo" not in st.session_state or params["controllo"] is False: + # Apply captcha by calling the captcha_control function + captcha_control() + return params From 694becbd4077129e6d122141a2e8a62fe1b65957 Mon Sep 17 00:00:00 2001 From: axelwalter Date: Tue, 9 Jul 2024 14:08:23 +0200 Subject: [PATCH 006/168] docs in one page --- app.py | 8 +- pages/0_Documentation.py | 594 ++++++++++++++++++ "pages/0_\360\237\223\226_Installation.py" | 61 -- "pages/1_\360\237\223\226_User_Guide.py" | 52 -- "pages/2_\360\237\223\226_Build_App.py" | 78 --- ...60\237\223\226_TOPP_Workflow_Framework.py" | 254 -------- .../4_\360\237\223\226_Windows_executable.py" | 78 --- "pages/5_\360\237\223\226_Deployment.py" | 15 - 8 files changed, 597 insertions(+), 543 deletions(-) create mode 100644 pages/0_Documentation.py delete mode 100644 "pages/0_\360\237\223\226_Installation.py" delete mode 100644 "pages/1_\360\237\223\226_User_Guide.py" delete mode 100644 "pages/2_\360\237\223\226_Build_App.py" delete mode 100644 "pages/3_\360\237\223\226_TOPP_Workflow_Framework.py" delete mode 100644 "pages/4_\360\237\223\226_Windows_executable.py" delete mode 100644 "pages/5_\360\237\223\226_Deployment.py" diff --git a/app.py b/app.py index 5d529be..ace5767 100644 --- a/app.py +++ b/app.py @@ -21,9 +21,9 @@ from pathlib import Path import streamlit as st -from src.common import page_setup, save_params +from src.common import page_setup -params = page_setup(page="main") +page_setup(page="main") st.title("OpenMS Streamlit Template App") st.markdown(""" @@ -62,6 +62,4 @@ Check out the documentation for **users** and **developers** is included as pages indicated by the 📖 icon Try the example pages **📁 mzML file upload**, **👀 visualization** and **example workflows**. -""") - -save_params(params) \ No newline at end of file +""") \ No newline at end of file diff --git a/pages/0_Documentation.py b/pages/0_Documentation.py new file mode 100644 index 0000000..436e459 --- /dev/null +++ b/pages/0_Documentation.py @@ -0,0 +1,594 @@ +import streamlit as st +from src.Workflow import Workflow +from src.workflow.StreamlitUI import StreamlitUI +from src.workflow.FileManager import FileManager +from src.workflow.CommandExecutor import CommandExecutor +from src.common import page_setup +from inspect import getsource +from pathlib import Path +import requests + +page_setup() + + +st.title("📖 Documentation") + +cols = st.columns(2) + +pages = [ + "User Guide", + "Installation", + "Developers Guide: How to build app based on this template", + "Developers Guide: TOPP Workflow Framework", + "Developer Guide: Windows Executables", + "Developers Guide: Deployment", +] +page = cols[0].selectbox( + "**Content**", + pages, +) + +############################################################################################# +# User Guide +############################################################################################# + +if page == pages[0]: + st.markdown( + """ +# User Guide + +Welcome to the OpenMS Streamlit Web Application! This guide will help you understand how to use our tools effectively. + +## Advantages of OpenMS Web Apps + +OpenMS web applications provide a user-friendly interface for accessing the powerful features of OpenMS. Here are a few advantages: +- **Accessibility**: Access powerful OpenMS algorithms and TOPP tools from any device with a web browser. +- **Ease of Use**: Simplified user interface makes it easy for both beginners and experts to perform complex analyses. +- **No Installation Required**: Use the tools without the need to install OpenMS locally, saving time and system resources. + +## Workspaces + +In the OpenMS web application, workspaces are designed to keep your analysis organized: +- **Workspace Specific Parameters and Files**: Each workspace stores parameters and files (uploaded input files and results from workflows). +- **Persistence**: Your workspaces and parameters are saved, so you can return to your analysis anytime and pick up where you left off. + +## Online and Local Mode Differences + +There are a few key differences between operating in online and local modes: +- **File Uploads**: + - *Online Mode*: You can upload only one file at a time. This helps manage server load and optimizes performance. + - *Local Mode*: Multiple file uploads are supported, giving you flexibility when working with large datasets. +- **Workspace Access**: + - In online mode, workspaces are stored temporarily and will be cleared after seven days of inactivity. + - In local mode, workspaces are saved on your local machine, allowing for persistent storage. + +## Downloading Results + +You can download the results of your analyses, including figures and tables, directly from the application: +- **Figures**: Click the camera icon button, appearing while hovering on the top right corner of the figure. Set the desired image format in the settings panel in the side bar. +- **Tables**: Use the download button to save tables in *csv* format, appearing while hovering on the top right corner of the table. + +## Getting Started + +To get started: +1. Select or create a new workspace. +2. Upload your data file. +3. Set the necessary parameters for your analysis. +4. Run the analysis. +5. View and download your results. + +For more detailed information on each step, refer to the specific sections of this guide. +""" + ) + +############################################################################################# +# Installation +############################################################################################# + +if page == pages[1]: + if Path("OpenMS-App.zip").exists(): + st.markdown( + """ +Download the latest version for **Windows** here clicking the button below. +""" + ) + with open("OpenMS-App.zip", "rb") as file: + st.download_button( + label="Download for Windows", + data=file, + file_name="OpenMS-App.zip", + mime="archive/zip", + type="primary", + ) + + st.markdown( + """ +# Installation + +## Windows + +The app is available as pre-packaged Windows executable, including all dependencies. + +The windows executable is built by a GitHub action and can be downloaded [here](https://github.com/OpenMS/streamlit-template/actions/workflows/build-windows-executable-app.yaml). +Select the latest successfull run and download the zip file from the artifacts section, while signed in to GitHub. + +## Python + +Clone the [streamlit-template repository](https://github.com/OpenMS/streamlit-template). It includes files to install dependencies via pip or conda. + +### via pip in an existing Python environment + +To install all required depdencies via pip in an already existing Python environment, run the following command in the terminal: + +`pip install -r requirements.txt` + +### create new environment via conda/mamba + +Create and activate the conda environment: + +`conda env create -f environment.yml` + +`conda activate streamlit-env` + +### run the app + +Run the app via streamlit command in the terminal with or without *local* mode (default is *online* mode). Learn more about *local* and *online* mode in the documentation page 📖 **OpenMS Template App**. + +`streamlit run app.py [local]` + +## Docker + +This repository contains two Dockerfiles. + +1. `Dockerfile`: This Dockerfile builds all dependencies for the app including Python packages and the OpenMS TOPP tools. Recommended for more complex workflows where you want to use the OpenMS TOPP tools for instance with the **TOPP Workflow Framework**. +2. `Dockerfile_simple`: This Dockerfile builds only the Python packages. Recommended for simple apps using pyOpenMS only. + +""" + ) + +############################################################################################# +# Developer Overview, how to build app based on Template +############################################################################################# + +if page == pages[2]: + st.markdown( + """ +# Build your own app based on this template + +## App layout + +- *Main page* contains explanatory text on how to use the app and a workspace selector. `app.py` +- *Pages* can be navigated via *Sidebar*. Sidebar also contains the OpenMS logo, settings panel and a workspace indicator. The *main page* contains a workspace selector as well. +- See *pages* in the template app for example use cases. The content of this app serves as a documentation. + +## Key concepts + +- **Workspaces** +: Directories where all data is generated and uploaded can be stored as well as a workspace specific parameter file. +- **Run the app locally and online** +: Launching the app with the `local` argument lets the user create/remove workspaces. In the online the user gets a workspace with a specific ID. +- **Parameters** +: Parameters (defaults in `assets/default-params.json`) store changing parameters for each workspace. Parameters are loaded via the page_setup function at the start of each page. To track a widget variable via parameters simply give them a key and add a matching entry in the default parameters file. Initialize a widget value from the params dictionary. + +```python +params = page_setup() + +st.number_input(label="x dimension", min_value=1, max_value=20, +value=params["example-y-dimension"], step=1, key="example-y-dimension") + +save_params() +``` + +## Code structure + +- **Pages** must be placed in the `pages` directory. +- It is recommended to use a separate file for defining functions per page in the `src` directory. +- The `src/common.py` file contains a set of useful functions for common use (e.g. rendering a table with download button). + +## Modify the template to build your own app + +1. In `src/common.py`, update the name of your app and the repository name + ```python + APP_NAME = "OpenMS Streamlit App" + REPOSITORY_NAME = "streamlit-template" + ``` +2. In `clean-up-workspaces.py`, update the name of the workspaces directory to `/workspaces-` + ```python + workspaces_directory = Path("/workspaces-streamlit-template") + ``` +3. Update `README.md` accordingly + + +**Dockerfile-related** +1. Choose one of the Dockerfiles depending on your use case: + - `Dockerfile` builds OpenMS including TOPP tools + - `Dockerfile_simple` uses pyOpenMS only +2. Update the Dockerfile: + - with the `GITHUB_USER` owning the Streamlit app repository + - with the `GITHUB_REPO` name of the Streamlit app repository + - if your main page Python file is not called `app.py`, modify the following line + ```dockerfile + RUN echo "mamba run --no-capture-output -n streamlit-env streamlit run app.py" >> /app/entrypoint.sh + ``` +3. Update Python package dependency files: + - `requirements.txt` if using `Dockerfile_simple` + - `environment.yml` if using `Dockerfile` + +## How to build a workflow + +### Simple workflow using pyOpenMS + +Take a look at the example pages `Simple Workflow` or `Workflow with mzML files` for examples (on the *sidebar*). Put Streamlit logic inside the pages and call the functions with workflow logic from from the `src` directory (for our examples `src/simple_workflow.py` and `src/mzmlfileworkflow.py`). + +### Complex workflow using TOPP tools + +This template app features a module in `src/workflow` that allows for complex and long workflows to be built very efficiently. Check out the `TOPP Workflow Framework` page for more information (on the *sidebar*). +""" + ) + +############################################################################################# +# TOPP Workflow Framework +############################################################################################# + +if page == pages[3]: + wf = Workflow() + + st.title("TOPP Workflow Framework Documentation") + + st.markdown( + """ +## Features + +- streamlined methods for uploading files, setting parameters, and executing workflows +- automatic parameter handling +- quickly build parameter interface for TOPP tools with all parameters from *ini* files +- automatically create a log file for each workflow run with stdout and stderr +- workflow output updates automatically in short intervalls +- user can leave the app and return to the running workflow at any time +- quickly build a workflow with multiple steps channelling files between steps +""" + ) + + st.markdown( + """ +## Quickstart + +This repository contains a module in `src/workflow` that provides a framework for building and running analysis workflows. + +The `WorkflowManager` class provides the core workflow logic. It uses the `Logger`, `FileManager`, `ParameterManager`, and `CommandExecutor` classes to setup a complete workflow logic. + +To build your own workflow edit the file `src/TOPPWorkflow.py`. Use any streamlit components such as tabs (as shown in example), columns, or even expanders to organize the helper functions for displaying file upload and parameter widgets. + +> 💡 Simply set a name for the workflow and overwrite the **`upload`**, **`configure`**, **`execution`** and **`results`** methods in your **`Workflow`** class. + +The file `pages/6_TOPP-Workflow.py` displays the workflow content and can, but does not have to be modified. + +The `Workflow` class contains four important members, which you can use to build your own workflow: + +> **`self.params`:** dictionary of parameters stored in a JSON file in the workflow directory. Parameter handling is done automatically. Default values are defined in input widgets and non-default values are stored in the JSON file. + +> **`self.ui`:** object of type `StreamlitUI` contains helper functions for building the parameter and file upload widgets. + +> **`self.executor`:** object of type `CommandExecutor` can be used to run any command line tool alone or in parallel and includes a convenient method for running TOPP tools. + +> **`self.logger`:** object of type `Logger` to write any output to a log file during workflow execution. + +> **`self.file_manager`:** object of type `FileManager` to handle file types and creation of output directories. +""" + ) + + with st.expander("**Complete example for custom Workflow class**", expanded=False): + st.code(getsource(Workflow)) + + st.markdown( + """ +## File Upload + +All input files for the workflow will be stored within the workflow directory in the subdirectory `input-files` within it's own subdirectory for the file type. + +The subdirectory name will be determined by a **key** that is defined in the `self.ui.upload_widget` method. The uploaded files are available by the specific key for parameter input widgets and accessible while building the workflow. + +Calling this method will create a complete file upload widget section with the following components: + +- file uploader +- list of currently uploaded files with this key (or a warning if there are none) +- button to delete all files + +Fallback files(s) can be specified, which will be used if the user doesn't upload any files. This can be useful for example for database files where a default is provided. +""" + ) + + st.code(getsource(Workflow.upload)) + + st.info( + "💡 Use the same **key** for parameter widgets, to select which of the uploaded files to use for analysis." + ) + + with st.expander("**Code documentation:**", expanded=True): + st.help(StreamlitUI.upload_widget) + + st.markdown( + """ +## Parameter Input + +The paramter section is already pre-defined as a form with buttons to **save parameters** and **load defaults** and a toggle to show TOPP tool parameters marked as advanced. + +Generating parameter input widgets is done with the `self.ui.input` method for any parameter and the `self.ui.input_TOPP` method for TOPP tools. + +**1. Choose `self.ui.input_widget` for any paramter not-related to a TOPP tool or `self.ui.select_input_file` for any input file:** + +It takes the obligatory **key** parameter. The key is used to access the parameter value in the workflow parameters dictionary `self.params`. Default values do not need to be specified in a separate file. Instead they are determined from the widgets default value automatically. Widget types can be specified or automatically determined from **default** and **options** parameters. It's suggested to add a **help** text and other parameters for numerical input. + +Make sure to match the **key** of the upload widget when calling `self.ui.input_TOPP`. + +**2. Choose `self.ui.input_TOPP` to automatically generate complete input sections for a TOPP tool:** + +It takes the obligatory **topp_tool_name** parameter and generates input widgets for each parameter present in the **ini** file (automatically created) except for input and output file parameters. For all input file parameters a widget needs to be created with `self.ui.select_input_file` with an appropriate **key**. For TOPP tool parameters only non-default values are stored. + +**3. Choose `self.ui.input_python` to automatically generate complete input sections for a custom Python tool:** + +Takes the obligatory **script_file** argument. The default location for the Python script files is in `src/python-tools` (in this case the `.py` file extension is optional in the **script_file** argument), however, any other path can be specified as well. Parameters need to be specified in the Python script in the **DEFAULTS** variable with the mandatory **key** and **value** parameters. +""" + ) + + with st.expander( + "Options to use as dictionary keys for parameter definitions (see `src/python-tools/example.py` for an example)" + ): + st.markdown( + """ +**Mandatory** keys for each parameter +- *key:* a unique identifier +- *value:* the default value + +**Optional** keys for each parameter +- *name:* the name of the parameter +- *hide:* don't show the parameter in the parameter section (e.g. for **input/output files**) +- *options:* a list of valid options for the parameter +- *min:* the minimum value for the parameter (int and float) +- *max:* the maximum value for the parameter (int and float) +- *step_size:* the step size for the parameter (int and float) +- *help:* a description of the parameter +- *widget_type:* the type of widget to use for the parameter (default: auto) +- *advanced:* whether or not the parameter is advanced (default: False) +""" + ) + + st.code(getsource(Workflow.configure)) + st.info( + "💡 Access parameter widget values by their **key** in the `self.params` object, e.g. `self.params['mzML-files']` will give all selected mzML files." + ) + + with st.expander("**Code documentation**", expanded=True): + st.help(StreamlitUI.input_widget) + st.help(StreamlitUI.select_input_file) + st.help(StreamlitUI.input_TOPP) + st.help(StreamlitUI.input_python) + st.markdown( + """ +## Building the Workflow + +Building the workflow involves **calling all (TOPP) tools** using **`self.executor`** with **input and output files** based on the **`FileManager`** class. For TOPP tools non-input-output parameters are handled automatically. Parameters for other processes and workflow logic can be accessed via widget keys (set in the parameter section) in the **`self.params`** dictionary. + +### FileManager + +The `FileManager` class serves as an interface for unified input and output files with useful functionality specific to building workflows, such as **setting a (new) file type** and **subdirectory in the workflows result directory**. + +Use the **`get_files`** method to get a list of all file paths as strings. + +Optionally set the following parameters modify the files: + +- **set_file_type** (str): set new file types and result subdirectory. +- **set_results_dir** (str): set a new subdirectory in the workflows result directory. +- **collect** (bool): collect all files into a single list. Will return a list with a single entry, which is a list of all files. Useful to pass to tools which can handle multiple input files at once. +""" + ) + + st.code( + """ +# Get all file paths as strings from self.param entry. +mzML_files = self.file_manager.get_files(self.params["mzML-files]) +# mzML_files = ['../workspaces-streamlit-template/default/topp-workflow/input-files/mzML-files/Control.mzML', '../workspaces-streamlit-template/default/topp-workflow/input-files/mzML-files/Treatment.mzML'] + +# Creating output files for a TOPP tool, setting a new file type and result subdirectory name. +feature_detection_out = self.file_manager.get_files(mzML_files, set_file_type="featureXML", set_results_dir="feature-detection") +# feature_detection_out = ['../workspaces-streamlit-template/default/topp-workflow/results/feature-detection/Control.featureXML', '../workspaces-streamlit-template/default/topp-workflow/results/feature-detection/Treatment.featureXML'] + +# Setting a name for the output directory automatically (useful if you never plan to access these files in the results section). +feature_detection_out = self.file_manager.get_files(mzML_files, set_file_type="featureXML", set_results_dir="auto") +# feature_detection_out = ['../workspaces-streamlit-template/default/topp-workflow/results/6DUd/Control.featureXML', '../workspaces-streamlit-template/default/topp-workflow/results/6DUd/Treatment.featureXML'] + +# Combining all mzML files to be passed to a TOPP tool in a single run. Using "collected" files as argument for self.file_manager.get_files will "un-collect" them. +mzML_files = self.file_manager.get_files(mzML_files, collect=True) +# mzML_files = [['../workspaces-streamlit-template/default/topp-workflow/input-files/mzML-files/Control.mzML', '../workspaces-streamlit-template/default/topp-workflow/input-files/mzML-files/Treatment.mzML']] + """ + ) + + with st.expander("**Code documentation**", expanded=True): + st.help(FileManager.get_files) + + st.markdown( + """ +### Running commands + +It is possible to execute any command line command using the **`self.executor`** object, either a single command or a list of commands in parallel. Furthermore a method to run TOPP tools is included. + +**1. Single command** + +The `self.executor.run_command` method takes a single command as input and optionally logs stdout and stderr to the workflow log (default True). +""" + ) + + st.code( + """ +self.executor.run_command(["command", "arg1", "arg2", ...]) +""" + ) + + st.markdown( + """ +**2. Run multiple commands in parallel** + +The `self.executor.run_multiple_commands` method takes a list of commands as inputs. + +**3. Run TOPP tools** + +The `self.executor.run_topp` method takes a TOPP tool name as input and a dictionary of input and output files as input. The **keys** need to match the actual input and output parameter names of the TOPP tool. The **values** should be of type `FileManager`. All other **non-default parameters (from input widgets)** will be passed to the TOPP tool automatically. + +Depending on the number of input files, the TOPP tool will be run either in parallel or in a single run (using **`FileManager.collect`**). +""" + ) + + st.info( + """💡 **Input and output file order** + +In many tools, a single input file is processed to produce a single output file. +When dealing with lists of input or output files, the convention is that +files are paired based on their order. For instance, the n-th input file is +assumed to correspond to the n-th output file, maintaining a structured +relationship between input and output data. +""" + ) + st.code( + """ +# e.g. FeatureFinderMetabo takes single input files +in_files = self.file_manager.get_files(["sample1.mzML", "sample2.mzML"]) +out_files = self.file_manager.get_files(in_files, set_file_type="featureXML", set_results_dir="feature-detection") + +# Run FeatureFinderMetabo tool with input and output files in parallel for each pair of input/output files. +self.executor.run_topp("FeatureFinderMetabo", input_output={"in": in_files, "out": out_files}) +# FeaturFinderMetabo -in sample1.mzML -out workspace-dir/results/feature-detection/sample1.featureXML +# FeaturFinderMetabo -in sample2.mzML -out workspace-dir/results/feature-detection/sample2.featureXML + +# Run SiriusExport tool with mutliple input and output files. +out = self.file_manager.get_files("sirius.ms", set_results_dir="sirius-export") +self.executor.run_topp("SiriusExport", {"in": self.file_manager.get_files(in_files, collect=True), + "in_featureinfo": self.file_manager.get_files(out_files, collect=True), + "out": out_se}) +# SiriusExport -in sample1.mzML sample2.mzML -in_featureinfo sample1.featureXML sample2.featureXML -out sirius.ms + """ + ) + + st.markdown( + """ +**4. Run custom Python scripts** + +Sometimes it is useful to run custom Python scripts, for example for extra functionality which is not included in a TOPP tool. + +`self.executor.run_python` works similar to `self.executor.run_topp`, but takes a single Python script as input instead of a TOPP tool name. The default location for the Python script files is in `src/python-tools` (in this case the `.py` file extension is optional in the **script_file** argument), however, any other path can be specified as well. Input and output file parameters need to be specified in the **input_output** dictionary. +""" + ) + + st.code( + """ +# e.g. example Python tool which modifies mzML files in place based on experimental design +self.ui.input_python(script_file="example", input_output={"in": in_mzML, "in_experimantal_design": FileManager(["path/to/experimantal-design.tsv"])}) + """ + ) + + st.markdown("**Example for a complete workflow section:**") + + st.code(getsource(Workflow.execution)) + + with st.expander("**Code documentation**", expanded=True): + st.help(CommandExecutor.run_command) + st.help(CommandExecutor.run_multiple_commands) + st.help(CommandExecutor.run_topp) + st.help(CommandExecutor.run_python) + +############################################################################################# +# Windows Executables +############################################################################################# + +if page == pages[4]: + # Define CSS styles + css = """ + +""" + + st.markdown(css, unsafe_allow_html=True) + + st.markdown( + """ +# 💻 How to package everything for Windows executables + +This guide explains how to package OpenMS apps into Windows executables using two different methods: +""" + ) + + + def fetch_markdown_content(url): + response = requests.get(url) + if response.status_code == 200: + # Remove the first line from the content + content_lines = response.text.split("\n") + markdown_content = "\n".join(content_lines[1:]) + return markdown_content + else: + return None + + + tabs = ["embeddable Python", "PyInstaller"] + tabs = st.tabs(tabs) + + # window executable with embeddable python + with tabs[0]: + markdown_url = "https://raw.githubusercontent.com/OpenMS/streamlit-template/main/win_exe_with_embed_py.md" + + markdown_content = fetch_markdown_content(markdown_url) + + if markdown_content: + st.markdown(markdown_content, unsafe_allow_html=True) + else: + st.error( + "Failed to fetch Markdown content from the specified URL.", markdown_url + ) + + # window executable with pyinstaller + with tabs[1]: + # URL of the Markdown document + markdown_url = "https://raw.githubusercontent.com/OpenMS/streamlit-template/main/win_exe_with_pyinstaller.md" + + markdown_content = fetch_markdown_content(markdown_url) + + if markdown_content: + st.markdown(markdown_content, unsafe_allow_html=True) + else: + st.error( + "Failed to fetch Markdown content from the specified URL. ", markdown_url + ) + +############################################################################################# +# Deployment +############################################################################################# + +if page == pages[5]: + url = "https://raw.githubusercontent.com/OpenMS/streamlit-deployment/main/README.md" + + response = requests.get(url) + + if response.status_code == 200: + st.markdown(response.text) # or process the content as needed + else: + st.warning("Failed to get README from streamlit-deployment repository.") \ No newline at end of file diff --git "a/pages/0_\360\237\223\226_Installation.py" "b/pages/0_\360\237\223\226_Installation.py" deleted file mode 100644 index 82070e0..0000000 --- "a/pages/0_\360\237\223\226_Installation.py" +++ /dev/null @@ -1,61 +0,0 @@ -import streamlit as st -from pathlib import Path -from src.common import page_setup - -page_setup() - -if Path("OpenMS-App.zip").exists(): - st.markdown(""" -Download the latest version for **Windows** here clicking the button below. -""") - with open("OpenMS-App.zip", "rb") as file: - st.download_button( - label="Download for Windows", - data=file, - file_name="OpenMS-App.zip", - mime="archive/zip", - type="primary", - ) - -st.markdown(""" -# Installation - -## Windows - -The app is available as pre-packaged Windows executable, including all dependencies. - -The windows executable is built by a GitHub action and can be downloaded [here](https://github.com/OpenMS/streamlit-template/actions/workflows/build-windows-executable-app.yaml). -Select the latest successfull run and download the zip file from the artifacts section, while signed in to GitHub. - -## Python - -Clone the [streamlit-template repository](https://github.com/OpenMS/streamlit-template). It includes files to install dependencies via pip or conda. - -### via pip in an existing Python environment - -To install all required depdencies via pip in an already existing Python environment, run the following command in the terminal: - -`pip install -r requirements.txt` - -### create new environment via conda/mamba - -Create and activate the conda environment: - -`conda env create -f environment.yml` - -`conda activate streamlit-env` - -### run the app - -Run the app via streamlit command in the terminal with or without *local* mode (default is *online* mode). Learn more about *local* and *online* mode in the documentation page 📖 **OpenMS Template App**. - -`streamlit run app.py [local]` - -## Docker - -This repository contains two Dockerfiles. - -1. `Dockerfile`: This Dockerfile builds all dependencies for the app including Python packages and the OpenMS TOPP tools. Recommended for more complex workflows where you want to use the OpenMS TOPP tools for instance with the **TOPP Workflow Framework**. -2. `Dockerfile_simple`: This Dockerfile builds only the Python packages. Recommended for simple apps using pyOpenMS only. - -""") \ No newline at end of file diff --git "a/pages/1_\360\237\223\226_User_Guide.py" "b/pages/1_\360\237\223\226_User_Guide.py" deleted file mode 100644 index dc3bd6a..0000000 --- "a/pages/1_\360\237\223\226_User_Guide.py" +++ /dev/null @@ -1,52 +0,0 @@ -import streamlit as st -from src.common import page_setup - -page_setup() - -st.markdown(""" -# User Guide - -Welcome to the OpenMS Streamlit Web Application! This guide will help you understand how to use our tools effectively. - -## Advantages of OpenMS Web Apps - -OpenMS web applications provide a user-friendly interface for accessing the powerful features of OpenMS. Here are a few advantages: -- **Accessibility**: Access powerful OpenMS algorithms and TOPP tools from any device with a web browser. -- **Ease of Use**: Simplified user interface makes it easy for both beginners and experts to perform complex analyses. -- **No Installation Required**: Use the tools without the need to install OpenMS locally, saving time and system resources. - -## Workspaces - -In the OpenMS web application, workspaces are designed to keep your analysis organized: -- **Workspace Specific Parameters and Files**: Each workspace stores parameters and files (uploaded input files and results from workflows). -- **Persistence**: Your workspaces and parameters are saved, so you can return to your analysis anytime and pick up where you left off. - -## Online and Local Mode Differences - -There are a few key differences between operating in online and local modes: -- **File Uploads**: - - *Online Mode*: You can upload only one file at a time. This helps manage server load and optimizes performance. - - *Local Mode*: Multiple file uploads are supported, giving you flexibility when working with large datasets. -- **Workspace Access**: - - In online mode, workspaces are stored temporarily and will be cleared after seven days of inactivity. - - In local mode, workspaces are saved on your local machine, allowing for persistent storage. - -## Downloading Results - -You can download the results of your analyses, including figures and tables, directly from the application: -- **Figures**: Click the camera icon button, appearing while hovering on the top right corner of the figure. Set the desired image format in the settings panel in the side bar. -- **Tables**: Use the download button to save tables in *csv* format, appearing while hovering on the top right corner of the table. - -## Getting Started - -To get started: -1. Select or create a new workspace. -2. Upload your data file. -3. Set the necessary parameters for your analysis. -4. Run the analysis. -5. View and download your results. - -For more detailed information on each step, refer to the specific sections of this guide. -""") - - diff --git "a/pages/2_\360\237\223\226_Build_App.py" "b/pages/2_\360\237\223\226_Build_App.py" deleted file mode 100644 index ffb45c7..0000000 --- "a/pages/2_\360\237\223\226_Build_App.py" +++ /dev/null @@ -1,78 +0,0 @@ -import streamlit as st - -from src.common import page_setup - -page_setup() - -st.markdown(""" -# Build your own app based on this template - -## App layout - -- *Main page* contains explanatory text on how to use the app and a workspace selector. `app.py` -- *Pages* can be navigated via *Sidebar*. Sidebar also contains the OpenMS logo, settings panel and a workspace indicator. The *main page* contains a workspace selector as well. -- See *pages* in the template app for example use cases. The content of this app serves as a documentation. - -## Key concepts - -- **Workspaces** -: Directories where all data is generated and uploaded can be stored as well as a workspace specific parameter file. -- **Run the app locally and online** -: Launching the app with the `local` argument lets the user create/remove workspaces. In the online the user gets a workspace with a specific ID. -- **Parameters** -: Parameters (defaults in `assets/default-params.json`) store changing parameters for each workspace. Parameters are loaded via the page_setup function at the start of each page. To track a widget variable via parameters simply give them a key and add a matching entry in the default parameters file. Initialize a widget value from the params dictionary. - -```python -params = page_setup() - -st.number_input(label="x dimension", min_value=1, max_value=20, -value=params["example-y-dimension"], step=1, key="example-y-dimension") - -save_params() -``` - -## Code structure - -- **Pages** must be placed in the `pages` directory. -- It is recommended to use a separate file for defining functions per page in the `src` directory. -- The `src/common.py` file contains a set of useful functions for common use (e.g. rendering a table with download button). - -## Modify the template to build your own app - -1. In `src/common.py`, update the name of your app and the repository name - ```python - APP_NAME = "OpenMS Streamlit App" - REPOSITORY_NAME = "streamlit-template" - ``` -2. In `clean-up-workspaces.py`, update the name of the workspaces directory to `/workspaces-` - ```python - workspaces_directory = Path("/workspaces-streamlit-template") - ``` -3. Update `README.md` accordingly - - -**Dockerfile-related** -1. Choose one of the Dockerfiles depending on your use case: - - `Dockerfile` builds OpenMS including TOPP tools - - `Dockerfile_simple` uses pyOpenMS only -2. Update the Dockerfile: - - with the `GITHUB_USER` owning the Streamlit app repository - - with the `GITHUB_REPO` name of the Streamlit app repository - - if your main page Python file is not called `app.py`, modify the following line - ```dockerfile - RUN echo "mamba run --no-capture-output -n streamlit-env streamlit run app.py" >> /app/entrypoint.sh - ``` -3. Update Python package dependency files: - - `requirements.txt` if using `Dockerfile_simple` - - `environment.yml` if using `Dockerfile` - -## How to build a workflow - -### Simple workflow using pyOpenMS - -Take a look at the example pages `Simple Workflow` or `Workflow with mzML files` for examples (on the *sidebar*). Put Streamlit logic inside the pages and call the functions with workflow logic from from the `src` directory (for our examples `src/simple_workflow.py` and `src/mzmlfileworkflow.py`). - -### Complex workflow using TOPP tools - -This template app features a module in `src/workflow` that allows for complex and long workflows to be built very efficiently. Check out the `TOPP Workflow Framework` page for more information (on the *sidebar*). -""") \ No newline at end of file diff --git "a/pages/3_\360\237\223\226_TOPP_Workflow_Framework.py" "b/pages/3_\360\237\223\226_TOPP_Workflow_Framework.py" deleted file mode 100644 index 677f02c..0000000 --- "a/pages/3_\360\237\223\226_TOPP_Workflow_Framework.py" +++ /dev/null @@ -1,254 +0,0 @@ -import streamlit as st -from src.Workflow import Workflow -from src.workflow.StreamlitUI import StreamlitUI -from src.workflow.FileManager import FileManager -from src.workflow.CommandExecutor import CommandExecutor -from src.common import page_setup -from inspect import getsource - -page_setup() - -wf = Workflow() - -st.title("📖 TOPP Workflow Framework Documentation") - -st.markdown( -""" -## Features - -- streamlined methods for uploading files, setting parameters, and executing workflows -- automatic parameter handling -- quickly build parameter interface for TOPP tools with all parameters from *ini* files -- automatically create a log file for each workflow run with stdout and stderr -- workflow output updates automatically in short intervalls -- user can leave the app and return to the running workflow at any time -- quickly build a workflow with multiple steps channelling files between steps -""" -) - -st.markdown( -""" -## Quickstart - -This repository contains a module in `src/workflow` that provides a framework for building and running analysis workflows. - -The `WorkflowManager` class provides the core workflow logic. It uses the `Logger`, `FileManager`, `ParameterManager`, and `CommandExecutor` classes to setup a complete workflow logic. - -To build your own workflow edit the file `src/TOPPWorkflow.py`. Use any streamlit components such as tabs (as shown in example), columns, or even expanders to organize the helper functions for displaying file upload and parameter widgets. - -> 💡 Simply set a name for the workflow and overwrite the **`upload`**, **`configure`**, **`execution`** and **`results`** methods in your **`Workflow`** class. - -The file `pages/6_TOPP-Workflow.py` displays the workflow content and can, but does not have to be modified. - -The `Workflow` class contains four important members, which you can use to build your own workflow: - -> **`self.params`:** dictionary of parameters stored in a JSON file in the workflow directory. Parameter handling is done automatically. Default values are defined in input widgets and non-default values are stored in the JSON file. - -> **`self.ui`:** object of type `StreamlitUI` contains helper functions for building the parameter and file upload widgets. - -> **`self.executor`:** object of type `CommandExecutor` can be used to run any command line tool alone or in parallel and includes a convenient method for running TOPP tools. - -> **`self.logger`:** object of type `Logger` to write any output to a log file during workflow execution. - -> **`self.file_manager`:** object of type `FileManager` to handle file types and creation of output directories. -""" -) - -with st.expander("**Complete example for custom Workflow class**", expanded=False): - st.code(getsource(Workflow)) - -st.markdown( -""" -## File Upload - -All input files for the workflow will be stored within the workflow directory in the subdirectory `input-files` within it's own subdirectory for the file type. - -The subdirectory name will be determined by a **key** that is defined in the `self.ui.upload_widget` method. The uploaded files are available by the specific key for parameter input widgets and accessible while building the workflow. - -Calling this method will create a complete file upload widget section with the following components: - -- file uploader -- list of currently uploaded files with this key (or a warning if there are none) -- button to delete all files - -Fallback files(s) can be specified, which will be used if the user doesn't upload any files. This can be useful for example for database files where a default is provided. -""") - -st.code(getsource(Workflow.upload)) - -st.info("💡 Use the same **key** for parameter widgets, to select which of the uploaded files to use for analysis.") - -with st.expander("**Code documentation:**", expanded=True): - st.help(StreamlitUI.upload_widget) - -st.markdown( - """ -## Parameter Input - -The paramter section is already pre-defined as a form with buttons to **save parameters** and **load defaults** and a toggle to show TOPP tool parameters marked as advanced. - -Generating parameter input widgets is done with the `self.ui.input` method for any parameter and the `self.ui.input_TOPP` method for TOPP tools. - -**1. Choose `self.ui.input_widget` for any paramter not-related to a TOPP tool or `self.ui.select_input_file` for any input file:** - -It takes the obligatory **key** parameter. The key is used to access the parameter value in the workflow parameters dictionary `self.params`. Default values do not need to be specified in a separate file. Instead they are determined from the widgets default value automatically. Widget types can be specified or automatically determined from **default** and **options** parameters. It's suggested to add a **help** text and other parameters for numerical input. - -Make sure to match the **key** of the upload widget when calling `self.ui.input_TOPP`. - -**2. Choose `self.ui.input_TOPP` to automatically generate complete input sections for a TOPP tool:** - -It takes the obligatory **topp_tool_name** parameter and generates input widgets for each parameter present in the **ini** file (automatically created) except for input and output file parameters. For all input file parameters a widget needs to be created with `self.ui.select_input_file` with an appropriate **key**. For TOPP tool parameters only non-default values are stored. - -**3. Choose `self.ui.input_python` to automatically generate complete input sections for a custom Python tool:** - -Takes the obligatory **script_file** argument. The default location for the Python script files is in `src/python-tools` (in this case the `.py` file extension is optional in the **script_file** argument), however, any other path can be specified as well. Parameters need to be specified in the Python script in the **DEFAULTS** variable with the mandatory **key** and **value** parameters. -""") - -with st.expander("Options to use as dictionary keys for parameter definitions (see `src/python-tools/example.py` for an example)"): - st.markdown(""" -**Mandatory** keys for each parameter -- *key:* a unique identifier -- *value:* the default value - -**Optional** keys for each parameter -- *name:* the name of the parameter -- *hide:* don't show the parameter in the parameter section (e.g. for **input/output files**) -- *options:* a list of valid options for the parameter -- *min:* the minimum value for the parameter (int and float) -- *max:* the maximum value for the parameter (int and float) -- *step_size:* the step size for the parameter (int and float) -- *help:* a description of the parameter -- *widget_type:* the type of widget to use for the parameter (default: auto) -- *advanced:* whether or not the parameter is advanced (default: False) -""") - -st.code( -getsource(Workflow.configure) -) -st.info("💡 Access parameter widget values by their **key** in the `self.params` object, e.g. `self.params['mzML-files']` will give all selected mzML files.") - -with st.expander("**Code documentation**", expanded=True): - st.help(StreamlitUI.input_widget) - st.help(StreamlitUI.select_input_file) - st.help(StreamlitUI.input_TOPP) - st.help(StreamlitUI.input_python) -st.markdown( - """ -## Building the Workflow - -Building the workflow involves **calling all (TOPP) tools** using **`self.executor`** with **input and output files** based on the **`FileManager`** class. For TOPP tools non-input-output parameters are handled automatically. Parameters for other processes and workflow logic can be accessed via widget keys (set in the parameter section) in the **`self.params`** dictionary. - -### FileManager - -The `FileManager` class serves as an interface for unified input and output files with useful functionality specific to building workflows, such as **setting a (new) file type** and **subdirectory in the workflows result directory**. - -Use the **`get_files`** method to get a list of all file paths as strings. - -Optionally set the following parameters modify the files: - -- **set_file_type** (str): set new file types and result subdirectory. -- **set_results_dir** (str): set a new subdirectory in the workflows result directory. -- **collect** (bool): collect all files into a single list. Will return a list with a single entry, which is a list of all files. Useful to pass to tools which can handle multiple input files at once. -""") - -st.code( - """ -# Get all file paths as strings from self.param entry. -mzML_files = self.file_manager.get_files(self.params["mzML-files]) -# mzML_files = ['../workspaces-streamlit-template/default/topp-workflow/input-files/mzML-files/Control.mzML', '../workspaces-streamlit-template/default/topp-workflow/input-files/mzML-files/Treatment.mzML'] - -# Creating output files for a TOPP tool, setting a new file type and result subdirectory name. -feature_detection_out = self.file_manager.get_files(mzML_files, set_file_type="featureXML", set_results_dir="feature-detection") -# feature_detection_out = ['../workspaces-streamlit-template/default/topp-workflow/results/feature-detection/Control.featureXML', '../workspaces-streamlit-template/default/topp-workflow/results/feature-detection/Treatment.featureXML'] - -# Setting a name for the output directory automatically (useful if you never plan to access these files in the results section). -feature_detection_out = self.file_manager.get_files(mzML_files, set_file_type="featureXML", set_results_dir="auto") -# feature_detection_out = ['../workspaces-streamlit-template/default/topp-workflow/results/6DUd/Control.featureXML', '../workspaces-streamlit-template/default/topp-workflow/results/6DUd/Treatment.featureXML'] - -# Combining all mzML files to be passed to a TOPP tool in a single run. Using "collected" files as argument for self.file_manager.get_files will "un-collect" them. -mzML_files = self.file_manager.get_files(mzML_files, collect=True) -# mzML_files = [['../workspaces-streamlit-template/default/topp-workflow/input-files/mzML-files/Control.mzML', '../workspaces-streamlit-template/default/topp-workflow/input-files/mzML-files/Treatment.mzML']] - """ -) - -with st.expander("**Code documentation**", expanded=True): - st.help(FileManager.get_files) - -st.markdown( - """ -### Running commands - -It is possible to execute any command line command using the **`self.executor`** object, either a single command or a list of commands in parallel. Furthermore a method to run TOPP tools is included. - -**1. Single command** - -The `self.executor.run_command` method takes a single command as input and optionally logs stdout and stderr to the workflow log (default True). -""") - -st.code(""" -self.executor.run_command(["command", "arg1", "arg2", ...]) -""") - -st.markdown( - """ -**2. Run multiple commands in parallel** - -The `self.executor.run_multiple_commands` method takes a list of commands as inputs. - -**3. Run TOPP tools** - -The `self.executor.run_topp` method takes a TOPP tool name as input and a dictionary of input and output files as input. The **keys** need to match the actual input and output parameter names of the TOPP tool. The **values** should be of type `FileManager`. All other **non-default parameters (from input widgets)** will be passed to the TOPP tool automatically. - -Depending on the number of input files, the TOPP tool will be run either in parallel or in a single run (using **`FileManager.collect`**). -""") - -st.info("""💡 **Input and output file order** - -In many tools, a single input file is processed to produce a single output file. -When dealing with lists of input or output files, the convention is that -files are paired based on their order. For instance, the n-th input file is -assumed to correspond to the n-th output file, maintaining a structured -relationship between input and output data. -""") -st.code(""" -# e.g. FeatureFinderMetabo takes single input files -in_files = self.file_manager.get_files(["sample1.mzML", "sample2.mzML"]) -out_files = self.file_manager.get_files(in_files, set_file_type="featureXML", set_results_dir="feature-detection") - -# Run FeatureFinderMetabo tool with input and output files in parallel for each pair of input/output files. -self.executor.run_topp("FeatureFinderMetabo", input_output={"in": in_files, "out": out_files}) -# FeaturFinderMetabo -in sample1.mzML -out workspace-dir/results/feature-detection/sample1.featureXML -# FeaturFinderMetabo -in sample2.mzML -out workspace-dir/results/feature-detection/sample2.featureXML - -# Run SiriusExport tool with mutliple input and output files. -out = self.file_manager.get_files("sirius.ms", set_results_dir="sirius-export") -self.executor.run_topp("SiriusExport", {"in": self.file_manager.get_files(in_files, collect=True), - "in_featureinfo": self.file_manager.get_files(out_files, collect=True), - "out": out_se}) -# SiriusExport -in sample1.mzML sample2.mzML -in_featureinfo sample1.featureXML sample2.featureXML -out sirius.ms - """) - -st.markdown(""" -**4. Run custom Python scripts** - -Sometimes it is useful to run custom Python scripts, for example for extra functionality which is not included in a TOPP tool. - -`self.executor.run_python` works similar to `self.executor.run_topp`, but takes a single Python script as input instead of a TOPP tool name. The default location for the Python script files is in `src/python-tools` (in this case the `.py` file extension is optional in the **script_file** argument), however, any other path can be specified as well. Input and output file parameters need to be specified in the **input_output** dictionary. -""") - -st.code(""" -# e.g. example Python tool which modifies mzML files in place based on experimental design -self.ui.input_python(script_file="example", input_output={"in": in_mzML, "in_experimantal_design": FileManager(["path/to/experimantal-design.tsv"])}) - """) - -st.markdown("**Example for a complete workflow section:**") - -st.code( -getsource(Workflow.execution) -) - -with st.expander("**Code documentation**", expanded=True): - st.help(CommandExecutor.run_command) - st.help(CommandExecutor.run_multiple_commands) - st.help(CommandExecutor.run_topp) - st.help(CommandExecutor.run_python) \ No newline at end of file diff --git "a/pages/4_\360\237\223\226_Windows_executable.py" "b/pages/4_\360\237\223\226_Windows_executable.py" deleted file mode 100644 index 1432253..0000000 --- "a/pages/4_\360\237\223\226_Windows_executable.py" +++ /dev/null @@ -1,78 +0,0 @@ -import streamlit as st -import requests - -import streamlit as st - -# Define CSS styles -css = ''' - -''' - - -st.markdown(css, unsafe_allow_html=True) - -st.markdown(""" -# 💻 How to package everything for Windows executables - -This guide explains how to package OpenMS apps into Windows executables using two different methods: -""") - -def fetch_markdown_content(url): - response = requests.get(url) - if response.status_code == 200: - # Remove the first line from the content - content_lines = response.text.split("\n") - markdown_content = "\n".join(content_lines[1:]) - return markdown_content - else: - return None - -tabs = ["embeddable Python", "PyInstaller"] -tabs = st.tabs(tabs) - -# window executable with embeddable python -with tabs[0]: - markdown_url = "https://raw.githubusercontent.com/OpenMS/streamlit-template/main/win_exe_with_embed_py.md" - - markdown_content = fetch_markdown_content(markdown_url) - - if markdown_content: - st.markdown(markdown_content, unsafe_allow_html=True) - else: - st.error("Failed to fetch Markdown content from the specified URL.", markdown_url) - -# window executable with pyinstaller -with tabs[1]: - # URL of the Markdown document - markdown_url = "https://raw.githubusercontent.com/OpenMS/streamlit-template/main/win_exe_with_pyinstaller.md" - - markdown_content = fetch_markdown_content(markdown_url) - - if markdown_content: - st.markdown(markdown_content, unsafe_allow_html=True) - else: - st.error("Failed to fetch Markdown content from the specified URL. ", markdown_url) - - diff --git "a/pages/5_\360\237\223\226_Deployment.py" "b/pages/5_\360\237\223\226_Deployment.py" deleted file mode 100644 index 1a857be..0000000 --- "a/pages/5_\360\237\223\226_Deployment.py" +++ /dev/null @@ -1,15 +0,0 @@ -import streamlit as st -import requests - -from src.common import page_setup - -page_setup() - -url = "https://raw.githubusercontent.com/OpenMS/streamlit-deployment/main/README.md" - -response = requests.get(url) - -if response.status_code == 200: - st.markdown(response.text) # or process the content as needed -else: - st.warning("Failed to get README from streamlit-deployment repository.") \ No newline at end of file From 3f0a0892e3811c2b9b43e950adb739b1876f2900 Mon Sep 17 00:00:00 2001 From: axelwalter Date: Tue, 9 Jul 2024 15:14:25 +0200 Subject: [PATCH 007/168] rework multipage app - using the new st.navigation - creates sections in sidebar - icons don't need to be in page name --- app.py | 85 +++++-------------- .../{0_Documentation.py => documentation.py} | 2 +- .../file_upload.py | 0 pages/quickstart.py | 65 ++++++++++++++ .../raw_data_viewer.py | 0 ..._mzML_files.py => run_example_workflow.py} | 0 ...13_Run_subprocess.py => run_subprocess.py} | 0 ..._Simple_Workflow.py => simple_workflow.py} | 0 .../{14_TOPP-Workflow.py => topp_workflow.py} | 0 9 files changed, 88 insertions(+), 64 deletions(-) rename pages/{0_Documentation.py => documentation.py} (99%) rename "pages/10_\360\237\223\201_File_Upload.py" => pages/file_upload.py (100%) create mode 100644 pages/quickstart.py rename "pages/11_\360\237\221\200_View_Raw_Data.py" => pages/raw_data_viewer.py (100%) rename pages/{15_Workflow_with_mzML_files.py => run_example_workflow.py} (100%) rename pages/{13_Run_subprocess.py => run_subprocess.py} (100%) rename pages/{12_Simple_Workflow.py => simple_workflow.py} (100%) rename pages/{14_TOPP-Workflow.py => topp_workflow.py} (100%) diff --git a/app.py b/app.py index ace5767..cbdf70a 100644 --- a/app.py +++ b/app.py @@ -1,65 +1,24 @@ -""" -Main page for the OpenMS Template App. - -This module sets up and displays the Streamlit app for the OpenMS Template App. -It includes: -- Setting the app title. -- Displaying a description. -- Providing a download button for the Windows version of the app. - -Usage: -Run this script to launch the OpenMS Template App. - -Note: -- If run in local mode, the CAPTCHA control is not applied. -- If not in local mode, CAPTCHA control is applied to verify the user. - -Returns: - None -""" - -from pathlib import Path import streamlit as st +from pathlib import Path -from src.common import page_setup - -page_setup(page="main") - -st.title("OpenMS Streamlit Template App") -st.markdown(""" -This repository contains a template app for OpenMS workflows in a web application using the **streamlit** framework. - -It serves as a foundation for apps ranging from simple workflows with **pyOpenMS** to complex workflows utilizing **OpenMS TOPP tools** with parallel execution. - -It includes solutions for handling user data and parameters in workspaces as well as deployment with docker-compose. -""") -st.subheader("Features") -st.markdown(""" -- Workspaces for user data with unique shareable IDs -- Persistent parameters and input files within a workspace -- Captcha control -- Packaged executables for Windows -- framework for workflows with OpenMS TOPP tools -- Deployment [with docker-compose](https://github.com/OpenMS/streamlit-deployment) -""") -st.subheader("Quick Start") -if Path("OpenMS-App.zip").exists(): - st.markdown(""" -Download the latest version for Windows here by clicking the button below. -""") - with open("OpenMS-App.zip", "rb") as file: - st.download_button( - label="Download for Windows", - data=file, - file_name="OpenMS-App.zip", - mime="archive/zip", - type="primary", - ) - st.markdown(""" -Extract the zip file and run the executable (.exe) file to launch the app. Since every dependency is compressed and packacked the app will take a while to launch (up to one minute). -""") -st.markdown(""" -Check out the documentation for **users** and **developers** is included as pages indicated by the 📖 icon - -Try the example pages **📁 mzML file upload**, **👀 visualization** and **example workflows**. -""") \ No newline at end of file +pages = { + "OpenMS Web App" : [ + st.Page(Path("pages", "quickstart.py"), title="Quickstart", icon="👋"), + st.Page(Path("pages", "documentation.py"), title="Documentation", icon="📖"), + ], + "TOPP Workflow Framework": [ + st.Page(Path("pages", "topp_workflow.py"), title="TOPP Workflow", icon="🚀"), + ], + "Example MS Workflow" : [ + st.Page(Path("pages", "file_upload.py"), title="File Upload", icon="📂"), + st.Page(Path("pages", "raw_data_viewer.py"), title="View MS data", icon="👀"), + st.Page(Path("pages", "run_example_workflow.py"), title="Run Workflow", icon="⚙️"), + ], + "Others Topics": [ + st.Page(Path("pages", "simple_workflow.py"), title="Simple Workflow", icon="⚙️"), + st.Page(Path("pages", "run_subprocess.py"), title="Run Subprocess", icon="🖥️"), + ] +} + +pg = st.navigation(pages) +pg.run() \ No newline at end of file diff --git a/pages/0_Documentation.py b/pages/documentation.py similarity index 99% rename from pages/0_Documentation.py rename to pages/documentation.py index 436e459..e556e57 100644 --- a/pages/0_Documentation.py +++ b/pages/documentation.py @@ -11,7 +11,7 @@ page_setup() -st.title("📖 Documentation") +st.title("Documentation") cols = st.columns(2) diff --git "a/pages/10_\360\237\223\201_File_Upload.py" b/pages/file_upload.py similarity index 100% rename from "pages/10_\360\237\223\201_File_Upload.py" rename to pages/file_upload.py diff --git a/pages/quickstart.py b/pages/quickstart.py new file mode 100644 index 0000000..ace5767 --- /dev/null +++ b/pages/quickstart.py @@ -0,0 +1,65 @@ +""" +Main page for the OpenMS Template App. + +This module sets up and displays the Streamlit app for the OpenMS Template App. +It includes: +- Setting the app title. +- Displaying a description. +- Providing a download button for the Windows version of the app. + +Usage: +Run this script to launch the OpenMS Template App. + +Note: +- If run in local mode, the CAPTCHA control is not applied. +- If not in local mode, CAPTCHA control is applied to verify the user. + +Returns: + None +""" + +from pathlib import Path +import streamlit as st + +from src.common import page_setup + +page_setup(page="main") + +st.title("OpenMS Streamlit Template App") +st.markdown(""" +This repository contains a template app for OpenMS workflows in a web application using the **streamlit** framework. + +It serves as a foundation for apps ranging from simple workflows with **pyOpenMS** to complex workflows utilizing **OpenMS TOPP tools** with parallel execution. + +It includes solutions for handling user data and parameters in workspaces as well as deployment with docker-compose. +""") +st.subheader("Features") +st.markdown(""" +- Workspaces for user data with unique shareable IDs +- Persistent parameters and input files within a workspace +- Captcha control +- Packaged executables for Windows +- framework for workflows with OpenMS TOPP tools +- Deployment [with docker-compose](https://github.com/OpenMS/streamlit-deployment) +""") +st.subheader("Quick Start") +if Path("OpenMS-App.zip").exists(): + st.markdown(""" +Download the latest version for Windows here by clicking the button below. +""") + with open("OpenMS-App.zip", "rb") as file: + st.download_button( + label="Download for Windows", + data=file, + file_name="OpenMS-App.zip", + mime="archive/zip", + type="primary", + ) + st.markdown(""" +Extract the zip file and run the executable (.exe) file to launch the app. Since every dependency is compressed and packacked the app will take a while to launch (up to one minute). +""") +st.markdown(""" +Check out the documentation for **users** and **developers** is included as pages indicated by the 📖 icon + +Try the example pages **📁 mzML file upload**, **👀 visualization** and **example workflows**. +""") \ No newline at end of file diff --git "a/pages/11_\360\237\221\200_View_Raw_Data.py" b/pages/raw_data_viewer.py similarity index 100% rename from "pages/11_\360\237\221\200_View_Raw_Data.py" rename to pages/raw_data_viewer.py diff --git a/pages/15_Workflow_with_mzML_files.py b/pages/run_example_workflow.py similarity index 100% rename from pages/15_Workflow_with_mzML_files.py rename to pages/run_example_workflow.py diff --git a/pages/13_Run_subprocess.py b/pages/run_subprocess.py similarity index 100% rename from pages/13_Run_subprocess.py rename to pages/run_subprocess.py diff --git a/pages/12_Simple_Workflow.py b/pages/simple_workflow.py similarity index 100% rename from pages/12_Simple_Workflow.py rename to pages/simple_workflow.py diff --git a/pages/14_TOPP-Workflow.py b/pages/topp_workflow.py similarity index 100% rename from pages/14_TOPP-Workflow.py rename to pages/topp_workflow.py From f54f40490c1e8c4127a6b7df691df7bbc10d6e41 Mon Sep 17 00:00:00 2001 From: axelwalter Date: Tue, 9 Jul 2024 15:29:29 +0200 Subject: [PATCH 008/168] remove name-main in topp workflow to work with st.navigation --- pages/topp_workflow.py | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/pages/topp_workflow.py b/pages/topp_workflow.py index 0f5f53c..ab4bc47 100644 --- a/pages/topp_workflow.py +++ b/pages/topp_workflow.py @@ -2,25 +2,23 @@ from src.common import page_setup from src.Workflow import Workflow -# The rest of the page can, but does not have to be changed -if __name__ == "__main__": - - params = page_setup() +# # The rest of the page can, but does not have to be changed +params = page_setup() - wf = Workflow() +wf = Workflow() - st.title(wf.name) +st.title(wf.name) - t = st.tabs(["📁 **File Upload**", "⚙️ **Configure**", "🚀 **Run**", "📊 **Results**"]) - with t[0]: - wf.show_file_upload_section() +t = st.tabs(["📁 **File Upload**", "⚙️ **Configure**", "🚀 **Run**", "📊 **Results**"]) +with t[0]: + wf.show_file_upload_section() - with t[1]: - wf.show_parameter_section() +with t[1]: + wf.show_parameter_section() - with t[2]: - wf.show_execution_section() - - with t[3]: - wf.show_results_section() +with t[2]: + wf.show_execution_section() + +with t[3]: + wf.show_results_section() From 0774086b56564f1619ed1acf4a7408046786991c Mon Sep 17 00:00:00 2001 From: axelwalter Date: Tue, 9 Jul 2024 15:30:13 +0200 Subject: [PATCH 009/168] update sidebar - icon on top (can be changed to 24*240px banner later) - workspace selector on every page in collapsed expander --- src/common.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/common.py b/src/common.py index edb26b2..7bb4ba6 100644 --- a/src/common.py +++ b/src/common.py @@ -101,6 +101,8 @@ def page_setup(page: str = "") -> dict[str, Any]: menu_items=None, ) + st.logo("assets/pyopenms_transparent_background.png") + # Determine the workspace for the current session if "workspace" not in st.session_state: # Clear any previous caches @@ -159,8 +161,7 @@ def render_sidebar(page: str = "") -> None: params = load_params() with st.sidebar: # The main page has workspace switcher - if page == "main": - st.markdown("🖥️ **Workspaces**") + with st.expander("🖥️ **Workspaces**"): # Define workspaces directory outside of repository workspaces_dir = Path("..", "workspaces-" + REPOSITORY_NAME) # Online: show current workspace name in info text and option to change to other existing workspace @@ -230,9 +231,6 @@ def change_workspace(): img_formats.index(params["image-format"]), key="image-format", ) - if page != "main": - st.info(f"**{Path(st.session_state['workspace']).stem}**") - st.image("assets/OpenMS.png", "powered by") return params From b8d28284fd193a0f7cbc501a0633376773eb8619 Mon Sep 17 00:00:00 2001 From: axelwalter Date: Wed, 10 Jul 2024 09:25:09 +0200 Subject: [PATCH 010/168] update TOPP workflow example - simple workflow with feature detection and linking - export consensus map to dataframe with python script - added interactive result section --- src/Workflow.py | 66 ++++++++++++------- src/python-tools/.gitignore | 2 +- .../export_consensus_feature_df.py | 46 +++++++++++++ 3 files changed, 89 insertions(+), 25 deletions(-) create mode 100644 src/python-tools/export_consensus_feature_df.py diff --git a/src/Workflow.py b/src/Workflow.py index a403eb5..8c83967 100644 --- a/src/Workflow.py +++ b/src/Workflow.py @@ -1,6 +1,12 @@ import streamlit as st from .workflow.WorkflowManager import WorkflowManager +# for result section: +from pathlib import Path +import pandas as pd +import plotly.express as px +from .common import show_fig + class Workflow(WorkflowManager): # Setup pages for upload, parameter, execution and results. # For layout use any streamlit components such as tabs (as shown in example), columns, or even expanders. @@ -23,20 +29,17 @@ def configure(self) -> None: # Create tabs for different analysis steps. t = st.tabs( - ["**Feature Detection**", "**Adduct Detection**", "**SIRIUS Export**", "**Python Custom Tool**"] + ["**Feature Detection**", "**Feature Linking**", "**Python Custom Tool**"] ) with t[0]: # Parameters for FeatureFinderMetabo TOPP tool. self.ui.input_TOPP("FeatureFinderMetabo", custom_defaults={"algorithm:common:noise_threshold_int": 1000.0}) with t[1]: - # A single checkbox widget for workflow logic. - self.ui.input_widget("run-adduct-detection", False, "Adduct Detection") # Paramters for MetaboliteAdductDecharger TOPP tool. - self.ui.input_TOPP("MetaboliteAdductDecharger") + self.ui.input_TOPP("FeatureLinkerUnlabeledKD") with t[2]: - # Paramters for SiriusExport TOPP tool - self.ui.input_TOPP("SiriusExport") - with t[3]: + # A single checkbox widget for workflow logic. + self.ui.input_widget("run-python-script", False, "Run custom Python script") # Generate input widgets for a custom Python tool, located at src/python-tools. # Parameters are specified within the file in the DEFAULTS dictionary. self.ui.input_python("example") @@ -57,27 +60,42 @@ def execution(self) -> None: out_ffm = self.file_manager.get_files(in_mzML, "featureXML", "feature-detection") # Run FeatureFinderMetabo tool with input and output files. + self.logger.log("Detecting features...") self.executor.run_topp( "FeatureFinderMetabo", input_output={"in": in_mzML, "out": out_ffm} ) - # Check if adduct detection should be run. - if self.params["run-adduct-detection"]: - - # Run MetaboliteAdductDecharger for adduct detection, with disabled logs. - # Without a new file list for output, the input files will be overwritten in this case. - self.executor.run_topp( - "MetaboliteAdductDecharger", {"in": out_ffm, "out_fm": out_ffm} - ) - - # Example for a custom Python tool, which is located in src/python-tools. - self.executor.run_python("example", {"in": in_mzML}) + # Prepare input and output files for feature linking + in_fl = self.file_manager.get_files(out_ffm, collect=True) + out_fl = self.file_manager.get_files("feature_matrix.consensusXML", set_results_dir="feature-linking") - # Prepare output file for SiriusExport. - out_se = self.file_manager.get_files("sirius.ms", set_results_dir="sirius-export") - self.executor.run_topp("SiriusExport", {"in": self.file_manager.get_files(in_mzML, collect=True), - "in_featureinfo": self.file_manager.get_files(out_ffm, collect=True), - "out": out_se}) + # Run FeatureLinkerUnlabaeledKD with all feature maps passed at once + self.logger.log("Linking features...") + self.executor.run_topp("FeatureLinkerUnlabeledKD", input_output={"in": in_fl, "out": out_fl}) + self.logger.log("Exporting consensus features to pandas DataFrame...") + self.executor.run_python("export_consensus_feature_df", input_output={"in": out_fl[0]}) + # Check if adduct detection should be run. + if self.params["run-python-script"]: + # Example for a custom Python tool, which is located in src/python-tools. + self.executor.run_python("example", {"in": in_mzML}) def results(self) -> None: - st.warning("Not implemented yet.") \ No newline at end of file + @st.experimental_fragment + def show_consensus_features(): + df = pd.read_csv(file, sep="\t", index_col=0) + st.metric("number of consensus features", df.shape[0]) + c1, c2 = st.columns(2) + rows = c1.dataframe(df, selection_mode="multi-row", on_select="rerun")["selection"]["rows"] + if rows: + df = df.iloc[rows, 4:] + fig = px.bar(df, barmode="group", labels={"value": "intensity"}) + with c2: + show_fig(fig, "consensus-feature-intensities") + else: + st.info("💡 Select one ore more rows in the table to show a barplot with intensities.") + + file = Path(self.workflow_dir, "results", "feature-linking", "feature_matrix.tsv") + if file.exists(): + show_consensus_features() + else: + st.warning("No consensus feature file found. Please run workflow first.") \ No newline at end of file diff --git a/src/python-tools/.gitignore b/src/python-tools/.gitignore index ed8ebf5..763624e 100644 --- a/src/python-tools/.gitignore +++ b/src/python-tools/.gitignore @@ -1 +1 @@ -__pycache__ \ No newline at end of file +__pycache__/* \ No newline at end of file diff --git a/src/python-tools/export_consensus_feature_df.py b/src/python-tools/export_consensus_feature_df.py new file mode 100644 index 0000000..03be10a --- /dev/null +++ b/src/python-tools/export_consensus_feature_df.py @@ -0,0 +1,46 @@ +import json +import sys +from pyopenms import ConsensusXMLFile, ConsensusMap +from pathlib import Path + +############################ +# default paramter values # +########################### +# +# Mandatory keys for each parameter +# key: a unique identifier +# value: the default value +# +# Optional keys for each parameter +# name: the name of the parameter +# hide: don't show the parameter in the parameter section (e.g. for input/output files) +# options: a list of valid options for the parameter +# min: the minimum value for the parameter (int and float) +# max: the maximum value for the parameter (int and float) +# step_size: the step size for the parameter (int and float) +# help: a description of the parameter +# widget_type: the type of widget to use for the parameter (default: auto) +# advanced: whether or not the parameter is advanced (default: False) + +DEFAULTS = [ + {"key": "in", "value": "", "help": "Input consensusXML file.", "hide": True}, +] + +def get_params(): + if len(sys.argv) > 1: + with open(sys.argv[1], "r") as f: + return json.load(f) + else: + return {} + +if __name__ == "__main__": + params = get_params() + # Add code here: + cm = ConsensusMap() + ConsensusXMLFile().load(params["in"], cm) + df = cm.get_df() + df = df.rename(columns={col: Path(col).name for col in df.columns}) + df = df.reset_index() + df = df.drop(columns=["id", "sequence"]) + df.insert(0, "metabolite", df.apply(lambda x: f"{round(x['mz'], 4)}@{round(x['RT'], 2)}", axis=1)) + df.to_csv(Path(params["in"]).with_suffix(".tsv"), sep="\t", index=False) \ No newline at end of file From a886fecd4c61626890b025ddd109fb69852317da Mon Sep 17 00:00:00 2001 From: axelwalter Date: Wed, 10 Jul 2024 09:28:43 +0200 Subject: [PATCH 011/168] TOPP workflow start-stop button alignement --- src/workflow/StreamlitUI.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/workflow/StreamlitUI.py b/src/workflow/StreamlitUI.py index 7b64b2b..aab4862 100644 --- a/src/workflow/StreamlitUI.py +++ b/src/workflow/StreamlitUI.py @@ -729,12 +729,11 @@ def execution_section(self, start_workflow_function) -> None: c1, c2 = st.columns(2) # Select log level, this can be changed at run time or later without re-running the workflow log_level = c1.selectbox("log details", ["minimal", "commands and run times", "all"], key="log_level") - c2.markdown("##") if self.executor.pid_dir.exists(): - if c2.button("Stop Workflow", type="primary", use_container_width=True): + if c1.button("Stop Workflow", type="primary", use_container_width=True): self.executor.stop() st.rerun() - elif st.button("Start Workflow", type="primary", use_container_width=True): + elif c1.button("Start Workflow", type="primary", use_container_width=True): start_workflow_function() st.rerun() log_path = Path(self.workflow_dir, "logs", log_level.replace(" ", "-") + ".log") From 1034a861fa1be0ab5edfb3fc40ad1c666513a564 Mon Sep 17 00:00:00 2001 From: axelwalter Date: Wed, 10 Jul 2024 09:54:28 +0200 Subject: [PATCH 012/168] remove unused file --- src/ini2dec.py | 60 -------------------------------------------------- 1 file changed, 60 deletions(-) delete mode 100644 src/ini2dec.py diff --git a/src/ini2dec.py b/src/ini2dec.py deleted file mode 100644 index 57b1661..0000000 --- a/src/ini2dec.py +++ /dev/null @@ -1,60 +0,0 @@ -# Take parameters values from tool config file (.ini) -# Define the sections you want to extract -# sections = ["missed_cleavages"]#let suppose we extract tool parameter: missed cleavages - -# path of .ini file (# placed executable .ini file in assets) -# config_path = os.path.join(os.getcwd(), 'assets', 'exec.ini') - -# take dictionary of parameters -# exec_config=ini2dict(config_path, sections) - -# (will give every section as 1 entry: -# entry = { -# "name": node_name, -# "default": node_default, -# "description": node_desc, -# "restrictions": restrictions_list -# }) - -# take all variables settings from config dictionary -# by create form take parameter values -# for example missed_cleavages -# Missed_cleavages = str(st.number_input("Missed_cleavages",value=int(exec_config['missed_cleavages']['default']), help=exec_config['missed_cleavages']['description'] + " default: "+ exec_config['missed_cleavages']['default'])) - -import xml.etree.ElementTree as ET - - -def ini2dict(path: str, sections: list): - """Converts a OpenMS ini file to dictionary.""" - # Parse the XML configuration - tree = ET.parse(path) - root = tree.getroot() - - # Initialize an empty dictionary to store the extracted information - config_dict = {} - - # Iterate through sections and store information in the dictionary - for section_name in sections: - for node in root.findall( - f".//ITEMLIST[@name='{section_name}']" - ) or root.findall(f".//ITEM[@name='{section_name}']"): - # can adapt depends on tool - node_name = str(node.get("name")) - node_default = str(node.get("value")) - node_desc = str(node.get("description")) - node_rest = str(node.get("restrictions")) - - # generate list - restrictions_list = node_rest.split(",") if node_rest else [] - - entry = { - "name": node_name, - "default": node_default, - "description": node_desc, - "restrictions": restrictions_list, - } - - # Store the entry in the section dictionary - config_dict[section_name] = entry - - return config_dict From d43264bd7f78bc8c44936084dfb07384bc6ce440 Mon Sep 17 00:00:00 2001 From: axelwalter Date: Wed, 10 Jul 2024 12:29:31 +0200 Subject: [PATCH 013/168] quickstart page --- app.py | 2 +- pages/.gitignore | 1 + pages/quickstart.py | 125 ++++++++++++++++++++++++++++++++++++-------- 3 files changed, 106 insertions(+), 22 deletions(-) create mode 100644 pages/.gitignore diff --git a/app.py b/app.py index cbdf70a..1dd93f3 100644 --- a/app.py +++ b/app.py @@ -9,7 +9,7 @@ "TOPP Workflow Framework": [ st.Page(Path("pages", "topp_workflow.py"), title="TOPP Workflow", icon="🚀"), ], - "Example MS Workflow" : [ + "pyOpenMS Workflow" : [ st.Page(Path("pages", "file_upload.py"), title="File Upload", icon="📂"), st.Page(Path("pages", "raw_data_viewer.py"), title="View MS data", icon="👀"), st.Page(Path("pages", "run_example_workflow.py"), title="Run Workflow", icon="⚙️"), diff --git a/pages/.gitignore b/pages/.gitignore new file mode 100644 index 0000000..763624e --- /dev/null +++ b/pages/.gitignore @@ -0,0 +1 @@ +__pycache__/* \ No newline at end of file diff --git a/pages/quickstart.py b/pages/quickstart.py index ace5767..5f9f6a2 100644 --- a/pages/quickstart.py +++ b/pages/quickstart.py @@ -25,28 +25,29 @@ page_setup(page="main") -st.title("OpenMS Streamlit Template App") -st.markdown(""" -This repository contains a template app for OpenMS workflows in a web application using the **streamlit** framework. +st.title("OpenMS Web App Template") +c1, c2 = st.columns(2) +c1.info( + """ +**💡 Template app for OpenMS workflows in a web application using the **streamlit** framework.** -It serves as a foundation for apps ranging from simple workflows with **pyOpenMS** to complex workflows utilizing **OpenMS TOPP tools** with parallel execution. - -It includes solutions for handling user data and parameters in workspaces as well as deployment with docker-compose. -""") -st.subheader("Features") -st.markdown(""" +- Simple workflows with **pyOpenMS** +- Complex workflows utilizing **OpenMS TOPP tools** with parallel execution. - Workspaces for user data with unique shareable IDs - Persistent parameters and input files within a workspace - Captcha control - Packaged executables for Windows -- framework for workflows with OpenMS TOPP tools -- Deployment [with docker-compose](https://github.com/OpenMS/streamlit-deployment) -""") -st.subheader("Quick Start") +- Deploy multiple apps easily with [docker-compose](https://github.com/OpenMS/streamlit-deployment) +""" +) +c2.image("assets/pyopenms_transparent_background.png", width=300) +st.markdown("## 👋 Quick Start") if Path("OpenMS-App.zip").exists(): - st.markdown(""" + st.subsubheader( + """ Download the latest version for Windows here by clicking the button below. -""") +""" + ) with open("OpenMS-App.zip", "rb") as file: st.download_button( label="Download for Windows", @@ -55,11 +56,93 @@ mime="archive/zip", type="primary", ) - st.markdown(""" + st.markdown( + """ Extract the zip file and run the executable (.exe) file to launch the app. Since every dependency is compressed and packacked the app will take a while to launch (up to one minute). -""") -st.markdown(""" -Check out the documentation for **users** and **developers** is included as pages indicated by the 📖 icon +""" + ) + +st.markdown("### 📖 Documentation") +st.markdown( + f""" +This template app includes documentation for **users** including **installation** and introduction to template specific concepts such as **workspaces** and developers with detailed instructions on **how to create and deploy your own app** based on this template. +""" +) +st.page_link( + "pages/documentation.py", + label="Read documentation here, select chapter in the content menu.", + icon="➡️", +) +st.markdown("### Example pages: workflows, visualization and more") +st.markdown( + """ +This app serves both as documentation and showcase what's possible with OpenMS web apps. + +In general there are two options for building workflows. + +#### 1. 🚀 **TOPP Workflow Framework** + +Use this option if you want a standardized framework for building your workflow. -Try the example pages **📁 mzML file upload**, **👀 visualization** and **example workflows**. -""") \ No newline at end of file +- **pre-defined user interface** all in one streamlit page with all steps in different tabs: + - **File Upload**: upload, download and delete input files + - **Configure**: Automatically display input widgets for all paramters in TOPP tools and custom Python scripts + - **Run**: Start and stop workflow execution, includes continous log + - **Results**: Interactive result dashboard +- **write less code**: everything from file upload, input widget generation and execution of tools is handled via convenient functions +- **fast and performant workflows**: Automatic parallel execution of TOPP tools ensures great speed, comparable with workflows written in bash + +""" +) +st.page_link( + "pages/documentation.py", + label="Check out extensive documentation on the TOPP tool framework.", + icon="➡️", +) +st.page_link( + "pages/topp_workflow.py", label="Play around with the example workflow.", icon="➡️" +) +st.markdown( + """ +#### 2. 🐍 **Flexible, custom workflow with pyOpenMS on multiple pages** + +Use this option if you want full control over your workflow implementation and user interface. + +Uses the integrated parameter handling with global parameters across pages, including uploaded files. + +To get an idea check out the following pages from the example worklfow (file upload first!). +""" +) +st.page_link( + "pages/file_upload.py", + label="Upload your own mzML files or use the provided example data set.", + icon="➡️", +) +st.page_link( + "pages/raw_data_viewer.py", + label="Visualize mzML file content in an interactive dashboard.", + icon="➡️", +) +st.page_link( + "pages/run_example_workflow.py", + label="Run a small example workflow with mzML files and check out results.", + icon="➡️", +) + +st.markdown( + """ +#### Other Topics + +Includes other example pages which are independent to showcase other functionalities. +""" +) +st.page_link( + "pages/simple_workflow.py", + label="A very simple worklfow explaining the concepts of data caching in streamlit.", + icon="➡️", +) +st.page_link( + "pages/run_subprocess.py", + label="How to run any command line tool as subprocess from within the OpenMS web app.", + icon="➡️", +) \ No newline at end of file From eb1700955f22b55e852e5f64b4785acd4cf579e8 Mon Sep 17 00:00:00 2001 From: axelwalter Date: Wed, 10 Jul 2024 12:34:39 +0200 Subject: [PATCH 014/168] fallback mzML files for TOPP workflow example --- src/Workflow.py | 70 ++++++++++++++++++++++++------------- src/workflow/StreamlitUI.py | 6 ++-- 2 files changed, 49 insertions(+), 27 deletions(-) diff --git a/src/Workflow.py b/src/Workflow.py index 8c83967..7c1eb5a 100644 --- a/src/Workflow.py +++ b/src/Workflow.py @@ -7,6 +7,7 @@ import plotly.express as px from .common import show_fig + class Workflow(WorkflowManager): # Setup pages for upload, parameter, execution and results. # For layout use any streamlit components such as tabs (as shown in example), columns, or even expanders. @@ -14,14 +15,16 @@ def __init__(self) -> None: # Initialize the parent class with the workflow name. super().__init__("TOPP Workflow", st.session_state["workspace"]) - def upload(self)-> None: - t = st.tabs(["MS data", "Example with fallback data"]) + def upload(self) -> None: + t = st.tabs(["MS data"]) with t[0]: # Use the upload method from StreamlitUI to handle mzML file uploads. - self.ui.upload_widget(key="mzML-files", name="MS data", file_type="mzML") - with t[1]: - # Example with fallback data (not used in workflow) - self.ui.upload_widget(key="image", file_type="png", fallback="assets/OpenMS.png") + self.ui.upload_widget( + key="mzML-files", + name="MS data", + file_type="mzML", + fallback=[str(f) for f in Path("example-data", "mzML").glob("*.mzML")], + ) def configure(self) -> None: # Allow users to select mzML files for the analysis. @@ -33,7 +36,10 @@ def configure(self) -> None: ) with t[0]: # Parameters for FeatureFinderMetabo TOPP tool. - self.ui.input_TOPP("FeatureFinderMetabo", custom_defaults={"algorithm:common:noise_threshold_int": 1000.0}) + self.ui.input_TOPP( + "FeatureFinderMetabo", + custom_defaults={"algorithm:common:noise_threshold_int": 1000.0}, + ) with t[1]: # Paramters for MetaboliteAdductDecharger TOPP tool. self.ui.input_TOPP("FeatureLinkerUnlabeledKD") @@ -52,12 +58,14 @@ def execution(self) -> None: # Get mzML files with FileManager in_mzML = self.file_manager.get_files(self.params["mzML-files"]) - + # Log any messages. self.logger.log(f"Number of input mzML files: {len(in_mzML)}") # Prepare output files for feature detection. - out_ffm = self.file_manager.get_files(in_mzML, "featureXML", "feature-detection") + out_ffm = self.file_manager.get_files( + in_mzML, "featureXML", "feature-detection" + ) # Run FeatureFinderMetabo tool with input and output files. self.logger.log("Detecting features...") @@ -67,13 +75,19 @@ def execution(self) -> None: # Prepare input and output files for feature linking in_fl = self.file_manager.get_files(out_ffm, collect=True) - out_fl = self.file_manager.get_files("feature_matrix.consensusXML", set_results_dir="feature-linking") + out_fl = self.file_manager.get_files( + "feature_matrix.consensusXML", set_results_dir="feature-linking" + ) # Run FeatureLinkerUnlabaeledKD with all feature maps passed at once self.logger.log("Linking features...") - self.executor.run_topp("FeatureLinkerUnlabeledKD", input_output={"in": in_fl, "out": out_fl}) + self.executor.run_topp( + "FeatureLinkerUnlabeledKD", input_output={"in": in_fl, "out": out_fl} + ) self.logger.log("Exporting consensus features to pandas DataFrame...") - self.executor.run_python("export_consensus_feature_df", input_output={"in": out_fl[0]}) + self.executor.run_python( + "export_consensus_feature_df", input_output={"in": out_fl[0]} + ) # Check if adduct detection should be run. if self.params["run-python-script"]: # Example for a custom Python tool, which is located in src/python-tools. @@ -82,20 +96,26 @@ def execution(self) -> None: def results(self) -> None: @st.experimental_fragment def show_consensus_features(): - df = pd.read_csv(file, sep="\t", index_col=0) - st.metric("number of consensus features", df.shape[0]) - c1, c2 = st.columns(2) - rows = c1.dataframe(df, selection_mode="multi-row", on_select="rerun")["selection"]["rows"] - if rows: - df = df.iloc[rows, 4:] - fig = px.bar(df, barmode="group", labels={"value": "intensity"}) - with c2: - show_fig(fig, "consensus-feature-intensities") - else: - st.info("💡 Select one ore more rows in the table to show a barplot with intensities.") + df = pd.read_csv(file, sep="\t", index_col=0) + st.metric("number of consensus features", df.shape[0]) + c1, c2 = st.columns(2) + rows = c1.dataframe(df, selection_mode="multi-row", on_select="rerun")[ + "selection" + ]["rows"] + if rows: + df = df.iloc[rows, 4:] + fig = px.bar(df, barmode="group", labels={"value": "intensity"}) + with c2: + show_fig(fig, "consensus-feature-intensities") + else: + st.info( + "💡 Select one ore more rows in the table to show a barplot with intensities." + ) - file = Path(self.workflow_dir, "results", "feature-linking", "feature_matrix.tsv") + file = Path( + self.workflow_dir, "results", "feature-linking", "feature_matrix.tsv" + ) if file.exists(): show_consensus_features() else: - st.warning("No consensus feature file found. Please run workflow first.") \ No newline at end of file + st.warning("No consensus feature file found. Please run workflow first.") diff --git a/src/workflow/StreamlitUI.py b/src/workflow/StreamlitUI.py index aab4862..5d97b56 100644 --- a/src/workflow/StreamlitUI.py +++ b/src/workflow/StreamlitUI.py @@ -112,9 +112,10 @@ def upload_widget( if isinstance(fallback, str): fallback = [fallback] for f in fallback: + c1, _ = st.columns(2) if not Path(files_dir, f).exists(): shutil.copy(f, Path(files_dir, Path(f).name)) - st.info(f"Adding default file: **{f}**") + c1.info(f"Adding default file: **{f}**") current_files = [ f.name for f in files_dir.iterdir() @@ -674,7 +675,8 @@ def zip_and_download_files(self, directory: str): def file_upload_section(self, custom_upload_function) -> None: custom_upload_function() - if st.button("⬇️ Download all uploaded files", use_container_width=True): + c1, _ = st.columns(2) + if c1.button("⬇️ Download all uploaded files", use_container_width=True): self.zip_and_download_files(Path(self.workflow_dir, "input-files")) def parameter_section(self, custom_paramter_function) -> None: From 7eff2d60ac908978d63d62a12ee39c06d1131c72 Mon Sep 17 00:00:00 2001 From: axelwalter Date: Wed, 10 Jul 2024 12:53:48 +0200 Subject: [PATCH 015/168] use fragments in TOPP workflow --- src/Workflow.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Workflow.py b/src/Workflow.py index 7c1eb5a..3f72334 100644 --- a/src/Workflow.py +++ b/src/Workflow.py @@ -15,6 +15,7 @@ def __init__(self) -> None: # Initialize the parent class with the workflow name. super().__init__("TOPP Workflow", st.session_state["workspace"]) + @st.experimental_fragment def upload(self) -> None: t = st.tabs(["MS data"]) with t[0]: @@ -26,6 +27,7 @@ def upload(self) -> None: fallback=[str(f) for f in Path("example-data", "mzML").glob("*.mzML")], ) + @st.experimental_fragment def configure(self) -> None: # Allow users to select mzML files for the analysis. self.ui.select_input_file("mzML-files", multiple=True) @@ -50,6 +52,7 @@ def configure(self) -> None: # Parameters are specified within the file in the DEFAULTS dictionary. self.ui.input_python("example") + @st.experimental_fragment def execution(self) -> None: # Any parameter checks, here simply checking if mzML files are selected if not self.params["mzML-files"]: @@ -93,6 +96,7 @@ def execution(self) -> None: # Example for a custom Python tool, which is located in src/python-tools. self.executor.run_python("example", {"in": in_mzML}) + @st.experimental_fragment def results(self) -> None: @st.experimental_fragment def show_consensus_features(): From ee6b68e9b8aaeb25eed6fe4553a8eb9a32684c91 Mon Sep 17 00:00:00 2001 From: axelwalter Date: Wed, 10 Jul 2024 12:54:00 +0200 Subject: [PATCH 016/168] update quickstart page --- pages/quickstart.py | 49 ++++++++++++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/pages/quickstart.py b/pages/quickstart.py index 5f9f6a2..e9eb1ec 100644 --- a/pages/quickstart.py +++ b/pages/quickstart.py @@ -21,16 +21,17 @@ from pathlib import Path import streamlit as st -from src.common import page_setup +from src.common import page_setup, v_space page_setup(page="main") -st.title("OpenMS Web App Template") +st.markdown("# 👋 Quick Start") +st.markdown("## Template for OpenMS web apps using the **streamlit** framework") c1, c2 = st.columns(2) -c1.info( +c1.markdown( """ -**💡 Template app for OpenMS workflows in a web application using the **streamlit** framework.** - +## ⭐ Features + - Simple workflows with **pyOpenMS** - Complex workflows utilizing **OpenMS TOPP tools** with parallel execution. - Workspaces for user data with unique shareable IDs @@ -40,8 +41,8 @@ - Deploy multiple apps easily with [docker-compose](https://github.com/OpenMS/streamlit-deployment) """ ) +v_space(1, c2) c2.image("assets/pyopenms_transparent_background.png", width=300) -st.markdown("## 👋 Quick Start") if Path("OpenMS-App.zip").exists(): st.subsubheader( """ @@ -62,7 +63,7 @@ """ ) -st.markdown("### 📖 Documentation") +st.markdown("## 📖 Documentation") st.markdown( f""" This template app includes documentation for **users** including **installation** and introduction to template specific concepts such as **workspaces** and developers with detailed instructions on **how to create and deploy your own app** based on this template. @@ -73,25 +74,41 @@ label="Read documentation here, select chapter in the content menu.", icon="➡️", ) -st.markdown("### Example pages: workflows, visualization and more") + +st.markdown( + """## Workspaces and Settings +The **sidebar** contains to boxes, one for **workspaces** and one for **settings**. + +🖥️ **Workspaces** store user inputs, parameters and results for a specific session or analysis task. + +In **online mode** where the app is hosted on a remote server the workspace has a unique identifier number which can be shared with collaboration partners or stored for later access. + +In **local mode** where the app is run locally on a PC (e.g. via Windows executable) the user can create and delete separate workspaces for different projects. + +⚙️ **Settings** contain global settings which are relevant for all pages, such as the image export format. +""" +) + + +st.markdown("## Example pages: workflows, visualization and more") st.markdown( """ This app serves both as documentation and showcase what's possible with OpenMS web apps. In general there are two options for building workflows. -#### 1. 🚀 **TOPP Workflow Framework** +### 1. 🚀 **TOPP Workflow Framework** Use this option if you want a standardized framework for building your workflow. -- **pre-defined user interface** all in one streamlit page with all steps in different tabs: +- **Pre-defined user interface** all in one streamlit page with all steps in different tabs: - **File Upload**: upload, download and delete input files - **Configure**: Automatically display input widgets for all paramters in TOPP tools and custom Python scripts - **Run**: Start and stop workflow execution, includes continous log - **Results**: Interactive result dashboard -- **write less code**: everything from file upload, input widget generation and execution of tools is handled via convenient functions -- **fast and performant workflows**: Automatic parallel execution of TOPP tools ensures great speed, comparable with workflows written in bash - +- **Write less code**: everything from file upload, input widget generation and execution of tools is handled via convenient functions +- **Fast and performant workflows**: Automatic parallel execution of TOPP tools ensures great speed, comparable with workflows written in bash +- **Ideal for longer workflows**: Close the app and come back to the still running or finish workflow the next day, by entering your workspace again. """ ) st.page_link( @@ -104,7 +121,7 @@ ) st.markdown( """ -#### 2. 🐍 **Flexible, custom workflow with pyOpenMS on multiple pages** +### 2. 🐍 **Flexible, custom workflow with pyOpenMS on multiple pages** Use this option if you want full control over your workflow implementation and user interface. @@ -131,7 +148,7 @@ st.markdown( """ -#### Other Topics +### Other Topics Includes other example pages which are independent to showcase other functionalities. """ @@ -145,4 +162,4 @@ "pages/run_subprocess.py", label="How to run any command line tool as subprocess from within the OpenMS web app.", icon="➡️", -) \ No newline at end of file +) From 76082f839bca33473c78426c9eba7c82f927ef7f Mon Sep 17 00:00:00 2001 From: axelwalter Date: Wed, 10 Jul 2024 13:04:11 +0200 Subject: [PATCH 017/168] pylint errors --- src/plotting/MSExperimentPlotter.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/plotting/MSExperimentPlotter.py b/src/plotting/MSExperimentPlotter.py index 7cbf0fb..c42df2c 100644 --- a/src/plotting/MSExperimentPlotter.py +++ b/src/plotting/MSExperimentPlotter.py @@ -6,7 +6,7 @@ import numpy as np import plotly.graph_objects as go -from .BasePlotter import Colors, _BasePlotter, _BasePlotterConfig +from src.plotting.BasePlotter import Colors, _BasePlotter, _BasePlotterConfig @dataclass(kw_only=True) @@ -15,6 +15,13 @@ class MSExperimentPlotterConfig(_BasePlotterConfig): num_RT_bins: int = 50 num_mz_bins: int = 50 plot3D: bool = False + title: str = "Peak Map" + xlabel: str = "RT (s)" + ylabel: str = "m/z" + height: int = 500 + width: int = 750 + relative_intensity: bool = False + show_legend: bool = True class MSExperimentPlotter(_BasePlotter): From 85b9a1eab351f824a15d217e99e25ae5e1b80639 Mon Sep 17 00:00:00 2001 From: axelwalter Date: Wed, 10 Jul 2024 14:16:59 +0200 Subject: [PATCH 018/168] rename pages directory due to streamlit warning - warning to use a pages directory within an app using st.navigation - could lead to unwanted behaviour --- Dockerfile | 2 +- Dockerfile_simple | 2 +- app.py | 16 ++++++++-------- {pages => content}/.gitignore | 0 {pages => content}/documentation.py | 2 +- {pages => content}/file_upload.py | 0 {pages => content}/quickstart.py | 16 ++++++++-------- {pages => content}/raw_data_viewer.py | 0 {pages => content}/run_example_workflow.py | 0 {pages => content}/run_subprocess.py | 0 {pages => content}/simple_workflow.py | 0 {pages => content}/topp_workflow.py | 0 src/captcha_.py | 8 ++++---- src/view.py | 4 ++-- 14 files changed, 25 insertions(+), 25 deletions(-) rename {pages => content}/.gitignore (100%) rename {pages => content}/documentation.py (99%) rename {pages => content}/file_upload.py (100%) rename {pages => content}/quickstart.py (94%) rename {pages => content}/raw_data_viewer.py (100%) rename {pages => content}/run_example_workflow.py (100%) rename {pages => content}/run_subprocess.py (100%) rename {pages => content}/simple_workflow.py (100%) rename {pages => content}/topp_workflow.py (100%) diff --git a/Dockerfile b/Dockerfile index 6a20657..54a5e3b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -113,7 +113,7 @@ COPY app.py /app/app.py COPY src/ /app/src COPY assets/ /app/assets COPY example-data/ /app/example-data -COPY pages/ /app/pages +COPY content/ /app/pages # For streamlit configuration COPY .streamlit/config.toml /app/.streamlit/config.toml COPY clean-up-workspaces.py /app/clean-up-workspaces.py diff --git a/Dockerfile_simple b/Dockerfile_simple index 30d6a7c..59c456c 100644 --- a/Dockerfile_simple +++ b/Dockerfile_simple @@ -57,7 +57,7 @@ COPY app.py /app/app.py COPY src/ /app/src COPY assets/ /app/assets COPY example-data/ /app/example-data -COPY pages/ /app/pages +COPY content/ /app/pages # For streamlit configuration COPY .streamlit/config.toml /app/.streamlit/config.toml diff --git a/app.py b/app.py index 1dd93f3..d3c69c3 100644 --- a/app.py +++ b/app.py @@ -3,20 +3,20 @@ pages = { "OpenMS Web App" : [ - st.Page(Path("pages", "quickstart.py"), title="Quickstart", icon="👋"), - st.Page(Path("pages", "documentation.py"), title="Documentation", icon="📖"), + st.Page(Path("content", "quickstart.py"), title="Quickstart", icon="👋"), + st.Page(Path("content", "documentation.py"), title="Documentation", icon="📖"), ], "TOPP Workflow Framework": [ - st.Page(Path("pages", "topp_workflow.py"), title="TOPP Workflow", icon="🚀"), + st.Page(Path("content", "topp_workflow.py"), title="TOPP Workflow", icon="🚀"), ], "pyOpenMS Workflow" : [ - st.Page(Path("pages", "file_upload.py"), title="File Upload", icon="📂"), - st.Page(Path("pages", "raw_data_viewer.py"), title="View MS data", icon="👀"), - st.Page(Path("pages", "run_example_workflow.py"), title="Run Workflow", icon="⚙️"), + st.Page(Path("content", "file_upload.py"), title="File Upload", icon="📂"), + st.Page(Path("content", "raw_data_viewer.py"), title="View MS data", icon="👀"), + st.Page(Path("content", "run_example_workflow.py"), title="Run Workflow", icon="⚙️"), ], "Others Topics": [ - st.Page(Path("pages", "simple_workflow.py"), title="Simple Workflow", icon="⚙️"), - st.Page(Path("pages", "run_subprocess.py"), title="Run Subprocess", icon="🖥️"), + st.Page(Path("content", "simple_workflow.py"), title="Simple Workflow", icon="⚙️"), + st.Page(Path("content", "run_subprocess.py"), title="Run Subprocess", icon="🖥️"), ] } diff --git a/pages/.gitignore b/content/.gitignore similarity index 100% rename from pages/.gitignore rename to content/.gitignore diff --git a/pages/documentation.py b/content/documentation.py similarity index 99% rename from pages/documentation.py rename to content/documentation.py index e556e57..91f481e 100644 --- a/pages/documentation.py +++ b/content/documentation.py @@ -261,7 +261,7 @@ > 💡 Simply set a name for the workflow and overwrite the **`upload`**, **`configure`**, **`execution`** and **`results`** methods in your **`Workflow`** class. -The file `pages/6_TOPP-Workflow.py` displays the workflow content and can, but does not have to be modified. +The file `content/6_TOPP-Workflow.py` displays the workflow content and can, but does not have to be modified. The `Workflow` class contains four important members, which you can use to build your own workflow: diff --git a/pages/file_upload.py b/content/file_upload.py similarity index 100% rename from pages/file_upload.py rename to content/file_upload.py diff --git a/pages/quickstart.py b/content/quickstart.py similarity index 94% rename from pages/quickstart.py rename to content/quickstart.py index e9eb1ec..a912b92 100644 --- a/pages/quickstart.py +++ b/content/quickstart.py @@ -70,7 +70,7 @@ """ ) st.page_link( - "pages/documentation.py", + "content/documentation.py", label="Read documentation here, select chapter in the content menu.", icon="➡️", ) @@ -112,12 +112,12 @@ """ ) st.page_link( - "pages/documentation.py", + "content/documentation.py", label="Check out extensive documentation on the TOPP tool framework.", icon="➡️", ) st.page_link( - "pages/topp_workflow.py", label="Play around with the example workflow.", icon="➡️" + "content/topp_workflow.py", label="Play around with the example workflow.", icon="➡️" ) st.markdown( """ @@ -131,17 +131,17 @@ """ ) st.page_link( - "pages/file_upload.py", + "content/file_upload.py", label="Upload your own mzML files or use the provided example data set.", icon="➡️", ) st.page_link( - "pages/raw_data_viewer.py", + "content/raw_data_viewer.py", label="Visualize mzML file content in an interactive dashboard.", icon="➡️", ) st.page_link( - "pages/run_example_workflow.py", + "content/run_example_workflow.py", label="Run a small example workflow with mzML files and check out results.", icon="➡️", ) @@ -154,12 +154,12 @@ """ ) st.page_link( - "pages/simple_workflow.py", + "content/simple_workflow.py", label="A very simple worklfow explaining the concepts of data caching in streamlit.", icon="➡️", ) st.page_link( - "pages/run_subprocess.py", + "content/run_subprocess.py", label="How to run any command line tool as subprocess from within the OpenMS web app.", icon="➡️", ) diff --git a/pages/raw_data_viewer.py b/content/raw_data_viewer.py similarity index 100% rename from pages/raw_data_viewer.py rename to content/raw_data_viewer.py diff --git a/pages/run_example_workflow.py b/content/run_example_workflow.py similarity index 100% rename from pages/run_example_workflow.py rename to content/run_example_workflow.py diff --git a/pages/run_subprocess.py b/content/run_subprocess.py similarity index 100% rename from pages/run_subprocess.py rename to content/run_subprocess.py diff --git a/pages/simple_workflow.py b/content/simple_workflow.py similarity index 100% rename from pages/simple_workflow.py rename to content/simple_workflow.py diff --git a/pages/topp_workflow.py b/content/topp_workflow.py similarity index 100% rename from pages/topp_workflow.py rename to content/topp_workflow.py diff --git a/src/captcha_.py b/src/captcha_.py index de688f5..b8b7d0c 100644 --- a/src/captcha_.py +++ b/src/captcha_.py @@ -64,7 +64,7 @@ def delete_page(main_script_path_str: str, page_name: str) -> None: def restore_all_pages(main_script_path_str: str) -> None: """ - restore all pages found in the "pages" directory to an app's configuration. + restore all pages found in the "content" directory to an app's configuration. Args: main_script_path_str (str): The name of the main page, typically the app's name. @@ -79,12 +79,12 @@ def restore_all_pages(main_script_path_str: str) -> None: main_script_path = Path(main_script_path_str) # Define the directory where pages are stored - pages_dir = main_script_path.parent / "pages" + pages_dir = main_script_path.parent / "content" # To store the pages for later, to add in ascending order pages_temp = [] - # Iterate over all .py files in the "pages" directory + # Iterate over all .py files in the "content" directory for script_path in pages_dir.glob("*.py"): # append path with file name script_path_str = str(script_path.resolve()) @@ -146,7 +146,7 @@ def add_page(main_script_path_str: str, page_name: str) -> None: main_script_path = Path(main_script_path_str) # Define the directory where pages are stored - pages_dir = main_script_path.parent / "pages" + pages_dir = main_script_path.parent / "content" # Find the script path corresponding to the new page script_path = [f for f in pages_dir.glob("*.py") if f.name.find(page_name) != -1][0] diff --git a/src/view.py b/src/view.py index 1386b45..48bb4a2 100644 --- a/src/view.py +++ b/src/view.py @@ -106,8 +106,8 @@ def plot_bpc_tic() -> go.Figure: name="XIC", showlegend=True, ) - except: - st.error("Invalid m/z value.") + except ValueError: + st.error("Invalid m/z value for XIC provided. Please enter a valid number.") fig.update_layout( title=f"{st.session_state.view_selected_file}", From f2dc41f5d5b6b225e5b88e5c5142081e38883248 Mon Sep 17 00:00:00 2001 From: axelwalter Date: Thu, 11 Jul 2024 09:28:51 +0200 Subject: [PATCH 019/168] fix pages directory name in executable workflow --- .github/workflows/build-windows-executable-app.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-windows-executable-app.yaml b/.github/workflows/build-windows-executable-app.yaml index a0de350..a48a9b9 100644 --- a/.github/workflows/build-windows-executable-app.yaml +++ b/.github/workflows/build-windows-executable-app.yaml @@ -209,7 +209,7 @@ jobs: mv python-${{ env.PYTHON_VERSION }} streamlit_exe mv run_app.bat streamlit_exe cp -r src streamlit_exe - cp -r pages streamlit_exe + cp -r content streamlit_exe cp -r assets streamlit_exe cp -r example-data streamlit_exe cp -r .streamlit streamlit_exe From 3b4f8fb36e30cd7d9bdab8d991317888a43c2e5d Mon Sep 17 00:00:00 2001 From: axelwalter Date: Thu, 11 Jul 2024 15:49:10 +0200 Subject: [PATCH 020/168] fix file upload in TOPP workflow - removed fragment from file upload sections, since configure depends on it - check if fallback files are present and remove before adding new files --- src/Workflow.py | 1 - src/workflow/StreamlitUI.py | 11 +++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Workflow.py b/src/Workflow.py index 3f72334..3e5864f 100644 --- a/src/Workflow.py +++ b/src/Workflow.py @@ -15,7 +15,6 @@ def __init__(self) -> None: # Initialize the parent class with the workflow name. super().__init__("TOPP Workflow", st.session_state["workspace"]) - @st.experimental_fragment def upload(self) -> None: t = st.tabs(["MS data"]) with t[0]: diff --git a/src/workflow/StreamlitUI.py b/src/workflow/StreamlitUI.py index 5d97b56..158a04b 100644 --- a/src/workflow/StreamlitUI.py +++ b/src/workflow/StreamlitUI.py @@ -46,8 +46,15 @@ def upload_widget( name (str, optional): Display name for the upload component. Defaults to the key if not provided. fallback (Union[List, str], optional): Default files to use if no files are uploaded. """ - # streamlit uploader can't handle file types with upper and lower case letters files_dir = Path(self.workflow_dir, "input-files", key) + + # create the files dir + files_dir.mkdir(exist_ok=True) + + # check if only fallback files are in files_dir, if yes, reset the directory before adding new files + if [Path(f).name for f in Path(files_dir).iterdir()] == [Path(f).name for f in fallback]: + shutil.rmtree(files_dir) + files_dir.mkdir() if not name: name = key.replace("-", " ") @@ -107,7 +114,7 @@ def upload_widget( my_bar.empty() st.success("Successfully copied files!") - if fallback: + if fallback and not any(Path(files_dir).iterdir()): files_dir.mkdir(parents=True, exist_ok=True) if isinstance(fallback, str): fallback = [fallback] From ceefccb63ac6d06854777f7098c6993f33b7ba1a Mon Sep 17 00:00:00 2001 From: axelwalter Date: Thu, 11 Jul 2024 15:51:48 +0200 Subject: [PATCH 021/168] replace 0 and O in captcha --- src/captcha_.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/captcha_.py b/src/captcha_.py index b8b7d0c..ada43e7 100644 --- a/src/captcha_.py +++ b/src/captcha_.py @@ -203,7 +203,7 @@ def captcha_control(): if "Captcha" not in st.session_state: st.session_state["Captcha"] = "".join( random.choices(string.ascii_uppercase + string.digits, k=length_captcha) - ) + ).replace("0", "A").replace("O", "B") col1, _ = st.columns(2) with col1.form("captcha-form"): From ab90dfe18a11736db29b3ae5b97193ef21349593 Mon Sep 17 00:00:00 2001 From: axelwalter Date: Thu, 11 Jul 2024 16:15:04 +0200 Subject: [PATCH 022/168] TOPP file upload - files directory created once - removed unneccessary mkdirs --- src/workflow/StreamlitUI.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/workflow/StreamlitUI.py b/src/workflow/StreamlitUI.py index 158a04b..50b3c0b 100644 --- a/src/workflow/StreamlitUI.py +++ b/src/workflow/StreamlitUI.py @@ -49,7 +49,7 @@ def upload_widget( files_dir = Path(self.workflow_dir, "input-files", key) # create the files dir - files_dir.mkdir(exist_ok=True) + files_dir.mkdir(exist_ok=True, parents=True) # check if only fallback files are in files_dir, if yes, reset the directory before adding new files if [Path(f).name for f in Path(files_dir).iterdir()] == [Path(f).name for f in fallback]: @@ -76,7 +76,6 @@ def upload_widget( f"Add **{name}**", use_container_width=True, type="primary" ): if files: - files_dir.mkdir(parents=True, exist_ok=True) # in case of online mode a single file is returned -> put in list if not isinstance(files, list): files = [files] @@ -104,7 +103,6 @@ def upload_widget( f"No files with type **{file_type}** found in specified folder." ) else: - files_dir.mkdir(parents=True, exist_ok=True) # Copy all mzML files to workspace mzML directory, add to selected files files = list(Path(local_dir).glob("*.mzML")) my_bar = st.progress(0) @@ -115,7 +113,6 @@ def upload_widget( st.success("Successfully copied files!") if fallback and not any(Path(files_dir).iterdir()): - files_dir.mkdir(parents=True, exist_ok=True) if isinstance(fallback, str): fallback = [fallback] for f in fallback: @@ -137,10 +134,10 @@ def upload_widget( if files_dir.exists() and not any(files_dir.iterdir()): shutil.rmtree(files_dir) - c1, c2 = st.columns(2) + c1, _ = st.columns(2) if current_files: c1.info(f"Current **{name}** files:\n\n" + "\n\n".join(current_files)) - if c2.button( + if c1.button( f"🗑️ Remove all **{name}** files.", use_container_width=True, key=f"remove-files-{key}", From ceb19d05574c67cec8cddbf340c59323d5391dc3 Mon Sep 17 00:00:00 2001 From: axelwalter Date: Wed, 24 Jul 2024 07:29:34 +0200 Subject: [PATCH 023/168] sort result sets to show most recent first --- content/run_example_workflow.py | 26 ++------------------------ src/mzmlfileworkflow.py | 31 ++++++++++++++++++++++++++++++- 2 files changed, 32 insertions(+), 25 deletions(-) diff --git a/content/run_example_workflow.py b/content/run_example_workflow.py index 8b806f1..4e72230 100755 --- a/content/run_example_workflow.py +++ b/content/run_example_workflow.py @@ -1,10 +1,8 @@ import streamlit as st -import pandas as pd -import plotly.express as px from pathlib import Path -from src.common import page_setup, save_params, show_fig, show_table +from src.common import page_setup, save_params from src import mzmlfileworkflow # Page name "workflow" will show mzML file selector in sidebar @@ -45,26 +43,6 @@ else: st.warning("Select some mzML files.") -result_dirs = [f.name for f in Path(result_dir).iterdir() if f.is_dir()] -run_dir = st.selectbox("select result from run", result_dirs) -result_dir = Path(result_dir, run_dir) -# visualize workflow results if there are any -result_file_path = Path(result_dir, "result.tsv") - -if result_file_path.exists(): - df = pd.read_csv(result_file_path, sep="\t", index_col="filenames") - - if not df.empty: - tabs = st.tabs(["📁 data", "📊 plot"]) - - with tabs[0]: - show_table(df, "mzML-workflow-result") - - with tabs[1]: - fig = px.bar(df) - st.info( - "💡 Download figure with camera icon in top right corner. File format can be specified in settings." - ) - show_fig(fig, "mzML-workflow-results") +mzmlfileworkflow.result_section(result_dir) \ No newline at end of file diff --git a/src/mzmlfileworkflow.py b/src/mzmlfileworkflow.py index 4dd1587..e1a372b 100644 --- a/src/mzmlfileworkflow.py +++ b/src/mzmlfileworkflow.py @@ -4,7 +4,8 @@ import pandas as pd import time from datetime import datetime -from src.common import reset_directory +from src.common import reset_directory, show_fig, show_table +import plotly.express as px def mzML_file_get_num_spectra(filepath): @@ -68,3 +69,31 @@ def run_workflow(params, result_dir): } ) df.to_csv(Path(result_dir, "result.tsv"), sep="\t", index=False) + +@st.experimental_fragment +def result_section(result_dir): + date_strings = [f.name for f in Path(result_dir).iterdir() if f.is_dir()] + + result_dirs = sorted(date_strings, key=lambda date: datetime.strptime(date, "%Y-%m-%d %H:%M:%S"))[::-1] + + run_dir = st.selectbox("select result from run", result_dirs) + + result_dir = Path(result_dir, run_dir) + # visualize workflow results if there are any + result_file_path = Path(result_dir, "result.tsv") + + if result_file_path.exists(): + df = pd.read_csv(result_file_path, sep="\t", index_col="filenames") + + if not df.empty: + tabs = st.tabs(["📁 data", "📊 plot"]) + + with tabs[0]: + show_table(df, "mzML-workflow-result") + + with tabs[1]: + fig = px.bar(df) + st.info( + "💡 Download figure with camera icon in top right corner. File format can be specified in settings." + ) + show_fig(fig, "mzML-workflow-results") \ No newline at end of file From 66bb5cacb29f41dcadf8092d8f2cc909b1cd7723 Mon Sep 17 00:00:00 2001 From: axelwalter Date: Wed, 24 Jul 2024 07:34:22 +0200 Subject: [PATCH 024/168] Update content/documentation.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Tom David Müller <57191390+t0mdavid-m@users.noreply.github.com> --- content/documentation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/documentation.py b/content/documentation.py index 91f481e..41d595f 100644 --- a/content/documentation.py +++ b/content/documentation.py @@ -64,7 +64,7 @@ ## Downloading Results -You can download the results of your analyses, including figures and tables, directly from the application: +You can download the results of your analyses, including data, figures and tables, directly from the application: - **Figures**: Click the camera icon button, appearing while hovering on the top right corner of the figure. Set the desired image format in the settings panel in the side bar. - **Tables**: Use the download button to save tables in *csv* format, appearing while hovering on the top right corner of the table. From 432e87280ac91e7bcc9e94b4bff9832525f3f3db Mon Sep 17 00:00:00 2001 From: axelwalter Date: Wed, 24 Jul 2024 07:34:31 +0200 Subject: [PATCH 025/168] Update content/documentation.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Tom David Müller <57191390+t0mdavid-m@users.noreply.github.com> --- content/documentation.py | 1 + 1 file changed, 1 insertion(+) diff --git a/content/documentation.py b/content/documentation.py index 41d595f..a11b54e 100644 --- a/content/documentation.py +++ b/content/documentation.py @@ -67,6 +67,7 @@ You can download the results of your analyses, including data, figures and tables, directly from the application: - **Figures**: Click the camera icon button, appearing while hovering on the top right corner of the figure. Set the desired image format in the settings panel in the side bar. - **Tables**: Use the download button to save tables in *csv* format, appearing while hovering on the top right corner of the table. +- **Data**: Use the download section in the sidebar to download the raw results of your analysis. ## Getting Started From bbedd94b82a71ab65308b35df82daaea5e5c2e56 Mon Sep 17 00:00:00 2001 From: axelwalter Date: Wed, 24 Jul 2024 08:06:30 +0200 Subject: [PATCH 026/168] move content of documentation pages to docs directory --- content/documentation.py | 530 +----------------- docs/.gitignore | 1 + docs/build_app.md | 68 +++ docs/deployment.md | 82 +++ docs/installation.md | 39 ++ docs/toppframework.py | 269 +++++++++ docs/user_guide.md | 44 ++ .../win_exe_with_embed_py.md | 2 +- .../win_exe_with_pyinstaller.md | 36 +- 9 files changed, 545 insertions(+), 526 deletions(-) create mode 100644 docs/.gitignore create mode 100644 docs/build_app.md create mode 100644 docs/deployment.md create mode 100644 docs/installation.md create mode 100644 docs/toppframework.py create mode 100644 docs/user_guide.md rename win_exe_with_embed_py.md => docs/win_exe_with_embed_py.md (95%) rename win_exe_with_pyinstaller.md => docs/win_exe_with_pyinstaller.md (79%) diff --git a/content/documentation.py b/content/documentation.py index a11b54e..cc31a26 100644 --- a/content/documentation.py +++ b/content/documentation.py @@ -1,12 +1,7 @@ import streamlit as st -from src.Workflow import Workflow -from src.workflow.StreamlitUI import StreamlitUI -from src.workflow.FileManager import FileManager -from src.workflow.CommandExecutor import CommandExecutor from src.common import page_setup -from inspect import getsource from pathlib import Path -import requests +from docs.toppframework import content as topp_framework_content page_setup() @@ -33,54 +28,9 @@ ############################################################################################# if page == pages[0]: - st.markdown( - """ -# User Guide - -Welcome to the OpenMS Streamlit Web Application! This guide will help you understand how to use our tools effectively. - -## Advantages of OpenMS Web Apps - -OpenMS web applications provide a user-friendly interface for accessing the powerful features of OpenMS. Here are a few advantages: -- **Accessibility**: Access powerful OpenMS algorithms and TOPP tools from any device with a web browser. -- **Ease of Use**: Simplified user interface makes it easy for both beginners and experts to perform complex analyses. -- **No Installation Required**: Use the tools without the need to install OpenMS locally, saving time and system resources. - -## Workspaces - -In the OpenMS web application, workspaces are designed to keep your analysis organized: -- **Workspace Specific Parameters and Files**: Each workspace stores parameters and files (uploaded input files and results from workflows). -- **Persistence**: Your workspaces and parameters are saved, so you can return to your analysis anytime and pick up where you left off. - -## Online and Local Mode Differences - -There are a few key differences between operating in online and local modes: -- **File Uploads**: - - *Online Mode*: You can upload only one file at a time. This helps manage server load and optimizes performance. - - *Local Mode*: Multiple file uploads are supported, giving you flexibility when working with large datasets. -- **Workspace Access**: - - In online mode, workspaces are stored temporarily and will be cleared after seven days of inactivity. - - In local mode, workspaces are saved on your local machine, allowing for persistent storage. - -## Downloading Results - -You can download the results of your analyses, including data, figures and tables, directly from the application: -- **Figures**: Click the camera icon button, appearing while hovering on the top right corner of the figure. Set the desired image format in the settings panel in the side bar. -- **Tables**: Use the download button to save tables in *csv* format, appearing while hovering on the top right corner of the table. -- **Data**: Use the download section in the sidebar to download the raw results of your analysis. - -## Getting Started - -To get started: -1. Select or create a new workspace. -2. Upload your data file. -3. Set the necessary parameters for your analysis. -4. Run the analysis. -5. View and download your results. - -For more detailed information on each step, refer to the specific sections of this guide. -""" - ) + with open(Path("docs", "user_guide.md"), "r", encoding="utf-8") as f: + content = f.read() + st.markdown(content) ############################################################################################# # Installation @@ -101,495 +51,59 @@ mime="archive/zip", type="primary", ) - - st.markdown( - """ -# Installation - -## Windows - -The app is available as pre-packaged Windows executable, including all dependencies. - -The windows executable is built by a GitHub action and can be downloaded [here](https://github.com/OpenMS/streamlit-template/actions/workflows/build-windows-executable-app.yaml). -Select the latest successfull run and download the zip file from the artifacts section, while signed in to GitHub. - -## Python - -Clone the [streamlit-template repository](https://github.com/OpenMS/streamlit-template). It includes files to install dependencies via pip or conda. - -### via pip in an existing Python environment - -To install all required depdencies via pip in an already existing Python environment, run the following command in the terminal: - -`pip install -r requirements.txt` - -### create new environment via conda/mamba - -Create and activate the conda environment: - -`conda env create -f environment.yml` - -`conda activate streamlit-env` - -### run the app - -Run the app via streamlit command in the terminal with or without *local* mode (default is *online* mode). Learn more about *local* and *online* mode in the documentation page 📖 **OpenMS Template App**. - -`streamlit run app.py [local]` - -## Docker - -This repository contains two Dockerfiles. - -1. `Dockerfile`: This Dockerfile builds all dependencies for the app including Python packages and the OpenMS TOPP tools. Recommended for more complex workflows where you want to use the OpenMS TOPP tools for instance with the **TOPP Workflow Framework**. -2. `Dockerfile_simple`: This Dockerfile builds only the Python packages. Recommended for simple apps using pyOpenMS only. - -""" - ) + with open(Path("docs", "installation.md"), "r", encoding="utf-8") as f: + content = f.read() + st.markdown(content) ############################################################################################# # Developer Overview, how to build app based on Template ############################################################################################# if page == pages[2]: - st.markdown( - """ -# Build your own app based on this template - -## App layout - -- *Main page* contains explanatory text on how to use the app and a workspace selector. `app.py` -- *Pages* can be navigated via *Sidebar*. Sidebar also contains the OpenMS logo, settings panel and a workspace indicator. The *main page* contains a workspace selector as well. -- See *pages* in the template app for example use cases. The content of this app serves as a documentation. - -## Key concepts - -- **Workspaces** -: Directories where all data is generated and uploaded can be stored as well as a workspace specific parameter file. -- **Run the app locally and online** -: Launching the app with the `local` argument lets the user create/remove workspaces. In the online the user gets a workspace with a specific ID. -- **Parameters** -: Parameters (defaults in `assets/default-params.json`) store changing parameters for each workspace. Parameters are loaded via the page_setup function at the start of each page. To track a widget variable via parameters simply give them a key and add a matching entry in the default parameters file. Initialize a widget value from the params dictionary. - -```python -params = page_setup() - -st.number_input(label="x dimension", min_value=1, max_value=20, -value=params["example-y-dimension"], step=1, key="example-y-dimension") - -save_params() -``` - -## Code structure - -- **Pages** must be placed in the `pages` directory. -- It is recommended to use a separate file for defining functions per page in the `src` directory. -- The `src/common.py` file contains a set of useful functions for common use (e.g. rendering a table with download button). - -## Modify the template to build your own app - -1. In `src/common.py`, update the name of your app and the repository name - ```python - APP_NAME = "OpenMS Streamlit App" - REPOSITORY_NAME = "streamlit-template" - ``` -2. In `clean-up-workspaces.py`, update the name of the workspaces directory to `/workspaces-` - ```python - workspaces_directory = Path("/workspaces-streamlit-template") - ``` -3. Update `README.md` accordingly - - -**Dockerfile-related** -1. Choose one of the Dockerfiles depending on your use case: - - `Dockerfile` builds OpenMS including TOPP tools - - `Dockerfile_simple` uses pyOpenMS only -2. Update the Dockerfile: - - with the `GITHUB_USER` owning the Streamlit app repository - - with the `GITHUB_REPO` name of the Streamlit app repository - - if your main page Python file is not called `app.py`, modify the following line - ```dockerfile - RUN echo "mamba run --no-capture-output -n streamlit-env streamlit run app.py" >> /app/entrypoint.sh - ``` -3. Update Python package dependency files: - - `requirements.txt` if using `Dockerfile_simple` - - `environment.yml` if using `Dockerfile` - -## How to build a workflow - -### Simple workflow using pyOpenMS - -Take a look at the example pages `Simple Workflow` or `Workflow with mzML files` for examples (on the *sidebar*). Put Streamlit logic inside the pages and call the functions with workflow logic from from the `src` directory (for our examples `src/simple_workflow.py` and `src/mzmlfileworkflow.py`). - -### Complex workflow using TOPP tools - -This template app features a module in `src/workflow` that allows for complex and long workflows to be built very efficiently. Check out the `TOPP Workflow Framework` page for more information (on the *sidebar*). -""" - ) + with open(Path("docs", "build_app.md"), "r", encoding="utf-8") as f: + content = f.read() + st.markdown(content) ############################################################################################# # TOPP Workflow Framework ############################################################################################# if page == pages[3]: - wf = Workflow() - - st.title("TOPP Workflow Framework Documentation") - - st.markdown( - """ -## Features - -- streamlined methods for uploading files, setting parameters, and executing workflows -- automatic parameter handling -- quickly build parameter interface for TOPP tools with all parameters from *ini* files -- automatically create a log file for each workflow run with stdout and stderr -- workflow output updates automatically in short intervalls -- user can leave the app and return to the running workflow at any time -- quickly build a workflow with multiple steps channelling files between steps -""" - ) - - st.markdown( - """ -## Quickstart - -This repository contains a module in `src/workflow` that provides a framework for building and running analysis workflows. - -The `WorkflowManager` class provides the core workflow logic. It uses the `Logger`, `FileManager`, `ParameterManager`, and `CommandExecutor` classes to setup a complete workflow logic. - -To build your own workflow edit the file `src/TOPPWorkflow.py`. Use any streamlit components such as tabs (as shown in example), columns, or even expanders to organize the helper functions for displaying file upload and parameter widgets. - -> 💡 Simply set a name for the workflow and overwrite the **`upload`**, **`configure`**, **`execution`** and **`results`** methods in your **`Workflow`** class. - -The file `content/6_TOPP-Workflow.py` displays the workflow content and can, but does not have to be modified. - -The `Workflow` class contains four important members, which you can use to build your own workflow: - -> **`self.params`:** dictionary of parameters stored in a JSON file in the workflow directory. Parameter handling is done automatically. Default values are defined in input widgets and non-default values are stored in the JSON file. - -> **`self.ui`:** object of type `StreamlitUI` contains helper functions for building the parameter and file upload widgets. - -> **`self.executor`:** object of type `CommandExecutor` can be used to run any command line tool alone or in parallel and includes a convenient method for running TOPP tools. - -> **`self.logger`:** object of type `Logger` to write any output to a log file during workflow execution. - -> **`self.file_manager`:** object of type `FileManager` to handle file types and creation of output directories. -""" - ) - - with st.expander("**Complete example for custom Workflow class**", expanded=False): - st.code(getsource(Workflow)) - - st.markdown( - """ -## File Upload - -All input files for the workflow will be stored within the workflow directory in the subdirectory `input-files` within it's own subdirectory for the file type. - -The subdirectory name will be determined by a **key** that is defined in the `self.ui.upload_widget` method. The uploaded files are available by the specific key for parameter input widgets and accessible while building the workflow. - -Calling this method will create a complete file upload widget section with the following components: - -- file uploader -- list of currently uploaded files with this key (or a warning if there are none) -- button to delete all files - -Fallback files(s) can be specified, which will be used if the user doesn't upload any files. This can be useful for example for database files where a default is provided. -""" - ) - - st.code(getsource(Workflow.upload)) - - st.info( - "💡 Use the same **key** for parameter widgets, to select which of the uploaded files to use for analysis." - ) - - with st.expander("**Code documentation:**", expanded=True): - st.help(StreamlitUI.upload_widget) - - st.markdown( - """ -## Parameter Input - -The paramter section is already pre-defined as a form with buttons to **save parameters** and **load defaults** and a toggle to show TOPP tool parameters marked as advanced. - -Generating parameter input widgets is done with the `self.ui.input` method for any parameter and the `self.ui.input_TOPP` method for TOPP tools. - -**1. Choose `self.ui.input_widget` for any paramter not-related to a TOPP tool or `self.ui.select_input_file` for any input file:** - -It takes the obligatory **key** parameter. The key is used to access the parameter value in the workflow parameters dictionary `self.params`. Default values do not need to be specified in a separate file. Instead they are determined from the widgets default value automatically. Widget types can be specified or automatically determined from **default** and **options** parameters. It's suggested to add a **help** text and other parameters for numerical input. - -Make sure to match the **key** of the upload widget when calling `self.ui.input_TOPP`. - -**2. Choose `self.ui.input_TOPP` to automatically generate complete input sections for a TOPP tool:** - -It takes the obligatory **topp_tool_name** parameter and generates input widgets for each parameter present in the **ini** file (automatically created) except for input and output file parameters. For all input file parameters a widget needs to be created with `self.ui.select_input_file` with an appropriate **key**. For TOPP tool parameters only non-default values are stored. - -**3. Choose `self.ui.input_python` to automatically generate complete input sections for a custom Python tool:** - -Takes the obligatory **script_file** argument. The default location for the Python script files is in `src/python-tools` (in this case the `.py` file extension is optional in the **script_file** argument), however, any other path can be specified as well. Parameters need to be specified in the Python script in the **DEFAULTS** variable with the mandatory **key** and **value** parameters. -""" - ) - - with st.expander( - "Options to use as dictionary keys for parameter definitions (see `src/python-tools/example.py` for an example)" - ): - st.markdown( - """ -**Mandatory** keys for each parameter -- *key:* a unique identifier -- *value:* the default value - -**Optional** keys for each parameter -- *name:* the name of the parameter -- *hide:* don't show the parameter in the parameter section (e.g. for **input/output files**) -- *options:* a list of valid options for the parameter -- *min:* the minimum value for the parameter (int and float) -- *max:* the maximum value for the parameter (int and float) -- *step_size:* the step size for the parameter (int and float) -- *help:* a description of the parameter -- *widget_type:* the type of widget to use for the parameter (default: auto) -- *advanced:* whether or not the parameter is advanced (default: False) -""" - ) - - st.code(getsource(Workflow.configure)) - st.info( - "💡 Access parameter widget values by their **key** in the `self.params` object, e.g. `self.params['mzML-files']` will give all selected mzML files." - ) - - with st.expander("**Code documentation**", expanded=True): - st.help(StreamlitUI.input_widget) - st.help(StreamlitUI.select_input_file) - st.help(StreamlitUI.input_TOPP) - st.help(StreamlitUI.input_python) - st.markdown( - """ -## Building the Workflow - -Building the workflow involves **calling all (TOPP) tools** using **`self.executor`** with **input and output files** based on the **`FileManager`** class. For TOPP tools non-input-output parameters are handled automatically. Parameters for other processes and workflow logic can be accessed via widget keys (set in the parameter section) in the **`self.params`** dictionary. - -### FileManager - -The `FileManager` class serves as an interface for unified input and output files with useful functionality specific to building workflows, such as **setting a (new) file type** and **subdirectory in the workflows result directory**. - -Use the **`get_files`** method to get a list of all file paths as strings. - -Optionally set the following parameters modify the files: - -- **set_file_type** (str): set new file types and result subdirectory. -- **set_results_dir** (str): set a new subdirectory in the workflows result directory. -- **collect** (bool): collect all files into a single list. Will return a list with a single entry, which is a list of all files. Useful to pass to tools which can handle multiple input files at once. -""" - ) - - st.code( - """ -# Get all file paths as strings from self.param entry. -mzML_files = self.file_manager.get_files(self.params["mzML-files]) -# mzML_files = ['../workspaces-streamlit-template/default/topp-workflow/input-files/mzML-files/Control.mzML', '../workspaces-streamlit-template/default/topp-workflow/input-files/mzML-files/Treatment.mzML'] - -# Creating output files for a TOPP tool, setting a new file type and result subdirectory name. -feature_detection_out = self.file_manager.get_files(mzML_files, set_file_type="featureXML", set_results_dir="feature-detection") -# feature_detection_out = ['../workspaces-streamlit-template/default/topp-workflow/results/feature-detection/Control.featureXML', '../workspaces-streamlit-template/default/topp-workflow/results/feature-detection/Treatment.featureXML'] - -# Setting a name for the output directory automatically (useful if you never plan to access these files in the results section). -feature_detection_out = self.file_manager.get_files(mzML_files, set_file_type="featureXML", set_results_dir="auto") -# feature_detection_out = ['../workspaces-streamlit-template/default/topp-workflow/results/6DUd/Control.featureXML', '../workspaces-streamlit-template/default/topp-workflow/results/6DUd/Treatment.featureXML'] - -# Combining all mzML files to be passed to a TOPP tool in a single run. Using "collected" files as argument for self.file_manager.get_files will "un-collect" them. -mzML_files = self.file_manager.get_files(mzML_files, collect=True) -# mzML_files = [['../workspaces-streamlit-template/default/topp-workflow/input-files/mzML-files/Control.mzML', '../workspaces-streamlit-template/default/topp-workflow/input-files/mzML-files/Treatment.mzML']] - """ - ) - - with st.expander("**Code documentation**", expanded=True): - st.help(FileManager.get_files) - - st.markdown( - """ -### Running commands - -It is possible to execute any command line command using the **`self.executor`** object, either a single command or a list of commands in parallel. Furthermore a method to run TOPP tools is included. - -**1. Single command** - -The `self.executor.run_command` method takes a single command as input and optionally logs stdout and stderr to the workflow log (default True). -""" - ) - - st.code( - """ -self.executor.run_command(["command", "arg1", "arg2", ...]) -""" - ) - - st.markdown( - """ -**2. Run multiple commands in parallel** - -The `self.executor.run_multiple_commands` method takes a list of commands as inputs. - -**3. Run TOPP tools** - -The `self.executor.run_topp` method takes a TOPP tool name as input and a dictionary of input and output files as input. The **keys** need to match the actual input and output parameter names of the TOPP tool. The **values** should be of type `FileManager`. All other **non-default parameters (from input widgets)** will be passed to the TOPP tool automatically. - -Depending on the number of input files, the TOPP tool will be run either in parallel or in a single run (using **`FileManager.collect`**). -""" - ) - - st.info( - """💡 **Input and output file order** - -In many tools, a single input file is processed to produce a single output file. -When dealing with lists of input or output files, the convention is that -files are paired based on their order. For instance, the n-th input file is -assumed to correspond to the n-th output file, maintaining a structured -relationship between input and output data. -""" - ) - st.code( - """ -# e.g. FeatureFinderMetabo takes single input files -in_files = self.file_manager.get_files(["sample1.mzML", "sample2.mzML"]) -out_files = self.file_manager.get_files(in_files, set_file_type="featureXML", set_results_dir="feature-detection") - -# Run FeatureFinderMetabo tool with input and output files in parallel for each pair of input/output files. -self.executor.run_topp("FeatureFinderMetabo", input_output={"in": in_files, "out": out_files}) -# FeaturFinderMetabo -in sample1.mzML -out workspace-dir/results/feature-detection/sample1.featureXML -# FeaturFinderMetabo -in sample2.mzML -out workspace-dir/results/feature-detection/sample2.featureXML - -# Run SiriusExport tool with mutliple input and output files. -out = self.file_manager.get_files("sirius.ms", set_results_dir="sirius-export") -self.executor.run_topp("SiriusExport", {"in": self.file_manager.get_files(in_files, collect=True), - "in_featureinfo": self.file_manager.get_files(out_files, collect=True), - "out": out_se}) -# SiriusExport -in sample1.mzML sample2.mzML -in_featureinfo sample1.featureXML sample2.featureXML -out sirius.ms - """ - ) - - st.markdown( - """ -**4. Run custom Python scripts** - -Sometimes it is useful to run custom Python scripts, for example for extra functionality which is not included in a TOPP tool. - -`self.executor.run_python` works similar to `self.executor.run_topp`, but takes a single Python script as input instead of a TOPP tool name. The default location for the Python script files is in `src/python-tools` (in this case the `.py` file extension is optional in the **script_file** argument), however, any other path can be specified as well. Input and output file parameters need to be specified in the **input_output** dictionary. -""" - ) - - st.code( - """ -# e.g. example Python tool which modifies mzML files in place based on experimental design -self.ui.input_python(script_file="example", input_output={"in": in_mzML, "in_experimantal_design": FileManager(["path/to/experimantal-design.tsv"])}) - """ - ) - - st.markdown("**Example for a complete workflow section:**") - - st.code(getsource(Workflow.execution)) - - with st.expander("**Code documentation**", expanded=True): - st.help(CommandExecutor.run_command) - st.help(CommandExecutor.run_multiple_commands) - st.help(CommandExecutor.run_topp) - st.help(CommandExecutor.run_python) + topp_framework_content() ############################################################################################# # Windows Executables ############################################################################################# if page == pages[4]: - # Define CSS styles - css = """ - -""" - - st.markdown(css, unsafe_allow_html=True) - st.markdown( """ -# 💻 How to package everything for Windows executables +## 💻 How to package everything for Windows executables This guide explains how to package OpenMS apps into Windows executables using two different methods: """ ) - - def fetch_markdown_content(url): - response = requests.get(url) - if response.status_code == 200: - # Remove the first line from the content - content_lines = response.text.split("\n") - markdown_content = "\n".join(content_lines[1:]) - return markdown_content - else: - return None - - - tabs = ["embeddable Python", "PyInstaller"] + tabs = ["**embeddable Python**", "**PyInstaller**"] tabs = st.tabs(tabs) # window executable with embeddable python with tabs[0]: - markdown_url = "https://raw.githubusercontent.com/OpenMS/streamlit-template/main/win_exe_with_embed_py.md" - - markdown_content = fetch_markdown_content(markdown_url) - - if markdown_content: - st.markdown(markdown_content, unsafe_allow_html=True) - else: - st.error( - "Failed to fetch Markdown content from the specified URL.", markdown_url - ) + with open(Path("docs", "win_exe_with_embed_py.md"), "r", encoding="utf-8") as f: + content = f.read() + st.markdown(content) # window executable with pyinstaller with tabs[1]: - # URL of the Markdown document - markdown_url = "https://raw.githubusercontent.com/OpenMS/streamlit-template/main/win_exe_with_pyinstaller.md" - - markdown_content = fetch_markdown_content(markdown_url) - - if markdown_content: - st.markdown(markdown_content, unsafe_allow_html=True) - else: - st.error( - "Failed to fetch Markdown content from the specified URL. ", markdown_url - ) + with open(Path("docs", "win_exe_with_pyinstaller.md"), "r", encoding="utf-8") as f: + content = f.read() + st.markdown(content) ############################################################################################# # Deployment ############################################################################################# if page == pages[5]: - url = "https://raw.githubusercontent.com/OpenMS/streamlit-deployment/main/README.md" - - response = requests.get(url) - - if response.status_code == 200: - st.markdown(response.text) # or process the content as needed - else: - st.warning("Failed to get README from streamlit-deployment repository.") \ No newline at end of file + with open(Path("docs", "deployment.md"), "r", encoding="utf-8") as f: + content = f.read() + st.markdown(content) \ No newline at end of file diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..763624e --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1 @@ +__pycache__/* \ No newline at end of file diff --git a/docs/build_app.md b/docs/build_app.md new file mode 100644 index 0000000..4eaec43 --- /dev/null +++ b/docs/build_app.md @@ -0,0 +1,68 @@ +# Build your own app based on this template + +## App layout + +*Pages* can be navigated via the *sidebar*, which also contains the OpenMS logo, settings panel and a workspace indicator. + +## Key concepts + +- **Workspaces** +: Directories where all data is generated and uploaded can be stored as well as a workspace specific parameter file. +- **Run the app locally and online** +: Launching the app with the `local` argument lets the user create/remove workspaces. In the online the user gets a workspace with a specific ID. +- **Parameters** +: Parameters (defaults in `assets/default-params.json`) store changing parameters for each workspace. Parameters are loaded via the page_setup function at the start of each page. To track a widget variable via parameters simply give them a key and add a matching entry in the default parameters file. Initialize a widget value from the params dictionary. + +```python +params = page_setup() + +st.number_input(label="x dimension", min_value=1, max_value=20, +value=params["example-y-dimension"], step=1, key="example-y-dimension") + +save_params() +``` + +## Code structure +- The main file `app.py` defines page layout. +- **Pages** must be placed in the `content` directory. +- It is recommended to use a separate file for defining functions per page in the `src` directory. +- The `src/common.py` file contains a set of useful functions for common use (e.g. rendering a table with download button). + +## Modify the template to build your own app + +1. In `src/common.py`, update the name of your app and the repository name + ```python + APP_NAME = "OpenMS Streamlit App" + REPOSITORY_NAME = "streamlit-template" + ``` +2. In `clean-up-workspaces.py`, update the name of the workspaces directory to `/workspaces-` + ```python + workspaces_directory = Path("/workspaces-streamlit-template") + ``` +3. Update `README.md` accordingly + + +**Dockerfile-related** +1. Choose one of the Dockerfiles depending on your use case: + - `Dockerfile` builds OpenMS including TOPP tools + - `Dockerfile_simple` uses pyOpenMS only +2. Update the Dockerfile: + - with the `GITHUB_USER` owning the Streamlit app repository + - with the `GITHUB_REPO` name of the Streamlit app repository + - if your main page Python file is not called `app.py`, modify the following line + ```dockerfile + RUN echo "mamba run --no-capture-output -n streamlit-env streamlit run app.py" >> /app/entrypoint.sh + ``` +3. Update Python package dependency files: + - `requirements.txt` if using `Dockerfile_simple` + - `environment.yml` if using `Dockerfile` + +## How to build a workflow + +### Simple workflow using pyOpenMS + +Take a look at the example pages `Simple Workflow` or `Workflow with mzML files` for examples (on the *sidebar*). Put Streamlit logic inside the pages and call the functions with workflow logic from from the `src` directory (for our examples `src/simple_workflow.py` and `src/mzmlfileworkflow.py`). + +### Complex workflow using TOPP tools + +This template app features a module in `src/workflow` that allows for complex and long workflows to be built very efficiently. Check out the `TOPP Workflow Framework` page for more information (on the *sidebar*). \ No newline at end of file diff --git a/docs/deployment.md b/docs/deployment.md new file mode 100644 index 0000000..f768ae3 --- /dev/null +++ b/docs/deployment.md @@ -0,0 +1,82 @@ +# OpenMS streamlit app deployment + +Multiple streamlit apps based on the [OpenMS streamlit template](https://github.com/OpenMS/streamlit-template/) can be deployed together using docker compose. + +## Features + +- deploy all OpenMS apps at once +- user data (in workspaces) is stored in persistent docker volumes for each app + +## Requirements +- Docker Compose + +## Deployment (e.g., needed after one app changed) + +**1. Make sure submodules are up-to-data.** + +`git submodule init` + +`git submodule update` + +**2. Specify GitHub token (to download Windows executables).** + +> This is **important**! Ommitting this step while result in all apps not having the option to download exetutables any more. + +Create a temporary `.env` file with your Github token. It should contain only one line: + +`GITHUB_TOKEN=` + +**3. Run docker-compose.** + +`docker-compose up --build -d` + +> Make sure to remove the `.env` file with your Github token after successfull build + +## Add new app + +This will add your app as a submodule to the streamlit deployment repository. + +**1. Fork and clone the [OpenMS streamlit deployment](https://github.com/OpenMS/streamlit-deployment) repository locally.** + +**2. Add your app as submodule. Make sure the app name is not used already.** + +`git submodule add ` + +**3. Initialize and update submodules.** + +`git submodule init` + +`git submodule update` + +**4. Add your app to `docker-compose.yml` file as a new service.** + +Copy the last service as a template. + +Check and update the following entries: + +- name of the service + - the name of the submodule +- build context + - the relative path to the submodule +- build dockerfile + - the correct Dockerfile +- image + - name of the docker image (typically the service name with underscores) +- ports + - chose an incremental host port number from the last service pointing to the streamlit port in docker container (8501) +- volumes + - update the names of the workspace directories, user data is stored outside of the docker container in a docker volume +- command + - update command with your main streamlit file + +**6. Test everything works locally.** + +Run docker-compose to launch all services. + +`docker-compose up --build -d` + +- there should be no errors building all services +- make sure all apps are accessible via their port from localhost +- test functionality of your app + +**7. Make a pull request with your changes to OpenMS/streamlit-deployment main branch.** \ No newline at end of file diff --git a/docs/installation.md b/docs/installation.md new file mode 100644 index 0000000..41a5cca --- /dev/null +++ b/docs/installation.md @@ -0,0 +1,39 @@ +# Installation + +## Windows + +The app is available as pre-packaged Windows executable, including all dependencies. + +The windows executable is built by a GitHub action and can be downloaded [here](https://github.com/OpenMS/streamlit-template/actions/workflows/build-windows-executable-app.yaml). +Select the latest successfull run and download the zip file from the artifacts section, while signed in to GitHub. + +## Python + +Clone the [streamlit-template repository](https://github.com/OpenMS/streamlit-template). It includes files to install dependencies via pip or conda. + +### via pip in an existing Python environment + +To install all required depdencies via pip in an already existing Python environment, run the following command in the terminal: + +`pip install -r requirements.txt` + +### create new environment via conda/mamba + +Create and activate the conda environment: + +`conda env create -f environment.yml` + +`conda activate streamlit-env` + +### run the app + +Run the app via streamlit command in the terminal with or without *local* mode (default is *online* mode). Learn more about *local* and *online* mode in the documentation page 📖 **OpenMS Template App**. + +`streamlit run app.py [local]` + +## Docker + +This repository contains two Dockerfiles. + +1. `Dockerfile`: This Dockerfile builds all dependencies for the app including Python packages and the OpenMS TOPP tools. Recommended for more complex workflows where you want to use the OpenMS TOPP tools for instance with the **TOPP Workflow Framework**. +2. `Dockerfile_simple`: This Dockerfile builds only the Python packages. Recommended for simple apps using pyOpenMS only. diff --git a/docs/toppframework.py b/docs/toppframework.py new file mode 100644 index 0000000..1afa819 --- /dev/null +++ b/docs/toppframework.py @@ -0,0 +1,269 @@ +import streamlit as st +from src.Workflow import Workflow +from src.workflow.StreamlitUI import StreamlitUI +from src.workflow.FileManager import FileManager +from src.workflow.CommandExecutor import CommandExecutor +from inspect import getsource + +def content(): + st.title("TOPP Workflow Framework Documentation") + + st.markdown( + """ +## Features + +- streamlined methods for uploading files, setting parameters, and executing workflows +- automatic parameter handling +- quickly build parameter interface for TOPP tools with all parameters from *ini* files +- automatically create a log file for each workflow run with stdout and stderr +- workflow output updates automatically in short intervalls +- user can leave the app and return to the running workflow at any time +- quickly build a workflow with multiple steps channelling files between steps +""" + ) + + st.markdown( + """ +## Quickstart + +This repository contains a module in `src/workflow` that provides a framework for building and running analysis workflows. + +The `WorkflowManager` class provides the core workflow logic. It uses the `Logger`, `FileManager`, `ParameterManager`, and `CommandExecutor` classes to setup a complete workflow logic. + +To build your own workflow edit the file `src/TOPPWorkflow.py`. Use any streamlit components such as tabs (as shown in example), columns, or even expanders to organize the helper functions for displaying file upload and parameter widgets. + +> 💡 Simply set a name for the workflow and overwrite the **`upload`**, **`configure`**, **`execution`** and **`results`** methods in your **`Workflow`** class. + +The file `content/6_TOPP-Workflow.py` displays the workflow content and can, but does not have to be modified. + +The `Workflow` class contains four important members, which you can use to build your own workflow: + +> **`self.params`:** dictionary of parameters stored in a JSON file in the workflow directory. Parameter handling is done automatically. Default values are defined in input widgets and non-default values are stored in the JSON file. + +> **`self.ui`:** object of type `StreamlitUI` contains helper functions for building the parameter and file upload widgets. + +> **`self.executor`:** object of type `CommandExecutor` can be used to run any command line tool alone or in parallel and includes a convenient method for running TOPP tools. + +> **`self.logger`:** object of type `Logger` to write any output to a log file during workflow execution. + +> **`self.file_manager`:** object of type `FileManager` to handle file types and creation of output directories. +""" + ) + + with st.expander("**Complete example for custom Workflow class**", expanded=False): + st.code(getsource(Workflow)) + + st.markdown( + """ +## File Upload + +All input files for the workflow will be stored within the workflow directory in the subdirectory `input-files` within it's own subdirectory for the file type. + +The subdirectory name will be determined by a **key** that is defined in the `self.ui.upload_widget` method. The uploaded files are available by the specific key for parameter input widgets and accessible while building the workflow. + +Calling this method will create a complete file upload widget section with the following components: + +- file uploader +- list of currently uploaded files with this key (or a warning if there are none) +- button to delete all files + +Fallback files(s) can be specified, which will be used if the user doesn't upload any files. This can be useful for example for database files where a default is provided. +""" + ) + + st.code(getsource(Workflow.upload)) + + st.info( + "💡 Use the same **key** for parameter widgets, to select which of the uploaded files to use for analysis." + ) + + with st.expander("**Code documentation:**", expanded=True): + st.help(StreamlitUI.upload_widget) + + st.markdown( + """ +## Parameter Input + +The paramter section is already pre-defined as a form with buttons to **save parameters** and **load defaults** and a toggle to show TOPP tool parameters marked as advanced. + +Generating parameter input widgets is done with the `self.ui.input` method for any parameter and the `self.ui.input_TOPP` method for TOPP tools. + +**1. Choose `self.ui.input_widget` for any paramter not-related to a TOPP tool or `self.ui.select_input_file` for any input file:** + +It takes the obligatory **key** parameter. The key is used to access the parameter value in the workflow parameters dictionary `self.params`. Default values do not need to be specified in a separate file. Instead they are determined from the widgets default value automatically. Widget types can be specified or automatically determined from **default** and **options** parameters. It's suggested to add a **help** text and other parameters for numerical input. + +Make sure to match the **key** of the upload widget when calling `self.ui.input_TOPP`. + +**2. Choose `self.ui.input_TOPP` to automatically generate complete input sections for a TOPP tool:** + +It takes the obligatory **topp_tool_name** parameter and generates input widgets for each parameter present in the **ini** file (automatically created) except for input and output file parameters. For all input file parameters a widget needs to be created with `self.ui.select_input_file` with an appropriate **key**. For TOPP tool parameters only non-default values are stored. + +**3. Choose `self.ui.input_python` to automatically generate complete input sections for a custom Python tool:** + +Takes the obligatory **script_file** argument. The default location for the Python script files is in `src/python-tools` (in this case the `.py` file extension is optional in the **script_file** argument), however, any other path can be specified as well. Parameters need to be specified in the Python script in the **DEFAULTS** variable with the mandatory **key** and **value** parameters. +""" + ) + + with st.expander( + "Options to use as dictionary keys for parameter definitions (see `src/python-tools/example.py` for an example)" + ): + st.markdown( + """ +**Mandatory** keys for each parameter +- *key:* a unique identifier +- *value:* the default value + +**Optional** keys for each parameter +- *name:* the name of the parameter +- *hide:* don't show the parameter in the parameter section (e.g. for **input/output files**) +- *options:* a list of valid options for the parameter +- *min:* the minimum value for the parameter (int and float) +- *max:* the maximum value for the parameter (int and float) +- *step_size:* the step size for the parameter (int and float) +- *help:* a description of the parameter +- *widget_type:* the type of widget to use for the parameter (default: auto) +- *advanced:* whether or not the parameter is advanced (default: False) +""" + ) + + st.code(getsource(Workflow.configure)) + st.info( + "💡 Access parameter widget values by their **key** in the `self.params` object, e.g. `self.params['mzML-files']` will give all selected mzML files." + ) + + with st.expander("**Code documentation**", expanded=True): + st.help(StreamlitUI.input_widget) + st.help(StreamlitUI.select_input_file) + st.help(StreamlitUI.input_TOPP) + st.help(StreamlitUI.input_python) + st.markdown( + """ +## Building the Workflow + +Building the workflow involves **calling all (TOPP) tools** using **`self.executor`** with **input and output files** based on the **`FileManager`** class. For TOPP tools non-input-output parameters are handled automatically. Parameters for other processes and workflow logic can be accessed via widget keys (set in the parameter section) in the **`self.params`** dictionary. + +### FileManager + +The `FileManager` class serves as an interface for unified input and output files with useful functionality specific to building workflows, such as **setting a (new) file type** and **subdirectory in the workflows result directory**. + +Use the **`get_files`** method to get a list of all file paths as strings. + +Optionally set the following parameters modify the files: + +- **set_file_type** (str): set new file types and result subdirectory. +- **set_results_dir** (str): set a new subdirectory in the workflows result directory. +- **collect** (bool): collect all files into a single list. Will return a list with a single entry, which is a list of all files. Useful to pass to tools which can handle multiple input files at once. +""" + ) + + st.code( + """ +# Get all file paths as strings from self.param entry. +mzML_files = self.file_manager.get_files(self.params["mzML-files]) +# mzML_files = ['../workspaces-streamlit-template/default/topp-workflow/input-files/mzML-files/Control.mzML', '../workspaces-streamlit-template/default/topp-workflow/input-files/mzML-files/Treatment.mzML'] + +# Creating output files for a TOPP tool, setting a new file type and result subdirectory name. +feature_detection_out = self.file_manager.get_files(mzML_files, set_file_type="featureXML", set_results_dir="feature-detection") +# feature_detection_out = ['../workspaces-streamlit-template/default/topp-workflow/results/feature-detection/Control.featureXML', '../workspaces-streamlit-template/default/topp-workflow/results/feature-detection/Treatment.featureXML'] + +# Setting a name for the output directory automatically (useful if you never plan to access these files in the results section). +feature_detection_out = self.file_manager.get_files(mzML_files, set_file_type="featureXML", set_results_dir="auto") +# feature_detection_out = ['../workspaces-streamlit-template/default/topp-workflow/results/6DUd/Control.featureXML', '../workspaces-streamlit-template/default/topp-workflow/results/6DUd/Treatment.featureXML'] + +# Combining all mzML files to be passed to a TOPP tool in a single run. Using "collected" files as argument for self.file_manager.get_files will "un-collect" them. +mzML_files = self.file_manager.get_files(mzML_files, collect=True) +# mzML_files = [['../workspaces-streamlit-template/default/topp-workflow/input-files/mzML-files/Control.mzML', '../workspaces-streamlit-template/default/topp-workflow/input-files/mzML-files/Treatment.mzML']] + """ + ) + + with st.expander("**Code documentation**", expanded=True): + st.help(FileManager.get_files) + + st.markdown( + """ +### Running commands + +It is possible to execute any command line command using the **`self.executor`** object, either a single command or a list of commands in parallel. Furthermore a method to run TOPP tools is included. + +**1. Single command** + +The `self.executor.run_command` method takes a single command as input and optionally logs stdout and stderr to the workflow log (default True). +""" + ) + + st.code( + """ +self.executor.run_command(["command", "arg1", "arg2", ...]) +""" + ) + + st.markdown( + """ +**2. Run multiple commands in parallel** + +The `self.executor.run_multiple_commands` method takes a list of commands as inputs. + +**3. Run TOPP tools** + +The `self.executor.run_topp` method takes a TOPP tool name as input and a dictionary of input and output files as input. The **keys** need to match the actual input and output parameter names of the TOPP tool. The **values** should be of type `FileManager`. All other **non-default parameters (from input widgets)** will be passed to the TOPP tool automatically. + +Depending on the number of input files, the TOPP tool will be run either in parallel or in a single run (using **`FileManager.collect`**). +""" + ) + + st.info( + """💡 **Input and output file order** + +In many tools, a single input file is processed to produce a single output file. +When dealing with lists of input or output files, the convention is that +files are paired based on their order. For instance, the n-th input file is +assumed to correspond to the n-th output file, maintaining a structured +relationship between input and output data. +""" + ) + st.code( + """ +# e.g. FeatureFinderMetabo takes single input files +in_files = self.file_manager.get_files(["sample1.mzML", "sample2.mzML"]) +out_files = self.file_manager.get_files(in_files, set_file_type="featureXML", set_results_dir="feature-detection") + +# Run FeatureFinderMetabo tool with input and output files in parallel for each pair of input/output files. +self.executor.run_topp("FeatureFinderMetabo", input_output={"in": in_files, "out": out_files}) +# FeaturFinderMetabo -in sample1.mzML -out workspace-dir/results/feature-detection/sample1.featureXML +# FeaturFinderMetabo -in sample2.mzML -out workspace-dir/results/feature-detection/sample2.featureXML + +# Run SiriusExport tool with mutliple input and output files. +out = self.file_manager.get_files("sirius.ms", set_results_dir="sirius-export") +self.executor.run_topp("SiriusExport", {"in": self.file_manager.get_files(in_files, collect=True), + "in_featureinfo": self.file_manager.get_files(out_files, collect=True), + "out": out_se}) +# SiriusExport -in sample1.mzML sample2.mzML -in_featureinfo sample1.featureXML sample2.featureXML -out sirius.ms + """ + ) + + st.markdown( + """ +**4. Run custom Python scripts** + +Sometimes it is useful to run custom Python scripts, for example for extra functionality which is not included in a TOPP tool. + +`self.executor.run_python` works similar to `self.executor.run_topp`, but takes a single Python script as input instead of a TOPP tool name. The default location for the Python script files is in `src/python-tools` (in this case the `.py` file extension is optional in the **script_file** argument), however, any other path can be specified as well. Input and output file parameters need to be specified in the **input_output** dictionary. +""" + ) + + st.code( + """ +# e.g. example Python tool which modifies mzML files in place based on experimental design +self.ui.input_python(script_file="example", input_output={"in": in_mzML, "in_experimantal_design": FileManager(["path/to/experimantal-design.tsv"])}) + """ + ) + + st.markdown("**Example for a complete workflow section:**") + + st.code(getsource(Workflow.execution)) + + with st.expander("**Code documentation**", expanded=True): + st.help(CommandExecutor.run_command) + st.help(CommandExecutor.run_multiple_commands) + st.help(CommandExecutor.run_topp) + st.help(CommandExecutor.run_python) \ No newline at end of file diff --git a/docs/user_guide.md b/docs/user_guide.md new file mode 100644 index 0000000..c44d33b --- /dev/null +++ b/docs/user_guide.md @@ -0,0 +1,44 @@ +# User Guide + +Welcome to the OpenMS Streamlit Web Application! This guide will help you understand how to use our tools effectively. + +## Advantages of OpenMS Web Apps + +OpenMS web applications provide a user-friendly interface for accessing the powerful features of OpenMS. Here are a few advantages: +- **Accessibility**: Access powerful OpenMS algorithms and TOPP tools from any device with a web browser. +- **Ease of Use**: Simplified user interface makes it easy for both beginners and experts to perform complex analyses. +- **No Installation Required**: Use the tools without the need to install OpenMS locally, saving time and system resources. + +## Workspaces + +In the OpenMS web application, workspaces are designed to keep your analysis organized: +- **Workspace Specific Parameters and Files**: Each workspace stores parameters and files (uploaded input files and results from workflows). +- **Persistence**: Your workspaces and parameters are saved, so you can return to your analysis anytime and pick up where you left off. + +## Online and Local Mode Differences + +There are a few key differences between operating in online and local modes: +- **File Uploads**: + - *Online Mode*: You can upload only one file at a time. This helps manage server load and optimizes performance. + - *Local Mode*: Multiple file uploads are supported, giving you flexibility when working with large datasets. +- **Workspace Access**: + - In online mode, workspaces are stored temporarily and will be cleared after seven days of inactivity. + - In local mode, workspaces are saved on your local machine, allowing for persistent storage. + +## Downloading Results + +You can download the results of your analyses, including data, figures and tables, directly from the application: +- **Figures**: Click the camera icon button, appearing while hovering on the top right corner of the figure. Set the desired image format in the settings panel in the side bar. +- **Tables**: Use the download button to save tables in *csv* format, appearing while hovering on the top right corner of the table. +- **Data**: Use the download section in the sidebar to download the raw results of your analysis. + +## Getting Started + +To get started: +1. Select or create a new workspace. +2. Upload your data file. +3. Set the necessary parameters for your analysis. +4. Run the analysis. +5. View and download your results. + +For more detailed information on each step, refer to the specific sections of this guide. \ No newline at end of file diff --git a/win_exe_with_embed_py.md b/docs/win_exe_with_embed_py.md similarity index 95% rename from win_exe_with_embed_py.md rename to docs/win_exe_with_embed_py.md index b7c7932..fb799f9 100644 --- a/win_exe_with_embed_py.md +++ b/docs/win_exe_with_embed_py.md @@ -100,7 +100,7 @@ Install all required packages from `requirements.txt`: cp app.py ../streamlit_exe ``` -#### 🚀 After successfully completing all these steps, the Streamlit app will be available by running the run_app.bat file. +#### 🚀 After successfully completing all these steps, the Streamlit app will be available by running the run_app.bat file. :pencil: You can still change the configuration of Streamlit app with .streamlit/config.toml file, e.g., provide a different port, change upload size, etc. diff --git a/win_exe_with_pyinstaller.md b/docs/win_exe_with_pyinstaller.md similarity index 79% rename from win_exe_with_pyinstaller.md rename to docs/win_exe_with_pyinstaller.md index e66eab0..5082c3b 100644 --- a/win_exe_with_pyinstaller.md +++ b/docs/win_exe_with_pyinstaller.md @@ -1,11 +1,11 @@ ## 💻 Create a window executable of streamlit app with pyinstaller :heavy_check_mark: -Tested with streamlit v1.29.0, python v3.11.4
+Tested with streamlit v1.29.0, python v3.11.4 -:warning: Support until streamlit version `1.29.0`
+:warning: Support until streamlit version `1.29.0` :point_right: For higher version, try streamlit app with embeddable python #TODO add link -To create an executable for Streamlit app on Windows, we'll use an pyinstaller.
+To create an executable for Streamlit app on Windows, we'll use an pyinstaller. Here's a step-by-step guide: ### virtual environment @@ -26,7 +26,7 @@ pip install pyinstaller ### streamlit files -create a run_app.py and add this lines of codes
+create a run_app.py and add this lines of codes ``` from streamlit.web import cli @@ -40,12 +40,14 @@ if __name__=='__main__': ### write function in cli.py -Now, navigate to the inside streamlit environment
-here you go
+Now, navigate to the inside streamlit environment + +here you go + ``` \Lib\site-packages\streamlit\web\cli.py ``` -for using our virtual environment, add this magic function to cli.py file:
+for using our virtual environment, add this magic function to cli.py file: ``` #can be modify name as given in run_app.py #use underscore at beginning @@ -55,9 +57,9 @@ def _main_run_clExplicit(file, command_line, args=[], flag_options=[]): ``` ### Hook folder -Now, need to hook to get streamlit metadata
-organized as folder, where the pycache infos will save
-like: \hooks\hook-streamlit.py
+Now, need to hook to get streamlit metadata +organized as folder, where the pycache infos will save +like: \hooks\hook-streamlit.py ``` from PyInstaller.utils.hooks import copy_metadata @@ -80,9 +82,9 @@ pyinstaller --onefile --additional-hooks-dir ./hooks run_app.py --clean ``` ### streamlit config -To access streamlit config create file in root
-(or just can be in output folder)
-.streamlit\config.toml
+To access streamlit config create file in root +(or just can be in output folder) +.streamlit\config.toml ``` # content of .streamlit\config.toml @@ -105,7 +107,8 @@ cp app.py dist/ ### add datas in run_app.spec (.spec file) -Add DATAS to the run_app.spec just created by compilation
+Add DATAS to the run_app.spec just created by compilation + ``` datas=[ ("myenv/Lib/site-packages/altair/vegalite/v4/schema/vega-lite-schema.json","./altair/vegalite/v4/schema/"), @@ -117,11 +120,11 @@ datas=[ ] ``` ### run final step to make executable -All the modifications in datas should be loaded with
+All the modifications in datas should be loaded with ``` pyinstaller run_app.spec --clean ``` -#### 🚀 After successfully completing all these steps, the Windows executable will be available in the dist folder. +#### 🚀 After successfully completing all these steps, the Windows executable will be available in the dist folder. :pencil: you can still change the configuration of streamlit app with .streamlit/config.toml file e-g provide different port, change upload size etc @@ -129,4 +132,3 @@ pyinstaller run_app.spec --clean ## Build executable in github action automatically Automate the process of building executables for your project with the GitHub action example [Test streamlit executable for Windows with pyinstaller](https://github.com/OpenMS/streamlit-template/blob/main/.github/workflows/test-win-exe-w-pyinstaller.yaml) -
From 3fb359fd344ab07564019d1ad7d47aad9b4a5571 Mon Sep 17 00:00:00 2001 From: axelwalter Date: Wed, 31 Jul 2024 12:54:13 +0200 Subject: [PATCH 027/168] fix pages dir name in Docker and actions --- .../build-windows-executable-app-with-pyinstaller.yaml | 2 +- .github/workflows/test-win-exe-w-embed-py.yaml | 2 +- .github/workflows/test-win-exe-w-pyinstaller.yaml | 2 +- Dockerfile | 2 +- Dockerfile_simple | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-windows-executable-app-with-pyinstaller.yaml b/.github/workflows/build-windows-executable-app-with-pyinstaller.yaml index b956775..6b31993 100644 --- a/.github/workflows/build-windows-executable-app-with-pyinstaller.yaml +++ b/.github/workflows/build-windows-executable-app-with-pyinstaller.yaml @@ -217,7 +217,7 @@ jobs: - name: Copy everything to dist directory run: | cp -r .streamlit dist/.streamlit - cp -r pages dist/pages + cp -r content dist/content cp -r src dist/src cp -r assets dist/assets cp -r example-data dist/example-data diff --git a/.github/workflows/test-win-exe-w-embed-py.yaml b/.github/workflows/test-win-exe-w-embed-py.yaml index a25592b..040d2af 100644 --- a/.github/workflows/test-win-exe-w-embed-py.yaml +++ b/.github/workflows/test-win-exe-w-embed-py.yaml @@ -48,7 +48,7 @@ jobs: mv python-${{ env.PYTHON_VERSION }} streamlit_exe mv run_app.bat streamlit_exe cp -r src streamlit_exe - cp -r pages streamlit_exe + cp -r content streamlit_exe cp -r assets streamlit_exe cp -r example-data streamlit_exe cp -r .streamlit streamlit_exe diff --git a/.github/workflows/test-win-exe-w-pyinstaller.yaml b/.github/workflows/test-win-exe-w-pyinstaller.yaml index d40ca67..ed9ed18 100644 --- a/.github/workflows/test-win-exe-w-pyinstaller.yaml +++ b/.github/workflows/test-win-exe-w-pyinstaller.yaml @@ -70,7 +70,7 @@ jobs: shell: bash run: | cp -r .streamlit dist/.streamlit - cp -r pages dist/pages + cp -r content dist/content cp -r src dist/src cp -r example-data dist/example-data cp -r assets dist/assets diff --git a/Dockerfile b/Dockerfile index 54a5e3b..f533a44 100644 --- a/Dockerfile +++ b/Dockerfile @@ -113,7 +113,7 @@ COPY app.py /app/app.py COPY src/ /app/src COPY assets/ /app/assets COPY example-data/ /app/example-data -COPY content/ /app/pages +COPY content/ /app/content # For streamlit configuration COPY .streamlit/config.toml /app/.streamlit/config.toml COPY clean-up-workspaces.py /app/clean-up-workspaces.py diff --git a/Dockerfile_simple b/Dockerfile_simple index 59c456c..31e3136 100644 --- a/Dockerfile_simple +++ b/Dockerfile_simple @@ -57,7 +57,7 @@ COPY app.py /app/app.py COPY src/ /app/src COPY assets/ /app/assets COPY example-data/ /app/example-data -COPY content/ /app/pages +COPY content/ /app/content # For streamlit configuration COPY .streamlit/config.toml /app/.streamlit/config.toml From 365b5767bd6ef6142ff2033c7fde81a73ca6132c Mon Sep 17 00:00:00 2001 From: axelwalter Date: Wed, 31 Jul 2024 16:02:37 +0200 Subject: [PATCH 028/168] Update environment.yml --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 5ec4ef0..19d337a 100644 --- a/environment.yml +++ b/environment.yml @@ -10,5 +10,5 @@ dependencies: - mono==6.12.0.90 - pip: # dependencies only available through pip # streamlit dependencies - - streamlit==1.36.0 + - streamlit==1.37.0 - captcha==0.5.0 From 03b4e1e08d2038df9b750c31663e5f57598c85e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= Date: Mon, 5 Aug 2024 16:42:35 +0200 Subject: [PATCH 029/168] fix streamlit live logging. --- src/workflow/WorkflowManager.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/workflow/WorkflowManager.py b/src/workflow/WorkflowManager.py index 13af2fa..adab522 100644 --- a/src/workflow/WorkflowManager.py +++ b/src/workflow/WorkflowManager.py @@ -5,7 +5,9 @@ from .StreamlitUI import StreamlitUI from .FileManager import FileManager import multiprocessing +import streamlit as st import shutil +import time class WorkflowManager: # Core workflow logic using the above classes @@ -32,6 +34,8 @@ def start_workflow(self) -> None: # Add workflow process id to pid dir self.executor.pid_dir.mkdir() Path(self.executor.pid_dir, str(workflow_process.pid)).touch() + time.sleep(3) + st.rerun() def workflow_process(self) -> None: """ From 047cdc4becf7932a9b722fcb869c23c3deda2e38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= Date: Mon, 5 Aug 2024 16:45:16 +0200 Subject: [PATCH 030/168] separate out workflows --- app.py | 46 +++++++++++++++------------- content/quickstart.py | 2 +- content/topp_workflow.py | 24 --------------- content/topp_workflow_execution.py | 14 +++++++++ content/topp_workflow_file_upload.py | 14 +++++++++ content/topp_workflow_parameter.py | 12 ++++++++ content/topp_workflow_results.py | 13 ++++++++ 7 files changed, 79 insertions(+), 46 deletions(-) delete mode 100644 content/topp_workflow.py create mode 100644 content/topp_workflow_execution.py create mode 100644 content/topp_workflow_file_upload.py create mode 100644 content/topp_workflow_parameter.py create mode 100644 content/topp_workflow_results.py diff --git a/app.py b/app.py index f041a20..907c581 100644 --- a/app.py +++ b/app.py @@ -1,25 +1,29 @@ import streamlit as st from pathlib import Path -pages = { - "OpenMS Web App" : [ - st.Page(Path("content", "quickstart.py"), title="Quickstart", icon="👋"), - st.Page(Path("content", "documentation.py"), title="Documentation", icon="📖"), - ], - "TOPP Workflow Framework": [ - st.Page(Path("content", "topp_workflow.py"), title="TOPP Workflow", icon="🚀"), - ], - "pyOpenMS Workflow" : [ - st.Page(Path("content", "file_upload.py"), title="File Upload", icon="📂"), - st.Page(Path("content", "raw_data_viewer.py"), title="View MS data", icon="👀"), - st.Page(Path("content", "run_example_workflow.py"), title="Run Workflow", icon="⚙️"), - st.Page(Path("content", "download_section.py"), title="Download Results", icon="⬇️"), - ], - "Others Topics": [ - st.Page(Path("content", "simple_workflow.py"), title="Simple Workflow", icon="⚙️"), - st.Page(Path("content", "run_subprocess.py"), title="Run Subprocess", icon="🖥️"), - ] -} +if __name__ == '__main__': + pages = { + "OpenMS Web App" : [ + st.Page(Path("content", "quickstart.py"), title="Quickstart", icon="👋"), + st.Page(Path("content", "documentation.py"), title="Documentation", icon="📖"), + ], + "TOPP Workflow Framework": [ + st.Page(Path("content", "topp_workflow_file_upload.py"), title="File Upload", icon="📁"), + st.Page(Path("content", "topp_workflow_parameter.py"), title="Configure", icon="⚙️"), + st.Page(Path("content", "topp_workflow_execution.py"), title="Run", icon="🚀"), + st.Page(Path("content", "topp_workflow_results.py"), title="Results", icon="📊"), + ], + "pyOpenMS Workflow" : [ + st.Page(Path("content", "file_upload.py"), title="File Upload", icon="📂"), + st.Page(Path("content", "raw_data_viewer.py"), title="View MS data", icon="👀"), + st.Page(Path("content", "run_example_workflow.py"), title="Run Workflow", icon="⚙️"), + st.Page(Path("content", "download_section.py"), title="Download Results", icon="⬇️"), + ], + "Others Topics": [ + st.Page(Path("content", "simple_workflow.py"), title="Simple Workflow", icon="⚙️"), + st.Page(Path("content", "run_subprocess.py"), title="Run Subprocess", icon="🖥️"), + ] + } -pg = st.navigation(pages) -pg.run() \ No newline at end of file + pg = st.navigation(pages) + pg.run() \ No newline at end of file diff --git a/content/quickstart.py b/content/quickstart.py index a912b92..96e67df 100644 --- a/content/quickstart.py +++ b/content/quickstart.py @@ -117,7 +117,7 @@ icon="➡️", ) st.page_link( - "content/topp_workflow.py", label="Play around with the example workflow.", icon="➡️" + "content/topp_workflow_file_upload.py", label="Play around with the example workflow.", icon="➡️" ) st.markdown( """ diff --git a/content/topp_workflow.py b/content/topp_workflow.py deleted file mode 100644 index ab4bc47..0000000 --- a/content/topp_workflow.py +++ /dev/null @@ -1,24 +0,0 @@ -import streamlit as st -from src.common import page_setup -from src.Workflow import Workflow - -# # The rest of the page can, but does not have to be changed -params = page_setup() - -wf = Workflow() - -st.title(wf.name) - -t = st.tabs(["📁 **File Upload**", "⚙️ **Configure**", "🚀 **Run**", "📊 **Results**"]) -with t[0]: - wf.show_file_upload_section() - -with t[1]: - wf.show_parameter_section() - -with t[2]: - wf.show_execution_section() - -with t[3]: - wf.show_results_section() - diff --git a/content/topp_workflow_execution.py b/content/topp_workflow_execution.py new file mode 100644 index 0000000..a6e6145 --- /dev/null +++ b/content/topp_workflow_execution.py @@ -0,0 +1,14 @@ +import streamlit as st +from src.common import page_setup +from src.Workflow import Workflow + + +params = page_setup() + +wf = Workflow() + +st.title(wf.name) + +wf.show_execution_section() + + diff --git a/content/topp_workflow_file_upload.py b/content/topp_workflow_file_upload.py new file mode 100644 index 0000000..1953207 --- /dev/null +++ b/content/topp_workflow_file_upload.py @@ -0,0 +1,14 @@ +import streamlit as st +from src.common import page_setup +from src.Workflow import Workflow + + +params = page_setup() + +wf = Workflow() + +st.title(wf.name) + +wf.show_file_upload_section() + + diff --git a/content/topp_workflow_parameter.py b/content/topp_workflow_parameter.py new file mode 100644 index 0000000..0abca80 --- /dev/null +++ b/content/topp_workflow_parameter.py @@ -0,0 +1,12 @@ +import streamlit as st +from src.common import page_setup +from src.Workflow import Workflow + + +params = page_setup() + +wf = Workflow() + +st.title(wf.name) + +wf.show_parameter_section() diff --git a/content/topp_workflow_results.py b/content/topp_workflow_results.py new file mode 100644 index 0000000..2407402 --- /dev/null +++ b/content/topp_workflow_results.py @@ -0,0 +1,13 @@ +import streamlit as st +from src.common import page_setup +from src.Workflow import Workflow + + +params = page_setup() + +wf = Workflow() + +st.title(wf.name) + +wf.show_results_section() + From 0d6864c291ae6e51b714c4c0bec18353bb845bf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= Date: Mon, 5 Aug 2024 16:45:43 +0200 Subject: [PATCH 031/168] add pyopenms as dependency --- environment.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/environment.yml b/environment.yml index 19d337a..f8c0a7f 100644 --- a/environment.yml +++ b/environment.yml @@ -8,6 +8,7 @@ dependencies: - pip==24.0 - numpy==1.26.4 # pandas and numpy are dependencies of pyopenms, however, pyopenms needs numpy<=1.26.4 - mono==6.12.0.90 + - pyopenms>3.0 - pip: # dependencies only available through pip # streamlit dependencies - streamlit==1.37.0 From 184ae95e2af5caaacb5aa80710e6900025ebdaed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= Date: Mon, 5 Aug 2024 16:46:45 +0200 Subject: [PATCH 032/168] fix depracation warning --- src/Workflow.py | 7 +++---- src/mzmlfileworkflow.py | 2 +- src/view.py | 6 +++--- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/Workflow.py b/src/Workflow.py index 3e5864f..b461da6 100644 --- a/src/Workflow.py +++ b/src/Workflow.py @@ -26,7 +26,7 @@ def upload(self) -> None: fallback=[str(f) for f in Path("example-data", "mzML").glob("*.mzML")], ) - @st.experimental_fragment + @st.fragment def configure(self) -> None: # Allow users to select mzML files for the analysis. self.ui.select_input_file("mzML-files", multiple=True) @@ -51,7 +51,6 @@ def configure(self) -> None: # Parameters are specified within the file in the DEFAULTS dictionary. self.ui.input_python("example") - @st.experimental_fragment def execution(self) -> None: # Any parameter checks, here simply checking if mzML files are selected if not self.params["mzML-files"]: @@ -95,9 +94,9 @@ def execution(self) -> None: # Example for a custom Python tool, which is located in src/python-tools. self.executor.run_python("example", {"in": in_mzML}) - @st.experimental_fragment + @st.fragment def results(self) -> None: - @st.experimental_fragment + @st.fragment def show_consensus_features(): df = pd.read_csv(file, sep="\t", index_col=0) st.metric("number of consensus features", df.shape[0]) diff --git a/src/mzmlfileworkflow.py b/src/mzmlfileworkflow.py index e1a372b..bf563a5 100644 --- a/src/mzmlfileworkflow.py +++ b/src/mzmlfileworkflow.py @@ -70,7 +70,7 @@ def run_workflow(params, result_dir): ) df.to_csv(Path(result_dir, "result.tsv"), sep="\t", index=False) -@st.experimental_fragment +@stfragment def result_section(result_dir): date_strings = [f.name for f in Path(result_dir).iterdir() if f.is_dir()] diff --git a/src/view.py b/src/view.py index 48bb4a2..45619a6 100644 --- a/src/view.py +++ b/src/view.py @@ -187,7 +187,7 @@ def create_spectra(x, y, zero=0): return fig -@st.experimental_fragment +@st.fragment def view_peak_map(): df = st.session_state.view_ms1 if "view_peak_map_selection" in st.session_state: @@ -217,7 +217,7 @@ def view_peak_map(): st.pyplot(peak_map_3D, use_container_width=True) -@st.experimental_fragment +@st.fragment def view_spectrum(): cols = st.columns([0.34, 0.66]) with cols[0]: @@ -262,7 +262,7 @@ def view_spectrum(): st.info("💡 Select rows in the spectrum table to display plot.") -@st.experimental_fragment() +@st.fragment() def view_bpc_tic(): cols = st.columns(5) cols[0].checkbox( From 953e9f8574cdae6037729f6665eb22508e11b98b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= Date: Mon, 5 Aug 2024 17:36:42 +0200 Subject: [PATCH 033/168] add workspace as query parameter --- src/common.py | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/common.py b/src/common.py index 7bb4ba6..96fe6b8 100644 --- a/src/common.py +++ b/src/common.py @@ -104,7 +104,11 @@ def page_setup(page: str = "") -> dict[str, Any]: st.logo("assets/pyopenms_transparent_background.png") # Determine the workspace for the current session - if "workspace" not in st.session_state: + if ( + ("workspace" not in st.session_state) or + ('workspace' not in st.query_params) or + (st.query_params.workspace != st.session_state.workspace.name) + ): # Clear any previous caches st.cache_data.clear() st.cache_resource.clear() @@ -118,10 +122,17 @@ def page_setup(page: str = "") -> dict[str, Any]: os.chdir("../streamlit-template") # Define the directory where all workspaces will be stored workspaces_dir = Path("..", "workspaces-" + REPOSITORY_NAME) - if st.session_state.location == "online": - st.session_state.workspace = Path(workspaces_dir, str(uuid.uuid1())) + if 'workspace' in st.query_params: + st.session_state.workspace = Path(workspaces_dir, st.query_params.workspace) + elif st.session_state.location == "online": + workspace_id = str(uuid.uuid1()) + st.session_state.workspace = Path(workspaces_dir, workspace_id) + st.query_params.workspace = workspace_id else: st.session_state.workspace = Path(workspaces_dir, "default") + st.query_params.workspace = 'default' + + if st.session_state.location != "online": # not any captcha so, controllo should be true st.session_state["controllo"] = True @@ -172,6 +183,7 @@ def render_sidebar(page: str = "") -> None: path = Path(workspaces_dir, new_workspace) if path.exists(): st.session_state.workspace = path + st.query_params.workspace = new_workspace else: st.warning("⚠️ Workspace does not exist.") # Display info on current workspace and warning @@ -194,6 +206,7 @@ def change_workspace(): st.session_state.workspace = Path( workspaces_dir, st.session_state["chosen-workspace"] ) + st.query_params.workspace = st.session_state["chosen-workspace"] # Get all available workspaces as options options = [ @@ -214,12 +227,14 @@ def change_workspace(): if st.button("**Create Workspace**"): path.mkdir(parents=True, exist_ok=True) st.session_state.workspace = path + st.query_params.workspace = create_remove st.rerun() # Remove existing workspace and fall back to default if st.button("⚠️ Delete Workspace"): if path.exists(): shutil.rmtree(path) st.session_state.workspace = Path(workspaces_dir, "default") + st.query_params.workspace = 'default' st.rerun() # All pages have settings, workflow indicator and logo From dab4e80337293d214079ed19cbb7a5a4734fe101 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= Date: Mon, 5 Aug 2024 17:41:39 +0200 Subject: [PATCH 034/168] remove workspace selector from sidebar in hosted mode --- src/common.py | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/src/common.py b/src/common.py index 96fe6b8..dc3211d 100644 --- a/src/common.py +++ b/src/common.py @@ -176,28 +176,7 @@ def render_sidebar(page: str = "") -> None: # Define workspaces directory outside of repository workspaces_dir = Path("..", "workspaces-" + REPOSITORY_NAME) # Online: show current workspace name in info text and option to change to other existing workspace - if st.session_state.location == "online": - # Change workspace... - new_workspace = st.text_input("enter workspace", "") - if st.button("**Enter Workspace**") and new_workspace: - path = Path(workspaces_dir, new_workspace) - if path.exists(): - st.session_state.workspace = path - st.query_params.workspace = new_workspace - else: - st.warning("⚠️ Workspace does not exist.") - # Display info on current workspace and warning - st.info( - f"""💡 Your workspace ID: - -**{st.session_state['workspace'].name}** - -You can share this unique workspace ID with other people. - -⚠️ Anyone with this ID can access your data!""" - ) - # Local: user can create/remove workspaces as well and see all available - elif st.session_state.location == "local": + if st.session_state.location == "local": # Define callback function to change workspace def change_workspace(): for key in params.keys(): From 09e0843211ae7f77f1ed72399f2d9291d922b5cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= Date: Mon, 5 Aug 2024 17:58:52 +0200 Subject: [PATCH 035/168] fix new workspace creation --- src/common.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/common.py b/src/common.py index dc3211d..4655773 100644 --- a/src/common.py +++ b/src/common.py @@ -3,6 +3,7 @@ import shutil import sys import uuid +import time from typing import Any from pathlib import Path @@ -106,8 +107,8 @@ def page_setup(page: str = "") -> dict[str, Any]: # Determine the workspace for the current session if ( ("workspace" not in st.session_state) or - ('workspace' not in st.query_params) or - (st.query_params.workspace != st.session_state.workspace.name) + (('workspace' in st.query_params) and + (st.query_params.workspace != st.session_state.workspace.name)) ): # Clear any previous caches st.cache_data.clear() @@ -136,6 +137,9 @@ def page_setup(page: str = "") -> dict[str, Any]: # not any captcha so, controllo should be true st.session_state["controllo"] = True + if 'workspace' not in st.query_params: + st.query_params.workspace = st.session_state.workspace.name + # Make sure the necessary directories exist st.session_state.workspace.mkdir(parents=True, exist_ok=True) Path(st.session_state.workspace, "mzML-files").mkdir(parents=True, exist_ok=True) @@ -207,6 +211,8 @@ def change_workspace(): path.mkdir(parents=True, exist_ok=True) st.session_state.workspace = path st.query_params.workspace = create_remove + # Temporary as the query update takes a short amount of time + time.sleep(1) st.rerun() # Remove existing workspace and fall back to default if st.button("⚠️ Delete Workspace"): From a0ea2df1dbab2eaeeae3ea8bb445f6425e4a305b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= Date: Fri, 9 Aug 2024 17:51:20 +0200 Subject: [PATCH 036/168] working consent banner --- .gitignore | 4 +- gdpr_consent/dist/bundle.js | 1637 ++++++++++++++++++++++++++ gdpr_consent/index.html | 7 + gdpr_consent/package-lock.json | 1972 ++++++++++++++++++++++++++++++++ gdpr_consent/package.json | 19 + gdpr_consent/src/main.ts | 150 +++ gdpr_consent/tsconfig.json | 111 ++ gdpr_consent/webpack.config.js | 22 + settings.json | 6 + src/captcha_.py | 17 +- src/common.py | 23 + 11 files changed, 3965 insertions(+), 3 deletions(-) create mode 100644 gdpr_consent/dist/bundle.js create mode 100644 gdpr_consent/index.html create mode 100644 gdpr_consent/package-lock.json create mode 100644 gdpr_consent/package.json create mode 100644 gdpr_consent/src/main.ts create mode 100644 gdpr_consent/tsconfig.json create mode 100644 gdpr_consent/webpack.config.js create mode 100644 settings.json diff --git a/.gitignore b/.gitignore index d871bd5..18071ad 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ workspaces-streamlit-template build -dist myenv hooks/__pycache__/ build.log @@ -9,4 +8,5 @@ clean-up-workspaces.log *-embed-amd64 get-pip.py run_app.bat -python* \ No newline at end of file +python* +gdpr_consent/node_modules/ \ No newline at end of file diff --git a/gdpr_consent/dist/bundle.js b/gdpr_consent/dist/bundle.js new file mode 100644 index 0000000..1d89d84 --- /dev/null +++ b/gdpr_consent/dist/bundle.js @@ -0,0 +1,1637 @@ +/* + * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development"). + * This devtool is neither made for production nor for readable output files. + * It uses "eval()" calls to create a separate source file in the browser devtools. + * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) + * or disable the default devtool with "devtool: false". + * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). + */ +/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ "./node_modules/flatbuffers/mjs/builder.js": +/*!*************************************************!*\ + !*** ./node_modules/flatbuffers/mjs/builder.js ***! + \*************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Builder: () => (/* binding */ Builder)\n/* harmony export */ });\n/* harmony import */ var _byte_buffer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./byte-buffer */ \"./node_modules/flatbuffers/mjs/byte-buffer.js\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants */ \"./node_modules/flatbuffers/mjs/constants.js\");\n/* harmony import */ var _long__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./long */ \"./node_modules/flatbuffers/mjs/long.js\");\n\r\n\r\n\r\nclass Builder {\r\n /**\r\n * Create a FlatBufferBuilder.\r\n */\r\n constructor(opt_initial_size) {\r\n /** Minimum alignment encountered so far. */\r\n this.minalign = 1;\r\n /** The vtable for the current table. */\r\n this.vtable = null;\r\n /** The amount of fields we're actually using. */\r\n this.vtable_in_use = 0;\r\n /** Whether we are currently serializing a table. */\r\n this.isNested = false;\r\n /** Starting offset of the current struct/table. */\r\n this.object_start = 0;\r\n /** List of offsets of all vtables. */\r\n this.vtables = [];\r\n /** For the current vector being built. */\r\n this.vector_num_elems = 0;\r\n /** False omits default values from the serialized data */\r\n this.force_defaults = false;\r\n this.string_maps = null;\r\n let initial_size;\r\n if (!opt_initial_size) {\r\n initial_size = 1024;\r\n }\r\n else {\r\n initial_size = opt_initial_size;\r\n }\r\n /**\r\n * @type {ByteBuffer}\r\n * @private\r\n */\r\n this.bb = _byte_buffer__WEBPACK_IMPORTED_MODULE_0__.ByteBuffer.allocate(initial_size);\r\n this.space = initial_size;\r\n }\r\n clear() {\r\n this.bb.clear();\r\n this.space = this.bb.capacity();\r\n this.minalign = 1;\r\n this.vtable = null;\r\n this.vtable_in_use = 0;\r\n this.isNested = false;\r\n this.object_start = 0;\r\n this.vtables = [];\r\n this.vector_num_elems = 0;\r\n this.force_defaults = false;\r\n this.string_maps = null;\r\n }\r\n /**\r\n * In order to save space, fields that are set to their default value\r\n * don't get serialized into the buffer. Forcing defaults provides a\r\n * way to manually disable this optimization.\r\n *\r\n * @param forceDefaults true always serializes default values\r\n */\r\n forceDefaults(forceDefaults) {\r\n this.force_defaults = forceDefaults;\r\n }\r\n /**\r\n * Get the ByteBuffer representing the FlatBuffer. Only call this after you've\r\n * called finish(). The actual data starts at the ByteBuffer's current position,\r\n * not necessarily at 0.\r\n */\r\n dataBuffer() {\r\n return this.bb;\r\n }\r\n /**\r\n * Get the bytes representing the FlatBuffer. Only call this after you've\r\n * called finish().\r\n */\r\n asUint8Array() {\r\n return this.bb.bytes().subarray(this.bb.position(), this.bb.position() + this.offset());\r\n }\r\n /**\r\n * Prepare to write an element of `size` after `additional_bytes` have been\r\n * written, e.g. if you write a string, you need to align such the int length\r\n * field is aligned to 4 bytes, and the string data follows it directly. If all\r\n * you need to do is alignment, `additional_bytes` will be 0.\r\n *\r\n * @param size This is the of the new element to write\r\n * @param additional_bytes The padding size\r\n */\r\n prep(size, additional_bytes) {\r\n // Track the biggest thing we've ever aligned to.\r\n if (size > this.minalign) {\r\n this.minalign = size;\r\n }\r\n // Find the amount of alignment needed such that `size` is properly\r\n // aligned after `additional_bytes`\r\n const align_size = ((~(this.bb.capacity() - this.space + additional_bytes)) + 1) & (size - 1);\r\n // Reallocate the buffer if needed.\r\n while (this.space < align_size + size + additional_bytes) {\r\n const old_buf_size = this.bb.capacity();\r\n this.bb = Builder.growByteBuffer(this.bb);\r\n this.space += this.bb.capacity() - old_buf_size;\r\n }\r\n this.pad(align_size);\r\n }\r\n pad(byte_size) {\r\n for (let i = 0; i < byte_size; i++) {\r\n this.bb.writeInt8(--this.space, 0);\r\n }\r\n }\r\n writeInt8(value) {\r\n this.bb.writeInt8(this.space -= 1, value);\r\n }\r\n writeInt16(value) {\r\n this.bb.writeInt16(this.space -= 2, value);\r\n }\r\n writeInt32(value) {\r\n this.bb.writeInt32(this.space -= 4, value);\r\n }\r\n writeInt64(value) {\r\n this.bb.writeInt64(this.space -= 8, value);\r\n }\r\n writeFloat32(value) {\r\n this.bb.writeFloat32(this.space -= 4, value);\r\n }\r\n writeFloat64(value) {\r\n this.bb.writeFloat64(this.space -= 8, value);\r\n }\r\n /**\r\n * Add an `int8` to the buffer, properly aligned, and grows the buffer (if necessary).\r\n * @param value The `int8` to add the the buffer.\r\n */\r\n addInt8(value) {\r\n this.prep(1, 0);\r\n this.writeInt8(value);\r\n }\r\n /**\r\n * Add an `int16` to the buffer, properly aligned, and grows the buffer (if necessary).\r\n * @param value The `int16` to add the the buffer.\r\n */\r\n addInt16(value) {\r\n this.prep(2, 0);\r\n this.writeInt16(value);\r\n }\r\n /**\r\n * Add an `int32` to the buffer, properly aligned, and grows the buffer (if necessary).\r\n * @param value The `int32` to add the the buffer.\r\n */\r\n addInt32(value) {\r\n this.prep(4, 0);\r\n this.writeInt32(value);\r\n }\r\n /**\r\n * Add an `int64` to the buffer, properly aligned, and grows the buffer (if necessary).\r\n * @param value The `int64` to add the the buffer.\r\n */\r\n addInt64(value) {\r\n this.prep(8, 0);\r\n this.writeInt64(value);\r\n }\r\n /**\r\n * Add a `float32` to the buffer, properly aligned, and grows the buffer (if necessary).\r\n * @param value The `float32` to add the the buffer.\r\n */\r\n addFloat32(value) {\r\n this.prep(4, 0);\r\n this.writeFloat32(value);\r\n }\r\n /**\r\n * Add a `float64` to the buffer, properly aligned, and grows the buffer (if necessary).\r\n * @param value The `float64` to add the the buffer.\r\n */\r\n addFloat64(value) {\r\n this.prep(8, 0);\r\n this.writeFloat64(value);\r\n }\r\n addFieldInt8(voffset, value, defaultValue) {\r\n if (this.force_defaults || value != defaultValue) {\r\n this.addInt8(value);\r\n this.slot(voffset);\r\n }\r\n }\r\n addFieldInt16(voffset, value, defaultValue) {\r\n if (this.force_defaults || value != defaultValue) {\r\n this.addInt16(value);\r\n this.slot(voffset);\r\n }\r\n }\r\n addFieldInt32(voffset, value, defaultValue) {\r\n if (this.force_defaults || value != defaultValue) {\r\n this.addInt32(value);\r\n this.slot(voffset);\r\n }\r\n }\r\n addFieldInt64(voffset, value, defaultValue) {\r\n if (this.force_defaults || !value.equals(defaultValue)) {\r\n this.addInt64(value);\r\n this.slot(voffset);\r\n }\r\n }\r\n addFieldFloat32(voffset, value, defaultValue) {\r\n if (this.force_defaults || value != defaultValue) {\r\n this.addFloat32(value);\r\n this.slot(voffset);\r\n }\r\n }\r\n addFieldFloat64(voffset, value, defaultValue) {\r\n if (this.force_defaults || value != defaultValue) {\r\n this.addFloat64(value);\r\n this.slot(voffset);\r\n }\r\n }\r\n addFieldOffset(voffset, value, defaultValue) {\r\n if (this.force_defaults || value != defaultValue) {\r\n this.addOffset(value);\r\n this.slot(voffset);\r\n }\r\n }\r\n /**\r\n * Structs are stored inline, so nothing additional is being added. `d` is always 0.\r\n */\r\n addFieldStruct(voffset, value, defaultValue) {\r\n if (value != defaultValue) {\r\n this.nested(value);\r\n this.slot(voffset);\r\n }\r\n }\r\n /**\r\n * Structures are always stored inline, they need to be created right\r\n * where they're used. You'll get this assertion failure if you\r\n * created it elsewhere.\r\n */\r\n nested(obj) {\r\n if (obj != this.offset()) {\r\n throw new Error('FlatBuffers: struct must be serialized inline.');\r\n }\r\n }\r\n /**\r\n * Should not be creating any other object, string or vector\r\n * while an object is being constructed\r\n */\r\n notNested() {\r\n if (this.isNested) {\r\n throw new Error('FlatBuffers: object serialization must not be nested.');\r\n }\r\n }\r\n /**\r\n * Set the current vtable at `voffset` to the current location in the buffer.\r\n */\r\n slot(voffset) {\r\n if (this.vtable !== null)\r\n this.vtable[voffset] = this.offset();\r\n }\r\n /**\r\n * @returns Offset relative to the end of the buffer.\r\n */\r\n offset() {\r\n return this.bb.capacity() - this.space;\r\n }\r\n /**\r\n * Doubles the size of the backing ByteBuffer and copies the old data towards\r\n * the end of the new buffer (since we build the buffer backwards).\r\n *\r\n * @param bb The current buffer with the existing data\r\n * @returns A new byte buffer with the old data copied\r\n * to it. The data is located at the end of the buffer.\r\n *\r\n * uint8Array.set() formally takes {Array|ArrayBufferView}, so to pass\r\n * it a uint8Array we need to suppress the type check:\r\n * @suppress {checkTypes}\r\n */\r\n static growByteBuffer(bb) {\r\n const old_buf_size = bb.capacity();\r\n // Ensure we don't grow beyond what fits in an int.\r\n if (old_buf_size & 0xC0000000) {\r\n throw new Error('FlatBuffers: cannot grow buffer beyond 2 gigabytes.');\r\n }\r\n const new_buf_size = old_buf_size << 1;\r\n const nbb = _byte_buffer__WEBPACK_IMPORTED_MODULE_0__.ByteBuffer.allocate(new_buf_size);\r\n nbb.setPosition(new_buf_size - old_buf_size);\r\n nbb.bytes().set(bb.bytes(), new_buf_size - old_buf_size);\r\n return nbb;\r\n }\r\n /**\r\n * Adds on offset, relative to where it will be written.\r\n *\r\n * @param offset The offset to add.\r\n */\r\n addOffset(offset) {\r\n this.prep(_constants__WEBPACK_IMPORTED_MODULE_1__.SIZEOF_INT, 0); // Ensure alignment is already done.\r\n this.writeInt32(this.offset() - offset + _constants__WEBPACK_IMPORTED_MODULE_1__.SIZEOF_INT);\r\n }\r\n /**\r\n * Start encoding a new object in the buffer. Users will not usually need to\r\n * call this directly. The FlatBuffers compiler will generate helper methods\r\n * that call this method internally.\r\n */\r\n startObject(numfields) {\r\n this.notNested();\r\n if (this.vtable == null) {\r\n this.vtable = [];\r\n }\r\n this.vtable_in_use = numfields;\r\n for (let i = 0; i < numfields; i++) {\r\n this.vtable[i] = 0; // This will push additional elements as needed\r\n }\r\n this.isNested = true;\r\n this.object_start = this.offset();\r\n }\r\n /**\r\n * Finish off writing the object that is under construction.\r\n *\r\n * @returns The offset to the object inside `dataBuffer`\r\n */\r\n endObject() {\r\n if (this.vtable == null || !this.isNested) {\r\n throw new Error('FlatBuffers: endObject called without startObject');\r\n }\r\n this.addInt32(0);\r\n const vtableloc = this.offset();\r\n // Trim trailing zeroes.\r\n let i = this.vtable_in_use - 1;\r\n // eslint-disable-next-line no-empty\r\n for (; i >= 0 && this.vtable[i] == 0; i--) { }\r\n const trimmed_size = i + 1;\r\n // Write out the current vtable.\r\n for (; i >= 0; i--) {\r\n // Offset relative to the start of the table.\r\n this.addInt16(this.vtable[i] != 0 ? vtableloc - this.vtable[i] : 0);\r\n }\r\n const standard_fields = 2; // The fields below:\r\n this.addInt16(vtableloc - this.object_start);\r\n const len = (trimmed_size + standard_fields) * _constants__WEBPACK_IMPORTED_MODULE_1__.SIZEOF_SHORT;\r\n this.addInt16(len);\r\n // Search for an existing vtable that matches the current one.\r\n let existing_vtable = 0;\r\n const vt1 = this.space;\r\n outer_loop: for (i = 0; i < this.vtables.length; i++) {\r\n const vt2 = this.bb.capacity() - this.vtables[i];\r\n if (len == this.bb.readInt16(vt2)) {\r\n for (let j = _constants__WEBPACK_IMPORTED_MODULE_1__.SIZEOF_SHORT; j < len; j += _constants__WEBPACK_IMPORTED_MODULE_1__.SIZEOF_SHORT) {\r\n if (this.bb.readInt16(vt1 + j) != this.bb.readInt16(vt2 + j)) {\r\n continue outer_loop;\r\n }\r\n }\r\n existing_vtable = this.vtables[i];\r\n break;\r\n }\r\n }\r\n if (existing_vtable) {\r\n // Found a match:\r\n // Remove the current vtable.\r\n this.space = this.bb.capacity() - vtableloc;\r\n // Point table to existing vtable.\r\n this.bb.writeInt32(this.space, existing_vtable - vtableloc);\r\n }\r\n else {\r\n // No match:\r\n // Add the location of the current vtable to the list of vtables.\r\n this.vtables.push(this.offset());\r\n // Point table to current vtable.\r\n this.bb.writeInt32(this.bb.capacity() - vtableloc, this.offset() - vtableloc);\r\n }\r\n this.isNested = false;\r\n return vtableloc;\r\n }\r\n /**\r\n * Finalize a buffer, poiting to the given `root_table`.\r\n */\r\n finish(root_table, opt_file_identifier, opt_size_prefix) {\r\n const size_prefix = opt_size_prefix ? _constants__WEBPACK_IMPORTED_MODULE_1__.SIZE_PREFIX_LENGTH : 0;\r\n if (opt_file_identifier) {\r\n const file_identifier = opt_file_identifier;\r\n this.prep(this.minalign, _constants__WEBPACK_IMPORTED_MODULE_1__.SIZEOF_INT +\r\n _constants__WEBPACK_IMPORTED_MODULE_1__.FILE_IDENTIFIER_LENGTH + size_prefix);\r\n if (file_identifier.length != _constants__WEBPACK_IMPORTED_MODULE_1__.FILE_IDENTIFIER_LENGTH) {\r\n throw new Error('FlatBuffers: file identifier must be length ' +\r\n _constants__WEBPACK_IMPORTED_MODULE_1__.FILE_IDENTIFIER_LENGTH);\r\n }\r\n for (let i = _constants__WEBPACK_IMPORTED_MODULE_1__.FILE_IDENTIFIER_LENGTH - 1; i >= 0; i--) {\r\n this.writeInt8(file_identifier.charCodeAt(i));\r\n }\r\n }\r\n this.prep(this.minalign, _constants__WEBPACK_IMPORTED_MODULE_1__.SIZEOF_INT + size_prefix);\r\n this.addOffset(root_table);\r\n if (size_prefix) {\r\n this.addInt32(this.bb.capacity() - this.space);\r\n }\r\n this.bb.setPosition(this.space);\r\n }\r\n /**\r\n * Finalize a size prefixed buffer, pointing to the given `root_table`.\r\n */\r\n finishSizePrefixed(root_table, opt_file_identifier) {\r\n this.finish(root_table, opt_file_identifier, true);\r\n }\r\n /**\r\n * This checks a required field has been set in a given table that has\r\n * just been constructed.\r\n */\r\n requiredField(table, field) {\r\n const table_start = this.bb.capacity() - table;\r\n const vtable_start = table_start - this.bb.readInt32(table_start);\r\n const ok = this.bb.readInt16(vtable_start + field) != 0;\r\n // If this fails, the caller will show what field needs to be set.\r\n if (!ok) {\r\n throw new Error('FlatBuffers: field ' + field + ' must be set');\r\n }\r\n }\r\n /**\r\n * Start a new array/vector of objects. Users usually will not call\r\n * this directly. The FlatBuffers compiler will create a start/end\r\n * method for vector types in generated code.\r\n *\r\n * @param elem_size The size of each element in the array\r\n * @param num_elems The number of elements in the array\r\n * @param alignment The alignment of the array\r\n */\r\n startVector(elem_size, num_elems, alignment) {\r\n this.notNested();\r\n this.vector_num_elems = num_elems;\r\n this.prep(_constants__WEBPACK_IMPORTED_MODULE_1__.SIZEOF_INT, elem_size * num_elems);\r\n this.prep(alignment, elem_size * num_elems); // Just in case alignment > int.\r\n }\r\n /**\r\n * Finish off the creation of an array and all its elements. The array must be\r\n * created with `startVector`.\r\n *\r\n * @returns The offset at which the newly created array\r\n * starts.\r\n */\r\n endVector() {\r\n this.writeInt32(this.vector_num_elems);\r\n return this.offset();\r\n }\r\n /**\r\n * Encode the string `s` in the buffer using UTF-8. If the string passed has\r\n * already been seen, we return the offset of the already written string\r\n *\r\n * @param s The string to encode\r\n * @return The offset in the buffer where the encoded string starts\r\n */\r\n createSharedString(s) {\r\n if (!s) {\r\n return 0;\r\n }\r\n if (!this.string_maps) {\r\n this.string_maps = new Map();\r\n }\r\n if (this.string_maps.has(s)) {\r\n return this.string_maps.get(s);\r\n }\r\n const offset = this.createString(s);\r\n this.string_maps.set(s, offset);\r\n return offset;\r\n }\r\n /**\r\n * Encode the string `s` in the buffer using UTF-8. If a Uint8Array is passed\r\n * instead of a string, it is assumed to contain valid UTF-8 encoded data.\r\n *\r\n * @param s The string to encode\r\n * @return The offset in the buffer where the encoded string starts\r\n */\r\n createString(s) {\r\n if (!s) {\r\n return 0;\r\n }\r\n let utf8;\r\n if (s instanceof Uint8Array) {\r\n utf8 = s;\r\n }\r\n else {\r\n utf8 = [];\r\n let i = 0;\r\n while (i < s.length) {\r\n let codePoint;\r\n // Decode UTF-16\r\n const a = s.charCodeAt(i++);\r\n if (a < 0xD800 || a >= 0xDC00) {\r\n codePoint = a;\r\n }\r\n else {\r\n const b = s.charCodeAt(i++);\r\n codePoint = (a << 10) + b + (0x10000 - (0xD800 << 10) - 0xDC00);\r\n }\r\n // Encode UTF-8\r\n if (codePoint < 0x80) {\r\n utf8.push(codePoint);\r\n }\r\n else {\r\n if (codePoint < 0x800) {\r\n utf8.push(((codePoint >> 6) & 0x1F) | 0xC0);\r\n }\r\n else {\r\n if (codePoint < 0x10000) {\r\n utf8.push(((codePoint >> 12) & 0x0F) | 0xE0);\r\n }\r\n else {\r\n utf8.push(((codePoint >> 18) & 0x07) | 0xF0, ((codePoint >> 12) & 0x3F) | 0x80);\r\n }\r\n utf8.push(((codePoint >> 6) & 0x3F) | 0x80);\r\n }\r\n utf8.push((codePoint & 0x3F) | 0x80);\r\n }\r\n }\r\n }\r\n this.addInt8(0);\r\n this.startVector(1, utf8.length, 1);\r\n this.bb.setPosition(this.space -= utf8.length);\r\n for (let i = 0, offset = this.space, bytes = this.bb.bytes(); i < utf8.length; i++) {\r\n bytes[offset++] = utf8[i];\r\n }\r\n return this.endVector();\r\n }\r\n /**\r\n * A helper function to avoid generated code depending on this file directly.\r\n */\r\n createLong(low, high) {\r\n return _long__WEBPACK_IMPORTED_MODULE_2__.Long.create(low, high);\r\n }\r\n /**\r\n * A helper function to pack an object\r\n *\r\n * @returns offset of obj\r\n */\r\n createObjectOffset(obj) {\r\n if (obj === null) {\r\n return 0;\r\n }\r\n if (typeof obj === 'string') {\r\n return this.createString(obj);\r\n }\r\n else {\r\n return obj.pack(this);\r\n }\r\n }\r\n /**\r\n * A helper function to pack a list of object\r\n *\r\n * @returns list of offsets of each non null object\r\n */\r\n createObjectOffsetList(list) {\r\n const ret = [];\r\n for (let i = 0; i < list.length; ++i) {\r\n const val = list[i];\r\n if (val !== null) {\r\n ret.push(this.createObjectOffset(val));\r\n }\r\n else {\r\n throw new Error('FlatBuffers: Argument for createObjectOffsetList cannot contain null.');\r\n }\r\n }\r\n return ret;\r\n }\r\n createStructOffsetList(list, startFunc) {\r\n startFunc(this, list.length);\r\n this.createObjectOffsetList(list);\r\n return this.endVector();\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/flatbuffers/mjs/builder.js?"); + +/***/ }), + +/***/ "./node_modules/flatbuffers/mjs/byte-buffer.js": +/*!*****************************************************!*\ + !*** ./node_modules/flatbuffers/mjs/byte-buffer.js ***! + \*****************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ByteBuffer: () => (/* binding */ ByteBuffer)\n/* harmony export */ });\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constants */ \"./node_modules/flatbuffers/mjs/constants.js\");\n/* harmony import */ var _long__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./long */ \"./node_modules/flatbuffers/mjs/long.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ \"./node_modules/flatbuffers/mjs/utils.js\");\n/* harmony import */ var _encoding__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./encoding */ \"./node_modules/flatbuffers/mjs/encoding.js\");\n\r\n\r\n\r\n\r\nclass ByteBuffer {\r\n /**\r\n * Create a new ByteBuffer with a given array of bytes (`Uint8Array`)\r\n */\r\n constructor(bytes_) {\r\n this.bytes_ = bytes_;\r\n this.position_ = 0;\r\n }\r\n /**\r\n * Create and allocate a new ByteBuffer with a given size.\r\n */\r\n static allocate(byte_size) {\r\n return new ByteBuffer(new Uint8Array(byte_size));\r\n }\r\n clear() {\r\n this.position_ = 0;\r\n }\r\n /**\r\n * Get the underlying `Uint8Array`.\r\n */\r\n bytes() {\r\n return this.bytes_;\r\n }\r\n /**\r\n * Get the buffer's position.\r\n */\r\n position() {\r\n return this.position_;\r\n }\r\n /**\r\n * Set the buffer's position.\r\n */\r\n setPosition(position) {\r\n this.position_ = position;\r\n }\r\n /**\r\n * Get the buffer's capacity.\r\n */\r\n capacity() {\r\n return this.bytes_.length;\r\n }\r\n readInt8(offset) {\r\n return this.readUint8(offset) << 24 >> 24;\r\n }\r\n readUint8(offset) {\r\n return this.bytes_[offset];\r\n }\r\n readInt16(offset) {\r\n return this.readUint16(offset) << 16 >> 16;\r\n }\r\n readUint16(offset) {\r\n return this.bytes_[offset] | this.bytes_[offset + 1] << 8;\r\n }\r\n readInt32(offset) {\r\n return this.bytes_[offset] | this.bytes_[offset + 1] << 8 | this.bytes_[offset + 2] << 16 | this.bytes_[offset + 3] << 24;\r\n }\r\n readUint32(offset) {\r\n return this.readInt32(offset) >>> 0;\r\n }\r\n readInt64(offset) {\r\n return new _long__WEBPACK_IMPORTED_MODULE_1__.Long(this.readInt32(offset), this.readInt32(offset + 4));\r\n }\r\n readUint64(offset) {\r\n return new _long__WEBPACK_IMPORTED_MODULE_1__.Long(this.readUint32(offset), this.readUint32(offset + 4));\r\n }\r\n readFloat32(offset) {\r\n _utils__WEBPACK_IMPORTED_MODULE_2__.int32[0] = this.readInt32(offset);\r\n return _utils__WEBPACK_IMPORTED_MODULE_2__.float32[0];\r\n }\r\n readFloat64(offset) {\r\n _utils__WEBPACK_IMPORTED_MODULE_2__.int32[_utils__WEBPACK_IMPORTED_MODULE_2__.isLittleEndian ? 0 : 1] = this.readInt32(offset);\r\n _utils__WEBPACK_IMPORTED_MODULE_2__.int32[_utils__WEBPACK_IMPORTED_MODULE_2__.isLittleEndian ? 1 : 0] = this.readInt32(offset + 4);\r\n return _utils__WEBPACK_IMPORTED_MODULE_2__.float64[0];\r\n }\r\n writeInt8(offset, value) {\r\n this.bytes_[offset] = value;\r\n }\r\n writeUint8(offset, value) {\r\n this.bytes_[offset] = value;\r\n }\r\n writeInt16(offset, value) {\r\n this.bytes_[offset] = value;\r\n this.bytes_[offset + 1] = value >> 8;\r\n }\r\n writeUint16(offset, value) {\r\n this.bytes_[offset] = value;\r\n this.bytes_[offset + 1] = value >> 8;\r\n }\r\n writeInt32(offset, value) {\r\n this.bytes_[offset] = value;\r\n this.bytes_[offset + 1] = value >> 8;\r\n this.bytes_[offset + 2] = value >> 16;\r\n this.bytes_[offset + 3] = value >> 24;\r\n }\r\n writeUint32(offset, value) {\r\n this.bytes_[offset] = value;\r\n this.bytes_[offset + 1] = value >> 8;\r\n this.bytes_[offset + 2] = value >> 16;\r\n this.bytes_[offset + 3] = value >> 24;\r\n }\r\n writeInt64(offset, value) {\r\n this.writeInt32(offset, value.low);\r\n this.writeInt32(offset + 4, value.high);\r\n }\r\n writeUint64(offset, value) {\r\n this.writeUint32(offset, value.low);\r\n this.writeUint32(offset + 4, value.high);\r\n }\r\n writeFloat32(offset, value) {\r\n _utils__WEBPACK_IMPORTED_MODULE_2__.float32[0] = value;\r\n this.writeInt32(offset, _utils__WEBPACK_IMPORTED_MODULE_2__.int32[0]);\r\n }\r\n writeFloat64(offset, value) {\r\n _utils__WEBPACK_IMPORTED_MODULE_2__.float64[0] = value;\r\n this.writeInt32(offset, _utils__WEBPACK_IMPORTED_MODULE_2__.int32[_utils__WEBPACK_IMPORTED_MODULE_2__.isLittleEndian ? 0 : 1]);\r\n this.writeInt32(offset + 4, _utils__WEBPACK_IMPORTED_MODULE_2__.int32[_utils__WEBPACK_IMPORTED_MODULE_2__.isLittleEndian ? 1 : 0]);\r\n }\r\n /**\r\n * Return the file identifier. Behavior is undefined for FlatBuffers whose\r\n * schema does not include a file_identifier (likely points at padding or the\r\n * start of a the root vtable).\r\n */\r\n getBufferIdentifier() {\r\n if (this.bytes_.length < this.position_ + _constants__WEBPACK_IMPORTED_MODULE_0__.SIZEOF_INT +\r\n _constants__WEBPACK_IMPORTED_MODULE_0__.FILE_IDENTIFIER_LENGTH) {\r\n throw new Error('FlatBuffers: ByteBuffer is too short to contain an identifier.');\r\n }\r\n let result = \"\";\r\n for (let i = 0; i < _constants__WEBPACK_IMPORTED_MODULE_0__.FILE_IDENTIFIER_LENGTH; i++) {\r\n result += String.fromCharCode(this.readInt8(this.position_ + _constants__WEBPACK_IMPORTED_MODULE_0__.SIZEOF_INT + i));\r\n }\r\n return result;\r\n }\r\n /**\r\n * Look up a field in the vtable, return an offset into the object, or 0 if the\r\n * field is not present.\r\n */\r\n __offset(bb_pos, vtable_offset) {\r\n const vtable = bb_pos - this.readInt32(bb_pos);\r\n return vtable_offset < this.readInt16(vtable) ? this.readInt16(vtable + vtable_offset) : 0;\r\n }\r\n /**\r\n * Initialize any Table-derived type to point to the union at the given offset.\r\n */\r\n __union(t, offset) {\r\n t.bb_pos = offset + this.readInt32(offset);\r\n t.bb = this;\r\n return t;\r\n }\r\n /**\r\n * Create a JavaScript string from UTF-8 data stored inside the FlatBuffer.\r\n * This allocates a new string and converts to wide chars upon each access.\r\n *\r\n * To avoid the conversion to UTF-16, pass Encoding.UTF8_BYTES as\r\n * the \"optionalEncoding\" argument. This is useful for avoiding conversion to\r\n * and from UTF-16 when the data will just be packaged back up in another\r\n * FlatBuffer later on.\r\n *\r\n * @param offset\r\n * @param opt_encoding Defaults to UTF16_STRING\r\n */\r\n __string(offset, opt_encoding) {\r\n offset += this.readInt32(offset);\r\n const length = this.readInt32(offset);\r\n let result = '';\r\n let i = 0;\r\n offset += _constants__WEBPACK_IMPORTED_MODULE_0__.SIZEOF_INT;\r\n if (opt_encoding === _encoding__WEBPACK_IMPORTED_MODULE_3__.Encoding.UTF8_BYTES) {\r\n return this.bytes_.subarray(offset, offset + length);\r\n }\r\n while (i < length) {\r\n let codePoint;\r\n // Decode UTF-8\r\n const a = this.readUint8(offset + i++);\r\n if (a < 0xC0) {\r\n codePoint = a;\r\n }\r\n else {\r\n const b = this.readUint8(offset + i++);\r\n if (a < 0xE0) {\r\n codePoint =\r\n ((a & 0x1F) << 6) |\r\n (b & 0x3F);\r\n }\r\n else {\r\n const c = this.readUint8(offset + i++);\r\n if (a < 0xF0) {\r\n codePoint =\r\n ((a & 0x0F) << 12) |\r\n ((b & 0x3F) << 6) |\r\n (c & 0x3F);\r\n }\r\n else {\r\n const d = this.readUint8(offset + i++);\r\n codePoint =\r\n ((a & 0x07) << 18) |\r\n ((b & 0x3F) << 12) |\r\n ((c & 0x3F) << 6) |\r\n (d & 0x3F);\r\n }\r\n }\r\n }\r\n // Encode UTF-16\r\n if (codePoint < 0x10000) {\r\n result += String.fromCharCode(codePoint);\r\n }\r\n else {\r\n codePoint -= 0x10000;\r\n result += String.fromCharCode((codePoint >> 10) + 0xD800, (codePoint & ((1 << 10) - 1)) + 0xDC00);\r\n }\r\n }\r\n return result;\r\n }\r\n /**\r\n * Handle unions that can contain string as its member, if a Table-derived type then initialize it,\r\n * if a string then return a new one\r\n *\r\n * WARNING: strings are immutable in JS so we can't change the string that the user gave us, this\r\n * makes the behaviour of __union_with_string different compared to __union\r\n */\r\n __union_with_string(o, offset) {\r\n if (typeof o === 'string') {\r\n return this.__string(offset);\r\n }\r\n return this.__union(o, offset);\r\n }\r\n /**\r\n * Retrieve the relative offset stored at \"offset\"\r\n */\r\n __indirect(offset) {\r\n return offset + this.readInt32(offset);\r\n }\r\n /**\r\n * Get the start of data of a vector whose offset is stored at \"offset\" in this object.\r\n */\r\n __vector(offset) {\r\n return offset + this.readInt32(offset) + _constants__WEBPACK_IMPORTED_MODULE_0__.SIZEOF_INT; // data starts after the length\r\n }\r\n /**\r\n * Get the length of a vector whose offset is stored at \"offset\" in this object.\r\n */\r\n __vector_len(offset) {\r\n return this.readInt32(offset + this.readInt32(offset));\r\n }\r\n __has_identifier(ident) {\r\n if (ident.length != _constants__WEBPACK_IMPORTED_MODULE_0__.FILE_IDENTIFIER_LENGTH) {\r\n throw new Error('FlatBuffers: file identifier must be length ' +\r\n _constants__WEBPACK_IMPORTED_MODULE_0__.FILE_IDENTIFIER_LENGTH);\r\n }\r\n for (let i = 0; i < _constants__WEBPACK_IMPORTED_MODULE_0__.FILE_IDENTIFIER_LENGTH; i++) {\r\n if (ident.charCodeAt(i) != this.readInt8(this.position() + _constants__WEBPACK_IMPORTED_MODULE_0__.SIZEOF_INT + i)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n /**\r\n * A helper function to avoid generated code depending on this file directly.\r\n */\r\n createLong(low, high) {\r\n return _long__WEBPACK_IMPORTED_MODULE_1__.Long.create(low, high);\r\n }\r\n /**\r\n * A helper function for generating list for obj api\r\n */\r\n createScalarList(listAccessor, listLength) {\r\n const ret = [];\r\n for (let i = 0; i < listLength; ++i) {\r\n if (listAccessor(i) !== null) {\r\n ret.push(listAccessor(i));\r\n }\r\n }\r\n return ret;\r\n }\r\n /**\r\n * A helper function for generating list for obj api\r\n * @param listAccessor function that accepts an index and return data at that index\r\n * @param listLength listLength\r\n * @param res result list\r\n */\r\n createObjList(listAccessor, listLength) {\r\n const ret = [];\r\n for (let i = 0; i < listLength; ++i) {\r\n const val = listAccessor(i);\r\n if (val !== null) {\r\n ret.push(val.unpack());\r\n }\r\n }\r\n return ret;\r\n }\r\n}\r\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/flatbuffers/mjs/byte-buffer.js?"); + +/***/ }), + +/***/ "./node_modules/flatbuffers/mjs/constants.js": +/*!***************************************************!*\ + !*** ./node_modules/flatbuffers/mjs/constants.js ***! + \***************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ FILE_IDENTIFIER_LENGTH: () => (/* binding */ FILE_IDENTIFIER_LENGTH),\n/* harmony export */ SIZEOF_INT: () => (/* binding */ SIZEOF_INT),\n/* harmony export */ SIZEOF_SHORT: () => (/* binding */ SIZEOF_SHORT),\n/* harmony export */ SIZE_PREFIX_LENGTH: () => (/* binding */ SIZE_PREFIX_LENGTH)\n/* harmony export */ });\nconst SIZEOF_SHORT = 2;\r\nconst SIZEOF_INT = 4;\r\nconst FILE_IDENTIFIER_LENGTH = 4;\r\nconst SIZE_PREFIX_LENGTH = 4;\r\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/flatbuffers/mjs/constants.js?"); + +/***/ }), + +/***/ "./node_modules/flatbuffers/mjs/encoding.js": +/*!**************************************************!*\ + !*** ./node_modules/flatbuffers/mjs/encoding.js ***! + \**************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Encoding: () => (/* binding */ Encoding)\n/* harmony export */ });\nvar Encoding;\r\n(function (Encoding) {\r\n Encoding[Encoding[\"UTF8_BYTES\"] = 1] = \"UTF8_BYTES\";\r\n Encoding[Encoding[\"UTF16_STRING\"] = 2] = \"UTF16_STRING\";\r\n})(Encoding || (Encoding = {}));\r\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/flatbuffers/mjs/encoding.js?"); + +/***/ }), + +/***/ "./node_modules/flatbuffers/mjs/flatbuffers.js": +/*!*****************************************************!*\ + !*** ./node_modules/flatbuffers/mjs/flatbuffers.js ***! + \*****************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Builder: () => (/* reexport safe */ _builder__WEBPACK_IMPORTED_MODULE_4__.Builder),\n/* harmony export */ ByteBuffer: () => (/* reexport safe */ _byte_buffer__WEBPACK_IMPORTED_MODULE_5__.ByteBuffer),\n/* harmony export */ Encoding: () => (/* reexport safe */ _encoding__WEBPACK_IMPORTED_MODULE_3__.Encoding),\n/* harmony export */ FILE_IDENTIFIER_LENGTH: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.FILE_IDENTIFIER_LENGTH),\n/* harmony export */ Long: () => (/* reexport safe */ _long__WEBPACK_IMPORTED_MODULE_2__.Long),\n/* harmony export */ SIZEOF_INT: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.SIZEOF_INT),\n/* harmony export */ SIZEOF_SHORT: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.SIZEOF_SHORT),\n/* harmony export */ SIZE_PREFIX_LENGTH: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.SIZE_PREFIX_LENGTH),\n/* harmony export */ createLong: () => (/* reexport safe */ _long__WEBPACK_IMPORTED_MODULE_2__.createLong),\n/* harmony export */ float32: () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_1__.float32),\n/* harmony export */ float64: () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_1__.float64),\n/* harmony export */ int32: () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_1__.int32),\n/* harmony export */ isLittleEndian: () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_1__.isLittleEndian)\n/* harmony export */ });\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constants */ \"./node_modules/flatbuffers/mjs/constants.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils */ \"./node_modules/flatbuffers/mjs/utils.js\");\n/* harmony import */ var _long__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./long */ \"./node_modules/flatbuffers/mjs/long.js\");\n/* harmony import */ var _encoding__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./encoding */ \"./node_modules/flatbuffers/mjs/encoding.js\");\n/* harmony import */ var _builder__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./builder */ \"./node_modules/flatbuffers/mjs/builder.js\");\n/* harmony import */ var _byte_buffer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./byte-buffer */ \"./node_modules/flatbuffers/mjs/byte-buffer.js\");\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/flatbuffers/mjs/flatbuffers.js?"); + +/***/ }), + +/***/ "./node_modules/flatbuffers/mjs/long.js": +/*!**********************************************!*\ + !*** ./node_modules/flatbuffers/mjs/long.js ***! + \**********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Long: () => (/* binding */ Long),\n/* harmony export */ createLong: () => (/* binding */ createLong)\n/* harmony export */ });\nfunction createLong(low, high) {\r\n return Long.create(low, high);\r\n}\r\nclass Long {\r\n constructor(low, high) {\r\n this.low = low | 0;\r\n this.high = high | 0;\r\n }\r\n static create(low, high) {\r\n // Special-case zero to avoid GC overhead for default values\r\n return low == 0 && high == 0 ? Long.ZERO : new Long(low, high);\r\n }\r\n toFloat64() {\r\n return (this.low >>> 0) + this.high * 0x100000000;\r\n }\r\n equals(other) {\r\n return this.low == other.low && this.high == other.high;\r\n }\r\n}\r\nLong.ZERO = new Long(0, 0);\r\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/flatbuffers/mjs/long.js?"); + +/***/ }), + +/***/ "./node_modules/flatbuffers/mjs/utils.js": +/*!***********************************************!*\ + !*** ./node_modules/flatbuffers/mjs/utils.js ***! + \***********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ float32: () => (/* binding */ float32),\n/* harmony export */ float64: () => (/* binding */ float64),\n/* harmony export */ int32: () => (/* binding */ int32),\n/* harmony export */ isLittleEndian: () => (/* binding */ isLittleEndian)\n/* harmony export */ });\nconst int32 = new Int32Array(2);\r\nconst float32 = new Float32Array(int32.buffer);\r\nconst float64 = new Float64Array(int32.buffer);\r\nconst isLittleEndian = new Uint16Array(new Uint8Array([1, 0]).buffer)[0] === 1;\r\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/flatbuffers/mjs/utils.js?"); + +/***/ }), + +/***/ "./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js": +/*!**********************************************************************************!*\ + !*** ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js ***! + \**********************************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +"use strict"; +eval("\n\nvar reactIs = __webpack_require__(/*! react-is */ \"./node_modules/react-is/index.js\");\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js?"); + +/***/ }), + +/***/ "./node_modules/object-assign/index.js": +/*!*********************************************!*\ + !*** ./node_modules/object-assign/index.js ***! + \*********************************************/ +/***/ ((module) => { + +"use strict"; +eval("/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/object-assign/index.js?"); + +/***/ }), + +/***/ "./node_modules/prop-types/checkPropTypes.js": +/*!***************************************************!*\ + !*** ./node_modules/prop-types/checkPropTypes.js ***! + \***************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +"use strict"; +eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar printWarning = function() {};\n\nif (true) {\n var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ \"./node_modules/prop-types/lib/ReactPropTypesSecret.js\");\n var loggedTypeFailures = {};\n var has = __webpack_require__(/*! ./lib/has */ \"./node_modules/prop-types/lib/has.js\");\n\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) { /**/ }\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (true) {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error(\n (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +\n 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'\n );\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning(\n (componentName || 'React class') + ': type specification of ' +\n location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n 'You may have forgotten to pass an argument to the type checker ' +\n 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n 'shape all require an argument).'\n );\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n printWarning(\n 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n );\n }\n }\n }\n }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n if (true) {\n loggedTypeFailures = {};\n }\n}\n\nmodule.exports = checkPropTypes;\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/prop-types/checkPropTypes.js?"); + +/***/ }), + +/***/ "./node_modules/prop-types/lib/ReactPropTypesSecret.js": +/*!*************************************************************!*\ + !*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***! + \*************************************************************/ +/***/ ((module) => { + +"use strict"; +eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/prop-types/lib/ReactPropTypesSecret.js?"); + +/***/ }), + +/***/ "./node_modules/prop-types/lib/has.js": +/*!********************************************!*\ + !*** ./node_modules/prop-types/lib/has.js ***! + \********************************************/ +/***/ ((module) => { + +eval("module.exports = Function.call.bind(Object.prototype.hasOwnProperty);\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/prop-types/lib/has.js?"); + +/***/ }), + +/***/ "./node_modules/react-is/cjs/react-is.development.js": +/*!***********************************************************!*\ + !*** ./node_modules/react-is/cjs/react-is.development.js ***! + \***********************************************************/ +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; +eval("/** @license React v16.13.1\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\n\n\nif (true) {\n (function() {\n'use strict';\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\n// (unstable) APIs that have been removed. Can we remove the symbols?\n\nvar REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\nvar REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;\nvar REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;\nvar REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;\nvar REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;\n\nfunction isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_ASYNC_MODE_TYPE:\n case REACT_CONCURRENT_MODE_TYPE:\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n} // AsyncMode is deprecated along with isAsyncMode\n\nvar AsyncMode = REACT_ASYNC_MODE_TYPE;\nvar ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}\nfunction isConcurrentMode(object) {\n return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.AsyncMode = AsyncMode;\nexports.ConcurrentMode = ConcurrentMode;\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/react-is/cjs/react-is.development.js?"); + +/***/ }), + +/***/ "./node_modules/react-is/index.js": +/*!****************************************!*\ + !*** ./node_modules/react-is/index.js ***! + \****************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +"use strict"; +eval("\n\nif (false) {} else {\n module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ \"./node_modules/react-is/cjs/react-is.development.js\");\n}\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/react-is/index.js?"); + +/***/ }), + +/***/ "./node_modules/react/cjs/react.development.js": +/*!*****************************************************!*\ + !*** ./node_modules/react/cjs/react.development.js ***! + \*****************************************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +"use strict"; +eval("/** @license React v16.14.0\n * react.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\n\n\nif (true) {\n (function() {\n'use strict';\n\nvar _assign = __webpack_require__(/*! object-assign */ \"./node_modules/object-assign/index.js\");\nvar checkPropTypes = __webpack_require__(/*! prop-types/checkPropTypes */ \"./node_modules/prop-types/checkPropTypes.js\");\n\nvar ReactVersion = '16.14.0';\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\nvar REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;\nvar REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;\nvar REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;\nvar REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;\nvar MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\n/**\n * Keeps track of the current dispatcher.\n */\nvar ReactCurrentDispatcher = {\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n};\n\n/**\n * Keeps track of the current batch's configuration such as how long an update\n * should suspend for if it needs to.\n */\nvar ReactCurrentBatchConfig = {\n suspense: null\n};\n\n/**\n * Keeps track of the current owner.\n *\n * The current owner is the component who should own any components that are\n * currently being constructed.\n */\nvar ReactCurrentOwner = {\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n};\n\nvar BEFORE_SLASH_RE = /^(.*)[\\\\\\/]/;\nfunction describeComponentFrame (name, source, ownerName) {\n var sourceInfo = '';\n\n if (source) {\n var path = source.fileName;\n var fileName = path.replace(BEFORE_SLASH_RE, '');\n\n {\n // In DEV, include code for a common special case:\n // prefer \"folder/index.js\" instead of just \"index.js\".\n if (/^index\\./.test(fileName)) {\n var match = path.match(BEFORE_SLASH_RE);\n\n if (match) {\n var pathBeforeSlash = match[1];\n\n if (pathBeforeSlash) {\n var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');\n fileName = folderName + '/' + fileName;\n }\n }\n }\n }\n\n sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';\n } else if (ownerName) {\n sourceInfo = ' (created by ' + ownerName + ')';\n }\n\n return '\\n in ' + (name || 'Unknown') + sourceInfo;\n}\n\nvar Resolved = 1;\nfunction refineResolvedLazyComponent(lazyComponent) {\n return lazyComponent._status === Resolved ? lazyComponent._result : null;\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var functionName = innerType.displayName || innerType.name || '';\n return outerType.displayName || (functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName);\n}\n\nfunction getComponentName(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n return 'Context.Consumer';\n\n case REACT_PROVIDER_TYPE:\n return 'Context.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n return getComponentName(type.type);\n\n case REACT_BLOCK_TYPE:\n return getComponentName(type.render);\n\n case REACT_LAZY_TYPE:\n {\n var thenable = type;\n var resolvedThenable = refineResolvedLazyComponent(thenable);\n\n if (resolvedThenable) {\n return getComponentName(resolvedThenable);\n }\n\n break;\n }\n }\n }\n\n return null;\n}\n\nvar ReactDebugCurrentFrame = {};\nvar currentlyValidatingElement = null;\nfunction setCurrentlyValidatingElement(element) {\n {\n currentlyValidatingElement = element;\n }\n}\n\n{\n // Stack implementation injected by the current renderer.\n ReactDebugCurrentFrame.getCurrentStack = null;\n\n ReactDebugCurrentFrame.getStackAddendum = function () {\n var stack = ''; // Add an extra top frame while an element is being validated\n\n if (currentlyValidatingElement) {\n var name = getComponentName(currentlyValidatingElement.type);\n var owner = currentlyValidatingElement._owner;\n stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner.type));\n } // Delegate to the injected renderer-specific implementation\n\n\n var impl = ReactDebugCurrentFrame.getCurrentStack;\n\n if (impl) {\n stack += impl() || '';\n }\n\n return stack;\n };\n}\n\n/**\n * Used by act() to track whether you're inside an act() scope.\n */\nvar IsSomeRendererActing = {\n current: false\n};\n\nvar ReactSharedInternals = {\n ReactCurrentDispatcher: ReactCurrentDispatcher,\n ReactCurrentBatchConfig: ReactCurrentBatchConfig,\n ReactCurrentOwner: ReactCurrentOwner,\n IsSomeRendererActing: IsSomeRendererActing,\n // Used by renderers to avoid bundling object-assign twice in UMD bundles:\n assign: _assign\n};\n\n{\n _assign(ReactSharedInternals, {\n // These should not be included in production.\n ReactDebugCurrentFrame: ReactDebugCurrentFrame,\n // Shim for React DOM 16.0.0 which still destructured (but not used) this.\n // TODO: remove in React 17.0.\n ReactComponentTreeHook: {}\n });\n}\n\n// by calls to these methods by a Babel plugin.\n//\n// In PROD (or in packages without access to React internals),\n// they are left as they are instead.\n\nfunction warn(format) {\n {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n printWarning('warn', format, args);\n }\n}\nfunction error(format) {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var hasExistingStack = args.length > 0 && typeof args[args.length - 1] === 'string' && args[args.length - 1].indexOf('\\n in') === 0;\n\n if (!hasExistingStack) {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n }\n }\n\n var argsWithFormat = args.map(function (item) {\n return '' + item;\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n throw new Error(message);\n } catch (x) {}\n }\n}\n\nvar didWarnStateUpdateForUnmountedComponent = {};\n\nfunction warnNoop(publicInstance, callerName) {\n {\n var _constructor = publicInstance.constructor;\n var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';\n var warningKey = componentName + \".\" + callerName;\n\n if (didWarnStateUpdateForUnmountedComponent[warningKey]) {\n return;\n }\n\n error(\"Can't call %s on a component that is not yet mounted. \" + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);\n\n didWarnStateUpdateForUnmountedComponent[warningKey] = true;\n }\n}\n/**\n * This is the abstract API for an update queue.\n */\n\n\nvar ReactNoopUpdateQueue = {\n /**\n * Checks whether or not this composite component is mounted.\n * @param {ReactClass} publicInstance The instance we want to test.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function (publicInstance) {\n return false;\n },\n\n /**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueForceUpdate: function (publicInstance, callback, callerName) {\n warnNoop(publicInstance, 'forceUpdate');\n },\n\n /**\n * Replaces all of the state. Always use this or `setState` to mutate state.\n * You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} completeState Next state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {\n warnNoop(publicInstance, 'replaceState');\n },\n\n /**\n * Sets a subset of the state. This only exists because _pendingState is\n * internal. This provides a merging strategy that is not available to deep\n * properties which is confusing. TODO: Expose pendingState or don't use it\n * during the merge.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} partialState Next partial state to be merged with state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} Name of the calling function in the public API.\n * @internal\n */\n enqueueSetState: function (publicInstance, partialState, callback, callerName) {\n warnNoop(publicInstance, 'setState');\n }\n};\n\nvar emptyObject = {};\n\n{\n Object.freeze(emptyObject);\n}\n/**\n * Base class helpers for the updating state of a component.\n */\n\n\nfunction Component(props, context, updater) {\n this.props = props;\n this.context = context; // If a component has string refs, we will assign a different object later.\n\n this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the\n // renderer.\n\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nComponent.prototype.isReactComponent = {};\n/**\n * Sets a subset of the state. Always use this to mutate\n * state. You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * There is no guarantee that calls to `setState` will run synchronously,\n * as they may eventually be batched together. You can provide an optional\n * callback that will be executed when the call to setState is actually\n * completed.\n *\n * When a function is provided to setState, it will be called at some point in\n * the future (not synchronously). It will be called with the up to date\n * component arguments (state, props, context). These values can be different\n * from this.* because your function may be called after receiveProps but before\n * shouldComponentUpdate, and this new state, props, and context will not yet be\n * assigned to this.\n *\n * @param {object|function} partialState Next partial state or function to\n * produce next partial state to be merged with current state.\n * @param {?function} callback Called after state is updated.\n * @final\n * @protected\n */\n\nComponent.prototype.setState = function (partialState, callback) {\n if (!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null)) {\n {\n throw Error( \"setState(...): takes an object of state variables to update or a function which returns an object of state variables.\" );\n }\n }\n\n this.updater.enqueueSetState(this, partialState, callback, 'setState');\n};\n/**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {?function} callback Called after update is complete.\n * @final\n * @protected\n */\n\n\nComponent.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');\n};\n/**\n * Deprecated APIs. These APIs used to exist on classic React classes but since\n * we would like to deprecate them, we're not going to move them over to this\n * modern base class. Instead, we define a getter that warns if it's accessed.\n */\n\n\n{\n var deprecatedAPIs = {\n isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],\n replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']\n };\n\n var defineDeprecationWarning = function (methodName, info) {\n Object.defineProperty(Component.prototype, methodName, {\n get: function () {\n warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);\n\n return undefined;\n }\n });\n };\n\n for (var fnName in deprecatedAPIs) {\n if (deprecatedAPIs.hasOwnProperty(fnName)) {\n defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);\n }\n }\n}\n\nfunction ComponentDummy() {}\n\nComponentDummy.prototype = Component.prototype;\n/**\n * Convenience component with default shallow equality check for sCU.\n */\n\nfunction PureComponent(props, context, updater) {\n this.props = props;\n this.context = context; // If a component has string refs, we will assign a different object later.\n\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nvar pureComponentPrototype = PureComponent.prototype = new ComponentDummy();\npureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.\n\n_assign(pureComponentPrototype, Component.prototype);\n\npureComponentPrototype.isPureReactComponent = true;\n\n// an immutable object with a single mutable value\nfunction createRef() {\n var refObject = {\n current: null\n };\n\n {\n Object.seal(refObject);\n }\n\n return refObject;\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\nvar specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;\n\n{\n didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.key !== undefined;\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n var warnAboutAccessingKey = function () {\n {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);\n }\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n var warnAboutAccessingRef = function () {\n {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);\n }\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config) {\n {\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {\n var componentName = getComponentName(ReactCurrentOwner.current.type);\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://fb.me/react-strict-mode-string-ref', getComponentName(ReactCurrentOwner.current.type), config.ref);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n/**\n * Create and return a new ReactElement of the given type.\n * See https://reactjs.org/docs/react-api.html#createelement\n */\n\nfunction createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}\nfunction cloneAndReplaceKey(oldElement, newKey) {\n var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);\n return newElement;\n}\n/**\n * Clone and return a new ReactElement using element as the starting point.\n * See https://reactjs.org/docs/react-api.html#cloneelement\n */\n\nfunction cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\nfunction isValidElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\n\nvar SEPARATOR = '.';\nvar SUBSEPARATOR = ':';\n/**\n * Escape and wrap key so it is safe to use as a reactid\n *\n * @param {string} key to be escaped.\n * @return {string} the escaped key.\n */\n\nfunction escape(key) {\n var escapeRegex = /[=:]/g;\n var escaperLookup = {\n '=': '=0',\n ':': '=2'\n };\n var escapedString = ('' + key).replace(escapeRegex, function (match) {\n return escaperLookup[match];\n });\n return '$' + escapedString;\n}\n/**\n * TODO: Test that a single child and an array with one item have the same key\n * pattern.\n */\n\n\nvar didWarnAboutMaps = false;\nvar userProvidedKeyEscapeRegex = /\\/+/g;\n\nfunction escapeUserProvidedKey(text) {\n return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');\n}\n\nvar POOL_SIZE = 10;\nvar traverseContextPool = [];\n\nfunction getPooledTraverseContext(mapResult, keyPrefix, mapFunction, mapContext) {\n if (traverseContextPool.length) {\n var traverseContext = traverseContextPool.pop();\n traverseContext.result = mapResult;\n traverseContext.keyPrefix = keyPrefix;\n traverseContext.func = mapFunction;\n traverseContext.context = mapContext;\n traverseContext.count = 0;\n return traverseContext;\n } else {\n return {\n result: mapResult,\n keyPrefix: keyPrefix,\n func: mapFunction,\n context: mapContext,\n count: 0\n };\n }\n}\n\nfunction releaseTraverseContext(traverseContext) {\n traverseContext.result = null;\n traverseContext.keyPrefix = null;\n traverseContext.func = null;\n traverseContext.context = null;\n traverseContext.count = 0;\n\n if (traverseContextPool.length < POOL_SIZE) {\n traverseContextPool.push(traverseContext);\n }\n}\n/**\n * @param {?*} children Children tree container.\n * @param {!string} nameSoFar Name of the key path so far.\n * @param {!function} callback Callback to invoke with each child found.\n * @param {?*} traverseContext Used to pass information throughout the traversal\n * process.\n * @return {!number} The number of children in this subtree.\n */\n\n\nfunction traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {\n var type = typeof children;\n\n if (type === 'undefined' || type === 'boolean') {\n // All of the above are perceived as null.\n children = null;\n }\n\n var invokeCallback = false;\n\n if (children === null) {\n invokeCallback = true;\n } else {\n switch (type) {\n case 'string':\n case 'number':\n invokeCallback = true;\n break;\n\n case 'object':\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = true;\n }\n\n }\n }\n\n if (invokeCallback) {\n callback(traverseContext, children, // If it's the only child, treat the name as if it was wrapped in an array\n // so that it's consistent if the number of children grows.\n nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);\n return 1;\n }\n\n var child;\n var nextName;\n var subtreeCount = 0; // Count of children found in the current subtree.\n\n var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;\n\n if (Array.isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n nextName = nextNamePrefix + getComponentKey(child, i);\n subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);\n }\n } else {\n var iteratorFn = getIteratorFn(children);\n\n if (typeof iteratorFn === 'function') {\n\n {\n // Warn about using Maps as children\n if (iteratorFn === children.entries) {\n if (!didWarnAboutMaps) {\n warn('Using Maps as children is deprecated and will be removed in ' + 'a future major release. Consider converting children to ' + 'an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n }\n }\n\n var iterator = iteratorFn.call(children);\n var step;\n var ii = 0;\n\n while (!(step = iterator.next()).done) {\n child = step.value;\n nextName = nextNamePrefix + getComponentKey(child, ii++);\n subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);\n }\n } else if (type === 'object') {\n var addendum = '';\n\n {\n addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + ReactDebugCurrentFrame.getStackAddendum();\n }\n\n var childrenString = '' + children;\n\n {\n {\n throw Error( \"Objects are not valid as a React child (found: \" + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + \").\" + addendum );\n }\n }\n }\n }\n\n return subtreeCount;\n}\n/**\n * Traverses children that are typically specified as `props.children`, but\n * might also be specified through attributes:\n *\n * - `traverseAllChildren(this.props.children, ...)`\n * - `traverseAllChildren(this.props.leftPanelChildren, ...)`\n *\n * The `traverseContext` is an optional argument that is passed through the\n * entire traversal. It can be used to store accumulations or anything else that\n * the callback might find relevant.\n *\n * @param {?*} children Children tree object.\n * @param {!function} callback To invoke upon traversing each child.\n * @param {?*} traverseContext Context for traversal.\n * @return {!number} The number of children in this subtree.\n */\n\n\nfunction traverseAllChildren(children, callback, traverseContext) {\n if (children == null) {\n return 0;\n }\n\n return traverseAllChildrenImpl(children, '', callback, traverseContext);\n}\n/**\n * Generate a key string that identifies a component within a set.\n *\n * @param {*} component A component that could contain a manual key.\n * @param {number} index Index that is used if a manual key is not provided.\n * @return {string}\n */\n\n\nfunction getComponentKey(component, index) {\n // Do some typechecking here since we call this blindly. We want to ensure\n // that we don't block potential future ES APIs.\n if (typeof component === 'object' && component !== null && component.key != null) {\n // Explicit key\n return escape(component.key);\n } // Implicit key determined by the index in the set\n\n\n return index.toString(36);\n}\n\nfunction forEachSingleChild(bookKeeping, child, name) {\n var func = bookKeeping.func,\n context = bookKeeping.context;\n func.call(context, child, bookKeeping.count++);\n}\n/**\n * Iterates through children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenforeach\n *\n * The provided forEachFunc(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} forEachFunc\n * @param {*} forEachContext Context for forEachContext.\n */\n\n\nfunction forEachChildren(children, forEachFunc, forEachContext) {\n if (children == null) {\n return children;\n }\n\n var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext);\n traverseAllChildren(children, forEachSingleChild, traverseContext);\n releaseTraverseContext(traverseContext);\n}\n\nfunction mapSingleChildIntoContext(bookKeeping, child, childKey) {\n var result = bookKeeping.result,\n keyPrefix = bookKeeping.keyPrefix,\n func = bookKeeping.func,\n context = bookKeeping.context;\n var mappedChild = func.call(context, child, bookKeeping.count++);\n\n if (Array.isArray(mappedChild)) {\n mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, function (c) {\n return c;\n });\n } else if (mappedChild != null) {\n if (isValidElement(mappedChild)) {\n mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as\n // traverseAllChildren used to do for objects as children\n keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);\n }\n\n result.push(mappedChild);\n }\n}\n\nfunction mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {\n var escapedPrefix = '';\n\n if (prefix != null) {\n escapedPrefix = escapeUserProvidedKey(prefix) + '/';\n }\n\n var traverseContext = getPooledTraverseContext(array, escapedPrefix, func, context);\n traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);\n releaseTraverseContext(traverseContext);\n}\n/**\n * Maps children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenmap\n *\n * The provided mapFunction(child, key, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} func The map function.\n * @param {*} context Context for mapFunction.\n * @return {object} Object containing the ordered map of results.\n */\n\n\nfunction mapChildren(children, func, context) {\n if (children == null) {\n return children;\n }\n\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, func, context);\n return result;\n}\n/**\n * Count the number of children that are typically specified as\n * `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrencount\n *\n * @param {?*} children Children tree container.\n * @return {number} The number of children.\n */\n\n\nfunction countChildren(children) {\n return traverseAllChildren(children, function () {\n return null;\n }, null);\n}\n/**\n * Flatten a children object (typically specified as `props.children`) and\n * return an array with appropriately re-keyed children.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrentoarray\n */\n\n\nfunction toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, function (child) {\n return child;\n });\n return result;\n}\n/**\n * Returns the first child in a collection of children and verifies that there\n * is only one child in the collection.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenonly\n *\n * The current implementation of this function assumes that a single child gets\n * passed without a wrapper, but the purpose of this helper function is to\n * abstract away the particular structure of children.\n *\n * @param {?object} children Child collection structure.\n * @return {ReactElement} The first and only `ReactElement` contained in the\n * structure.\n */\n\n\nfunction onlyChild(children) {\n if (!isValidElement(children)) {\n {\n throw Error( \"React.Children.only expected to receive a single React element child.\" );\n }\n }\n\n return children;\n}\n\nfunction createContext(defaultValue, calculateChangedBits) {\n if (calculateChangedBits === undefined) {\n calculateChangedBits = null;\n } else {\n {\n if (calculateChangedBits !== null && typeof calculateChangedBits !== 'function') {\n error('createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits);\n }\n }\n }\n\n var context = {\n $$typeof: REACT_CONTEXT_TYPE,\n _calculateChangedBits: calculateChangedBits,\n // As a workaround to support multiple concurrent renderers, we categorize\n // some renderers as primary and others as secondary. We only expect\n // there to be two concurrent renderers at most: React Native (primary) and\n // Fabric (secondary); React DOM (primary) and React ART (secondary).\n // Secondary renderers store their context values on separate fields.\n _currentValue: defaultValue,\n _currentValue2: defaultValue,\n // Used to track how many concurrent renderers this context currently\n // supports within in a single renderer. Such as parallel server rendering.\n _threadCount: 0,\n // These are circular\n Provider: null,\n Consumer: null\n };\n context.Provider = {\n $$typeof: REACT_PROVIDER_TYPE,\n _context: context\n };\n var hasWarnedAboutUsingNestedContextConsumers = false;\n var hasWarnedAboutUsingConsumerProvider = false;\n\n {\n // A separate object, but proxies back to the original context object for\n // backwards compatibility. It has a different $$typeof, so we can properly\n // warn for the incorrect usage of Context as a Consumer.\n var Consumer = {\n $$typeof: REACT_CONTEXT_TYPE,\n _context: context,\n _calculateChangedBits: context._calculateChangedBits\n }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here\n\n Object.defineProperties(Consumer, {\n Provider: {\n get: function () {\n if (!hasWarnedAboutUsingConsumerProvider) {\n hasWarnedAboutUsingConsumerProvider = true;\n\n error('Rendering is not supported and will be removed in ' + 'a future major release. Did you mean to render instead?');\n }\n\n return context.Provider;\n },\n set: function (_Provider) {\n context.Provider = _Provider;\n }\n },\n _currentValue: {\n get: function () {\n return context._currentValue;\n },\n set: function (_currentValue) {\n context._currentValue = _currentValue;\n }\n },\n _currentValue2: {\n get: function () {\n return context._currentValue2;\n },\n set: function (_currentValue2) {\n context._currentValue2 = _currentValue2;\n }\n },\n _threadCount: {\n get: function () {\n return context._threadCount;\n },\n set: function (_threadCount) {\n context._threadCount = _threadCount;\n }\n },\n Consumer: {\n get: function () {\n if (!hasWarnedAboutUsingNestedContextConsumers) {\n hasWarnedAboutUsingNestedContextConsumers = true;\n\n error('Rendering is not supported and will be removed in ' + 'a future major release. Did you mean to render instead?');\n }\n\n return context.Consumer;\n }\n }\n }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty\n\n context.Consumer = Consumer;\n }\n\n {\n context._currentRenderer = null;\n context._currentRenderer2 = null;\n }\n\n return context;\n}\n\nfunction lazy(ctor) {\n var lazyType = {\n $$typeof: REACT_LAZY_TYPE,\n _ctor: ctor,\n // React uses these fields to store the result.\n _status: -1,\n _result: null\n };\n\n {\n // In production, this would just set it on the object.\n var defaultProps;\n var propTypes;\n Object.defineProperties(lazyType, {\n defaultProps: {\n configurable: true,\n get: function () {\n return defaultProps;\n },\n set: function (newDefaultProps) {\n error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');\n\n defaultProps = newDefaultProps; // Match production behavior more closely:\n\n Object.defineProperty(lazyType, 'defaultProps', {\n enumerable: true\n });\n }\n },\n propTypes: {\n configurable: true,\n get: function () {\n return propTypes;\n },\n set: function (newPropTypes) {\n error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');\n\n propTypes = newPropTypes; // Match production behavior more closely:\n\n Object.defineProperty(lazyType, 'propTypes', {\n enumerable: true\n });\n }\n }\n });\n }\n\n return lazyType;\n}\n\nfunction forwardRef(render) {\n {\n if (render != null && render.$$typeof === REACT_MEMO_TYPE) {\n error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');\n } else if (typeof render !== 'function') {\n error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);\n } else {\n if (render.length !== 0 && render.length !== 2) {\n error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.');\n }\n }\n\n if (render != null) {\n if (render.defaultProps != null || render.propTypes != null) {\n error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');\n }\n }\n }\n\n return {\n $$typeof: REACT_FORWARD_REF_TYPE,\n render: render\n };\n}\n\nfunction isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);\n}\n\nfunction memo(type, compare) {\n {\n if (!isValidElementType(type)) {\n error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);\n }\n }\n\n return {\n $$typeof: REACT_MEMO_TYPE,\n type: type,\n compare: compare === undefined ? null : compare\n };\n}\n\nfunction resolveDispatcher() {\n var dispatcher = ReactCurrentDispatcher.current;\n\n if (!(dispatcher !== null)) {\n {\n throw Error( \"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.\" );\n }\n }\n\n return dispatcher;\n}\n\nfunction useContext(Context, unstable_observedBits) {\n var dispatcher = resolveDispatcher();\n\n {\n if (unstable_observedBits !== undefined) {\n error('useContext() second argument is reserved for future ' + 'use in React. Passing it is not supported. ' + 'You passed: %s.%s', unstable_observedBits, typeof unstable_observedBits === 'number' && Array.isArray(arguments[2]) ? '\\n\\nDid you call array.map(useContext)? ' + 'Calling Hooks inside a loop is not supported. ' + 'Learn more at https://fb.me/rules-of-hooks' : '');\n } // TODO: add a more generic warning for invalid values.\n\n\n if (Context._context !== undefined) {\n var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs\n // and nobody should be using this in existing code.\n\n if (realContext.Consumer === Context) {\n error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');\n } else if (realContext.Provider === Context) {\n error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');\n }\n }\n }\n\n return dispatcher.useContext(Context, unstable_observedBits);\n}\nfunction useState(initialState) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useState(initialState);\n}\nfunction useReducer(reducer, initialArg, init) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useReducer(reducer, initialArg, init);\n}\nfunction useRef(initialValue) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useRef(initialValue);\n}\nfunction useEffect(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useEffect(create, deps);\n}\nfunction useLayoutEffect(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useLayoutEffect(create, deps);\n}\nfunction useCallback(callback, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useCallback(callback, deps);\n}\nfunction useMemo(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useMemo(create, deps);\n}\nfunction useImperativeHandle(ref, create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useImperativeHandle(ref, create, deps);\n}\nfunction useDebugValue(value, formatterFn) {\n {\n var dispatcher = resolveDispatcher();\n return dispatcher.useDebugValue(value, formatterFn);\n }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n propTypesMisspellWarningShown = false;\n}\n\nfunction getDeclarationErrorAddendum() {\n if (ReactCurrentOwner.current) {\n var name = getComponentName(ReactCurrentOwner.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n}\n\nfunction getSourceInfoErrorAddendumForProps(elementProps) {\n if (elementProps !== null && elementProps !== undefined) {\n return getSourceInfoErrorAddendum(elementProps.__source);\n }\n\n return '';\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentName(element._owner.type) + \".\";\n }\n\n setCurrentlyValidatingElement(element);\n\n {\n error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.', currentComponentErrorInfo, childOwner);\n }\n\n setCurrentlyValidatingElement(null);\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n if (typeof node !== 'object') {\n return;\n }\n\n if (Array.isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n var name = getComponentName(type);\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n setCurrentlyValidatingElement(element);\n checkPropTypes(propTypes, element.props, 'prop', name, ReactDebugCurrentFrame.getStackAddendum);\n setCurrentlyValidatingElement(null);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true;\n\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n }\n }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n {\n setCurrentlyValidatingElement(fragment);\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n break;\n }\n }\n\n if (fragment.ref !== null) {\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\n }\n\n setCurrentlyValidatingElement(null);\n }\n}\nfunction createElementWithValidation(type, props, children) {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendumForProps(props);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (Array.isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentName(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n {\n error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n }\n\n var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n for (var i = 2; i < arguments.length; i++) {\n validateChildKeys(arguments[i], type);\n }\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n}\nvar didWarnAboutDeprecatedCreateFactory = false;\nfunction createFactoryWithValidation(type) {\n var validatedFactory = createElementWithValidation.bind(null, type);\n validatedFactory.type = type;\n\n {\n if (!didWarnAboutDeprecatedCreateFactory) {\n didWarnAboutDeprecatedCreateFactory = true;\n\n warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');\n } // Legacy hook: remove it\n\n\n Object.defineProperty(validatedFactory, 'type', {\n enumerable: false,\n get: function () {\n warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');\n\n Object.defineProperty(this, 'type', {\n value: type\n });\n return type;\n }\n });\n }\n\n return validatedFactory;\n}\nfunction cloneElementWithValidation(element, props, children) {\n var newElement = cloneElement.apply(this, arguments);\n\n for (var i = 2; i < arguments.length; i++) {\n validateChildKeys(arguments[i], newElement.type);\n }\n\n validatePropTypes(newElement);\n return newElement;\n}\n\n{\n\n try {\n var frozenObject = Object.freeze({});\n var testMap = new Map([[frozenObject, null]]);\n var testSet = new Set([frozenObject]); // This is necessary for Rollup to not consider these unused.\n // https://github.com/rollup/rollup/issues/1771\n // TODO: we can remove these if Rollup fixes the bug.\n\n testMap.set(0, 0);\n testSet.add(0);\n } catch (e) {\n }\n}\n\nvar createElement$1 = createElementWithValidation ;\nvar cloneElement$1 = cloneElementWithValidation ;\nvar createFactory = createFactoryWithValidation ;\nvar Children = {\n map: mapChildren,\n forEach: forEachChildren,\n count: countChildren,\n toArray: toArray,\n only: onlyChild\n};\n\nexports.Children = Children;\nexports.Component = Component;\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.Profiler = REACT_PROFILER_TYPE;\nexports.PureComponent = PureComponent;\nexports.StrictMode = REACT_STRICT_MODE_TYPE;\nexports.Suspense = REACT_SUSPENSE_TYPE;\nexports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;\nexports.cloneElement = cloneElement$1;\nexports.createContext = createContext;\nexports.createElement = createElement$1;\nexports.createFactory = createFactory;\nexports.createRef = createRef;\nexports.forwardRef = forwardRef;\nexports.isValidElement = isValidElement;\nexports.lazy = lazy;\nexports.memo = memo;\nexports.useCallback = useCallback;\nexports.useContext = useContext;\nexports.useDebugValue = useDebugValue;\nexports.useEffect = useEffect;\nexports.useImperativeHandle = useImperativeHandle;\nexports.useLayoutEffect = useLayoutEffect;\nexports.useMemo = useMemo;\nexports.useReducer = useReducer;\nexports.useRef = useRef;\nexports.useState = useState;\nexports.version = ReactVersion;\n })();\n}\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/react/cjs/react.development.js?"); + +/***/ }), + +/***/ "./node_modules/react/index.js": +/*!*************************************!*\ + !*** ./node_modules/react/index.js ***! + \*************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +"use strict"; +eval("\n\nif (false) {} else {\n module.exports = __webpack_require__(/*! ./cjs/react.development.js */ \"./node_modules/react/cjs/react.development.js\");\n}\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/react/index.js?"); + +/***/ }), + +/***/ "./node_modules/streamlit-component-lib/dist/ArrowTable.js": +/*!*****************************************************************!*\ + !*** ./node_modules/streamlit-component-lib/dist/ArrowTable.js ***! + \*****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ArrowTable: () => (/* binding */ ArrowTable)\n/* harmony export */ });\n/* harmony import */ var apache_arrow__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! apache-arrow */ \"./node_modules/apache-arrow/enum.mjs\");\n/* harmony import */ var apache_arrow__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! apache-arrow */ \"./node_modules/apache-arrow/ipc/serialization.mjs\");\n/**\n * Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar ArrowTable = /** @class */ (function () {\n function ArrowTable(dataBuffer, indexBuffer, columnsBuffer, styler) {\n var _this = this;\n this.getCell = function (rowIndex, columnIndex) {\n var isBlankCell = rowIndex < _this.headerRows && columnIndex < _this.headerColumns;\n var isIndexCell = rowIndex >= _this.headerRows && columnIndex < _this.headerColumns;\n var isColumnsCell = rowIndex < _this.headerRows && columnIndex >= _this.headerColumns;\n if (isBlankCell) {\n var classNames = [\"blank\"];\n if (columnIndex > 0) {\n classNames.push(\"level\" + rowIndex);\n }\n return {\n type: \"blank\",\n classNames: classNames.join(\" \"),\n content: \"\"\n };\n }\n else if (isColumnsCell) {\n var dataColumnIndex = columnIndex - _this.headerColumns;\n var classNames = [\n \"col_heading\",\n \"level\" + rowIndex,\n \"col\" + dataColumnIndex\n ];\n return {\n type: \"columns\",\n classNames: classNames.join(\" \"),\n content: _this.getContent(_this.columnsTable, dataColumnIndex, rowIndex)\n };\n }\n else if (isIndexCell) {\n var dataRowIndex = rowIndex - _this.headerRows;\n var classNames = [\n \"row_heading\",\n \"level\" + columnIndex,\n \"row\" + dataRowIndex\n ];\n return {\n type: \"index\",\n id: \"T_\".concat(_this.uuid, \"level\").concat(columnIndex, \"_row\").concat(dataRowIndex),\n classNames: classNames.join(\" \"),\n content: _this.getContent(_this.indexTable, dataRowIndex, columnIndex)\n };\n }\n else {\n var dataRowIndex = rowIndex - _this.headerRows;\n var dataColumnIndex = columnIndex - _this.headerColumns;\n var classNames = [\n \"data\",\n \"row\" + dataRowIndex,\n \"col\" + dataColumnIndex\n ];\n var content = _this.styler\n ? _this.getContent(_this.styler.displayValuesTable, dataRowIndex, dataColumnIndex)\n : _this.getContent(_this.dataTable, dataRowIndex, dataColumnIndex);\n return {\n type: \"data\",\n id: \"T_\".concat(_this.uuid, \"row\").concat(dataRowIndex, \"_col\").concat(dataColumnIndex),\n classNames: classNames.join(\" \"),\n content: content\n };\n }\n };\n this.getContent = function (table, rowIndex, columnIndex) {\n var column = table.getChildAt(columnIndex);\n if (column === null) {\n return \"\";\n }\n var columnTypeId = _this.getColumnTypeId(table, columnIndex);\n switch (columnTypeId) {\n case apache_arrow__WEBPACK_IMPORTED_MODULE_0__.Type.Timestamp: {\n return _this.nanosToDate(column.get(rowIndex));\n }\n default: {\n return column.get(rowIndex);\n }\n }\n };\n this.dataTable = (0,apache_arrow__WEBPACK_IMPORTED_MODULE_1__.tableFromIPC)(dataBuffer);\n this.indexTable = (0,apache_arrow__WEBPACK_IMPORTED_MODULE_1__.tableFromIPC)(indexBuffer);\n this.columnsTable = (0,apache_arrow__WEBPACK_IMPORTED_MODULE_1__.tableFromIPC)(columnsBuffer);\n this.styler = styler\n ? {\n caption: styler.caption,\n displayValuesTable: (0,apache_arrow__WEBPACK_IMPORTED_MODULE_1__.tableFromIPC)(styler.displayValues),\n styles: styler.styles,\n uuid: styler.uuid\n }\n : undefined;\n }\n Object.defineProperty(ArrowTable.prototype, \"rows\", {\n get: function () {\n return this.indexTable.numRows + this.columnsTable.numCols;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ArrowTable.prototype, \"columns\", {\n get: function () {\n return this.indexTable.numCols + this.columnsTable.numRows;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ArrowTable.prototype, \"headerRows\", {\n get: function () {\n return this.rows - this.dataRows;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ArrowTable.prototype, \"headerColumns\", {\n get: function () {\n return this.columns - this.dataColumns;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ArrowTable.prototype, \"dataRows\", {\n get: function () {\n return this.dataTable.numRows;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ArrowTable.prototype, \"dataColumns\", {\n get: function () {\n return this.dataTable.numCols;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ArrowTable.prototype, \"uuid\", {\n get: function () {\n return this.styler && this.styler.uuid;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ArrowTable.prototype, \"caption\", {\n get: function () {\n return this.styler && this.styler.caption;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ArrowTable.prototype, \"styles\", {\n get: function () {\n return this.styler && this.styler.styles;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ArrowTable.prototype, \"table\", {\n get: function () {\n return this.dataTable;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ArrowTable.prototype, \"index\", {\n get: function () {\n return this.indexTable;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ArrowTable.prototype, \"columnTable\", {\n get: function () {\n return this.columnsTable;\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Serialize arrow table.\n */\n ArrowTable.prototype.serialize = function () {\n return {\n data: (0,apache_arrow__WEBPACK_IMPORTED_MODULE_1__.tableToIPC)(this.dataTable),\n index: (0,apache_arrow__WEBPACK_IMPORTED_MODULE_1__.tableToIPC)(this.indexTable),\n columns: (0,apache_arrow__WEBPACK_IMPORTED_MODULE_1__.tableToIPC)(this.columnsTable)\n };\n };\n /**\n * Returns apache-arrow specific typeId of column.\n */\n ArrowTable.prototype.getColumnTypeId = function (table, columnIndex) {\n return table.schema.fields[columnIndex].type.typeId;\n };\n ArrowTable.prototype.nanosToDate = function (nanos) {\n return new Date(nanos / 1e6);\n };\n return ArrowTable;\n}());\n\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/streamlit-component-lib/dist/ArrowTable.js?"); + +/***/ }), + +/***/ "./node_modules/streamlit-component-lib/dist/StreamlitReact.js": +/*!*********************************************************************!*\ + !*** ./node_modules/streamlit-component-lib/dist/StreamlitReact.js ***! + \*********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ StreamlitComponentBase: () => (/* binding */ StreamlitComponentBase),\n/* harmony export */ withStreamlitConnection: () => (/* binding */ withStreamlitConnection)\n/* harmony export */ });\n/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! hoist-non-react-statics */ \"./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js\");\n/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var _streamlit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./streamlit */ \"./node_modules/streamlit-component-lib/dist/streamlit.js\");\n/**\n * Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\n\n/**\n * Optional Streamlit React-based component base class.\n *\n * You are not required to extend this base class to create a Streamlit\n * component. If you decide not to extend it, you should implement the\n * `componentDidMount` and `componentDidUpdate` functions in your own class,\n * so that your plugin properly resizes.\n */\nvar StreamlitComponentBase = /** @class */ (function (_super) {\n __extends(StreamlitComponentBase, _super);\n function StreamlitComponentBase() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n StreamlitComponentBase.prototype.componentDidMount = function () {\n // After we're rendered for the first time, tell Streamlit that our height\n // has changed.\n _streamlit__WEBPACK_IMPORTED_MODULE_2__.Streamlit.setFrameHeight();\n };\n StreamlitComponentBase.prototype.componentDidUpdate = function () {\n // After we're updated, tell Streamlit that our height may have changed.\n _streamlit__WEBPACK_IMPORTED_MODULE_2__.Streamlit.setFrameHeight();\n };\n return StreamlitComponentBase;\n}(react__WEBPACK_IMPORTED_MODULE_1__.PureComponent));\n\n/**\n * Wrapper for React-based Streamlit components.\n *\n * Bootstraps the communication interface between Streamlit and the component.\n */\nfunction withStreamlitConnection(WrappedComponent) {\n var ComponentWrapper = /** @class */ (function (_super) {\n __extends(ComponentWrapper, _super);\n function ComponentWrapper(props) {\n var _this = _super.call(this, props) || this;\n _this.componentDidMount = function () {\n // Set up event listeners, and signal to Streamlit that we're ready.\n // We won't render the component until we receive the first RENDER_EVENT.\n _streamlit__WEBPACK_IMPORTED_MODULE_2__.Streamlit.events.addEventListener(_streamlit__WEBPACK_IMPORTED_MODULE_2__.Streamlit.RENDER_EVENT, _this.onRenderEvent);\n _streamlit__WEBPACK_IMPORTED_MODULE_2__.Streamlit.setComponentReady();\n };\n _this.componentDidUpdate = function () {\n // If our child threw an error, we display it in render(). In this\n // case, the child won't be mounted and therefore won't call\n // `setFrameHeight` on its own. We do it here so that the rendered\n // error will be visible.\n if (_this.state.componentError != null) {\n _streamlit__WEBPACK_IMPORTED_MODULE_2__.Streamlit.setFrameHeight();\n }\n };\n _this.componentWillUnmount = function () {\n _streamlit__WEBPACK_IMPORTED_MODULE_2__.Streamlit.events.removeEventListener(_streamlit__WEBPACK_IMPORTED_MODULE_2__.Streamlit.RENDER_EVENT, _this.onRenderEvent);\n };\n /**\n * Streamlit is telling this component to redraw.\n * We save the render data in State, so that it can be passed to the\n * component in our own render() function.\n */\n _this.onRenderEvent = function (event) {\n // Update our state with the newest render data\n _this.setState({ renderData: event.detail });\n };\n _this.state = {\n renderData: undefined,\n componentError: undefined\n };\n return _this;\n }\n ComponentWrapper.prototype.render = function () {\n // If our wrapped component threw an error, display it.\n if (this.state.componentError != null) {\n return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"div\", null,\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"h1\", null, \"Component Error\"),\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"span\", null, this.state.componentError.message)));\n }\n // Don't render until we've gotten our first RENDER_EVENT from Streamlit.\n if (this.state.renderData == null) {\n return null;\n }\n return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(WrappedComponent, { width: window.innerWidth, disabled: this.state.renderData.disabled, args: this.state.renderData.args, theme: this.state.renderData.theme }));\n };\n /**\n * Error boundary function. This will be called if our wrapped\n * component throws an error. We store the caught error in our state,\n * and display it in the next render().\n */\n ComponentWrapper.getDerivedStateFromError = function (error) {\n return { componentError: error };\n };\n return ComponentWrapper;\n }(react__WEBPACK_IMPORTED_MODULE_1__.PureComponent));\n return hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_0___default()(ComponentWrapper, WrappedComponent);\n}\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/streamlit-component-lib/dist/StreamlitReact.js?"); + +/***/ }), + +/***/ "./node_modules/streamlit-component-lib/dist/index.js": +/*!************************************************************!*\ + !*** ./node_modules/streamlit-component-lib/dist/index.js ***! + \************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ArrowTable: () => (/* reexport safe */ _ArrowTable__WEBPACK_IMPORTED_MODULE_1__.ArrowTable),\n/* harmony export */ Streamlit: () => (/* reexport safe */ _streamlit__WEBPACK_IMPORTED_MODULE_2__.Streamlit),\n/* harmony export */ StreamlitComponentBase: () => (/* reexport safe */ _StreamlitReact__WEBPACK_IMPORTED_MODULE_0__.StreamlitComponentBase),\n/* harmony export */ withStreamlitConnection: () => (/* reexport safe */ _StreamlitReact__WEBPACK_IMPORTED_MODULE_0__.withStreamlitConnection)\n/* harmony export */ });\n/* harmony import */ var _StreamlitReact__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./StreamlitReact */ \"./node_modules/streamlit-component-lib/dist/StreamlitReact.js\");\n/* harmony import */ var _ArrowTable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ArrowTable */ \"./node_modules/streamlit-component-lib/dist/ArrowTable.js\");\n/* harmony import */ var _streamlit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./streamlit */ \"./node_modules/streamlit-component-lib/dist/streamlit.js\");\n/**\n * Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/streamlit-component-lib/dist/index.js?"); + +/***/ }), + +/***/ "./node_modules/streamlit-component-lib/dist/streamlit.js": +/*!****************************************************************!*\ + !*** ./node_modules/streamlit-component-lib/dist/streamlit.js ***! + \****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Streamlit: () => (/* binding */ Streamlit)\n/* harmony export */ });\n/* harmony import */ var _ArrowTable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ArrowTable */ \"./node_modules/streamlit-component-lib/dist/ArrowTable.js\");\n/**\n * Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __assign = (undefined && undefined.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\n// Safari doesn't support the EventTarget class, so we use a shim.\n\n/** Messages from Component -> Streamlit */\nvar ComponentMessageType;\n(function (ComponentMessageType) {\n // A component sends this message when it's ready to receive messages\n // from Streamlit. Streamlit won't send any messages until it gets this.\n // Data: { apiVersion: number }\n ComponentMessageType[\"COMPONENT_READY\"] = \"streamlit:componentReady\";\n // The component has a new widget value. Send it back to Streamlit, which\n // will then re-run the app.\n // Data: { value: any }\n ComponentMessageType[\"SET_COMPONENT_VALUE\"] = \"streamlit:setComponentValue\";\n // The component has a new height for its iframe.\n // Data: { height: number }\n ComponentMessageType[\"SET_FRAME_HEIGHT\"] = \"streamlit:setFrameHeight\";\n})(ComponentMessageType || (ComponentMessageType = {}));\n/**\n * Streamlit communication API.\n *\n * Components can send data to Streamlit via the functions defined here,\n * and receive data from Streamlit via the `events` property.\n */\nvar Streamlit = /** @class */ (function () {\n function Streamlit() {\n }\n /**\n * The Streamlit component API version we're targeting.\n * There's currently only 1!\n */\n Streamlit.API_VERSION = 1;\n Streamlit.RENDER_EVENT = \"streamlit:render\";\n /** Dispatches events received from Streamlit. */\n Streamlit.events = new EventTarget();\n Streamlit.registeredMessageListener = false;\n /**\n * Tell Streamlit that the component is ready to start receiving data.\n * Streamlit will defer emitting RENDER events until it receives the\n * COMPONENT_READY message.\n */\n Streamlit.setComponentReady = function () {\n if (!Streamlit.registeredMessageListener) {\n // Register for message events if we haven't already\n window.addEventListener(\"message\", Streamlit.onMessageEvent);\n Streamlit.registeredMessageListener = true;\n }\n Streamlit.sendBackMsg(ComponentMessageType.COMPONENT_READY, {\n apiVersion: Streamlit.API_VERSION\n });\n };\n /**\n * Report the component's height to Streamlit.\n * This should be called every time the component changes its DOM - that is,\n * when it's first loaded, and any time it updates.\n */\n Streamlit.setFrameHeight = function (height) {\n if (height === undefined) {\n // `height` is optional. If undefined, it defaults to scrollHeight,\n // which is the entire height of the element minus its border,\n // scrollbar, and margin.\n height = document.body.scrollHeight;\n }\n if (height === Streamlit.lastFrameHeight) {\n // Don't bother updating if our height hasn't changed.\n return;\n }\n Streamlit.lastFrameHeight = height;\n Streamlit.sendBackMsg(ComponentMessageType.SET_FRAME_HEIGHT, { height: height });\n };\n /**\n * Set the component's value. This value will be returned to the Python\n * script, and the script will be re-run.\n *\n * For example:\n *\n * JavaScript:\n * Streamlit.setComponentValue(\"ahoy!\")\n *\n * Python:\n * value = st.my_component(...)\n * st.write(value) # -> \"ahoy!\"\n *\n * The value must be an ArrowTable, a typed array, an ArrayBuffer, or be\n * serializable to JSON.\n */\n Streamlit.setComponentValue = function (value) {\n var dataType;\n if (value instanceof _ArrowTable__WEBPACK_IMPORTED_MODULE_0__.ArrowTable) {\n dataType = \"dataframe\";\n value = value.serialize();\n }\n else if (isTypedArray(value)) {\n // All typed arrays get sent as Uint8Array, because that's what our\n // protobuf library uses for the \"bytes\" field type.\n dataType = \"bytes\";\n value = new Uint8Array(value.buffer);\n }\n else if (value instanceof ArrayBuffer) {\n dataType = \"bytes\";\n value = new Uint8Array(value);\n }\n else {\n dataType = \"json\";\n }\n Streamlit.sendBackMsg(ComponentMessageType.SET_COMPONENT_VALUE, {\n value: value,\n dataType: dataType\n });\n };\n /** Receive a ForwardMsg from the Streamlit app */\n Streamlit.onMessageEvent = function (event) {\n var type = event.data[\"type\"];\n switch (type) {\n case Streamlit.RENDER_EVENT:\n Streamlit.onRenderMessage(event.data);\n break;\n }\n };\n /**\n * Handle an untyped Streamlit render event and redispatch it as a\n * StreamlitRenderEvent.\n */\n Streamlit.onRenderMessage = function (data) {\n var args = data[\"args\"];\n if (args == null) {\n console.error(\"Got null args in onRenderMessage. This should never happen\");\n args = {};\n }\n // Parse our dataframe arguments with arrow, and merge them into our args dict\n var dataframeArgs = data[\"dfs\"] && data[\"dfs\"].length > 0\n ? Streamlit.argsDataframeToObject(data[\"dfs\"])\n : {};\n args = __assign(__assign({}, args), dataframeArgs);\n var disabled = Boolean(data[\"disabled\"]);\n var theme = data[\"theme\"];\n if (theme) {\n _injectTheme(theme);\n }\n // Dispatch a render event!\n var eventData = { disabled: disabled, args: args, theme: theme };\n var event = new CustomEvent(Streamlit.RENDER_EVENT, {\n detail: eventData\n });\n Streamlit.events.dispatchEvent(event);\n };\n Streamlit.argsDataframeToObject = function (argsDataframe) {\n var argsDataframeArrow = argsDataframe.map(function (_a) {\n var key = _a.key, value = _a.value;\n return [key, Streamlit.toArrowTable(value)];\n });\n return Object.fromEntries(argsDataframeArrow);\n };\n Streamlit.toArrowTable = function (df) {\n var _a;\n var data = (_a = df.data, _a.data), index = _a.index, columns = _a.columns, styler = _a.styler;\n return new _ArrowTable__WEBPACK_IMPORTED_MODULE_0__.ArrowTable(data, index, columns, styler);\n };\n /** Post a message to the Streamlit app. */\n Streamlit.sendBackMsg = function (type, data) {\n window.parent.postMessage(__assign({ isStreamlitMessage: true, type: type }, data), \"*\");\n };\n return Streamlit;\n}());\nvar _injectTheme = function (theme) {\n var style = document.createElement(\"style\");\n document.head.appendChild(style);\n style.innerHTML = \"\\n :root {\\n --primary-color: \".concat(theme.primaryColor, \";\\n --background-color: \").concat(theme.backgroundColor, \";\\n --secondary-background-color: \").concat(theme.secondaryBackgroundColor, \";\\n --text-color: \").concat(theme.textColor, \";\\n --font: \").concat(theme.font, \";\\n }\\n\\n body {\\n background-color: var(--background-color);\\n color: var(--text-color);\\n }\\n \");\n};\n/** True if the value is a TypedArray. */\nfunction isTypedArray(value) {\n var isBigIntArray = false;\n try {\n isBigIntArray =\n value instanceof BigInt64Array || value instanceof BigUint64Array;\n }\n catch (e) {\n // Ignore cause Safari does not support this\n // https://caniuse.com/mdn-javascript_builtins_bigint64array\n }\n return (value instanceof Int8Array ||\n value instanceof Uint8Array ||\n value instanceof Uint8ClampedArray ||\n value instanceof Int16Array ||\n value instanceof Uint16Array ||\n value instanceof Int32Array ||\n value instanceof Uint32Array ||\n value instanceof Float32Array ||\n value instanceof Float64Array ||\n isBigIntArray);\n}\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/streamlit-component-lib/dist/streamlit.js?"); + +/***/ }), + +/***/ "./src/main.ts": +/*!*********************!*\ + !*** ./src/main.ts ***! + \*********************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var streamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! streamlit-component-lib */ \"./node_modules/streamlit-component-lib/dist/index.js\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n\n// Async function to wait for the Klaro manager\nfunction waitForKlaroManager() {\n return __awaiter(this, arguments, void 0, function (maxWaitTime, interval) {\n var startTime, klaroManager;\n if (maxWaitTime === void 0) { maxWaitTime = 5000; }\n if (interval === void 0) { interval = 100; }\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n startTime = Date.now();\n _a.label = 1;\n case 1:\n if (!(Date.now() - startTime < maxWaitTime)) return [3 /*break*/, 3];\n klaroManager = getKlaroManager();\n if (klaroManager) {\n return [2 /*return*/, klaroManager];\n }\n return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, interval); })];\n case 2:\n _a.sent();\n return [3 /*break*/, 1];\n case 3: throw new Error(\"Klaro manager did not become available within the allowed time.\");\n }\n });\n });\n}\n// Helper function to handle unknown errors\nfunction handleError(error) {\n if (error instanceof Error) {\n console.error(\"Error:\", error.message);\n }\n else {\n console.error(\"Unknown error:\", error);\n }\n}\n// Tracking was accepted\nfunction onAcceptCallback() {\n return __awaiter(this, void 0, void 0, function () {\n var manager, error_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, waitForKlaroManager()];\n case 1:\n manager = _a.sent();\n if (manager.confirmed) {\n streamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.setComponentValue(\"accepted\");\n }\n return [3 /*break*/, 3];\n case 2:\n error_1 = _a.sent();\n handleError(error_1);\n return [3 /*break*/, 3];\n case 3: return [2 /*return*/];\n }\n });\n });\n}\n// Tracking was declined\nfunction onDeclineCallback() {\n return __awaiter(this, void 0, void 0, function () {\n var manager, error_2;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, waitForKlaroManager()];\n case 1:\n manager = _a.sent();\n if (manager.confirmed) {\n streamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.setComponentValue(\"declined\");\n }\n return [3 /*break*/, 3];\n case 2:\n error_2 = _a.sent();\n handleError(error_2);\n return [3 /*break*/, 3];\n case 3: return [2 /*return*/];\n }\n });\n });\n}\nfunction onChange() {\n changed = true;\n}\nvar klaroConfig = {\n mustConsent: true,\n acceptAll: true,\n services: [\n {\n // In GTM, you should define a custom event trigger named `klaro-google-analytics-accepted` which should trigger the Google Analytics integration.\n name: 'google-analytics',\n cookies: [\n /^_ga(_.*)?/ // we delete the Google Analytics cookies if the user declines its use\n ],\n purposes: ['analytics'],\n onAccept: onAcceptCallback,\n onDecline: onDeclineCallback,\n },\n ]\n};\nvar rendered = false;\nvar changed = false;\nfunction onRender(event) {\n if (rendered) {\n return;\n }\n rendered = true;\n // Create a new script element\n var script = document.createElement('script');\n // Set the necessary attributes\n script.defer = true;\n script.type = 'application/javascript';\n script.src = 'https://cdn.kiprotect.com/klaro/v0.7/klaro.js';\n // Set the data-config attribute\n script.setAttribute('data-config', 'klaroConfig');\n script.onload = function () {\n var klaroManager = getKlaroManager();\n if (klaroManager) {\n console.log(\"Klaro loaded successfully\");\n console.log(klaroManager);\n }\n else {\n console.error(\"Failed to initialize Klaro manager\");\n }\n };\n // Append the script to the head or body\n document.head.appendChild(script);\n}\n// Function to safely access the Klaro manager\nfunction getKlaroManager() {\n var _a;\n return ((_a = window.klaro) === null || _a === void 0 ? void 0 : _a.getManager) ? window.klaro.getManager() : null;\n}\n// This will make klaroConfig globally accessible\nwindow.klaroConfig = klaroConfig;\n// Attach our `onRender` handler to Streamlit's render event.\nstreamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.events.addEventListener(streamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.RENDER_EVENT, onRender);\n// Tell Streamlit we're ready to start receiving data. We won't get our\n// first RENDER_EVENT until we call this function.\nstreamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.setComponentReady();\n// Finally, tell Streamlit to update our initial height. We omit the\n// `height` parameter here to have it default to our scrollHeight.\nstreamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.setFrameHeight(1000);\n\n\n//# sourceURL=webpack://gdpr_consent/./src/main.ts?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/builder.mjs": +/*!***********************************************!*\ + !*** ./node_modules/apache-arrow/builder.mjs ***! + \***********************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Builder: () => (/* binding */ Builder),\n/* harmony export */ FixedWidthBuilder: () => (/* binding */ FixedWidthBuilder),\n/* harmony export */ VariableWidthBuilder: () => (/* binding */ VariableWidthBuilder)\n/* harmony export */ });\n/* harmony import */ var _vector_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./vector.mjs */ \"./node_modules/apache-arrow/vector.mjs\");\n/* harmony import */ var _data_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./data.mjs */ \"./node_modules/apache-arrow/data.mjs\");\n/* harmony import */ var _row_map_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./row/map.mjs */ \"./node_modules/apache-arrow/row/map.mjs\");\n/* harmony import */ var _type_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./type.mjs */ \"./node_modules/apache-arrow/type.mjs\");\n/* harmony import */ var _builder_valid_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./builder/valid.mjs */ \"./node_modules/apache-arrow/builder/valid.mjs\");\n/* harmony import */ var _builder_buffer_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./builder/buffer.mjs */ \"./node_modules/apache-arrow/builder/buffer.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n\n\n\n\n/**\n * An abstract base class for types that construct Arrow Vectors from arbitrary JavaScript values.\n *\n * A `Builder` is responsible for writing arbitrary JavaScript values\n * to ArrayBuffers and/or child Builders according to the Arrow specification\n * for each DataType, creating or resizing the underlying ArrayBuffers as necessary.\n *\n * The `Builder` for each Arrow `DataType` handles converting and appending\n * values for a given `DataType`. The high-level {@link makeBuilder `makeBuilder()`} convenience\n * method creates the specific `Builder` subclass for the supplied `DataType`.\n *\n * Once created, `Builder` instances support both appending values to the end\n * of the `Builder`, and random-access writes to specific indices\n * (`Builder.prototype.append(value)` is a convenience method for\n * `builder.set(builder.length, value)`). Appending or setting values beyond the\n * Builder's current length may cause the builder to grow its underlying buffers\n * or child Builders (if applicable) to accommodate the new values.\n *\n * After enough values have been written to a `Builder`, `Builder.prototype.flush()`\n * will commit the values to the underlying ArrayBuffers (or child Builders). The\n * internal Builder state will be reset, and an instance of `Data` is returned.\n * Alternatively, `Builder.prototype.toVector()` will flush the `Builder` and return\n * an instance of `Vector` instead.\n *\n * When there are no more values to write, use `Builder.prototype.finish()` to\n * finalize the `Builder`. This does not reset the internal state, so it is\n * necessary to call `Builder.prototype.flush()` or `toVector()` one last time\n * if there are still values queued to be flushed.\n *\n * Note: calling `Builder.prototype.finish()` is required when using a `DictionaryBuilder`,\n * because this is when it flushes the values that have been enqueued in its internal\n * dictionary's `Builder`, and creates the `dictionaryVector` for the `Dictionary` `DataType`.\n *\n * @example\n * ```ts\n * import { Builder, Utf8 } from 'apache-arrow';\n *\n * const utf8Builder = makeBuilder({\n * type: new Utf8(),\n * nullValues: [null, 'n/a']\n * });\n *\n * utf8Builder\n * .append('hello')\n * .append('n/a')\n * .append('world')\n * .append(null);\n *\n * const utf8Vector = utf8Builder.finish().toVector();\n *\n * console.log(utf8Vector.toJSON());\n * // > [\"hello\", null, \"world\", null]\n * ```\n *\n * @typeparam T The `DataType` of this `Builder`.\n * @typeparam TNull The type(s) of values which will be considered null-value sentinels.\n */\nclass Builder {\n /**\n * Construct a builder with the given Arrow DataType with optional null values,\n * which will be interpreted as \"null\" when set or appended to the `Builder`.\n * @param {{ type: T, nullValues?: any[] }} options A `BuilderOptions` object used to create this `Builder`.\n */\n constructor({ 'type': type, 'nullValues': nulls }) {\n /**\n * The number of values written to the `Builder` that haven't been flushed yet.\n * @readonly\n */\n this.length = 0;\n /**\n * A boolean indicating whether `Builder.prototype.finish()` has been called on this `Builder`.\n * @readonly\n */\n this.finished = false;\n this.type = type;\n this.children = [];\n this.nullValues = nulls;\n this.stride = (0,_type_mjs__WEBPACK_IMPORTED_MODULE_0__.strideForType)(type);\n this._nulls = new _builder_buffer_mjs__WEBPACK_IMPORTED_MODULE_1__.BitmapBufferBuilder();\n if (nulls && nulls.length > 0) {\n this._isValid = (0,_builder_valid_mjs__WEBPACK_IMPORTED_MODULE_2__.createIsValidFunction)(nulls);\n }\n }\n /** @nocollapse */\n // @ts-ignore\n static throughNode(options) {\n throw new Error(`\"throughNode\" not available in this environment`);\n }\n /** @nocollapse */\n // @ts-ignore\n static throughDOM(options) {\n throw new Error(`\"throughDOM\" not available in this environment`);\n }\n /**\n * Flush the `Builder` and return a `Vector`.\n * @returns {Vector} A `Vector` of the flushed values.\n */\n toVector() { return new _vector_mjs__WEBPACK_IMPORTED_MODULE_3__.Vector([this.flush()]); }\n get ArrayType() { return this.type.ArrayType; }\n get nullCount() { return this._nulls.numInvalid; }\n get numChildren() { return this.children.length; }\n /**\n * @returns The aggregate length (in bytes) of the values that have been written.\n */\n get byteLength() {\n let size = 0;\n const { _offsets, _values, _nulls, _typeIds, children } = this;\n _offsets && (size += _offsets.byteLength);\n _values && (size += _values.byteLength);\n _nulls && (size += _nulls.byteLength);\n _typeIds && (size += _typeIds.byteLength);\n return children.reduce((size, child) => size + child.byteLength, size);\n }\n /**\n * @returns The aggregate number of rows that have been reserved to write new values.\n */\n get reservedLength() {\n return this._nulls.reservedLength;\n }\n /**\n * @returns The aggregate length (in bytes) that has been reserved to write new values.\n */\n get reservedByteLength() {\n let size = 0;\n this._offsets && (size += this._offsets.reservedByteLength);\n this._values && (size += this._values.reservedByteLength);\n this._nulls && (size += this._nulls.reservedByteLength);\n this._typeIds && (size += this._typeIds.reservedByteLength);\n return this.children.reduce((size, child) => size + child.reservedByteLength, size);\n }\n get valueOffsets() { return this._offsets ? this._offsets.buffer : null; }\n get values() { return this._values ? this._values.buffer : null; }\n get nullBitmap() { return this._nulls ? this._nulls.buffer : null; }\n get typeIds() { return this._typeIds ? this._typeIds.buffer : null; }\n /**\n * Appends a value (or null) to this `Builder`.\n * This is equivalent to `builder.set(builder.length, value)`.\n * @param {T['TValue'] | TNull } value The value to append.\n */\n append(value) { return this.set(this.length, value); }\n /**\n * Validates whether a value is valid (true), or null (false)\n * @param {T['TValue'] | TNull } value The value to compare against null the value representations\n */\n isValid(value) { return this._isValid(value); }\n /**\n * Write a value (or null-value sentinel) at the supplied index.\n * If the value matches one of the null-value representations, a 1-bit is\n * written to the null `BitmapBufferBuilder`. Otherwise, a 0 is written to\n * the null `BitmapBufferBuilder`, and the value is passed to\n * `Builder.prototype.setValue()`.\n * @param {number} index The index of the value to write.\n * @param {T['TValue'] | TNull } value The value to write at the supplied index.\n * @returns {this} The updated `Builder` instance.\n */\n set(index, value) {\n if (this.setValid(index, this.isValid(value))) {\n this.setValue(index, value);\n }\n return this;\n }\n /**\n * Write a value to the underlying buffers at the supplied index, bypassing\n * the null-value check. This is a low-level method that\n * @param {number} index\n * @param {T['TValue'] | TNull } value\n */\n setValue(index, value) { this._setValue(this, index, value); }\n setValid(index, valid) {\n this.length = this._nulls.set(index, +valid).length;\n return valid;\n }\n // @ts-ignore\n addChild(child, name = `${this.numChildren}`) {\n throw new Error(`Cannot append children to non-nested type \"${this.type}\"`);\n }\n /**\n * Retrieve the child `Builder` at the supplied `index`, or null if no child\n * exists at that index.\n * @param {number} index The index of the child `Builder` to retrieve.\n * @returns {Builder | null} The child Builder at the supplied index or null.\n */\n getChildAt(index) {\n return this.children[index] || null;\n }\n /**\n * Commit all the values that have been written to their underlying\n * ArrayBuffers, including any child Builders if applicable, and reset\n * the internal `Builder` state.\n * @returns A `Data` of the buffers and children representing the values written.\n */\n flush() {\n let data;\n let typeIds;\n let nullBitmap;\n let valueOffsets;\n const { type, length, nullCount, _typeIds, _offsets, _values, _nulls } = this;\n if (typeIds = _typeIds === null || _typeIds === void 0 ? void 0 : _typeIds.flush(length)) { // Unions\n // DenseUnions\n valueOffsets = _offsets === null || _offsets === void 0 ? void 0 : _offsets.flush(length);\n }\n else if (valueOffsets = _offsets === null || _offsets === void 0 ? void 0 : _offsets.flush(length)) { // Variable-width primitives (Binary, Utf8), and Lists\n // Binary, Utf8\n data = _values === null || _values === void 0 ? void 0 : _values.flush(_offsets.last());\n }\n else { // Fixed-width primitives (Int, Float, Decimal, Time, Timestamp, and Interval)\n data = _values === null || _values === void 0 ? void 0 : _values.flush(length);\n }\n if (nullCount > 0) {\n nullBitmap = _nulls === null || _nulls === void 0 ? void 0 : _nulls.flush(length);\n }\n const children = this.children.map((child) => child.flush());\n this.clear();\n return (0,_data_mjs__WEBPACK_IMPORTED_MODULE_4__.makeData)({\n type, length, nullCount,\n children, 'child': children[0],\n data, typeIds, nullBitmap, valueOffsets,\n });\n }\n /**\n * Finalize this `Builder`, and child builders if applicable.\n * @returns {this} The finalized `Builder` instance.\n */\n finish() {\n this.finished = true;\n for (const child of this.children)\n child.finish();\n return this;\n }\n /**\n * Clear this Builder's internal state, including child Builders if applicable, and reset the length to 0.\n * @returns {this} The cleared `Builder` instance.\n */\n clear() {\n var _a, _b, _c, _d;\n this.length = 0;\n (_a = this._nulls) === null || _a === void 0 ? void 0 : _a.clear();\n (_b = this._values) === null || _b === void 0 ? void 0 : _b.clear();\n (_c = this._offsets) === null || _c === void 0 ? void 0 : _c.clear();\n (_d = this._typeIds) === null || _d === void 0 ? void 0 : _d.clear();\n for (const child of this.children)\n child.clear();\n return this;\n }\n}\nBuilder.prototype.length = 1;\nBuilder.prototype.stride = 1;\nBuilder.prototype.children = null;\nBuilder.prototype.finished = false;\nBuilder.prototype.nullValues = null;\nBuilder.prototype._isValid = () => true;\n/** @ignore */\nclass FixedWidthBuilder extends Builder {\n constructor(opts) {\n super(opts);\n this._values = new _builder_buffer_mjs__WEBPACK_IMPORTED_MODULE_1__.DataBufferBuilder(new this.ArrayType(0), this.stride);\n }\n setValue(index, value) {\n const values = this._values;\n values.reserve(index - values.length + 1);\n return super.setValue(index, value);\n }\n}\n/** @ignore */\nclass VariableWidthBuilder extends Builder {\n constructor(opts) {\n super(opts);\n this._pendingLength = 0;\n this._offsets = new _builder_buffer_mjs__WEBPACK_IMPORTED_MODULE_1__.OffsetsBufferBuilder();\n }\n setValue(index, value) {\n const pending = this._pending || (this._pending = new Map());\n const current = pending.get(index);\n current && (this._pendingLength -= current.length);\n this._pendingLength += (value instanceof _row_map_mjs__WEBPACK_IMPORTED_MODULE_5__.MapRow) ? value[_row_map_mjs__WEBPACK_IMPORTED_MODULE_5__.kKeys].length : value.length;\n pending.set(index, value);\n }\n setValid(index, isValid) {\n if (!super.setValid(index, isValid)) {\n (this._pending || (this._pending = new Map())).set(index, undefined);\n return false;\n }\n return true;\n }\n clear() {\n this._pendingLength = 0;\n this._pending = undefined;\n return super.clear();\n }\n flush() {\n this._flush();\n return super.flush();\n }\n finish() {\n this._flush();\n return super.finish();\n }\n _flush() {\n const pending = this._pending;\n const pendingLength = this._pendingLength;\n this._pendingLength = 0;\n this._pending = undefined;\n if (pending && pending.size > 0) {\n this._flushPending(pending, pendingLength);\n }\n return this;\n }\n}\n\n//# sourceMappingURL=builder.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/builder.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/builder/binary.mjs": +/*!******************************************************!*\ + !*** ./node_modules/apache-arrow/builder/binary.mjs ***! + \******************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ BinaryBuilder: () => (/* binding */ BinaryBuilder)\n/* harmony export */ });\n/* harmony import */ var _util_buffer_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/buffer.mjs */ \"./node_modules/apache-arrow/util/buffer.mjs\");\n/* harmony import */ var _buffer_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./buffer.mjs */ \"./node_modules/apache-arrow/builder/buffer.mjs\");\n/* harmony import */ var _builder_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../builder.mjs */ \"./node_modules/apache-arrow/builder.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n\n/** @ignore */\nclass BinaryBuilder extends _builder_mjs__WEBPACK_IMPORTED_MODULE_0__.VariableWidthBuilder {\n constructor(opts) {\n super(opts);\n this._values = new _buffer_mjs__WEBPACK_IMPORTED_MODULE_1__.BufferBuilder(new Uint8Array(0));\n }\n get byteLength() {\n let size = this._pendingLength + (this.length * 4);\n this._offsets && (size += this._offsets.byteLength);\n this._values && (size += this._values.byteLength);\n this._nulls && (size += this._nulls.byteLength);\n return size;\n }\n setValue(index, value) {\n return super.setValue(index, (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_2__.toUint8Array)(value));\n }\n _flushPending(pending, pendingLength) {\n const offsets = this._offsets;\n const data = this._values.reserve(pendingLength).buffer;\n let offset = 0;\n for (const [index, value] of pending) {\n if (value === undefined) {\n offsets.set(index, 0);\n }\n else {\n const length = value.length;\n data.set(value, offset);\n offsets.set(index, length);\n offset += length;\n }\n }\n }\n}\n\n//# sourceMappingURL=binary.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/builder/binary.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/builder/bool.mjs": +/*!****************************************************!*\ + !*** ./node_modules/apache-arrow/builder/bool.mjs ***! + \****************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ BoolBuilder: () => (/* binding */ BoolBuilder)\n/* harmony export */ });\n/* harmony import */ var _buffer_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./buffer.mjs */ \"./node_modules/apache-arrow/builder/buffer.mjs\");\n/* harmony import */ var _builder_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../builder.mjs */ \"./node_modules/apache-arrow/builder.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n/** @ignore */\nclass BoolBuilder extends _builder_mjs__WEBPACK_IMPORTED_MODULE_0__.Builder {\n constructor(options) {\n super(options);\n this._values = new _buffer_mjs__WEBPACK_IMPORTED_MODULE_1__.BitmapBufferBuilder();\n }\n setValue(index, value) {\n this._values.set(index, +value);\n }\n}\n\n//# sourceMappingURL=bool.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/builder/bool.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/builder/buffer.mjs": +/*!******************************************************!*\ + !*** ./node_modules/apache-arrow/builder/buffer.mjs ***! + \******************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ BitmapBufferBuilder: () => (/* binding */ BitmapBufferBuilder),\n/* harmony export */ BufferBuilder: () => (/* binding */ BufferBuilder),\n/* harmony export */ DataBufferBuilder: () => (/* binding */ DataBufferBuilder),\n/* harmony export */ OffsetsBufferBuilder: () => (/* binding */ OffsetsBufferBuilder)\n/* harmony export */ });\n/* harmony import */ var _util_buffer_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/buffer.mjs */ \"./node_modules/apache-arrow/util/buffer.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n/** @ignore */\nconst roundLengthUpToNearest64Bytes = (len, BPE) => ((((Math.ceil(len) * BPE) + 63) & ~63) || 64) / BPE;\n/** @ignore */\nconst sliceOrExtendArray = (arr, len = 0) => (arr.length >= len ? arr.subarray(0, len) : (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_0__.memcpy)(new arr.constructor(len), arr, 0));\n/** @ignore */\nclass BufferBuilder {\n constructor(buffer, stride = 1) {\n this.buffer = buffer;\n this.stride = stride;\n this.BYTES_PER_ELEMENT = buffer.BYTES_PER_ELEMENT;\n this.ArrayType = buffer.constructor;\n this._resize(this.length = Math.ceil(buffer.length / stride));\n }\n get byteLength() {\n return Math.ceil(this.length * this.stride) * this.BYTES_PER_ELEMENT;\n }\n get reservedLength() { return this.buffer.length / this.stride; }\n get reservedByteLength() { return this.buffer.byteLength; }\n // @ts-ignore\n set(index, value) { return this; }\n append(value) { return this.set(this.length, value); }\n reserve(extra) {\n if (extra > 0) {\n this.length += extra;\n const stride = this.stride;\n const length = this.length * stride;\n const reserved = this.buffer.length;\n if (length >= reserved) {\n this._resize(reserved === 0\n ? roundLengthUpToNearest64Bytes(length * 1, this.BYTES_PER_ELEMENT)\n : roundLengthUpToNearest64Bytes(length * 2, this.BYTES_PER_ELEMENT));\n }\n }\n return this;\n }\n flush(length = this.length) {\n length = roundLengthUpToNearest64Bytes(length * this.stride, this.BYTES_PER_ELEMENT);\n const array = sliceOrExtendArray(this.buffer, length);\n this.clear();\n return array;\n }\n clear() {\n this.length = 0;\n this._resize(0);\n return this;\n }\n _resize(newLength) {\n return this.buffer = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_0__.memcpy)(new this.ArrayType(newLength), this.buffer);\n }\n}\nBufferBuilder.prototype.offset = 0;\n/** @ignore */\nclass DataBufferBuilder extends BufferBuilder {\n last() { return this.get(this.length - 1); }\n get(index) { return this.buffer[index]; }\n set(index, value) {\n this.reserve(index - this.length + 1);\n this.buffer[index * this.stride] = value;\n return this;\n }\n}\n/** @ignore */\nclass BitmapBufferBuilder extends DataBufferBuilder {\n constructor(data = new Uint8Array(0)) {\n super(data, 1 / 8);\n this.numValid = 0;\n }\n get numInvalid() { return this.length - this.numValid; }\n get(idx) { return this.buffer[idx >> 3] >> idx % 8 & 1; }\n set(idx, val) {\n const { buffer } = this.reserve(idx - this.length + 1);\n const byte = idx >> 3, bit = idx % 8, cur = buffer[byte] >> bit & 1;\n // If `val` is truthy and the current bit is 0, flip it to 1 and increment `numValid`.\n // If `val` is falsey and the current bit is 1, flip it to 0 and decrement `numValid`.\n val ? cur === 0 && ((buffer[byte] |= (1 << bit)), ++this.numValid)\n : cur === 1 && ((buffer[byte] &= ~(1 << bit)), --this.numValid);\n return this;\n }\n clear() {\n this.numValid = 0;\n return super.clear();\n }\n}\n/** @ignore */\nclass OffsetsBufferBuilder extends DataBufferBuilder {\n constructor(data = new Int32Array(1)) { super(data, 1); }\n append(value) {\n return this.set(this.length - 1, value);\n }\n set(index, value) {\n const offset = this.length - 1;\n const buffer = this.reserve(index - offset + 1).buffer;\n if (offset < index++) {\n buffer.fill(buffer[offset], offset, index);\n }\n buffer[index] = buffer[index - 1] + value;\n return this;\n }\n flush(length = this.length - 1) {\n if (length > this.length) {\n this.set(length - 1, 0);\n }\n return super.flush(length + 1);\n }\n}\n\n//# sourceMappingURL=buffer.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/builder/buffer.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/builder/date.mjs": +/*!****************************************************!*\ + !*** ./node_modules/apache-arrow/builder/date.mjs ***! + \****************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DateBuilder: () => (/* binding */ DateBuilder),\n/* harmony export */ DateDayBuilder: () => (/* binding */ DateDayBuilder),\n/* harmony export */ DateMillisecondBuilder: () => (/* binding */ DateMillisecondBuilder)\n/* harmony export */ });\n/* harmony import */ var _builder_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../builder.mjs */ \"./node_modules/apache-arrow/builder.mjs\");\n/* harmony import */ var _visitor_set_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../visitor/set.mjs */ \"./node_modules/apache-arrow/visitor/set.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n/** @ignore */\nclass DateBuilder extends _builder_mjs__WEBPACK_IMPORTED_MODULE_0__.FixedWidthBuilder {\n}\nDateBuilder.prototype._setValue = _visitor_set_mjs__WEBPACK_IMPORTED_MODULE_1__.setDate;\n/** @ignore */\nclass DateDayBuilder extends DateBuilder {\n}\nDateDayBuilder.prototype._setValue = _visitor_set_mjs__WEBPACK_IMPORTED_MODULE_1__.setDateDay;\n/** @ignore */\nclass DateMillisecondBuilder extends DateBuilder {\n}\nDateMillisecondBuilder.prototype._setValue = _visitor_set_mjs__WEBPACK_IMPORTED_MODULE_1__.setDateMillisecond;\n\n//# sourceMappingURL=date.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/builder/date.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/builder/decimal.mjs": +/*!*******************************************************!*\ + !*** ./node_modules/apache-arrow/builder/decimal.mjs ***! + \*******************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DecimalBuilder: () => (/* binding */ DecimalBuilder)\n/* harmony export */ });\n/* harmony import */ var _builder_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../builder.mjs */ \"./node_modules/apache-arrow/builder.mjs\");\n/* harmony import */ var _visitor_set_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../visitor/set.mjs */ \"./node_modules/apache-arrow/visitor/set.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n/** @ignore */\nclass DecimalBuilder extends _builder_mjs__WEBPACK_IMPORTED_MODULE_0__.FixedWidthBuilder {\n}\nDecimalBuilder.prototype._setValue = _visitor_set_mjs__WEBPACK_IMPORTED_MODULE_1__.setDecimal;\n\n//# sourceMappingURL=decimal.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/builder/decimal.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/builder/dictionary.mjs": +/*!**********************************************************!*\ + !*** ./node_modules/apache-arrow/builder/dictionary.mjs ***! + \**********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DictionaryBuilder: () => (/* binding */ DictionaryBuilder)\n/* harmony export */ });\n/* harmony import */ var _type_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../type.mjs */ \"./node_modules/apache-arrow/type.mjs\");\n/* harmony import */ var _builder_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../builder.mjs */ \"./node_modules/apache-arrow/builder.mjs\");\n/* harmony import */ var _factories_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../factories.mjs */ \"./node_modules/apache-arrow/factories.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n\n/** @ignore */\nclass DictionaryBuilder extends _builder_mjs__WEBPACK_IMPORTED_MODULE_0__.Builder {\n constructor({ 'type': type, 'nullValues': nulls, 'dictionaryHashFunction': hashFn }) {\n super({ type: new _type_mjs__WEBPACK_IMPORTED_MODULE_1__.Dictionary(type.dictionary, type.indices, type.id, type.isOrdered) });\n this._nulls = null;\n this._dictionaryOffset = 0;\n this._keysToIndices = Object.create(null);\n this.indices = (0,_factories_mjs__WEBPACK_IMPORTED_MODULE_2__.makeBuilder)({ 'type': this.type.indices, 'nullValues': nulls });\n this.dictionary = (0,_factories_mjs__WEBPACK_IMPORTED_MODULE_2__.makeBuilder)({ 'type': this.type.dictionary, 'nullValues': null });\n if (typeof hashFn === 'function') {\n this.valueToKey = hashFn;\n }\n }\n get values() { return this.indices.values; }\n get nullCount() { return this.indices.nullCount; }\n get nullBitmap() { return this.indices.nullBitmap; }\n get byteLength() { return this.indices.byteLength + this.dictionary.byteLength; }\n get reservedLength() { return this.indices.reservedLength + this.dictionary.reservedLength; }\n get reservedByteLength() { return this.indices.reservedByteLength + this.dictionary.reservedByteLength; }\n isValid(value) { return this.indices.isValid(value); }\n setValid(index, valid) {\n const indices = this.indices;\n valid = indices.setValid(index, valid);\n this.length = indices.length;\n return valid;\n }\n setValue(index, value) {\n const keysToIndices = this._keysToIndices;\n const key = this.valueToKey(value);\n let idx = keysToIndices[key];\n if (idx === undefined) {\n keysToIndices[key] = idx = this._dictionaryOffset + this.dictionary.append(value).length - 1;\n }\n return this.indices.setValue(index, idx);\n }\n flush() {\n const type = this.type;\n const prev = this._dictionary;\n const curr = this.dictionary.toVector();\n const data = this.indices.flush().clone(type);\n data.dictionary = prev ? prev.concat(curr) : curr;\n this.finished || (this._dictionaryOffset += curr.length);\n this._dictionary = data.dictionary;\n this.clear();\n return data;\n }\n finish() {\n this.indices.finish();\n this.dictionary.finish();\n this._dictionaryOffset = 0;\n this._keysToIndices = Object.create(null);\n return super.finish();\n }\n clear() {\n this.indices.clear();\n this.dictionary.clear();\n return super.clear();\n }\n valueToKey(val) {\n return typeof val === 'string' ? val : `${val}`;\n }\n}\n\n//# sourceMappingURL=dictionary.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/builder/dictionary.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/builder/fixedsizebinary.mjs": +/*!***************************************************************!*\ + !*** ./node_modules/apache-arrow/builder/fixedsizebinary.mjs ***! + \***************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ FixedSizeBinaryBuilder: () => (/* binding */ FixedSizeBinaryBuilder)\n/* harmony export */ });\n/* harmony import */ var _builder_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../builder.mjs */ \"./node_modules/apache-arrow/builder.mjs\");\n/* harmony import */ var _visitor_set_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../visitor/set.mjs */ \"./node_modules/apache-arrow/visitor/set.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n/** @ignore */\nclass FixedSizeBinaryBuilder extends _builder_mjs__WEBPACK_IMPORTED_MODULE_0__.FixedWidthBuilder {\n}\nFixedSizeBinaryBuilder.prototype._setValue = _visitor_set_mjs__WEBPACK_IMPORTED_MODULE_1__.setFixedSizeBinary;\n\n//# sourceMappingURL=fixedsizebinary.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/builder/fixedsizebinary.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/builder/fixedsizelist.mjs": +/*!*************************************************************!*\ + !*** ./node_modules/apache-arrow/builder/fixedsizelist.mjs ***! + \*************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ FixedSizeListBuilder: () => (/* binding */ FixedSizeListBuilder)\n/* harmony export */ });\n/* harmony import */ var _schema_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../schema.mjs */ \"./node_modules/apache-arrow/schema.mjs\");\n/* harmony import */ var _builder_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../builder.mjs */ \"./node_modules/apache-arrow/builder.mjs\");\n/* harmony import */ var _type_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../type.mjs */ \"./node_modules/apache-arrow/type.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n\n/** @ignore */\nclass FixedSizeListBuilder extends _builder_mjs__WEBPACK_IMPORTED_MODULE_0__.Builder {\n setValue(index, value) {\n const [child] = this.children;\n const start = index * this.stride;\n for (let i = -1, n = value.length; ++i < n;) {\n child.set(start + i, value[i]);\n }\n }\n addChild(child, name = '0') {\n if (this.numChildren > 0) {\n throw new Error('FixedSizeListBuilder can only have one child.');\n }\n const childIndex = this.children.push(child);\n this.type = new _type_mjs__WEBPACK_IMPORTED_MODULE_1__.FixedSizeList(this.type.listSize, new _schema_mjs__WEBPACK_IMPORTED_MODULE_2__.Field(name, child.type, true));\n return childIndex;\n }\n}\n\n//# sourceMappingURL=fixedsizelist.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/builder/fixedsizelist.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/builder/float.mjs": +/*!*****************************************************!*\ + !*** ./node_modules/apache-arrow/builder/float.mjs ***! + \*****************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Float16Builder: () => (/* binding */ Float16Builder),\n/* harmony export */ Float32Builder: () => (/* binding */ Float32Builder),\n/* harmony export */ Float64Builder: () => (/* binding */ Float64Builder),\n/* harmony export */ FloatBuilder: () => (/* binding */ FloatBuilder)\n/* harmony export */ });\n/* harmony import */ var _util_math_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/math.mjs */ \"./node_modules/apache-arrow/util/math.mjs\");\n/* harmony import */ var _builder_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../builder.mjs */ \"./node_modules/apache-arrow/builder.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n/** @ignore */\nclass FloatBuilder extends _builder_mjs__WEBPACK_IMPORTED_MODULE_0__.FixedWidthBuilder {\n setValue(index, value) {\n this._values.set(index, value);\n }\n}\n/** @ignore */\nclass Float16Builder extends FloatBuilder {\n setValue(index, value) {\n // convert JS float64 to a uint16\n super.setValue(index, (0,_util_math_mjs__WEBPACK_IMPORTED_MODULE_1__.float64ToUint16)(value));\n }\n}\n/** @ignore */\nclass Float32Builder extends FloatBuilder {\n}\n/** @ignore */\nclass Float64Builder extends FloatBuilder {\n}\n\n//# sourceMappingURL=float.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/builder/float.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/builder/int.mjs": +/*!***************************************************!*\ + !*** ./node_modules/apache-arrow/builder/int.mjs ***! + \***************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Int16Builder: () => (/* binding */ Int16Builder),\n/* harmony export */ Int32Builder: () => (/* binding */ Int32Builder),\n/* harmony export */ Int64Builder: () => (/* binding */ Int64Builder),\n/* harmony export */ Int8Builder: () => (/* binding */ Int8Builder),\n/* harmony export */ IntBuilder: () => (/* binding */ IntBuilder),\n/* harmony export */ Uint16Builder: () => (/* binding */ Uint16Builder),\n/* harmony export */ Uint32Builder: () => (/* binding */ Uint32Builder),\n/* harmony export */ Uint64Builder: () => (/* binding */ Uint64Builder),\n/* harmony export */ Uint8Builder: () => (/* binding */ Uint8Builder)\n/* harmony export */ });\n/* harmony import */ var _builder_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../builder.mjs */ \"./node_modules/apache-arrow/builder.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n/** @ignore */\nclass IntBuilder extends _builder_mjs__WEBPACK_IMPORTED_MODULE_0__.FixedWidthBuilder {\n setValue(index, value) {\n this._values.set(index, value);\n }\n}\n/** @ignore */\nclass Int8Builder extends IntBuilder {\n}\n/** @ignore */\nclass Int16Builder extends IntBuilder {\n}\n/** @ignore */\nclass Int32Builder extends IntBuilder {\n}\n/** @ignore */\nclass Int64Builder extends IntBuilder {\n}\n/** @ignore */\nclass Uint8Builder extends IntBuilder {\n}\n/** @ignore */\nclass Uint16Builder extends IntBuilder {\n}\n/** @ignore */\nclass Uint32Builder extends IntBuilder {\n}\n/** @ignore */\nclass Uint64Builder extends IntBuilder {\n}\n\n//# sourceMappingURL=int.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/builder/int.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/builder/interval.mjs": +/*!********************************************************!*\ + !*** ./node_modules/apache-arrow/builder/interval.mjs ***! + \********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ IntervalBuilder: () => (/* binding */ IntervalBuilder),\n/* harmony export */ IntervalDayTimeBuilder: () => (/* binding */ IntervalDayTimeBuilder),\n/* harmony export */ IntervalYearMonthBuilder: () => (/* binding */ IntervalYearMonthBuilder)\n/* harmony export */ });\n/* harmony import */ var _builder_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../builder.mjs */ \"./node_modules/apache-arrow/builder.mjs\");\n/* harmony import */ var _visitor_set_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../visitor/set.mjs */ \"./node_modules/apache-arrow/visitor/set.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n/** @ignore */\nclass IntervalBuilder extends _builder_mjs__WEBPACK_IMPORTED_MODULE_0__.FixedWidthBuilder {\n}\nIntervalBuilder.prototype._setValue = _visitor_set_mjs__WEBPACK_IMPORTED_MODULE_1__.setIntervalValue;\n/** @ignore */\nclass IntervalDayTimeBuilder extends IntervalBuilder {\n}\nIntervalDayTimeBuilder.prototype._setValue = _visitor_set_mjs__WEBPACK_IMPORTED_MODULE_1__.setIntervalDayTime;\n/** @ignore */\nclass IntervalYearMonthBuilder extends IntervalBuilder {\n}\nIntervalYearMonthBuilder.prototype._setValue = _visitor_set_mjs__WEBPACK_IMPORTED_MODULE_1__.setIntervalYearMonth;\n\n//# sourceMappingURL=interval.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/builder/interval.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/builder/list.mjs": +/*!****************************************************!*\ + !*** ./node_modules/apache-arrow/builder/list.mjs ***! + \****************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ListBuilder: () => (/* binding */ ListBuilder)\n/* harmony export */ });\n/* harmony import */ var _schema_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../schema.mjs */ \"./node_modules/apache-arrow/schema.mjs\");\n/* harmony import */ var _type_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../type.mjs */ \"./node_modules/apache-arrow/type.mjs\");\n/* harmony import */ var _buffer_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./buffer.mjs */ \"./node_modules/apache-arrow/builder/buffer.mjs\");\n/* harmony import */ var _builder_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../builder.mjs */ \"./node_modules/apache-arrow/builder.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n\n\n/** @ignore */\nclass ListBuilder extends _builder_mjs__WEBPACK_IMPORTED_MODULE_0__.VariableWidthBuilder {\n constructor(opts) {\n super(opts);\n this._offsets = new _buffer_mjs__WEBPACK_IMPORTED_MODULE_1__.OffsetsBufferBuilder();\n }\n addChild(child, name = '0') {\n if (this.numChildren > 0) {\n throw new Error('ListBuilder can only have one child.');\n }\n this.children[this.numChildren] = child;\n this.type = new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.List(new _schema_mjs__WEBPACK_IMPORTED_MODULE_3__.Field(name, child.type, true));\n return this.numChildren - 1;\n }\n _flushPending(pending) {\n const offsets = this._offsets;\n const [child] = this.children;\n for (const [index, value] of pending) {\n if (typeof value === 'undefined') {\n offsets.set(index, 0);\n }\n else {\n const n = value.length;\n const start = offsets.set(index, n).buffer[index];\n for (let i = -1; ++i < n;) {\n child.set(start + i, value[i]);\n }\n }\n }\n }\n}\n\n//# sourceMappingURL=list.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/builder/list.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/builder/map.mjs": +/*!***************************************************!*\ + !*** ./node_modules/apache-arrow/builder/map.mjs ***! + \***************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ MapBuilder: () => (/* binding */ MapBuilder)\n/* harmony export */ });\n/* harmony import */ var _schema_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../schema.mjs */ \"./node_modules/apache-arrow/schema.mjs\");\n/* harmony import */ var _type_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../type.mjs */ \"./node_modules/apache-arrow/type.mjs\");\n/* harmony import */ var _builder_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../builder.mjs */ \"./node_modules/apache-arrow/builder.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n\n/** @ignore */\nclass MapBuilder extends _builder_mjs__WEBPACK_IMPORTED_MODULE_0__.VariableWidthBuilder {\n set(index, value) {\n return super.set(index, value);\n }\n setValue(index, value) {\n const row = (value instanceof Map ? value : new Map(Object.entries(value)));\n const pending = this._pending || (this._pending = new Map());\n const current = pending.get(index);\n current && (this._pendingLength -= current.size);\n this._pendingLength += row.size;\n pending.set(index, row);\n }\n addChild(child, name = `${this.numChildren}`) {\n if (this.numChildren > 0) {\n throw new Error('ListBuilder can only have one child.');\n }\n this.children[this.numChildren] = child;\n this.type = new _type_mjs__WEBPACK_IMPORTED_MODULE_1__.Map_(new _schema_mjs__WEBPACK_IMPORTED_MODULE_2__.Field(name, child.type, true), this.type.keysSorted);\n return this.numChildren - 1;\n }\n _flushPending(pending) {\n const offsets = this._offsets;\n const [child] = this.children;\n for (const [index, value] of pending) {\n if (value === undefined) {\n offsets.set(index, 0);\n }\n else {\n let { [index]: idx, [index + 1]: end } = offsets.set(index, value.size).buffer;\n for (const val of value.entries()) {\n child.set(idx, val);\n if (++idx >= end)\n break;\n }\n }\n }\n }\n}\n\n//# sourceMappingURL=map.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/builder/map.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/builder/null.mjs": +/*!****************************************************!*\ + !*** ./node_modules/apache-arrow/builder/null.mjs ***! + \****************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ NullBuilder: () => (/* binding */ NullBuilder)\n/* harmony export */ });\n/* harmony import */ var _builder_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../builder.mjs */ \"./node_modules/apache-arrow/builder.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n/** @ignore */\nclass NullBuilder extends _builder_mjs__WEBPACK_IMPORTED_MODULE_0__.Builder {\n // @ts-ignore\n setValue(index, value) { }\n setValid(index, valid) {\n this.length = Math.max(index + 1, this.length);\n return valid;\n }\n}\n\n//# sourceMappingURL=null.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/builder/null.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/builder/struct.mjs": +/*!******************************************************!*\ + !*** ./node_modules/apache-arrow/builder/struct.mjs ***! + \******************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ StructBuilder: () => (/* binding */ StructBuilder)\n/* harmony export */ });\n/* harmony import */ var _schema_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../schema.mjs */ \"./node_modules/apache-arrow/schema.mjs\");\n/* harmony import */ var _builder_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../builder.mjs */ \"./node_modules/apache-arrow/builder.mjs\");\n/* harmony import */ var _type_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../type.mjs */ \"./node_modules/apache-arrow/type.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n/* eslint-disable unicorn/no-array-for-each */\n\n\n\n/** @ignore */\nclass StructBuilder extends _builder_mjs__WEBPACK_IMPORTED_MODULE_0__.Builder {\n setValue(index, value) {\n const { children, type } = this;\n switch (Array.isArray(value) || value.constructor) {\n case true: return type.children.forEach((_, i) => children[i].set(index, value[i]));\n case Map: return type.children.forEach((f, i) => children[i].set(index, value.get(f.name)));\n default: return type.children.forEach((f, i) => children[i].set(index, value[f.name]));\n }\n }\n /** @inheritdoc */\n setValid(index, valid) {\n if (!super.setValid(index, valid)) {\n this.children.forEach((child) => child.setValid(index, valid));\n }\n return valid;\n }\n addChild(child, name = `${this.numChildren}`) {\n const childIndex = this.children.push(child);\n this.type = new _type_mjs__WEBPACK_IMPORTED_MODULE_1__.Struct([...this.type.children, new _schema_mjs__WEBPACK_IMPORTED_MODULE_2__.Field(name, child.type, true)]);\n return childIndex;\n }\n}\n\n//# sourceMappingURL=struct.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/builder/struct.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/builder/time.mjs": +/*!****************************************************!*\ + !*** ./node_modules/apache-arrow/builder/time.mjs ***! + \****************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ TimeBuilder: () => (/* binding */ TimeBuilder),\n/* harmony export */ TimeMicrosecondBuilder: () => (/* binding */ TimeMicrosecondBuilder),\n/* harmony export */ TimeMillisecondBuilder: () => (/* binding */ TimeMillisecondBuilder),\n/* harmony export */ TimeNanosecondBuilder: () => (/* binding */ TimeNanosecondBuilder),\n/* harmony export */ TimeSecondBuilder: () => (/* binding */ TimeSecondBuilder)\n/* harmony export */ });\n/* harmony import */ var _builder_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../builder.mjs */ \"./node_modules/apache-arrow/builder.mjs\");\n/* harmony import */ var _visitor_set_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../visitor/set.mjs */ \"./node_modules/apache-arrow/visitor/set.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n/** @ignore */\nclass TimeBuilder extends _builder_mjs__WEBPACK_IMPORTED_MODULE_0__.FixedWidthBuilder {\n}\nTimeBuilder.prototype._setValue = _visitor_set_mjs__WEBPACK_IMPORTED_MODULE_1__.setTime;\n/** @ignore */\nclass TimeSecondBuilder extends TimeBuilder {\n}\nTimeSecondBuilder.prototype._setValue = _visitor_set_mjs__WEBPACK_IMPORTED_MODULE_1__.setTimeSecond;\n/** @ignore */\nclass TimeMillisecondBuilder extends TimeBuilder {\n}\nTimeMillisecondBuilder.prototype._setValue = _visitor_set_mjs__WEBPACK_IMPORTED_MODULE_1__.setTimeMillisecond;\n/** @ignore */\nclass TimeMicrosecondBuilder extends TimeBuilder {\n}\nTimeMicrosecondBuilder.prototype._setValue = _visitor_set_mjs__WEBPACK_IMPORTED_MODULE_1__.setTimeMicrosecond;\n/** @ignore */\nclass TimeNanosecondBuilder extends TimeBuilder {\n}\nTimeNanosecondBuilder.prototype._setValue = _visitor_set_mjs__WEBPACK_IMPORTED_MODULE_1__.setTimeNanosecond;\n\n//# sourceMappingURL=time.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/builder/time.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/builder/timestamp.mjs": +/*!*********************************************************!*\ + !*** ./node_modules/apache-arrow/builder/timestamp.mjs ***! + \*********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ TimestampBuilder: () => (/* binding */ TimestampBuilder),\n/* harmony export */ TimestampMicrosecondBuilder: () => (/* binding */ TimestampMicrosecondBuilder),\n/* harmony export */ TimestampMillisecondBuilder: () => (/* binding */ TimestampMillisecondBuilder),\n/* harmony export */ TimestampNanosecondBuilder: () => (/* binding */ TimestampNanosecondBuilder),\n/* harmony export */ TimestampSecondBuilder: () => (/* binding */ TimestampSecondBuilder)\n/* harmony export */ });\n/* harmony import */ var _builder_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../builder.mjs */ \"./node_modules/apache-arrow/builder.mjs\");\n/* harmony import */ var _visitor_set_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../visitor/set.mjs */ \"./node_modules/apache-arrow/visitor/set.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n/** @ignore */\nclass TimestampBuilder extends _builder_mjs__WEBPACK_IMPORTED_MODULE_0__.FixedWidthBuilder {\n}\nTimestampBuilder.prototype._setValue = _visitor_set_mjs__WEBPACK_IMPORTED_MODULE_1__.setTimestamp;\n/** @ignore */\nclass TimestampSecondBuilder extends TimestampBuilder {\n}\nTimestampSecondBuilder.prototype._setValue = _visitor_set_mjs__WEBPACK_IMPORTED_MODULE_1__.setTimestampSecond;\n/** @ignore */\nclass TimestampMillisecondBuilder extends TimestampBuilder {\n}\nTimestampMillisecondBuilder.prototype._setValue = _visitor_set_mjs__WEBPACK_IMPORTED_MODULE_1__.setTimestampMillisecond;\n/** @ignore */\nclass TimestampMicrosecondBuilder extends TimestampBuilder {\n}\nTimestampMicrosecondBuilder.prototype._setValue = _visitor_set_mjs__WEBPACK_IMPORTED_MODULE_1__.setTimestampMicrosecond;\n/** @ignore */\nclass TimestampNanosecondBuilder extends TimestampBuilder {\n}\nTimestampNanosecondBuilder.prototype._setValue = _visitor_set_mjs__WEBPACK_IMPORTED_MODULE_1__.setTimestampNanosecond;\n\n//# sourceMappingURL=timestamp.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/builder/timestamp.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/builder/union.mjs": +/*!*****************************************************!*\ + !*** ./node_modules/apache-arrow/builder/union.mjs ***! + \*****************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DenseUnionBuilder: () => (/* binding */ DenseUnionBuilder),\n/* harmony export */ SparseUnionBuilder: () => (/* binding */ SparseUnionBuilder),\n/* harmony export */ UnionBuilder: () => (/* binding */ UnionBuilder)\n/* harmony export */ });\n/* harmony import */ var _schema_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../schema.mjs */ \"./node_modules/apache-arrow/schema.mjs\");\n/* harmony import */ var _buffer_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./buffer.mjs */ \"./node_modules/apache-arrow/builder/buffer.mjs\");\n/* harmony import */ var _builder_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../builder.mjs */ \"./node_modules/apache-arrow/builder.mjs\");\n/* harmony import */ var _type_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../type.mjs */ \"./node_modules/apache-arrow/type.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n\n\n/** @ignore */\nclass UnionBuilder extends _builder_mjs__WEBPACK_IMPORTED_MODULE_0__.Builder {\n constructor(options) {\n super(options);\n this._typeIds = new _buffer_mjs__WEBPACK_IMPORTED_MODULE_1__.DataBufferBuilder(new Int8Array(0), 1);\n if (typeof options['valueToChildTypeId'] === 'function') {\n this._valueToChildTypeId = options['valueToChildTypeId'];\n }\n }\n get typeIdToChildIndex() { return this.type.typeIdToChildIndex; }\n append(value, childTypeId) {\n return this.set(this.length, value, childTypeId);\n }\n set(index, value, childTypeId) {\n if (childTypeId === undefined) {\n childTypeId = this._valueToChildTypeId(this, value, index);\n }\n if (this.setValid(index, this.isValid(value))) {\n this.setValue(index, value, childTypeId);\n }\n return this;\n }\n setValue(index, value, childTypeId) {\n this._typeIds.set(index, childTypeId);\n const childIndex = this.type.typeIdToChildIndex[childTypeId];\n const child = this.children[childIndex];\n child === null || child === void 0 ? void 0 : child.set(index, value);\n }\n addChild(child, name = `${this.children.length}`) {\n const childTypeId = this.children.push(child);\n const { type: { children, mode, typeIds } } = this;\n const fields = [...children, new _schema_mjs__WEBPACK_IMPORTED_MODULE_2__.Field(name, child.type)];\n this.type = new _type_mjs__WEBPACK_IMPORTED_MODULE_3__.Union(mode, [...typeIds, childTypeId], fields);\n return childTypeId;\n }\n /** @ignore */\n // @ts-ignore\n _valueToChildTypeId(builder, value, offset) {\n throw new Error(`Cannot map UnionBuilder value to child typeId. \\\nPass the \\`childTypeId\\` as the second argument to unionBuilder.append(), \\\nor supply a \\`valueToChildTypeId\\` function as part of the UnionBuilder constructor options.`);\n }\n}\n/** @ignore */\nclass SparseUnionBuilder extends UnionBuilder {\n}\n/** @ignore */\nclass DenseUnionBuilder extends UnionBuilder {\n constructor(options) {\n super(options);\n this._offsets = new _buffer_mjs__WEBPACK_IMPORTED_MODULE_1__.DataBufferBuilder(new Int32Array(0));\n }\n /** @ignore */\n setValue(index, value, childTypeId) {\n const id = this._typeIds.set(index, childTypeId).buffer[index];\n const child = this.getChildAt(this.type.typeIdToChildIndex[id]);\n const denseIndex = this._offsets.set(index, child.length).buffer[index];\n child === null || child === void 0 ? void 0 : child.set(denseIndex, value);\n }\n}\n\n//# sourceMappingURL=union.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/builder/union.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/builder/utf8.mjs": +/*!****************************************************!*\ + !*** ./node_modules/apache-arrow/builder/utf8.mjs ***! + \****************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Utf8Builder: () => (/* binding */ Utf8Builder)\n/* harmony export */ });\n/* harmony import */ var _util_utf8_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/utf8.mjs */ \"./node_modules/apache-arrow/util/utf8.mjs\");\n/* harmony import */ var _binary_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./binary.mjs */ \"./node_modules/apache-arrow/builder/binary.mjs\");\n/* harmony import */ var _buffer_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./buffer.mjs */ \"./node_modules/apache-arrow/builder/buffer.mjs\");\n/* harmony import */ var _builder_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../builder.mjs */ \"./node_modules/apache-arrow/builder.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n\n\n/** @ignore */\nclass Utf8Builder extends _builder_mjs__WEBPACK_IMPORTED_MODULE_0__.VariableWidthBuilder {\n constructor(opts) {\n super(opts);\n this._values = new _buffer_mjs__WEBPACK_IMPORTED_MODULE_1__.BufferBuilder(new Uint8Array(0));\n }\n get byteLength() {\n let size = this._pendingLength + (this.length * 4);\n this._offsets && (size += this._offsets.byteLength);\n this._values && (size += this._values.byteLength);\n this._nulls && (size += this._nulls.byteLength);\n return size;\n }\n setValue(index, value) {\n return super.setValue(index, (0,_util_utf8_mjs__WEBPACK_IMPORTED_MODULE_2__.encodeUtf8)(value));\n }\n // @ts-ignore\n _flushPending(pending, pendingLength) { }\n}\nUtf8Builder.prototype._flushPending = _binary_mjs__WEBPACK_IMPORTED_MODULE_3__.BinaryBuilder.prototype._flushPending;\n\n//# sourceMappingURL=utf8.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/builder/utf8.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/builder/valid.mjs": +/*!*****************************************************!*\ + !*** ./node_modules/apache-arrow/builder/valid.mjs ***! + \*****************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createIsValidFunction: () => (/* binding */ createIsValidFunction)\n/* harmony export */ });\n/* harmony import */ var _util_pretty_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/pretty.mjs */ \"./node_modules/apache-arrow/util/pretty.mjs\");\n/* harmony import */ var _util_compat_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/compat.mjs */ \"./node_modules/apache-arrow/util/compat.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n/**\n * Dynamically compile the null values into an `isValid()` function whose\n * implementation is a switch statement. Microbenchmarks in v8 indicate\n * this approach is 25% faster than using an ES6 Map.\n *\n * @example\n * console.log(createIsValidFunction([null, 'N/A', NaN]));\n * `function (x) {\n * if (x !== x) return false;\n * switch (x) {\n * case null:\n * case \"N/A\":\n * return false;\n * }\n * return true;\n * }`\n *\n * @ignore\n * @param nullValues\n */\nfunction createIsValidFunction(nullValues) {\n if (!nullValues || nullValues.length <= 0) {\n // @ts-ignore\n return function isValid(value) { return true; };\n }\n let fnBody = '';\n const noNaNs = nullValues.filter((x) => x === x);\n if (noNaNs.length > 0) {\n fnBody = `\n switch (x) {${noNaNs.map((x) => `\n case ${valueToCase(x)}:`).join('')}\n return false;\n }`;\n }\n // NaN doesn't equal anything including itself, so it doesn't work as a\n // switch case. Instead we must explicitly check for NaN before the switch.\n if (nullValues.length !== noNaNs.length) {\n fnBody = `if (x !== x) return false;\\n${fnBody}`;\n }\n return new Function(`x`, `${fnBody}\\nreturn true;`);\n}\n/** @ignore */\nfunction valueToCase(x) {\n if (typeof x !== 'bigint') {\n return (0,_util_pretty_mjs__WEBPACK_IMPORTED_MODULE_0__.valueToString)(x);\n }\n else if (_util_compat_mjs__WEBPACK_IMPORTED_MODULE_1__.BigIntAvailable) {\n return `${(0,_util_pretty_mjs__WEBPACK_IMPORTED_MODULE_0__.valueToString)(x)}n`;\n }\n return `\"${(0,_util_pretty_mjs__WEBPACK_IMPORTED_MODULE_0__.valueToString)(x)}\"`;\n}\n\n//# sourceMappingURL=valid.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/builder/valid.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/data.mjs": +/*!********************************************!*\ + !*** ./node_modules/apache-arrow/data.mjs ***! + \********************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Data: () => (/* binding */ Data),\n/* harmony export */ kUnknownNullCount: () => (/* binding */ kUnknownNullCount),\n/* harmony export */ makeData: () => (/* binding */ makeData)\n/* harmony export */ });\n/* harmony import */ var _vector_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./vector.mjs */ \"./node_modules/apache-arrow/vector.mjs\");\n/* harmony import */ var _enum_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./enum.mjs */ \"./node_modules/apache-arrow/enum.mjs\");\n/* harmony import */ var _type_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./type.mjs */ \"./node_modules/apache-arrow/type.mjs\");\n/* harmony import */ var _util_bit_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/bit.mjs */ \"./node_modules/apache-arrow/util/bit.mjs\");\n/* harmony import */ var _visitor_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./visitor.mjs */ \"./node_modules/apache-arrow/visitor.mjs\");\n/* harmony import */ var _util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./util/buffer.mjs */ \"./node_modules/apache-arrow/util/buffer.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n\n\n/** @ignore */ const kUnknownNullCount = -1;\n/**\n * Data structure underlying {@link Vector}s. Use the convenience method {@link makeData}.\n */\nclass Data {\n constructor(type, offset, length, nullCount, buffers, children = [], dictionary) {\n this.type = type;\n this.children = children;\n this.dictionary = dictionary;\n this.offset = Math.floor(Math.max(offset || 0, 0));\n this.length = Math.floor(Math.max(length || 0, 0));\n this._nullCount = Math.floor(Math.max(nullCount || 0, -1));\n let buffer;\n if (buffers instanceof Data) {\n this.stride = buffers.stride;\n this.values = buffers.values;\n this.typeIds = buffers.typeIds;\n this.nullBitmap = buffers.nullBitmap;\n this.valueOffsets = buffers.valueOffsets;\n }\n else {\n this.stride = (0,_type_mjs__WEBPACK_IMPORTED_MODULE_0__.strideForType)(type);\n if (buffers) {\n (buffer = buffers[0]) && (this.valueOffsets = buffer);\n (buffer = buffers[1]) && (this.values = buffer);\n (buffer = buffers[2]) && (this.nullBitmap = buffer);\n (buffer = buffers[3]) && (this.typeIds = buffer);\n }\n }\n this.nullable = this._nullCount !== 0 && this.nullBitmap && this.nullBitmap.byteLength > 0;\n }\n get typeId() { return this.type.typeId; }\n get ArrayType() { return this.type.ArrayType; }\n get buffers() {\n return [this.valueOffsets, this.values, this.nullBitmap, this.typeIds];\n }\n get byteLength() {\n let byteLength = 0;\n const { valueOffsets, values, nullBitmap, typeIds } = this;\n valueOffsets && (byteLength += valueOffsets.byteLength);\n values && (byteLength += values.byteLength);\n nullBitmap && (byteLength += nullBitmap.byteLength);\n typeIds && (byteLength += typeIds.byteLength);\n return this.children.reduce((byteLength, child) => byteLength + child.byteLength, byteLength);\n }\n get nullCount() {\n let nullCount = this._nullCount;\n let nullBitmap;\n if (nullCount <= kUnknownNullCount && (nullBitmap = this.nullBitmap)) {\n this._nullCount = nullCount = this.length - (0,_util_bit_mjs__WEBPACK_IMPORTED_MODULE_1__.popcnt_bit_range)(nullBitmap, this.offset, this.offset + this.length);\n }\n return nullCount;\n }\n getValid(index) {\n if (this.nullable && this.nullCount > 0) {\n const pos = this.offset + index;\n const val = this.nullBitmap[pos >> 3];\n return (val & (1 << (pos % 8))) !== 0;\n }\n return true;\n }\n setValid(index, value) {\n // Don't interact w/ nullBitmap if not nullable\n if (!this.nullable) {\n return value;\n }\n // If no null bitmap, initialize one on the fly\n if (!this.nullBitmap || this.nullBitmap.byteLength <= (index >> 3)) {\n const { nullBitmap } = this._changeLengthAndBackfillNullBitmap(this.length);\n Object.assign(this, { nullBitmap, _nullCount: 0 });\n }\n const { nullBitmap, offset } = this;\n const pos = (offset + index) >> 3;\n const bit = (offset + index) % 8;\n const val = (nullBitmap[pos] >> bit) & 1;\n // If `val` is truthy and the current bit is 0, flip it to 1 and increment `_nullCount`.\n // If `val` is falsey and the current bit is 1, flip it to 0 and decrement `_nullCount`.\n value ? val === 0 && ((nullBitmap[pos] |= (1 << bit)), (this._nullCount = this.nullCount + 1))\n : val === 1 && ((nullBitmap[pos] &= ~(1 << bit)), (this._nullCount = this.nullCount - 1));\n return value;\n }\n clone(type = this.type, offset = this.offset, length = this.length, nullCount = this._nullCount, buffers = this, children = this.children) {\n return new Data(type, offset, length, nullCount, buffers, children, this.dictionary);\n }\n slice(offset, length) {\n const { stride, typeId, children } = this;\n // +true === 1, +false === 0, so this means\n // we keep nullCount at 0 if it's already 0,\n // otherwise set to the invalidated flag -1\n const nullCount = +(this._nullCount === 0) - 1;\n const childStride = typeId === 16 /* FixedSizeList */ ? stride : 1;\n const buffers = this._sliceBuffers(offset, length, stride, typeId);\n return this.clone(this.type, this.offset + offset, length, nullCount, buffers, \n // Don't slice children if we have value offsets (the variable-width types)\n (children.length === 0 || this.valueOffsets) ? children : this._sliceChildren(children, childStride * offset, childStride * length));\n }\n _changeLengthAndBackfillNullBitmap(newLength) {\n if (this.typeId === _enum_mjs__WEBPACK_IMPORTED_MODULE_2__.Type.Null) {\n return this.clone(this.type, 0, newLength, 0);\n }\n const { length, nullCount } = this;\n // start initialized with 0s (nulls), then fill from 0 to length with 1s (not null)\n const bitmap = new Uint8Array(((newLength + 63) & ~63) >> 3).fill(255, 0, length >> 3);\n // set all the bits in the last byte (up to bit `length - length % 8`) to 1 (not null)\n bitmap[length >> 3] = (1 << (length - (length & ~7))) - 1;\n // if we have a nullBitmap, truncate + slice and set it over the pre-filled 1s\n if (nullCount > 0) {\n bitmap.set((0,_util_bit_mjs__WEBPACK_IMPORTED_MODULE_1__.truncateBitmap)(this.offset, length, this.nullBitmap), 0);\n }\n const buffers = this.buffers;\n buffers[_enum_mjs__WEBPACK_IMPORTED_MODULE_2__.BufferType.VALIDITY] = bitmap;\n return this.clone(this.type, 0, newLength, nullCount + (newLength - length), buffers);\n }\n _sliceBuffers(offset, length, stride, typeId) {\n let arr;\n const { buffers } = this;\n // If typeIds exist, slice the typeIds buffer\n (arr = buffers[_enum_mjs__WEBPACK_IMPORTED_MODULE_2__.BufferType.TYPE]) && (buffers[_enum_mjs__WEBPACK_IMPORTED_MODULE_2__.BufferType.TYPE] = arr.subarray(offset, offset + length));\n // If offsets exist, only slice the offsets buffer\n (arr = buffers[_enum_mjs__WEBPACK_IMPORTED_MODULE_2__.BufferType.OFFSET]) && (buffers[_enum_mjs__WEBPACK_IMPORTED_MODULE_2__.BufferType.OFFSET] = arr.subarray(offset, offset + length + 1)) ||\n // Otherwise if no offsets, slice the data buffer. Don't slice the data vector for Booleans, since the offset goes by bits not bytes\n (arr = buffers[_enum_mjs__WEBPACK_IMPORTED_MODULE_2__.BufferType.DATA]) && (buffers[_enum_mjs__WEBPACK_IMPORTED_MODULE_2__.BufferType.DATA] = typeId === 6 ? arr : arr.subarray(stride * offset, stride * (offset + length)));\n return buffers;\n }\n _sliceChildren(children, offset, length) {\n return children.map((child) => child.slice(offset, length));\n }\n}\nData.prototype.children = Object.freeze([]);\n\n\nclass MakeDataVisitor extends _visitor_mjs__WEBPACK_IMPORTED_MODULE_3__.Visitor {\n visit(props) {\n return this.getVisitFn(props['type']).call(this, props);\n }\n visitNull(props) {\n const { ['type']: type, ['offset']: offset = 0, ['length']: length = 0, } = props;\n return new Data(type, offset, length, 0);\n }\n visitBool(props) {\n const { ['type']: type, ['offset']: offset = 0 } = props;\n const nullBitmap = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__.toUint8Array)(props['nullBitmap']);\n const data = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__.toArrayBufferView)(type.ArrayType, props['data']);\n const { ['length']: length = data.length >> 3, ['nullCount']: nullCount = props['nullBitmap'] ? -1 : 0, } = props;\n return new Data(type, offset, length, nullCount, [undefined, data, nullBitmap]);\n }\n visitInt(props) {\n const { ['type']: type, ['offset']: offset = 0 } = props;\n const nullBitmap = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__.toUint8Array)(props['nullBitmap']);\n const data = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__.toArrayBufferView)(type.ArrayType, props['data']);\n const { ['length']: length = data.length, ['nullCount']: nullCount = props['nullBitmap'] ? -1 : 0, } = props;\n return new Data(type, offset, length, nullCount, [undefined, data, nullBitmap]);\n }\n visitFloat(props) {\n const { ['type']: type, ['offset']: offset = 0 } = props;\n const nullBitmap = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__.toUint8Array)(props['nullBitmap']);\n const data = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__.toArrayBufferView)(type.ArrayType, props['data']);\n const { ['length']: length = data.length, ['nullCount']: nullCount = props['nullBitmap'] ? -1 : 0, } = props;\n return new Data(type, offset, length, nullCount, [undefined, data, nullBitmap]);\n }\n visitUtf8(props) {\n const { ['type']: type, ['offset']: offset = 0 } = props;\n const data = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__.toUint8Array)(props['data']);\n const nullBitmap = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__.toUint8Array)(props['nullBitmap']);\n const valueOffsets = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__.toInt32Array)(props['valueOffsets']);\n const { ['length']: length = valueOffsets.length - 1, ['nullCount']: nullCount = props['nullBitmap'] ? -1 : 0 } = props;\n return new Data(type, offset, length, nullCount, [valueOffsets, data, nullBitmap]);\n }\n visitBinary(props) {\n const { ['type']: type, ['offset']: offset = 0 } = props;\n const data = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__.toUint8Array)(props['data']);\n const nullBitmap = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__.toUint8Array)(props['nullBitmap']);\n const valueOffsets = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__.toInt32Array)(props['valueOffsets']);\n const { ['length']: length = valueOffsets.length - 1, ['nullCount']: nullCount = props['nullBitmap'] ? -1 : 0 } = props;\n return new Data(type, offset, length, nullCount, [valueOffsets, data, nullBitmap]);\n }\n visitFixedSizeBinary(props) {\n const { ['type']: type, ['offset']: offset = 0 } = props;\n const nullBitmap = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__.toUint8Array)(props['nullBitmap']);\n const data = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__.toArrayBufferView)(type.ArrayType, props['data']);\n const { ['length']: length = data.length / (0,_type_mjs__WEBPACK_IMPORTED_MODULE_0__.strideForType)(type), ['nullCount']: nullCount = props['nullBitmap'] ? -1 : 0, } = props;\n return new Data(type, offset, length, nullCount, [undefined, data, nullBitmap]);\n }\n visitDate(props) {\n const { ['type']: type, ['offset']: offset = 0 } = props;\n const nullBitmap = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__.toUint8Array)(props['nullBitmap']);\n const data = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__.toArrayBufferView)(type.ArrayType, props['data']);\n const { ['length']: length = data.length / (0,_type_mjs__WEBPACK_IMPORTED_MODULE_0__.strideForType)(type), ['nullCount']: nullCount = props['nullBitmap'] ? -1 : 0, } = props;\n return new Data(type, offset, length, nullCount, [undefined, data, nullBitmap]);\n }\n visitTimestamp(props) {\n const { ['type']: type, ['offset']: offset = 0 } = props;\n const nullBitmap = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__.toUint8Array)(props['nullBitmap']);\n const data = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__.toArrayBufferView)(type.ArrayType, props['data']);\n const { ['length']: length = data.length / (0,_type_mjs__WEBPACK_IMPORTED_MODULE_0__.strideForType)(type), ['nullCount']: nullCount = props['nullBitmap'] ? -1 : 0, } = props;\n return new Data(type, offset, length, nullCount, [undefined, data, nullBitmap]);\n }\n visitTime(props) {\n const { ['type']: type, ['offset']: offset = 0 } = props;\n const nullBitmap = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__.toUint8Array)(props['nullBitmap']);\n const data = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__.toArrayBufferView)(type.ArrayType, props['data']);\n const { ['length']: length = data.length / (0,_type_mjs__WEBPACK_IMPORTED_MODULE_0__.strideForType)(type), ['nullCount']: nullCount = props['nullBitmap'] ? -1 : 0, } = props;\n return new Data(type, offset, length, nullCount, [undefined, data, nullBitmap]);\n }\n visitDecimal(props) {\n const { ['type']: type, ['offset']: offset = 0 } = props;\n const nullBitmap = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__.toUint8Array)(props['nullBitmap']);\n const data = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__.toArrayBufferView)(type.ArrayType, props['data']);\n const { ['length']: length = data.length / (0,_type_mjs__WEBPACK_IMPORTED_MODULE_0__.strideForType)(type), ['nullCount']: nullCount = props['nullBitmap'] ? -1 : 0, } = props;\n return new Data(type, offset, length, nullCount, [undefined, data, nullBitmap]);\n }\n visitList(props) {\n const { ['type']: type, ['offset']: offset = 0, ['child']: child } = props;\n const nullBitmap = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__.toUint8Array)(props['nullBitmap']);\n const valueOffsets = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__.toInt32Array)(props['valueOffsets']);\n const { ['length']: length = valueOffsets.length - 1, ['nullCount']: nullCount = props['nullBitmap'] ? -1 : 0 } = props;\n return new Data(type, offset, length, nullCount, [valueOffsets, undefined, nullBitmap], [child]);\n }\n visitStruct(props) {\n const { ['type']: type, ['offset']: offset = 0, ['children']: children = [] } = props;\n const nullBitmap = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__.toUint8Array)(props['nullBitmap']);\n const { length = children.reduce((len, { length }) => Math.max(len, length), 0), nullCount = props['nullBitmap'] ? -1 : 0 } = props;\n return new Data(type, offset, length, nullCount, [undefined, undefined, nullBitmap], children);\n }\n visitUnion(props) {\n const { ['type']: type, ['offset']: offset = 0, ['children']: children = [] } = props;\n const nullBitmap = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__.toUint8Array)(props['nullBitmap']);\n const typeIds = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__.toArrayBufferView)(type.ArrayType, props['typeIds']);\n const { ['length']: length = typeIds.length, ['nullCount']: nullCount = props['nullBitmap'] ? -1 : 0, } = props;\n if (_type_mjs__WEBPACK_IMPORTED_MODULE_0__.DataType.isSparseUnion(type)) {\n return new Data(type, offset, length, nullCount, [undefined, undefined, nullBitmap, typeIds], children);\n }\n const valueOffsets = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__.toInt32Array)(props['valueOffsets']);\n return new Data(type, offset, length, nullCount, [valueOffsets, undefined, nullBitmap, typeIds], children);\n }\n visitDictionary(props) {\n const { ['type']: type, ['offset']: offset = 0 } = props;\n const nullBitmap = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__.toUint8Array)(props['nullBitmap']);\n const data = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__.toArrayBufferView)(type.indices.ArrayType, props['data']);\n const { ['dictionary']: dictionary = new _vector_mjs__WEBPACK_IMPORTED_MODULE_5__.Vector([new MakeDataVisitor().visit({ type: type.dictionary })]) } = props;\n const { ['length']: length = data.length, ['nullCount']: nullCount = props['nullBitmap'] ? -1 : 0 } = props;\n return new Data(type, offset, length, nullCount, [undefined, data, nullBitmap], [], dictionary);\n }\n visitInterval(props) {\n const { ['type']: type, ['offset']: offset = 0 } = props;\n const nullBitmap = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__.toUint8Array)(props['nullBitmap']);\n const data = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__.toArrayBufferView)(type.ArrayType, props['data']);\n const { ['length']: length = data.length / (0,_type_mjs__WEBPACK_IMPORTED_MODULE_0__.strideForType)(type), ['nullCount']: nullCount = props['nullBitmap'] ? -1 : 0, } = props;\n return new Data(type, offset, length, nullCount, [undefined, data, nullBitmap]);\n }\n visitFixedSizeList(props) {\n const { ['type']: type, ['offset']: offset = 0, ['child']: child = new MakeDataVisitor().visit({ type: type.valueType }) } = props;\n const nullBitmap = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__.toUint8Array)(props['nullBitmap']);\n const { ['length']: length = child.length / (0,_type_mjs__WEBPACK_IMPORTED_MODULE_0__.strideForType)(type), ['nullCount']: nullCount = props['nullBitmap'] ? -1 : 0 } = props;\n return new Data(type, offset, length, nullCount, [undefined, undefined, nullBitmap], [child]);\n }\n visitMap(props) {\n const { ['type']: type, ['offset']: offset = 0, ['child']: child = new MakeDataVisitor().visit({ type: type.childType }) } = props;\n const nullBitmap = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__.toUint8Array)(props['nullBitmap']);\n const valueOffsets = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__.toInt32Array)(props['valueOffsets']);\n const { ['length']: length = valueOffsets.length - 1, ['nullCount']: nullCount = props['nullBitmap'] ? -1 : 0, } = props;\n return new Data(type, offset, length, nullCount, [valueOffsets, undefined, nullBitmap], [child]);\n }\n}\nfunction makeData(props) {\n return new MakeDataVisitor().visit(props);\n}\n\n//# sourceMappingURL=data.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/data.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/enum.mjs": +/*!********************************************!*\ + !*** ./node_modules/apache-arrow/enum.mjs ***! + \********************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ BufferType: () => (/* binding */ BufferType),\n/* harmony export */ DateUnit: () => (/* binding */ DateUnit),\n/* harmony export */ IntervalUnit: () => (/* binding */ IntervalUnit),\n/* harmony export */ MessageHeader: () => (/* binding */ MessageHeader),\n/* harmony export */ MetadataVersion: () => (/* binding */ MetadataVersion),\n/* harmony export */ Precision: () => (/* binding */ Precision),\n/* harmony export */ TimeUnit: () => (/* binding */ TimeUnit),\n/* harmony export */ Type: () => (/* binding */ Type),\n/* harmony export */ UnionMode: () => (/* binding */ UnionMode)\n/* harmony export */ });\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n////\n//\n// A few enums copied from `fb/Schema.ts` and `fb/Message.ts` because Webpack\n// v4 doesn't seem to be able to tree-shake the rest of those exports.\n//\n// We will have to keep these enums in sync when we re-generate the flatbuffers\n// code from the shchemas. See js/DEVELOP.md for info on how to run flatbuffers\n// code generation.\n//\n////\n/**\n * Logical types, vector layouts, and schemas\n *\n * @enum {number}\n */\nvar MetadataVersion;\n(function (MetadataVersion) {\n /**\n * 0.1.0 (October 2016).\n */\n MetadataVersion[MetadataVersion[\"V1\"] = 0] = \"V1\";\n /**\n * 0.2.0 (February 2017). Non-backwards compatible with V1.\n */\n MetadataVersion[MetadataVersion[\"V2\"] = 1] = \"V2\";\n /**\n * 0.3.0 -> 0.7.1 (May - December 2017). Non-backwards compatible with V2.\n */\n MetadataVersion[MetadataVersion[\"V3\"] = 2] = \"V3\";\n /**\n * >= 0.8.0 (December 2017). Non-backwards compatible with V3.\n */\n MetadataVersion[MetadataVersion[\"V4\"] = 3] = \"V4\";\n /**\n * >= 1.0.0 (July 2020. Backwards compatible with V4 (V5 readers can read V4\n * metadata and IPC messages). Implementations are recommended to provide a\n * V4 compatibility mode with V5 format changes disabled.\n *\n * Incompatible changes between V4 and V5:\n * - Union buffer layout has changed. In V5, Unions don't have a validity\n * bitmap buffer.\n */\n MetadataVersion[MetadataVersion[\"V5\"] = 4] = \"V5\";\n})(MetadataVersion || (MetadataVersion = {}));\n/**\n * @enum {number}\n */\nvar UnionMode;\n(function (UnionMode) {\n UnionMode[UnionMode[\"Sparse\"] = 0] = \"Sparse\";\n UnionMode[UnionMode[\"Dense\"] = 1] = \"Dense\";\n})(UnionMode || (UnionMode = {}));\n/**\n * @enum {number}\n */\nvar Precision;\n(function (Precision) {\n Precision[Precision[\"HALF\"] = 0] = \"HALF\";\n Precision[Precision[\"SINGLE\"] = 1] = \"SINGLE\";\n Precision[Precision[\"DOUBLE\"] = 2] = \"DOUBLE\";\n})(Precision || (Precision = {}));\n/**\n * @enum {number}\n */\nvar DateUnit;\n(function (DateUnit) {\n DateUnit[DateUnit[\"DAY\"] = 0] = \"DAY\";\n DateUnit[DateUnit[\"MILLISECOND\"] = 1] = \"MILLISECOND\";\n})(DateUnit || (DateUnit = {}));\n/**\n * @enum {number}\n */\nvar TimeUnit;\n(function (TimeUnit) {\n TimeUnit[TimeUnit[\"SECOND\"] = 0] = \"SECOND\";\n TimeUnit[TimeUnit[\"MILLISECOND\"] = 1] = \"MILLISECOND\";\n TimeUnit[TimeUnit[\"MICROSECOND\"] = 2] = \"MICROSECOND\";\n TimeUnit[TimeUnit[\"NANOSECOND\"] = 3] = \"NANOSECOND\";\n})(TimeUnit || (TimeUnit = {}));\n/**\n * @enum {number}\n */\nvar IntervalUnit;\n(function (IntervalUnit) {\n IntervalUnit[IntervalUnit[\"YEAR_MONTH\"] = 0] = \"YEAR_MONTH\";\n IntervalUnit[IntervalUnit[\"DAY_TIME\"] = 1] = \"DAY_TIME\";\n IntervalUnit[IntervalUnit[\"MONTH_DAY_NANO\"] = 2] = \"MONTH_DAY_NANO\";\n})(IntervalUnit || (IntervalUnit = {}));\n/**\n * ----------------------------------------------------------------------\n * The root Message type\n * This union enables us to easily send different message types without\n * redundant storage, and in the future we can easily add new message types.\n *\n * Arrow implementations do not need to implement all of the message types,\n * which may include experimental metadata types. For maximum compatibility,\n * it is best to send data using RecordBatch\n *\n * @enum {number}\n */\nvar MessageHeader;\n(function (MessageHeader) {\n MessageHeader[MessageHeader[\"NONE\"] = 0] = \"NONE\";\n MessageHeader[MessageHeader[\"Schema\"] = 1] = \"Schema\";\n MessageHeader[MessageHeader[\"DictionaryBatch\"] = 2] = \"DictionaryBatch\";\n MessageHeader[MessageHeader[\"RecordBatch\"] = 3] = \"RecordBatch\";\n MessageHeader[MessageHeader[\"Tensor\"] = 4] = \"Tensor\";\n MessageHeader[MessageHeader[\"SparseTensor\"] = 5] = \"SparseTensor\";\n})(MessageHeader || (MessageHeader = {}));\n/**\n * Main data type enumeration.\n *\n * Data types in this library are all *logical*. They can be expressed as\n * either a primitive physical type (bytes or bits of some fixed size), a\n * nested type consisting of other data types, or another data type (e.g. a\n * timestamp encoded as an int64).\n *\n * **Note**: Only enum values 0-17 (NONE through Map) are written to an Arrow\n * IPC payload.\n *\n * The rest of the values are specified here so TypeScript can narrow the type\n * signatures further beyond the base Arrow Types. The Arrow DataTypes include\n * metadata like `bitWidth` that impact the type signatures of the values we\n * accept and return.\n *\n * For example, the `Int8Vector` reads 1-byte numbers from an `Int8Array`, an\n * `Int32Vector` reads a 4-byte number from an `Int32Array`, and an `Int64Vector`\n * reads a pair of 4-byte lo, hi 32-bit integers as a zero-copy slice from the\n * underlying `Int32Array`.\n *\n * Library consumers benefit by knowing the narrowest type, since we can ensure\n * the types across all public methods are propagated, and never bail to `any`.\n * These values are _never_ used at runtime, and they will _never_ be written\n * to the flatbuffers metadata of serialized Arrow IPC payloads.\n */\nvar Type;\n(function (Type) {\n Type[Type[\"NONE\"] = 0] = \"NONE\";\n Type[Type[\"Null\"] = 1] = \"Null\";\n Type[Type[\"Int\"] = 2] = \"Int\";\n Type[Type[\"Float\"] = 3] = \"Float\";\n Type[Type[\"Binary\"] = 4] = \"Binary\";\n Type[Type[\"Utf8\"] = 5] = \"Utf8\";\n Type[Type[\"Bool\"] = 6] = \"Bool\";\n Type[Type[\"Decimal\"] = 7] = \"Decimal\";\n Type[Type[\"Date\"] = 8] = \"Date\";\n Type[Type[\"Time\"] = 9] = \"Time\";\n Type[Type[\"Timestamp\"] = 10] = \"Timestamp\";\n Type[Type[\"Interval\"] = 11] = \"Interval\";\n Type[Type[\"List\"] = 12] = \"List\";\n Type[Type[\"Struct\"] = 13] = \"Struct\";\n Type[Type[\"Union\"] = 14] = \"Union\";\n Type[Type[\"FixedSizeBinary\"] = 15] = \"FixedSizeBinary\";\n Type[Type[\"FixedSizeList\"] = 16] = \"FixedSizeList\";\n Type[Type[\"Map\"] = 17] = \"Map\";\n Type[Type[\"Dictionary\"] = -1] = \"Dictionary\";\n Type[Type[\"Int8\"] = -2] = \"Int8\";\n Type[Type[\"Int16\"] = -3] = \"Int16\";\n Type[Type[\"Int32\"] = -4] = \"Int32\";\n Type[Type[\"Int64\"] = -5] = \"Int64\";\n Type[Type[\"Uint8\"] = -6] = \"Uint8\";\n Type[Type[\"Uint16\"] = -7] = \"Uint16\";\n Type[Type[\"Uint32\"] = -8] = \"Uint32\";\n Type[Type[\"Uint64\"] = -9] = \"Uint64\";\n Type[Type[\"Float16\"] = -10] = \"Float16\";\n Type[Type[\"Float32\"] = -11] = \"Float32\";\n Type[Type[\"Float64\"] = -12] = \"Float64\";\n Type[Type[\"DateDay\"] = -13] = \"DateDay\";\n Type[Type[\"DateMillisecond\"] = -14] = \"DateMillisecond\";\n Type[Type[\"TimestampSecond\"] = -15] = \"TimestampSecond\";\n Type[Type[\"TimestampMillisecond\"] = -16] = \"TimestampMillisecond\";\n Type[Type[\"TimestampMicrosecond\"] = -17] = \"TimestampMicrosecond\";\n Type[Type[\"TimestampNanosecond\"] = -18] = \"TimestampNanosecond\";\n Type[Type[\"TimeSecond\"] = -19] = \"TimeSecond\";\n Type[Type[\"TimeMillisecond\"] = -20] = \"TimeMillisecond\";\n Type[Type[\"TimeMicrosecond\"] = -21] = \"TimeMicrosecond\";\n Type[Type[\"TimeNanosecond\"] = -22] = \"TimeNanosecond\";\n Type[Type[\"DenseUnion\"] = -23] = \"DenseUnion\";\n Type[Type[\"SparseUnion\"] = -24] = \"SparseUnion\";\n Type[Type[\"IntervalDayTime\"] = -25] = \"IntervalDayTime\";\n Type[Type[\"IntervalYearMonth\"] = -26] = \"IntervalYearMonth\";\n})(Type || (Type = {}));\nvar BufferType;\n(function (BufferType) {\n /**\n * used in List type, Dense Union and variable length primitive types (String, Binary)\n */\n BufferType[BufferType[\"OFFSET\"] = 0] = \"OFFSET\";\n /**\n * actual data, either wixed width primitive types in slots or variable width delimited by an OFFSET vector\n */\n BufferType[BufferType[\"DATA\"] = 1] = \"DATA\";\n /**\n * Bit vector indicating if each value is null\n */\n BufferType[BufferType[\"VALIDITY\"] = 2] = \"VALIDITY\";\n /**\n * Type vector used in Union type\n */\n BufferType[BufferType[\"TYPE\"] = 3] = \"TYPE\";\n})(BufferType || (BufferType = {}));\n\n//# sourceMappingURL=enum.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/enum.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/factories.mjs": +/*!*************************************************!*\ + !*** ./node_modules/apache-arrow/factories.mjs ***! + \*************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ builderThroughAsyncIterable: () => (/* binding */ builderThroughAsyncIterable),\n/* harmony export */ builderThroughIterable: () => (/* binding */ builderThroughIterable),\n/* harmony export */ makeBuilder: () => (/* binding */ makeBuilder),\n/* harmony export */ tableFromJSON: () => (/* binding */ tableFromJSON),\n/* harmony export */ vectorFromArray: () => (/* binding */ vectorFromArray)\n/* harmony export */ });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! tslib */ \"./node_modules/tslib/tslib.es6.mjs\");\n/* harmony import */ var _schema_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./schema.mjs */ \"./node_modules/apache-arrow/schema.mjs\");\n/* harmony import */ var _type_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./type.mjs */ \"./node_modules/apache-arrow/type.mjs\");\n/* harmony import */ var _data_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data.mjs */ \"./node_modules/apache-arrow/data.mjs\");\n/* harmony import */ var _vector_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./vector.mjs */ \"./node_modules/apache-arrow/vector.mjs\");\n/* harmony import */ var _visitor_builderctor_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./visitor/builderctor.mjs */ \"./node_modules/apache-arrow/visitor/builderctor.mjs\");\n/* harmony import */ var _table_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./table.mjs */ \"./node_modules/apache-arrow/table.mjs\");\n/* harmony import */ var _recordbatch_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./recordbatch.mjs */ \"./node_modules/apache-arrow/recordbatch.mjs\");\n/* harmony import */ var _visitor_typecomparator_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./visitor/typecomparator.mjs */ \"./node_modules/apache-arrow/visitor/typecomparator.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n\n\n\n\n\n\n\nfunction makeBuilder(options) {\n const type = options.type;\n const builder = new (_visitor_builderctor_mjs__WEBPACK_IMPORTED_MODULE_0__.instance.getVisitFn(type)())(options);\n if (type.children && type.children.length > 0) {\n const children = options['children'] || [];\n const defaultOptions = { 'nullValues': options['nullValues'] };\n const getChildOptions = Array.isArray(children)\n ? ((_, i) => children[i] || defaultOptions)\n : (({ name }) => children[name] || defaultOptions);\n for (const [index, field] of type.children.entries()) {\n const { type } = field;\n const opts = getChildOptions(field, index);\n builder.children.push(makeBuilder(Object.assign(Object.assign({}, opts), { type })));\n }\n }\n return builder;\n}\nfunction vectorFromArray(init, type) {\n if (init instanceof _data_mjs__WEBPACK_IMPORTED_MODULE_1__.Data || init instanceof _vector_mjs__WEBPACK_IMPORTED_MODULE_2__.Vector || init.type instanceof _type_mjs__WEBPACK_IMPORTED_MODULE_3__.DataType || ArrayBuffer.isView(init)) {\n return (0,_vector_mjs__WEBPACK_IMPORTED_MODULE_2__.makeVector)(init);\n }\n const options = { type: type !== null && type !== void 0 ? type : inferType(init), nullValues: [null] };\n const chunks = [...builderThroughIterable(options)(init)];\n const vector = chunks.length === 1 ? chunks[0] : chunks.reduce((a, b) => a.concat(b));\n if (_type_mjs__WEBPACK_IMPORTED_MODULE_3__.DataType.isDictionary(vector.type)) {\n return vector.memoize();\n }\n return vector;\n}\n/**\n * Creates a {@link Table} from an array of objects.\n *\n * @param array A table of objects.\n */\nfunction tableFromJSON(array) {\n const vector = vectorFromArray(array);\n const batch = new _recordbatch_mjs__WEBPACK_IMPORTED_MODULE_4__.RecordBatch(new _schema_mjs__WEBPACK_IMPORTED_MODULE_5__.Schema(vector.type.children), vector.data[0]);\n return new _table_mjs__WEBPACK_IMPORTED_MODULE_6__.Table(batch);\n}\nfunction inferType(value) {\n if (value.length === 0) {\n return new _type_mjs__WEBPACK_IMPORTED_MODULE_3__.Null;\n }\n let nullsCount = 0;\n let arraysCount = 0;\n let objectsCount = 0;\n let numbersCount = 0;\n let stringsCount = 0;\n let bigintsCount = 0;\n let booleansCount = 0;\n let datesCount = 0;\n for (const val of value) {\n if (val == null) {\n ++nullsCount;\n continue;\n }\n switch (typeof val) {\n case 'bigint':\n ++bigintsCount;\n continue;\n case 'boolean':\n ++booleansCount;\n continue;\n case 'number':\n ++numbersCount;\n continue;\n case 'string':\n ++stringsCount;\n continue;\n case 'object':\n if (Array.isArray(val)) {\n ++arraysCount;\n }\n else if (Object.prototype.toString.call(val) === '[object Date]') {\n ++datesCount;\n }\n else {\n ++objectsCount;\n }\n continue;\n }\n throw new TypeError('Unable to infer Vector type from input values, explicit type declaration expected');\n }\n if (numbersCount + nullsCount === value.length) {\n return new _type_mjs__WEBPACK_IMPORTED_MODULE_3__.Float64;\n }\n else if (stringsCount + nullsCount === value.length) {\n return new _type_mjs__WEBPACK_IMPORTED_MODULE_3__.Dictionary(new _type_mjs__WEBPACK_IMPORTED_MODULE_3__.Utf8, new _type_mjs__WEBPACK_IMPORTED_MODULE_3__.Int32);\n }\n else if (bigintsCount + nullsCount === value.length) {\n return new _type_mjs__WEBPACK_IMPORTED_MODULE_3__.Int64;\n }\n else if (booleansCount + nullsCount === value.length) {\n return new _type_mjs__WEBPACK_IMPORTED_MODULE_3__.Bool;\n }\n else if (datesCount + nullsCount === value.length) {\n return new _type_mjs__WEBPACK_IMPORTED_MODULE_3__.DateMillisecond;\n }\n else if (arraysCount + nullsCount === value.length) {\n const array = value;\n const childType = inferType(array[array.findIndex((ary) => ary != null)]);\n if (array.every((ary) => ary == null || (0,_visitor_typecomparator_mjs__WEBPACK_IMPORTED_MODULE_7__.compareTypes)(childType, inferType(ary)))) {\n return new _type_mjs__WEBPACK_IMPORTED_MODULE_3__.List(new _schema_mjs__WEBPACK_IMPORTED_MODULE_5__.Field('', childType, true));\n }\n }\n else if (objectsCount + nullsCount === value.length) {\n const fields = new Map();\n for (const row of value) {\n for (const key of Object.keys(row)) {\n if (!fields.has(key) && row[key] != null) {\n // use the type inferred for the first instance of a found key\n fields.set(key, new _schema_mjs__WEBPACK_IMPORTED_MODULE_5__.Field(key, inferType([row[key]]), true));\n }\n }\n }\n return new _type_mjs__WEBPACK_IMPORTED_MODULE_3__.Struct([...fields.values()]);\n }\n throw new TypeError('Unable to infer Vector type from input values, explicit type declaration expected');\n}\n/**\n * Transform a synchronous `Iterable` of arbitrary JavaScript values into a\n * sequence of Arrow Vector following the chunking semantics defined in\n * the supplied `options` argument.\n *\n * This function returns a function that accepts an `Iterable` of values to\n * transform. When called, this function returns an Iterator of `Vector`.\n *\n * The resulting `Iterator>` yields Vectors based on the\n * `queueingStrategy` and `highWaterMark` specified in the `options` argument.\n *\n * * If `queueingStrategy` is `\"count\"` (or omitted), The `Iterator>`\n * will flush the underlying `Builder` (and yield a new `Vector`) once the\n * Builder's `length` reaches or exceeds the supplied `highWaterMark`.\n * * If `queueingStrategy` is `\"bytes\"`, the `Iterator>` will flush\n * the underlying `Builder` (and yield a new `Vector`) once its `byteLength`\n * reaches or exceeds the supplied `highWaterMark`.\n *\n * @param {IterableBuilderOptions} options An object of properties which determine the `Builder` to create and the chunking semantics to use.\n * @returns A function which accepts a JavaScript `Iterable` of values to\n * write, and returns an `Iterator` that yields Vectors according\n * to the chunking semantics defined in the `options` argument.\n * @nocollapse\n */\nfunction builderThroughIterable(options) {\n const { ['queueingStrategy']: queueingStrategy = 'count' } = options;\n const { ['highWaterMark']: highWaterMark = queueingStrategy !== 'bytes' ? Number.POSITIVE_INFINITY : Math.pow(2, 14) } = options;\n const sizeProperty = queueingStrategy !== 'bytes' ? 'length' : 'byteLength';\n return function* (source) {\n let numChunks = 0;\n const builder = makeBuilder(options);\n for (const value of source) {\n if (builder.append(value)[sizeProperty] >= highWaterMark) {\n ++numChunks && (yield builder.toVector());\n }\n }\n if (builder.finish().length > 0 || numChunks === 0) {\n yield builder.toVector();\n }\n };\n}\n/**\n * Transform an `AsyncIterable` of arbitrary JavaScript values into a\n * sequence of Arrow Vector following the chunking semantics defined in\n * the supplied `options` argument.\n *\n * This function returns a function that accepts an `AsyncIterable` of values to\n * transform. When called, this function returns an AsyncIterator of `Vector`.\n *\n * The resulting `AsyncIterator>` yields Vectors based on the\n * `queueingStrategy` and `highWaterMark` specified in the `options` argument.\n *\n * * If `queueingStrategy` is `\"count\"` (or omitted), The `AsyncIterator>`\n * will flush the underlying `Builder` (and yield a new `Vector`) once the\n * Builder's `length` reaches or exceeds the supplied `highWaterMark`.\n * * If `queueingStrategy` is `\"bytes\"`, the `AsyncIterator>` will flush\n * the underlying `Builder` (and yield a new `Vector`) once its `byteLength`\n * reaches or exceeds the supplied `highWaterMark`.\n *\n * @param {IterableBuilderOptions} options An object of properties which determine the `Builder` to create and the chunking semantics to use.\n * @returns A function which accepts a JavaScript `AsyncIterable` of values\n * to write, and returns an `AsyncIterator` that yields Vectors\n * according to the chunking semantics defined in the `options`\n * argument.\n * @nocollapse\n */\nfunction builderThroughAsyncIterable(options) {\n const { ['queueingStrategy']: queueingStrategy = 'count' } = options;\n const { ['highWaterMark']: highWaterMark = queueingStrategy !== 'bytes' ? Number.POSITIVE_INFINITY : Math.pow(2, 14) } = options;\n const sizeProperty = queueingStrategy !== 'bytes' ? 'length' : 'byteLength';\n return function (source) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_8__.__asyncGenerator)(this, arguments, function* () {\n var e_1, _a;\n let numChunks = 0;\n const builder = makeBuilder(options);\n try {\n for (var source_1 = (0,tslib__WEBPACK_IMPORTED_MODULE_8__.__asyncValues)(source), source_1_1; source_1_1 = yield (0,tslib__WEBPACK_IMPORTED_MODULE_8__.__await)(source_1.next()), !source_1_1.done;) {\n const value = source_1_1.value;\n if (builder.append(value)[sizeProperty] >= highWaterMark) {\n ++numChunks && (yield yield (0,tslib__WEBPACK_IMPORTED_MODULE_8__.__await)(builder.toVector()));\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (source_1_1 && !source_1_1.done && (_a = source_1.return)) yield (0,tslib__WEBPACK_IMPORTED_MODULE_8__.__await)(_a.call(source_1));\n }\n finally { if (e_1) throw e_1.error; }\n }\n if (builder.finish().length > 0 || numChunks === 0) {\n yield yield (0,tslib__WEBPACK_IMPORTED_MODULE_8__.__await)(builder.toVector());\n }\n });\n };\n}\n\n//# sourceMappingURL=factories.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/factories.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/binary.mjs": +/*!*************************************************!*\ + !*** ./node_modules/apache-arrow/fb/binary.mjs ***! + \*************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Binary: () => (/* binding */ Binary)\n/* harmony export */ });\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\n/**\n * Opaque binary data\n */\nclass Binary {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsBinary(bb, obj) {\n return (obj || new Binary()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsBinary(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers__WEBPACK_IMPORTED_MODULE_0__.SIZE_PREFIX_LENGTH);\n return (obj || new Binary()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static startBinary(builder) {\n builder.startObject(0);\n }\n static endBinary(builder) {\n const offset = builder.endObject();\n return offset;\n }\n static createBinary(builder) {\n Binary.startBinary(builder);\n return Binary.endBinary(builder);\n }\n}\n\n//# sourceMappingURL=binary.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/binary.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/block.mjs": +/*!************************************************!*\ + !*** ./node_modules/apache-arrow/fb/block.mjs ***! + \************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Block: () => (/* binding */ Block)\n/* harmony export */ });\n// automatically generated by the FlatBuffers compiler, do not modify\nclass Block {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n /**\n * Index to the start of the RecordBlock (note this is past the Message header)\n */\n offset() {\n return this.bb.readInt64(this.bb_pos);\n }\n /**\n * Length of the metadata\n */\n metaDataLength() {\n return this.bb.readInt32(this.bb_pos + 8);\n }\n /**\n * Length of the data (this is aligned so there can be a gap between this and\n * the metadata).\n */\n bodyLength() {\n return this.bb.readInt64(this.bb_pos + 16);\n }\n static sizeOf() {\n return 24;\n }\n static createBlock(builder, offset, metaDataLength, bodyLength) {\n builder.prep(8, 24);\n builder.writeInt64(bodyLength);\n builder.pad(4);\n builder.writeInt32(metaDataLength);\n builder.writeInt64(offset);\n return builder.offset();\n }\n}\n\n//# sourceMappingURL=block.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/block.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/body-compression-method.mjs": +/*!******************************************************************!*\ + !*** ./node_modules/apache-arrow/fb/body-compression-method.mjs ***! + \******************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ BodyCompressionMethod: () => (/* binding */ BodyCompressionMethod)\n/* harmony export */ });\n// automatically generated by the FlatBuffers compiler, do not modify\n/**\n * Provided for forward compatibility in case we need to support different\n * strategies for compressing the IPC message body (like whole-body\n * compression rather than buffer-level) in the future\n */\nvar BodyCompressionMethod;\n(function (BodyCompressionMethod) {\n /**\n * Each constituent buffer is first compressed with the indicated\n * compressor, and then written with the uncompressed length in the first 8\n * bytes as a 64-bit little-endian signed integer followed by the compressed\n * buffer bytes (and then padding as required by the protocol). The\n * uncompressed length may be set to -1 to indicate that the data that\n * follows is not compressed, which can be useful for cases where\n * compression does not yield appreciable savings.\n */\n BodyCompressionMethod[BodyCompressionMethod[\"BUFFER\"] = 0] = \"BUFFER\";\n})(BodyCompressionMethod || (BodyCompressionMethod = {}));\n\n//# sourceMappingURL=body-compression-method.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/body-compression-method.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/body-compression.mjs": +/*!***********************************************************!*\ + !*** ./node_modules/apache-arrow/fb/body-compression.mjs ***! + \***********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ BodyCompression: () => (/* binding */ BodyCompression)\n/* harmony export */ });\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n/* harmony import */ var _body_compression_method_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./body-compression-method.mjs */ \"./node_modules/apache-arrow/fb/body-compression-method.mjs\");\n/* harmony import */ var _compression_type_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./compression-type.mjs */ \"./node_modules/apache-arrow/fb/compression-type.mjs\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\n\n\n/**\n * Optional compression for the memory buffers constituting IPC message\n * bodies. Intended for use with RecordBatch but could be used for other\n * message types\n */\nclass BodyCompression {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsBodyCompression(bb, obj) {\n return (obj || new BodyCompression()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsBodyCompression(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers__WEBPACK_IMPORTED_MODULE_0__.SIZE_PREFIX_LENGTH);\n return (obj || new BodyCompression()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * Compressor library.\n * For LZ4_FRAME, each compressed buffer must consist of a single frame.\n */\n codec() {\n const offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.readInt8(this.bb_pos + offset) : _compression_type_mjs__WEBPACK_IMPORTED_MODULE_1__.CompressionType.LZ4_FRAME;\n }\n /**\n * Indicates the way the record batch body was compressed\n */\n method() {\n const offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? this.bb.readInt8(this.bb_pos + offset) : _body_compression_method_mjs__WEBPACK_IMPORTED_MODULE_2__.BodyCompressionMethod.BUFFER;\n }\n static startBodyCompression(builder) {\n builder.startObject(2);\n }\n static addCodec(builder, codec) {\n builder.addFieldInt8(0, codec, _compression_type_mjs__WEBPACK_IMPORTED_MODULE_1__.CompressionType.LZ4_FRAME);\n }\n static addMethod(builder, method) {\n builder.addFieldInt8(1, method, _body_compression_method_mjs__WEBPACK_IMPORTED_MODULE_2__.BodyCompressionMethod.BUFFER);\n }\n static endBodyCompression(builder) {\n const offset = builder.endObject();\n return offset;\n }\n static createBodyCompression(builder, codec, method) {\n BodyCompression.startBodyCompression(builder);\n BodyCompression.addCodec(builder, codec);\n BodyCompression.addMethod(builder, method);\n return BodyCompression.endBodyCompression(builder);\n }\n}\n\n//# sourceMappingURL=body-compression.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/body-compression.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/bool.mjs": +/*!***********************************************!*\ + !*** ./node_modules/apache-arrow/fb/bool.mjs ***! + \***********************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Bool: () => (/* binding */ Bool)\n/* harmony export */ });\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\nclass Bool {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsBool(bb, obj) {\n return (obj || new Bool()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsBool(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers__WEBPACK_IMPORTED_MODULE_0__.SIZE_PREFIX_LENGTH);\n return (obj || new Bool()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static startBool(builder) {\n builder.startObject(0);\n }\n static endBool(builder) {\n const offset = builder.endObject();\n return offset;\n }\n static createBool(builder) {\n Bool.startBool(builder);\n return Bool.endBool(builder);\n }\n}\n\n//# sourceMappingURL=bool.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/bool.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/buffer.mjs": +/*!*************************************************!*\ + !*** ./node_modules/apache-arrow/fb/buffer.mjs ***! + \*************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Buffer: () => (/* binding */ Buffer)\n/* harmony export */ });\n// automatically generated by the FlatBuffers compiler, do not modify\n/**\n * ----------------------------------------------------------------------\n * A Buffer represents a single contiguous memory segment\n */\nclass Buffer {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n /**\n * The relative offset into the shared memory page where the bytes for this\n * buffer starts\n */\n offset() {\n return this.bb.readInt64(this.bb_pos);\n }\n /**\n * The absolute length (in bytes) of the memory buffer. The memory is found\n * from offset (inclusive) to offset + length (non-inclusive). When building\n * messages using the encapsulated IPC message, padding bytes may be written\n * after a buffer, but such padding bytes do not need to be accounted for in\n * the size here.\n */\n length() {\n return this.bb.readInt64(this.bb_pos + 8);\n }\n static sizeOf() {\n return 16;\n }\n static createBuffer(builder, offset, length) {\n builder.prep(8, 16);\n builder.writeInt64(length);\n builder.writeInt64(offset);\n return builder.offset();\n }\n}\n\n//# sourceMappingURL=buffer.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/buffer.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/compression-type.mjs": +/*!***********************************************************!*\ + !*** ./node_modules/apache-arrow/fb/compression-type.mjs ***! + \***********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ CompressionType: () => (/* binding */ CompressionType)\n/* harmony export */ });\n// automatically generated by the FlatBuffers compiler, do not modify\nvar CompressionType;\n(function (CompressionType) {\n CompressionType[CompressionType[\"LZ4_FRAME\"] = 0] = \"LZ4_FRAME\";\n CompressionType[CompressionType[\"ZSTD\"] = 1] = \"ZSTD\";\n})(CompressionType || (CompressionType = {}));\n\n//# sourceMappingURL=compression-type.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/compression-type.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/date-unit.mjs": +/*!****************************************************!*\ + !*** ./node_modules/apache-arrow/fb/date-unit.mjs ***! + \****************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DateUnit: () => (/* binding */ DateUnit)\n/* harmony export */ });\n// automatically generated by the FlatBuffers compiler, do not modify\nvar DateUnit;\n(function (DateUnit) {\n DateUnit[DateUnit[\"DAY\"] = 0] = \"DAY\";\n DateUnit[DateUnit[\"MILLISECOND\"] = 1] = \"MILLISECOND\";\n})(DateUnit || (DateUnit = {}));\n\n//# sourceMappingURL=date-unit.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/date-unit.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/date.mjs": +/*!***********************************************!*\ + !*** ./node_modules/apache-arrow/fb/date.mjs ***! + \***********************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Date: () => (/* binding */ Date)\n/* harmony export */ });\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n/* harmony import */ var _date_unit_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./date-unit.mjs */ \"./node_modules/apache-arrow/fb/date-unit.mjs\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\n\n/**\n * Date is either a 32-bit or 64-bit signed integer type representing an\n * elapsed time since UNIX epoch (1970-01-01), stored in either of two units:\n *\n * * Milliseconds (64 bits) indicating UNIX time elapsed since the epoch (no\n * leap seconds), where the values are evenly divisible by 86400000\n * * Days (32 bits) since the UNIX epoch\n */\nclass Date {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsDate(bb, obj) {\n return (obj || new Date()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsDate(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers__WEBPACK_IMPORTED_MODULE_0__.SIZE_PREFIX_LENGTH);\n return (obj || new Date()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n unit() {\n const offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.readInt16(this.bb_pos + offset) : _date_unit_mjs__WEBPACK_IMPORTED_MODULE_1__.DateUnit.MILLISECOND;\n }\n static startDate(builder) {\n builder.startObject(1);\n }\n static addUnit(builder, unit) {\n builder.addFieldInt16(0, unit, _date_unit_mjs__WEBPACK_IMPORTED_MODULE_1__.DateUnit.MILLISECOND);\n }\n static endDate(builder) {\n const offset = builder.endObject();\n return offset;\n }\n static createDate(builder, unit) {\n Date.startDate(builder);\n Date.addUnit(builder, unit);\n return Date.endDate(builder);\n }\n}\n\n//# sourceMappingURL=date.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/date.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/decimal.mjs": +/*!**************************************************!*\ + !*** ./node_modules/apache-arrow/fb/decimal.mjs ***! + \**************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Decimal: () => (/* binding */ Decimal)\n/* harmony export */ });\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\n/**\n * Exact decimal value represented as an integer value in two's\n * complement. Currently only 128-bit (16-byte) and 256-bit (32-byte) integers\n * are used. The representation uses the endianness indicated\n * in the Schema.\n */\nclass Decimal {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsDecimal(bb, obj) {\n return (obj || new Decimal()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsDecimal(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers__WEBPACK_IMPORTED_MODULE_0__.SIZE_PREFIX_LENGTH);\n return (obj || new Decimal()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * Total number of decimal digits\n */\n precision() {\n const offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;\n }\n /**\n * Number of digits after the decimal point \".\"\n */\n scale() {\n const offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;\n }\n /**\n * Number of bits per value. The only accepted widths are 128 and 256.\n * We use bitWidth for consistency with Int::bitWidth.\n */\n bitWidth() {\n const offset = this.bb.__offset(this.bb_pos, 8);\n return offset ? this.bb.readInt32(this.bb_pos + offset) : 128;\n }\n static startDecimal(builder) {\n builder.startObject(3);\n }\n static addPrecision(builder, precision) {\n builder.addFieldInt32(0, precision, 0);\n }\n static addScale(builder, scale) {\n builder.addFieldInt32(1, scale, 0);\n }\n static addBitWidth(builder, bitWidth) {\n builder.addFieldInt32(2, bitWidth, 128);\n }\n static endDecimal(builder) {\n const offset = builder.endObject();\n return offset;\n }\n static createDecimal(builder, precision, scale, bitWidth) {\n Decimal.startDecimal(builder);\n Decimal.addPrecision(builder, precision);\n Decimal.addScale(builder, scale);\n Decimal.addBitWidth(builder, bitWidth);\n return Decimal.endDecimal(builder);\n }\n}\n\n//# sourceMappingURL=decimal.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/decimal.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/dictionary-batch.mjs": +/*!***********************************************************!*\ + !*** ./node_modules/apache-arrow/fb/dictionary-batch.mjs ***! + \***********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DictionaryBatch: () => (/* binding */ DictionaryBatch)\n/* harmony export */ });\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n/* harmony import */ var _record_batch_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./record-batch.mjs */ \"./node_modules/apache-arrow/fb/record-batch.mjs\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\n\n/**\n * For sending dictionary encoding information. Any Field can be\n * dictionary-encoded, but in this case none of its children may be\n * dictionary-encoded.\n * There is one vector / column per dictionary, but that vector / column\n * may be spread across multiple dictionary batches by using the isDelta\n * flag\n */\nclass DictionaryBatch {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsDictionaryBatch(bb, obj) {\n return (obj || new DictionaryBatch()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsDictionaryBatch(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers__WEBPACK_IMPORTED_MODULE_0__.SIZE_PREFIX_LENGTH);\n return (obj || new DictionaryBatch()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n id() {\n const offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0);\n }\n data(obj) {\n const offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? (obj || new _record_batch_mjs__WEBPACK_IMPORTED_MODULE_1__.RecordBatch()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;\n }\n /**\n * If isDelta is true the values in the dictionary are to be appended to a\n * dictionary with the indicated id. If isDelta is false this dictionary\n * should replace the existing dictionary.\n */\n isDelta() {\n const offset = this.bb.__offset(this.bb_pos, 8);\n return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;\n }\n static startDictionaryBatch(builder) {\n builder.startObject(3);\n }\n static addId(builder, id) {\n builder.addFieldInt64(0, id, builder.createLong(0, 0));\n }\n static addData(builder, dataOffset) {\n builder.addFieldOffset(1, dataOffset, 0);\n }\n static addIsDelta(builder, isDelta) {\n builder.addFieldInt8(2, +isDelta, +false);\n }\n static endDictionaryBatch(builder) {\n const offset = builder.endObject();\n return offset;\n }\n}\n\n//# sourceMappingURL=dictionary-batch.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/dictionary-batch.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/dictionary-encoding.mjs": +/*!**************************************************************!*\ + !*** ./node_modules/apache-arrow/fb/dictionary-encoding.mjs ***! + \**************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DictionaryEncoding: () => (/* binding */ DictionaryEncoding)\n/* harmony export */ });\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n/* harmony import */ var _dictionary_kind_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./dictionary-kind.mjs */ \"./node_modules/apache-arrow/fb/dictionary-kind.mjs\");\n/* harmony import */ var _int_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./int.mjs */ \"./node_modules/apache-arrow/fb/int.mjs\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\n\n\nclass DictionaryEncoding {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsDictionaryEncoding(bb, obj) {\n return (obj || new DictionaryEncoding()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsDictionaryEncoding(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers__WEBPACK_IMPORTED_MODULE_0__.SIZE_PREFIX_LENGTH);\n return (obj || new DictionaryEncoding()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * The known dictionary id in the application where this data is used. In\n * the file or streaming formats, the dictionary ids are found in the\n * DictionaryBatch messages\n */\n id() {\n const offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0);\n }\n /**\n * The dictionary indices are constrained to be non-negative integers. If\n * this field is null, the indices must be signed int32. To maximize\n * cross-language compatibility and performance, implementations are\n * recommended to prefer signed integer types over unsigned integer types\n * and to avoid uint64 indices unless they are required by an application.\n */\n indexType(obj) {\n const offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? (obj || new _int_mjs__WEBPACK_IMPORTED_MODULE_1__.Int()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;\n }\n /**\n * By default, dictionaries are not ordered, or the order does not have\n * semantic meaning. In some statistical, applications, dictionary-encoding\n * is used to represent ordered categorical data, and we provide a way to\n * preserve that metadata here\n */\n isOrdered() {\n const offset = this.bb.__offset(this.bb_pos, 8);\n return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;\n }\n dictionaryKind() {\n const offset = this.bb.__offset(this.bb_pos, 10);\n return offset ? this.bb.readInt16(this.bb_pos + offset) : _dictionary_kind_mjs__WEBPACK_IMPORTED_MODULE_2__.DictionaryKind.DenseArray;\n }\n static startDictionaryEncoding(builder) {\n builder.startObject(4);\n }\n static addId(builder, id) {\n builder.addFieldInt64(0, id, builder.createLong(0, 0));\n }\n static addIndexType(builder, indexTypeOffset) {\n builder.addFieldOffset(1, indexTypeOffset, 0);\n }\n static addIsOrdered(builder, isOrdered) {\n builder.addFieldInt8(2, +isOrdered, +false);\n }\n static addDictionaryKind(builder, dictionaryKind) {\n builder.addFieldInt16(3, dictionaryKind, _dictionary_kind_mjs__WEBPACK_IMPORTED_MODULE_2__.DictionaryKind.DenseArray);\n }\n static endDictionaryEncoding(builder) {\n const offset = builder.endObject();\n return offset;\n }\n}\n\n//# sourceMappingURL=dictionary-encoding.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/dictionary-encoding.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/dictionary-kind.mjs": +/*!**********************************************************!*\ + !*** ./node_modules/apache-arrow/fb/dictionary-kind.mjs ***! + \**********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DictionaryKind: () => (/* binding */ DictionaryKind)\n/* harmony export */ });\n// automatically generated by the FlatBuffers compiler, do not modify\n/**\n * ----------------------------------------------------------------------\n * Dictionary encoding metadata\n * Maintained for forwards compatibility, in the future\n * Dictionaries might be explicit maps between integers and values\n * allowing for non-contiguous index values\n */\nvar DictionaryKind;\n(function (DictionaryKind) {\n DictionaryKind[DictionaryKind[\"DenseArray\"] = 0] = \"DenseArray\";\n})(DictionaryKind || (DictionaryKind = {}));\n\n//# sourceMappingURL=dictionary-kind.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/dictionary-kind.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/duration.mjs": +/*!***************************************************!*\ + !*** ./node_modules/apache-arrow/fb/duration.mjs ***! + \***************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Duration: () => (/* binding */ Duration)\n/* harmony export */ });\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n/* harmony import */ var _time_unit_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./time-unit.mjs */ \"./node_modules/apache-arrow/fb/time-unit.mjs\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\n\nclass Duration {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsDuration(bb, obj) {\n return (obj || new Duration()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsDuration(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers__WEBPACK_IMPORTED_MODULE_0__.SIZE_PREFIX_LENGTH);\n return (obj || new Duration()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n unit() {\n const offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.readInt16(this.bb_pos + offset) : _time_unit_mjs__WEBPACK_IMPORTED_MODULE_1__.TimeUnit.MILLISECOND;\n }\n static startDuration(builder) {\n builder.startObject(1);\n }\n static addUnit(builder, unit) {\n builder.addFieldInt16(0, unit, _time_unit_mjs__WEBPACK_IMPORTED_MODULE_1__.TimeUnit.MILLISECOND);\n }\n static endDuration(builder) {\n const offset = builder.endObject();\n return offset;\n }\n static createDuration(builder, unit) {\n Duration.startDuration(builder);\n Duration.addUnit(builder, unit);\n return Duration.endDuration(builder);\n }\n}\n\n//# sourceMappingURL=duration.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/duration.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/endianness.mjs": +/*!*****************************************************!*\ + !*** ./node_modules/apache-arrow/fb/endianness.mjs ***! + \*****************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Endianness: () => (/* binding */ Endianness)\n/* harmony export */ });\n// automatically generated by the FlatBuffers compiler, do not modify\n/**\n * ----------------------------------------------------------------------\n * Endianness of the platform producing the data\n */\nvar Endianness;\n(function (Endianness) {\n Endianness[Endianness[\"Little\"] = 0] = \"Little\";\n Endianness[Endianness[\"Big\"] = 1] = \"Big\";\n})(Endianness || (Endianness = {}));\n\n//# sourceMappingURL=endianness.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/endianness.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/field-node.mjs": +/*!*****************************************************!*\ + !*** ./node_modules/apache-arrow/fb/field-node.mjs ***! + \*****************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ FieldNode: () => (/* binding */ FieldNode)\n/* harmony export */ });\n// automatically generated by the FlatBuffers compiler, do not modify\n/**\n * ----------------------------------------------------------------------\n * Data structures for describing a table row batch (a collection of\n * equal-length Arrow arrays)\n * Metadata about a field at some level of a nested type tree (but not\n * its children).\n *\n * For example, a List with values `[[1, 2, 3], null, [4], [5, 6], null]`\n * would have {length: 5, null_count: 2} for its List node, and {length: 6,\n * null_count: 0} for its Int16 node, as separate FieldNode structs\n */\nclass FieldNode {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n /**\n * The number of value slots in the Arrow array at this level of a nested\n * tree\n */\n length() {\n return this.bb.readInt64(this.bb_pos);\n }\n /**\n * The number of observed nulls. Fields with null_count == 0 may choose not\n * to write their physical validity bitmap out as a materialized buffer,\n * instead setting the length of the bitmap buffer to 0.\n */\n nullCount() {\n return this.bb.readInt64(this.bb_pos + 8);\n }\n static sizeOf() {\n return 16;\n }\n static createFieldNode(builder, length, null_count) {\n builder.prep(8, 16);\n builder.writeInt64(null_count);\n builder.writeInt64(length);\n return builder.offset();\n }\n}\n\n//# sourceMappingURL=field-node.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/field-node.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/field.mjs": +/*!************************************************!*\ + !*** ./node_modules/apache-arrow/fb/field.mjs ***! + \************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Field: () => (/* binding */ Field)\n/* harmony export */ });\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n/* harmony import */ var _dictionary_encoding_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./dictionary-encoding.mjs */ \"./node_modules/apache-arrow/fb/dictionary-encoding.mjs\");\n/* harmony import */ var _key_value_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./key-value.mjs */ \"./node_modules/apache-arrow/fb/key-value.mjs\");\n/* harmony import */ var _type_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./type.mjs */ \"./node_modules/apache-arrow/fb/type.mjs\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\n\n\n\n/**\n * ----------------------------------------------------------------------\n * A field represents a named column in a record / row batch or child of a\n * nested type.\n */\nclass Field {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsField(bb, obj) {\n return (obj || new Field()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsField(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers__WEBPACK_IMPORTED_MODULE_0__.SIZE_PREFIX_LENGTH);\n return (obj || new Field()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n name(optionalEncoding) {\n const offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;\n }\n /**\n * Whether or not this field can contain nulls. Should be true in general.\n */\n nullable() {\n const offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;\n }\n typeType() {\n const offset = this.bb.__offset(this.bb_pos, 8);\n return offset ? this.bb.readUint8(this.bb_pos + offset) : _type_mjs__WEBPACK_IMPORTED_MODULE_1__.Type.NONE;\n }\n /**\n * This is the type of the decoded value if the field is dictionary encoded.\n */\n // @ts-ignore\n type(obj) {\n const offset = this.bb.__offset(this.bb_pos, 10);\n return offset ? this.bb.__union(obj, this.bb_pos + offset) : null;\n }\n /**\n * Present only if the field is dictionary encoded.\n */\n dictionary(obj) {\n const offset = this.bb.__offset(this.bb_pos, 12);\n return offset ? (obj || new _dictionary_encoding_mjs__WEBPACK_IMPORTED_MODULE_2__.DictionaryEncoding()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;\n }\n /**\n * children apply only to nested data types like Struct, List and Union. For\n * primitive types children will have length 0.\n */\n children(index, obj) {\n const offset = this.bb.__offset(this.bb_pos, 14);\n return offset ? (obj || new Field()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;\n }\n childrenLength() {\n const offset = this.bb.__offset(this.bb_pos, 14);\n return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;\n }\n /**\n * User-defined metadata\n */\n customMetadata(index, obj) {\n const offset = this.bb.__offset(this.bb_pos, 16);\n return offset ? (obj || new _key_value_mjs__WEBPACK_IMPORTED_MODULE_3__.KeyValue()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;\n }\n customMetadataLength() {\n const offset = this.bb.__offset(this.bb_pos, 16);\n return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;\n }\n static startField(builder) {\n builder.startObject(7);\n }\n static addName(builder, nameOffset) {\n builder.addFieldOffset(0, nameOffset, 0);\n }\n static addNullable(builder, nullable) {\n builder.addFieldInt8(1, +nullable, +false);\n }\n static addTypeType(builder, typeType) {\n builder.addFieldInt8(2, typeType, _type_mjs__WEBPACK_IMPORTED_MODULE_1__.Type.NONE);\n }\n static addType(builder, typeOffset) {\n builder.addFieldOffset(3, typeOffset, 0);\n }\n static addDictionary(builder, dictionaryOffset) {\n builder.addFieldOffset(4, dictionaryOffset, 0);\n }\n static addChildren(builder, childrenOffset) {\n builder.addFieldOffset(5, childrenOffset, 0);\n }\n static createChildrenVector(builder, data) {\n builder.startVector(4, data.length, 4);\n for (let i = data.length - 1; i >= 0; i--) {\n builder.addOffset(data[i]);\n }\n return builder.endVector();\n }\n static startChildrenVector(builder, numElems) {\n builder.startVector(4, numElems, 4);\n }\n static addCustomMetadata(builder, customMetadataOffset) {\n builder.addFieldOffset(6, customMetadataOffset, 0);\n }\n static createCustomMetadataVector(builder, data) {\n builder.startVector(4, data.length, 4);\n for (let i = data.length - 1; i >= 0; i--) {\n builder.addOffset(data[i]);\n }\n return builder.endVector();\n }\n static startCustomMetadataVector(builder, numElems) {\n builder.startVector(4, numElems, 4);\n }\n static endField(builder) {\n const offset = builder.endObject();\n return offset;\n }\n}\n\n//# sourceMappingURL=field.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/field.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/fixed-size-binary.mjs": +/*!************************************************************!*\ + !*** ./node_modules/apache-arrow/fb/fixed-size-binary.mjs ***! + \************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ FixedSizeBinary: () => (/* binding */ FixedSizeBinary)\n/* harmony export */ });\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\nclass FixedSizeBinary {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsFixedSizeBinary(bb, obj) {\n return (obj || new FixedSizeBinary()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsFixedSizeBinary(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers__WEBPACK_IMPORTED_MODULE_0__.SIZE_PREFIX_LENGTH);\n return (obj || new FixedSizeBinary()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * Number of bytes per value\n */\n byteWidth() {\n const offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;\n }\n static startFixedSizeBinary(builder) {\n builder.startObject(1);\n }\n static addByteWidth(builder, byteWidth) {\n builder.addFieldInt32(0, byteWidth, 0);\n }\n static endFixedSizeBinary(builder) {\n const offset = builder.endObject();\n return offset;\n }\n static createFixedSizeBinary(builder, byteWidth) {\n FixedSizeBinary.startFixedSizeBinary(builder);\n FixedSizeBinary.addByteWidth(builder, byteWidth);\n return FixedSizeBinary.endFixedSizeBinary(builder);\n }\n}\n\n//# sourceMappingURL=fixed-size-binary.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/fixed-size-binary.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/fixed-size-list.mjs": +/*!**********************************************************!*\ + !*** ./node_modules/apache-arrow/fb/fixed-size-list.mjs ***! + \**********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ FixedSizeList: () => (/* binding */ FixedSizeList)\n/* harmony export */ });\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\nclass FixedSizeList {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsFixedSizeList(bb, obj) {\n return (obj || new FixedSizeList()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsFixedSizeList(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers__WEBPACK_IMPORTED_MODULE_0__.SIZE_PREFIX_LENGTH);\n return (obj || new FixedSizeList()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * Number of list items per value\n */\n listSize() {\n const offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;\n }\n static startFixedSizeList(builder) {\n builder.startObject(1);\n }\n static addListSize(builder, listSize) {\n builder.addFieldInt32(0, listSize, 0);\n }\n static endFixedSizeList(builder) {\n const offset = builder.endObject();\n return offset;\n }\n static createFixedSizeList(builder, listSize) {\n FixedSizeList.startFixedSizeList(builder);\n FixedSizeList.addListSize(builder, listSize);\n return FixedSizeList.endFixedSizeList(builder);\n }\n}\n\n//# sourceMappingURL=fixed-size-list.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/fixed-size-list.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/floating-point.mjs": +/*!*********************************************************!*\ + !*** ./node_modules/apache-arrow/fb/floating-point.mjs ***! + \*********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ FloatingPoint: () => (/* binding */ FloatingPoint)\n/* harmony export */ });\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n/* harmony import */ var _precision_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./precision.mjs */ \"./node_modules/apache-arrow/fb/precision.mjs\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\n\nclass FloatingPoint {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsFloatingPoint(bb, obj) {\n return (obj || new FloatingPoint()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsFloatingPoint(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers__WEBPACK_IMPORTED_MODULE_0__.SIZE_PREFIX_LENGTH);\n return (obj || new FloatingPoint()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n precision() {\n const offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.readInt16(this.bb_pos + offset) : _precision_mjs__WEBPACK_IMPORTED_MODULE_1__.Precision.HALF;\n }\n static startFloatingPoint(builder) {\n builder.startObject(1);\n }\n static addPrecision(builder, precision) {\n builder.addFieldInt16(0, precision, _precision_mjs__WEBPACK_IMPORTED_MODULE_1__.Precision.HALF);\n }\n static endFloatingPoint(builder) {\n const offset = builder.endObject();\n return offset;\n }\n static createFloatingPoint(builder, precision) {\n FloatingPoint.startFloatingPoint(builder);\n FloatingPoint.addPrecision(builder, precision);\n return FloatingPoint.endFloatingPoint(builder);\n }\n}\n\n//# sourceMappingURL=floating-point.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/floating-point.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/footer.mjs": +/*!*************************************************!*\ + !*** ./node_modules/apache-arrow/fb/footer.mjs ***! + \*************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Footer: () => (/* binding */ Footer)\n/* harmony export */ });\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n/* harmony import */ var _block_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./block.mjs */ \"./node_modules/apache-arrow/fb/block.mjs\");\n/* harmony import */ var _key_value_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./key-value.mjs */ \"./node_modules/apache-arrow/fb/key-value.mjs\");\n/* harmony import */ var _metadata_version_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./metadata-version.mjs */ \"./node_modules/apache-arrow/fb/metadata-version.mjs\");\n/* harmony import */ var _schema_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./schema.mjs */ \"./node_modules/apache-arrow/fb/schema.mjs\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\n\n\n\n\n/**\n * ----------------------------------------------------------------------\n * Arrow File metadata\n *\n */\nclass Footer {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsFooter(bb, obj) {\n return (obj || new Footer()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsFooter(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers__WEBPACK_IMPORTED_MODULE_0__.SIZE_PREFIX_LENGTH);\n return (obj || new Footer()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n version() {\n const offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.readInt16(this.bb_pos + offset) : _metadata_version_mjs__WEBPACK_IMPORTED_MODULE_1__.MetadataVersion.V1;\n }\n schema(obj) {\n const offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? (obj || new _schema_mjs__WEBPACK_IMPORTED_MODULE_2__.Schema()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;\n }\n dictionaries(index, obj) {\n const offset = this.bb.__offset(this.bb_pos, 8);\n return offset ? (obj || new _block_mjs__WEBPACK_IMPORTED_MODULE_3__.Block()).__init(this.bb.__vector(this.bb_pos + offset) + index * 24, this.bb) : null;\n }\n dictionariesLength() {\n const offset = this.bb.__offset(this.bb_pos, 8);\n return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;\n }\n recordBatches(index, obj) {\n const offset = this.bb.__offset(this.bb_pos, 10);\n return offset ? (obj || new _block_mjs__WEBPACK_IMPORTED_MODULE_3__.Block()).__init(this.bb.__vector(this.bb_pos + offset) + index * 24, this.bb) : null;\n }\n recordBatchesLength() {\n const offset = this.bb.__offset(this.bb_pos, 10);\n return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;\n }\n /**\n * User-defined metadata\n */\n customMetadata(index, obj) {\n const offset = this.bb.__offset(this.bb_pos, 12);\n return offset ? (obj || new _key_value_mjs__WEBPACK_IMPORTED_MODULE_4__.KeyValue()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;\n }\n customMetadataLength() {\n const offset = this.bb.__offset(this.bb_pos, 12);\n return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;\n }\n static startFooter(builder) {\n builder.startObject(5);\n }\n static addVersion(builder, version) {\n builder.addFieldInt16(0, version, _metadata_version_mjs__WEBPACK_IMPORTED_MODULE_1__.MetadataVersion.V1);\n }\n static addSchema(builder, schemaOffset) {\n builder.addFieldOffset(1, schemaOffset, 0);\n }\n static addDictionaries(builder, dictionariesOffset) {\n builder.addFieldOffset(2, dictionariesOffset, 0);\n }\n static startDictionariesVector(builder, numElems) {\n builder.startVector(24, numElems, 8);\n }\n static addRecordBatches(builder, recordBatchesOffset) {\n builder.addFieldOffset(3, recordBatchesOffset, 0);\n }\n static startRecordBatchesVector(builder, numElems) {\n builder.startVector(24, numElems, 8);\n }\n static addCustomMetadata(builder, customMetadataOffset) {\n builder.addFieldOffset(4, customMetadataOffset, 0);\n }\n static createCustomMetadataVector(builder, data) {\n builder.startVector(4, data.length, 4);\n for (let i = data.length - 1; i >= 0; i--) {\n builder.addOffset(data[i]);\n }\n return builder.endVector();\n }\n static startCustomMetadataVector(builder, numElems) {\n builder.startVector(4, numElems, 4);\n }\n static endFooter(builder) {\n const offset = builder.endObject();\n return offset;\n }\n static finishFooterBuffer(builder, offset) {\n builder.finish(offset);\n }\n static finishSizePrefixedFooterBuffer(builder, offset) {\n builder.finish(offset, undefined, true);\n }\n}\n\n//# sourceMappingURL=footer.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/footer.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/int.mjs": +/*!**********************************************!*\ + !*** ./node_modules/apache-arrow/fb/int.mjs ***! + \**********************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Int: () => (/* binding */ Int)\n/* harmony export */ });\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\nclass Int {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsInt(bb, obj) {\n return (obj || new Int()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsInt(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers__WEBPACK_IMPORTED_MODULE_0__.SIZE_PREFIX_LENGTH);\n return (obj || new Int()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n bitWidth() {\n const offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;\n }\n isSigned() {\n const offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;\n }\n static startInt(builder) {\n builder.startObject(2);\n }\n static addBitWidth(builder, bitWidth) {\n builder.addFieldInt32(0, bitWidth, 0);\n }\n static addIsSigned(builder, isSigned) {\n builder.addFieldInt8(1, +isSigned, +false);\n }\n static endInt(builder) {\n const offset = builder.endObject();\n return offset;\n }\n static createInt(builder, bitWidth, isSigned) {\n Int.startInt(builder);\n Int.addBitWidth(builder, bitWidth);\n Int.addIsSigned(builder, isSigned);\n return Int.endInt(builder);\n }\n}\n\n//# sourceMappingURL=int.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/int.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/interval-unit.mjs": +/*!********************************************************!*\ + !*** ./node_modules/apache-arrow/fb/interval-unit.mjs ***! + \********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ IntervalUnit: () => (/* binding */ IntervalUnit)\n/* harmony export */ });\n// automatically generated by the FlatBuffers compiler, do not modify\nvar IntervalUnit;\n(function (IntervalUnit) {\n IntervalUnit[IntervalUnit[\"YEAR_MONTH\"] = 0] = \"YEAR_MONTH\";\n IntervalUnit[IntervalUnit[\"DAY_TIME\"] = 1] = \"DAY_TIME\";\n IntervalUnit[IntervalUnit[\"MONTH_DAY_NANO\"] = 2] = \"MONTH_DAY_NANO\";\n})(IntervalUnit || (IntervalUnit = {}));\n\n//# sourceMappingURL=interval-unit.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/interval-unit.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/interval.mjs": +/*!***************************************************!*\ + !*** ./node_modules/apache-arrow/fb/interval.mjs ***! + \***************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Interval: () => (/* binding */ Interval)\n/* harmony export */ });\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n/* harmony import */ var _interval_unit_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./interval-unit.mjs */ \"./node_modules/apache-arrow/fb/interval-unit.mjs\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\n\nclass Interval {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsInterval(bb, obj) {\n return (obj || new Interval()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsInterval(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers__WEBPACK_IMPORTED_MODULE_0__.SIZE_PREFIX_LENGTH);\n return (obj || new Interval()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n unit() {\n const offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.readInt16(this.bb_pos + offset) : _interval_unit_mjs__WEBPACK_IMPORTED_MODULE_1__.IntervalUnit.YEAR_MONTH;\n }\n static startInterval(builder) {\n builder.startObject(1);\n }\n static addUnit(builder, unit) {\n builder.addFieldInt16(0, unit, _interval_unit_mjs__WEBPACK_IMPORTED_MODULE_1__.IntervalUnit.YEAR_MONTH);\n }\n static endInterval(builder) {\n const offset = builder.endObject();\n return offset;\n }\n static createInterval(builder, unit) {\n Interval.startInterval(builder);\n Interval.addUnit(builder, unit);\n return Interval.endInterval(builder);\n }\n}\n\n//# sourceMappingURL=interval.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/interval.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/key-value.mjs": +/*!****************************************************!*\ + !*** ./node_modules/apache-arrow/fb/key-value.mjs ***! + \****************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ KeyValue: () => (/* binding */ KeyValue)\n/* harmony export */ });\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\n/**\n * ----------------------------------------------------------------------\n * user defined key value pairs to add custom metadata to arrow\n * key namespacing is the responsibility of the user\n */\nclass KeyValue {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsKeyValue(bb, obj) {\n return (obj || new KeyValue()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsKeyValue(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers__WEBPACK_IMPORTED_MODULE_0__.SIZE_PREFIX_LENGTH);\n return (obj || new KeyValue()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n key(optionalEncoding) {\n const offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;\n }\n value(optionalEncoding) {\n const offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;\n }\n static startKeyValue(builder) {\n builder.startObject(2);\n }\n static addKey(builder, keyOffset) {\n builder.addFieldOffset(0, keyOffset, 0);\n }\n static addValue(builder, valueOffset) {\n builder.addFieldOffset(1, valueOffset, 0);\n }\n static endKeyValue(builder) {\n const offset = builder.endObject();\n return offset;\n }\n static createKeyValue(builder, keyOffset, valueOffset) {\n KeyValue.startKeyValue(builder);\n KeyValue.addKey(builder, keyOffset);\n KeyValue.addValue(builder, valueOffset);\n return KeyValue.endKeyValue(builder);\n }\n}\n\n//# sourceMappingURL=key-value.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/key-value.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/large-binary.mjs": +/*!*******************************************************!*\ + !*** ./node_modules/apache-arrow/fb/large-binary.mjs ***! + \*******************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ LargeBinary: () => (/* binding */ LargeBinary)\n/* harmony export */ });\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\n/**\n * Same as Binary, but with 64-bit offsets, allowing to represent\n * extremely large data values.\n */\nclass LargeBinary {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsLargeBinary(bb, obj) {\n return (obj || new LargeBinary()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsLargeBinary(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers__WEBPACK_IMPORTED_MODULE_0__.SIZE_PREFIX_LENGTH);\n return (obj || new LargeBinary()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static startLargeBinary(builder) {\n builder.startObject(0);\n }\n static endLargeBinary(builder) {\n const offset = builder.endObject();\n return offset;\n }\n static createLargeBinary(builder) {\n LargeBinary.startLargeBinary(builder);\n return LargeBinary.endLargeBinary(builder);\n }\n}\n\n//# sourceMappingURL=large-binary.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/large-binary.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/large-list.mjs": +/*!*****************************************************!*\ + !*** ./node_modules/apache-arrow/fb/large-list.mjs ***! + \*****************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ LargeList: () => (/* binding */ LargeList)\n/* harmony export */ });\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\n/**\n * Same as List, but with 64-bit offsets, allowing to represent\n * extremely large data values.\n */\nclass LargeList {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsLargeList(bb, obj) {\n return (obj || new LargeList()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsLargeList(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers__WEBPACK_IMPORTED_MODULE_0__.SIZE_PREFIX_LENGTH);\n return (obj || new LargeList()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static startLargeList(builder) {\n builder.startObject(0);\n }\n static endLargeList(builder) {\n const offset = builder.endObject();\n return offset;\n }\n static createLargeList(builder) {\n LargeList.startLargeList(builder);\n return LargeList.endLargeList(builder);\n }\n}\n\n//# sourceMappingURL=large-list.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/large-list.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/large-utf8.mjs": +/*!*****************************************************!*\ + !*** ./node_modules/apache-arrow/fb/large-utf8.mjs ***! + \*****************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ LargeUtf8: () => (/* binding */ LargeUtf8)\n/* harmony export */ });\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\n/**\n * Same as Utf8, but with 64-bit offsets, allowing to represent\n * extremely large data values.\n */\nclass LargeUtf8 {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsLargeUtf8(bb, obj) {\n return (obj || new LargeUtf8()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsLargeUtf8(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers__WEBPACK_IMPORTED_MODULE_0__.SIZE_PREFIX_LENGTH);\n return (obj || new LargeUtf8()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static startLargeUtf8(builder) {\n builder.startObject(0);\n }\n static endLargeUtf8(builder) {\n const offset = builder.endObject();\n return offset;\n }\n static createLargeUtf8(builder) {\n LargeUtf8.startLargeUtf8(builder);\n return LargeUtf8.endLargeUtf8(builder);\n }\n}\n\n//# sourceMappingURL=large-utf8.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/large-utf8.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/list.mjs": +/*!***********************************************!*\ + !*** ./node_modules/apache-arrow/fb/list.mjs ***! + \***********************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ List: () => (/* binding */ List)\n/* harmony export */ });\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\nclass List {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsList(bb, obj) {\n return (obj || new List()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsList(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers__WEBPACK_IMPORTED_MODULE_0__.SIZE_PREFIX_LENGTH);\n return (obj || new List()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static startList(builder) {\n builder.startObject(0);\n }\n static endList(builder) {\n const offset = builder.endObject();\n return offset;\n }\n static createList(builder) {\n List.startList(builder);\n return List.endList(builder);\n }\n}\n\n//# sourceMappingURL=list.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/list.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/map.mjs": +/*!**********************************************!*\ + !*** ./node_modules/apache-arrow/fb/map.mjs ***! + \**********************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Map: () => (/* binding */ Map)\n/* harmony export */ });\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\n/**\n * A Map is a logical nested type that is represented as\n *\n * List>\n *\n * In this layout, the keys and values are each respectively contiguous. We do\n * not constrain the key and value types, so the application is responsible\n * for ensuring that the keys are hashable and unique. Whether the keys are sorted\n * may be set in the metadata for this field.\n *\n * In a field with Map type, the field has a child Struct field, which then\n * has two children: key type and the second the value type. The names of the\n * child fields may be respectively \"entries\", \"key\", and \"value\", but this is\n * not enforced.\n *\n * Map\n * ```text\n * - child[0] entries: Struct\n * - child[0] key: K\n * - child[1] value: V\n * ```\n * Neither the \"entries\" field nor the \"key\" field may be nullable.\n *\n * The metadata is structured so that Arrow systems without special handling\n * for Map can make Map an alias for List. The \"layout\" attribute for the Map\n * field must have the same contents as a List.\n */\nclass Map {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsMap(bb, obj) {\n return (obj || new Map()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsMap(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers__WEBPACK_IMPORTED_MODULE_0__.SIZE_PREFIX_LENGTH);\n return (obj || new Map()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * Set to true if the keys within each value are sorted\n */\n keysSorted() {\n const offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;\n }\n static startMap(builder) {\n builder.startObject(1);\n }\n static addKeysSorted(builder, keysSorted) {\n builder.addFieldInt8(0, +keysSorted, +false);\n }\n static endMap(builder) {\n const offset = builder.endObject();\n return offset;\n }\n static createMap(builder, keysSorted) {\n Map.startMap(builder);\n Map.addKeysSorted(builder, keysSorted);\n return Map.endMap(builder);\n }\n}\n\n//# sourceMappingURL=map.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/map.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/message-header.mjs": +/*!*********************************************************!*\ + !*** ./node_modules/apache-arrow/fb/message-header.mjs ***! + \*********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ MessageHeader: () => (/* binding */ MessageHeader),\n/* harmony export */ unionListToMessageHeader: () => (/* binding */ unionListToMessageHeader),\n/* harmony export */ unionToMessageHeader: () => (/* binding */ unionToMessageHeader)\n/* harmony export */ });\n/* harmony import */ var _dictionary_batch_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dictionary-batch.mjs */ \"./node_modules/apache-arrow/fb/dictionary-batch.mjs\");\n/* harmony import */ var _record_batch_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./record-batch.mjs */ \"./node_modules/apache-arrow/fb/record-batch.mjs\");\n/* harmony import */ var _schema_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schema.mjs */ \"./node_modules/apache-arrow/fb/schema.mjs\");\n/* harmony import */ var _sparse_tensor_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./sparse-tensor.mjs */ \"./node_modules/apache-arrow/fb/sparse-tensor.mjs\");\n/* harmony import */ var _tensor_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./tensor.mjs */ \"./node_modules/apache-arrow/fb/tensor.mjs\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\n\n\n\n\n/**\n * ----------------------------------------------------------------------\n * The root Message type\n * This union enables us to easily send different message types without\n * redundant storage, and in the future we can easily add new message types.\n *\n * Arrow implementations do not need to implement all of the message types,\n * which may include experimental metadata types. For maximum compatibility,\n * it is best to send data using RecordBatch\n */\nvar MessageHeader;\n(function (MessageHeader) {\n MessageHeader[MessageHeader[\"NONE\"] = 0] = \"NONE\";\n MessageHeader[MessageHeader[\"Schema\"] = 1] = \"Schema\";\n MessageHeader[MessageHeader[\"DictionaryBatch\"] = 2] = \"DictionaryBatch\";\n MessageHeader[MessageHeader[\"RecordBatch\"] = 3] = \"RecordBatch\";\n MessageHeader[MessageHeader[\"Tensor\"] = 4] = \"Tensor\";\n MessageHeader[MessageHeader[\"SparseTensor\"] = 5] = \"SparseTensor\";\n})(MessageHeader || (MessageHeader = {}));\nfunction unionToMessageHeader(type, accessor) {\n switch (MessageHeader[type]) {\n case 'NONE': return null;\n case 'Schema': return accessor(new _schema_mjs__WEBPACK_IMPORTED_MODULE_0__.Schema());\n case 'DictionaryBatch': return accessor(new _dictionary_batch_mjs__WEBPACK_IMPORTED_MODULE_1__.DictionaryBatch());\n case 'RecordBatch': return accessor(new _record_batch_mjs__WEBPACK_IMPORTED_MODULE_2__.RecordBatch());\n case 'Tensor': return accessor(new _tensor_mjs__WEBPACK_IMPORTED_MODULE_3__.Tensor());\n case 'SparseTensor': return accessor(new _sparse_tensor_mjs__WEBPACK_IMPORTED_MODULE_4__.SparseTensor());\n default: return null;\n }\n}\nfunction unionListToMessageHeader(type, accessor, index) {\n switch (MessageHeader[type]) {\n case 'NONE': return null;\n case 'Schema': return accessor(index, new _schema_mjs__WEBPACK_IMPORTED_MODULE_0__.Schema());\n case 'DictionaryBatch': return accessor(index, new _dictionary_batch_mjs__WEBPACK_IMPORTED_MODULE_1__.DictionaryBatch());\n case 'RecordBatch': return accessor(index, new _record_batch_mjs__WEBPACK_IMPORTED_MODULE_2__.RecordBatch());\n case 'Tensor': return accessor(index, new _tensor_mjs__WEBPACK_IMPORTED_MODULE_3__.Tensor());\n case 'SparseTensor': return accessor(index, new _sparse_tensor_mjs__WEBPACK_IMPORTED_MODULE_4__.SparseTensor());\n default: return null;\n }\n}\n\n//# sourceMappingURL=message-header.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/message-header.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/message.mjs": +/*!**************************************************!*\ + !*** ./node_modules/apache-arrow/fb/message.mjs ***! + \**************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Message: () => (/* binding */ Message)\n/* harmony export */ });\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n/* harmony import */ var _key_value_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./key-value.mjs */ \"./node_modules/apache-arrow/fb/key-value.mjs\");\n/* harmony import */ var _message_header_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./message-header.mjs */ \"./node_modules/apache-arrow/fb/message-header.mjs\");\n/* harmony import */ var _metadata_version_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./metadata-version.mjs */ \"./node_modules/apache-arrow/fb/metadata-version.mjs\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\n\n\n\nclass Message {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsMessage(bb, obj) {\n return (obj || new Message()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsMessage(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers__WEBPACK_IMPORTED_MODULE_0__.SIZE_PREFIX_LENGTH);\n return (obj || new Message()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n version() {\n const offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.readInt16(this.bb_pos + offset) : _metadata_version_mjs__WEBPACK_IMPORTED_MODULE_1__.MetadataVersion.V1;\n }\n headerType() {\n const offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? this.bb.readUint8(this.bb_pos + offset) : _message_header_mjs__WEBPACK_IMPORTED_MODULE_2__.MessageHeader.NONE;\n }\n // @ts-ignore\n header(obj) {\n const offset = this.bb.__offset(this.bb_pos, 8);\n return offset ? this.bb.__union(obj, this.bb_pos + offset) : null;\n }\n bodyLength() {\n const offset = this.bb.__offset(this.bb_pos, 10);\n return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0);\n }\n customMetadata(index, obj) {\n const offset = this.bb.__offset(this.bb_pos, 12);\n return offset ? (obj || new _key_value_mjs__WEBPACK_IMPORTED_MODULE_3__.KeyValue()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;\n }\n customMetadataLength() {\n const offset = this.bb.__offset(this.bb_pos, 12);\n return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;\n }\n static startMessage(builder) {\n builder.startObject(5);\n }\n static addVersion(builder, version) {\n builder.addFieldInt16(0, version, _metadata_version_mjs__WEBPACK_IMPORTED_MODULE_1__.MetadataVersion.V1);\n }\n static addHeaderType(builder, headerType) {\n builder.addFieldInt8(1, headerType, _message_header_mjs__WEBPACK_IMPORTED_MODULE_2__.MessageHeader.NONE);\n }\n static addHeader(builder, headerOffset) {\n builder.addFieldOffset(2, headerOffset, 0);\n }\n static addBodyLength(builder, bodyLength) {\n builder.addFieldInt64(3, bodyLength, builder.createLong(0, 0));\n }\n static addCustomMetadata(builder, customMetadataOffset) {\n builder.addFieldOffset(4, customMetadataOffset, 0);\n }\n static createCustomMetadataVector(builder, data) {\n builder.startVector(4, data.length, 4);\n for (let i = data.length - 1; i >= 0; i--) {\n builder.addOffset(data[i]);\n }\n return builder.endVector();\n }\n static startCustomMetadataVector(builder, numElems) {\n builder.startVector(4, numElems, 4);\n }\n static endMessage(builder) {\n const offset = builder.endObject();\n return offset;\n }\n static finishMessageBuffer(builder, offset) {\n builder.finish(offset);\n }\n static finishSizePrefixedMessageBuffer(builder, offset) {\n builder.finish(offset, undefined, true);\n }\n static createMessage(builder, version, headerType, headerOffset, bodyLength, customMetadataOffset) {\n Message.startMessage(builder);\n Message.addVersion(builder, version);\n Message.addHeaderType(builder, headerType);\n Message.addHeader(builder, headerOffset);\n Message.addBodyLength(builder, bodyLength);\n Message.addCustomMetadata(builder, customMetadataOffset);\n return Message.endMessage(builder);\n }\n}\n\n//# sourceMappingURL=message.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/message.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/metadata-version.mjs": +/*!***********************************************************!*\ + !*** ./node_modules/apache-arrow/fb/metadata-version.mjs ***! + \***********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ MetadataVersion: () => (/* binding */ MetadataVersion)\n/* harmony export */ });\n// automatically generated by the FlatBuffers compiler, do not modify\n/**\n * Logical types, vector layouts, and schemas\n * Format Version History.\n * Version 1.0 - Forward and backwards compatibility guaranteed.\n * Version 1.1 - Add Decimal256 (No format release).\n * Version 1.2 (Pending)- Add Interval MONTH_DAY_NANO\n */\nvar MetadataVersion;\n(function (MetadataVersion) {\n /**\n * 0.1.0 (October 2016).\n */\n MetadataVersion[MetadataVersion[\"V1\"] = 0] = \"V1\";\n /**\n * 0.2.0 (February 2017). Non-backwards compatible with V1.\n */\n MetadataVersion[MetadataVersion[\"V2\"] = 1] = \"V2\";\n /**\n * 0.3.0 -> 0.7.1 (May - December 2017). Non-backwards compatible with V2.\n */\n MetadataVersion[MetadataVersion[\"V3\"] = 2] = \"V3\";\n /**\n * >= 0.8.0 (December 2017). Non-backwards compatible with V3.\n */\n MetadataVersion[MetadataVersion[\"V4\"] = 3] = \"V4\";\n /**\n * >= 1.0.0 (July 2020. Backwards compatible with V4 (V5 readers can read V4\n * metadata and IPC messages). Implementations are recommended to provide a\n * V4 compatibility mode with V5 format changes disabled.\n *\n * Incompatible changes between V4 and V5:\n * - Union buffer layout has changed. In V5, Unions don't have a validity\n * bitmap buffer.\n */\n MetadataVersion[MetadataVersion[\"V5\"] = 4] = \"V5\";\n})(MetadataVersion || (MetadataVersion = {}));\n\n//# sourceMappingURL=metadata-version.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/metadata-version.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/null.mjs": +/*!***********************************************!*\ + !*** ./node_modules/apache-arrow/fb/null.mjs ***! + \***********************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Null: () => (/* binding */ Null)\n/* harmony export */ });\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\n/**\n * These are stored in the flatbuffer in the Type union below\n */\nclass Null {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsNull(bb, obj) {\n return (obj || new Null()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsNull(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers__WEBPACK_IMPORTED_MODULE_0__.SIZE_PREFIX_LENGTH);\n return (obj || new Null()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static startNull(builder) {\n builder.startObject(0);\n }\n static endNull(builder) {\n const offset = builder.endObject();\n return offset;\n }\n static createNull(builder) {\n Null.startNull(builder);\n return Null.endNull(builder);\n }\n}\n\n//# sourceMappingURL=null.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/null.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/precision.mjs": +/*!****************************************************!*\ + !*** ./node_modules/apache-arrow/fb/precision.mjs ***! + \****************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Precision: () => (/* binding */ Precision)\n/* harmony export */ });\n// automatically generated by the FlatBuffers compiler, do not modify\nvar Precision;\n(function (Precision) {\n Precision[Precision[\"HALF\"] = 0] = \"HALF\";\n Precision[Precision[\"SINGLE\"] = 1] = \"SINGLE\";\n Precision[Precision[\"DOUBLE\"] = 2] = \"DOUBLE\";\n})(Precision || (Precision = {}));\n\n//# sourceMappingURL=precision.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/precision.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/record-batch.mjs": +/*!*******************************************************!*\ + !*** ./node_modules/apache-arrow/fb/record-batch.mjs ***! + \*******************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ RecordBatch: () => (/* binding */ RecordBatch)\n/* harmony export */ });\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n/* harmony import */ var _body_compression_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./body-compression.mjs */ \"./node_modules/apache-arrow/fb/body-compression.mjs\");\n/* harmony import */ var _buffer_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./buffer.mjs */ \"./node_modules/apache-arrow/fb/buffer.mjs\");\n/* harmony import */ var _field_node_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./field-node.mjs */ \"./node_modules/apache-arrow/fb/field-node.mjs\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\n\n\n\n/**\n * A data header describing the shared memory layout of a \"record\" or \"row\"\n * batch. Some systems call this a \"row batch\" internally and others a \"record\n * batch\".\n */\nclass RecordBatch {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsRecordBatch(bb, obj) {\n return (obj || new RecordBatch()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsRecordBatch(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers__WEBPACK_IMPORTED_MODULE_0__.SIZE_PREFIX_LENGTH);\n return (obj || new RecordBatch()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * number of records / rows. The arrays in the batch should all have this\n * length\n */\n length() {\n const offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0);\n }\n /**\n * Nodes correspond to the pre-ordered flattened logical schema\n */\n nodes(index, obj) {\n const offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? (obj || new _field_node_mjs__WEBPACK_IMPORTED_MODULE_1__.FieldNode()).__init(this.bb.__vector(this.bb_pos + offset) + index * 16, this.bb) : null;\n }\n nodesLength() {\n const offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;\n }\n /**\n * Buffers correspond to the pre-ordered flattened buffer tree\n *\n * The number of buffers appended to this list depends on the schema. For\n * example, most primitive arrays will have 2 buffers, 1 for the validity\n * bitmap and 1 for the values. For struct arrays, there will only be a\n * single buffer for the validity (nulls) bitmap\n */\n buffers(index, obj) {\n const offset = this.bb.__offset(this.bb_pos, 8);\n return offset ? (obj || new _buffer_mjs__WEBPACK_IMPORTED_MODULE_2__.Buffer()).__init(this.bb.__vector(this.bb_pos + offset) + index * 16, this.bb) : null;\n }\n buffersLength() {\n const offset = this.bb.__offset(this.bb_pos, 8);\n return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;\n }\n /**\n * Optional compression of the message body\n */\n compression(obj) {\n const offset = this.bb.__offset(this.bb_pos, 10);\n return offset ? (obj || new _body_compression_mjs__WEBPACK_IMPORTED_MODULE_3__.BodyCompression()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;\n }\n static startRecordBatch(builder) {\n builder.startObject(4);\n }\n static addLength(builder, length) {\n builder.addFieldInt64(0, length, builder.createLong(0, 0));\n }\n static addNodes(builder, nodesOffset) {\n builder.addFieldOffset(1, nodesOffset, 0);\n }\n static startNodesVector(builder, numElems) {\n builder.startVector(16, numElems, 8);\n }\n static addBuffers(builder, buffersOffset) {\n builder.addFieldOffset(2, buffersOffset, 0);\n }\n static startBuffersVector(builder, numElems) {\n builder.startVector(16, numElems, 8);\n }\n static addCompression(builder, compressionOffset) {\n builder.addFieldOffset(3, compressionOffset, 0);\n }\n static endRecordBatch(builder) {\n const offset = builder.endObject();\n return offset;\n }\n}\n\n//# sourceMappingURL=record-batch.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/record-batch.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/schema.mjs": +/*!*************************************************!*\ + !*** ./node_modules/apache-arrow/fb/schema.mjs ***! + \*************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Schema: () => (/* binding */ Schema)\n/* harmony export */ });\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n/* harmony import */ var _endianness_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./endianness.mjs */ \"./node_modules/apache-arrow/fb/endianness.mjs\");\n/* harmony import */ var _field_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./field.mjs */ \"./node_modules/apache-arrow/fb/field.mjs\");\n/* harmony import */ var _key_value_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./key-value.mjs */ \"./node_modules/apache-arrow/fb/key-value.mjs\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\n\n\n\n/**\n * ----------------------------------------------------------------------\n * A Schema describes the columns in a row batch\n */\nclass Schema {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsSchema(bb, obj) {\n return (obj || new Schema()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsSchema(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers__WEBPACK_IMPORTED_MODULE_0__.SIZE_PREFIX_LENGTH);\n return (obj || new Schema()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * endianness of the buffer\n * it is Little Endian by default\n * if endianness doesn't match the underlying system then the vectors need to be converted\n */\n endianness() {\n const offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.readInt16(this.bb_pos + offset) : _endianness_mjs__WEBPACK_IMPORTED_MODULE_1__.Endianness.Little;\n }\n fields(index, obj) {\n const offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? (obj || new _field_mjs__WEBPACK_IMPORTED_MODULE_2__.Field()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;\n }\n fieldsLength() {\n const offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;\n }\n customMetadata(index, obj) {\n const offset = this.bb.__offset(this.bb_pos, 8);\n return offset ? (obj || new _key_value_mjs__WEBPACK_IMPORTED_MODULE_3__.KeyValue()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;\n }\n customMetadataLength() {\n const offset = this.bb.__offset(this.bb_pos, 8);\n return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;\n }\n /**\n * Features used in the stream/file.\n */\n features(index) {\n const offset = this.bb.__offset(this.bb_pos, 10);\n return offset ? this.bb.readInt64(this.bb.__vector(this.bb_pos + offset) + index * 8) : this.bb.createLong(0, 0);\n }\n featuresLength() {\n const offset = this.bb.__offset(this.bb_pos, 10);\n return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;\n }\n static startSchema(builder) {\n builder.startObject(4);\n }\n static addEndianness(builder, endianness) {\n builder.addFieldInt16(0, endianness, _endianness_mjs__WEBPACK_IMPORTED_MODULE_1__.Endianness.Little);\n }\n static addFields(builder, fieldsOffset) {\n builder.addFieldOffset(1, fieldsOffset, 0);\n }\n static createFieldsVector(builder, data) {\n builder.startVector(4, data.length, 4);\n for (let i = data.length - 1; i >= 0; i--) {\n builder.addOffset(data[i]);\n }\n return builder.endVector();\n }\n static startFieldsVector(builder, numElems) {\n builder.startVector(4, numElems, 4);\n }\n static addCustomMetadata(builder, customMetadataOffset) {\n builder.addFieldOffset(2, customMetadataOffset, 0);\n }\n static createCustomMetadataVector(builder, data) {\n builder.startVector(4, data.length, 4);\n for (let i = data.length - 1; i >= 0; i--) {\n builder.addOffset(data[i]);\n }\n return builder.endVector();\n }\n static startCustomMetadataVector(builder, numElems) {\n builder.startVector(4, numElems, 4);\n }\n static addFeatures(builder, featuresOffset) {\n builder.addFieldOffset(3, featuresOffset, 0);\n }\n static createFeaturesVector(builder, data) {\n builder.startVector(8, data.length, 8);\n for (let i = data.length - 1; i >= 0; i--) {\n builder.addInt64(data[i]);\n }\n return builder.endVector();\n }\n static startFeaturesVector(builder, numElems) {\n builder.startVector(8, numElems, 8);\n }\n static endSchema(builder) {\n const offset = builder.endObject();\n return offset;\n }\n static finishSchemaBuffer(builder, offset) {\n builder.finish(offset);\n }\n static finishSizePrefixedSchemaBuffer(builder, offset) {\n builder.finish(offset, undefined, true);\n }\n static createSchema(builder, endianness, fieldsOffset, customMetadataOffset, featuresOffset) {\n Schema.startSchema(builder);\n Schema.addEndianness(builder, endianness);\n Schema.addFields(builder, fieldsOffset);\n Schema.addCustomMetadata(builder, customMetadataOffset);\n Schema.addFeatures(builder, featuresOffset);\n return Schema.endSchema(builder);\n }\n}\n\n//# sourceMappingURL=schema.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/schema.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/sparse-matrix-compressed-axis.mjs": +/*!************************************************************************!*\ + !*** ./node_modules/apache-arrow/fb/sparse-matrix-compressed-axis.mjs ***! + \************************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ SparseMatrixCompressedAxis: () => (/* binding */ SparseMatrixCompressedAxis)\n/* harmony export */ });\n// automatically generated by the FlatBuffers compiler, do not modify\nvar SparseMatrixCompressedAxis;\n(function (SparseMatrixCompressedAxis) {\n SparseMatrixCompressedAxis[SparseMatrixCompressedAxis[\"Row\"] = 0] = \"Row\";\n SparseMatrixCompressedAxis[SparseMatrixCompressedAxis[\"Column\"] = 1] = \"Column\";\n})(SparseMatrixCompressedAxis || (SparseMatrixCompressedAxis = {}));\n\n//# sourceMappingURL=sparse-matrix-compressed-axis.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/sparse-matrix-compressed-axis.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/sparse-matrix-index-c-s-x.mjs": +/*!********************************************************************!*\ + !*** ./node_modules/apache-arrow/fb/sparse-matrix-index-c-s-x.mjs ***! + \********************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ SparseMatrixIndexCSX: () => (/* binding */ SparseMatrixIndexCSX)\n/* harmony export */ });\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n/* harmony import */ var _buffer_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./buffer.mjs */ \"./node_modules/apache-arrow/fb/buffer.mjs\");\n/* harmony import */ var _int_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./int.mjs */ \"./node_modules/apache-arrow/fb/int.mjs\");\n/* harmony import */ var _sparse_matrix_compressed_axis_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./sparse-matrix-compressed-axis.mjs */ \"./node_modules/apache-arrow/fb/sparse-matrix-compressed-axis.mjs\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\n\n\n\n/**\n * Compressed Sparse format, that is matrix-specific.\n */\nclass SparseMatrixIndexCSX {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsSparseMatrixIndexCSX(bb, obj) {\n return (obj || new SparseMatrixIndexCSX()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsSparseMatrixIndexCSX(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers__WEBPACK_IMPORTED_MODULE_0__.SIZE_PREFIX_LENGTH);\n return (obj || new SparseMatrixIndexCSX()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * Which axis, row or column, is compressed\n */\n compressedAxis() {\n const offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.readInt16(this.bb_pos + offset) : _sparse_matrix_compressed_axis_mjs__WEBPACK_IMPORTED_MODULE_1__.SparseMatrixCompressedAxis.Row;\n }\n /**\n * The type of values in indptrBuffer\n */\n indptrType(obj) {\n const offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? (obj || new _int_mjs__WEBPACK_IMPORTED_MODULE_2__.Int()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;\n }\n /**\n * indptrBuffer stores the location and size of indptr array that\n * represents the range of the rows.\n * The i-th row spans from `indptr[i]` to `indptr[i+1]` in the data.\n * The length of this array is 1 + (the number of rows), and the type\n * of index value is long.\n *\n * For example, let X be the following 6x4 matrix:\n * ```text\n * X := [[0, 1, 2, 0],\n * [0, 0, 3, 0],\n * [0, 4, 0, 5],\n * [0, 0, 0, 0],\n * [6, 0, 7, 8],\n * [0, 9, 0, 0]].\n * ```\n * The array of non-zero values in X is:\n * ```text\n * values(X) = [1, 2, 3, 4, 5, 6, 7, 8, 9].\n * ```\n * And the indptr of X is:\n * ```text\n * indptr(X) = [0, 2, 3, 5, 5, 8, 10].\n * ```\n */\n indptrBuffer(obj) {\n const offset = this.bb.__offset(this.bb_pos, 8);\n return offset ? (obj || new _buffer_mjs__WEBPACK_IMPORTED_MODULE_3__.Buffer()).__init(this.bb_pos + offset, this.bb) : null;\n }\n /**\n * The type of values in indicesBuffer\n */\n indicesType(obj) {\n const offset = this.bb.__offset(this.bb_pos, 10);\n return offset ? (obj || new _int_mjs__WEBPACK_IMPORTED_MODULE_2__.Int()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;\n }\n /**\n * indicesBuffer stores the location and size of the array that\n * contains the column indices of the corresponding non-zero values.\n * The type of index value is long.\n *\n * For example, the indices of the above X is:\n * ```text\n * indices(X) = [1, 2, 2, 1, 3, 0, 2, 3, 1].\n * ```\n * Note that the indices are sorted in lexicographical order for each row.\n */\n indicesBuffer(obj) {\n const offset = this.bb.__offset(this.bb_pos, 12);\n return offset ? (obj || new _buffer_mjs__WEBPACK_IMPORTED_MODULE_3__.Buffer()).__init(this.bb_pos + offset, this.bb) : null;\n }\n static startSparseMatrixIndexCSX(builder) {\n builder.startObject(5);\n }\n static addCompressedAxis(builder, compressedAxis) {\n builder.addFieldInt16(0, compressedAxis, _sparse_matrix_compressed_axis_mjs__WEBPACK_IMPORTED_MODULE_1__.SparseMatrixCompressedAxis.Row);\n }\n static addIndptrType(builder, indptrTypeOffset) {\n builder.addFieldOffset(1, indptrTypeOffset, 0);\n }\n static addIndptrBuffer(builder, indptrBufferOffset) {\n builder.addFieldStruct(2, indptrBufferOffset, 0);\n }\n static addIndicesType(builder, indicesTypeOffset) {\n builder.addFieldOffset(3, indicesTypeOffset, 0);\n }\n static addIndicesBuffer(builder, indicesBufferOffset) {\n builder.addFieldStruct(4, indicesBufferOffset, 0);\n }\n static endSparseMatrixIndexCSX(builder) {\n const offset = builder.endObject();\n builder.requiredField(offset, 6); // indptrType\n builder.requiredField(offset, 8); // indptrBuffer\n builder.requiredField(offset, 10); // indicesType\n builder.requiredField(offset, 12); // indicesBuffer\n return offset;\n }\n}\n\n//# sourceMappingURL=sparse-matrix-index-c-s-x.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/sparse-matrix-index-c-s-x.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/sparse-tensor-index-c-o-o.mjs": +/*!********************************************************************!*\ + !*** ./node_modules/apache-arrow/fb/sparse-tensor-index-c-o-o.mjs ***! + \********************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ SparseTensorIndexCOO: () => (/* binding */ SparseTensorIndexCOO)\n/* harmony export */ });\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n/* harmony import */ var _buffer_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./buffer.mjs */ \"./node_modules/apache-arrow/fb/buffer.mjs\");\n/* harmony import */ var _int_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./int.mjs */ \"./node_modules/apache-arrow/fb/int.mjs\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\n\n\n/**\n * ----------------------------------------------------------------------\n * EXPERIMENTAL: Data structures for sparse tensors\n * Coordinate (COO) format of sparse tensor index.\n *\n * COO's index list are represented as a NxM matrix,\n * where N is the number of non-zero values,\n * and M is the number of dimensions of a sparse tensor.\n *\n * indicesBuffer stores the location and size of the data of this indices\n * matrix. The value type and the stride of the indices matrix is\n * specified in indicesType and indicesStrides fields.\n *\n * For example, let X be a 2x3x4x5 tensor, and it has the following\n * 6 non-zero values:\n * ```text\n * X[0, 1, 2, 0] := 1\n * X[1, 1, 2, 3] := 2\n * X[0, 2, 1, 0] := 3\n * X[0, 1, 3, 0] := 4\n * X[0, 1, 2, 1] := 5\n * X[1, 2, 0, 4] := 6\n * ```\n * In COO format, the index matrix of X is the following 4x6 matrix:\n * ```text\n * [[0, 0, 0, 0, 1, 1],\n * [1, 1, 1, 2, 1, 2],\n * [2, 2, 3, 1, 2, 0],\n * [0, 1, 0, 0, 3, 4]]\n * ```\n * When isCanonical is true, the indices is sorted in lexicographical order\n * (row-major order), and it does not have duplicated entries. Otherwise,\n * the indices may not be sorted, or may have duplicated entries.\n */\nclass SparseTensorIndexCOO {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsSparseTensorIndexCOO(bb, obj) {\n return (obj || new SparseTensorIndexCOO()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsSparseTensorIndexCOO(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers__WEBPACK_IMPORTED_MODULE_0__.SIZE_PREFIX_LENGTH);\n return (obj || new SparseTensorIndexCOO()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * The type of values in indicesBuffer\n */\n indicesType(obj) {\n const offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? (obj || new _int_mjs__WEBPACK_IMPORTED_MODULE_1__.Int()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;\n }\n /**\n * Non-negative byte offsets to advance one value cell along each dimension\n * If omitted, default to row-major order (C-like).\n */\n indicesStrides(index) {\n const offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? this.bb.readInt64(this.bb.__vector(this.bb_pos + offset) + index * 8) : this.bb.createLong(0, 0);\n }\n indicesStridesLength() {\n const offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;\n }\n /**\n * The location and size of the indices matrix's data\n */\n indicesBuffer(obj) {\n const offset = this.bb.__offset(this.bb_pos, 8);\n return offset ? (obj || new _buffer_mjs__WEBPACK_IMPORTED_MODULE_2__.Buffer()).__init(this.bb_pos + offset, this.bb) : null;\n }\n /**\n * This flag is true if and only if the indices matrix is sorted in\n * row-major order, and does not have duplicated entries.\n * This sort order is the same as of Tensorflow's SparseTensor,\n * but it is inverse order of SciPy's canonical coo_matrix\n * (SciPy employs column-major order for its coo_matrix).\n */\n isCanonical() {\n const offset = this.bb.__offset(this.bb_pos, 10);\n return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;\n }\n static startSparseTensorIndexCOO(builder) {\n builder.startObject(4);\n }\n static addIndicesType(builder, indicesTypeOffset) {\n builder.addFieldOffset(0, indicesTypeOffset, 0);\n }\n static addIndicesStrides(builder, indicesStridesOffset) {\n builder.addFieldOffset(1, indicesStridesOffset, 0);\n }\n static createIndicesStridesVector(builder, data) {\n builder.startVector(8, data.length, 8);\n for (let i = data.length - 1; i >= 0; i--) {\n builder.addInt64(data[i]);\n }\n return builder.endVector();\n }\n static startIndicesStridesVector(builder, numElems) {\n builder.startVector(8, numElems, 8);\n }\n static addIndicesBuffer(builder, indicesBufferOffset) {\n builder.addFieldStruct(2, indicesBufferOffset, 0);\n }\n static addIsCanonical(builder, isCanonical) {\n builder.addFieldInt8(3, +isCanonical, +false);\n }\n static endSparseTensorIndexCOO(builder) {\n const offset = builder.endObject();\n builder.requiredField(offset, 4); // indicesType\n builder.requiredField(offset, 8); // indicesBuffer\n return offset;\n }\n}\n\n//# sourceMappingURL=sparse-tensor-index-c-o-o.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/sparse-tensor-index-c-o-o.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/sparse-tensor-index-c-s-f.mjs": +/*!********************************************************************!*\ + !*** ./node_modules/apache-arrow/fb/sparse-tensor-index-c-s-f.mjs ***! + \********************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ SparseTensorIndexCSF: () => (/* binding */ SparseTensorIndexCSF)\n/* harmony export */ });\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n/* harmony import */ var _buffer_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./buffer.mjs */ \"./node_modules/apache-arrow/fb/buffer.mjs\");\n/* harmony import */ var _int_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./int.mjs */ \"./node_modules/apache-arrow/fb/int.mjs\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\n\n\n/**\n * Compressed Sparse Fiber (CSF) sparse tensor index.\n */\nclass SparseTensorIndexCSF {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsSparseTensorIndexCSF(bb, obj) {\n return (obj || new SparseTensorIndexCSF()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsSparseTensorIndexCSF(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers__WEBPACK_IMPORTED_MODULE_0__.SIZE_PREFIX_LENGTH);\n return (obj || new SparseTensorIndexCSF()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * CSF is a generalization of compressed sparse row (CSR) index.\n * See [smith2017knl](http://shaden.io/pub-files/smith2017knl.pdf)\n *\n * CSF index recursively compresses each dimension of a tensor into a set\n * of prefix trees. Each path from a root to leaf forms one tensor\n * non-zero index. CSF is implemented with two arrays of buffers and one\n * arrays of integers.\n *\n * For example, let X be a 2x3x4x5 tensor and let it have the following\n * 8 non-zero values:\n * ```text\n * X[0, 0, 0, 1] := 1\n * X[0, 0, 0, 2] := 2\n * X[0, 1, 0, 0] := 3\n * X[0, 1, 0, 2] := 4\n * X[0, 1, 1, 0] := 5\n * X[1, 1, 1, 0] := 6\n * X[1, 1, 1, 1] := 7\n * X[1, 1, 1, 2] := 8\n * ```\n * As a prefix tree this would be represented as:\n * ```text\n * 0 1\n * / \\ |\n * 0 1 1\n * / / \\ |\n * 0 0 1 1\n * /| /| | /| |\n * 1 2 0 2 0 0 1 2\n * ```\n * The type of values in indptrBuffers\n */\n indptrType(obj) {\n const offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? (obj || new _int_mjs__WEBPACK_IMPORTED_MODULE_1__.Int()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;\n }\n /**\n * indptrBuffers stores the sparsity structure.\n * Each two consecutive dimensions in a tensor correspond to a buffer in\n * indptrBuffers. A pair of consecutive values at `indptrBuffers[dim][i]`\n * and `indptrBuffers[dim][i + 1]` signify a range of nodes in\n * `indicesBuffers[dim + 1]` who are children of `indicesBuffers[dim][i]` node.\n *\n * For example, the indptrBuffers for the above X is:\n * ```text\n * indptrBuffer(X) = [\n * [0, 2, 3],\n * [0, 1, 3, 4],\n * [0, 2, 4, 5, 8]\n * ].\n * ```\n */\n indptrBuffers(index, obj) {\n const offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? (obj || new _buffer_mjs__WEBPACK_IMPORTED_MODULE_2__.Buffer()).__init(this.bb.__vector(this.bb_pos + offset) + index * 16, this.bb) : null;\n }\n indptrBuffersLength() {\n const offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;\n }\n /**\n * The type of values in indicesBuffers\n */\n indicesType(obj) {\n const offset = this.bb.__offset(this.bb_pos, 8);\n return offset ? (obj || new _int_mjs__WEBPACK_IMPORTED_MODULE_1__.Int()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;\n }\n /**\n * indicesBuffers stores values of nodes.\n * Each tensor dimension corresponds to a buffer in indicesBuffers.\n * For example, the indicesBuffers for the above X is:\n * ```text\n * indicesBuffer(X) = [\n * [0, 1],\n * [0, 1, 1],\n * [0, 0, 1, 1],\n * [1, 2, 0, 2, 0, 0, 1, 2]\n * ].\n * ```\n */\n indicesBuffers(index, obj) {\n const offset = this.bb.__offset(this.bb_pos, 10);\n return offset ? (obj || new _buffer_mjs__WEBPACK_IMPORTED_MODULE_2__.Buffer()).__init(this.bb.__vector(this.bb_pos + offset) + index * 16, this.bb) : null;\n }\n indicesBuffersLength() {\n const offset = this.bb.__offset(this.bb_pos, 10);\n return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;\n }\n /**\n * axisOrder stores the sequence in which dimensions were traversed to\n * produce the prefix tree.\n * For example, the axisOrder for the above X is:\n * ```text\n * axisOrder(X) = [0, 1, 2, 3].\n * ```\n */\n axisOrder(index) {\n const offset = this.bb.__offset(this.bb_pos, 12);\n return offset ? this.bb.readInt32(this.bb.__vector(this.bb_pos + offset) + index * 4) : 0;\n }\n axisOrderLength() {\n const offset = this.bb.__offset(this.bb_pos, 12);\n return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;\n }\n axisOrderArray() {\n const offset = this.bb.__offset(this.bb_pos, 12);\n return offset ? new Int32Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null;\n }\n static startSparseTensorIndexCSF(builder) {\n builder.startObject(5);\n }\n static addIndptrType(builder, indptrTypeOffset) {\n builder.addFieldOffset(0, indptrTypeOffset, 0);\n }\n static addIndptrBuffers(builder, indptrBuffersOffset) {\n builder.addFieldOffset(1, indptrBuffersOffset, 0);\n }\n static startIndptrBuffersVector(builder, numElems) {\n builder.startVector(16, numElems, 8);\n }\n static addIndicesType(builder, indicesTypeOffset) {\n builder.addFieldOffset(2, indicesTypeOffset, 0);\n }\n static addIndicesBuffers(builder, indicesBuffersOffset) {\n builder.addFieldOffset(3, indicesBuffersOffset, 0);\n }\n static startIndicesBuffersVector(builder, numElems) {\n builder.startVector(16, numElems, 8);\n }\n static addAxisOrder(builder, axisOrderOffset) {\n builder.addFieldOffset(4, axisOrderOffset, 0);\n }\n static createAxisOrderVector(builder, data) {\n builder.startVector(4, data.length, 4);\n for (let i = data.length - 1; i >= 0; i--) {\n builder.addInt32(data[i]);\n }\n return builder.endVector();\n }\n static startAxisOrderVector(builder, numElems) {\n builder.startVector(4, numElems, 4);\n }\n static endSparseTensorIndexCSF(builder) {\n const offset = builder.endObject();\n builder.requiredField(offset, 4); // indptrType\n builder.requiredField(offset, 6); // indptrBuffers\n builder.requiredField(offset, 8); // indicesType\n builder.requiredField(offset, 10); // indicesBuffers\n builder.requiredField(offset, 12); // axisOrder\n return offset;\n }\n}\n\n//# sourceMappingURL=sparse-tensor-index-c-s-f.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/sparse-tensor-index-c-s-f.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/sparse-tensor-index.mjs": +/*!**************************************************************!*\ + !*** ./node_modules/apache-arrow/fb/sparse-tensor-index.mjs ***! + \**************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ SparseTensorIndex: () => (/* binding */ SparseTensorIndex),\n/* harmony export */ unionListToSparseTensorIndex: () => (/* binding */ unionListToSparseTensorIndex),\n/* harmony export */ unionToSparseTensorIndex: () => (/* binding */ unionToSparseTensorIndex)\n/* harmony export */ });\n/* harmony import */ var _sparse_matrix_index_c_s_x_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./sparse-matrix-index-c-s-x.mjs */ \"./node_modules/apache-arrow/fb/sparse-matrix-index-c-s-x.mjs\");\n/* harmony import */ var _sparse_tensor_index_c_o_o_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sparse-tensor-index-c-o-o.mjs */ \"./node_modules/apache-arrow/fb/sparse-tensor-index-c-o-o.mjs\");\n/* harmony import */ var _sparse_tensor_index_c_s_f_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sparse-tensor-index-c-s-f.mjs */ \"./node_modules/apache-arrow/fb/sparse-tensor-index-c-s-f.mjs\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\n\n\nvar SparseTensorIndex;\n(function (SparseTensorIndex) {\n SparseTensorIndex[SparseTensorIndex[\"NONE\"] = 0] = \"NONE\";\n SparseTensorIndex[SparseTensorIndex[\"SparseTensorIndexCOO\"] = 1] = \"SparseTensorIndexCOO\";\n SparseTensorIndex[SparseTensorIndex[\"SparseMatrixIndexCSX\"] = 2] = \"SparseMatrixIndexCSX\";\n SparseTensorIndex[SparseTensorIndex[\"SparseTensorIndexCSF\"] = 3] = \"SparseTensorIndexCSF\";\n})(SparseTensorIndex || (SparseTensorIndex = {}));\nfunction unionToSparseTensorIndex(type, accessor) {\n switch (SparseTensorIndex[type]) {\n case 'NONE': return null;\n case 'SparseTensorIndexCOO': return accessor(new _sparse_tensor_index_c_o_o_mjs__WEBPACK_IMPORTED_MODULE_0__.SparseTensorIndexCOO());\n case 'SparseMatrixIndexCSX': return accessor(new _sparse_matrix_index_c_s_x_mjs__WEBPACK_IMPORTED_MODULE_1__.SparseMatrixIndexCSX());\n case 'SparseTensorIndexCSF': return accessor(new _sparse_tensor_index_c_s_f_mjs__WEBPACK_IMPORTED_MODULE_2__.SparseTensorIndexCSF());\n default: return null;\n }\n}\nfunction unionListToSparseTensorIndex(type, accessor, index) {\n switch (SparseTensorIndex[type]) {\n case 'NONE': return null;\n case 'SparseTensorIndexCOO': return accessor(index, new _sparse_tensor_index_c_o_o_mjs__WEBPACK_IMPORTED_MODULE_0__.SparseTensorIndexCOO());\n case 'SparseMatrixIndexCSX': return accessor(index, new _sparse_matrix_index_c_s_x_mjs__WEBPACK_IMPORTED_MODULE_1__.SparseMatrixIndexCSX());\n case 'SparseTensorIndexCSF': return accessor(index, new _sparse_tensor_index_c_s_f_mjs__WEBPACK_IMPORTED_MODULE_2__.SparseTensorIndexCSF());\n default: return null;\n }\n}\n\n//# sourceMappingURL=sparse-tensor-index.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/sparse-tensor-index.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/sparse-tensor.mjs": +/*!********************************************************!*\ + !*** ./node_modules/apache-arrow/fb/sparse-tensor.mjs ***! + \********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ SparseTensor: () => (/* binding */ SparseTensor)\n/* harmony export */ });\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n/* harmony import */ var _buffer_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./buffer.mjs */ \"./node_modules/apache-arrow/fb/buffer.mjs\");\n/* harmony import */ var _sparse_tensor_index_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./sparse-tensor-index.mjs */ \"./node_modules/apache-arrow/fb/sparse-tensor-index.mjs\");\n/* harmony import */ var _tensor_dim_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tensor-dim.mjs */ \"./node_modules/apache-arrow/fb/tensor-dim.mjs\");\n/* harmony import */ var _type_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./type.mjs */ \"./node_modules/apache-arrow/fb/type.mjs\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\n\n\n\n\nclass SparseTensor {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsSparseTensor(bb, obj) {\n return (obj || new SparseTensor()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsSparseTensor(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers__WEBPACK_IMPORTED_MODULE_0__.SIZE_PREFIX_LENGTH);\n return (obj || new SparseTensor()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n typeType() {\n const offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.readUint8(this.bb_pos + offset) : _type_mjs__WEBPACK_IMPORTED_MODULE_1__.Type.NONE;\n }\n /**\n * The type of data contained in a value cell.\n * Currently only fixed-width value types are supported,\n * no strings or nested types.\n */\n // @ts-ignore\n type(obj) {\n const offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? this.bb.__union(obj, this.bb_pos + offset) : null;\n }\n /**\n * The dimensions of the tensor, optionally named.\n */\n shape(index, obj) {\n const offset = this.bb.__offset(this.bb_pos, 8);\n return offset ? (obj || new _tensor_dim_mjs__WEBPACK_IMPORTED_MODULE_2__.TensorDim()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;\n }\n shapeLength() {\n const offset = this.bb.__offset(this.bb_pos, 8);\n return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;\n }\n /**\n * The number of non-zero values in a sparse tensor.\n */\n nonZeroLength() {\n const offset = this.bb.__offset(this.bb_pos, 10);\n return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0);\n }\n sparseIndexType() {\n const offset = this.bb.__offset(this.bb_pos, 12);\n return offset ? this.bb.readUint8(this.bb_pos + offset) : _sparse_tensor_index_mjs__WEBPACK_IMPORTED_MODULE_3__.SparseTensorIndex.NONE;\n }\n /**\n * Sparse tensor index\n */\n // @ts-ignore\n sparseIndex(obj) {\n const offset = this.bb.__offset(this.bb_pos, 14);\n return offset ? this.bb.__union(obj, this.bb_pos + offset) : null;\n }\n /**\n * The location and size of the tensor's data\n */\n data(obj) {\n const offset = this.bb.__offset(this.bb_pos, 16);\n return offset ? (obj || new _buffer_mjs__WEBPACK_IMPORTED_MODULE_4__.Buffer()).__init(this.bb_pos + offset, this.bb) : null;\n }\n static startSparseTensor(builder) {\n builder.startObject(7);\n }\n static addTypeType(builder, typeType) {\n builder.addFieldInt8(0, typeType, _type_mjs__WEBPACK_IMPORTED_MODULE_1__.Type.NONE);\n }\n static addType(builder, typeOffset) {\n builder.addFieldOffset(1, typeOffset, 0);\n }\n static addShape(builder, shapeOffset) {\n builder.addFieldOffset(2, shapeOffset, 0);\n }\n static createShapeVector(builder, data) {\n builder.startVector(4, data.length, 4);\n for (let i = data.length - 1; i >= 0; i--) {\n builder.addOffset(data[i]);\n }\n return builder.endVector();\n }\n static startShapeVector(builder, numElems) {\n builder.startVector(4, numElems, 4);\n }\n static addNonZeroLength(builder, nonZeroLength) {\n builder.addFieldInt64(3, nonZeroLength, builder.createLong(0, 0));\n }\n static addSparseIndexType(builder, sparseIndexType) {\n builder.addFieldInt8(4, sparseIndexType, _sparse_tensor_index_mjs__WEBPACK_IMPORTED_MODULE_3__.SparseTensorIndex.NONE);\n }\n static addSparseIndex(builder, sparseIndexOffset) {\n builder.addFieldOffset(5, sparseIndexOffset, 0);\n }\n static addData(builder, dataOffset) {\n builder.addFieldStruct(6, dataOffset, 0);\n }\n static endSparseTensor(builder) {\n const offset = builder.endObject();\n builder.requiredField(offset, 6); // type\n builder.requiredField(offset, 8); // shape\n builder.requiredField(offset, 14); // sparseIndex\n builder.requiredField(offset, 16); // data\n return offset;\n }\n static finishSparseTensorBuffer(builder, offset) {\n builder.finish(offset);\n }\n static finishSizePrefixedSparseTensorBuffer(builder, offset) {\n builder.finish(offset, undefined, true);\n }\n}\n\n//# sourceMappingURL=sparse-tensor.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/sparse-tensor.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/struct_.mjs": +/*!**************************************************!*\ + !*** ./node_modules/apache-arrow/fb/struct_.mjs ***! + \**************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Struct_: () => (/* binding */ Struct_)\n/* harmony export */ });\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\n/**\n * A Struct_ in the flatbuffer metadata is the same as an Arrow Struct\n * (according to the physical memory layout). We used Struct_ here as\n * Struct is a reserved word in Flatbuffers\n */\nclass Struct_ {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsStruct_(bb, obj) {\n return (obj || new Struct_()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsStruct_(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers__WEBPACK_IMPORTED_MODULE_0__.SIZE_PREFIX_LENGTH);\n return (obj || new Struct_()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static startStruct_(builder) {\n builder.startObject(0);\n }\n static endStruct_(builder) {\n const offset = builder.endObject();\n return offset;\n }\n static createStruct_(builder) {\n Struct_.startStruct_(builder);\n return Struct_.endStruct_(builder);\n }\n}\n\n//# sourceMappingURL=struct_.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/struct_.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/tensor-dim.mjs": +/*!*****************************************************!*\ + !*** ./node_modules/apache-arrow/fb/tensor-dim.mjs ***! + \*****************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ TensorDim: () => (/* binding */ TensorDim)\n/* harmony export */ });\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\n/**\n * ----------------------------------------------------------------------\n * Data structures for dense tensors\n * Shape data for a single axis in a tensor\n */\nclass TensorDim {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsTensorDim(bb, obj) {\n return (obj || new TensorDim()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsTensorDim(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers__WEBPACK_IMPORTED_MODULE_0__.SIZE_PREFIX_LENGTH);\n return (obj || new TensorDim()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * Length of dimension\n */\n size() {\n const offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0);\n }\n name(optionalEncoding) {\n const offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;\n }\n static startTensorDim(builder) {\n builder.startObject(2);\n }\n static addSize(builder, size) {\n builder.addFieldInt64(0, size, builder.createLong(0, 0));\n }\n static addName(builder, nameOffset) {\n builder.addFieldOffset(1, nameOffset, 0);\n }\n static endTensorDim(builder) {\n const offset = builder.endObject();\n return offset;\n }\n static createTensorDim(builder, size, nameOffset) {\n TensorDim.startTensorDim(builder);\n TensorDim.addSize(builder, size);\n TensorDim.addName(builder, nameOffset);\n return TensorDim.endTensorDim(builder);\n }\n}\n\n//# sourceMappingURL=tensor-dim.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/tensor-dim.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/tensor.mjs": +/*!*************************************************!*\ + !*** ./node_modules/apache-arrow/fb/tensor.mjs ***! + \*************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Tensor: () => (/* binding */ Tensor)\n/* harmony export */ });\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n/* harmony import */ var _buffer_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./buffer.mjs */ \"./node_modules/apache-arrow/fb/buffer.mjs\");\n/* harmony import */ var _tensor_dim_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tensor-dim.mjs */ \"./node_modules/apache-arrow/fb/tensor-dim.mjs\");\n/* harmony import */ var _type_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./type.mjs */ \"./node_modules/apache-arrow/fb/type.mjs\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\n\n\n\nclass Tensor {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsTensor(bb, obj) {\n return (obj || new Tensor()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsTensor(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers__WEBPACK_IMPORTED_MODULE_0__.SIZE_PREFIX_LENGTH);\n return (obj || new Tensor()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n typeType() {\n const offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.readUint8(this.bb_pos + offset) : _type_mjs__WEBPACK_IMPORTED_MODULE_1__.Type.NONE;\n }\n /**\n * The type of data contained in a value cell. Currently only fixed-width\n * value types are supported, no strings or nested types\n */\n // @ts-ignore\n type(obj) {\n const offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? this.bb.__union(obj, this.bb_pos + offset) : null;\n }\n /**\n * The dimensions of the tensor, optionally named\n */\n shape(index, obj) {\n const offset = this.bb.__offset(this.bb_pos, 8);\n return offset ? (obj || new _tensor_dim_mjs__WEBPACK_IMPORTED_MODULE_2__.TensorDim()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;\n }\n shapeLength() {\n const offset = this.bb.__offset(this.bb_pos, 8);\n return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;\n }\n /**\n * Non-negative byte offsets to advance one value cell along each dimension\n * If omitted, default to row-major order (C-like).\n */\n strides(index) {\n const offset = this.bb.__offset(this.bb_pos, 10);\n return offset ? this.bb.readInt64(this.bb.__vector(this.bb_pos + offset) + index * 8) : this.bb.createLong(0, 0);\n }\n stridesLength() {\n const offset = this.bb.__offset(this.bb_pos, 10);\n return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;\n }\n /**\n * The location and size of the tensor's data\n */\n data(obj) {\n const offset = this.bb.__offset(this.bb_pos, 12);\n return offset ? (obj || new _buffer_mjs__WEBPACK_IMPORTED_MODULE_3__.Buffer()).__init(this.bb_pos + offset, this.bb) : null;\n }\n static startTensor(builder) {\n builder.startObject(5);\n }\n static addTypeType(builder, typeType) {\n builder.addFieldInt8(0, typeType, _type_mjs__WEBPACK_IMPORTED_MODULE_1__.Type.NONE);\n }\n static addType(builder, typeOffset) {\n builder.addFieldOffset(1, typeOffset, 0);\n }\n static addShape(builder, shapeOffset) {\n builder.addFieldOffset(2, shapeOffset, 0);\n }\n static createShapeVector(builder, data) {\n builder.startVector(4, data.length, 4);\n for (let i = data.length - 1; i >= 0; i--) {\n builder.addOffset(data[i]);\n }\n return builder.endVector();\n }\n static startShapeVector(builder, numElems) {\n builder.startVector(4, numElems, 4);\n }\n static addStrides(builder, stridesOffset) {\n builder.addFieldOffset(3, stridesOffset, 0);\n }\n static createStridesVector(builder, data) {\n builder.startVector(8, data.length, 8);\n for (let i = data.length - 1; i >= 0; i--) {\n builder.addInt64(data[i]);\n }\n return builder.endVector();\n }\n static startStridesVector(builder, numElems) {\n builder.startVector(8, numElems, 8);\n }\n static addData(builder, dataOffset) {\n builder.addFieldStruct(4, dataOffset, 0);\n }\n static endTensor(builder) {\n const offset = builder.endObject();\n builder.requiredField(offset, 6); // type\n builder.requiredField(offset, 8); // shape\n builder.requiredField(offset, 12); // data\n return offset;\n }\n static finishTensorBuffer(builder, offset) {\n builder.finish(offset);\n }\n static finishSizePrefixedTensorBuffer(builder, offset) {\n builder.finish(offset, undefined, true);\n }\n}\n\n//# sourceMappingURL=tensor.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/tensor.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/time-unit.mjs": +/*!****************************************************!*\ + !*** ./node_modules/apache-arrow/fb/time-unit.mjs ***! + \****************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ TimeUnit: () => (/* binding */ TimeUnit)\n/* harmony export */ });\n// automatically generated by the FlatBuffers compiler, do not modify\nvar TimeUnit;\n(function (TimeUnit) {\n TimeUnit[TimeUnit[\"SECOND\"] = 0] = \"SECOND\";\n TimeUnit[TimeUnit[\"MILLISECOND\"] = 1] = \"MILLISECOND\";\n TimeUnit[TimeUnit[\"MICROSECOND\"] = 2] = \"MICROSECOND\";\n TimeUnit[TimeUnit[\"NANOSECOND\"] = 3] = \"NANOSECOND\";\n})(TimeUnit || (TimeUnit = {}));\n\n//# sourceMappingURL=time-unit.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/time-unit.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/time.mjs": +/*!***********************************************!*\ + !*** ./node_modules/apache-arrow/fb/time.mjs ***! + \***********************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Time: () => (/* binding */ Time)\n/* harmony export */ });\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n/* harmony import */ var _time_unit_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./time-unit.mjs */ \"./node_modules/apache-arrow/fb/time-unit.mjs\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\n\n/**\n * Time is either a 32-bit or 64-bit signed integer type representing an\n * elapsed time since midnight, stored in either of four units: seconds,\n * milliseconds, microseconds or nanoseconds.\n *\n * The integer `bitWidth` depends on the `unit` and must be one of the following:\n * * SECOND and MILLISECOND: 32 bits\n * * MICROSECOND and NANOSECOND: 64 bits\n *\n * The allowed values are between 0 (inclusive) and 86400 (=24*60*60) seconds\n * (exclusive), adjusted for the time unit (for example, up to 86400000\n * exclusive for the MILLISECOND unit).\n * This definition doesn't allow for leap seconds. Time values from\n * measurements with leap seconds will need to be corrected when ingesting\n * into Arrow (for example by replacing the value 86400 with 86399).\n */\nclass Time {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsTime(bb, obj) {\n return (obj || new Time()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsTime(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers__WEBPACK_IMPORTED_MODULE_0__.SIZE_PREFIX_LENGTH);\n return (obj || new Time()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n unit() {\n const offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.readInt16(this.bb_pos + offset) : _time_unit_mjs__WEBPACK_IMPORTED_MODULE_1__.TimeUnit.MILLISECOND;\n }\n bitWidth() {\n const offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? this.bb.readInt32(this.bb_pos + offset) : 32;\n }\n static startTime(builder) {\n builder.startObject(2);\n }\n static addUnit(builder, unit) {\n builder.addFieldInt16(0, unit, _time_unit_mjs__WEBPACK_IMPORTED_MODULE_1__.TimeUnit.MILLISECOND);\n }\n static addBitWidth(builder, bitWidth) {\n builder.addFieldInt32(1, bitWidth, 32);\n }\n static endTime(builder) {\n const offset = builder.endObject();\n return offset;\n }\n static createTime(builder, unit, bitWidth) {\n Time.startTime(builder);\n Time.addUnit(builder, unit);\n Time.addBitWidth(builder, bitWidth);\n return Time.endTime(builder);\n }\n}\n\n//# sourceMappingURL=time.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/time.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/timestamp.mjs": +/*!****************************************************!*\ + !*** ./node_modules/apache-arrow/fb/timestamp.mjs ***! + \****************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Timestamp: () => (/* binding */ Timestamp)\n/* harmony export */ });\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n/* harmony import */ var _time_unit_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./time-unit.mjs */ \"./node_modules/apache-arrow/fb/time-unit.mjs\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\n\n/**\n * Timestamp is a 64-bit signed integer representing an elapsed time since a\n * fixed epoch, stored in either of four units: seconds, milliseconds,\n * microseconds or nanoseconds, and is optionally annotated with a timezone.\n *\n * Timestamp values do not include any leap seconds (in other words, all\n * days are considered 86400 seconds long).\n *\n * Timestamps with a non-empty timezone\n * ------------------------------------\n *\n * If a Timestamp column has a non-empty timezone value, its epoch is\n * 1970-01-01 00:00:00 (January 1st 1970, midnight) in the *UTC* timezone\n * (the Unix epoch), regardless of the Timestamp's own timezone.\n *\n * Therefore, timestamp values with a non-empty timezone correspond to\n * physical points in time together with some additional information about\n * how the data was obtained and/or how to display it (the timezone).\n *\n * For example, the timestamp value 0 with the timezone string \"Europe/Paris\"\n * corresponds to \"January 1st 1970, 00h00\" in the UTC timezone, but the\n * application may prefer to display it as \"January 1st 1970, 01h00\" in\n * the Europe/Paris timezone (which is the same physical point in time).\n *\n * One consequence is that timestamp values with a non-empty timezone\n * can be compared and ordered directly, since they all share the same\n * well-known point of reference (the Unix epoch).\n *\n * Timestamps with an unset / empty timezone\n * -----------------------------------------\n *\n * If a Timestamp column has no timezone value, its epoch is\n * 1970-01-01 00:00:00 (January 1st 1970, midnight) in an *unknown* timezone.\n *\n * Therefore, timestamp values without a timezone cannot be meaningfully\n * interpreted as physical points in time, but only as calendar / clock\n * indications (\"wall clock time\") in an unspecified timezone.\n *\n * For example, the timestamp value 0 with an empty timezone string\n * corresponds to \"January 1st 1970, 00h00\" in an unknown timezone: there\n * is not enough information to interpret it as a well-defined physical\n * point in time.\n *\n * One consequence is that timestamp values without a timezone cannot\n * be reliably compared or ordered, since they may have different points of\n * reference. In particular, it is *not* possible to interpret an unset\n * or empty timezone as the same as \"UTC\".\n *\n * Conversion between timezones\n * ----------------------------\n *\n * If a Timestamp column has a non-empty timezone, changing the timezone\n * to a different non-empty value is a metadata-only operation:\n * the timestamp values need not change as their point of reference remains\n * the same (the Unix epoch).\n *\n * However, if a Timestamp column has no timezone value, changing it to a\n * non-empty value requires to think about the desired semantics.\n * One possibility is to assume that the original timestamp values are\n * relative to the epoch of the timezone being set; timestamp values should\n * then adjusted to the Unix epoch (for example, changing the timezone from\n * empty to \"Europe/Paris\" would require converting the timestamp values\n * from \"Europe/Paris\" to \"UTC\", which seems counter-intuitive but is\n * nevertheless correct).\n *\n * Guidelines for encoding data from external libraries\n * ----------------------------------------------------\n *\n * Date & time libraries often have multiple different data types for temporal\n * data. In order to ease interoperability between different implementations the\n * Arrow project has some recommendations for encoding these types into a Timestamp\n * column.\n *\n * An \"instant\" represents a physical point in time that has no relevant timezone\n * (for example, astronomical data). To encode an instant, use a Timestamp with\n * the timezone string set to \"UTC\", and make sure the Timestamp values\n * are relative to the UTC epoch (January 1st 1970, midnight).\n *\n * A \"zoned date-time\" represents a physical point in time annotated with an\n * informative timezone (for example, the timezone in which the data was\n * recorded). To encode a zoned date-time, use a Timestamp with the timezone\n * string set to the name of the timezone, and make sure the Timestamp values\n * are relative to the UTC epoch (January 1st 1970, midnight).\n *\n * (There is some ambiguity between an instant and a zoned date-time with the\n * UTC timezone. Both of these are stored the same in Arrow. Typically,\n * this distinction does not matter. If it does, then an application should\n * use custom metadata or an extension type to distinguish between the two cases.)\n *\n * An \"offset date-time\" represents a physical point in time combined with an\n * explicit offset from UTC. To encode an offset date-time, use a Timestamp\n * with the timezone string set to the numeric timezone offset string\n * (e.g. \"+03:00\"), and make sure the Timestamp values are relative to\n * the UTC epoch (January 1st 1970, midnight).\n *\n * A \"naive date-time\" (also called \"local date-time\" in some libraries)\n * represents a wall clock time combined with a calendar date, but with\n * no indication of how to map this information to a physical point in time.\n * Naive date-times must be handled with care because of this missing\n * information, and also because daylight saving time (DST) may make\n * some values ambiguous or non-existent. A naive date-time may be\n * stored as a struct with Date and Time fields. However, it may also be\n * encoded into a Timestamp column with an empty timezone. The timestamp\n * values should be computed \"as if\" the timezone of the date-time values\n * was UTC; for example, the naive date-time \"January 1st 1970, 00h00\" would\n * be encoded as timestamp value 0.\n */\nclass Timestamp {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsTimestamp(bb, obj) {\n return (obj || new Timestamp()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsTimestamp(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers__WEBPACK_IMPORTED_MODULE_0__.SIZE_PREFIX_LENGTH);\n return (obj || new Timestamp()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n unit() {\n const offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.readInt16(this.bb_pos + offset) : _time_unit_mjs__WEBPACK_IMPORTED_MODULE_1__.TimeUnit.SECOND;\n }\n timezone(optionalEncoding) {\n const offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;\n }\n static startTimestamp(builder) {\n builder.startObject(2);\n }\n static addUnit(builder, unit) {\n builder.addFieldInt16(0, unit, _time_unit_mjs__WEBPACK_IMPORTED_MODULE_1__.TimeUnit.SECOND);\n }\n static addTimezone(builder, timezoneOffset) {\n builder.addFieldOffset(1, timezoneOffset, 0);\n }\n static endTimestamp(builder) {\n const offset = builder.endObject();\n return offset;\n }\n static createTimestamp(builder, unit, timezoneOffset) {\n Timestamp.startTimestamp(builder);\n Timestamp.addUnit(builder, unit);\n Timestamp.addTimezone(builder, timezoneOffset);\n return Timestamp.endTimestamp(builder);\n }\n}\n\n//# sourceMappingURL=timestamp.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/timestamp.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/type.mjs": +/*!***********************************************!*\ + !*** ./node_modules/apache-arrow/fb/type.mjs ***! + \***********************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Type: () => (/* binding */ Type),\n/* harmony export */ unionListToType: () => (/* binding */ unionListToType),\n/* harmony export */ unionToType: () => (/* binding */ unionToType)\n/* harmony export */ });\n/* harmony import */ var _binary_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./binary.mjs */ \"./node_modules/apache-arrow/fb/binary.mjs\");\n/* harmony import */ var _bool_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./bool.mjs */ \"./node_modules/apache-arrow/fb/bool.mjs\");\n/* harmony import */ var _date_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./date.mjs */ \"./node_modules/apache-arrow/fb/date.mjs\");\n/* harmony import */ var _decimal_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./decimal.mjs */ \"./node_modules/apache-arrow/fb/decimal.mjs\");\n/* harmony import */ var _duration_mjs__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./duration.mjs */ \"./node_modules/apache-arrow/fb/duration.mjs\");\n/* harmony import */ var _fixed_size_binary_mjs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./fixed-size-binary.mjs */ \"./node_modules/apache-arrow/fb/fixed-size-binary.mjs\");\n/* harmony import */ var _fixed_size_list_mjs__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./fixed-size-list.mjs */ \"./node_modules/apache-arrow/fb/fixed-size-list.mjs\");\n/* harmony import */ var _floating_point_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./floating-point.mjs */ \"./node_modules/apache-arrow/fb/floating-point.mjs\");\n/* harmony import */ var _int_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./int.mjs */ \"./node_modules/apache-arrow/fb/int.mjs\");\n/* harmony import */ var _interval_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./interval.mjs */ \"./node_modules/apache-arrow/fb/interval.mjs\");\n/* harmony import */ var _large_binary_mjs__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./large-binary.mjs */ \"./node_modules/apache-arrow/fb/large-binary.mjs\");\n/* harmony import */ var _large_list_mjs__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./large-list.mjs */ \"./node_modules/apache-arrow/fb/large-list.mjs\");\n/* harmony import */ var _large_utf8_mjs__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./large-utf8.mjs */ \"./node_modules/apache-arrow/fb/large-utf8.mjs\");\n/* harmony import */ var _list_mjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./list.mjs */ \"./node_modules/apache-arrow/fb/list.mjs\");\n/* harmony import */ var _map_mjs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./map.mjs */ \"./node_modules/apache-arrow/fb/map.mjs\");\n/* harmony import */ var _null_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./null.mjs */ \"./node_modules/apache-arrow/fb/null.mjs\");\n/* harmony import */ var _struct_mjs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./struct_.mjs */ \"./node_modules/apache-arrow/fb/struct_.mjs\");\n/* harmony import */ var _time_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./time.mjs */ \"./node_modules/apache-arrow/fb/time.mjs\");\n/* harmony import */ var _timestamp_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./timestamp.mjs */ \"./node_modules/apache-arrow/fb/timestamp.mjs\");\n/* harmony import */ var _union_mjs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./union.mjs */ \"./node_modules/apache-arrow/fb/union.mjs\");\n/* harmony import */ var _utf8_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utf8.mjs */ \"./node_modules/apache-arrow/fb/utf8.mjs\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * ----------------------------------------------------------------------\n * Top-level Type value, enabling extensible type-specific metadata. We can\n * add new logical types to Type without breaking backwards compatibility\n */\nvar Type;\n(function (Type) {\n Type[Type[\"NONE\"] = 0] = \"NONE\";\n Type[Type[\"Null\"] = 1] = \"Null\";\n Type[Type[\"Int\"] = 2] = \"Int\";\n Type[Type[\"FloatingPoint\"] = 3] = \"FloatingPoint\";\n Type[Type[\"Binary\"] = 4] = \"Binary\";\n Type[Type[\"Utf8\"] = 5] = \"Utf8\";\n Type[Type[\"Bool\"] = 6] = \"Bool\";\n Type[Type[\"Decimal\"] = 7] = \"Decimal\";\n Type[Type[\"Date\"] = 8] = \"Date\";\n Type[Type[\"Time\"] = 9] = \"Time\";\n Type[Type[\"Timestamp\"] = 10] = \"Timestamp\";\n Type[Type[\"Interval\"] = 11] = \"Interval\";\n Type[Type[\"List\"] = 12] = \"List\";\n Type[Type[\"Struct_\"] = 13] = \"Struct_\";\n Type[Type[\"Union\"] = 14] = \"Union\";\n Type[Type[\"FixedSizeBinary\"] = 15] = \"FixedSizeBinary\";\n Type[Type[\"FixedSizeList\"] = 16] = \"FixedSizeList\";\n Type[Type[\"Map\"] = 17] = \"Map\";\n Type[Type[\"Duration\"] = 18] = \"Duration\";\n Type[Type[\"LargeBinary\"] = 19] = \"LargeBinary\";\n Type[Type[\"LargeUtf8\"] = 20] = \"LargeUtf8\";\n Type[Type[\"LargeList\"] = 21] = \"LargeList\";\n})(Type || (Type = {}));\nfunction unionToType(type, accessor) {\n switch (Type[type]) {\n case 'NONE': return null;\n case 'Null': return accessor(new _null_mjs__WEBPACK_IMPORTED_MODULE_0__.Null());\n case 'Int': return accessor(new _int_mjs__WEBPACK_IMPORTED_MODULE_1__.Int());\n case 'FloatingPoint': return accessor(new _floating_point_mjs__WEBPACK_IMPORTED_MODULE_2__.FloatingPoint());\n case 'Binary': return accessor(new _binary_mjs__WEBPACK_IMPORTED_MODULE_3__.Binary());\n case 'Utf8': return accessor(new _utf8_mjs__WEBPACK_IMPORTED_MODULE_4__.Utf8());\n case 'Bool': return accessor(new _bool_mjs__WEBPACK_IMPORTED_MODULE_5__.Bool());\n case 'Decimal': return accessor(new _decimal_mjs__WEBPACK_IMPORTED_MODULE_6__.Decimal());\n case 'Date': return accessor(new _date_mjs__WEBPACK_IMPORTED_MODULE_7__.Date());\n case 'Time': return accessor(new _time_mjs__WEBPACK_IMPORTED_MODULE_8__.Time());\n case 'Timestamp': return accessor(new _timestamp_mjs__WEBPACK_IMPORTED_MODULE_9__.Timestamp());\n case 'Interval': return accessor(new _interval_mjs__WEBPACK_IMPORTED_MODULE_10__.Interval());\n case 'List': return accessor(new _list_mjs__WEBPACK_IMPORTED_MODULE_11__.List());\n case 'Struct_': return accessor(new _struct_mjs__WEBPACK_IMPORTED_MODULE_12__.Struct_());\n case 'Union': return accessor(new _union_mjs__WEBPACK_IMPORTED_MODULE_13__.Union());\n case 'FixedSizeBinary': return accessor(new _fixed_size_binary_mjs__WEBPACK_IMPORTED_MODULE_14__.FixedSizeBinary());\n case 'FixedSizeList': return accessor(new _fixed_size_list_mjs__WEBPACK_IMPORTED_MODULE_15__.FixedSizeList());\n case 'Map': return accessor(new _map_mjs__WEBPACK_IMPORTED_MODULE_16__.Map());\n case 'Duration': return accessor(new _duration_mjs__WEBPACK_IMPORTED_MODULE_17__.Duration());\n case 'LargeBinary': return accessor(new _large_binary_mjs__WEBPACK_IMPORTED_MODULE_18__.LargeBinary());\n case 'LargeUtf8': return accessor(new _large_utf8_mjs__WEBPACK_IMPORTED_MODULE_19__.LargeUtf8());\n case 'LargeList': return accessor(new _large_list_mjs__WEBPACK_IMPORTED_MODULE_20__.LargeList());\n default: return null;\n }\n}\nfunction unionListToType(type, accessor, index) {\n switch (Type[type]) {\n case 'NONE': return null;\n case 'Null': return accessor(index, new _null_mjs__WEBPACK_IMPORTED_MODULE_0__.Null());\n case 'Int': return accessor(index, new _int_mjs__WEBPACK_IMPORTED_MODULE_1__.Int());\n case 'FloatingPoint': return accessor(index, new _floating_point_mjs__WEBPACK_IMPORTED_MODULE_2__.FloatingPoint());\n case 'Binary': return accessor(index, new _binary_mjs__WEBPACK_IMPORTED_MODULE_3__.Binary());\n case 'Utf8': return accessor(index, new _utf8_mjs__WEBPACK_IMPORTED_MODULE_4__.Utf8());\n case 'Bool': return accessor(index, new _bool_mjs__WEBPACK_IMPORTED_MODULE_5__.Bool());\n case 'Decimal': return accessor(index, new _decimal_mjs__WEBPACK_IMPORTED_MODULE_6__.Decimal());\n case 'Date': return accessor(index, new _date_mjs__WEBPACK_IMPORTED_MODULE_7__.Date());\n case 'Time': return accessor(index, new _time_mjs__WEBPACK_IMPORTED_MODULE_8__.Time());\n case 'Timestamp': return accessor(index, new _timestamp_mjs__WEBPACK_IMPORTED_MODULE_9__.Timestamp());\n case 'Interval': return accessor(index, new _interval_mjs__WEBPACK_IMPORTED_MODULE_10__.Interval());\n case 'List': return accessor(index, new _list_mjs__WEBPACK_IMPORTED_MODULE_11__.List());\n case 'Struct_': return accessor(index, new _struct_mjs__WEBPACK_IMPORTED_MODULE_12__.Struct_());\n case 'Union': return accessor(index, new _union_mjs__WEBPACK_IMPORTED_MODULE_13__.Union());\n case 'FixedSizeBinary': return accessor(index, new _fixed_size_binary_mjs__WEBPACK_IMPORTED_MODULE_14__.FixedSizeBinary());\n case 'FixedSizeList': return accessor(index, new _fixed_size_list_mjs__WEBPACK_IMPORTED_MODULE_15__.FixedSizeList());\n case 'Map': return accessor(index, new _map_mjs__WEBPACK_IMPORTED_MODULE_16__.Map());\n case 'Duration': return accessor(index, new _duration_mjs__WEBPACK_IMPORTED_MODULE_17__.Duration());\n case 'LargeBinary': return accessor(index, new _large_binary_mjs__WEBPACK_IMPORTED_MODULE_18__.LargeBinary());\n case 'LargeUtf8': return accessor(index, new _large_utf8_mjs__WEBPACK_IMPORTED_MODULE_19__.LargeUtf8());\n case 'LargeList': return accessor(index, new _large_list_mjs__WEBPACK_IMPORTED_MODULE_20__.LargeList());\n default: return null;\n }\n}\n\n//# sourceMappingURL=type.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/type.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/union-mode.mjs": +/*!*****************************************************!*\ + !*** ./node_modules/apache-arrow/fb/union-mode.mjs ***! + \*****************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ UnionMode: () => (/* binding */ UnionMode)\n/* harmony export */ });\n// automatically generated by the FlatBuffers compiler, do not modify\nvar UnionMode;\n(function (UnionMode) {\n UnionMode[UnionMode[\"Sparse\"] = 0] = \"Sparse\";\n UnionMode[UnionMode[\"Dense\"] = 1] = \"Dense\";\n})(UnionMode || (UnionMode = {}));\n\n//# sourceMappingURL=union-mode.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/union-mode.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/union.mjs": +/*!************************************************!*\ + !*** ./node_modules/apache-arrow/fb/union.mjs ***! + \************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Union: () => (/* binding */ Union)\n/* harmony export */ });\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n/* harmony import */ var _union_mode_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./union-mode.mjs */ \"./node_modules/apache-arrow/fb/union-mode.mjs\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\n\n/**\n * A union is a complex type with children in Field\n * By default ids in the type vector refer to the offsets in the children\n * optionally typeIds provides an indirection between the child offset and the type id\n * for each child `typeIds[offset]` is the id used in the type vector\n */\nclass Union {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsUnion(bb, obj) {\n return (obj || new Union()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsUnion(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers__WEBPACK_IMPORTED_MODULE_0__.SIZE_PREFIX_LENGTH);\n return (obj || new Union()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n mode() {\n const offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.readInt16(this.bb_pos + offset) : _union_mode_mjs__WEBPACK_IMPORTED_MODULE_1__.UnionMode.Sparse;\n }\n typeIds(index) {\n const offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? this.bb.readInt32(this.bb.__vector(this.bb_pos + offset) + index * 4) : 0;\n }\n typeIdsLength() {\n const offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;\n }\n typeIdsArray() {\n const offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? new Int32Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null;\n }\n static startUnion(builder) {\n builder.startObject(2);\n }\n static addMode(builder, mode) {\n builder.addFieldInt16(0, mode, _union_mode_mjs__WEBPACK_IMPORTED_MODULE_1__.UnionMode.Sparse);\n }\n static addTypeIds(builder, typeIdsOffset) {\n builder.addFieldOffset(1, typeIdsOffset, 0);\n }\n static createTypeIdsVector(builder, data) {\n builder.startVector(4, data.length, 4);\n for (let i = data.length - 1; i >= 0; i--) {\n builder.addInt32(data[i]);\n }\n return builder.endVector();\n }\n static startTypeIdsVector(builder, numElems) {\n builder.startVector(4, numElems, 4);\n }\n static endUnion(builder) {\n const offset = builder.endObject();\n return offset;\n }\n static createUnion(builder, mode, typeIdsOffset) {\n Union.startUnion(builder);\n Union.addMode(builder, mode);\n Union.addTypeIds(builder, typeIdsOffset);\n return Union.endUnion(builder);\n }\n}\n\n//# sourceMappingURL=union.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/union.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/fb/utf8.mjs": +/*!***********************************************!*\ + !*** ./node_modules/apache-arrow/fb/utf8.mjs ***! + \***********************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Utf8: () => (/* binding */ Utf8)\n/* harmony export */ });\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n// automatically generated by the FlatBuffers compiler, do not modify\n\n/**\n * Unicode with UTF-8 encoding\n */\nclass Utf8 {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsUtf8(bb, obj) {\n return (obj || new Utf8()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsUtf8(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers__WEBPACK_IMPORTED_MODULE_0__.SIZE_PREFIX_LENGTH);\n return (obj || new Utf8()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static startUtf8(builder) {\n builder.startObject(0);\n }\n static endUtf8(builder) {\n const offset = builder.endObject();\n return offset;\n }\n static createUtf8(builder) {\n Utf8.startUtf8(builder);\n return Utf8.endUtf8(builder);\n }\n}\n\n//# sourceMappingURL=utf8.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/fb/utf8.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/io/adapters.mjs": +/*!***************************************************!*\ + !*** ./node_modules/apache-arrow/io/adapters.mjs ***! + \***************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ \"./node_modules/tslib/tslib.es6.mjs\");\n/* harmony import */ var _util_buffer_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/buffer.mjs */ \"./node_modules/apache-arrow/util/buffer.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n/** @ignore */\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n fromIterable(source) {\n return pump(fromIterable(source));\n },\n fromAsyncIterable(source) {\n return pump(fromAsyncIterable(source));\n },\n fromDOMStream(source) {\n return pump(fromDOMStream(source));\n },\n fromNodeStream(stream) {\n return pump(fromNodeStream(stream));\n },\n // @ts-ignore\n toDOMStream(source, options) {\n throw new Error(`\"toDOMStream\" not available in this environment`);\n },\n // @ts-ignore\n toNodeStream(source, options) {\n throw new Error(`\"toNodeStream\" not available in this environment`);\n },\n});\n/** @ignore */\nconst pump = (iterator) => { iterator.next(); return iterator; };\n/** @ignore */\nfunction* fromIterable(source) {\n let done, threw = false;\n let buffers = [], buffer;\n let cmd, size, bufferLength = 0;\n function byteRange() {\n if (cmd === 'peek') {\n return (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_0__.joinUint8Arrays)(buffers, size)[0];\n }\n [buffer, buffers, bufferLength] = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_0__.joinUint8Arrays)(buffers, size);\n return buffer;\n }\n // Yield so the caller can inject the read command before creating the source Iterator\n ({ cmd, size } = yield null);\n // initialize the iterator\n const it = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_0__.toUint8ArrayIterator)(source)[Symbol.iterator]();\n try {\n do {\n // read the next value\n ({ done, value: buffer } = Number.isNaN(size - bufferLength) ?\n it.next() : it.next(size - bufferLength));\n // if chunk is not null or empty, push it onto the queue\n if (!done && buffer.byteLength > 0) {\n buffers.push(buffer);\n bufferLength += buffer.byteLength;\n }\n // If we have enough bytes in our buffer, yield chunks until we don't\n if (done || size <= bufferLength) {\n do {\n ({ cmd, size } = yield byteRange());\n } while (size < bufferLength);\n }\n } while (!done);\n }\n catch (e) {\n (threw = true) && (typeof it.throw === 'function') && (it.throw(e));\n }\n finally {\n (threw === false) && (typeof it.return === 'function') && (it.return(null));\n }\n return null;\n}\n/** @ignore */\nfunction fromAsyncIterable(source) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__asyncGenerator)(this, arguments, function* fromAsyncIterable_1() {\n let done, threw = false;\n let buffers = [], buffer;\n let cmd, size, bufferLength = 0;\n function byteRange() {\n if (cmd === 'peek') {\n return (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_0__.joinUint8Arrays)(buffers, size)[0];\n }\n [buffer, buffers, bufferLength] = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_0__.joinUint8Arrays)(buffers, size);\n return buffer;\n }\n // Yield so the caller can inject the read command before creating the source AsyncIterator\n ({ cmd, size } = (yield yield (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__await)(null)));\n // initialize the iterator\n const it = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_0__.toUint8ArrayAsyncIterator)(source)[Symbol.asyncIterator]();\n try {\n do {\n // read the next value\n ({ done, value: buffer } = Number.isNaN(size - bufferLength)\n ? yield (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__await)(it.next())\n : yield (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__await)(it.next(size - bufferLength)));\n // if chunk is not null or empty, push it onto the queue\n if (!done && buffer.byteLength > 0) {\n buffers.push(buffer);\n bufferLength += buffer.byteLength;\n }\n // If we have enough bytes in our buffer, yield chunks until we don't\n if (done || size <= bufferLength) {\n do {\n ({ cmd, size } = yield yield (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__await)(byteRange()));\n } while (size < bufferLength);\n }\n } while (!done);\n }\n catch (e) {\n (threw = true) && (typeof it.throw === 'function') && (yield (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__await)(it.throw(e)));\n }\n finally {\n (threw === false) && (typeof it.return === 'function') && (yield (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__await)(it.return(new Uint8Array(0))));\n }\n return yield (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__await)(null);\n });\n}\n// All this manual Uint8Array chunk management can be avoided if/when engines\n// add support for ArrayBuffer.transfer() or ArrayBuffer.prototype.realloc():\n// https://github.com/domenic/proposal-arraybuffer-transfer\n/** @ignore */\nfunction fromDOMStream(source) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__asyncGenerator)(this, arguments, function* fromDOMStream_1() {\n let done = false, threw = false;\n let buffers = [], buffer;\n let cmd, size, bufferLength = 0;\n function byteRange() {\n if (cmd === 'peek') {\n return (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_0__.joinUint8Arrays)(buffers, size)[0];\n }\n [buffer, buffers, bufferLength] = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_0__.joinUint8Arrays)(buffers, size);\n return buffer;\n }\n // Yield so the caller can inject the read command before we establish the ReadableStream lock\n ({ cmd, size } = yield yield (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__await)(null));\n // initialize the reader and lock the stream\n const it = new AdaptiveByteReader(source);\n try {\n do {\n // read the next value\n ({ done, value: buffer } = Number.isNaN(size - bufferLength)\n ? yield (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__await)(it['read']())\n : yield (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__await)(it['read'](size - bufferLength)));\n // if chunk is not null or empty, push it onto the queue\n if (!done && buffer.byteLength > 0) {\n buffers.push((0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_0__.toUint8Array)(buffer));\n bufferLength += buffer.byteLength;\n }\n // If we have enough bytes in our buffer, yield chunks until we don't\n if (done || size <= bufferLength) {\n do {\n ({ cmd, size } = yield yield (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__await)(byteRange()));\n } while (size < bufferLength);\n }\n } while (!done);\n }\n catch (e) {\n (threw = true) && (yield (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__await)(it['cancel'](e)));\n }\n finally {\n (threw === false) ? (yield (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__await)(it['cancel']()))\n : source['locked'] && it.releaseLock();\n }\n return yield (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__await)(null);\n });\n}\n/** @ignore */\nclass AdaptiveByteReader {\n constructor(source) {\n this.source = source;\n this.reader = null;\n this.reader = this.source['getReader']();\n // We have to catch and swallow errors here to avoid uncaught promise rejection exceptions\n // that seem to be raised when we call `releaseLock()` on this reader. I'm still mystified\n // about why these errors are raised, but I'm sure there's some important spec reason that\n // I haven't considered. I hate to employ such an anti-pattern here, but it seems like the\n // only solution in this case :/\n this.reader['closed'].catch(() => { });\n }\n get closed() {\n return this.reader ? this.reader['closed'].catch(() => { }) : Promise.resolve();\n }\n releaseLock() {\n if (this.reader) {\n this.reader.releaseLock();\n }\n this.reader = null;\n }\n cancel(reason) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__awaiter)(this, void 0, void 0, function* () {\n const { reader, source } = this;\n reader && (yield reader['cancel'](reason).catch(() => { }));\n source && (source['locked'] && this.releaseLock());\n });\n }\n read(size) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__awaiter)(this, void 0, void 0, function* () {\n if (size === 0) {\n return { done: this.reader == null, value: new Uint8Array(0) };\n }\n const result = yield this.reader.read();\n !result.done && (result.value = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_0__.toUint8Array)(result));\n return result;\n });\n }\n}\n/** @ignore */\nconst onEvent = (stream, event) => {\n const handler = (_) => resolve([event, _]);\n let resolve;\n return [event, handler, new Promise((r) => (resolve = r) && stream['once'](event, handler))];\n};\n/** @ignore */\nfunction fromNodeStream(stream) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__asyncGenerator)(this, arguments, function* fromNodeStream_1() {\n const events = [];\n let event = 'error';\n let done = false, err = null;\n let cmd, size, bufferLength = 0;\n let buffers = [], buffer;\n function byteRange() {\n if (cmd === 'peek') {\n return (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_0__.joinUint8Arrays)(buffers, size)[0];\n }\n [buffer, buffers, bufferLength] = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_0__.joinUint8Arrays)(buffers, size);\n return buffer;\n }\n // Yield so the caller can inject the read command before we\n // add the listener for the source stream's 'readable' event.\n ({ cmd, size } = yield yield (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__await)(null));\n // ignore stdin if it's a TTY\n if (stream['isTTY']) {\n yield yield (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__await)(new Uint8Array(0));\n return yield (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__await)(null);\n }\n try {\n // initialize the stream event handlers\n events[0] = onEvent(stream, 'end');\n events[1] = onEvent(stream, 'error');\n do {\n events[2] = onEvent(stream, 'readable');\n // wait on the first message event from the stream\n [event, err] = yield (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__await)(Promise.race(events.map((x) => x[2])));\n // if the stream emitted an Error, rethrow it\n if (event === 'error') {\n break;\n }\n if (!(done = event === 'end')) {\n // If the size is NaN, request to read everything in the stream's internal buffer\n if (!Number.isFinite(size - bufferLength)) {\n buffer = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_0__.toUint8Array)(stream['read']());\n }\n else {\n buffer = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_0__.toUint8Array)(stream['read'](size - bufferLength));\n // If the byteLength is 0, then the requested amount is more than the stream has\n // in its internal buffer. In this case the stream needs a \"kick\" to tell it to\n // continue emitting readable events, so request to read everything the stream\n // has in its internal buffer right now.\n if (buffer.byteLength < (size - bufferLength)) {\n buffer = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_0__.toUint8Array)(stream['read']());\n }\n }\n // if chunk is not null or empty, push it onto the queue\n if (buffer.byteLength > 0) {\n buffers.push(buffer);\n bufferLength += buffer.byteLength;\n }\n }\n // If we have enough bytes in our buffer, yield chunks until we don't\n if (done || size <= bufferLength) {\n do {\n ({ cmd, size } = yield yield (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__await)(byteRange()));\n } while (size < bufferLength);\n }\n } while (!done);\n }\n finally {\n yield (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__await)(cleanup(events, event === 'error' ? err : null));\n }\n return yield (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__await)(null);\n function cleanup(events, err) {\n buffer = buffers = null;\n return new Promise((resolve, reject) => {\n for (const [evt, fn] of events) {\n stream['off'](evt, fn);\n }\n try {\n // Some stream implementations don't call the destroy callback,\n // because it's really a node-internal API. Just calling `destroy`\n // here should be enough to conform to the ReadableStream contract\n const destroy = stream['destroy'];\n destroy && destroy.call(stream, err);\n err = undefined;\n }\n catch (e) {\n err = e || err;\n }\n finally {\n err != null ? reject(err) : resolve();\n }\n });\n }\n });\n}\n\n//# sourceMappingURL=adapters.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/io/adapters.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/io/file.mjs": +/*!***********************************************!*\ + !*** ./node_modules/apache-arrow/io/file.mjs ***! + \***********************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AsyncRandomAccessFile: () => (/* binding */ AsyncRandomAccessFile),\n/* harmony export */ RandomAccessFile: () => (/* binding */ RandomAccessFile)\n/* harmony export */ });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ \"./node_modules/tslib/tslib.es6.mjs\");\n/* harmony import */ var _stream_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./stream.mjs */ \"./node_modules/apache-arrow/io/stream.mjs\");\n/* harmony import */ var _util_buffer_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/buffer.mjs */ \"./node_modules/apache-arrow/util/buffer.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n\n/** @ignore */\nclass RandomAccessFile extends _stream_mjs__WEBPACK_IMPORTED_MODULE_0__.ByteStream {\n constructor(buffer, byteLength) {\n super();\n this.position = 0;\n this.buffer = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_1__.toUint8Array)(buffer);\n this.size = typeof byteLength === 'undefined' ? this.buffer.byteLength : byteLength;\n }\n readInt32(position) {\n const { buffer, byteOffset } = this.readAt(position, 4);\n return new DataView(buffer, byteOffset).getInt32(0, true);\n }\n seek(position) {\n this.position = Math.min(position, this.size);\n return position < this.size;\n }\n read(nBytes) {\n const { buffer, size, position } = this;\n if (buffer && position < size) {\n if (typeof nBytes !== 'number') {\n nBytes = Number.POSITIVE_INFINITY;\n }\n this.position = Math.min(size, position + Math.min(size - position, nBytes));\n return buffer.subarray(position, this.position);\n }\n return null;\n }\n readAt(position, nBytes) {\n const buf = this.buffer;\n const end = Math.min(this.size, position + nBytes);\n return buf ? buf.subarray(position, end) : new Uint8Array(nBytes);\n }\n close() { this.buffer && (this.buffer = null); }\n throw(value) { this.close(); return { done: true, value }; }\n return(value) { this.close(); return { done: true, value }; }\n}\n/** @ignore */\nclass AsyncRandomAccessFile extends _stream_mjs__WEBPACK_IMPORTED_MODULE_0__.AsyncByteStream {\n constructor(file, byteLength) {\n super();\n this.position = 0;\n this._handle = file;\n if (typeof byteLength === 'number') {\n this.size = byteLength;\n }\n else {\n this._pending = (() => (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__awaiter)(this, void 0, void 0, function* () {\n this.size = (yield file.stat()).size;\n delete this._pending;\n }))();\n }\n }\n readInt32(position) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__awaiter)(this, void 0, void 0, function* () {\n const { buffer, byteOffset } = yield this.readAt(position, 4);\n return new DataView(buffer, byteOffset).getInt32(0, true);\n });\n }\n seek(position) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__awaiter)(this, void 0, void 0, function* () {\n this._pending && (yield this._pending);\n this.position = Math.min(position, this.size);\n return position < this.size;\n });\n }\n read(nBytes) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__awaiter)(this, void 0, void 0, function* () {\n this._pending && (yield this._pending);\n const { _handle: file, size, position } = this;\n if (file && position < size) {\n if (typeof nBytes !== 'number') {\n nBytes = Number.POSITIVE_INFINITY;\n }\n let pos = position, offset = 0, bytesRead = 0;\n const end = Math.min(size, pos + Math.min(size - pos, nBytes));\n const buffer = new Uint8Array(Math.max(0, (this.position = end) - pos));\n while ((pos += bytesRead) < end && (offset += bytesRead) < buffer.byteLength) {\n ({ bytesRead } = yield file.read(buffer, offset, buffer.byteLength - offset, pos));\n }\n return buffer;\n }\n return null;\n });\n }\n readAt(position, nBytes) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__awaiter)(this, void 0, void 0, function* () {\n this._pending && (yield this._pending);\n const { _handle: file, size } = this;\n if (file && (position + nBytes) < size) {\n const end = Math.min(size, position + nBytes);\n const buffer = new Uint8Array(end - position);\n return (yield file.read(buffer, 0, nBytes, position)).buffer;\n }\n return new Uint8Array(nBytes);\n });\n }\n close() {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__awaiter)(this, void 0, void 0, function* () { const f = this._handle; this._handle = null; f && (yield f.close()); });\n }\n throw(value) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__awaiter)(this, void 0, void 0, function* () { yield this.close(); return { done: true, value }; });\n }\n return(value) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__awaiter)(this, void 0, void 0, function* () { yield this.close(); return { done: true, value }; });\n }\n}\n\n//# sourceMappingURL=file.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/io/file.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/io/interfaces.mjs": +/*!*****************************************************!*\ + !*** ./node_modules/apache-arrow/io/interfaces.mjs ***! + \*****************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ArrowJSON: () => (/* binding */ ArrowJSON),\n/* harmony export */ AsyncQueue: () => (/* binding */ AsyncQueue),\n/* harmony export */ ITERATOR_DONE: () => (/* binding */ ITERATOR_DONE),\n/* harmony export */ ReadableInterop: () => (/* binding */ ReadableInterop)\n/* harmony export */ });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ \"./node_modules/tslib/tslib.es6.mjs\");\n/* harmony import */ var _adapters_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./adapters.mjs */ \"./node_modules/apache-arrow/io/adapters.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n/** @ignore */\nconst ITERATOR_DONE = Object.freeze({ done: true, value: void (0) });\n/** @ignore */\nclass ArrowJSON {\n constructor(_json) {\n this._json = _json;\n }\n get schema() { return this._json['schema']; }\n get batches() { return (this._json['batches'] || []); }\n get dictionaries() { return (this._json['dictionaries'] || []); }\n}\n/** @ignore */\nclass ReadableInterop {\n tee() {\n return this._getDOMStream().tee();\n }\n pipe(writable, options) {\n return this._getNodeStream().pipe(writable, options);\n }\n pipeTo(writable, options) { return this._getDOMStream().pipeTo(writable, options); }\n pipeThrough(duplex, options) {\n return this._getDOMStream().pipeThrough(duplex, options);\n }\n _getDOMStream() {\n return this._DOMStream || (this._DOMStream = this.toDOMStream());\n }\n _getNodeStream() {\n return this._nodeStream || (this._nodeStream = this.toNodeStream());\n }\n}\n/** @ignore */\nclass AsyncQueue extends ReadableInterop {\n constructor() {\n super();\n this._values = [];\n this.resolvers = [];\n this._closedPromise = new Promise((r) => this._closedPromiseResolve = r);\n }\n get closed() { return this._closedPromise; }\n cancel(reason) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function* () { yield this.return(reason); });\n }\n write(value) {\n if (this._ensureOpen()) {\n this.resolvers.length <= 0\n ? (this._values.push(value))\n : (this.resolvers.shift().resolve({ done: false, value }));\n }\n }\n abort(value) {\n if (this._closedPromiseResolve) {\n this.resolvers.length <= 0\n ? (this._error = { error: value })\n : (this.resolvers.shift().reject({ done: true, value }));\n }\n }\n close() {\n if (this._closedPromiseResolve) {\n const { resolvers } = this;\n while (resolvers.length > 0) {\n resolvers.shift().resolve(ITERATOR_DONE);\n }\n this._closedPromiseResolve();\n this._closedPromiseResolve = undefined;\n }\n }\n [Symbol.asyncIterator]() { return this; }\n toDOMStream(options) {\n return _adapters_mjs__WEBPACK_IMPORTED_MODULE_1__[\"default\"].toDOMStream((this._closedPromiseResolve || this._error)\n ? this\n : this._values, options);\n }\n toNodeStream(options) {\n return _adapters_mjs__WEBPACK_IMPORTED_MODULE_1__[\"default\"].toNodeStream((this._closedPromiseResolve || this._error)\n ? this\n : this._values, options);\n }\n throw(_) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function* () { yield this.abort(_); return ITERATOR_DONE; });\n }\n return(_) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function* () { yield this.close(); return ITERATOR_DONE; });\n }\n read(size) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function* () { return (yield this.next(size, 'read')).value; });\n }\n peek(size) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function* () { return (yield this.next(size, 'peek')).value; });\n }\n next(..._args) {\n if (this._values.length > 0) {\n return Promise.resolve({ done: false, value: this._values.shift() });\n }\n else if (this._error) {\n return Promise.reject({ done: true, value: this._error.error });\n }\n else if (!this._closedPromiseResolve) {\n return Promise.resolve(ITERATOR_DONE);\n }\n else {\n return new Promise((resolve, reject) => {\n this.resolvers.push({ resolve, reject });\n });\n }\n }\n _ensureOpen() {\n if (this._closedPromiseResolve) {\n return true;\n }\n throw new Error(`AsyncQueue is closed`);\n }\n}\n\n//# sourceMappingURL=interfaces.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/io/interfaces.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/io/stream.mjs": +/*!*************************************************!*\ + !*** ./node_modules/apache-arrow/io/stream.mjs ***! + \*************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AsyncByteQueue: () => (/* binding */ AsyncByteQueue),\n/* harmony export */ AsyncByteStream: () => (/* binding */ AsyncByteStream),\n/* harmony export */ ByteStream: () => (/* binding */ ByteStream)\n/* harmony export */ });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ \"./node_modules/tslib/tslib.es6.mjs\");\n/* harmony import */ var _adapters_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./adapters.mjs */ \"./node_modules/apache-arrow/io/adapters.mjs\");\n/* harmony import */ var _util_utf8_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/utf8.mjs */ \"./node_modules/apache-arrow/util/utf8.mjs\");\n/* harmony import */ var _interfaces_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interfaces.mjs */ \"./node_modules/apache-arrow/io/interfaces.mjs\");\n/* harmony import */ var _util_buffer_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/buffer.mjs */ \"./node_modules/apache-arrow/util/buffer.mjs\");\n/* harmony import */ var _util_compat_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/compat.mjs */ \"./node_modules/apache-arrow/util/compat.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n\n\n\n\n/** @ignore */\nclass AsyncByteQueue extends _interfaces_mjs__WEBPACK_IMPORTED_MODULE_0__.AsyncQueue {\n write(value) {\n if ((value = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_1__.toUint8Array)(value)).byteLength > 0) {\n return super.write(value);\n }\n }\n toString(sync = false) {\n return sync\n ? (0,_util_utf8_mjs__WEBPACK_IMPORTED_MODULE_2__.decodeUtf8)(this.toUint8Array(true))\n : this.toUint8Array(false).then(_util_utf8_mjs__WEBPACK_IMPORTED_MODULE_2__.decodeUtf8);\n }\n toUint8Array(sync = false) {\n return sync ? (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_1__.joinUint8Arrays)(this._values)[0] : (() => (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__awaiter)(this, void 0, void 0, function* () {\n var e_1, _a;\n const buffers = [];\n let byteLength = 0;\n try {\n for (var _b = (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__asyncValues)(this), _c; _c = yield _b.next(), !_c.done;) {\n const chunk = _c.value;\n buffers.push(chunk);\n byteLength += chunk.byteLength;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_1__.joinUint8Arrays)(buffers, byteLength)[0];\n }))();\n }\n}\n/** @ignore */\nclass ByteStream {\n constructor(source) {\n if (source) {\n this.source = new ByteStreamSource(_adapters_mjs__WEBPACK_IMPORTED_MODULE_4__[\"default\"].fromIterable(source));\n }\n }\n [Symbol.iterator]() { return this; }\n next(value) { return this.source.next(value); }\n throw(value) { return this.source.throw(value); }\n return(value) { return this.source.return(value); }\n peek(size) { return this.source.peek(size); }\n read(size) { return this.source.read(size); }\n}\n/** @ignore */\nclass AsyncByteStream {\n constructor(source) {\n if (source instanceof AsyncByteStream) {\n this.source = source.source;\n }\n else if (source instanceof AsyncByteQueue) {\n this.source = new AsyncByteStreamSource(_adapters_mjs__WEBPACK_IMPORTED_MODULE_4__[\"default\"].fromAsyncIterable(source));\n }\n else if ((0,_util_compat_mjs__WEBPACK_IMPORTED_MODULE_5__.isReadableNodeStream)(source)) {\n this.source = new AsyncByteStreamSource(_adapters_mjs__WEBPACK_IMPORTED_MODULE_4__[\"default\"].fromNodeStream(source));\n }\n else if ((0,_util_compat_mjs__WEBPACK_IMPORTED_MODULE_5__.isReadableDOMStream)(source)) {\n this.source = new AsyncByteStreamSource(_adapters_mjs__WEBPACK_IMPORTED_MODULE_4__[\"default\"].fromDOMStream(source));\n }\n else if ((0,_util_compat_mjs__WEBPACK_IMPORTED_MODULE_5__.isFetchResponse)(source)) {\n this.source = new AsyncByteStreamSource(_adapters_mjs__WEBPACK_IMPORTED_MODULE_4__[\"default\"].fromDOMStream(source.body));\n }\n else if ((0,_util_compat_mjs__WEBPACK_IMPORTED_MODULE_5__.isIterable)(source)) {\n this.source = new AsyncByteStreamSource(_adapters_mjs__WEBPACK_IMPORTED_MODULE_4__[\"default\"].fromIterable(source));\n }\n else if ((0,_util_compat_mjs__WEBPACK_IMPORTED_MODULE_5__.isPromise)(source)) {\n this.source = new AsyncByteStreamSource(_adapters_mjs__WEBPACK_IMPORTED_MODULE_4__[\"default\"].fromAsyncIterable(source));\n }\n else if ((0,_util_compat_mjs__WEBPACK_IMPORTED_MODULE_5__.isAsyncIterable)(source)) {\n this.source = new AsyncByteStreamSource(_adapters_mjs__WEBPACK_IMPORTED_MODULE_4__[\"default\"].fromAsyncIterable(source));\n }\n }\n [Symbol.asyncIterator]() { return this; }\n next(value) { return this.source.next(value); }\n throw(value) { return this.source.throw(value); }\n return(value) { return this.source.return(value); }\n get closed() { return this.source.closed; }\n cancel(reason) { return this.source.cancel(reason); }\n peek(size) { return this.source.peek(size); }\n read(size) { return this.source.read(size); }\n}\n/** @ignore */\nclass ByteStreamSource {\n constructor(source) {\n this.source = source;\n }\n cancel(reason) { this.return(reason); }\n peek(size) { return this.next(size, 'peek').value; }\n read(size) { return this.next(size, 'read').value; }\n next(size, cmd = 'read') { return this.source.next({ cmd, size }); }\n throw(value) { return Object.create((this.source.throw && this.source.throw(value)) || _interfaces_mjs__WEBPACK_IMPORTED_MODULE_0__.ITERATOR_DONE); }\n return(value) { return Object.create((this.source.return && this.source.return(value)) || _interfaces_mjs__WEBPACK_IMPORTED_MODULE_0__.ITERATOR_DONE); }\n}\n/** @ignore */\nclass AsyncByteStreamSource {\n constructor(source) {\n this.source = source;\n this._closedPromise = new Promise((r) => this._closedPromiseResolve = r);\n }\n cancel(reason) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__awaiter)(this, void 0, void 0, function* () { yield this.return(reason); });\n }\n get closed() { return this._closedPromise; }\n read(size) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__awaiter)(this, void 0, void 0, function* () { return (yield this.next(size, 'read')).value; });\n }\n peek(size) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__awaiter)(this, void 0, void 0, function* () { return (yield this.next(size, 'peek')).value; });\n }\n next(size, cmd = 'read') {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__awaiter)(this, void 0, void 0, function* () { return (yield this.source.next({ cmd, size })); });\n }\n throw(value) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__awaiter)(this, void 0, void 0, function* () {\n const result = (this.source.throw && (yield this.source.throw(value))) || _interfaces_mjs__WEBPACK_IMPORTED_MODULE_0__.ITERATOR_DONE;\n this._closedPromiseResolve && this._closedPromiseResolve();\n this._closedPromiseResolve = undefined;\n return Object.create(result);\n });\n }\n return(value) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__awaiter)(this, void 0, void 0, function* () {\n const result = (this.source.return && (yield this.source.return(value))) || _interfaces_mjs__WEBPACK_IMPORTED_MODULE_0__.ITERATOR_DONE;\n this._closedPromiseResolve && this._closedPromiseResolve();\n this._closedPromiseResolve = undefined;\n return Object.create(result);\n });\n }\n}\n\n//# sourceMappingURL=stream.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/io/stream.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/ipc/message.mjs": +/*!***************************************************!*\ + !*** ./node_modules/apache-arrow/ipc/message.mjs ***! + \***************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AsyncMessageReader: () => (/* binding */ AsyncMessageReader),\n/* harmony export */ JSONMessageReader: () => (/* binding */ JSONMessageReader),\n/* harmony export */ MAGIC: () => (/* binding */ MAGIC),\n/* harmony export */ MAGIC_STR: () => (/* binding */ MAGIC_STR),\n/* harmony export */ MessageReader: () => (/* binding */ MessageReader),\n/* harmony export */ PADDING: () => (/* binding */ PADDING),\n/* harmony export */ checkForMagicArrowString: () => (/* binding */ checkForMagicArrowString),\n/* harmony export */ magicAndPadding: () => (/* binding */ magicAndPadding),\n/* harmony export */ magicLength: () => (/* binding */ magicLength),\n/* harmony export */ magicX2AndPadding: () => (/* binding */ magicX2AndPadding)\n/* harmony export */ });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! tslib */ \"./node_modules/tslib/tslib.es6.mjs\");\n/* harmony import */ var _enum_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../enum.mjs */ \"./node_modules/apache-arrow/enum.mjs\");\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n/* harmony import */ var _metadata_message_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./metadata/message.mjs */ \"./node_modules/apache-arrow/ipc/metadata/message.mjs\");\n/* harmony import */ var _util_compat_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../util/compat.mjs */ \"./node_modules/apache-arrow/util/compat.mjs\");\n/* harmony import */ var _io_file_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../io/file.mjs */ \"./node_modules/apache-arrow/io/file.mjs\");\n/* harmony import */ var _util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/buffer.mjs */ \"./node_modules/apache-arrow/util/buffer.mjs\");\n/* harmony import */ var _io_stream_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../io/stream.mjs */ \"./node_modules/apache-arrow/io/stream.mjs\");\n/* harmony import */ var _io_interfaces_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../io/interfaces.mjs */ \"./node_modules/apache-arrow/io/interfaces.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n\n\n\n\n\n\n\n/** @ignore */ const invalidMessageType = (type) => `Expected ${_enum_mjs__WEBPACK_IMPORTED_MODULE_1__.MessageHeader[type]} Message in stream, but was null or length 0.`;\n/** @ignore */ const nullMessage = (type) => `Header pointer of flatbuffer-encoded ${_enum_mjs__WEBPACK_IMPORTED_MODULE_1__.MessageHeader[type]} Message is null or length 0.`;\n/** @ignore */ const invalidMessageMetadata = (expected, actual) => `Expected to read ${expected} metadata bytes, but only read ${actual}.`;\n/** @ignore */ const invalidMessageBodyLength = (expected, actual) => `Expected to read ${expected} bytes for message body, but only read ${actual}.`;\n/** @ignore */\nclass MessageReader {\n constructor(source) {\n this.source = source instanceof _io_stream_mjs__WEBPACK_IMPORTED_MODULE_2__.ByteStream ? source : new _io_stream_mjs__WEBPACK_IMPORTED_MODULE_2__.ByteStream(source);\n }\n [Symbol.iterator]() { return this; }\n next() {\n let r;\n if ((r = this.readMetadataLength()).done) {\n return _io_interfaces_mjs__WEBPACK_IMPORTED_MODULE_3__.ITERATOR_DONE;\n }\n // ARROW-6313: If the first 4 bytes are continuation indicator (-1), read\n // the next 4 for the 32-bit metadata length. Otherwise, assume this is a\n // pre-v0.15 message, where the first 4 bytes are the metadata length.\n if ((r.value === -1) &&\n (r = this.readMetadataLength()).done) {\n return _io_interfaces_mjs__WEBPACK_IMPORTED_MODULE_3__.ITERATOR_DONE;\n }\n if ((r = this.readMetadata(r.value)).done) {\n return _io_interfaces_mjs__WEBPACK_IMPORTED_MODULE_3__.ITERATOR_DONE;\n }\n return r;\n }\n throw(value) { return this.source.throw(value); }\n return(value) { return this.source.return(value); }\n readMessage(type) {\n let r;\n if ((r = this.next()).done) {\n return null;\n }\n if ((type != null) && r.value.headerType !== type) {\n throw new Error(invalidMessageType(type));\n }\n return r.value;\n }\n readMessageBody(bodyLength) {\n if (bodyLength <= 0) {\n return new Uint8Array(0);\n }\n const buf = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__.toUint8Array)(this.source.read(bodyLength));\n if (buf.byteLength < bodyLength) {\n throw new Error(invalidMessageBodyLength(bodyLength, buf.byteLength));\n }\n // 1. Work around bugs in fs.ReadStream's internal Buffer pooling, see: https://github.com/nodejs/node/issues/24817\n // 2. Work around https://github.com/whatwg/streams/blob/0ebe4b042e467d9876d80ae045de3843092ad797/reference-implementation/lib/helpers.js#L126\n return /* 1. */ (buf.byteOffset % 8 === 0) &&\n /* 2. */ (buf.byteOffset + buf.byteLength) <= buf.buffer.byteLength ? buf : buf.slice();\n }\n readSchema(throwIfNull = false) {\n const type = _enum_mjs__WEBPACK_IMPORTED_MODULE_1__.MessageHeader.Schema;\n const message = this.readMessage(type);\n const schema = message === null || message === void 0 ? void 0 : message.header();\n if (throwIfNull && !schema) {\n throw new Error(nullMessage(type));\n }\n return schema;\n }\n readMetadataLength() {\n const buf = this.source.read(PADDING);\n const bb = buf && new flatbuffers__WEBPACK_IMPORTED_MODULE_0__.ByteBuffer(buf);\n const len = (bb === null || bb === void 0 ? void 0 : bb.readInt32(0)) || 0;\n return { done: len === 0, value: len };\n }\n readMetadata(metadataLength) {\n const buf = this.source.read(metadataLength);\n if (!buf) {\n return _io_interfaces_mjs__WEBPACK_IMPORTED_MODULE_3__.ITERATOR_DONE;\n }\n if (buf.byteLength < metadataLength) {\n throw new Error(invalidMessageMetadata(metadataLength, buf.byteLength));\n }\n return { done: false, value: _metadata_message_mjs__WEBPACK_IMPORTED_MODULE_5__.Message.decode(buf) };\n }\n}\n/** @ignore */\nclass AsyncMessageReader {\n constructor(source, byteLength) {\n this.source = source instanceof _io_stream_mjs__WEBPACK_IMPORTED_MODULE_2__.AsyncByteStream ? source\n : (0,_util_compat_mjs__WEBPACK_IMPORTED_MODULE_6__.isFileHandle)(source)\n ? new _io_file_mjs__WEBPACK_IMPORTED_MODULE_7__.AsyncRandomAccessFile(source, byteLength)\n : new _io_stream_mjs__WEBPACK_IMPORTED_MODULE_2__.AsyncByteStream(source);\n }\n [Symbol.asyncIterator]() { return this; }\n next() {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_8__.__awaiter)(this, void 0, void 0, function* () {\n let r;\n if ((r = yield this.readMetadataLength()).done) {\n return _io_interfaces_mjs__WEBPACK_IMPORTED_MODULE_3__.ITERATOR_DONE;\n }\n // ARROW-6313: If the first 4 bytes are continuation indicator (-1), read\n // the next 4 for the 32-bit metadata length. Otherwise, assume this is a\n // pre-v0.15 message, where the first 4 bytes are the metadata length.\n if ((r.value === -1) &&\n (r = yield this.readMetadataLength()).done) {\n return _io_interfaces_mjs__WEBPACK_IMPORTED_MODULE_3__.ITERATOR_DONE;\n }\n if ((r = yield this.readMetadata(r.value)).done) {\n return _io_interfaces_mjs__WEBPACK_IMPORTED_MODULE_3__.ITERATOR_DONE;\n }\n return r;\n });\n }\n throw(value) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_8__.__awaiter)(this, void 0, void 0, function* () { return yield this.source.throw(value); });\n }\n return(value) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_8__.__awaiter)(this, void 0, void 0, function* () { return yield this.source.return(value); });\n }\n readMessage(type) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_8__.__awaiter)(this, void 0, void 0, function* () {\n let r;\n if ((r = yield this.next()).done) {\n return null;\n }\n if ((type != null) && r.value.headerType !== type) {\n throw new Error(invalidMessageType(type));\n }\n return r.value;\n });\n }\n readMessageBody(bodyLength) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_8__.__awaiter)(this, void 0, void 0, function* () {\n if (bodyLength <= 0) {\n return new Uint8Array(0);\n }\n const buf = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_4__.toUint8Array)(yield this.source.read(bodyLength));\n if (buf.byteLength < bodyLength) {\n throw new Error(invalidMessageBodyLength(bodyLength, buf.byteLength));\n }\n // 1. Work around bugs in fs.ReadStream's internal Buffer pooling, see: https://github.com/nodejs/node/issues/24817\n // 2. Work around https://github.com/whatwg/streams/blob/0ebe4b042e467d9876d80ae045de3843092ad797/reference-implementation/lib/helpers.js#L126\n return /* 1. */ (buf.byteOffset % 8 === 0) &&\n /* 2. */ (buf.byteOffset + buf.byteLength) <= buf.buffer.byteLength ? buf : buf.slice();\n });\n }\n readSchema(throwIfNull = false) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_8__.__awaiter)(this, void 0, void 0, function* () {\n const type = _enum_mjs__WEBPACK_IMPORTED_MODULE_1__.MessageHeader.Schema;\n const message = yield this.readMessage(type);\n const schema = message === null || message === void 0 ? void 0 : message.header();\n if (throwIfNull && !schema) {\n throw new Error(nullMessage(type));\n }\n return schema;\n });\n }\n readMetadataLength() {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_8__.__awaiter)(this, void 0, void 0, function* () {\n const buf = yield this.source.read(PADDING);\n const bb = buf && new flatbuffers__WEBPACK_IMPORTED_MODULE_0__.ByteBuffer(buf);\n const len = (bb === null || bb === void 0 ? void 0 : bb.readInt32(0)) || 0;\n return { done: len === 0, value: len };\n });\n }\n readMetadata(metadataLength) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_8__.__awaiter)(this, void 0, void 0, function* () {\n const buf = yield this.source.read(metadataLength);\n if (!buf) {\n return _io_interfaces_mjs__WEBPACK_IMPORTED_MODULE_3__.ITERATOR_DONE;\n }\n if (buf.byteLength < metadataLength) {\n throw new Error(invalidMessageMetadata(metadataLength, buf.byteLength));\n }\n return { done: false, value: _metadata_message_mjs__WEBPACK_IMPORTED_MODULE_5__.Message.decode(buf) };\n });\n }\n}\n/** @ignore */\nclass JSONMessageReader extends MessageReader {\n constructor(source) {\n super(new Uint8Array(0));\n this._schema = false;\n this._body = [];\n this._batchIndex = 0;\n this._dictionaryIndex = 0;\n this._json = source instanceof _io_interfaces_mjs__WEBPACK_IMPORTED_MODULE_3__.ArrowJSON ? source : new _io_interfaces_mjs__WEBPACK_IMPORTED_MODULE_3__.ArrowJSON(source);\n }\n next() {\n const { _json } = this;\n if (!this._schema) {\n this._schema = true;\n const message = _metadata_message_mjs__WEBPACK_IMPORTED_MODULE_5__.Message.fromJSON(_json.schema, _enum_mjs__WEBPACK_IMPORTED_MODULE_1__.MessageHeader.Schema);\n return { done: false, value: message };\n }\n if (this._dictionaryIndex < _json.dictionaries.length) {\n const batch = _json.dictionaries[this._dictionaryIndex++];\n this._body = batch['data']['columns'];\n const message = _metadata_message_mjs__WEBPACK_IMPORTED_MODULE_5__.Message.fromJSON(batch, _enum_mjs__WEBPACK_IMPORTED_MODULE_1__.MessageHeader.DictionaryBatch);\n return { done: false, value: message };\n }\n if (this._batchIndex < _json.batches.length) {\n const batch = _json.batches[this._batchIndex++];\n this._body = batch['columns'];\n const message = _metadata_message_mjs__WEBPACK_IMPORTED_MODULE_5__.Message.fromJSON(batch, _enum_mjs__WEBPACK_IMPORTED_MODULE_1__.MessageHeader.RecordBatch);\n return { done: false, value: message };\n }\n this._body = [];\n return _io_interfaces_mjs__WEBPACK_IMPORTED_MODULE_3__.ITERATOR_DONE;\n }\n readMessageBody(_bodyLength) {\n return flattenDataSources(this._body);\n function flattenDataSources(xs) {\n return (xs || []).reduce((buffers, column) => [\n ...buffers,\n ...(column['VALIDITY'] && [column['VALIDITY']] || []),\n ...(column['TYPE'] && [column['TYPE']] || []),\n ...(column['OFFSET'] && [column['OFFSET']] || []),\n ...(column['DATA'] && [column['DATA']] || []),\n ...flattenDataSources(column['children'])\n ], []);\n }\n }\n readMessage(type) {\n let r;\n if ((r = this.next()).done) {\n return null;\n }\n if ((type != null) && r.value.headerType !== type) {\n throw new Error(invalidMessageType(type));\n }\n return r.value;\n }\n readSchema() {\n const type = _enum_mjs__WEBPACK_IMPORTED_MODULE_1__.MessageHeader.Schema;\n const message = this.readMessage(type);\n const schema = message === null || message === void 0 ? void 0 : message.header();\n if (!message || !schema) {\n throw new Error(nullMessage(type));\n }\n return schema;\n }\n}\n/** @ignore */\nconst PADDING = 4;\n/** @ignore */\nconst MAGIC_STR = 'ARROW1';\n/** @ignore */\nconst MAGIC = new Uint8Array(MAGIC_STR.length);\nfor (let i = 0; i < MAGIC_STR.length; i += 1) {\n MAGIC[i] = MAGIC_STR.codePointAt(i);\n}\n/** @ignore */\nfunction checkForMagicArrowString(buffer, index = 0) {\n for (let i = -1, n = MAGIC.length; ++i < n;) {\n if (MAGIC[i] !== buffer[index + i]) {\n return false;\n }\n }\n return true;\n}\n/** @ignore */\nconst magicLength = MAGIC.length;\n/** @ignore */\nconst magicAndPadding = magicLength + PADDING;\n/** @ignore */\nconst magicX2AndPadding = magicLength * 2 + PADDING;\n\n//# sourceMappingURL=message.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/ipc/message.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/ipc/metadata/file.mjs": +/*!*********************************************************!*\ + !*** ./node_modules/apache-arrow/ipc/metadata/file.mjs ***! + \*********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ FileBlock: () => (/* binding */ FileBlock),\n/* harmony export */ Footer: () => (/* binding */ Footer_)\n/* harmony export */ });\n/* harmony import */ var _fb_block_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../fb/block.mjs */ \"./node_modules/apache-arrow/fb/block.mjs\");\n/* harmony import */ var _fb_footer_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../fb/footer.mjs */ \"./node_modules/apache-arrow/fb/footer.mjs\");\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n/* harmony import */ var _schema_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../schema.mjs */ \"./node_modules/apache-arrow/schema.mjs\");\n/* harmony import */ var _enum_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../enum.mjs */ \"./node_modules/apache-arrow/enum.mjs\");\n/* harmony import */ var _util_buffer_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/buffer.mjs */ \"./node_modules/apache-arrow/util/buffer.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n/* eslint-disable @typescript-eslint/naming-convention */\n\n\n\nvar Long = flatbuffers__WEBPACK_IMPORTED_MODULE_0__.Long;\nvar Builder = flatbuffers__WEBPACK_IMPORTED_MODULE_0__.Builder;\nvar ByteBuffer = flatbuffers__WEBPACK_IMPORTED_MODULE_0__.ByteBuffer;\n\n\n\n/** @ignore */\nclass Footer_ {\n constructor(schema, version = _enum_mjs__WEBPACK_IMPORTED_MODULE_1__.MetadataVersion.V4, recordBatches, dictionaryBatches) {\n this.schema = schema;\n this.version = version;\n recordBatches && (this._recordBatches = recordBatches);\n dictionaryBatches && (this._dictionaryBatches = dictionaryBatches);\n }\n /** @nocollapse */\n static decode(buf) {\n buf = new ByteBuffer((0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_2__.toUint8Array)(buf));\n const footer = _fb_footer_mjs__WEBPACK_IMPORTED_MODULE_3__.Footer.getRootAsFooter(buf);\n const schema = _schema_mjs__WEBPACK_IMPORTED_MODULE_4__.Schema.decode(footer.schema());\n return new OffHeapFooter(schema, footer);\n }\n /** @nocollapse */\n static encode(footer) {\n const b = new Builder();\n const schemaOffset = _schema_mjs__WEBPACK_IMPORTED_MODULE_4__.Schema.encode(b, footer.schema);\n _fb_footer_mjs__WEBPACK_IMPORTED_MODULE_3__.Footer.startRecordBatchesVector(b, footer.numRecordBatches);\n for (const rb of [...footer.recordBatches()].slice().reverse()) {\n FileBlock.encode(b, rb);\n }\n const recordBatchesOffset = b.endVector();\n _fb_footer_mjs__WEBPACK_IMPORTED_MODULE_3__.Footer.startDictionariesVector(b, footer.numDictionaries);\n for (const db of [...footer.dictionaryBatches()].slice().reverse()) {\n FileBlock.encode(b, db);\n }\n const dictionaryBatchesOffset = b.endVector();\n _fb_footer_mjs__WEBPACK_IMPORTED_MODULE_3__.Footer.startFooter(b);\n _fb_footer_mjs__WEBPACK_IMPORTED_MODULE_3__.Footer.addSchema(b, schemaOffset);\n _fb_footer_mjs__WEBPACK_IMPORTED_MODULE_3__.Footer.addVersion(b, _enum_mjs__WEBPACK_IMPORTED_MODULE_1__.MetadataVersion.V4);\n _fb_footer_mjs__WEBPACK_IMPORTED_MODULE_3__.Footer.addRecordBatches(b, recordBatchesOffset);\n _fb_footer_mjs__WEBPACK_IMPORTED_MODULE_3__.Footer.addDictionaries(b, dictionaryBatchesOffset);\n _fb_footer_mjs__WEBPACK_IMPORTED_MODULE_3__.Footer.finishFooterBuffer(b, _fb_footer_mjs__WEBPACK_IMPORTED_MODULE_3__.Footer.endFooter(b));\n return b.asUint8Array();\n }\n get numRecordBatches() { return this._recordBatches.length; }\n get numDictionaries() { return this._dictionaryBatches.length; }\n *recordBatches() {\n for (let block, i = -1, n = this.numRecordBatches; ++i < n;) {\n if (block = this.getRecordBatch(i)) {\n yield block;\n }\n }\n }\n *dictionaryBatches() {\n for (let block, i = -1, n = this.numDictionaries; ++i < n;) {\n if (block = this.getDictionaryBatch(i)) {\n yield block;\n }\n }\n }\n getRecordBatch(index) {\n return index >= 0\n && index < this.numRecordBatches\n && this._recordBatches[index] || null;\n }\n getDictionaryBatch(index) {\n return index >= 0\n && index < this.numDictionaries\n && this._dictionaryBatches[index] || null;\n }\n}\n\n/** @ignore */\nclass OffHeapFooter extends Footer_ {\n constructor(schema, _footer) {\n super(schema, _footer.version());\n this._footer = _footer;\n }\n get numRecordBatches() { return this._footer.recordBatchesLength(); }\n get numDictionaries() { return this._footer.dictionariesLength(); }\n getRecordBatch(index) {\n if (index >= 0 && index < this.numRecordBatches) {\n const fileBlock = this._footer.recordBatches(index);\n if (fileBlock) {\n return FileBlock.decode(fileBlock);\n }\n }\n return null;\n }\n getDictionaryBatch(index) {\n if (index >= 0 && index < this.numDictionaries) {\n const fileBlock = this._footer.dictionaries(index);\n if (fileBlock) {\n return FileBlock.decode(fileBlock);\n }\n }\n return null;\n }\n}\n/** @ignore */\nclass FileBlock {\n constructor(metaDataLength, bodyLength, offset) {\n this.metaDataLength = metaDataLength;\n this.offset = typeof offset === 'number' ? offset : offset.low;\n this.bodyLength = typeof bodyLength === 'number' ? bodyLength : bodyLength.low;\n }\n /** @nocollapse */\n static decode(block) {\n return new FileBlock(block.metaDataLength(), block.bodyLength(), block.offset());\n }\n /** @nocollapse */\n static encode(b, fileBlock) {\n const { metaDataLength } = fileBlock;\n const offset = new Long(fileBlock.offset, 0);\n const bodyLength = new Long(fileBlock.bodyLength, 0);\n return _fb_block_mjs__WEBPACK_IMPORTED_MODULE_5__.Block.createBlock(b, offset, metaDataLength, bodyLength);\n }\n}\n\n//# sourceMappingURL=file.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/ipc/metadata/file.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/ipc/metadata/json.mjs": +/*!*********************************************************!*\ + !*** ./node_modules/apache-arrow/ipc/metadata/json.mjs ***! + \*********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ dictionaryBatchFromJSON: () => (/* binding */ dictionaryBatchFromJSON),\n/* harmony export */ fieldFromJSON: () => (/* binding */ fieldFromJSON),\n/* harmony export */ recordBatchFromJSON: () => (/* binding */ recordBatchFromJSON),\n/* harmony export */ schemaFromJSON: () => (/* binding */ schemaFromJSON)\n/* harmony export */ });\n/* harmony import */ var _schema_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../schema.mjs */ \"./node_modules/apache-arrow/schema.mjs\");\n/* harmony import */ var _type_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../type.mjs */ \"./node_modules/apache-arrow/type.mjs\");\n/* harmony import */ var _message_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./message.mjs */ \"./node_modules/apache-arrow/ipc/metadata/message.mjs\");\n/* harmony import */ var _enum_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../enum.mjs */ \"./node_modules/apache-arrow/enum.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n/* eslint-disable brace-style */\n\n\n\n\n/** @ignore */\nfunction schemaFromJSON(_schema, dictionaries = new Map()) {\n return new _schema_mjs__WEBPACK_IMPORTED_MODULE_0__.Schema(schemaFieldsFromJSON(_schema, dictionaries), customMetadataFromJSON(_schema['customMetadata']), dictionaries);\n}\n/** @ignore */\nfunction recordBatchFromJSON(b) {\n return new _message_mjs__WEBPACK_IMPORTED_MODULE_1__.RecordBatch(b['count'], fieldNodesFromJSON(b['columns']), buffersFromJSON(b['columns']));\n}\n/** @ignore */\nfunction dictionaryBatchFromJSON(b) {\n return new _message_mjs__WEBPACK_IMPORTED_MODULE_1__.DictionaryBatch(recordBatchFromJSON(b['data']), b['id'], b['isDelta']);\n}\n/** @ignore */\nfunction schemaFieldsFromJSON(_schema, dictionaries) {\n return (_schema['fields'] || []).filter(Boolean).map((f) => _schema_mjs__WEBPACK_IMPORTED_MODULE_0__.Field.fromJSON(f, dictionaries));\n}\n/** @ignore */\nfunction fieldChildrenFromJSON(_field, dictionaries) {\n return (_field['children'] || []).filter(Boolean).map((f) => _schema_mjs__WEBPACK_IMPORTED_MODULE_0__.Field.fromJSON(f, dictionaries));\n}\n/** @ignore */\nfunction fieldNodesFromJSON(xs) {\n return (xs || []).reduce((fieldNodes, column) => [\n ...fieldNodes,\n new _message_mjs__WEBPACK_IMPORTED_MODULE_1__.FieldNode(column['count'], nullCountFromJSON(column['VALIDITY'])),\n ...fieldNodesFromJSON(column['children'])\n ], []);\n}\n/** @ignore */\nfunction buffersFromJSON(xs, buffers = []) {\n for (let i = -1, n = (xs || []).length; ++i < n;) {\n const column = xs[i];\n column['VALIDITY'] && buffers.push(new _message_mjs__WEBPACK_IMPORTED_MODULE_1__.BufferRegion(buffers.length, column['VALIDITY'].length));\n column['TYPE'] && buffers.push(new _message_mjs__WEBPACK_IMPORTED_MODULE_1__.BufferRegion(buffers.length, column['TYPE'].length));\n column['OFFSET'] && buffers.push(new _message_mjs__WEBPACK_IMPORTED_MODULE_1__.BufferRegion(buffers.length, column['OFFSET'].length));\n column['DATA'] && buffers.push(new _message_mjs__WEBPACK_IMPORTED_MODULE_1__.BufferRegion(buffers.length, column['DATA'].length));\n buffers = buffersFromJSON(column['children'], buffers);\n }\n return buffers;\n}\n/** @ignore */\nfunction nullCountFromJSON(validity) {\n return (validity || []).reduce((sum, val) => sum + +(val === 0), 0);\n}\n/** @ignore */\nfunction fieldFromJSON(_field, dictionaries) {\n let id;\n let keys;\n let field;\n let dictMeta;\n let type;\n let dictType;\n // If no dictionary encoding\n if (!dictionaries || !(dictMeta = _field['dictionary'])) {\n type = typeFromJSON(_field, fieldChildrenFromJSON(_field, dictionaries));\n field = new _schema_mjs__WEBPACK_IMPORTED_MODULE_0__.Field(_field['name'], type, _field['nullable'], customMetadataFromJSON(_field['customMetadata']));\n }\n // If dictionary encoded and the first time we've seen this dictionary id, decode\n // the data type and child fields, then wrap in a Dictionary type and insert the\n // data type into the dictionary types map.\n else if (!dictionaries.has(id = dictMeta['id'])) {\n // a dictionary index defaults to signed 32 bit int if unspecified\n keys = (keys = dictMeta['indexType']) ? indexTypeFromJSON(keys) : new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Int32();\n dictionaries.set(id, type = typeFromJSON(_field, fieldChildrenFromJSON(_field, dictionaries)));\n dictType = new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Dictionary(type, keys, id, dictMeta['isOrdered']);\n field = new _schema_mjs__WEBPACK_IMPORTED_MODULE_0__.Field(_field['name'], dictType, _field['nullable'], customMetadataFromJSON(_field['customMetadata']));\n }\n // If dictionary encoded, and have already seen this dictionary Id in the schema, then reuse the\n // data type and wrap in a new Dictionary type and field.\n else {\n // a dictionary index defaults to signed 32 bit int if unspecified\n keys = (keys = dictMeta['indexType']) ? indexTypeFromJSON(keys) : new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Int32();\n dictType = new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Dictionary(dictionaries.get(id), keys, id, dictMeta['isOrdered']);\n field = new _schema_mjs__WEBPACK_IMPORTED_MODULE_0__.Field(_field['name'], dictType, _field['nullable'], customMetadataFromJSON(_field['customMetadata']));\n }\n return field || null;\n}\n/** @ignore */\nfunction customMetadataFromJSON(_metadata) {\n return new Map(Object.entries(_metadata || {}));\n}\n/** @ignore */\nfunction indexTypeFromJSON(_type) {\n return new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Int(_type['isSigned'], _type['bitWidth']);\n}\n/** @ignore */\nfunction typeFromJSON(f, children) {\n const typeId = f['type']['name'];\n switch (typeId) {\n case 'NONE': return new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Null();\n case 'null': return new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Null();\n case 'binary': return new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Binary();\n case 'utf8': return new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Utf8();\n case 'bool': return new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Bool();\n case 'list': return new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.List((children || [])[0]);\n case 'struct': return new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Struct(children || []);\n case 'struct_': return new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Struct(children || []);\n }\n switch (typeId) {\n case 'int': {\n const t = f['type'];\n return new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Int(t['isSigned'], t['bitWidth']);\n }\n case 'floatingpoint': {\n const t = f['type'];\n return new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Float(_enum_mjs__WEBPACK_IMPORTED_MODULE_3__.Precision[t['precision']]);\n }\n case 'decimal': {\n const t = f['type'];\n return new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Decimal(t['scale'], t['precision'], t['bitWidth']);\n }\n case 'date': {\n const t = f['type'];\n return new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Date_(_enum_mjs__WEBPACK_IMPORTED_MODULE_3__.DateUnit[t['unit']]);\n }\n case 'time': {\n const t = f['type'];\n return new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Time(_enum_mjs__WEBPACK_IMPORTED_MODULE_3__.TimeUnit[t['unit']], t['bitWidth']);\n }\n case 'timestamp': {\n const t = f['type'];\n return new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Timestamp(_enum_mjs__WEBPACK_IMPORTED_MODULE_3__.TimeUnit[t['unit']], t['timezone']);\n }\n case 'interval': {\n const t = f['type'];\n return new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Interval(_enum_mjs__WEBPACK_IMPORTED_MODULE_3__.IntervalUnit[t['unit']]);\n }\n case 'union': {\n const t = f['type'];\n return new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Union(_enum_mjs__WEBPACK_IMPORTED_MODULE_3__.UnionMode[t['mode']], (t['typeIds'] || []), children || []);\n }\n case 'fixedsizebinary': {\n const t = f['type'];\n return new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.FixedSizeBinary(t['byteWidth']);\n }\n case 'fixedsizelist': {\n const t = f['type'];\n return new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.FixedSizeList(t['listSize'], (children || [])[0]);\n }\n case 'map': {\n const t = f['type'];\n return new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Map_((children || [])[0], t['keysSorted']);\n }\n }\n throw new Error(`Unrecognized type: \"${typeId}\"`);\n}\n\n//# sourceMappingURL=json.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/ipc/metadata/json.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/ipc/metadata/message.mjs": +/*!************************************************************!*\ + !*** ./node_modules/apache-arrow/ipc/metadata/message.mjs ***! + \************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ BufferRegion: () => (/* binding */ BufferRegion),\n/* harmony export */ DictionaryBatch: () => (/* binding */ DictionaryBatch),\n/* harmony export */ FieldNode: () => (/* binding */ FieldNode),\n/* harmony export */ Message: () => (/* binding */ Message),\n/* harmony export */ RecordBatch: () => (/* binding */ RecordBatch)\n/* harmony export */ });\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n/* harmony import */ var _fb_schema_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../fb/schema.mjs */ \"./node_modules/apache-arrow/fb/schema.mjs\");\n/* harmony import */ var _fb_int_mjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../fb/int.mjs */ \"./node_modules/apache-arrow/fb/int.mjs\");\n/* harmony import */ var _fb_record_batch_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../fb/record-batch.mjs */ \"./node_modules/apache-arrow/fb/record-batch.mjs\");\n/* harmony import */ var _fb_dictionary_batch_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../fb/dictionary-batch.mjs */ \"./node_modules/apache-arrow/fb/dictionary-batch.mjs\");\n/* harmony import */ var _fb_buffer_mjs__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../../fb/buffer.mjs */ \"./node_modules/apache-arrow/fb/buffer.mjs\");\n/* harmony import */ var _fb_field_mjs__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../fb/field.mjs */ \"./node_modules/apache-arrow/fb/field.mjs\");\n/* harmony import */ var _fb_field_node_mjs__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../../fb/field-node.mjs */ \"./node_modules/apache-arrow/fb/field-node.mjs\");\n/* harmony import */ var _fb_type_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../fb/type.mjs */ \"./node_modules/apache-arrow/fb/type.mjs\");\n/* harmony import */ var _fb_key_value_mjs__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../fb/key-value.mjs */ \"./node_modules/apache-arrow/fb/key-value.mjs\");\n/* harmony import */ var _fb_endianness_mjs__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../fb/endianness.mjs */ \"./node_modules/apache-arrow/fb/endianness.mjs\");\n/* harmony import */ var _fb_floating_point_mjs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../fb/floating-point.mjs */ \"./node_modules/apache-arrow/fb/floating-point.mjs\");\n/* harmony import */ var _fb_decimal_mjs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../fb/decimal.mjs */ \"./node_modules/apache-arrow/fb/decimal.mjs\");\n/* harmony import */ var _fb_date_mjs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../fb/date.mjs */ \"./node_modules/apache-arrow/fb/date.mjs\");\n/* harmony import */ var _fb_time_mjs__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../fb/time.mjs */ \"./node_modules/apache-arrow/fb/time.mjs\");\n/* harmony import */ var _fb_timestamp_mjs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../fb/timestamp.mjs */ \"./node_modules/apache-arrow/fb/timestamp.mjs\");\n/* harmony import */ var _fb_interval_mjs__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../fb/interval.mjs */ \"./node_modules/apache-arrow/fb/interval.mjs\");\n/* harmony import */ var _fb_union_mjs__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../fb/union.mjs */ \"./node_modules/apache-arrow/fb/union.mjs\");\n/* harmony import */ var _fb_fixed_size_binary_mjs__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../fb/fixed-size-binary.mjs */ \"./node_modules/apache-arrow/fb/fixed-size-binary.mjs\");\n/* harmony import */ var _fb_fixed_size_list_mjs__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../fb/fixed-size-list.mjs */ \"./node_modules/apache-arrow/fb/fixed-size-list.mjs\");\n/* harmony import */ var _fb_map_mjs__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../fb/map.mjs */ \"./node_modules/apache-arrow/fb/map.mjs\");\n/* harmony import */ var _fb_message_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../fb/message.mjs */ \"./node_modules/apache-arrow/fb/message.mjs\");\n/* harmony import */ var _schema_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../schema.mjs */ \"./node_modules/apache-arrow/schema.mjs\");\n/* harmony import */ var _util_buffer_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/buffer.mjs */ \"./node_modules/apache-arrow/util/buffer.mjs\");\n/* harmony import */ var _enum_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../enum.mjs */ \"./node_modules/apache-arrow/enum.mjs\");\n/* harmony import */ var _visitor_typeassembler_mjs__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../visitor/typeassembler.mjs */ \"./node_modules/apache-arrow/visitor/typeassembler.mjs\");\n/* harmony import */ var _json_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./json.mjs */ \"./node_modules/apache-arrow/ipc/metadata/json.mjs\");\n/* harmony import */ var _type_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../type.mjs */ \"./node_modules/apache-arrow/type.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n/* eslint-disable brace-style */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar Long = flatbuffers__WEBPACK_IMPORTED_MODULE_0__.Long;\nvar Builder = flatbuffers__WEBPACK_IMPORTED_MODULE_0__.Builder;\nvar ByteBuffer = flatbuffers__WEBPACK_IMPORTED_MODULE_0__.ByteBuffer;\n\n/**\n * @ignore\n * @private\n **/\nclass Message {\n constructor(bodyLength, version, headerType, header) {\n this._version = version;\n this._headerType = headerType;\n this.body = new Uint8Array(0);\n header && (this._createHeader = () => header);\n this._bodyLength = typeof bodyLength === 'number' ? bodyLength : bodyLength.low;\n }\n /** @nocollapse */\n static fromJSON(msg, headerType) {\n const message = new Message(0, _enum_mjs__WEBPACK_IMPORTED_MODULE_1__.MetadataVersion.V4, headerType);\n message._createHeader = messageHeaderFromJSON(msg, headerType);\n return message;\n }\n /** @nocollapse */\n static decode(buf) {\n buf = new ByteBuffer((0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_2__.toUint8Array)(buf));\n const _message = _fb_message_mjs__WEBPACK_IMPORTED_MODULE_3__.Message.getRootAsMessage(buf);\n const bodyLength = _message.bodyLength();\n const version = _message.version();\n const headerType = _message.headerType();\n const message = new Message(bodyLength, version, headerType);\n message._createHeader = decodeMessageHeader(_message, headerType);\n return message;\n }\n /** @nocollapse */\n static encode(message) {\n const b = new Builder();\n let headerOffset = -1;\n if (message.isSchema()) {\n headerOffset = _schema_mjs__WEBPACK_IMPORTED_MODULE_4__.Schema.encode(b, message.header());\n }\n else if (message.isRecordBatch()) {\n headerOffset = RecordBatch.encode(b, message.header());\n }\n else if (message.isDictionaryBatch()) {\n headerOffset = DictionaryBatch.encode(b, message.header());\n }\n _fb_message_mjs__WEBPACK_IMPORTED_MODULE_3__.Message.startMessage(b);\n _fb_message_mjs__WEBPACK_IMPORTED_MODULE_3__.Message.addVersion(b, _enum_mjs__WEBPACK_IMPORTED_MODULE_1__.MetadataVersion.V4);\n _fb_message_mjs__WEBPACK_IMPORTED_MODULE_3__.Message.addHeader(b, headerOffset);\n _fb_message_mjs__WEBPACK_IMPORTED_MODULE_3__.Message.addHeaderType(b, message.headerType);\n _fb_message_mjs__WEBPACK_IMPORTED_MODULE_3__.Message.addBodyLength(b, new Long(message.bodyLength, 0));\n _fb_message_mjs__WEBPACK_IMPORTED_MODULE_3__.Message.finishMessageBuffer(b, _fb_message_mjs__WEBPACK_IMPORTED_MODULE_3__.Message.endMessage(b));\n return b.asUint8Array();\n }\n /** @nocollapse */\n static from(header, bodyLength = 0) {\n if (header instanceof _schema_mjs__WEBPACK_IMPORTED_MODULE_4__.Schema) {\n return new Message(0, _enum_mjs__WEBPACK_IMPORTED_MODULE_1__.MetadataVersion.V4, _enum_mjs__WEBPACK_IMPORTED_MODULE_1__.MessageHeader.Schema, header);\n }\n if (header instanceof RecordBatch) {\n return new Message(bodyLength, _enum_mjs__WEBPACK_IMPORTED_MODULE_1__.MetadataVersion.V4, _enum_mjs__WEBPACK_IMPORTED_MODULE_1__.MessageHeader.RecordBatch, header);\n }\n if (header instanceof DictionaryBatch) {\n return new Message(bodyLength, _enum_mjs__WEBPACK_IMPORTED_MODULE_1__.MetadataVersion.V4, _enum_mjs__WEBPACK_IMPORTED_MODULE_1__.MessageHeader.DictionaryBatch, header);\n }\n throw new Error(`Unrecognized Message header: ${header}`);\n }\n get type() { return this.headerType; }\n get version() { return this._version; }\n get headerType() { return this._headerType; }\n get bodyLength() { return this._bodyLength; }\n header() { return this._createHeader(); }\n isSchema() { return this.headerType === _enum_mjs__WEBPACK_IMPORTED_MODULE_1__.MessageHeader.Schema; }\n isRecordBatch() { return this.headerType === _enum_mjs__WEBPACK_IMPORTED_MODULE_1__.MessageHeader.RecordBatch; }\n isDictionaryBatch() { return this.headerType === _enum_mjs__WEBPACK_IMPORTED_MODULE_1__.MessageHeader.DictionaryBatch; }\n}\n/**\n * @ignore\n * @private\n **/\nclass RecordBatch {\n constructor(length, nodes, buffers) {\n this._nodes = nodes;\n this._buffers = buffers;\n this._length = typeof length === 'number' ? length : length.low;\n }\n get nodes() { return this._nodes; }\n get length() { return this._length; }\n get buffers() { return this._buffers; }\n}\n/**\n * @ignore\n * @private\n **/\nclass DictionaryBatch {\n constructor(data, id, isDelta = false) {\n this._data = data;\n this._isDelta = isDelta;\n this._id = typeof id === 'number' ? id : id.low;\n }\n get id() { return this._id; }\n get data() { return this._data; }\n get isDelta() { return this._isDelta; }\n get length() { return this.data.length; }\n get nodes() { return this.data.nodes; }\n get buffers() { return this.data.buffers; }\n}\n/**\n * @ignore\n * @private\n **/\nclass BufferRegion {\n constructor(offset, length) {\n this.offset = typeof offset === 'number' ? offset : offset.low;\n this.length = typeof length === 'number' ? length : length.low;\n }\n}\n/**\n * @ignore\n * @private\n **/\nclass FieldNode {\n constructor(length, nullCount) {\n this.length = typeof length === 'number' ? length : length.low;\n this.nullCount = typeof nullCount === 'number' ? nullCount : nullCount.low;\n }\n}\n/** @ignore */\nfunction messageHeaderFromJSON(message, type) {\n return (() => {\n switch (type) {\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_1__.MessageHeader.Schema: return _schema_mjs__WEBPACK_IMPORTED_MODULE_4__.Schema.fromJSON(message);\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_1__.MessageHeader.RecordBatch: return RecordBatch.fromJSON(message);\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_1__.MessageHeader.DictionaryBatch: return DictionaryBatch.fromJSON(message);\n }\n throw new Error(`Unrecognized Message type: { name: ${_enum_mjs__WEBPACK_IMPORTED_MODULE_1__.MessageHeader[type]}, type: ${type} }`);\n });\n}\n/** @ignore */\nfunction decodeMessageHeader(message, type) {\n return (() => {\n switch (type) {\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_1__.MessageHeader.Schema: return _schema_mjs__WEBPACK_IMPORTED_MODULE_4__.Schema.decode(message.header(new _fb_schema_mjs__WEBPACK_IMPORTED_MODULE_5__.Schema()));\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_1__.MessageHeader.RecordBatch: return RecordBatch.decode(message.header(new _fb_record_batch_mjs__WEBPACK_IMPORTED_MODULE_6__.RecordBatch()), message.version());\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_1__.MessageHeader.DictionaryBatch: return DictionaryBatch.decode(message.header(new _fb_dictionary_batch_mjs__WEBPACK_IMPORTED_MODULE_7__.DictionaryBatch()), message.version());\n }\n throw new Error(`Unrecognized Message type: { name: ${_enum_mjs__WEBPACK_IMPORTED_MODULE_1__.MessageHeader[type]}, type: ${type} }`);\n });\n}\n_schema_mjs__WEBPACK_IMPORTED_MODULE_4__.Field['encode'] = encodeField;\n_schema_mjs__WEBPACK_IMPORTED_MODULE_4__.Field['decode'] = decodeField;\n_schema_mjs__WEBPACK_IMPORTED_MODULE_4__.Field['fromJSON'] = _json_mjs__WEBPACK_IMPORTED_MODULE_8__.fieldFromJSON;\n_schema_mjs__WEBPACK_IMPORTED_MODULE_4__.Schema['encode'] = encodeSchema;\n_schema_mjs__WEBPACK_IMPORTED_MODULE_4__.Schema['decode'] = decodeSchema;\n_schema_mjs__WEBPACK_IMPORTED_MODULE_4__.Schema['fromJSON'] = _json_mjs__WEBPACK_IMPORTED_MODULE_8__.schemaFromJSON;\nRecordBatch['encode'] = encodeRecordBatch;\nRecordBatch['decode'] = decodeRecordBatch;\nRecordBatch['fromJSON'] = _json_mjs__WEBPACK_IMPORTED_MODULE_8__.recordBatchFromJSON;\nDictionaryBatch['encode'] = encodeDictionaryBatch;\nDictionaryBatch['decode'] = decodeDictionaryBatch;\nDictionaryBatch['fromJSON'] = _json_mjs__WEBPACK_IMPORTED_MODULE_8__.dictionaryBatchFromJSON;\nFieldNode['encode'] = encodeFieldNode;\nFieldNode['decode'] = decodeFieldNode;\nBufferRegion['encode'] = encodeBufferRegion;\nBufferRegion['decode'] = decodeBufferRegion;\n/** @ignore */\nfunction decodeSchema(_schema, dictionaries = new Map()) {\n const fields = decodeSchemaFields(_schema, dictionaries);\n return new _schema_mjs__WEBPACK_IMPORTED_MODULE_4__.Schema(fields, decodeCustomMetadata(_schema), dictionaries);\n}\n/** @ignore */\nfunction decodeRecordBatch(batch, version = _enum_mjs__WEBPACK_IMPORTED_MODULE_1__.MetadataVersion.V4) {\n if (batch.compression() !== null) {\n throw new Error('Record batch compression not implemented');\n }\n return new RecordBatch(batch.length(), decodeFieldNodes(batch), decodeBuffers(batch, version));\n}\n/** @ignore */\nfunction decodeDictionaryBatch(batch, version = _enum_mjs__WEBPACK_IMPORTED_MODULE_1__.MetadataVersion.V4) {\n return new DictionaryBatch(RecordBatch.decode(batch.data(), version), batch.id(), batch.isDelta());\n}\n/** @ignore */\nfunction decodeBufferRegion(b) {\n return new BufferRegion(b.offset(), b.length());\n}\n/** @ignore */\nfunction decodeFieldNode(f) {\n return new FieldNode(f.length(), f.nullCount());\n}\n/** @ignore */\nfunction decodeFieldNodes(batch) {\n const nodes = [];\n for (let f, i = -1, j = -1, n = batch.nodesLength(); ++i < n;) {\n if (f = batch.nodes(i)) {\n nodes[++j] = FieldNode.decode(f);\n }\n }\n return nodes;\n}\n/** @ignore */\nfunction decodeBuffers(batch, version) {\n const bufferRegions = [];\n for (let b, i = -1, j = -1, n = batch.buffersLength(); ++i < n;) {\n if (b = batch.buffers(i)) {\n // If this Arrow buffer was written before version 4,\n // advance the buffer's bb_pos 8 bytes to skip past\n // the now-removed page_id field\n if (version < _enum_mjs__WEBPACK_IMPORTED_MODULE_1__.MetadataVersion.V4) {\n b.bb_pos += (8 * (i + 1));\n }\n bufferRegions[++j] = BufferRegion.decode(b);\n }\n }\n return bufferRegions;\n}\n/** @ignore */\nfunction decodeSchemaFields(schema, dictionaries) {\n const fields = [];\n for (let f, i = -1, j = -1, n = schema.fieldsLength(); ++i < n;) {\n if (f = schema.fields(i)) {\n fields[++j] = _schema_mjs__WEBPACK_IMPORTED_MODULE_4__.Field.decode(f, dictionaries);\n }\n }\n return fields;\n}\n/** @ignore */\nfunction decodeFieldChildren(field, dictionaries) {\n const children = [];\n for (let f, i = -1, j = -1, n = field.childrenLength(); ++i < n;) {\n if (f = field.children(i)) {\n children[++j] = _schema_mjs__WEBPACK_IMPORTED_MODULE_4__.Field.decode(f, dictionaries);\n }\n }\n return children;\n}\n/** @ignore */\nfunction decodeField(f, dictionaries) {\n let id;\n let field;\n let type;\n let keys;\n let dictType;\n let dictMeta;\n // If no dictionary encoding\n if (!dictionaries || !(dictMeta = f.dictionary())) {\n type = decodeFieldType(f, decodeFieldChildren(f, dictionaries));\n field = new _schema_mjs__WEBPACK_IMPORTED_MODULE_4__.Field(f.name(), type, f.nullable(), decodeCustomMetadata(f));\n }\n // If dictionary encoded and the first time we've seen this dictionary id, decode\n // the data type and child fields, then wrap in a Dictionary type and insert the\n // data type into the dictionary types map.\n else if (!dictionaries.has(id = dictMeta.id().low)) {\n // a dictionary index defaults to signed 32 bit int if unspecified\n keys = (keys = dictMeta.indexType()) ? decodeIndexType(keys) : new _type_mjs__WEBPACK_IMPORTED_MODULE_9__.Int32();\n dictionaries.set(id, type = decodeFieldType(f, decodeFieldChildren(f, dictionaries)));\n dictType = new _type_mjs__WEBPACK_IMPORTED_MODULE_9__.Dictionary(type, keys, id, dictMeta.isOrdered());\n field = new _schema_mjs__WEBPACK_IMPORTED_MODULE_4__.Field(f.name(), dictType, f.nullable(), decodeCustomMetadata(f));\n }\n // If dictionary encoded, and have already seen this dictionary Id in the schema, then reuse the\n // data type and wrap in a new Dictionary type and field.\n else {\n // a dictionary index defaults to signed 32 bit int if unspecified\n keys = (keys = dictMeta.indexType()) ? decodeIndexType(keys) : new _type_mjs__WEBPACK_IMPORTED_MODULE_9__.Int32();\n dictType = new _type_mjs__WEBPACK_IMPORTED_MODULE_9__.Dictionary(dictionaries.get(id), keys, id, dictMeta.isOrdered());\n field = new _schema_mjs__WEBPACK_IMPORTED_MODULE_4__.Field(f.name(), dictType, f.nullable(), decodeCustomMetadata(f));\n }\n return field || null;\n}\n/** @ignore */\nfunction decodeCustomMetadata(parent) {\n const data = new Map();\n if (parent) {\n for (let entry, key, i = -1, n = Math.trunc(parent.customMetadataLength()); ++i < n;) {\n if ((entry = parent.customMetadata(i)) && (key = entry.key()) != null) {\n data.set(key, entry.value());\n }\n }\n }\n return data;\n}\n/** @ignore */\nfunction decodeIndexType(_type) {\n return new _type_mjs__WEBPACK_IMPORTED_MODULE_9__.Int(_type.isSigned(), _type.bitWidth());\n}\n/** @ignore */\nfunction decodeFieldType(f, children) {\n const typeId = f.typeType();\n switch (typeId) {\n case _fb_type_mjs__WEBPACK_IMPORTED_MODULE_10__.Type['NONE']: return new _type_mjs__WEBPACK_IMPORTED_MODULE_9__.Null();\n case _fb_type_mjs__WEBPACK_IMPORTED_MODULE_10__.Type['Null']: return new _type_mjs__WEBPACK_IMPORTED_MODULE_9__.Null();\n case _fb_type_mjs__WEBPACK_IMPORTED_MODULE_10__.Type['Binary']: return new _type_mjs__WEBPACK_IMPORTED_MODULE_9__.Binary();\n case _fb_type_mjs__WEBPACK_IMPORTED_MODULE_10__.Type['Utf8']: return new _type_mjs__WEBPACK_IMPORTED_MODULE_9__.Utf8();\n case _fb_type_mjs__WEBPACK_IMPORTED_MODULE_10__.Type['Bool']: return new _type_mjs__WEBPACK_IMPORTED_MODULE_9__.Bool();\n case _fb_type_mjs__WEBPACK_IMPORTED_MODULE_10__.Type['List']: return new _type_mjs__WEBPACK_IMPORTED_MODULE_9__.List((children || [])[0]);\n case _fb_type_mjs__WEBPACK_IMPORTED_MODULE_10__.Type['Struct_']: return new _type_mjs__WEBPACK_IMPORTED_MODULE_9__.Struct(children || []);\n }\n switch (typeId) {\n case _fb_type_mjs__WEBPACK_IMPORTED_MODULE_10__.Type['Int']: {\n const t = f.type(new _fb_int_mjs__WEBPACK_IMPORTED_MODULE_11__.Int());\n return new _type_mjs__WEBPACK_IMPORTED_MODULE_9__.Int(t.isSigned(), t.bitWidth());\n }\n case _fb_type_mjs__WEBPACK_IMPORTED_MODULE_10__.Type['FloatingPoint']: {\n const t = f.type(new _fb_floating_point_mjs__WEBPACK_IMPORTED_MODULE_12__.FloatingPoint());\n return new _type_mjs__WEBPACK_IMPORTED_MODULE_9__.Float(t.precision());\n }\n case _fb_type_mjs__WEBPACK_IMPORTED_MODULE_10__.Type['Decimal']: {\n const t = f.type(new _fb_decimal_mjs__WEBPACK_IMPORTED_MODULE_13__.Decimal());\n return new _type_mjs__WEBPACK_IMPORTED_MODULE_9__.Decimal(t.scale(), t.precision(), t.bitWidth());\n }\n case _fb_type_mjs__WEBPACK_IMPORTED_MODULE_10__.Type['Date']: {\n const t = f.type(new _fb_date_mjs__WEBPACK_IMPORTED_MODULE_14__.Date());\n return new _type_mjs__WEBPACK_IMPORTED_MODULE_9__.Date_(t.unit());\n }\n case _fb_type_mjs__WEBPACK_IMPORTED_MODULE_10__.Type['Time']: {\n const t = f.type(new _fb_time_mjs__WEBPACK_IMPORTED_MODULE_15__.Time());\n return new _type_mjs__WEBPACK_IMPORTED_MODULE_9__.Time(t.unit(), t.bitWidth());\n }\n case _fb_type_mjs__WEBPACK_IMPORTED_MODULE_10__.Type['Timestamp']: {\n const t = f.type(new _fb_timestamp_mjs__WEBPACK_IMPORTED_MODULE_16__.Timestamp());\n return new _type_mjs__WEBPACK_IMPORTED_MODULE_9__.Timestamp(t.unit(), t.timezone());\n }\n case _fb_type_mjs__WEBPACK_IMPORTED_MODULE_10__.Type['Interval']: {\n const t = f.type(new _fb_interval_mjs__WEBPACK_IMPORTED_MODULE_17__.Interval());\n return new _type_mjs__WEBPACK_IMPORTED_MODULE_9__.Interval(t.unit());\n }\n case _fb_type_mjs__WEBPACK_IMPORTED_MODULE_10__.Type['Union']: {\n const t = f.type(new _fb_union_mjs__WEBPACK_IMPORTED_MODULE_18__.Union());\n return new _type_mjs__WEBPACK_IMPORTED_MODULE_9__.Union(t.mode(), t.typeIdsArray() || [], children || []);\n }\n case _fb_type_mjs__WEBPACK_IMPORTED_MODULE_10__.Type['FixedSizeBinary']: {\n const t = f.type(new _fb_fixed_size_binary_mjs__WEBPACK_IMPORTED_MODULE_19__.FixedSizeBinary());\n return new _type_mjs__WEBPACK_IMPORTED_MODULE_9__.FixedSizeBinary(t.byteWidth());\n }\n case _fb_type_mjs__WEBPACK_IMPORTED_MODULE_10__.Type['FixedSizeList']: {\n const t = f.type(new _fb_fixed_size_list_mjs__WEBPACK_IMPORTED_MODULE_20__.FixedSizeList());\n return new _type_mjs__WEBPACK_IMPORTED_MODULE_9__.FixedSizeList(t.listSize(), (children || [])[0]);\n }\n case _fb_type_mjs__WEBPACK_IMPORTED_MODULE_10__.Type['Map']: {\n const t = f.type(new _fb_map_mjs__WEBPACK_IMPORTED_MODULE_21__.Map());\n return new _type_mjs__WEBPACK_IMPORTED_MODULE_9__.Map_((children || [])[0], t.keysSorted());\n }\n }\n throw new Error(`Unrecognized type: \"${_fb_type_mjs__WEBPACK_IMPORTED_MODULE_10__.Type[typeId]}\" (${typeId})`);\n}\n/** @ignore */\nfunction encodeSchema(b, schema) {\n const fieldOffsets = schema.fields.map((f) => _schema_mjs__WEBPACK_IMPORTED_MODULE_4__.Field.encode(b, f));\n _fb_schema_mjs__WEBPACK_IMPORTED_MODULE_5__.Schema.startFieldsVector(b, fieldOffsets.length);\n const fieldsVectorOffset = _fb_schema_mjs__WEBPACK_IMPORTED_MODULE_5__.Schema.createFieldsVector(b, fieldOffsets);\n const metadataOffset = !(schema.metadata && schema.metadata.size > 0) ? -1 :\n _fb_schema_mjs__WEBPACK_IMPORTED_MODULE_5__.Schema.createCustomMetadataVector(b, [...schema.metadata].map(([k, v]) => {\n const key = b.createString(`${k}`);\n const val = b.createString(`${v}`);\n _fb_key_value_mjs__WEBPACK_IMPORTED_MODULE_22__.KeyValue.startKeyValue(b);\n _fb_key_value_mjs__WEBPACK_IMPORTED_MODULE_22__.KeyValue.addKey(b, key);\n _fb_key_value_mjs__WEBPACK_IMPORTED_MODULE_22__.KeyValue.addValue(b, val);\n return _fb_key_value_mjs__WEBPACK_IMPORTED_MODULE_22__.KeyValue.endKeyValue(b);\n }));\n _fb_schema_mjs__WEBPACK_IMPORTED_MODULE_5__.Schema.startSchema(b);\n _fb_schema_mjs__WEBPACK_IMPORTED_MODULE_5__.Schema.addFields(b, fieldsVectorOffset);\n _fb_schema_mjs__WEBPACK_IMPORTED_MODULE_5__.Schema.addEndianness(b, platformIsLittleEndian ? _fb_endianness_mjs__WEBPACK_IMPORTED_MODULE_23__.Endianness.Little : _fb_endianness_mjs__WEBPACK_IMPORTED_MODULE_23__.Endianness.Big);\n if (metadataOffset !== -1) {\n _fb_schema_mjs__WEBPACK_IMPORTED_MODULE_5__.Schema.addCustomMetadata(b, metadataOffset);\n }\n return _fb_schema_mjs__WEBPACK_IMPORTED_MODULE_5__.Schema.endSchema(b);\n}\n/** @ignore */\nfunction encodeField(b, field) {\n let nameOffset = -1;\n let typeOffset = -1;\n let dictionaryOffset = -1;\n const type = field.type;\n let typeId = field.typeId;\n if (!_type_mjs__WEBPACK_IMPORTED_MODULE_9__.DataType.isDictionary(type)) {\n typeOffset = _visitor_typeassembler_mjs__WEBPACK_IMPORTED_MODULE_24__.instance.visit(type, b);\n }\n else {\n typeId = type.dictionary.typeId;\n dictionaryOffset = _visitor_typeassembler_mjs__WEBPACK_IMPORTED_MODULE_24__.instance.visit(type, b);\n typeOffset = _visitor_typeassembler_mjs__WEBPACK_IMPORTED_MODULE_24__.instance.visit(type.dictionary, b);\n }\n const childOffsets = (type.children || []).map((f) => _schema_mjs__WEBPACK_IMPORTED_MODULE_4__.Field.encode(b, f));\n const childrenVectorOffset = _fb_field_mjs__WEBPACK_IMPORTED_MODULE_25__.Field.createChildrenVector(b, childOffsets);\n const metadataOffset = !(field.metadata && field.metadata.size > 0) ? -1 :\n _fb_field_mjs__WEBPACK_IMPORTED_MODULE_25__.Field.createCustomMetadataVector(b, [...field.metadata].map(([k, v]) => {\n const key = b.createString(`${k}`);\n const val = b.createString(`${v}`);\n _fb_key_value_mjs__WEBPACK_IMPORTED_MODULE_22__.KeyValue.startKeyValue(b);\n _fb_key_value_mjs__WEBPACK_IMPORTED_MODULE_22__.KeyValue.addKey(b, key);\n _fb_key_value_mjs__WEBPACK_IMPORTED_MODULE_22__.KeyValue.addValue(b, val);\n return _fb_key_value_mjs__WEBPACK_IMPORTED_MODULE_22__.KeyValue.endKeyValue(b);\n }));\n if (field.name) {\n nameOffset = b.createString(field.name);\n }\n _fb_field_mjs__WEBPACK_IMPORTED_MODULE_25__.Field.startField(b);\n _fb_field_mjs__WEBPACK_IMPORTED_MODULE_25__.Field.addType(b, typeOffset);\n _fb_field_mjs__WEBPACK_IMPORTED_MODULE_25__.Field.addTypeType(b, typeId);\n _fb_field_mjs__WEBPACK_IMPORTED_MODULE_25__.Field.addChildren(b, childrenVectorOffset);\n _fb_field_mjs__WEBPACK_IMPORTED_MODULE_25__.Field.addNullable(b, !!field.nullable);\n if (nameOffset !== -1) {\n _fb_field_mjs__WEBPACK_IMPORTED_MODULE_25__.Field.addName(b, nameOffset);\n }\n if (dictionaryOffset !== -1) {\n _fb_field_mjs__WEBPACK_IMPORTED_MODULE_25__.Field.addDictionary(b, dictionaryOffset);\n }\n if (metadataOffset !== -1) {\n _fb_field_mjs__WEBPACK_IMPORTED_MODULE_25__.Field.addCustomMetadata(b, metadataOffset);\n }\n return _fb_field_mjs__WEBPACK_IMPORTED_MODULE_25__.Field.endField(b);\n}\n/** @ignore */\nfunction encodeRecordBatch(b, recordBatch) {\n const nodes = recordBatch.nodes || [];\n const buffers = recordBatch.buffers || [];\n _fb_record_batch_mjs__WEBPACK_IMPORTED_MODULE_6__.RecordBatch.startNodesVector(b, nodes.length);\n for (const n of nodes.slice().reverse())\n FieldNode.encode(b, n);\n const nodesVectorOffset = b.endVector();\n _fb_record_batch_mjs__WEBPACK_IMPORTED_MODULE_6__.RecordBatch.startBuffersVector(b, buffers.length);\n for (const b_ of buffers.slice().reverse())\n BufferRegion.encode(b, b_);\n const buffersVectorOffset = b.endVector();\n _fb_record_batch_mjs__WEBPACK_IMPORTED_MODULE_6__.RecordBatch.startRecordBatch(b);\n _fb_record_batch_mjs__WEBPACK_IMPORTED_MODULE_6__.RecordBatch.addLength(b, new Long(recordBatch.length, 0));\n _fb_record_batch_mjs__WEBPACK_IMPORTED_MODULE_6__.RecordBatch.addNodes(b, nodesVectorOffset);\n _fb_record_batch_mjs__WEBPACK_IMPORTED_MODULE_6__.RecordBatch.addBuffers(b, buffersVectorOffset);\n return _fb_record_batch_mjs__WEBPACK_IMPORTED_MODULE_6__.RecordBatch.endRecordBatch(b);\n}\n/** @ignore */\nfunction encodeDictionaryBatch(b, dictionaryBatch) {\n const dataOffset = RecordBatch.encode(b, dictionaryBatch.data);\n _fb_dictionary_batch_mjs__WEBPACK_IMPORTED_MODULE_7__.DictionaryBatch.startDictionaryBatch(b);\n _fb_dictionary_batch_mjs__WEBPACK_IMPORTED_MODULE_7__.DictionaryBatch.addId(b, new Long(dictionaryBatch.id, 0));\n _fb_dictionary_batch_mjs__WEBPACK_IMPORTED_MODULE_7__.DictionaryBatch.addIsDelta(b, dictionaryBatch.isDelta);\n _fb_dictionary_batch_mjs__WEBPACK_IMPORTED_MODULE_7__.DictionaryBatch.addData(b, dataOffset);\n return _fb_dictionary_batch_mjs__WEBPACK_IMPORTED_MODULE_7__.DictionaryBatch.endDictionaryBatch(b);\n}\n/** @ignore */\nfunction encodeFieldNode(b, node) {\n return _fb_field_node_mjs__WEBPACK_IMPORTED_MODULE_26__.FieldNode.createFieldNode(b, new Long(node.length, 0), new Long(node.nullCount, 0));\n}\n/** @ignore */\nfunction encodeBufferRegion(b, node) {\n return _fb_buffer_mjs__WEBPACK_IMPORTED_MODULE_27__.Buffer.createBuffer(b, new Long(node.offset, 0), new Long(node.length, 0));\n}\n/** @ignore */\nconst platformIsLittleEndian = (() => {\n const buffer = new ArrayBuffer(2);\n new DataView(buffer).setInt16(0, 256, true /* littleEndian */);\n // Int16Array uses the platform's endianness.\n return new Int16Array(buffer)[0] === 256;\n})();\n\n//# sourceMappingURL=message.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/ipc/metadata/message.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/ipc/reader.mjs": +/*!**************************************************!*\ + !*** ./node_modules/apache-arrow/ipc/reader.mjs ***! + \**************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AsyncRecordBatchFileReader: () => (/* binding */ AsyncRecordBatchFileReader),\n/* harmony export */ AsyncRecordBatchStreamReader: () => (/* binding */ AsyncRecordBatchStreamReader),\n/* harmony export */ RecordBatchFileReader: () => (/* binding */ RecordBatchFileReader),\n/* harmony export */ RecordBatchReader: () => (/* binding */ RecordBatchReader),\n/* harmony export */ RecordBatchStreamReader: () => (/* binding */ RecordBatchStreamReader)\n/* harmony export */ });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ \"./node_modules/tslib/tslib.es6.mjs\");\n/* harmony import */ var _data_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../data.mjs */ \"./node_modules/apache-arrow/data.mjs\");\n/* harmony import */ var _vector_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../vector.mjs */ \"./node_modules/apache-arrow/vector.mjs\");\n/* harmony import */ var _type_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../type.mjs */ \"./node_modules/apache-arrow/type.mjs\");\n/* harmony import */ var _enum_mjs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../enum.mjs */ \"./node_modules/apache-arrow/enum.mjs\");\n/* harmony import */ var _metadata_file_mjs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./metadata/file.mjs */ \"./node_modules/apache-arrow/ipc/metadata/file.mjs\");\n/* harmony import */ var _io_adapters_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../io/adapters.mjs */ \"./node_modules/apache-arrow/io/adapters.mjs\");\n/* harmony import */ var _io_stream_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../io/stream.mjs */ \"./node_modules/apache-arrow/io/stream.mjs\");\n/* harmony import */ var _io_file_mjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../io/file.mjs */ \"./node_modules/apache-arrow/io/file.mjs\");\n/* harmony import */ var _visitor_vectorloader_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../visitor/vectorloader.mjs */ \"./node_modules/apache-arrow/visitor/vectorloader.mjs\");\n/* harmony import */ var _recordbatch_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../recordbatch.mjs */ \"./node_modules/apache-arrow/recordbatch.mjs\");\n/* harmony import */ var _io_interfaces_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../io/interfaces.mjs */ \"./node_modules/apache-arrow/io/interfaces.mjs\");\n/* harmony import */ var _message_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./message.mjs */ \"./node_modules/apache-arrow/ipc/message.mjs\");\n/* harmony import */ var _util_compat_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/compat.mjs */ \"./node_modules/apache-arrow/util/compat.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nclass RecordBatchReader extends _io_interfaces_mjs__WEBPACK_IMPORTED_MODULE_0__.ReadableInterop {\n constructor(impl) {\n super();\n this._impl = impl;\n }\n get closed() { return this._impl.closed; }\n get schema() { return this._impl.schema; }\n get autoDestroy() { return this._impl.autoDestroy; }\n get dictionaries() { return this._impl.dictionaries; }\n get numDictionaries() { return this._impl.numDictionaries; }\n get numRecordBatches() { return this._impl.numRecordBatches; }\n get footer() { return this._impl.isFile() ? this._impl.footer : null; }\n isSync() { return this._impl.isSync(); }\n isAsync() { return this._impl.isAsync(); }\n isFile() { return this._impl.isFile(); }\n isStream() { return this._impl.isStream(); }\n next() {\n return this._impl.next();\n }\n throw(value) {\n return this._impl.throw(value);\n }\n return(value) {\n return this._impl.return(value);\n }\n cancel() {\n return this._impl.cancel();\n }\n reset(schema) {\n this._impl.reset(schema);\n this._DOMStream = undefined;\n this._nodeStream = undefined;\n return this;\n }\n open(options) {\n const opening = this._impl.open(options);\n return (0,_util_compat_mjs__WEBPACK_IMPORTED_MODULE_1__.isPromise)(opening) ? opening.then(() => this) : this;\n }\n readRecordBatch(index) {\n return this._impl.isFile() ? this._impl.readRecordBatch(index) : null;\n }\n [Symbol.iterator]() {\n return this._impl[Symbol.iterator]();\n }\n [Symbol.asyncIterator]() {\n return this._impl[Symbol.asyncIterator]();\n }\n toDOMStream() {\n return _io_adapters_mjs__WEBPACK_IMPORTED_MODULE_2__[\"default\"].toDOMStream((this.isSync()\n ? { [Symbol.iterator]: () => this }\n : { [Symbol.asyncIterator]: () => this }));\n }\n toNodeStream() {\n return _io_adapters_mjs__WEBPACK_IMPORTED_MODULE_2__[\"default\"].toNodeStream((this.isSync()\n ? { [Symbol.iterator]: () => this }\n : { [Symbol.asyncIterator]: () => this }), { objectMode: true });\n }\n /** @nocollapse */\n // @ts-ignore\n static throughNode(options) {\n throw new Error(`\"throughNode\" not available in this environment`);\n }\n /** @nocollapse */\n static throughDOM(\n // @ts-ignore\n writableStrategy, \n // @ts-ignore\n readableStrategy) {\n throw new Error(`\"throughDOM\" not available in this environment`);\n }\n /** @nocollapse */\n static from(source) {\n if (source instanceof RecordBatchReader) {\n return source;\n }\n else if ((0,_util_compat_mjs__WEBPACK_IMPORTED_MODULE_1__.isArrowJSON)(source)) {\n return fromArrowJSON(source);\n }\n else if ((0,_util_compat_mjs__WEBPACK_IMPORTED_MODULE_1__.isFileHandle)(source)) {\n return fromFileHandle(source);\n }\n else if ((0,_util_compat_mjs__WEBPACK_IMPORTED_MODULE_1__.isPromise)(source)) {\n return (() => (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__awaiter)(this, void 0, void 0, function* () { return yield RecordBatchReader.from(yield source); }))();\n }\n else if ((0,_util_compat_mjs__WEBPACK_IMPORTED_MODULE_1__.isFetchResponse)(source) || (0,_util_compat_mjs__WEBPACK_IMPORTED_MODULE_1__.isReadableDOMStream)(source) || (0,_util_compat_mjs__WEBPACK_IMPORTED_MODULE_1__.isReadableNodeStream)(source) || (0,_util_compat_mjs__WEBPACK_IMPORTED_MODULE_1__.isAsyncIterable)(source)) {\n return fromAsyncByteStream(new _io_stream_mjs__WEBPACK_IMPORTED_MODULE_4__.AsyncByteStream(source));\n }\n return fromByteStream(new _io_stream_mjs__WEBPACK_IMPORTED_MODULE_4__.ByteStream(source));\n }\n /** @nocollapse */\n static readAll(source) {\n if (source instanceof RecordBatchReader) {\n return source.isSync() ? readAllSync(source) : readAllAsync(source);\n }\n else if ((0,_util_compat_mjs__WEBPACK_IMPORTED_MODULE_1__.isArrowJSON)(source) || ArrayBuffer.isView(source) || (0,_util_compat_mjs__WEBPACK_IMPORTED_MODULE_1__.isIterable)(source) || (0,_util_compat_mjs__WEBPACK_IMPORTED_MODULE_1__.isIteratorResult)(source)) {\n return readAllSync(source);\n }\n return readAllAsync(source);\n }\n}\n//\n// Since TS is a structural type system, we define the following subclass stubs\n// so that concrete types exist to associate with with the interfaces below.\n//\n// The implementation for each RecordBatchReader is hidden away in the set of\n// `RecordBatchReaderImpl` classes in the second half of this file. This allows\n// us to export a single RecordBatchReader class, and swap out the impl based\n// on the io primitives or underlying arrow (JSON, file, or stream) at runtime.\n//\n// Async/await makes our job a bit harder, since it forces everything to be\n// either fully sync or fully async. This is why the logic for the reader impls\n// has been duplicated into both sync and async variants. Since the RBR\n// delegates to its impl, an RBR with an AsyncRecordBatchFileReaderImpl for\n// example will return async/await-friendly Promises, but one with a (sync)\n// RecordBatchStreamReaderImpl will always return values. Nothing should be\n// different about their logic, aside from the async handling. This is also why\n// this code looks highly structured, as it should be nearly identical and easy\n// to follow.\n//\n/** @ignore */\nclass RecordBatchStreamReader extends RecordBatchReader {\n constructor(_impl) {\n super(_impl);\n this._impl = _impl;\n }\n readAll() { return [...this]; }\n [Symbol.iterator]() { return this._impl[Symbol.iterator](); }\n [Symbol.asyncIterator]() { return (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__asyncGenerator)(this, arguments, function* _a() { yield (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__await)(yield* (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__asyncDelegator)((0,tslib__WEBPACK_IMPORTED_MODULE_3__.__asyncValues)(this[Symbol.iterator]()))); }); }\n}\n/** @ignore */\nclass AsyncRecordBatchStreamReader extends RecordBatchReader {\n constructor(_impl) {\n super(_impl);\n this._impl = _impl;\n }\n readAll() {\n var e_1, _a;\n return (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__awaiter)(this, void 0, void 0, function* () {\n const batches = new Array();\n try {\n for (var _b = (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__asyncValues)(this), _c; _c = yield _b.next(), !_c.done;) {\n const batch = _c.value;\n batches.push(batch);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return batches;\n });\n }\n [Symbol.iterator]() { throw new Error(`AsyncRecordBatchStreamReader is not Iterable`); }\n [Symbol.asyncIterator]() { return this._impl[Symbol.asyncIterator](); }\n}\n/** @ignore */\nclass RecordBatchFileReader extends RecordBatchStreamReader {\n constructor(_impl) {\n super(_impl);\n this._impl = _impl;\n }\n}\n/** @ignore */\nclass AsyncRecordBatchFileReader extends AsyncRecordBatchStreamReader {\n constructor(_impl) {\n super(_impl);\n this._impl = _impl;\n }\n}\n/** @ignore */\nclass RecordBatchReaderImpl {\n constructor(dictionaries = new Map()) {\n this.closed = false;\n this.autoDestroy = true;\n this._dictionaryIndex = 0;\n this._recordBatchIndex = 0;\n this.dictionaries = dictionaries;\n }\n get numDictionaries() { return this._dictionaryIndex; }\n get numRecordBatches() { return this._recordBatchIndex; }\n isSync() { return false; }\n isAsync() { return false; }\n isFile() { return false; }\n isStream() { return false; }\n reset(schema) {\n this._dictionaryIndex = 0;\n this._recordBatchIndex = 0;\n this.schema = schema;\n this.dictionaries = new Map();\n return this;\n }\n _loadRecordBatch(header, body) {\n const children = this._loadVectors(header, body, this.schema.fields);\n const data = (0,_data_mjs__WEBPACK_IMPORTED_MODULE_5__.makeData)({ type: new _type_mjs__WEBPACK_IMPORTED_MODULE_6__.Struct(this.schema.fields), length: header.length, children });\n return new _recordbatch_mjs__WEBPACK_IMPORTED_MODULE_7__.RecordBatch(this.schema, data);\n }\n _loadDictionaryBatch(header, body) {\n const { id, isDelta } = header;\n const { dictionaries, schema } = this;\n const dictionary = dictionaries.get(id);\n if (isDelta || !dictionary) {\n const type = schema.dictionaries.get(id);\n const data = this._loadVectors(header.data, body, [type]);\n return (dictionary && isDelta ? dictionary.concat(new _vector_mjs__WEBPACK_IMPORTED_MODULE_8__.Vector(data)) :\n new _vector_mjs__WEBPACK_IMPORTED_MODULE_8__.Vector(data)).memoize();\n }\n return dictionary.memoize();\n }\n _loadVectors(header, body, types) {\n return new _visitor_vectorloader_mjs__WEBPACK_IMPORTED_MODULE_9__.VectorLoader(body, header.nodes, header.buffers, this.dictionaries).visitMany(types);\n }\n}\n/** @ignore */\nclass RecordBatchStreamReaderImpl extends RecordBatchReaderImpl {\n constructor(source, dictionaries) {\n super(dictionaries);\n this._reader = !(0,_util_compat_mjs__WEBPACK_IMPORTED_MODULE_1__.isArrowJSON)(source)\n ? new _message_mjs__WEBPACK_IMPORTED_MODULE_10__.MessageReader(this._handle = source)\n : new _message_mjs__WEBPACK_IMPORTED_MODULE_10__.JSONMessageReader(this._handle = source);\n }\n isSync() { return true; }\n isStream() { return true; }\n [Symbol.iterator]() {\n return this;\n }\n cancel() {\n if (!this.closed && (this.closed = true)) {\n this.reset()._reader.return();\n this._reader = null;\n this.dictionaries = null;\n }\n }\n open(options) {\n if (!this.closed) {\n this.autoDestroy = shouldAutoDestroy(this, options);\n if (!(this.schema || (this.schema = this._reader.readSchema()))) {\n this.cancel();\n }\n }\n return this;\n }\n throw(value) {\n if (!this.closed && this.autoDestroy && (this.closed = true)) {\n return this.reset()._reader.throw(value);\n }\n return _io_interfaces_mjs__WEBPACK_IMPORTED_MODULE_0__.ITERATOR_DONE;\n }\n return(value) {\n if (!this.closed && this.autoDestroy && (this.closed = true)) {\n return this.reset()._reader.return(value);\n }\n return _io_interfaces_mjs__WEBPACK_IMPORTED_MODULE_0__.ITERATOR_DONE;\n }\n next() {\n if (this.closed) {\n return _io_interfaces_mjs__WEBPACK_IMPORTED_MODULE_0__.ITERATOR_DONE;\n }\n let message;\n const { _reader: reader } = this;\n while (message = this._readNextMessageAndValidate()) {\n if (message.isSchema()) {\n this.reset(message.header());\n }\n else if (message.isRecordBatch()) {\n this._recordBatchIndex++;\n const header = message.header();\n const buffer = reader.readMessageBody(message.bodyLength);\n const recordBatch = this._loadRecordBatch(header, buffer);\n return { done: false, value: recordBatch };\n }\n else if (message.isDictionaryBatch()) {\n this._dictionaryIndex++;\n const header = message.header();\n const buffer = reader.readMessageBody(message.bodyLength);\n const vector = this._loadDictionaryBatch(header, buffer);\n this.dictionaries.set(header.id, vector);\n }\n }\n if (this.schema && this._recordBatchIndex === 0) {\n this._recordBatchIndex++;\n return { done: false, value: new _recordbatch_mjs__WEBPACK_IMPORTED_MODULE_7__._InternalEmptyPlaceholderRecordBatch(this.schema) };\n }\n return this.return();\n }\n _readNextMessageAndValidate(type) {\n return this._reader.readMessage(type);\n }\n}\n/** @ignore */\nclass AsyncRecordBatchStreamReaderImpl extends RecordBatchReaderImpl {\n constructor(source, dictionaries) {\n super(dictionaries);\n this._reader = new _message_mjs__WEBPACK_IMPORTED_MODULE_10__.AsyncMessageReader(this._handle = source);\n }\n isAsync() { return true; }\n isStream() { return true; }\n [Symbol.asyncIterator]() {\n return this;\n }\n cancel() {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__awaiter)(this, void 0, void 0, function* () {\n if (!this.closed && (this.closed = true)) {\n yield this.reset()._reader.return();\n this._reader = null;\n this.dictionaries = null;\n }\n });\n }\n open(options) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__awaiter)(this, void 0, void 0, function* () {\n if (!this.closed) {\n this.autoDestroy = shouldAutoDestroy(this, options);\n if (!(this.schema || (this.schema = (yield this._reader.readSchema())))) {\n yield this.cancel();\n }\n }\n return this;\n });\n }\n throw(value) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__awaiter)(this, void 0, void 0, function* () {\n if (!this.closed && this.autoDestroy && (this.closed = true)) {\n return yield this.reset()._reader.throw(value);\n }\n return _io_interfaces_mjs__WEBPACK_IMPORTED_MODULE_0__.ITERATOR_DONE;\n });\n }\n return(value) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__awaiter)(this, void 0, void 0, function* () {\n if (!this.closed && this.autoDestroy && (this.closed = true)) {\n return yield this.reset()._reader.return(value);\n }\n return _io_interfaces_mjs__WEBPACK_IMPORTED_MODULE_0__.ITERATOR_DONE;\n });\n }\n next() {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__awaiter)(this, void 0, void 0, function* () {\n if (this.closed) {\n return _io_interfaces_mjs__WEBPACK_IMPORTED_MODULE_0__.ITERATOR_DONE;\n }\n let message;\n const { _reader: reader } = this;\n while (message = yield this._readNextMessageAndValidate()) {\n if (message.isSchema()) {\n yield this.reset(message.header());\n }\n else if (message.isRecordBatch()) {\n this._recordBatchIndex++;\n const header = message.header();\n const buffer = yield reader.readMessageBody(message.bodyLength);\n const recordBatch = this._loadRecordBatch(header, buffer);\n return { done: false, value: recordBatch };\n }\n else if (message.isDictionaryBatch()) {\n this._dictionaryIndex++;\n const header = message.header();\n const buffer = yield reader.readMessageBody(message.bodyLength);\n const vector = this._loadDictionaryBatch(header, buffer);\n this.dictionaries.set(header.id, vector);\n }\n }\n if (this.schema && this._recordBatchIndex === 0) {\n this._recordBatchIndex++;\n return { done: false, value: new _recordbatch_mjs__WEBPACK_IMPORTED_MODULE_7__._InternalEmptyPlaceholderRecordBatch(this.schema) };\n }\n return yield this.return();\n });\n }\n _readNextMessageAndValidate(type) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__awaiter)(this, void 0, void 0, function* () {\n return yield this._reader.readMessage(type);\n });\n }\n}\n/** @ignore */\nclass RecordBatchFileReaderImpl extends RecordBatchStreamReaderImpl {\n constructor(source, dictionaries) {\n super(source instanceof _io_file_mjs__WEBPACK_IMPORTED_MODULE_11__.RandomAccessFile ? source : new _io_file_mjs__WEBPACK_IMPORTED_MODULE_11__.RandomAccessFile(source), dictionaries);\n }\n get footer() { return this._footer; }\n get numDictionaries() { return this._footer ? this._footer.numDictionaries : 0; }\n get numRecordBatches() { return this._footer ? this._footer.numRecordBatches : 0; }\n isSync() { return true; }\n isFile() { return true; }\n open(options) {\n if (!this.closed && !this._footer) {\n this.schema = (this._footer = this._readFooter()).schema;\n for (const block of this._footer.dictionaryBatches()) {\n block && this._readDictionaryBatch(this._dictionaryIndex++);\n }\n }\n return super.open(options);\n }\n readRecordBatch(index) {\n var _a;\n if (this.closed) {\n return null;\n }\n if (!this._footer) {\n this.open();\n }\n const block = (_a = this._footer) === null || _a === void 0 ? void 0 : _a.getRecordBatch(index);\n if (block && this._handle.seek(block.offset)) {\n const message = this._reader.readMessage(_enum_mjs__WEBPACK_IMPORTED_MODULE_12__.MessageHeader.RecordBatch);\n if (message === null || message === void 0 ? void 0 : message.isRecordBatch()) {\n const header = message.header();\n const buffer = this._reader.readMessageBody(message.bodyLength);\n const recordBatch = this._loadRecordBatch(header, buffer);\n return recordBatch;\n }\n }\n return null;\n }\n _readDictionaryBatch(index) {\n var _a;\n const block = (_a = this._footer) === null || _a === void 0 ? void 0 : _a.getDictionaryBatch(index);\n if (block && this._handle.seek(block.offset)) {\n const message = this._reader.readMessage(_enum_mjs__WEBPACK_IMPORTED_MODULE_12__.MessageHeader.DictionaryBatch);\n if (message === null || message === void 0 ? void 0 : message.isDictionaryBatch()) {\n const header = message.header();\n const buffer = this._reader.readMessageBody(message.bodyLength);\n const vector = this._loadDictionaryBatch(header, buffer);\n this.dictionaries.set(header.id, vector);\n }\n }\n }\n _readFooter() {\n const { _handle } = this;\n const offset = _handle.size - _message_mjs__WEBPACK_IMPORTED_MODULE_10__.magicAndPadding;\n const length = _handle.readInt32(offset);\n const buffer = _handle.readAt(offset - length, length);\n return _metadata_file_mjs__WEBPACK_IMPORTED_MODULE_13__.Footer.decode(buffer);\n }\n _readNextMessageAndValidate(type) {\n var _a;\n if (!this._footer) {\n this.open();\n }\n if (this._footer && this._recordBatchIndex < this.numRecordBatches) {\n const block = (_a = this._footer) === null || _a === void 0 ? void 0 : _a.getRecordBatch(this._recordBatchIndex);\n if (block && this._handle.seek(block.offset)) {\n return this._reader.readMessage(type);\n }\n }\n return null;\n }\n}\n/** @ignore */\nclass AsyncRecordBatchFileReaderImpl extends AsyncRecordBatchStreamReaderImpl {\n constructor(source, ...rest) {\n const byteLength = typeof rest[0] !== 'number' ? rest.shift() : undefined;\n const dictionaries = rest[0] instanceof Map ? rest.shift() : undefined;\n super(source instanceof _io_file_mjs__WEBPACK_IMPORTED_MODULE_11__.AsyncRandomAccessFile ? source : new _io_file_mjs__WEBPACK_IMPORTED_MODULE_11__.AsyncRandomAccessFile(source, byteLength), dictionaries);\n }\n get footer() { return this._footer; }\n get numDictionaries() { return this._footer ? this._footer.numDictionaries : 0; }\n get numRecordBatches() { return this._footer ? this._footer.numRecordBatches : 0; }\n isFile() { return true; }\n isAsync() { return true; }\n open(options) {\n const _super = Object.create(null, {\n open: { get: () => super.open }\n });\n return (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__awaiter)(this, void 0, void 0, function* () {\n if (!this.closed && !this._footer) {\n this.schema = (this._footer = yield this._readFooter()).schema;\n for (const block of this._footer.dictionaryBatches()) {\n block && (yield this._readDictionaryBatch(this._dictionaryIndex++));\n }\n }\n return yield _super.open.call(this, options);\n });\n }\n readRecordBatch(index) {\n var _a;\n return (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__awaiter)(this, void 0, void 0, function* () {\n if (this.closed) {\n return null;\n }\n if (!this._footer) {\n yield this.open();\n }\n const block = (_a = this._footer) === null || _a === void 0 ? void 0 : _a.getRecordBatch(index);\n if (block && (yield this._handle.seek(block.offset))) {\n const message = yield this._reader.readMessage(_enum_mjs__WEBPACK_IMPORTED_MODULE_12__.MessageHeader.RecordBatch);\n if (message === null || message === void 0 ? void 0 : message.isRecordBatch()) {\n const header = message.header();\n const buffer = yield this._reader.readMessageBody(message.bodyLength);\n const recordBatch = this._loadRecordBatch(header, buffer);\n return recordBatch;\n }\n }\n return null;\n });\n }\n _readDictionaryBatch(index) {\n var _a;\n return (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__awaiter)(this, void 0, void 0, function* () {\n const block = (_a = this._footer) === null || _a === void 0 ? void 0 : _a.getDictionaryBatch(index);\n if (block && (yield this._handle.seek(block.offset))) {\n const message = yield this._reader.readMessage(_enum_mjs__WEBPACK_IMPORTED_MODULE_12__.MessageHeader.DictionaryBatch);\n if (message === null || message === void 0 ? void 0 : message.isDictionaryBatch()) {\n const header = message.header();\n const buffer = yield this._reader.readMessageBody(message.bodyLength);\n const vector = this._loadDictionaryBatch(header, buffer);\n this.dictionaries.set(header.id, vector);\n }\n }\n });\n }\n _readFooter() {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__awaiter)(this, void 0, void 0, function* () {\n const { _handle } = this;\n _handle._pending && (yield _handle._pending);\n const offset = _handle.size - _message_mjs__WEBPACK_IMPORTED_MODULE_10__.magicAndPadding;\n const length = yield _handle.readInt32(offset);\n const buffer = yield _handle.readAt(offset - length, length);\n return _metadata_file_mjs__WEBPACK_IMPORTED_MODULE_13__.Footer.decode(buffer);\n });\n }\n _readNextMessageAndValidate(type) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__awaiter)(this, void 0, void 0, function* () {\n if (!this._footer) {\n yield this.open();\n }\n if (this._footer && this._recordBatchIndex < this.numRecordBatches) {\n const block = this._footer.getRecordBatch(this._recordBatchIndex);\n if (block && (yield this._handle.seek(block.offset))) {\n return yield this._reader.readMessage(type);\n }\n }\n return null;\n });\n }\n}\n/** @ignore */\nclass RecordBatchJSONReaderImpl extends RecordBatchStreamReaderImpl {\n constructor(source, dictionaries) {\n super(source, dictionaries);\n }\n _loadVectors(header, body, types) {\n return new _visitor_vectorloader_mjs__WEBPACK_IMPORTED_MODULE_9__.JSONVectorLoader(body, header.nodes, header.buffers, this.dictionaries).visitMany(types);\n }\n}\n//\n// Define some helper functions and static implementations down here. There's\n// a bit of branching in the static methods that can lead to the same routines\n// being executed, so we've broken those out here for readability.\n//\n/** @ignore */\nfunction shouldAutoDestroy(self, options) {\n return options && (typeof options['autoDestroy'] === 'boolean') ? options['autoDestroy'] : self['autoDestroy'];\n}\n/** @ignore */\nfunction* readAllSync(source) {\n const reader = RecordBatchReader.from(source);\n try {\n if (!reader.open({ autoDestroy: false }).closed) {\n do {\n yield reader;\n } while (!(reader.reset().open()).closed);\n }\n }\n finally {\n reader.cancel();\n }\n}\n/** @ignore */\nfunction readAllAsync(source) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__asyncGenerator)(this, arguments, function* readAllAsync_1() {\n const reader = yield (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__await)(RecordBatchReader.from(source));\n try {\n if (!(yield (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__await)(reader.open({ autoDestroy: false }))).closed) {\n do {\n yield yield (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__await)(reader);\n } while (!(yield (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__await)(reader.reset().open())).closed);\n }\n }\n finally {\n yield (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__await)(reader.cancel());\n }\n });\n}\n/** @ignore */\nfunction fromArrowJSON(source) {\n return new RecordBatchStreamReader(new RecordBatchJSONReaderImpl(source));\n}\n/** @ignore */\nfunction fromByteStream(source) {\n const bytes = source.peek((_message_mjs__WEBPACK_IMPORTED_MODULE_10__.magicLength + 7) & ~7);\n return bytes && bytes.byteLength >= 4 ? !(0,_message_mjs__WEBPACK_IMPORTED_MODULE_10__.checkForMagicArrowString)(bytes)\n ? new RecordBatchStreamReader(new RecordBatchStreamReaderImpl(source))\n : new RecordBatchFileReader(new RecordBatchFileReaderImpl(source.read()))\n : new RecordBatchStreamReader(new RecordBatchStreamReaderImpl(function* () { }()));\n}\n/** @ignore */\nfunction fromAsyncByteStream(source) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__awaiter)(this, void 0, void 0, function* () {\n const bytes = yield source.peek((_message_mjs__WEBPACK_IMPORTED_MODULE_10__.magicLength + 7) & ~7);\n return bytes && bytes.byteLength >= 4 ? !(0,_message_mjs__WEBPACK_IMPORTED_MODULE_10__.checkForMagicArrowString)(bytes)\n ? new AsyncRecordBatchStreamReader(new AsyncRecordBatchStreamReaderImpl(source))\n : new RecordBatchFileReader(new RecordBatchFileReaderImpl(yield source.read()))\n : new AsyncRecordBatchStreamReader(new AsyncRecordBatchStreamReaderImpl(function () { return (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__asyncGenerator)(this, arguments, function* () { }); }()));\n });\n}\n/** @ignore */\nfunction fromFileHandle(source) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__awaiter)(this, void 0, void 0, function* () {\n const { size } = yield source.stat();\n const file = new _io_file_mjs__WEBPACK_IMPORTED_MODULE_11__.AsyncRandomAccessFile(source, size);\n if (size >= _message_mjs__WEBPACK_IMPORTED_MODULE_10__.magicX2AndPadding && (0,_message_mjs__WEBPACK_IMPORTED_MODULE_10__.checkForMagicArrowString)(yield file.readAt(0, (_message_mjs__WEBPACK_IMPORTED_MODULE_10__.magicLength + 7) & ~7))) {\n return new AsyncRecordBatchFileReader(new AsyncRecordBatchFileReaderImpl(file));\n }\n return new AsyncRecordBatchStreamReader(new AsyncRecordBatchStreamReaderImpl(file));\n });\n}\n\n//# sourceMappingURL=reader.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/ipc/reader.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/ipc/serialization.mjs": +/*!*********************************************************!*\ + !*** ./node_modules/apache-arrow/ipc/serialization.mjs ***! + \*********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ tableFromIPC: () => (/* binding */ tableFromIPC),\n/* harmony export */ tableToIPC: () => (/* binding */ tableToIPC)\n/* harmony export */ });\n/* harmony import */ var _table_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../table.mjs */ \"./node_modules/apache-arrow/table.mjs\");\n/* harmony import */ var _util_compat_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/compat.mjs */ \"./node_modules/apache-arrow/util/compat.mjs\");\n/* harmony import */ var _reader_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./reader.mjs */ \"./node_modules/apache-arrow/ipc/reader.mjs\");\n/* harmony import */ var _writer_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./writer.mjs */ \"./node_modules/apache-arrow/ipc/writer.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n\n\nfunction tableFromIPC(input) {\n const reader = _reader_mjs__WEBPACK_IMPORTED_MODULE_0__.RecordBatchReader.from(input);\n if ((0,_util_compat_mjs__WEBPACK_IMPORTED_MODULE_1__.isPromise)(reader)) {\n return reader.then((reader) => tableFromIPC(reader));\n }\n if (reader.isAsync()) {\n return reader.readAll().then((xs) => new _table_mjs__WEBPACK_IMPORTED_MODULE_2__.Table(xs));\n }\n return new _table_mjs__WEBPACK_IMPORTED_MODULE_2__.Table(reader.readAll());\n}\n/**\n * Serialize a {@link Table} to the IPC format. This function is a convenience\n * wrapper for {@link RecordBatchStreamWriter} and {@link RecordBatchFileWriter}.\n * Opposite of {@link tableFromIPC}.\n *\n * @param table The Table to serialize.\n * @param type Whether to serialize the Table as a file or a stream.\n */\nfunction tableToIPC(table, type = 'stream') {\n return (type === 'stream' ? _writer_mjs__WEBPACK_IMPORTED_MODULE_3__.RecordBatchStreamWriter : _writer_mjs__WEBPACK_IMPORTED_MODULE_3__.RecordBatchFileWriter)\n .writeAll(table)\n .toUint8Array(true);\n}\n\n//# sourceMappingURL=serialization.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/ipc/serialization.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/ipc/writer.mjs": +/*!**************************************************!*\ + !*** ./node_modules/apache-arrow/ipc/writer.mjs ***! + \**************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ RecordBatchFileWriter: () => (/* binding */ RecordBatchFileWriter),\n/* harmony export */ RecordBatchJSONWriter: () => (/* binding */ RecordBatchJSONWriter),\n/* harmony export */ RecordBatchStreamWriter: () => (/* binding */ RecordBatchStreamWriter),\n/* harmony export */ RecordBatchWriter: () => (/* binding */ RecordBatchWriter)\n/* harmony export */ });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! tslib */ \"./node_modules/tslib/tslib.es6.mjs\");\n/* harmony import */ var _table_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../table.mjs */ \"./node_modules/apache-arrow/table.mjs\");\n/* harmony import */ var _message_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./message.mjs */ \"./node_modules/apache-arrow/ipc/message.mjs\");\n/* harmony import */ var _vector_mjs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../vector.mjs */ \"./node_modules/apache-arrow/vector.mjs\");\n/* harmony import */ var _type_mjs__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../type.mjs */ \"./node_modules/apache-arrow/type.mjs\");\n/* harmony import */ var _metadata_message_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./metadata/message.mjs */ \"./node_modules/apache-arrow/ipc/metadata/message.mjs\");\n/* harmony import */ var _metadata_file_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./metadata/file.mjs */ \"./node_modules/apache-arrow/ipc/metadata/file.mjs\");\n/* harmony import */ var _enum_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../enum.mjs */ \"./node_modules/apache-arrow/enum.mjs\");\n/* harmony import */ var _visitor_typecomparator_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../visitor/typecomparator.mjs */ \"./node_modules/apache-arrow/visitor/typecomparator.mjs\");\n/* harmony import */ var _io_stream_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../io/stream.mjs */ \"./node_modules/apache-arrow/io/stream.mjs\");\n/* harmony import */ var _visitor_vectorassembler_mjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../visitor/vectorassembler.mjs */ \"./node_modules/apache-arrow/visitor/vectorassembler.mjs\");\n/* harmony import */ var _visitor_jsontypeassembler_mjs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../visitor/jsontypeassembler.mjs */ \"./node_modules/apache-arrow/visitor/jsontypeassembler.mjs\");\n/* harmony import */ var _visitor_jsonvectorassembler_mjs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../visitor/jsonvectorassembler.mjs */ \"./node_modules/apache-arrow/visitor/jsonvectorassembler.mjs\");\n/* harmony import */ var _util_buffer_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../util/buffer.mjs */ \"./node_modules/apache-arrow/util/buffer.mjs\");\n/* harmony import */ var _recordbatch_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../recordbatch.mjs */ \"./node_modules/apache-arrow/recordbatch.mjs\");\n/* harmony import */ var _io_interfaces_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../io/interfaces.mjs */ \"./node_modules/apache-arrow/io/interfaces.mjs\");\n/* harmony import */ var _util_compat_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/compat.mjs */ \"./node_modules/apache-arrow/util/compat.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nclass RecordBatchWriter extends _io_interfaces_mjs__WEBPACK_IMPORTED_MODULE_0__.ReadableInterop {\n constructor(options) {\n super();\n this._position = 0;\n this._started = false;\n // @ts-ignore\n this._sink = new _io_stream_mjs__WEBPACK_IMPORTED_MODULE_1__.AsyncByteQueue();\n this._schema = null;\n this._dictionaryBlocks = [];\n this._recordBatchBlocks = [];\n this._dictionaryDeltaOffsets = new Map();\n (0,_util_compat_mjs__WEBPACK_IMPORTED_MODULE_2__.isObject)(options) || (options = { autoDestroy: true, writeLegacyIpcFormat: false });\n this._autoDestroy = (typeof options.autoDestroy === 'boolean') ? options.autoDestroy : true;\n this._writeLegacyIpcFormat = (typeof options.writeLegacyIpcFormat === 'boolean') ? options.writeLegacyIpcFormat : false;\n }\n /** @nocollapse */\n // @ts-ignore\n static throughNode(options) {\n throw new Error(`\"throughNode\" not available in this environment`);\n }\n /** @nocollapse */\n static throughDOM(\n // @ts-ignore\n writableStrategy, \n // @ts-ignore\n readableStrategy) {\n throw new Error(`\"throughDOM\" not available in this environment`);\n }\n toString(sync = false) {\n return this._sink.toString(sync);\n }\n toUint8Array(sync = false) {\n return this._sink.toUint8Array(sync);\n }\n writeAll(input) {\n if ((0,_util_compat_mjs__WEBPACK_IMPORTED_MODULE_2__.isPromise)(input)) {\n return input.then((x) => this.writeAll(x));\n }\n else if ((0,_util_compat_mjs__WEBPACK_IMPORTED_MODULE_2__.isAsyncIterable)(input)) {\n return writeAllAsync(this, input);\n }\n return writeAll(this, input);\n }\n get closed() { return this._sink.closed; }\n [Symbol.asyncIterator]() { return this._sink[Symbol.asyncIterator](); }\n toDOMStream(options) { return this._sink.toDOMStream(options); }\n toNodeStream(options) { return this._sink.toNodeStream(options); }\n close() {\n return this.reset()._sink.close();\n }\n abort(reason) {\n return this.reset()._sink.abort(reason);\n }\n finish() {\n this._autoDestroy ? this.close() : this.reset(this._sink, this._schema);\n return this;\n }\n reset(sink = this._sink, schema = null) {\n if ((sink === this._sink) || (sink instanceof _io_stream_mjs__WEBPACK_IMPORTED_MODULE_1__.AsyncByteQueue)) {\n this._sink = sink;\n }\n else {\n this._sink = new _io_stream_mjs__WEBPACK_IMPORTED_MODULE_1__.AsyncByteQueue();\n if (sink && (0,_util_compat_mjs__WEBPACK_IMPORTED_MODULE_2__.isWritableDOMStream)(sink)) {\n this.toDOMStream({ type: 'bytes' }).pipeTo(sink);\n }\n else if (sink && (0,_util_compat_mjs__WEBPACK_IMPORTED_MODULE_2__.isWritableNodeStream)(sink)) {\n this.toNodeStream({ objectMode: false }).pipe(sink);\n }\n }\n if (this._started && this._schema) {\n this._writeFooter(this._schema);\n }\n this._started = false;\n this._dictionaryBlocks = [];\n this._recordBatchBlocks = [];\n this._dictionaryDeltaOffsets = new Map();\n if (!schema || !((0,_visitor_typecomparator_mjs__WEBPACK_IMPORTED_MODULE_3__.compareSchemas)(schema, this._schema))) {\n if (schema == null) {\n this._position = 0;\n this._schema = null;\n }\n else {\n this._started = true;\n this._schema = schema;\n this._writeSchema(schema);\n }\n }\n return this;\n }\n write(payload) {\n let schema = null;\n if (!this._sink) {\n throw new Error(`RecordBatchWriter is closed`);\n }\n else if (payload == null) {\n return this.finish() && undefined;\n }\n else if (payload instanceof _table_mjs__WEBPACK_IMPORTED_MODULE_4__.Table && !(schema = payload.schema)) {\n return this.finish() && undefined;\n }\n else if (payload instanceof _recordbatch_mjs__WEBPACK_IMPORTED_MODULE_5__.RecordBatch && !(schema = payload.schema)) {\n return this.finish() && undefined;\n }\n if (schema && !(0,_visitor_typecomparator_mjs__WEBPACK_IMPORTED_MODULE_3__.compareSchemas)(schema, this._schema)) {\n if (this._started && this._autoDestroy) {\n return this.close();\n }\n this.reset(this._sink, schema);\n }\n if (payload instanceof _recordbatch_mjs__WEBPACK_IMPORTED_MODULE_5__.RecordBatch) {\n if (!(payload instanceof _recordbatch_mjs__WEBPACK_IMPORTED_MODULE_5__._InternalEmptyPlaceholderRecordBatch)) {\n this._writeRecordBatch(payload);\n }\n }\n else if (payload instanceof _table_mjs__WEBPACK_IMPORTED_MODULE_4__.Table) {\n this.writeAll(payload.batches);\n }\n else if ((0,_util_compat_mjs__WEBPACK_IMPORTED_MODULE_2__.isIterable)(payload)) {\n this.writeAll(payload);\n }\n }\n _writeMessage(message, alignment = 8) {\n const a = alignment - 1;\n const buffer = _metadata_message_mjs__WEBPACK_IMPORTED_MODULE_6__.Message.encode(message);\n const flatbufferSize = buffer.byteLength;\n const prefixSize = !this._writeLegacyIpcFormat ? 8 : 4;\n const alignedSize = (flatbufferSize + prefixSize + a) & ~a;\n const nPaddingBytes = alignedSize - flatbufferSize - prefixSize;\n if (message.headerType === _enum_mjs__WEBPACK_IMPORTED_MODULE_7__.MessageHeader.RecordBatch) {\n this._recordBatchBlocks.push(new _metadata_file_mjs__WEBPACK_IMPORTED_MODULE_8__.FileBlock(alignedSize, message.bodyLength, this._position));\n }\n else if (message.headerType === _enum_mjs__WEBPACK_IMPORTED_MODULE_7__.MessageHeader.DictionaryBatch) {\n this._dictionaryBlocks.push(new _metadata_file_mjs__WEBPACK_IMPORTED_MODULE_8__.FileBlock(alignedSize, message.bodyLength, this._position));\n }\n // If not in legacy pre-0.15.0 mode, write the stream continuation indicator\n if (!this._writeLegacyIpcFormat) {\n this._write(Int32Array.of(-1));\n }\n // Write the flatbuffer size prefix including padding\n this._write(Int32Array.of(alignedSize - prefixSize));\n // Write the flatbuffer\n if (flatbufferSize > 0) {\n this._write(buffer);\n }\n // Write any padding\n return this._writePadding(nPaddingBytes);\n }\n _write(chunk) {\n if (this._started) {\n const buffer = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_9__.toUint8Array)(chunk);\n if (buffer && buffer.byteLength > 0) {\n this._sink.write(buffer);\n this._position += buffer.byteLength;\n }\n }\n return this;\n }\n _writeSchema(schema) {\n return this._writeMessage(_metadata_message_mjs__WEBPACK_IMPORTED_MODULE_6__.Message.from(schema));\n }\n // @ts-ignore\n _writeFooter(schema) {\n // eos bytes\n return this._writeLegacyIpcFormat\n ? this._write(Int32Array.of(0))\n : this._write(Int32Array.of(-1, 0));\n }\n _writeMagic() {\n return this._write(_message_mjs__WEBPACK_IMPORTED_MODULE_10__.MAGIC);\n }\n _writePadding(nBytes) {\n return nBytes > 0 ? this._write(new Uint8Array(nBytes)) : this;\n }\n _writeRecordBatch(batch) {\n const { byteLength, nodes, bufferRegions, buffers } = _visitor_vectorassembler_mjs__WEBPACK_IMPORTED_MODULE_11__.VectorAssembler.assemble(batch);\n const recordBatch = new _metadata_message_mjs__WEBPACK_IMPORTED_MODULE_6__.RecordBatch(batch.numRows, nodes, bufferRegions);\n const message = _metadata_message_mjs__WEBPACK_IMPORTED_MODULE_6__.Message.from(recordBatch, byteLength);\n return this\n ._writeDictionaries(batch)\n ._writeMessage(message)\n ._writeBodyBuffers(buffers);\n }\n _writeDictionaryBatch(dictionary, id, isDelta = false) {\n this._dictionaryDeltaOffsets.set(id, dictionary.length + (this._dictionaryDeltaOffsets.get(id) || 0));\n const { byteLength, nodes, bufferRegions, buffers } = _visitor_vectorassembler_mjs__WEBPACK_IMPORTED_MODULE_11__.VectorAssembler.assemble(new _vector_mjs__WEBPACK_IMPORTED_MODULE_12__.Vector([dictionary]));\n const recordBatch = new _metadata_message_mjs__WEBPACK_IMPORTED_MODULE_6__.RecordBatch(dictionary.length, nodes, bufferRegions);\n const dictionaryBatch = new _metadata_message_mjs__WEBPACK_IMPORTED_MODULE_6__.DictionaryBatch(recordBatch, id, isDelta);\n const message = _metadata_message_mjs__WEBPACK_IMPORTED_MODULE_6__.Message.from(dictionaryBatch, byteLength);\n return this\n ._writeMessage(message)\n ._writeBodyBuffers(buffers);\n }\n _writeBodyBuffers(buffers) {\n let buffer;\n let size, padding;\n for (let i = -1, n = buffers.length; ++i < n;) {\n if ((buffer = buffers[i]) && (size = buffer.byteLength) > 0) {\n this._write(buffer);\n if ((padding = ((size + 7) & ~7) - size) > 0) {\n this._writePadding(padding);\n }\n }\n }\n return this;\n }\n _writeDictionaries(batch) {\n for (let [id, dictionary] of batch.dictionaries) {\n let offset = this._dictionaryDeltaOffsets.get(id) || 0;\n if (offset === 0 || (dictionary = dictionary === null || dictionary === void 0 ? void 0 : dictionary.slice(offset)).length > 0) {\n for (const data of dictionary.data) {\n this._writeDictionaryBatch(data, id, offset > 0);\n offset += data.length;\n }\n }\n }\n return this;\n }\n}\n/** @ignore */\nclass RecordBatchStreamWriter extends RecordBatchWriter {\n /** @nocollapse */\n static writeAll(input, options) {\n const writer = new RecordBatchStreamWriter(options);\n if ((0,_util_compat_mjs__WEBPACK_IMPORTED_MODULE_2__.isPromise)(input)) {\n return input.then((x) => writer.writeAll(x));\n }\n else if ((0,_util_compat_mjs__WEBPACK_IMPORTED_MODULE_2__.isAsyncIterable)(input)) {\n return writeAllAsync(writer, input);\n }\n return writeAll(writer, input);\n }\n}\n/** @ignore */\nclass RecordBatchFileWriter extends RecordBatchWriter {\n /** @nocollapse */\n static writeAll(input) {\n const writer = new RecordBatchFileWriter();\n if ((0,_util_compat_mjs__WEBPACK_IMPORTED_MODULE_2__.isPromise)(input)) {\n return input.then((x) => writer.writeAll(x));\n }\n else if ((0,_util_compat_mjs__WEBPACK_IMPORTED_MODULE_2__.isAsyncIterable)(input)) {\n return writeAllAsync(writer, input);\n }\n return writeAll(writer, input);\n }\n constructor() {\n super();\n this._autoDestroy = true;\n }\n // @ts-ignore\n _writeSchema(schema) {\n return this._writeMagic()._writePadding(2);\n }\n _writeFooter(schema) {\n const buffer = _metadata_file_mjs__WEBPACK_IMPORTED_MODULE_8__.Footer.encode(new _metadata_file_mjs__WEBPACK_IMPORTED_MODULE_8__.Footer(schema, _enum_mjs__WEBPACK_IMPORTED_MODULE_7__.MetadataVersion.V4, this._recordBatchBlocks, this._dictionaryBlocks));\n return super\n ._writeFooter(schema) // EOS bytes for sequential readers\n ._write(buffer) // Write the flatbuffer\n ._write(Int32Array.of(buffer.byteLength)) // then the footer size suffix\n ._writeMagic(); // then the magic suffix\n }\n}\n/** @ignore */\nclass RecordBatchJSONWriter extends RecordBatchWriter {\n constructor() {\n super();\n this._autoDestroy = true;\n this._recordBatches = [];\n this._dictionaries = [];\n }\n /** @nocollapse */\n static writeAll(input) {\n return new RecordBatchJSONWriter().writeAll(input);\n }\n _writeMessage() { return this; }\n // @ts-ignore\n _writeFooter(schema) { return this; }\n _writeSchema(schema) {\n return this._write(`{\\n \"schema\": ${JSON.stringify({ fields: schema.fields.map(field => fieldToJSON(field)) }, null, 2)}`);\n }\n _writeDictionaries(batch) {\n if (batch.dictionaries.size > 0) {\n this._dictionaries.push(batch);\n }\n return this;\n }\n _writeDictionaryBatch(dictionary, id, isDelta = false) {\n this._dictionaryDeltaOffsets.set(id, dictionary.length + (this._dictionaryDeltaOffsets.get(id) || 0));\n this._write(this._dictionaryBlocks.length === 0 ? ` ` : `,\\n `);\n this._write(`${dictionaryBatchToJSON(dictionary, id, isDelta)}`);\n this._dictionaryBlocks.push(new _metadata_file_mjs__WEBPACK_IMPORTED_MODULE_8__.FileBlock(0, 0, 0));\n return this;\n }\n _writeRecordBatch(batch) {\n this._writeDictionaries(batch);\n this._recordBatches.push(batch);\n return this;\n }\n close() {\n if (this._dictionaries.length > 0) {\n this._write(`,\\n \"dictionaries\": [\\n`);\n for (const batch of this._dictionaries) {\n super._writeDictionaries(batch);\n }\n this._write(`\\n ]`);\n }\n if (this._recordBatches.length > 0) {\n for (let i = -1, n = this._recordBatches.length; ++i < n;) {\n this._write(i === 0 ? `,\\n \"batches\": [\\n ` : `,\\n `);\n this._write(`${recordBatchToJSON(this._recordBatches[i])}`);\n this._recordBatchBlocks.push(new _metadata_file_mjs__WEBPACK_IMPORTED_MODULE_8__.FileBlock(0, 0, 0));\n }\n this._write(`\\n ]`);\n }\n if (this._schema) {\n this._write(`\\n}`);\n }\n this._dictionaries = [];\n this._recordBatches = [];\n return super.close();\n }\n}\n/** @ignore */\nfunction writeAll(writer, input) {\n let chunks = input;\n if (input instanceof _table_mjs__WEBPACK_IMPORTED_MODULE_4__.Table) {\n chunks = input.batches;\n writer.reset(undefined, input.schema);\n }\n for (const batch of chunks) {\n writer.write(batch);\n }\n return writer.finish();\n}\n/** @ignore */\nfunction writeAllAsync(writer, batches) {\n var batches_1, batches_1_1;\n var e_1, _a;\n return (0,tslib__WEBPACK_IMPORTED_MODULE_13__.__awaiter)(this, void 0, void 0, function* () {\n try {\n for (batches_1 = (0,tslib__WEBPACK_IMPORTED_MODULE_13__.__asyncValues)(batches); batches_1_1 = yield batches_1.next(), !batches_1_1.done;) {\n const batch = batches_1_1.value;\n writer.write(batch);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (batches_1_1 && !batches_1_1.done && (_a = batches_1.return)) yield _a.call(batches_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return writer.finish();\n });\n}\n/** @ignore */\nfunction fieldToJSON({ name, type, nullable }) {\n const assembler = new _visitor_jsontypeassembler_mjs__WEBPACK_IMPORTED_MODULE_14__.JSONTypeAssembler();\n return {\n 'name': name, 'nullable': nullable,\n 'type': assembler.visit(type),\n 'children': (type.children || []).map((field) => fieldToJSON(field)),\n 'dictionary': !_type_mjs__WEBPACK_IMPORTED_MODULE_15__.DataType.isDictionary(type) ? undefined : {\n 'id': type.id,\n 'isOrdered': type.isOrdered,\n 'indexType': assembler.visit(type.indices)\n }\n };\n}\n/** @ignore */\nfunction dictionaryBatchToJSON(dictionary, id, isDelta = false) {\n const [columns] = _visitor_jsonvectorassembler_mjs__WEBPACK_IMPORTED_MODULE_16__.JSONVectorAssembler.assemble(new _recordbatch_mjs__WEBPACK_IMPORTED_MODULE_5__.RecordBatch({ [id]: dictionary }));\n return JSON.stringify({\n 'id': id,\n 'isDelta': isDelta,\n 'data': {\n 'count': dictionary.length,\n 'columns': columns\n }\n }, null, 2);\n}\n/** @ignore */\nfunction recordBatchToJSON(records) {\n const [columns] = _visitor_jsonvectorassembler_mjs__WEBPACK_IMPORTED_MODULE_16__.JSONVectorAssembler.assemble(records);\n return JSON.stringify({\n 'count': records.numRows,\n 'columns': columns\n }, null, 2);\n}\n\n//# sourceMappingURL=writer.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/ipc/writer.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/recordbatch.mjs": +/*!***************************************************!*\ + !*** ./node_modules/apache-arrow/recordbatch.mjs ***! + \***************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ RecordBatch: () => (/* binding */ RecordBatch),\n/* harmony export */ _InternalEmptyPlaceholderRecordBatch: () => (/* binding */ _InternalEmptyPlaceholderRecordBatch)\n/* harmony export */ });\n/* harmony import */ var _data_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data.mjs */ \"./node_modules/apache-arrow/data.mjs\");\n/* harmony import */ var _table_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./table.mjs */ \"./node_modules/apache-arrow/table.mjs\");\n/* harmony import */ var _vector_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./vector.mjs */ \"./node_modules/apache-arrow/vector.mjs\");\n/* harmony import */ var _schema_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schema.mjs */ \"./node_modules/apache-arrow/schema.mjs\");\n/* harmony import */ var _type_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./type.mjs */ \"./node_modules/apache-arrow/type.mjs\");\n/* harmony import */ var _visitor_get_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./visitor/get.mjs */ \"./node_modules/apache-arrow/visitor/get.mjs\");\n/* harmony import */ var _visitor_set_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./visitor/set.mjs */ \"./node_modules/apache-arrow/visitor/set.mjs\");\n/* harmony import */ var _visitor_indexof_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./visitor/indexof.mjs */ \"./node_modules/apache-arrow/visitor/indexof.mjs\");\n/* harmony import */ var _visitor_iterator_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./visitor/iterator.mjs */ \"./node_modules/apache-arrow/visitor/iterator.mjs\");\n/* harmony import */ var _visitor_bytelength_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./visitor/bytelength.mjs */ \"./node_modules/apache-arrow/visitor/bytelength.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nvar _a;\n\n\n\n\n\n\n\n\n\n\n/** @ignore */\nclass RecordBatch {\n constructor(...args) {\n switch (args.length) {\n case 2: {\n [this.schema] = args;\n if (!(this.schema instanceof _schema_mjs__WEBPACK_IMPORTED_MODULE_0__.Schema)) {\n throw new TypeError('RecordBatch constructor expects a [Schema, Data] pair.');\n }\n [,\n this.data = (0,_data_mjs__WEBPACK_IMPORTED_MODULE_1__.makeData)({\n nullCount: 0,\n type: new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Struct(this.schema.fields),\n children: this.schema.fields.map((f) => (0,_data_mjs__WEBPACK_IMPORTED_MODULE_1__.makeData)({ type: f.type, nullCount: 0 }))\n })\n ] = args;\n if (!(this.data instanceof _data_mjs__WEBPACK_IMPORTED_MODULE_1__.Data)) {\n throw new TypeError('RecordBatch constructor expects a [Schema, Data] pair.');\n }\n [this.schema, this.data] = ensureSameLengthData(this.schema, this.data.children);\n break;\n }\n case 1: {\n const [obj] = args;\n const { fields, children, length } = Object.keys(obj).reduce((memo, name, i) => {\n memo.children[i] = obj[name];\n memo.length = Math.max(memo.length, obj[name].length);\n memo.fields[i] = _schema_mjs__WEBPACK_IMPORTED_MODULE_0__.Field.new({ name, type: obj[name].type, nullable: true });\n return memo;\n }, {\n length: 0,\n fields: new Array(),\n children: new Array(),\n });\n const schema = new _schema_mjs__WEBPACK_IMPORTED_MODULE_0__.Schema(fields);\n const data = (0,_data_mjs__WEBPACK_IMPORTED_MODULE_1__.makeData)({ type: new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Struct(fields), length, children, nullCount: 0 });\n [this.schema, this.data] = ensureSameLengthData(schema, data.children, length);\n break;\n }\n default: throw new TypeError('RecordBatch constructor expects an Object mapping names to child Data, or a [Schema, Data] pair.');\n }\n }\n get dictionaries() {\n return this._dictionaries || (this._dictionaries = collectDictionaries(this.schema.fields, this.data.children));\n }\n /**\n * The number of columns in this RecordBatch.\n */\n get numCols() { return this.schema.fields.length; }\n /**\n * The number of rows in this RecordBatch.\n */\n get numRows() { return this.data.length; }\n /**\n * The number of null rows in this RecordBatch.\n */\n get nullCount() {\n return this.data.nullCount;\n }\n /**\n * Check whether an element is null.\n * @param index The index at which to read the validity bitmap.\n */\n isValid(index) {\n return this.data.getValid(index);\n }\n /**\n * Get a row by position.\n * @param index The index of the element to read.\n */\n get(index) {\n return _visitor_get_mjs__WEBPACK_IMPORTED_MODULE_3__.instance.visit(this.data, index);\n }\n /**\n * Set a row by position.\n * @param index The index of the element to write.\n * @param value The value to set.\n */\n set(index, value) {\n return _visitor_set_mjs__WEBPACK_IMPORTED_MODULE_4__.instance.visit(this.data, index, value);\n }\n /**\n * Retrieve the index of the first occurrence of a row in an RecordBatch.\n * @param element The row to locate in the RecordBatch.\n * @param offset The index at which to begin the search. If offset is omitted, the search starts at index 0.\n */\n indexOf(element, offset) {\n return _visitor_indexof_mjs__WEBPACK_IMPORTED_MODULE_5__.instance.visit(this.data, element, offset);\n }\n /**\n * Get the size (in bytes) of a row by index.\n * @param index The row index for which to compute the byteLength.\n */\n getByteLength(index) {\n return _visitor_bytelength_mjs__WEBPACK_IMPORTED_MODULE_6__.instance.visit(this.data, index);\n }\n /**\n * Iterator for rows in this RecordBatch.\n */\n [Symbol.iterator]() {\n return _visitor_iterator_mjs__WEBPACK_IMPORTED_MODULE_7__.instance.visit(new _vector_mjs__WEBPACK_IMPORTED_MODULE_8__.Vector([this.data]));\n }\n /**\n * Return a JavaScript Array of the RecordBatch rows.\n * @returns An Array of RecordBatch rows.\n */\n toArray() {\n return [...this];\n }\n /**\n * Combines two or more RecordBatch of the same schema.\n * @param others Additional RecordBatch to add to the end of this RecordBatch.\n */\n concat(...others) {\n return new _table_mjs__WEBPACK_IMPORTED_MODULE_9__.Table(this.schema, [this, ...others]);\n }\n /**\n * Return a zero-copy sub-section of this RecordBatch.\n * @param start The beginning of the specified portion of the RecordBatch.\n * @param end The end of the specified portion of the RecordBatch. This is exclusive of the element at the index 'end'.\n */\n slice(begin, end) {\n const [slice] = new _vector_mjs__WEBPACK_IMPORTED_MODULE_8__.Vector([this.data]).slice(begin, end).data;\n return new RecordBatch(this.schema, slice);\n }\n /**\n * Returns a child Vector by name, or null if this Vector has no child with the given name.\n * @param name The name of the child to retrieve.\n */\n getChild(name) {\n var _b;\n return this.getChildAt((_b = this.schema.fields) === null || _b === void 0 ? void 0 : _b.findIndex((f) => f.name === name));\n }\n /**\n * Returns a child Vector by index, or null if this Vector has no child at the supplied index.\n * @param index The index of the child to retrieve.\n */\n getChildAt(index) {\n if (index > -1 && index < this.schema.fields.length) {\n return new _vector_mjs__WEBPACK_IMPORTED_MODULE_8__.Vector([this.data.children[index]]);\n }\n return null;\n }\n /**\n * Sets a child Vector by name.\n * @param name The name of the child to overwrite.\n * @returns A new RecordBatch with the new child for the specified name.\n */\n setChild(name, child) {\n var _b;\n return this.setChildAt((_b = this.schema.fields) === null || _b === void 0 ? void 0 : _b.findIndex((f) => f.name === name), child);\n }\n setChildAt(index, child) {\n let schema = this.schema;\n let data = this.data;\n if (index > -1 && index < this.numCols) {\n if (!child) {\n child = new _vector_mjs__WEBPACK_IMPORTED_MODULE_8__.Vector([(0,_data_mjs__WEBPACK_IMPORTED_MODULE_1__.makeData)({ type: new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Null, length: this.numRows })]);\n }\n const fields = schema.fields.slice();\n const children = data.children.slice();\n const field = fields[index].clone({ type: child.type });\n [fields[index], children[index]] = [field, child.data[0]];\n schema = new _schema_mjs__WEBPACK_IMPORTED_MODULE_0__.Schema(fields, new Map(this.schema.metadata));\n data = (0,_data_mjs__WEBPACK_IMPORTED_MODULE_1__.makeData)({ type: new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Struct(fields), children });\n }\n return new RecordBatch(schema, data);\n }\n /**\n * Construct a new RecordBatch containing only specified columns.\n *\n * @param columnNames Names of columns to keep.\n * @returns A new RecordBatch of columns matching the specified names.\n */\n select(columnNames) {\n const schema = this.schema.select(columnNames);\n const type = new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Struct(schema.fields);\n const children = [];\n for (const name of columnNames) {\n const index = this.schema.fields.findIndex((f) => f.name === name);\n if (~index) {\n children[index] = this.data.children[index];\n }\n }\n return new RecordBatch(schema, (0,_data_mjs__WEBPACK_IMPORTED_MODULE_1__.makeData)({ type, length: this.numRows, children }));\n }\n /**\n * Construct a new RecordBatch containing only columns at the specified indices.\n *\n * @param columnIndices Indices of columns to keep.\n * @returns A new RecordBatch of columns matching at the specified indices.\n */\n selectAt(columnIndices) {\n const schema = this.schema.selectAt(columnIndices);\n const children = columnIndices.map((i) => this.data.children[i]).filter(Boolean);\n const subset = (0,_data_mjs__WEBPACK_IMPORTED_MODULE_1__.makeData)({ type: new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Struct(schema.fields), length: this.numRows, children });\n return new RecordBatch(schema, subset);\n }\n}\n_a = Symbol.toStringTag;\n// Initialize this static property via an IIFE so bundlers don't tree-shake\n// out this logic, but also so we're still compliant with `\"sideEffects\": false`\nRecordBatch[_a] = ((proto) => {\n proto._nullCount = -1;\n proto[Symbol.isConcatSpreadable] = true;\n return 'RecordBatch';\n})(RecordBatch.prototype);\n/** @ignore */\nfunction ensureSameLengthData(schema, chunks, maxLength = chunks.reduce((max, col) => Math.max(max, col.length), 0)) {\n var _b;\n const fields = [...schema.fields];\n const children = [...chunks];\n const nullBitmapSize = ((maxLength + 63) & ~63) >> 3;\n for (const [idx, field] of schema.fields.entries()) {\n const chunk = chunks[idx];\n if (!chunk || chunk.length !== maxLength) {\n fields[idx] = field.clone({ nullable: true });\n children[idx] = (_b = chunk === null || chunk === void 0 ? void 0 : chunk._changeLengthAndBackfillNullBitmap(maxLength)) !== null && _b !== void 0 ? _b : (0,_data_mjs__WEBPACK_IMPORTED_MODULE_1__.makeData)({\n type: field.type,\n length: maxLength,\n nullCount: maxLength,\n nullBitmap: new Uint8Array(nullBitmapSize)\n });\n }\n }\n return [\n schema.assign(fields),\n (0,_data_mjs__WEBPACK_IMPORTED_MODULE_1__.makeData)({ type: new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Struct(fields), length: maxLength, children })\n ];\n}\n/** @ignore */\nfunction collectDictionaries(fields, children, dictionaries = new Map()) {\n for (let i = -1, n = fields.length; ++i < n;) {\n const field = fields[i];\n const type = field.type;\n const data = children[i];\n if (_type_mjs__WEBPACK_IMPORTED_MODULE_2__.DataType.isDictionary(type)) {\n if (!dictionaries.has(type.id)) {\n if (data.dictionary) {\n dictionaries.set(type.id, data.dictionary);\n }\n }\n else if (dictionaries.get(type.id) !== data.dictionary) {\n throw new Error(`Cannot create Schema containing two different dictionaries with the same Id`);\n }\n }\n if (type.children && type.children.length > 0) {\n collectDictionaries(type.children, data.children, dictionaries);\n }\n }\n return dictionaries;\n}\n/**\n * An internal class used by the `RecordBatchReader` and `RecordBatchWriter`\n * implementations to differentiate between a stream with valid zero-length\n * RecordBatches, and a stream with a Schema message, but no RecordBatches.\n * @see https://github.com/apache/arrow/pull/4373\n * @ignore\n * @private\n */\nclass _InternalEmptyPlaceholderRecordBatch extends RecordBatch {\n constructor(schema) {\n const children = schema.fields.map((f) => (0,_data_mjs__WEBPACK_IMPORTED_MODULE_1__.makeData)({ type: f.type }));\n const data = (0,_data_mjs__WEBPACK_IMPORTED_MODULE_1__.makeData)({ type: new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Struct(schema.fields), nullCount: 0, children });\n super(schema, data);\n }\n}\n\n//# sourceMappingURL=recordbatch.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/recordbatch.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/row/map.mjs": +/*!***********************************************!*\ + !*** ./node_modules/apache-arrow/row/map.mjs ***! + \***********************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ MapRow: () => (/* binding */ MapRow),\n/* harmony export */ kKeys: () => (/* binding */ kKeys),\n/* harmony export */ kVals: () => (/* binding */ kVals)\n/* harmony export */ });\n/* harmony import */ var _vector_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../vector.mjs */ \"./node_modules/apache-arrow/vector.mjs\");\n/* harmony import */ var _util_pretty_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/pretty.mjs */ \"./node_modules/apache-arrow/util/pretty.mjs\");\n/* harmony import */ var _visitor_get_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../visitor/get.mjs */ \"./node_modules/apache-arrow/visitor/get.mjs\");\n/* harmony import */ var _visitor_set_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../visitor/set.mjs */ \"./node_modules/apache-arrow/visitor/set.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n\n\n/** @ignore */ const kKeys = Symbol.for('keys');\n/** @ignore */ const kVals = Symbol.for('vals');\nclass MapRow {\n constructor(slice) {\n this[kKeys] = new _vector_mjs__WEBPACK_IMPORTED_MODULE_0__.Vector([slice.children[0]]).memoize();\n this[kVals] = slice.children[1];\n return new Proxy(this, new MapRowProxyHandler());\n }\n [Symbol.iterator]() {\n return new MapRowIterator(this[kKeys], this[kVals]);\n }\n get size() { return this[kKeys].length; }\n toArray() { return Object.values(this.toJSON()); }\n toJSON() {\n const keys = this[kKeys];\n const vals = this[kVals];\n const json = {};\n for (let i = -1, n = keys.length; ++i < n;) {\n json[keys.get(i)] = _visitor_get_mjs__WEBPACK_IMPORTED_MODULE_1__.instance.visit(vals, i);\n }\n return json;\n }\n toString() {\n return `{${[...this].map(([key, val]) => `${(0,_util_pretty_mjs__WEBPACK_IMPORTED_MODULE_2__.valueToString)(key)}: ${(0,_util_pretty_mjs__WEBPACK_IMPORTED_MODULE_2__.valueToString)(val)}`).join(', ')}}`;\n }\n [Symbol.for('nodejs.util.inspect.custom')]() {\n return this.toString();\n }\n}\nclass MapRowIterator {\n constructor(keys, vals) {\n this.keys = keys;\n this.vals = vals;\n this.keyIndex = 0;\n this.numKeys = keys.length;\n }\n [Symbol.iterator]() { return this; }\n next() {\n const i = this.keyIndex;\n if (i === this.numKeys) {\n return { done: true, value: null };\n }\n this.keyIndex++;\n return {\n done: false,\n value: [\n this.keys.get(i),\n _visitor_get_mjs__WEBPACK_IMPORTED_MODULE_1__.instance.visit(this.vals, i),\n ]\n };\n }\n}\n/** @ignore */\nclass MapRowProxyHandler {\n isExtensible() { return false; }\n deleteProperty() { return false; }\n preventExtensions() { return true; }\n ownKeys(row) {\n return row[kKeys].toArray().map(String);\n }\n has(row, key) {\n return row[kKeys].includes(key);\n }\n getOwnPropertyDescriptor(row, key) {\n const idx = row[kKeys].indexOf(key);\n if (idx !== -1) {\n return { writable: true, enumerable: true, configurable: true };\n }\n return;\n }\n get(row, key) {\n // Look up key in row first\n if (Reflect.has(row, key)) {\n return row[key];\n }\n const idx = row[kKeys].indexOf(key);\n if (idx !== -1) {\n const val = _visitor_get_mjs__WEBPACK_IMPORTED_MODULE_1__.instance.visit(Reflect.get(row, kVals), idx);\n // Cache key/val lookups\n Reflect.set(row, key, val);\n return val;\n }\n }\n set(row, key, val) {\n const idx = row[kKeys].indexOf(key);\n if (idx !== -1) {\n _visitor_set_mjs__WEBPACK_IMPORTED_MODULE_3__.instance.visit(Reflect.get(row, kVals), idx, val);\n // Cache key/val lookups\n return Reflect.set(row, key, val);\n }\n else if (Reflect.has(row, key)) {\n return Reflect.set(row, key, val);\n }\n return false;\n }\n}\nObject.defineProperties(MapRow.prototype, {\n [Symbol.toStringTag]: { enumerable: false, configurable: false, value: 'Row' },\n [kKeys]: { writable: true, enumerable: false, configurable: false, value: null },\n [kVals]: { writable: true, enumerable: false, configurable: false, value: null },\n});\n\n//# sourceMappingURL=map.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/row/map.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/row/struct.mjs": +/*!**************************************************!*\ + !*** ./node_modules/apache-arrow/row/struct.mjs ***! + \**************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ StructRow: () => (/* binding */ StructRow)\n/* harmony export */ });\n/* harmony import */ var _util_pretty_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/pretty.mjs */ \"./node_modules/apache-arrow/util/pretty.mjs\");\n/* harmony import */ var _visitor_get_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../visitor/get.mjs */ \"./node_modules/apache-arrow/visitor/get.mjs\");\n/* harmony import */ var _visitor_set_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../visitor/set.mjs */ \"./node_modules/apache-arrow/visitor/set.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n\n/** @ignore */ const kParent = Symbol.for('parent');\n/** @ignore */ const kRowIndex = Symbol.for('rowIndex');\nclass StructRow {\n constructor(parent, rowIndex) {\n this[kParent] = parent;\n this[kRowIndex] = rowIndex;\n return new Proxy(this, new StructRowProxyHandler());\n }\n toArray() { return Object.values(this.toJSON()); }\n toJSON() {\n const i = this[kRowIndex];\n const parent = this[kParent];\n const keys = parent.type.children;\n const json = {};\n for (let j = -1, n = keys.length; ++j < n;) {\n json[keys[j].name] = _visitor_get_mjs__WEBPACK_IMPORTED_MODULE_0__.instance.visit(parent.children[j], i);\n }\n return json;\n }\n toString() {\n return `{${[...this].map(([key, val]) => `${(0,_util_pretty_mjs__WEBPACK_IMPORTED_MODULE_1__.valueToString)(key)}: ${(0,_util_pretty_mjs__WEBPACK_IMPORTED_MODULE_1__.valueToString)(val)}`).join(', ')}}`;\n }\n [Symbol.for('nodejs.util.inspect.custom')]() {\n return this.toString();\n }\n [Symbol.iterator]() {\n return new StructRowIterator(this[kParent], this[kRowIndex]);\n }\n}\nclass StructRowIterator {\n constructor(data, rowIndex) {\n this.childIndex = 0;\n this.children = data.children;\n this.rowIndex = rowIndex;\n this.childFields = data.type.children;\n this.numChildren = this.childFields.length;\n }\n [Symbol.iterator]() { return this; }\n next() {\n const i = this.childIndex;\n if (i < this.numChildren) {\n this.childIndex = i + 1;\n return {\n done: false,\n value: [\n this.childFields[i].name,\n _visitor_get_mjs__WEBPACK_IMPORTED_MODULE_0__.instance.visit(this.children[i], this.rowIndex)\n ]\n };\n }\n return { done: true, value: null };\n }\n}\nObject.defineProperties(StructRow.prototype, {\n [Symbol.toStringTag]: { enumerable: false, configurable: false, value: 'Row' },\n [kParent]: { writable: true, enumerable: false, configurable: false, value: null },\n [kRowIndex]: { writable: true, enumerable: false, configurable: false, value: -1 },\n});\nclass StructRowProxyHandler {\n isExtensible() { return false; }\n deleteProperty() { return false; }\n preventExtensions() { return true; }\n ownKeys(row) {\n return row[kParent].type.children.map((f) => f.name);\n }\n has(row, key) {\n return row[kParent].type.children.findIndex((f) => f.name === key) !== -1;\n }\n getOwnPropertyDescriptor(row, key) {\n if (row[kParent].type.children.findIndex((f) => f.name === key) !== -1) {\n return { writable: true, enumerable: true, configurable: true };\n }\n return;\n }\n get(row, key) {\n // Look up key in row first\n if (Reflect.has(row, key)) {\n return row[key];\n }\n const idx = row[kParent].type.children.findIndex((f) => f.name === key);\n if (idx !== -1) {\n const val = _visitor_get_mjs__WEBPACK_IMPORTED_MODULE_0__.instance.visit(row[kParent].children[idx], row[kRowIndex]);\n // Cache key/val lookups\n Reflect.set(row, key, val);\n return val;\n }\n }\n set(row, key, val) {\n const idx = row[kParent].type.children.findIndex((f) => f.name === key);\n if (idx !== -1) {\n _visitor_set_mjs__WEBPACK_IMPORTED_MODULE_2__.instance.visit(row[kParent].children[idx], row[kRowIndex], val);\n // Cache key/val lookups\n return Reflect.set(row, key, val);\n }\n else if (Reflect.has(row, key) || typeof key === 'symbol') {\n return Reflect.set(row, key, val);\n }\n return false;\n }\n}\n\n//# sourceMappingURL=struct.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/row/struct.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/schema.mjs": +/*!**********************************************!*\ + !*** ./node_modules/apache-arrow/schema.mjs ***! + \**********************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Field: () => (/* binding */ Field),\n/* harmony export */ Schema: () => (/* binding */ Schema)\n/* harmony export */ });\n/* harmony import */ var _type_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./type.mjs */ \"./node_modules/apache-arrow/type.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nclass Schema {\n constructor(fields = [], metadata, dictionaries) {\n this.fields = (fields || []);\n this.metadata = metadata || new Map();\n if (!dictionaries) {\n dictionaries = generateDictionaryMap(fields);\n }\n this.dictionaries = dictionaries;\n }\n get [Symbol.toStringTag]() { return 'Schema'; }\n get names() { return this.fields.map((f) => f.name); }\n toString() {\n return `Schema<{ ${this.fields.map((f, i) => `${i}: ${f}`).join(', ')} }>`;\n }\n /**\n * Construct a new Schema containing only specified fields.\n *\n * @param fieldNames Names of fields to keep.\n * @returns A new Schema of fields matching the specified names.\n */\n select(fieldNames) {\n const names = new Set(fieldNames);\n const fields = this.fields.filter((f) => names.has(f.name));\n return new Schema(fields, this.metadata);\n }\n /**\n * Construct a new Schema containing only fields at the specified indices.\n *\n * @param fieldIndices Indices of fields to keep.\n * @returns A new Schema of fields at the specified indices.\n */\n selectAt(fieldIndices) {\n const fields = fieldIndices.map((i) => this.fields[i]).filter(Boolean);\n return new Schema(fields, this.metadata);\n }\n assign(...args) {\n const other = (args[0] instanceof Schema\n ? args[0]\n : Array.isArray(args[0])\n ? new Schema(args[0])\n : new Schema(args));\n const curFields = [...this.fields];\n const metadata = mergeMaps(mergeMaps(new Map(), this.metadata), other.metadata);\n const newFields = other.fields.filter((f2) => {\n const i = curFields.findIndex((f) => f.name === f2.name);\n return ~i ? (curFields[i] = f2.clone({\n metadata: mergeMaps(mergeMaps(new Map(), curFields[i].metadata), f2.metadata)\n })) && false : true;\n });\n const newDictionaries = generateDictionaryMap(newFields, new Map());\n return new Schema([...curFields, ...newFields], metadata, new Map([...this.dictionaries, ...newDictionaries]));\n }\n}\n// Add these here so they're picked up by the externs creator\n// in the build, and closure-compiler doesn't minify them away\nSchema.prototype.fields = null;\nSchema.prototype.metadata = null;\nSchema.prototype.dictionaries = null;\nclass Field {\n constructor(name, type, nullable = false, metadata) {\n this.name = name;\n this.type = type;\n this.nullable = nullable;\n this.metadata = metadata || new Map();\n }\n /** @nocollapse */\n static new(...args) {\n let [name, type, nullable, metadata] = args;\n if (args[0] && typeof args[0] === 'object') {\n ({ name } = args[0]);\n (type === undefined) && (type = args[0].type);\n (nullable === undefined) && (nullable = args[0].nullable);\n (metadata === undefined) && (metadata = args[0].metadata);\n }\n return new Field(`${name}`, type, nullable, metadata);\n }\n get typeId() { return this.type.typeId; }\n get [Symbol.toStringTag]() { return 'Field'; }\n toString() { return `${this.name}: ${this.type}`; }\n clone(...args) {\n let [name, type, nullable, metadata] = args;\n (!args[0] || typeof args[0] !== 'object')\n ? ([name = this.name, type = this.type, nullable = this.nullable, metadata = this.metadata] = args)\n : ({ name = this.name, type = this.type, nullable = this.nullable, metadata = this.metadata } = args[0]);\n return Field.new(name, type, nullable, metadata);\n }\n}\n// Add these here so they're picked up by the externs creator\n// in the build, and closure-compiler doesn't minify them away\nField.prototype.type = null;\nField.prototype.name = null;\nField.prototype.nullable = null;\nField.prototype.metadata = null;\n/** @ignore */\nfunction mergeMaps(m1, m2) {\n return new Map([...(m1 || new Map()), ...(m2 || new Map())]);\n}\n/** @ignore */\nfunction generateDictionaryMap(fields, dictionaries = new Map()) {\n for (let i = -1, n = fields.length; ++i < n;) {\n const field = fields[i];\n const type = field.type;\n if (_type_mjs__WEBPACK_IMPORTED_MODULE_0__.DataType.isDictionary(type)) {\n if (!dictionaries.has(type.id)) {\n dictionaries.set(type.id, type.dictionary);\n }\n else if (dictionaries.get(type.id) !== type.dictionary) {\n throw new Error(`Cannot create Schema containing two different dictionaries with the same Id`);\n }\n }\n if (type.children && type.children.length > 0) {\n generateDictionaryMap(type.children, dictionaries);\n }\n }\n return dictionaries;\n}\n\n//# sourceMappingURL=schema.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/schema.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/table.mjs": +/*!*********************************************!*\ + !*** ./node_modules/apache-arrow/table.mjs ***! + \*********************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Table: () => (/* binding */ Table),\n/* harmony export */ makeTable: () => (/* binding */ makeTable),\n/* harmony export */ tableFromArrays: () => (/* binding */ tableFromArrays)\n/* harmony export */ });\n/* harmony import */ var _enum_mjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./enum.mjs */ \"./node_modules/apache-arrow/enum.mjs\");\n/* harmony import */ var _data_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data.mjs */ \"./node_modules/apache-arrow/data.mjs\");\n/* harmony import */ var _factories_mjs__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./factories.mjs */ \"./node_modules/apache-arrow/factories.mjs\");\n/* harmony import */ var _vector_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./vector.mjs */ \"./node_modules/apache-arrow/vector.mjs\");\n/* harmony import */ var _schema_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schema.mjs */ \"./node_modules/apache-arrow/schema.mjs\");\n/* harmony import */ var _type_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./type.mjs */ \"./node_modules/apache-arrow/type.mjs\");\n/* harmony import */ var _visitor_typecomparator_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./visitor/typecomparator.mjs */ \"./node_modules/apache-arrow/visitor/typecomparator.mjs\");\n/* harmony import */ var _util_recordbatch_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./util/recordbatch.mjs */ \"./node_modules/apache-arrow/util/recordbatch.mjs\");\n/* harmony import */ var _util_chunk_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./util/chunk.mjs */ \"./node_modules/apache-arrow/util/chunk.mjs\");\n/* harmony import */ var _visitor_get_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./visitor/get.mjs */ \"./node_modules/apache-arrow/visitor/get.mjs\");\n/* harmony import */ var _visitor_set_mjs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./visitor/set.mjs */ \"./node_modules/apache-arrow/visitor/set.mjs\");\n/* harmony import */ var _visitor_indexof_mjs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./visitor/indexof.mjs */ \"./node_modules/apache-arrow/visitor/indexof.mjs\");\n/* harmony import */ var _visitor_iterator_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./visitor/iterator.mjs */ \"./node_modules/apache-arrow/visitor/iterator.mjs\");\n/* harmony import */ var _visitor_bytelength_mjs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./visitor/bytelength.mjs */ \"./node_modules/apache-arrow/visitor/bytelength.mjs\");\n/* harmony import */ var _util_vector_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./util/vector.mjs */ \"./node_modules/apache-arrow/util/vector.mjs\");\n/* harmony import */ var _recordbatch_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./recordbatch.mjs */ \"./node_modules/apache-arrow/recordbatch.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nvar _a;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * Tables are collections of {@link Vector}s and have a {@link Schema}. Use the convenience methods {@link makeTable}\n * or {@link tableFromArrays} to create a table in JavaScript. To create a table from the IPC format, use\n * {@link tableFromIPC}.\n */\nclass Table {\n constructor(...args) {\n var _b, _c;\n if (args.length === 0) {\n this.batches = [];\n this.schema = new _schema_mjs__WEBPACK_IMPORTED_MODULE_0__.Schema([]);\n this._offsets = [0];\n return this;\n }\n let schema;\n let offsets;\n if (args[0] instanceof _schema_mjs__WEBPACK_IMPORTED_MODULE_0__.Schema) {\n schema = args.shift();\n }\n if (args[args.length - 1] instanceof Uint32Array) {\n offsets = args.pop();\n }\n const unwrap = (x) => {\n if (x) {\n if (x instanceof _recordbatch_mjs__WEBPACK_IMPORTED_MODULE_1__.RecordBatch) {\n return [x];\n }\n else if (x instanceof Table) {\n return x.batches;\n }\n else if (x instanceof _data_mjs__WEBPACK_IMPORTED_MODULE_2__.Data) {\n if (x.type instanceof _type_mjs__WEBPACK_IMPORTED_MODULE_3__.Struct) {\n return [new _recordbatch_mjs__WEBPACK_IMPORTED_MODULE_1__.RecordBatch(new _schema_mjs__WEBPACK_IMPORTED_MODULE_0__.Schema(x.type.children), x)];\n }\n }\n else if (Array.isArray(x)) {\n return x.flatMap(v => unwrap(v));\n }\n else if (typeof x[Symbol.iterator] === 'function') {\n return [...x].flatMap(v => unwrap(v));\n }\n else if (typeof x === 'object') {\n const keys = Object.keys(x);\n const vecs = keys.map((k) => new _vector_mjs__WEBPACK_IMPORTED_MODULE_4__.Vector([x[k]]));\n const schema = new _schema_mjs__WEBPACK_IMPORTED_MODULE_0__.Schema(keys.map((k, i) => new _schema_mjs__WEBPACK_IMPORTED_MODULE_0__.Field(String(k), vecs[i].type)));\n const [, batches] = (0,_util_recordbatch_mjs__WEBPACK_IMPORTED_MODULE_5__.distributeVectorsIntoRecordBatches)(schema, vecs);\n return batches.length === 0 ? [new _recordbatch_mjs__WEBPACK_IMPORTED_MODULE_1__.RecordBatch(x)] : batches;\n }\n }\n return [];\n };\n const batches = args.flatMap(v => unwrap(v));\n schema = (_c = schema !== null && schema !== void 0 ? schema : (_b = batches[0]) === null || _b === void 0 ? void 0 : _b.schema) !== null && _c !== void 0 ? _c : new _schema_mjs__WEBPACK_IMPORTED_MODULE_0__.Schema([]);\n if (!(schema instanceof _schema_mjs__WEBPACK_IMPORTED_MODULE_0__.Schema)) {\n throw new TypeError('Table constructor expects a [Schema, RecordBatch[]] pair.');\n }\n for (const batch of batches) {\n if (!(batch instanceof _recordbatch_mjs__WEBPACK_IMPORTED_MODULE_1__.RecordBatch)) {\n throw new TypeError('Table constructor expects a [Schema, RecordBatch[]] pair.');\n }\n if (!(0,_visitor_typecomparator_mjs__WEBPACK_IMPORTED_MODULE_6__.compareSchemas)(schema, batch.schema)) {\n throw new TypeError('Table and inner RecordBatch schemas must be equivalent.');\n }\n }\n this.schema = schema;\n this.batches = batches;\n this._offsets = offsets !== null && offsets !== void 0 ? offsets : (0,_util_chunk_mjs__WEBPACK_IMPORTED_MODULE_7__.computeChunkOffsets)(this.data);\n }\n /**\n * The contiguous {@link RecordBatch `RecordBatch`} chunks of the Table rows.\n */\n get data() { return this.batches.map(({ data }) => data); }\n /**\n * The number of columns in this Table.\n */\n get numCols() { return this.schema.fields.length; }\n /**\n * The number of rows in this Table.\n */\n get numRows() {\n return this.data.reduce((numRows, data) => numRows + data.length, 0);\n }\n /**\n * The number of null rows in this Table.\n */\n get nullCount() {\n if (this._nullCount === -1) {\n this._nullCount = (0,_util_chunk_mjs__WEBPACK_IMPORTED_MODULE_7__.computeChunkNullCounts)(this.data);\n }\n return this._nullCount;\n }\n /**\n * Check whether an element is null.\n *\n * @param index The index at which to read the validity bitmap.\n */\n // @ts-ignore\n isValid(index) { return false; }\n /**\n * Get an element value by position.\n *\n * @param index The index of the element to read.\n */\n // @ts-ignore\n get(index) { return null; }\n /**\n * Set an element value by position.\n *\n * @param index The index of the element to write.\n * @param value The value to set.\n */\n // @ts-ignore\n set(index, value) { return; }\n /**\n * Retrieve the index of the first occurrence of a value in an Vector.\n *\n * @param element The value to locate in the Vector.\n * @param offset The index at which to begin the search. If offset is omitted, the search starts at index 0.\n */\n // @ts-ignore\n indexOf(element, offset) { return -1; }\n /**\n * Get the size in bytes of an element by index.\n * @param index The index at which to get the byteLength.\n */\n // @ts-ignore\n getByteLength(index) { return 0; }\n /**\n * Iterator for rows in this Table.\n */\n [Symbol.iterator]() {\n if (this.batches.length > 0) {\n return _visitor_iterator_mjs__WEBPACK_IMPORTED_MODULE_8__.instance.visit(new _vector_mjs__WEBPACK_IMPORTED_MODULE_4__.Vector(this.data));\n }\n return (new Array(0))[Symbol.iterator]();\n }\n /**\n * Return a JavaScript Array of the Table rows.\n *\n * @returns An Array of Table rows.\n */\n toArray() {\n return [...this];\n }\n /**\n * Returns a string representation of the Table rows.\n *\n * @returns A string representation of the Table rows.\n */\n toString() {\n return `[\\n ${this.toArray().join(',\\n ')}\\n]`;\n }\n /**\n * Combines two or more Tables of the same schema.\n *\n * @param others Additional Tables to add to the end of this Tables.\n */\n concat(...others) {\n const schema = this.schema;\n const data = this.data.concat(others.flatMap(({ data }) => data));\n return new Table(schema, data.map((data) => new _recordbatch_mjs__WEBPACK_IMPORTED_MODULE_1__.RecordBatch(schema, data)));\n }\n /**\n * Return a zero-copy sub-section of this Table.\n *\n * @param begin The beginning of the specified portion of the Table.\n * @param end The end of the specified portion of the Table. This is exclusive of the element at the index 'end'.\n */\n slice(begin, end) {\n const schema = this.schema;\n [begin, end] = (0,_util_vector_mjs__WEBPACK_IMPORTED_MODULE_9__.clampRange)({ length: this.numRows }, begin, end);\n const data = (0,_util_chunk_mjs__WEBPACK_IMPORTED_MODULE_7__.sliceChunks)(this.data, this._offsets, begin, end);\n return new Table(schema, data.map((chunk) => new _recordbatch_mjs__WEBPACK_IMPORTED_MODULE_1__.RecordBatch(schema, chunk)));\n }\n /**\n * Returns a child Vector by name, or null if this Vector has no child with the given name.\n *\n * @param name The name of the child to retrieve.\n */\n getChild(name) {\n return this.getChildAt(this.schema.fields.findIndex((f) => f.name === name));\n }\n /**\n * Returns a child Vector by index, or null if this Vector has no child at the supplied index.\n *\n * @param index The index of the child to retrieve.\n */\n getChildAt(index) {\n if (index > -1 && index < this.schema.fields.length) {\n const data = this.data.map((data) => data.children[index]);\n if (data.length === 0) {\n const { type } = this.schema.fields[index];\n const empty = (0,_data_mjs__WEBPACK_IMPORTED_MODULE_2__.makeData)({ type, length: 0, nullCount: 0 });\n data.push(empty._changeLengthAndBackfillNullBitmap(this.numRows));\n }\n return new _vector_mjs__WEBPACK_IMPORTED_MODULE_4__.Vector(data);\n }\n return null;\n }\n /**\n * Sets a child Vector by name.\n *\n * @param name The name of the child to overwrite.\n * @returns A new Table with the supplied child for the specified name.\n */\n setChild(name, child) {\n var _b;\n return this.setChildAt((_b = this.schema.fields) === null || _b === void 0 ? void 0 : _b.findIndex((f) => f.name === name), child);\n }\n setChildAt(index, child) {\n let schema = this.schema;\n let batches = [...this.batches];\n if (index > -1 && index < this.numCols) {\n if (!child) {\n child = new _vector_mjs__WEBPACK_IMPORTED_MODULE_4__.Vector([(0,_data_mjs__WEBPACK_IMPORTED_MODULE_2__.makeData)({ type: new _type_mjs__WEBPACK_IMPORTED_MODULE_3__.Null, length: this.numRows })]);\n }\n const fields = schema.fields.slice();\n const field = fields[index].clone({ type: child.type });\n const children = this.schema.fields.map((_, i) => this.getChildAt(i));\n [fields[index], children[index]] = [field, child];\n [schema, batches] = (0,_util_recordbatch_mjs__WEBPACK_IMPORTED_MODULE_5__.distributeVectorsIntoRecordBatches)(schema, children);\n }\n return new Table(schema, batches);\n }\n /**\n * Construct a new Table containing only specified columns.\n *\n * @param columnNames Names of columns to keep.\n * @returns A new Table of columns matching the specified names.\n */\n select(columnNames) {\n const nameToIndex = this.schema.fields.reduce((m, f, i) => m.set(f.name, i), new Map());\n return this.selectAt(columnNames.map((columnName) => nameToIndex.get(columnName)).filter((x) => x > -1));\n }\n /**\n * Construct a new Table containing only columns at the specified indices.\n *\n * @param columnIndices Indices of columns to keep.\n * @returns A new Table of columns at the specified indices.\n */\n selectAt(columnIndices) {\n const schema = this.schema.selectAt(columnIndices);\n const data = this.batches.map((batch) => batch.selectAt(columnIndices));\n return new Table(schema, data);\n }\n assign(other) {\n const fields = this.schema.fields;\n const [indices, oldToNew] = other.schema.fields.reduce((memo, f2, newIdx) => {\n const [indices, oldToNew] = memo;\n const i = fields.findIndex((f) => f.name === f2.name);\n ~i ? (oldToNew[i] = newIdx) : indices.push(newIdx);\n return memo;\n }, [[], []]);\n const schema = this.schema.assign(other.schema);\n const columns = [\n ...fields.map((_, i) => [i, oldToNew[i]]).map(([i, j]) => (j === undefined ? this.getChildAt(i) : other.getChildAt(j))),\n ...indices.map((i) => other.getChildAt(i))\n ].filter(Boolean);\n return new Table(...(0,_util_recordbatch_mjs__WEBPACK_IMPORTED_MODULE_5__.distributeVectorsIntoRecordBatches)(schema, columns));\n }\n}\n_a = Symbol.toStringTag;\n// Initialize this static property via an IIFE so bundlers don't tree-shake\n// out this logic, but also so we're still compliant with `\"sideEffects\": false`\nTable[_a] = ((proto) => {\n proto.schema = null;\n proto.batches = [];\n proto._offsets = new Uint32Array([0]);\n proto._nullCount = -1;\n proto[Symbol.isConcatSpreadable] = true;\n proto['isValid'] = (0,_util_chunk_mjs__WEBPACK_IMPORTED_MODULE_7__.wrapChunkedCall1)(_util_chunk_mjs__WEBPACK_IMPORTED_MODULE_7__.isChunkedValid);\n proto['get'] = (0,_util_chunk_mjs__WEBPACK_IMPORTED_MODULE_7__.wrapChunkedCall1)(_visitor_get_mjs__WEBPACK_IMPORTED_MODULE_10__.instance.getVisitFn(_enum_mjs__WEBPACK_IMPORTED_MODULE_11__.Type.Struct));\n proto['set'] = (0,_util_chunk_mjs__WEBPACK_IMPORTED_MODULE_7__.wrapChunkedCall2)(_visitor_set_mjs__WEBPACK_IMPORTED_MODULE_12__.instance.getVisitFn(_enum_mjs__WEBPACK_IMPORTED_MODULE_11__.Type.Struct));\n proto['indexOf'] = (0,_util_chunk_mjs__WEBPACK_IMPORTED_MODULE_7__.wrapChunkedIndexOf)(_visitor_indexof_mjs__WEBPACK_IMPORTED_MODULE_13__.instance.getVisitFn(_enum_mjs__WEBPACK_IMPORTED_MODULE_11__.Type.Struct));\n proto['getByteLength'] = (0,_util_chunk_mjs__WEBPACK_IMPORTED_MODULE_7__.wrapChunkedCall1)(_visitor_bytelength_mjs__WEBPACK_IMPORTED_MODULE_14__.instance.getVisitFn(_enum_mjs__WEBPACK_IMPORTED_MODULE_11__.Type.Struct));\n return 'Table';\n})(Table.prototype);\n/**\n * Creates a new Table from an object of typed arrays.\n *\n* @example\n * ```ts\n * const table = makeTable({\n * a: new Int8Array([1, 2, 3]),\n * })\n * ```\n *\n * @param input Input an object of typed arrays.\n * @returns A new Table.\n */\nfunction makeTable(input) {\n const vecs = {};\n const inputs = Object.entries(input);\n for (const [key, col] of inputs) {\n vecs[key] = (0,_vector_mjs__WEBPACK_IMPORTED_MODULE_4__.makeVector)(col);\n }\n return new Table(vecs);\n}\n/**\n * Creates a new Table from an object of typed arrays or JavaScript arrays.\n *\n * @example\n * ```ts\n * const table = tableFromArrays({\n * a: [1, 2, 3],\n * b: new Int8Array([1, 2, 3]),\n * })\n * ```\n *\n * @param input Input an object of typed arrays or JavaScript arrays.\n * @returns A new Table.\n */\nfunction tableFromArrays(input) {\n const vecs = {};\n const inputs = Object.entries(input);\n for (const [key, col] of inputs) {\n vecs[key] = (0,_factories_mjs__WEBPACK_IMPORTED_MODULE_15__.vectorFromArray)(col);\n }\n return new Table(vecs);\n}\n\n//# sourceMappingURL=table.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/table.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/type.mjs": +/*!********************************************!*\ + !*** ./node_modules/apache-arrow/type.mjs ***! + \********************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Binary: () => (/* binding */ Binary),\n/* harmony export */ Bool: () => (/* binding */ Bool),\n/* harmony export */ DataType: () => (/* binding */ DataType),\n/* harmony export */ DateDay: () => (/* binding */ DateDay),\n/* harmony export */ DateMillisecond: () => (/* binding */ DateMillisecond),\n/* harmony export */ Date_: () => (/* binding */ Date_),\n/* harmony export */ Decimal: () => (/* binding */ Decimal),\n/* harmony export */ DenseUnion: () => (/* binding */ DenseUnion),\n/* harmony export */ Dictionary: () => (/* binding */ Dictionary),\n/* harmony export */ FixedSizeBinary: () => (/* binding */ FixedSizeBinary),\n/* harmony export */ FixedSizeList: () => (/* binding */ FixedSizeList),\n/* harmony export */ Float: () => (/* binding */ Float),\n/* harmony export */ Float16: () => (/* binding */ Float16),\n/* harmony export */ Float32: () => (/* binding */ Float32),\n/* harmony export */ Float64: () => (/* binding */ Float64),\n/* harmony export */ Int: () => (/* binding */ Int_),\n/* harmony export */ Int16: () => (/* binding */ Int16),\n/* harmony export */ Int32: () => (/* binding */ Int32),\n/* harmony export */ Int64: () => (/* binding */ Int64),\n/* harmony export */ Int8: () => (/* binding */ Int8),\n/* harmony export */ Interval: () => (/* binding */ Interval_),\n/* harmony export */ IntervalDayTime: () => (/* binding */ IntervalDayTime),\n/* harmony export */ IntervalYearMonth: () => (/* binding */ IntervalYearMonth),\n/* harmony export */ List: () => (/* binding */ List),\n/* harmony export */ Map_: () => (/* binding */ Map_),\n/* harmony export */ Null: () => (/* binding */ Null),\n/* harmony export */ SparseUnion: () => (/* binding */ SparseUnion),\n/* harmony export */ Struct: () => (/* binding */ Struct),\n/* harmony export */ Time: () => (/* binding */ Time_),\n/* harmony export */ TimeMicrosecond: () => (/* binding */ TimeMicrosecond),\n/* harmony export */ TimeMillisecond: () => (/* binding */ TimeMillisecond),\n/* harmony export */ TimeNanosecond: () => (/* binding */ TimeNanosecond),\n/* harmony export */ TimeSecond: () => (/* binding */ TimeSecond),\n/* harmony export */ Timestamp: () => (/* binding */ Timestamp_),\n/* harmony export */ TimestampMicrosecond: () => (/* binding */ TimestampMicrosecond),\n/* harmony export */ TimestampMillisecond: () => (/* binding */ TimestampMillisecond),\n/* harmony export */ TimestampNanosecond: () => (/* binding */ TimestampNanosecond),\n/* harmony export */ TimestampSecond: () => (/* binding */ TimestampSecond),\n/* harmony export */ Uint16: () => (/* binding */ Uint16),\n/* harmony export */ Uint32: () => (/* binding */ Uint32),\n/* harmony export */ Uint64: () => (/* binding */ Uint64),\n/* harmony export */ Uint8: () => (/* binding */ Uint8),\n/* harmony export */ Union: () => (/* binding */ Union_),\n/* harmony export */ Utf8: () => (/* binding */ Utf8),\n/* harmony export */ strideForType: () => (/* binding */ strideForType)\n/* harmony export */ });\n/* harmony import */ var _util_compat_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/compat.mjs */ \"./node_modules/apache-arrow/util/compat.mjs\");\n/* harmony import */ var _enum_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./enum.mjs */ \"./node_modules/apache-arrow/enum.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nvar _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;\n\n\n/**\n * An abstract base class for classes that encapsulate metadata about each of\n * the logical types that Arrow can represent.\n */\nclass DataType {\n /** @nocollapse */ static isNull(x) { return (x === null || x === void 0 ? void 0 : x.typeId) === _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Null; }\n /** @nocollapse */ static isInt(x) { return (x === null || x === void 0 ? void 0 : x.typeId) === _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Int; }\n /** @nocollapse */ static isFloat(x) { return (x === null || x === void 0 ? void 0 : x.typeId) === _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Float; }\n /** @nocollapse */ static isBinary(x) { return (x === null || x === void 0 ? void 0 : x.typeId) === _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Binary; }\n /** @nocollapse */ static isUtf8(x) { return (x === null || x === void 0 ? void 0 : x.typeId) === _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Utf8; }\n /** @nocollapse */ static isBool(x) { return (x === null || x === void 0 ? void 0 : x.typeId) === _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Bool; }\n /** @nocollapse */ static isDecimal(x) { return (x === null || x === void 0 ? void 0 : x.typeId) === _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Decimal; }\n /** @nocollapse */ static isDate(x) { return (x === null || x === void 0 ? void 0 : x.typeId) === _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Date; }\n /** @nocollapse */ static isTime(x) { return (x === null || x === void 0 ? void 0 : x.typeId) === _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Time; }\n /** @nocollapse */ static isTimestamp(x) { return (x === null || x === void 0 ? void 0 : x.typeId) === _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Timestamp; }\n /** @nocollapse */ static isInterval(x) { return (x === null || x === void 0 ? void 0 : x.typeId) === _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Interval; }\n /** @nocollapse */ static isList(x) { return (x === null || x === void 0 ? void 0 : x.typeId) === _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.List; }\n /** @nocollapse */ static isStruct(x) { return (x === null || x === void 0 ? void 0 : x.typeId) === _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Struct; }\n /** @nocollapse */ static isUnion(x) { return (x === null || x === void 0 ? void 0 : x.typeId) === _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Union; }\n /** @nocollapse */ static isFixedSizeBinary(x) { return (x === null || x === void 0 ? void 0 : x.typeId) === _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.FixedSizeBinary; }\n /** @nocollapse */ static isFixedSizeList(x) { return (x === null || x === void 0 ? void 0 : x.typeId) === _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.FixedSizeList; }\n /** @nocollapse */ static isMap(x) { return (x === null || x === void 0 ? void 0 : x.typeId) === _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Map; }\n /** @nocollapse */ static isDictionary(x) { return (x === null || x === void 0 ? void 0 : x.typeId) === _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Dictionary; }\n /** @nocollapse */ static isDenseUnion(x) { return DataType.isUnion(x) && x.mode === _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.UnionMode.Dense; }\n /** @nocollapse */ static isSparseUnion(x) { return DataType.isUnion(x) && x.mode === _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.UnionMode.Sparse; }\n get typeId() { return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.NONE; }\n}\n_a = Symbol.toStringTag;\nDataType[_a] = ((proto) => {\n proto.children = null;\n proto.ArrayType = Array;\n return proto[Symbol.toStringTag] = 'DataType';\n})(DataType.prototype);\n/** @ignore */\nclass Null extends DataType {\n toString() { return `Null`; }\n get typeId() { return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Null; }\n}\n_b = Symbol.toStringTag;\nNull[_b] = ((proto) => proto[Symbol.toStringTag] = 'Null')(Null.prototype);\n/** @ignore */\nclass Int_ extends DataType {\n constructor(isSigned, bitWidth) {\n super();\n this.isSigned = isSigned;\n this.bitWidth = bitWidth;\n }\n get typeId() { return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Int; }\n get ArrayType() {\n switch (this.bitWidth) {\n case 8: return this.isSigned ? Int8Array : Uint8Array;\n case 16: return this.isSigned ? Int16Array : Uint16Array;\n case 32: return this.isSigned ? Int32Array : Uint32Array;\n case 64: return this.isSigned ? _util_compat_mjs__WEBPACK_IMPORTED_MODULE_1__.BigInt64Array : _util_compat_mjs__WEBPACK_IMPORTED_MODULE_1__.BigUint64Array;\n }\n throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`);\n }\n toString() { return `${this.isSigned ? `I` : `Ui`}nt${this.bitWidth}`; }\n}\n_c = Symbol.toStringTag;\nInt_[_c] = ((proto) => {\n proto.isSigned = null;\n proto.bitWidth = null;\n return proto[Symbol.toStringTag] = 'Int';\n})(Int_.prototype);\n\n/** @ignore */\nclass Int8 extends Int_ {\n constructor() { super(true, 8); }\n get ArrayType() { return Int8Array; }\n}\n/** @ignore */\nclass Int16 extends Int_ {\n constructor() { super(true, 16); }\n get ArrayType() { return Int16Array; }\n}\n/** @ignore */\nclass Int32 extends Int_ {\n constructor() { super(true, 32); }\n get ArrayType() { return Int32Array; }\n}\n/** @ignore */\nclass Int64 extends Int_ {\n constructor() { super(true, 64); }\n get ArrayType() { return _util_compat_mjs__WEBPACK_IMPORTED_MODULE_1__.BigInt64Array; }\n}\n/** @ignore */\nclass Uint8 extends Int_ {\n constructor() { super(false, 8); }\n get ArrayType() { return Uint8Array; }\n}\n/** @ignore */\nclass Uint16 extends Int_ {\n constructor() { super(false, 16); }\n get ArrayType() { return Uint16Array; }\n}\n/** @ignore */\nclass Uint32 extends Int_ {\n constructor() { super(false, 32); }\n get ArrayType() { return Uint32Array; }\n}\n/** @ignore */\nclass Uint64 extends Int_ {\n constructor() { super(false, 64); }\n get ArrayType() { return _util_compat_mjs__WEBPACK_IMPORTED_MODULE_1__.BigUint64Array; }\n}\nObject.defineProperty(Int8.prototype, 'ArrayType', { value: Int8Array });\nObject.defineProperty(Int16.prototype, 'ArrayType', { value: Int16Array });\nObject.defineProperty(Int32.prototype, 'ArrayType', { value: Int32Array });\nObject.defineProperty(Int64.prototype, 'ArrayType', { value: _util_compat_mjs__WEBPACK_IMPORTED_MODULE_1__.BigInt64Array });\nObject.defineProperty(Uint8.prototype, 'ArrayType', { value: Uint8Array });\nObject.defineProperty(Uint16.prototype, 'ArrayType', { value: Uint16Array });\nObject.defineProperty(Uint32.prototype, 'ArrayType', { value: Uint32Array });\nObject.defineProperty(Uint64.prototype, 'ArrayType', { value: _util_compat_mjs__WEBPACK_IMPORTED_MODULE_1__.BigUint64Array });\n/** @ignore */\nclass Float extends DataType {\n constructor(precision) {\n super();\n this.precision = precision;\n }\n get typeId() { return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Float; }\n get ArrayType() {\n switch (this.precision) {\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Precision.HALF: return Uint16Array;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Precision.SINGLE: return Float32Array;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Precision.DOUBLE: return Float64Array;\n }\n // @ts-ignore\n throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`);\n }\n toString() { return `Float${(this.precision << 5) || 16}`; }\n}\n_d = Symbol.toStringTag;\nFloat[_d] = ((proto) => {\n proto.precision = null;\n return proto[Symbol.toStringTag] = 'Float';\n})(Float.prototype);\n/** @ignore */\nclass Float16 extends Float {\n constructor() { super(_enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Precision.HALF); }\n}\n/** @ignore */\nclass Float32 extends Float {\n constructor() { super(_enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Precision.SINGLE); }\n}\n/** @ignore */\nclass Float64 extends Float {\n constructor() { super(_enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Precision.DOUBLE); }\n}\nObject.defineProperty(Float16.prototype, 'ArrayType', { value: Uint16Array });\nObject.defineProperty(Float32.prototype, 'ArrayType', { value: Float32Array });\nObject.defineProperty(Float64.prototype, 'ArrayType', { value: Float64Array });\n/** @ignore */\nclass Binary extends DataType {\n constructor() {\n super();\n }\n get typeId() { return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Binary; }\n toString() { return `Binary`; }\n}\n_e = Symbol.toStringTag;\nBinary[_e] = ((proto) => {\n proto.ArrayType = Uint8Array;\n return proto[Symbol.toStringTag] = 'Binary';\n})(Binary.prototype);\n/** @ignore */\nclass Utf8 extends DataType {\n constructor() {\n super();\n }\n get typeId() { return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Utf8; }\n toString() { return `Utf8`; }\n}\n_f = Symbol.toStringTag;\nUtf8[_f] = ((proto) => {\n proto.ArrayType = Uint8Array;\n return proto[Symbol.toStringTag] = 'Utf8';\n})(Utf8.prototype);\n/** @ignore */\nclass Bool extends DataType {\n constructor() {\n super();\n }\n get typeId() { return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Bool; }\n toString() { return `Bool`; }\n}\n_g = Symbol.toStringTag;\nBool[_g] = ((proto) => {\n proto.ArrayType = Uint8Array;\n return proto[Symbol.toStringTag] = 'Bool';\n})(Bool.prototype);\n/** @ignore */\nclass Decimal extends DataType {\n constructor(scale, precision, bitWidth = 128) {\n super();\n this.scale = scale;\n this.precision = precision;\n this.bitWidth = bitWidth;\n }\n get typeId() { return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Decimal; }\n toString() { return `Decimal[${this.precision}e${this.scale > 0 ? `+` : ``}${this.scale}]`; }\n}\n_h = Symbol.toStringTag;\nDecimal[_h] = ((proto) => {\n proto.scale = null;\n proto.precision = null;\n proto.ArrayType = Uint32Array;\n return proto[Symbol.toStringTag] = 'Decimal';\n})(Decimal.prototype);\n/** @ignore */\nclass Date_ extends DataType {\n constructor(unit) {\n super();\n this.unit = unit;\n }\n get typeId() { return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Date; }\n toString() { return `Date${(this.unit + 1) * 32}<${_enum_mjs__WEBPACK_IMPORTED_MODULE_0__.DateUnit[this.unit]}>`; }\n}\n_j = Symbol.toStringTag;\nDate_[_j] = ((proto) => {\n proto.unit = null;\n proto.ArrayType = Int32Array;\n return proto[Symbol.toStringTag] = 'Date';\n})(Date_.prototype);\n/** @ignore */\nclass DateDay extends Date_ {\n constructor() { super(_enum_mjs__WEBPACK_IMPORTED_MODULE_0__.DateUnit.DAY); }\n}\n/** @ignore */\nclass DateMillisecond extends Date_ {\n constructor() { super(_enum_mjs__WEBPACK_IMPORTED_MODULE_0__.DateUnit.MILLISECOND); }\n}\n/** @ignore */\nclass Time_ extends DataType {\n constructor(unit, bitWidth) {\n super();\n this.unit = unit;\n this.bitWidth = bitWidth;\n }\n get typeId() { return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Time; }\n toString() { return `Time${this.bitWidth}<${_enum_mjs__WEBPACK_IMPORTED_MODULE_0__.TimeUnit[this.unit]}>`; }\n get ArrayType() {\n switch (this.bitWidth) {\n case 32: return Int32Array;\n case 64: return _util_compat_mjs__WEBPACK_IMPORTED_MODULE_1__.BigInt64Array;\n }\n // @ts-ignore\n throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`);\n }\n}\n_k = Symbol.toStringTag;\nTime_[_k] = ((proto) => {\n proto.unit = null;\n proto.bitWidth = null;\n return proto[Symbol.toStringTag] = 'Time';\n})(Time_.prototype);\n\n/** @ignore */\nclass TimeSecond extends Time_ {\n constructor() { super(_enum_mjs__WEBPACK_IMPORTED_MODULE_0__.TimeUnit.SECOND, 32); }\n}\n/** @ignore */\nclass TimeMillisecond extends Time_ {\n constructor() { super(_enum_mjs__WEBPACK_IMPORTED_MODULE_0__.TimeUnit.MILLISECOND, 32); }\n}\n/** @ignore */\nclass TimeMicrosecond extends Time_ {\n constructor() { super(_enum_mjs__WEBPACK_IMPORTED_MODULE_0__.TimeUnit.MICROSECOND, 64); }\n}\n/** @ignore */\nclass TimeNanosecond extends Time_ {\n constructor() { super(_enum_mjs__WEBPACK_IMPORTED_MODULE_0__.TimeUnit.NANOSECOND, 64); }\n}\n/** @ignore */\nclass Timestamp_ extends DataType {\n constructor(unit, timezone) {\n super();\n this.unit = unit;\n this.timezone = timezone;\n }\n get typeId() { return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Timestamp; }\n toString() { return `Timestamp<${_enum_mjs__WEBPACK_IMPORTED_MODULE_0__.TimeUnit[this.unit]}${this.timezone ? `, ${this.timezone}` : ``}>`; }\n}\n_l = Symbol.toStringTag;\nTimestamp_[_l] = ((proto) => {\n proto.unit = null;\n proto.timezone = null;\n proto.ArrayType = Int32Array;\n return proto[Symbol.toStringTag] = 'Timestamp';\n})(Timestamp_.prototype);\n\n/** @ignore */\nclass TimestampSecond extends Timestamp_ {\n constructor(timezone) { super(_enum_mjs__WEBPACK_IMPORTED_MODULE_0__.TimeUnit.SECOND, timezone); }\n}\n/** @ignore */\nclass TimestampMillisecond extends Timestamp_ {\n constructor(timezone) { super(_enum_mjs__WEBPACK_IMPORTED_MODULE_0__.TimeUnit.MILLISECOND, timezone); }\n}\n/** @ignore */\nclass TimestampMicrosecond extends Timestamp_ {\n constructor(timezone) { super(_enum_mjs__WEBPACK_IMPORTED_MODULE_0__.TimeUnit.MICROSECOND, timezone); }\n}\n/** @ignore */\nclass TimestampNanosecond extends Timestamp_ {\n constructor(timezone) { super(_enum_mjs__WEBPACK_IMPORTED_MODULE_0__.TimeUnit.NANOSECOND, timezone); }\n}\n/** @ignore */\nclass Interval_ extends DataType {\n constructor(unit) {\n super();\n this.unit = unit;\n }\n get typeId() { return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Interval; }\n toString() { return `Interval<${_enum_mjs__WEBPACK_IMPORTED_MODULE_0__.IntervalUnit[this.unit]}>`; }\n}\n_m = Symbol.toStringTag;\nInterval_[_m] = ((proto) => {\n proto.unit = null;\n proto.ArrayType = Int32Array;\n return proto[Symbol.toStringTag] = 'Interval';\n})(Interval_.prototype);\n\n/** @ignore */\nclass IntervalDayTime extends Interval_ {\n constructor() { super(_enum_mjs__WEBPACK_IMPORTED_MODULE_0__.IntervalUnit.DAY_TIME); }\n}\n/** @ignore */\nclass IntervalYearMonth extends Interval_ {\n constructor() { super(_enum_mjs__WEBPACK_IMPORTED_MODULE_0__.IntervalUnit.YEAR_MONTH); }\n}\n/** @ignore */\nclass List extends DataType {\n constructor(child) {\n super();\n this.children = [child];\n }\n get typeId() { return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.List; }\n toString() { return `List<${this.valueType}>`; }\n get valueType() { return this.children[0].type; }\n get valueField() { return this.children[0]; }\n get ArrayType() { return this.valueType.ArrayType; }\n}\n_o = Symbol.toStringTag;\nList[_o] = ((proto) => {\n proto.children = null;\n return proto[Symbol.toStringTag] = 'List';\n})(List.prototype);\n/** @ignore */\nclass Struct extends DataType {\n constructor(children) {\n super();\n this.children = children;\n }\n get typeId() { return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Struct; }\n toString() { return `Struct<{${this.children.map((f) => `${f.name}:${f.type}`).join(`, `)}}>`; }\n}\n_p = Symbol.toStringTag;\nStruct[_p] = ((proto) => {\n proto.children = null;\n return proto[Symbol.toStringTag] = 'Struct';\n})(Struct.prototype);\n/** @ignore */\nclass Union_ extends DataType {\n constructor(mode, typeIds, children) {\n super();\n this.mode = mode;\n this.children = children;\n this.typeIds = typeIds = Int32Array.from(typeIds);\n this.typeIdToChildIndex = typeIds.reduce((typeIdToChildIndex, typeId, idx) => (typeIdToChildIndex[typeId] = idx) && typeIdToChildIndex || typeIdToChildIndex, Object.create(null));\n }\n get typeId() { return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Union; }\n toString() {\n return `${this[Symbol.toStringTag]}<${this.children.map((x) => `${x.type}`).join(` | `)}>`;\n }\n}\n_q = Symbol.toStringTag;\nUnion_[_q] = ((proto) => {\n proto.mode = null;\n proto.typeIds = null;\n proto.children = null;\n proto.typeIdToChildIndex = null;\n proto.ArrayType = Int8Array;\n return proto[Symbol.toStringTag] = 'Union';\n})(Union_.prototype);\n\n/** @ignore */\nclass DenseUnion extends Union_ {\n constructor(typeIds, children) {\n super(_enum_mjs__WEBPACK_IMPORTED_MODULE_0__.UnionMode.Dense, typeIds, children);\n }\n}\n/** @ignore */\nclass SparseUnion extends Union_ {\n constructor(typeIds, children) {\n super(_enum_mjs__WEBPACK_IMPORTED_MODULE_0__.UnionMode.Sparse, typeIds, children);\n }\n}\n/** @ignore */\nclass FixedSizeBinary extends DataType {\n constructor(byteWidth) {\n super();\n this.byteWidth = byteWidth;\n }\n get typeId() { return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.FixedSizeBinary; }\n toString() { return `FixedSizeBinary[${this.byteWidth}]`; }\n}\n_r = Symbol.toStringTag;\nFixedSizeBinary[_r] = ((proto) => {\n proto.byteWidth = null;\n proto.ArrayType = Uint8Array;\n return proto[Symbol.toStringTag] = 'FixedSizeBinary';\n})(FixedSizeBinary.prototype);\n/** @ignore */\nclass FixedSizeList extends DataType {\n constructor(listSize, child) {\n super();\n this.listSize = listSize;\n this.children = [child];\n }\n get typeId() { return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.FixedSizeList; }\n get valueType() { return this.children[0].type; }\n get valueField() { return this.children[0]; }\n get ArrayType() { return this.valueType.ArrayType; }\n toString() { return `FixedSizeList[${this.listSize}]<${this.valueType}>`; }\n}\n_s = Symbol.toStringTag;\nFixedSizeList[_s] = ((proto) => {\n proto.children = null;\n proto.listSize = null;\n return proto[Symbol.toStringTag] = 'FixedSizeList';\n})(FixedSizeList.prototype);\n/** @ignore */\nclass Map_ extends DataType {\n constructor(child, keysSorted = false) {\n super();\n this.children = [child];\n this.keysSorted = keysSorted;\n }\n get typeId() { return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Map; }\n get keyType() { return this.children[0].type.children[0].type; }\n get valueType() { return this.children[0].type.children[1].type; }\n get childType() { return this.children[0].type; }\n toString() { return `Map<{${this.children[0].type.children.map((f) => `${f.name}:${f.type}`).join(`, `)}}>`; }\n}\n_t = Symbol.toStringTag;\nMap_[_t] = ((proto) => {\n proto.children = null;\n proto.keysSorted = null;\n return proto[Symbol.toStringTag] = 'Map_';\n})(Map_.prototype);\n/** @ignore */\nconst getId = ((atomicDictionaryId) => () => ++atomicDictionaryId)(-1);\n/** @ignore */\nclass Dictionary extends DataType {\n constructor(dictionary, indices, id, isOrdered) {\n super();\n this.indices = indices;\n this.dictionary = dictionary;\n this.isOrdered = isOrdered || false;\n this.id = id == null ? getId() : (typeof id === 'number' ? id : id.low);\n }\n get typeId() { return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Dictionary; }\n get children() { return this.dictionary.children; }\n get valueType() { return this.dictionary; }\n get ArrayType() { return this.dictionary.ArrayType; }\n toString() { return `Dictionary<${this.indices}, ${this.dictionary}>`; }\n}\n_u = Symbol.toStringTag;\nDictionary[_u] = ((proto) => {\n proto.id = null;\n proto.indices = null;\n proto.isOrdered = null;\n proto.dictionary = null;\n return proto[Symbol.toStringTag] = 'Dictionary';\n})(Dictionary.prototype);\n/** @ignore */\nfunction strideForType(type) {\n const t = type;\n switch (type.typeId) {\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Decimal: return type.bitWidth / 32;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Timestamp: return 2;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Date: return 1 + t.unit;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Interval: return 1 + t.unit;\n // case Type.Int: return 1 + +((t as Int_).bitWidth > 32);\n // case Type.Time: return 1 + +((t as Time_).bitWidth > 32);\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.FixedSizeList: return t.listSize;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.FixedSizeBinary: return t.byteWidth;\n default: return 1;\n }\n}\n\n//# sourceMappingURL=type.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/type.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/util/bit.mjs": +/*!************************************************!*\ + !*** ./node_modules/apache-arrow/util/bit.mjs ***! + \************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ BitIterator: () => (/* binding */ BitIterator),\n/* harmony export */ getBit: () => (/* binding */ getBit),\n/* harmony export */ getBool: () => (/* binding */ getBool),\n/* harmony export */ packBools: () => (/* binding */ packBools),\n/* harmony export */ popcnt_array: () => (/* binding */ popcnt_array),\n/* harmony export */ popcnt_bit_range: () => (/* binding */ popcnt_bit_range),\n/* harmony export */ popcnt_uint32: () => (/* binding */ popcnt_uint32),\n/* harmony export */ setBool: () => (/* binding */ setBool),\n/* harmony export */ truncateBitmap: () => (/* binding */ truncateBitmap)\n/* harmony export */ });\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n/** @ignore */\nfunction getBool(_data, _index, byte, bit) {\n return (byte & 1 << bit) !== 0;\n}\n/** @ignore */\nfunction getBit(_data, _index, byte, bit) {\n return (byte & 1 << bit) >> bit;\n}\n/** @ignore */\nfunction setBool(bytes, index, value) {\n return value ?\n !!(bytes[index >> 3] |= (1 << (index % 8))) || true :\n !(bytes[index >> 3] &= ~(1 << (index % 8))) && false;\n}\n/** @ignore */\nfunction truncateBitmap(offset, length, bitmap) {\n const alignedSize = (bitmap.byteLength + 7) & ~7;\n if (offset > 0 || bitmap.byteLength < alignedSize) {\n const bytes = new Uint8Array(alignedSize);\n // If the offset is a multiple of 8 bits, it's safe to slice the bitmap\n bytes.set(offset % 8 === 0 ? bitmap.subarray(offset >> 3) :\n // Otherwise iterate each bit from the offset and return a new one\n packBools(new BitIterator(bitmap, offset, length, null, getBool)).subarray(0, alignedSize));\n return bytes;\n }\n return bitmap;\n}\n/** @ignore */\nfunction packBools(values) {\n const xs = [];\n let i = 0, bit = 0, byte = 0;\n for (const value of values) {\n value && (byte |= 1 << bit);\n if (++bit === 8) {\n xs[i++] = byte;\n byte = bit = 0;\n }\n }\n if (i === 0 || bit > 0) {\n xs[i++] = byte;\n }\n const b = new Uint8Array((xs.length + 7) & ~7);\n b.set(xs);\n return b;\n}\n/** @ignore */\nclass BitIterator {\n constructor(bytes, begin, length, context, get) {\n this.bytes = bytes;\n this.length = length;\n this.context = context;\n this.get = get;\n this.bit = begin % 8;\n this.byteIndex = begin >> 3;\n this.byte = bytes[this.byteIndex++];\n this.index = 0;\n }\n next() {\n if (this.index < this.length) {\n if (this.bit === 8) {\n this.bit = 0;\n this.byte = this.bytes[this.byteIndex++];\n }\n return {\n value: this.get(this.context, this.index++, this.byte, this.bit++)\n };\n }\n return { done: true, value: null };\n }\n [Symbol.iterator]() {\n return this;\n }\n}\n/**\n * Compute the population count (the number of bits set to 1) for a range of bits in a Uint8Array.\n * @param vector The Uint8Array of bits for which to compute the population count.\n * @param lhs The range's left-hand side (or start) bit\n * @param rhs The range's right-hand side (or end) bit\n */\n/** @ignore */\nfunction popcnt_bit_range(data, lhs, rhs) {\n if (rhs - lhs <= 0) {\n return 0;\n }\n // If the bit range is less than one byte, sum the 1 bits in the bit range\n if (rhs - lhs < 8) {\n let sum = 0;\n for (const bit of new BitIterator(data, lhs, rhs - lhs, data, getBit)) {\n sum += bit;\n }\n return sum;\n }\n // Get the next lowest multiple of 8 from the right hand side\n const rhsInside = rhs >> 3 << 3;\n // Get the next highest multiple of 8 from the left hand side\n const lhsInside = lhs + (lhs % 8 === 0 ? 0 : 8 - lhs % 8);\n return (\n // Get the popcnt of bits between the left hand side, and the next highest multiple of 8\n popcnt_bit_range(data, lhs, lhsInside) +\n // Get the popcnt of bits between the right hand side, and the next lowest multiple of 8\n popcnt_bit_range(data, rhsInside, rhs) +\n // Get the popcnt of all bits between the left and right hand sides' multiples of 8\n popcnt_array(data, lhsInside >> 3, (rhsInside - lhsInside) >> 3));\n}\n/** @ignore */\nfunction popcnt_array(arr, byteOffset, byteLength) {\n let cnt = 0, pos = Math.trunc(byteOffset);\n const view = new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n const len = byteLength === void 0 ? arr.byteLength : pos + byteLength;\n while (len - pos >= 4) {\n cnt += popcnt_uint32(view.getUint32(pos));\n pos += 4;\n }\n while (len - pos >= 2) {\n cnt += popcnt_uint32(view.getUint16(pos));\n pos += 2;\n }\n while (len - pos >= 1) {\n cnt += popcnt_uint32(view.getUint8(pos));\n pos += 1;\n }\n return cnt;\n}\n/** @ignore */\nfunction popcnt_uint32(uint32) {\n let i = Math.trunc(uint32);\n i = i - ((i >>> 1) & 0x55555555);\n i = (i & 0x33333333) + ((i >>> 2) & 0x33333333);\n return (((i + (i >>> 4)) & 0x0F0F0F0F) * 0x01010101) >>> 24;\n}\n\n//# sourceMappingURL=bit.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/util/bit.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/util/bn.mjs": +/*!***********************************************!*\ + !*** ./node_modules/apache-arrow/util/bn.mjs ***! + \***********************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ BN: () => (/* binding */ BN),\n/* harmony export */ bignumToBigInt: () => (/* binding */ bignumToBigInt),\n/* harmony export */ bignumToString: () => (/* binding */ bignumToString),\n/* harmony export */ isArrowBigNumSymbol: () => (/* binding */ isArrowBigNumSymbol)\n/* harmony export */ });\n/* harmony import */ var _buffer_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./buffer.mjs */ \"./node_modules/apache-arrow/util/buffer.mjs\");\n/* harmony import */ var _compat_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./compat.mjs */ \"./node_modules/apache-arrow/util/compat.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n/** @ignore */\nconst isArrowBigNumSymbol = Symbol.for('isArrowBigNum');\n/** @ignore */\nfunction BigNum(x, ...xs) {\n if (xs.length === 0) {\n return Object.setPrototypeOf((0,_buffer_mjs__WEBPACK_IMPORTED_MODULE_0__.toArrayBufferView)(this['TypedArray'], x), this.constructor.prototype);\n }\n return Object.setPrototypeOf(new this['TypedArray'](x, ...xs), this.constructor.prototype);\n}\nBigNum.prototype[isArrowBigNumSymbol] = true;\nBigNum.prototype.toJSON = function () { return `\"${bignumToString(this)}\"`; };\nBigNum.prototype.valueOf = function () { return bignumToNumber(this); };\nBigNum.prototype.toString = function () { return bignumToString(this); };\nBigNum.prototype[Symbol.toPrimitive] = function (hint = 'default') {\n switch (hint) {\n case 'number': return bignumToNumber(this);\n case 'string': return bignumToString(this);\n case 'default': return bignumToBigInt(this);\n }\n // @ts-ignore\n return bignumToString(this);\n};\n/** @ignore */\nfunction SignedBigNum(...args) { return BigNum.apply(this, args); }\n/** @ignore */\nfunction UnsignedBigNum(...args) { return BigNum.apply(this, args); }\n/** @ignore */\nfunction DecimalBigNum(...args) { return BigNum.apply(this, args); }\nObject.setPrototypeOf(SignedBigNum.prototype, Object.create(Int32Array.prototype));\nObject.setPrototypeOf(UnsignedBigNum.prototype, Object.create(Uint32Array.prototype));\nObject.setPrototypeOf(DecimalBigNum.prototype, Object.create(Uint32Array.prototype));\nObject.assign(SignedBigNum.prototype, BigNum.prototype, { 'constructor': SignedBigNum, 'signed': true, 'TypedArray': Int32Array, 'BigIntArray': _compat_mjs__WEBPACK_IMPORTED_MODULE_1__.BigInt64Array });\nObject.assign(UnsignedBigNum.prototype, BigNum.prototype, { 'constructor': UnsignedBigNum, 'signed': false, 'TypedArray': Uint32Array, 'BigIntArray': _compat_mjs__WEBPACK_IMPORTED_MODULE_1__.BigUint64Array });\nObject.assign(DecimalBigNum.prototype, BigNum.prototype, { 'constructor': DecimalBigNum, 'signed': true, 'TypedArray': Uint32Array, 'BigIntArray': _compat_mjs__WEBPACK_IMPORTED_MODULE_1__.BigUint64Array });\n/** @ignore */\nfunction bignumToNumber(bn) {\n const { buffer, byteOffset, length, 'signed': signed } = bn;\n const words = new _compat_mjs__WEBPACK_IMPORTED_MODULE_1__.BigUint64Array(buffer, byteOffset, length);\n const negative = signed && words[words.length - 1] & (BigInt(1) << BigInt(63));\n let number = negative ? BigInt(1) : BigInt(0);\n let i = BigInt(0);\n if (!negative) {\n for (const word of words) {\n number += word * (BigInt(1) << (BigInt(32) * i++));\n }\n }\n else {\n for (const word of words) {\n number += ~word * (BigInt(1) << (BigInt(32) * i++));\n }\n number *= BigInt(-1);\n }\n return number;\n}\n/** @ignore */\nlet bignumToString;\n/** @ignore */\nlet bignumToBigInt;\nif (!_compat_mjs__WEBPACK_IMPORTED_MODULE_1__.BigIntAvailable) {\n bignumToString = decimalToString;\n bignumToBigInt = bignumToString;\n}\nelse {\n bignumToBigInt = ((a) => a.byteLength === 8 ? new a['BigIntArray'](a.buffer, a.byteOffset, 1)[0] : decimalToString(a));\n bignumToString = ((a) => a.byteLength === 8 ? `${new a['BigIntArray'](a.buffer, a.byteOffset, 1)[0]}` : decimalToString(a));\n}\n/** @ignore */\nfunction decimalToString(a) {\n let digits = '';\n const base64 = new Uint32Array(2);\n let base32 = new Uint16Array(a.buffer, a.byteOffset, a.byteLength / 2);\n const checks = new Uint32Array((base32 = new Uint16Array(base32).reverse()).buffer);\n let i = -1;\n const n = base32.length - 1;\n do {\n for (base64[0] = base32[i = 0]; i < n;) {\n base32[i++] = base64[1] = base64[0] / 10;\n base64[0] = ((base64[0] - base64[1] * 10) << 16) + base32[i];\n }\n base32[i] = base64[1] = base64[0] / 10;\n base64[0] = base64[0] - base64[1] * 10;\n digits = `${base64[0]}${digits}`;\n } while (checks[0] || checks[1] || checks[2] || checks[3]);\n return digits !== null && digits !== void 0 ? digits : `0`;\n}\n/** @ignore */\nclass BN {\n /** @nocollapse */\n static new(num, isSigned) {\n switch (isSigned) {\n case true: return new SignedBigNum(num);\n case false: return new UnsignedBigNum(num);\n }\n switch (num.constructor) {\n case Int8Array:\n case Int16Array:\n case Int32Array:\n case _compat_mjs__WEBPACK_IMPORTED_MODULE_1__.BigInt64Array:\n return new SignedBigNum(num);\n }\n if (num.byteLength === 16) {\n return new DecimalBigNum(num);\n }\n return new UnsignedBigNum(num);\n }\n /** @nocollapse */\n static signed(num) {\n return new SignedBigNum(num);\n }\n /** @nocollapse */\n static unsigned(num) {\n return new UnsignedBigNum(num);\n }\n /** @nocollapse */\n static decimal(num) {\n return new DecimalBigNum(num);\n }\n constructor(num, isSigned) {\n return BN.new(num, isSigned);\n }\n}\n\n//# sourceMappingURL=bn.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/util/bn.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/util/buffer.mjs": +/*!***************************************************!*\ + !*** ./node_modules/apache-arrow/util/buffer.mjs ***! + \***************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ compareArrayLike: () => (/* binding */ compareArrayLike),\n/* harmony export */ joinUint8Arrays: () => (/* binding */ joinUint8Arrays),\n/* harmony export */ memcpy: () => (/* binding */ memcpy),\n/* harmony export */ rebaseValueOffsets: () => (/* binding */ rebaseValueOffsets),\n/* harmony export */ toArrayBufferView: () => (/* binding */ toArrayBufferView),\n/* harmony export */ toArrayBufferViewAsyncIterator: () => (/* binding */ toArrayBufferViewAsyncIterator),\n/* harmony export */ toArrayBufferViewIterator: () => (/* binding */ toArrayBufferViewIterator),\n/* harmony export */ toBigInt64Array: () => (/* binding */ toBigInt64Array),\n/* harmony export */ toBigUint64Array: () => (/* binding */ toBigUint64Array),\n/* harmony export */ toFloat32Array: () => (/* binding */ toFloat32Array),\n/* harmony export */ toFloat32ArrayAsyncIterator: () => (/* binding */ toFloat32ArrayAsyncIterator),\n/* harmony export */ toFloat32ArrayIterator: () => (/* binding */ toFloat32ArrayIterator),\n/* harmony export */ toFloat64Array: () => (/* binding */ toFloat64Array),\n/* harmony export */ toFloat64ArrayAsyncIterator: () => (/* binding */ toFloat64ArrayAsyncIterator),\n/* harmony export */ toFloat64ArrayIterator: () => (/* binding */ toFloat64ArrayIterator),\n/* harmony export */ toInt16Array: () => (/* binding */ toInt16Array),\n/* harmony export */ toInt16ArrayAsyncIterator: () => (/* binding */ toInt16ArrayAsyncIterator),\n/* harmony export */ toInt16ArrayIterator: () => (/* binding */ toInt16ArrayIterator),\n/* harmony export */ toInt32Array: () => (/* binding */ toInt32Array),\n/* harmony export */ toInt32ArrayAsyncIterator: () => (/* binding */ toInt32ArrayAsyncIterator),\n/* harmony export */ toInt32ArrayIterator: () => (/* binding */ toInt32ArrayIterator),\n/* harmony export */ toInt8Array: () => (/* binding */ toInt8Array),\n/* harmony export */ toInt8ArrayAsyncIterator: () => (/* binding */ toInt8ArrayAsyncIterator),\n/* harmony export */ toInt8ArrayIterator: () => (/* binding */ toInt8ArrayIterator),\n/* harmony export */ toUint16Array: () => (/* binding */ toUint16Array),\n/* harmony export */ toUint16ArrayAsyncIterator: () => (/* binding */ toUint16ArrayAsyncIterator),\n/* harmony export */ toUint16ArrayIterator: () => (/* binding */ toUint16ArrayIterator),\n/* harmony export */ toUint32Array: () => (/* binding */ toUint32Array),\n/* harmony export */ toUint32ArrayAsyncIterator: () => (/* binding */ toUint32ArrayAsyncIterator),\n/* harmony export */ toUint32ArrayIterator: () => (/* binding */ toUint32ArrayIterator),\n/* harmony export */ toUint8Array: () => (/* binding */ toUint8Array),\n/* harmony export */ toUint8ArrayAsyncIterator: () => (/* binding */ toUint8ArrayAsyncIterator),\n/* harmony export */ toUint8ArrayIterator: () => (/* binding */ toUint8ArrayIterator),\n/* harmony export */ toUint8ClampedArray: () => (/* binding */ toUint8ClampedArray),\n/* harmony export */ toUint8ClampedArrayAsyncIterator: () => (/* binding */ toUint8ClampedArrayAsyncIterator),\n/* harmony export */ toUint8ClampedArrayIterator: () => (/* binding */ toUint8ClampedArrayIterator)\n/* harmony export */ });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ \"./node_modules/tslib/tslib.es6.mjs\");\n/* harmony import */ var _util_utf8_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/utf8.mjs */ \"./node_modules/apache-arrow/util/utf8.mjs\");\n/* harmony import */ var _compat_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./compat.mjs */ \"./node_modules/apache-arrow/util/compat.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n\n/** @ignore */\nconst SharedArrayBuf = (typeof SharedArrayBuffer !== 'undefined' ? SharedArrayBuffer : ArrayBuffer);\n/** @ignore */\nfunction collapseContiguousByteRanges(chunks) {\n const result = chunks[0] ? [chunks[0]] : [];\n let xOffset, yOffset, xLen, yLen;\n for (let x, y, i = 0, j = 0, n = chunks.length; ++i < n;) {\n x = result[j];\n y = chunks[i];\n // continue if x and y don't share the same underlying ArrayBuffer, or if x isn't before y\n if (!x || !y || x.buffer !== y.buffer || y.byteOffset < x.byteOffset) {\n y && (result[++j] = y);\n continue;\n }\n ({ byteOffset: xOffset, byteLength: xLen } = x);\n ({ byteOffset: yOffset, byteLength: yLen } = y);\n // continue if the byte ranges of x and y aren't contiguous\n if ((xOffset + xLen) < yOffset || (yOffset + yLen) < xOffset) {\n y && (result[++j] = y);\n continue;\n }\n result[j] = new Uint8Array(x.buffer, xOffset, yOffset - xOffset + yLen);\n }\n return result;\n}\n/** @ignore */\nfunction memcpy(target, source, targetByteOffset = 0, sourceByteLength = source.byteLength) {\n const targetByteLength = target.byteLength;\n const dst = new Uint8Array(target.buffer, target.byteOffset, targetByteLength);\n const src = new Uint8Array(source.buffer, source.byteOffset, Math.min(sourceByteLength, targetByteLength));\n dst.set(src, targetByteOffset);\n return target;\n}\n/** @ignore */\nfunction joinUint8Arrays(chunks, size) {\n // collapse chunks that share the same underlying ArrayBuffer and whose byte ranges overlap,\n // to avoid unnecessarily copying the bytes to do this buffer join. This is a common case during\n // streaming, where we may be reading partial byte ranges out of the same underlying ArrayBuffer\n const result = collapseContiguousByteRanges(chunks);\n const byteLength = result.reduce((x, b) => x + b.byteLength, 0);\n let source, sliced, buffer;\n let offset = 0, index = -1;\n const length = Math.min(size || Number.POSITIVE_INFINITY, byteLength);\n for (const n = result.length; ++index < n;) {\n source = result[index];\n sliced = source.subarray(0, Math.min(source.length, length - offset));\n if (length <= (offset + sliced.length)) {\n if (sliced.length < source.length) {\n result[index] = source.subarray(sliced.length);\n }\n else if (sliced.length === source.length) {\n index++;\n }\n buffer ? memcpy(buffer, sliced, offset) : (buffer = sliced);\n break;\n }\n memcpy(buffer || (buffer = new Uint8Array(length)), sliced, offset);\n offset += sliced.length;\n }\n return [buffer || new Uint8Array(0), result.slice(index), byteLength - (buffer ? buffer.byteLength : 0)];\n}\n/** @ignore */\nfunction toArrayBufferView(ArrayBufferViewCtor, input) {\n let value = (0,_compat_mjs__WEBPACK_IMPORTED_MODULE_0__.isIteratorResult)(input) ? input.value : input;\n if (value instanceof ArrayBufferViewCtor) {\n if (ArrayBufferViewCtor === Uint8Array) {\n // Node's `Buffer` class passes the `instanceof Uint8Array` check, but we need\n // a real Uint8Array, since Buffer#slice isn't the same as Uint8Array#slice :/\n return new ArrayBufferViewCtor(value.buffer, value.byteOffset, value.byteLength);\n }\n return value;\n }\n if (!value) {\n return new ArrayBufferViewCtor(0);\n }\n if (typeof value === 'string') {\n value = (0,_util_utf8_mjs__WEBPACK_IMPORTED_MODULE_1__.encodeUtf8)(value);\n }\n if (value instanceof ArrayBuffer) {\n return new ArrayBufferViewCtor(value);\n }\n if (value instanceof SharedArrayBuf) {\n return new ArrayBufferViewCtor(value);\n }\n if ((0,_compat_mjs__WEBPACK_IMPORTED_MODULE_0__.isFlatbuffersByteBuffer)(value)) {\n return toArrayBufferView(ArrayBufferViewCtor, value.bytes());\n }\n return !ArrayBuffer.isView(value) ? ArrayBufferViewCtor.from(value) : (value.byteLength <= 0 ? new ArrayBufferViewCtor(0)\n : new ArrayBufferViewCtor(value.buffer, value.byteOffset, value.byteLength / ArrayBufferViewCtor.BYTES_PER_ELEMENT));\n}\n/** @ignore */ const toInt8Array = (input) => toArrayBufferView(Int8Array, input);\n/** @ignore */ const toInt16Array = (input) => toArrayBufferView(Int16Array, input);\n/** @ignore */ const toInt32Array = (input) => toArrayBufferView(Int32Array, input);\n/** @ignore */ const toBigInt64Array = (input) => toArrayBufferView(_compat_mjs__WEBPACK_IMPORTED_MODULE_0__.BigInt64Array, input);\n/** @ignore */ const toUint8Array = (input) => toArrayBufferView(Uint8Array, input);\n/** @ignore */ const toUint16Array = (input) => toArrayBufferView(Uint16Array, input);\n/** @ignore */ const toUint32Array = (input) => toArrayBufferView(Uint32Array, input);\n/** @ignore */ const toBigUint64Array = (input) => toArrayBufferView(_compat_mjs__WEBPACK_IMPORTED_MODULE_0__.BigUint64Array, input);\n/** @ignore */ const toFloat32Array = (input) => toArrayBufferView(Float32Array, input);\n/** @ignore */ const toFloat64Array = (input) => toArrayBufferView(Float64Array, input);\n/** @ignore */ const toUint8ClampedArray = (input) => toArrayBufferView(Uint8ClampedArray, input);\n/** @ignore */\nconst pump = (iterator) => { iterator.next(); return iterator; };\n/** @ignore */\nfunction* toArrayBufferViewIterator(ArrayCtor, source) {\n const wrap = function* (x) { yield x; };\n const buffers = (typeof source === 'string') ? wrap(source)\n : (ArrayBuffer.isView(source)) ? wrap(source)\n : (source instanceof ArrayBuffer) ? wrap(source)\n : (source instanceof SharedArrayBuf) ? wrap(source)\n : !(0,_compat_mjs__WEBPACK_IMPORTED_MODULE_0__.isIterable)(source) ? wrap(source) : source;\n yield* pump((function* (it) {\n let r = null;\n do {\n r = it.next(yield toArrayBufferView(ArrayCtor, r));\n } while (!r.done);\n })(buffers[Symbol.iterator]()));\n return new ArrayCtor();\n}\n/** @ignore */ const toInt8ArrayIterator = (input) => toArrayBufferViewIterator(Int8Array, input);\n/** @ignore */ const toInt16ArrayIterator = (input) => toArrayBufferViewIterator(Int16Array, input);\n/** @ignore */ const toInt32ArrayIterator = (input) => toArrayBufferViewIterator(Int32Array, input);\n/** @ignore */ const toUint8ArrayIterator = (input) => toArrayBufferViewIterator(Uint8Array, input);\n/** @ignore */ const toUint16ArrayIterator = (input) => toArrayBufferViewIterator(Uint16Array, input);\n/** @ignore */ const toUint32ArrayIterator = (input) => toArrayBufferViewIterator(Uint32Array, input);\n/** @ignore */ const toFloat32ArrayIterator = (input) => toArrayBufferViewIterator(Float32Array, input);\n/** @ignore */ const toFloat64ArrayIterator = (input) => toArrayBufferViewIterator(Float64Array, input);\n/** @ignore */ const toUint8ClampedArrayIterator = (input) => toArrayBufferViewIterator(Uint8ClampedArray, input);\n/** @ignore */\nfunction toArrayBufferViewAsyncIterator(ArrayCtor, source) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__asyncGenerator)(this, arguments, function* toArrayBufferViewAsyncIterator_1() {\n // if a Promise, unwrap the Promise and iterate the resolved value\n if ((0,_compat_mjs__WEBPACK_IMPORTED_MODULE_0__.isPromise)(source)) {\n return yield (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__await)(yield (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__await)(yield* (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__asyncDelegator)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__asyncValues)(toArrayBufferViewAsyncIterator(ArrayCtor, yield (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__await)(source))))));\n }\n const wrap = function (x) { return (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__asyncGenerator)(this, arguments, function* () { yield yield (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__await)(yield (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__await)(x)); }); };\n const emit = function (source) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__asyncGenerator)(this, arguments, function* () {\n yield (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__await)(yield* (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__asyncDelegator)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__asyncValues)(pump((function* (it) {\n let r = null;\n do {\n r = it.next(yield r === null || r === void 0 ? void 0 : r.value);\n } while (!r.done);\n })(source[Symbol.iterator]())))));\n });\n };\n const buffers = (typeof source === 'string') ? wrap(source) // if string, wrap in an AsyncIterableIterator\n : (ArrayBuffer.isView(source)) ? wrap(source) // if TypedArray, wrap in an AsyncIterableIterator\n : (source instanceof ArrayBuffer) ? wrap(source) // if ArrayBuffer, wrap in an AsyncIterableIterator\n : (source instanceof SharedArrayBuf) ? wrap(source) // if SharedArrayBuffer, wrap in an AsyncIterableIterator\n : (0,_compat_mjs__WEBPACK_IMPORTED_MODULE_0__.isIterable)(source) ? emit(source) // If Iterable, wrap in an AsyncIterableIterator and compose the `next` values\n : !(0,_compat_mjs__WEBPACK_IMPORTED_MODULE_0__.isAsyncIterable)(source) ? wrap(source) // If not an AsyncIterable, treat as a sentinel and wrap in an AsyncIterableIterator\n : source; // otherwise if AsyncIterable, use it\n yield (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__await)(// otherwise if AsyncIterable, use it\n yield* (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__asyncDelegator)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__asyncValues)(pump((function (it) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__asyncGenerator)(this, arguments, function* () {\n let r = null;\n do {\n r = yield (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__await)(it.next(yield yield (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__await)(toArrayBufferView(ArrayCtor, r))));\n } while (!r.done);\n });\n })(buffers[Symbol.asyncIterator]())))));\n return yield (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__await)(new ArrayCtor());\n });\n}\n/** @ignore */ const toInt8ArrayAsyncIterator = (input) => toArrayBufferViewAsyncIterator(Int8Array, input);\n/** @ignore */ const toInt16ArrayAsyncIterator = (input) => toArrayBufferViewAsyncIterator(Int16Array, input);\n/** @ignore */ const toInt32ArrayAsyncIterator = (input) => toArrayBufferViewAsyncIterator(Int32Array, input);\n/** @ignore */ const toUint8ArrayAsyncIterator = (input) => toArrayBufferViewAsyncIterator(Uint8Array, input);\n/** @ignore */ const toUint16ArrayAsyncIterator = (input) => toArrayBufferViewAsyncIterator(Uint16Array, input);\n/** @ignore */ const toUint32ArrayAsyncIterator = (input) => toArrayBufferViewAsyncIterator(Uint32Array, input);\n/** @ignore */ const toFloat32ArrayAsyncIterator = (input) => toArrayBufferViewAsyncIterator(Float32Array, input);\n/** @ignore */ const toFloat64ArrayAsyncIterator = (input) => toArrayBufferViewAsyncIterator(Float64Array, input);\n/** @ignore */ const toUint8ClampedArrayAsyncIterator = (input) => toArrayBufferViewAsyncIterator(Uint8ClampedArray, input);\n/** @ignore */\nfunction rebaseValueOffsets(offset, length, valueOffsets) {\n // If we have a non-zero offset, create a new offsets array with the values\n // shifted by the start offset, such that the new start offset is 0\n if (offset !== 0) {\n valueOffsets = valueOffsets.slice(0, length + 1);\n for (let i = -1; ++i <= length;) {\n valueOffsets[i] += offset;\n }\n }\n return valueOffsets;\n}\n/** @ignore */\nfunction compareArrayLike(a, b) {\n let i = 0;\n const n = a.length;\n if (n !== b.length) {\n return false;\n }\n if (n > 0) {\n do {\n if (a[i] !== b[i]) {\n return false;\n }\n } while (++i < n);\n }\n return true;\n}\n\n//# sourceMappingURL=buffer.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/util/buffer.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/util/chunk.mjs": +/*!**************************************************!*\ + !*** ./node_modules/apache-arrow/util/chunk.mjs ***! + \**************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ChunkedIterator: () => (/* binding */ ChunkedIterator),\n/* harmony export */ binarySearch: () => (/* binding */ binarySearch),\n/* harmony export */ computeChunkNullCounts: () => (/* binding */ computeChunkNullCounts),\n/* harmony export */ computeChunkOffsets: () => (/* binding */ computeChunkOffsets),\n/* harmony export */ isChunkedValid: () => (/* binding */ isChunkedValid),\n/* harmony export */ sliceChunks: () => (/* binding */ sliceChunks),\n/* harmony export */ wrapChunkedCall1: () => (/* binding */ wrapChunkedCall1),\n/* harmony export */ wrapChunkedCall2: () => (/* binding */ wrapChunkedCall2),\n/* harmony export */ wrapChunkedIndexOf: () => (/* binding */ wrapChunkedIndexOf)\n/* harmony export */ });\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n/** @ignore */\nclass ChunkedIterator {\n constructor(numChunks = 0, getChunkIterator) {\n this.numChunks = numChunks;\n this.getChunkIterator = getChunkIterator;\n this.chunkIndex = 0;\n this.chunkIterator = this.getChunkIterator(0);\n }\n next() {\n while (this.chunkIndex < this.numChunks) {\n const next = this.chunkIterator.next();\n if (!next.done) {\n return next;\n }\n if (++this.chunkIndex < this.numChunks) {\n this.chunkIterator = this.getChunkIterator(this.chunkIndex);\n }\n }\n return { done: true, value: null };\n }\n [Symbol.iterator]() {\n return this;\n }\n}\n/** @ignore */\nfunction computeChunkNullCounts(chunks) {\n return chunks.reduce((nullCount, chunk) => nullCount + chunk.nullCount, 0);\n}\n/** @ignore */\nfunction computeChunkOffsets(chunks) {\n return chunks.reduce((offsets, chunk, index) => {\n offsets[index + 1] = offsets[index] + chunk.length;\n return offsets;\n }, new Uint32Array(chunks.length + 1));\n}\n/** @ignore */\nfunction sliceChunks(chunks, offsets, begin, end) {\n const slices = [];\n for (let i = -1, n = chunks.length; ++i < n;) {\n const chunk = chunks[i];\n const offset = offsets[i];\n const { length } = chunk;\n // Stop if the child is to the right of the slice boundary\n if (offset >= end) {\n break;\n }\n // Exclude children to the left of of the slice boundary\n if (begin >= offset + length) {\n continue;\n }\n // Include entire child if between both left and right boundaries\n if (offset >= begin && (offset + length) <= end) {\n slices.push(chunk);\n continue;\n }\n // Include the child slice that overlaps one of the slice boundaries\n const from = Math.max(0, begin - offset);\n const to = Math.min(end - offset, length);\n slices.push(chunk.slice(from, to - from));\n }\n if (slices.length === 0) {\n slices.push(chunks[0].slice(0, 0));\n }\n return slices;\n}\n/** @ignore */\nfunction binarySearch(chunks, offsets, idx, fn) {\n let lhs = 0, mid = 0, rhs = offsets.length - 1;\n do {\n if (lhs >= rhs - 1) {\n return (idx < offsets[rhs]) ? fn(chunks, lhs, idx - offsets[lhs]) : null;\n }\n mid = lhs + (Math.trunc((rhs - lhs) * .5));\n idx < offsets[mid] ? (rhs = mid) : (lhs = mid);\n } while (lhs < rhs);\n}\n/** @ignore */\nfunction isChunkedValid(data, index) {\n return data.getValid(index);\n}\n/** @ignore */\nfunction wrapChunkedCall1(fn) {\n function chunkedFn(chunks, i, j) { return fn(chunks[i], j); }\n return function (index) {\n const data = this.data;\n return binarySearch(data, this._offsets, index, chunkedFn);\n };\n}\n/** @ignore */\nfunction wrapChunkedCall2(fn) {\n let _2;\n function chunkedFn(chunks, i, j) { return fn(chunks[i], j, _2); }\n return function (index, value) {\n const data = this.data;\n _2 = value;\n const result = binarySearch(data, this._offsets, index, chunkedFn);\n _2 = undefined;\n return result;\n };\n}\n/** @ignore */\nfunction wrapChunkedIndexOf(indexOf) {\n let _1;\n function chunkedIndexOf(data, chunkIndex, fromIndex) {\n let begin = fromIndex, index = 0, total = 0;\n for (let i = chunkIndex - 1, n = data.length; ++i < n;) {\n const chunk = data[i];\n if (~(index = indexOf(chunk, _1, begin))) {\n return total + index;\n }\n begin = 0;\n total += chunk.length;\n }\n return -1;\n }\n return function (element, offset) {\n _1 = element;\n const data = this.data;\n const result = typeof offset !== 'number'\n ? chunkedIndexOf(data, 0, 0)\n : binarySearch(data, this._offsets, offset, chunkedIndexOf);\n _1 = undefined;\n return result;\n };\n}\n\n//# sourceMappingURL=chunk.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/util/chunk.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/util/compat.mjs": +/*!***************************************************!*\ + !*** ./node_modules/apache-arrow/util/compat.mjs ***! + \***************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ BigInt: () => (/* binding */ BigIntCtor),\n/* harmony export */ BigInt64Array: () => (/* binding */ BigInt64ArrayCtor),\n/* harmony export */ BigInt64ArrayAvailable: () => (/* binding */ BigInt64ArrayAvailable),\n/* harmony export */ BigIntAvailable: () => (/* binding */ BigIntAvailable),\n/* harmony export */ BigUint64Array: () => (/* binding */ BigUint64ArrayCtor),\n/* harmony export */ BigUint64ArrayAvailable: () => (/* binding */ BigUint64ArrayAvailable),\n/* harmony export */ isArrayLike: () => (/* binding */ isArrayLike),\n/* harmony export */ isArrowJSON: () => (/* binding */ isArrowJSON),\n/* harmony export */ isAsyncIterable: () => (/* binding */ isAsyncIterable),\n/* harmony export */ isFSReadStream: () => (/* binding */ isFSReadStream),\n/* harmony export */ isFetchResponse: () => (/* binding */ isFetchResponse),\n/* harmony export */ isFileHandle: () => (/* binding */ isFileHandle),\n/* harmony export */ isFlatbuffersByteBuffer: () => (/* binding */ isFlatbuffersByteBuffer),\n/* harmony export */ isIterable: () => (/* binding */ isIterable),\n/* harmony export */ isIteratorResult: () => (/* binding */ isIteratorResult),\n/* harmony export */ isObject: () => (/* binding */ isObject),\n/* harmony export */ isObservable: () => (/* binding */ isObservable),\n/* harmony export */ isPromise: () => (/* binding */ isPromise),\n/* harmony export */ isReadableDOMStream: () => (/* binding */ isReadableDOMStream),\n/* harmony export */ isReadableNodeStream: () => (/* binding */ isReadableNodeStream),\n/* harmony export */ isUnderlyingSink: () => (/* binding */ isUnderlyingSink),\n/* harmony export */ isWritableDOMStream: () => (/* binding */ isWritableDOMStream),\n/* harmony export */ isWritableNodeStream: () => (/* binding */ isWritableNodeStream)\n/* harmony export */ });\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n/** @ignore */\nconst [BigIntCtor, BigIntAvailable] = (() => {\n const BigIntUnavailableError = () => { throw new Error('BigInt is not available in this environment'); };\n function BigIntUnavailable() { throw BigIntUnavailableError(); }\n BigIntUnavailable.asIntN = () => { throw BigIntUnavailableError(); };\n BigIntUnavailable.asUintN = () => { throw BigIntUnavailableError(); };\n return typeof BigInt !== 'undefined' ? [BigInt, true] : [BigIntUnavailable, false];\n})();\n/** @ignore */\nconst [BigInt64ArrayCtor, BigInt64ArrayAvailable] = (() => {\n const BigInt64ArrayUnavailableError = () => { throw new Error('BigInt64Array is not available in this environment'); };\n class BigInt64ArrayUnavailable {\n static get BYTES_PER_ELEMENT() { return 8; }\n static of() { throw BigInt64ArrayUnavailableError(); }\n static from() { throw BigInt64ArrayUnavailableError(); }\n constructor() { throw BigInt64ArrayUnavailableError(); }\n }\n return typeof BigInt64Array !== 'undefined' ? [BigInt64Array, true] : [BigInt64ArrayUnavailable, false];\n})();\n/** @ignore */\nconst [BigUint64ArrayCtor, BigUint64ArrayAvailable] = (() => {\n const BigUint64ArrayUnavailableError = () => { throw new Error('BigUint64Array is not available in this environment'); };\n class BigUint64ArrayUnavailable {\n static get BYTES_PER_ELEMENT() { return 8; }\n static of() { throw BigUint64ArrayUnavailableError(); }\n static from() { throw BigUint64ArrayUnavailableError(); }\n constructor() { throw BigUint64ArrayUnavailableError(); }\n }\n return typeof BigUint64Array !== 'undefined' ? [BigUint64Array, true] : [BigUint64ArrayUnavailable, false];\n})();\n\n\n\n/** @ignore */ const isNumber = (x) => typeof x === 'number';\n/** @ignore */ const isBoolean = (x) => typeof x === 'boolean';\n/** @ignore */ const isFunction = (x) => typeof x === 'function';\n/** @ignore */\n// eslint-disable-next-line @typescript-eslint/ban-types\nconst isObject = (x) => x != null && Object(x) === x;\n/** @ignore */\nconst isPromise = (x) => {\n return isObject(x) && isFunction(x.then);\n};\n/** @ignore */\nconst isObservable = (x) => {\n return isObject(x) && isFunction(x.subscribe);\n};\n/** @ignore */\nconst isIterable = (x) => {\n return isObject(x) && isFunction(x[Symbol.iterator]);\n};\n/** @ignore */\nconst isAsyncIterable = (x) => {\n return isObject(x) && isFunction(x[Symbol.asyncIterator]);\n};\n/** @ignore */\nconst isArrowJSON = (x) => {\n return isObject(x) && isObject(x['schema']);\n};\n/** @ignore */\nconst isArrayLike = (x) => {\n return isObject(x) && isNumber(x['length']);\n};\n/** @ignore */\nconst isIteratorResult = (x) => {\n return isObject(x) && ('done' in x) && ('value' in x);\n};\n/** @ignore */\nconst isUnderlyingSink = (x) => {\n return isObject(x) &&\n isFunction(x['abort']) &&\n isFunction(x['close']) &&\n isFunction(x['start']) &&\n isFunction(x['write']);\n};\n/** @ignore */\nconst isFileHandle = (x) => {\n return isObject(x) && isFunction(x['stat']) && isNumber(x['fd']);\n};\n/** @ignore */\nconst isFSReadStream = (x) => {\n return isReadableNodeStream(x) && isNumber(x['bytesRead']);\n};\n/** @ignore */\nconst isFetchResponse = (x) => {\n return isObject(x) && isReadableDOMStream(x['body']);\n};\nconst isReadableInterop = (x) => ('_getDOMStream' in x && '_getNodeStream' in x);\n/** @ignore */\nconst isWritableDOMStream = (x) => {\n return isObject(x) &&\n isFunction(x['abort']) &&\n isFunction(x['getWriter']) &&\n !isReadableInterop(x);\n};\n/** @ignore */\nconst isReadableDOMStream = (x) => {\n return isObject(x) &&\n isFunction(x['cancel']) &&\n isFunction(x['getReader']) &&\n !isReadableInterop(x);\n};\n/** @ignore */\nconst isWritableNodeStream = (x) => {\n return isObject(x) &&\n isFunction(x['end']) &&\n isFunction(x['write']) &&\n isBoolean(x['writable']) &&\n !isReadableInterop(x);\n};\n/** @ignore */\nconst isReadableNodeStream = (x) => {\n return isObject(x) &&\n isFunction(x['read']) &&\n isFunction(x['pipe']) &&\n isBoolean(x['readable']) &&\n !isReadableInterop(x);\n};\n/** @ignore */\nconst isFlatbuffersByteBuffer = (x) => {\n return isObject(x) &&\n isFunction(x['clear']) &&\n isFunction(x['bytes']) &&\n isFunction(x['position']) &&\n isFunction(x['setPosition']) &&\n isFunction(x['capacity']) &&\n isFunction(x['getBufferIdentifier']) &&\n isFunction(x['createLong']);\n};\n\n//# sourceMappingURL=compat.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/util/compat.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/util/int.mjs": +/*!************************************************!*\ + !*** ./node_modules/apache-arrow/util/int.mjs ***! + \************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ BaseInt64: () => (/* binding */ BaseInt64),\n/* harmony export */ Int128: () => (/* binding */ Int128),\n/* harmony export */ Int64: () => (/* binding */ Int64),\n/* harmony export */ Uint64: () => (/* binding */ Uint64)\n/* harmony export */ });\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n/** @ignore */\nconst carryBit16 = 1 << 16;\n/** @ignore */\nfunction intAsHex(value) {\n if (value < 0) {\n value = 0xFFFFFFFF + value + 1;\n }\n return `0x${value.toString(16)}`;\n}\n/** @ignore */\nconst kInt32DecimalDigits = 8;\n/** @ignore */\nconst kPowersOfTen = [\n 1,\n 10,\n 100,\n 1000,\n 10000,\n 100000,\n 1000000,\n 10000000,\n 100000000\n];\n/** @ignore */\nclass BaseInt64 {\n constructor(buffer) {\n this.buffer = buffer;\n }\n high() { return this.buffer[1]; }\n low() { return this.buffer[0]; }\n _times(other) {\n // Break the left and right numbers into 16 bit chunks\n // so that we can multiply them without overflow.\n const L = new Uint32Array([\n this.buffer[1] >>> 16,\n this.buffer[1] & 0xFFFF,\n this.buffer[0] >>> 16,\n this.buffer[0] & 0xFFFF\n ]);\n const R = new Uint32Array([\n other.buffer[1] >>> 16,\n other.buffer[1] & 0xFFFF,\n other.buffer[0] >>> 16,\n other.buffer[0] & 0xFFFF\n ]);\n let product = L[3] * R[3];\n this.buffer[0] = product & 0xFFFF;\n let sum = product >>> 16;\n product = L[2] * R[3];\n sum += product;\n product = (L[3] * R[2]) >>> 0;\n sum += product;\n this.buffer[0] += sum << 16;\n this.buffer[1] = (sum >>> 0 < product ? carryBit16 : 0);\n this.buffer[1] += sum >>> 16;\n this.buffer[1] += L[1] * R[3] + L[2] * R[2] + L[3] * R[1];\n this.buffer[1] += (L[0] * R[3] + L[1] * R[2] + L[2] * R[1] + L[3] * R[0]) << 16;\n return this;\n }\n _plus(other) {\n const sum = (this.buffer[0] + other.buffer[0]) >>> 0;\n this.buffer[1] += other.buffer[1];\n if (sum < (this.buffer[0] >>> 0)) {\n ++this.buffer[1];\n }\n this.buffer[0] = sum;\n }\n lessThan(other) {\n return this.buffer[1] < other.buffer[1] ||\n (this.buffer[1] === other.buffer[1] && this.buffer[0] < other.buffer[0]);\n }\n equals(other) {\n return this.buffer[1] === other.buffer[1] && this.buffer[0] == other.buffer[0];\n }\n greaterThan(other) {\n return other.lessThan(this);\n }\n hex() {\n return `${intAsHex(this.buffer[1])} ${intAsHex(this.buffer[0])}`;\n }\n}\n/** @ignore */\nclass Uint64 extends BaseInt64 {\n times(other) {\n this._times(other);\n return this;\n }\n plus(other) {\n this._plus(other);\n return this;\n }\n /** @nocollapse */\n static from(val, out_buffer = new Uint32Array(2)) {\n return Uint64.fromString(typeof (val) === 'string' ? val : val.toString(), out_buffer);\n }\n /** @nocollapse */\n static fromNumber(num, out_buffer = new Uint32Array(2)) {\n // Always parse numbers as strings - pulling out high and low bits\n // directly seems to lose precision sometimes\n // For example:\n // > -4613034156400212000 >>> 0\n // 721782784\n // The correct lower 32-bits are 721782752\n return Uint64.fromString(num.toString(), out_buffer);\n }\n /** @nocollapse */\n static fromString(str, out_buffer = new Uint32Array(2)) {\n const length = str.length;\n const out = new Uint64(out_buffer);\n for (let posn = 0; posn < length;) {\n const group = kInt32DecimalDigits < length - posn ?\n kInt32DecimalDigits : length - posn;\n const chunk = new Uint64(new Uint32Array([Number.parseInt(str.slice(posn, posn + group), 10), 0]));\n const multiple = new Uint64(new Uint32Array([kPowersOfTen[group], 0]));\n out.times(multiple);\n out.plus(chunk);\n posn += group;\n }\n return out;\n }\n /** @nocollapse */\n static convertArray(values) {\n const data = new Uint32Array(values.length * 2);\n for (let i = -1, n = values.length; ++i < n;) {\n Uint64.from(values[i], new Uint32Array(data.buffer, data.byteOffset + 2 * i * 4, 2));\n }\n return data;\n }\n /** @nocollapse */\n static multiply(left, right) {\n const rtrn = new Uint64(new Uint32Array(left.buffer));\n return rtrn.times(right);\n }\n /** @nocollapse */\n static add(left, right) {\n const rtrn = new Uint64(new Uint32Array(left.buffer));\n return rtrn.plus(right);\n }\n}\n/** @ignore */\nclass Int64 extends BaseInt64 {\n negate() {\n this.buffer[0] = ~this.buffer[0] + 1;\n this.buffer[1] = ~this.buffer[1];\n if (this.buffer[0] == 0) {\n ++this.buffer[1];\n }\n return this;\n }\n times(other) {\n this._times(other);\n return this;\n }\n plus(other) {\n this._plus(other);\n return this;\n }\n lessThan(other) {\n // force high bytes to be signed\n // eslint-disable-next-line unicorn/prefer-math-trunc\n const this_high = this.buffer[1] << 0;\n // eslint-disable-next-line unicorn/prefer-math-trunc\n const other_high = other.buffer[1] << 0;\n return this_high < other_high ||\n (this_high === other_high && this.buffer[0] < other.buffer[0]);\n }\n /** @nocollapse */\n static from(val, out_buffer = new Uint32Array(2)) {\n return Int64.fromString(typeof (val) === 'string' ? val : val.toString(), out_buffer);\n }\n /** @nocollapse */\n static fromNumber(num, out_buffer = new Uint32Array(2)) {\n // Always parse numbers as strings - pulling out high and low bits\n // directly seems to lose precision sometimes\n // For example:\n // > -4613034156400212000 >>> 0\n // 721782784\n // The correct lower 32-bits are 721782752\n return Int64.fromString(num.toString(), out_buffer);\n }\n /** @nocollapse */\n static fromString(str, out_buffer = new Uint32Array(2)) {\n // TODO: Assert that out_buffer is 0 and length = 2\n const negate = str.startsWith('-');\n const length = str.length;\n const out = new Int64(out_buffer);\n for (let posn = negate ? 1 : 0; posn < length;) {\n const group = kInt32DecimalDigits < length - posn ?\n kInt32DecimalDigits : length - posn;\n const chunk = new Int64(new Uint32Array([Number.parseInt(str.slice(posn, posn + group), 10), 0]));\n const multiple = new Int64(new Uint32Array([kPowersOfTen[group], 0]));\n out.times(multiple);\n out.plus(chunk);\n posn += group;\n }\n return negate ? out.negate() : out;\n }\n /** @nocollapse */\n static convertArray(values) {\n const data = new Uint32Array(values.length * 2);\n for (let i = -1, n = values.length; ++i < n;) {\n Int64.from(values[i], new Uint32Array(data.buffer, data.byteOffset + 2 * i * 4, 2));\n }\n return data;\n }\n /** @nocollapse */\n static multiply(left, right) {\n const rtrn = new Int64(new Uint32Array(left.buffer));\n return rtrn.times(right);\n }\n /** @nocollapse */\n static add(left, right) {\n const rtrn = new Int64(new Uint32Array(left.buffer));\n return rtrn.plus(right);\n }\n}\n/** @ignore */\nclass Int128 {\n constructor(buffer) {\n this.buffer = buffer;\n // buffer[3] MSB (high)\n // buffer[2]\n // buffer[1]\n // buffer[0] LSB (low)\n }\n high() {\n return new Int64(new Uint32Array(this.buffer.buffer, this.buffer.byteOffset + 8, 2));\n }\n low() {\n return new Int64(new Uint32Array(this.buffer.buffer, this.buffer.byteOffset, 2));\n }\n negate() {\n this.buffer[0] = ~this.buffer[0] + 1;\n this.buffer[1] = ~this.buffer[1];\n this.buffer[2] = ~this.buffer[2];\n this.buffer[3] = ~this.buffer[3];\n if (this.buffer[0] == 0) {\n ++this.buffer[1];\n }\n if (this.buffer[1] == 0) {\n ++this.buffer[2];\n }\n if (this.buffer[2] == 0) {\n ++this.buffer[3];\n }\n return this;\n }\n times(other) {\n // Break the left and right numbers into 32 bit chunks\n // so that we can multiply them without overflow.\n const L0 = new Uint64(new Uint32Array([this.buffer[3], 0]));\n const L1 = new Uint64(new Uint32Array([this.buffer[2], 0]));\n const L2 = new Uint64(new Uint32Array([this.buffer[1], 0]));\n const L3 = new Uint64(new Uint32Array([this.buffer[0], 0]));\n const R0 = new Uint64(new Uint32Array([other.buffer[3], 0]));\n const R1 = new Uint64(new Uint32Array([other.buffer[2], 0]));\n const R2 = new Uint64(new Uint32Array([other.buffer[1], 0]));\n const R3 = new Uint64(new Uint32Array([other.buffer[0], 0]));\n let product = Uint64.multiply(L3, R3);\n this.buffer[0] = product.low();\n const sum = new Uint64(new Uint32Array([product.high(), 0]));\n product = Uint64.multiply(L2, R3);\n sum.plus(product);\n product = Uint64.multiply(L3, R2);\n sum.plus(product);\n this.buffer[1] = sum.low();\n this.buffer[3] = (sum.lessThan(product) ? 1 : 0);\n this.buffer[2] = sum.high();\n const high = new Uint64(new Uint32Array(this.buffer.buffer, this.buffer.byteOffset + 8, 2));\n high.plus(Uint64.multiply(L1, R3))\n .plus(Uint64.multiply(L2, R2))\n .plus(Uint64.multiply(L3, R1));\n this.buffer[3] += Uint64.multiply(L0, R3)\n .plus(Uint64.multiply(L1, R2))\n .plus(Uint64.multiply(L2, R1))\n .plus(Uint64.multiply(L3, R0)).low();\n return this;\n }\n plus(other) {\n const sums = new Uint32Array(4);\n sums[3] = (this.buffer[3] + other.buffer[3]) >>> 0;\n sums[2] = (this.buffer[2] + other.buffer[2]) >>> 0;\n sums[1] = (this.buffer[1] + other.buffer[1]) >>> 0;\n sums[0] = (this.buffer[0] + other.buffer[0]) >>> 0;\n if (sums[0] < (this.buffer[0] >>> 0)) {\n ++sums[1];\n }\n if (sums[1] < (this.buffer[1] >>> 0)) {\n ++sums[2];\n }\n if (sums[2] < (this.buffer[2] >>> 0)) {\n ++sums[3];\n }\n this.buffer[3] = sums[3];\n this.buffer[2] = sums[2];\n this.buffer[1] = sums[1];\n this.buffer[0] = sums[0];\n return this;\n }\n hex() {\n return `${intAsHex(this.buffer[3])} ${intAsHex(this.buffer[2])} ${intAsHex(this.buffer[1])} ${intAsHex(this.buffer[0])}`;\n }\n /** @nocollapse */\n static multiply(left, right) {\n const rtrn = new Int128(new Uint32Array(left.buffer));\n return rtrn.times(right);\n }\n /** @nocollapse */\n static add(left, right) {\n const rtrn = new Int128(new Uint32Array(left.buffer));\n return rtrn.plus(right);\n }\n /** @nocollapse */\n static from(val, out_buffer = new Uint32Array(4)) {\n return Int128.fromString(typeof (val) === 'string' ? val : val.toString(), out_buffer);\n }\n /** @nocollapse */\n static fromNumber(num, out_buffer = new Uint32Array(4)) {\n // Always parse numbers as strings - pulling out high and low bits\n // directly seems to lose precision sometimes\n // For example:\n // > -4613034156400212000 >>> 0\n // 721782784\n // The correct lower 32-bits are 721782752\n return Int128.fromString(num.toString(), out_buffer);\n }\n /** @nocollapse */\n static fromString(str, out_buffer = new Uint32Array(4)) {\n // TODO: Assert that out_buffer is 0 and length = 4\n const negate = str.startsWith('-');\n const length = str.length;\n const out = new Int128(out_buffer);\n for (let posn = negate ? 1 : 0; posn < length;) {\n const group = kInt32DecimalDigits < length - posn ?\n kInt32DecimalDigits : length - posn;\n const chunk = new Int128(new Uint32Array([Number.parseInt(str.slice(posn, posn + group), 10), 0, 0, 0]));\n const multiple = new Int128(new Uint32Array([kPowersOfTen[group], 0, 0, 0]));\n out.times(multiple);\n out.plus(chunk);\n posn += group;\n }\n return negate ? out.negate() : out;\n }\n /** @nocollapse */\n static convertArray(values) {\n // TODO: Distinguish between string and number at compile-time\n const data = new Uint32Array(values.length * 4);\n for (let i = -1, n = values.length; ++i < n;) {\n Int128.from(values[i], new Uint32Array(data.buffer, data.byteOffset + 4 * 4 * i, 4));\n }\n return data;\n }\n}\n\n//# sourceMappingURL=int.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/util/int.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/util/math.mjs": +/*!*************************************************!*\ + !*** ./node_modules/apache-arrow/util/math.mjs ***! + \*************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ float64ToUint16: () => (/* binding */ float64ToUint16),\n/* harmony export */ uint16ToFloat64: () => (/* binding */ uint16ToFloat64)\n/* harmony export */ });\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nconst f64 = new Float64Array(1);\nconst u32 = new Uint32Array(f64.buffer);\n/**\n * Convert uint16 (logically a float16) to a JS float64. Inspired by numpy's `npy_half_to_double`:\n * https://github.com/numpy/numpy/blob/5a5987291dc95376bb098be8d8e5391e89e77a2c/numpy/core/src/npymath/halffloat.c#L29\n * @param h {number} the uint16 to convert\n * @private\n * @ignore\n */\nfunction uint16ToFloat64(h) {\n const expo = (h & 0x7C00) >> 10;\n const sigf = (h & 0x03FF) / 1024;\n const sign = Math.pow((-1), ((h & 0x8000) >> 15));\n switch (expo) {\n case 0x1F: return sign * (sigf ? Number.NaN : 1 / 0);\n case 0x00: return sign * (sigf ? 6.103515625e-5 * sigf : 0);\n }\n return sign * (Math.pow(2, (expo - 15))) * (1 + sigf);\n}\n/**\n * Convert a float64 to uint16 (assuming the float64 is logically a float16). Inspired by numpy's `npy_double_to_half`:\n * https://github.com/numpy/numpy/blob/5a5987291dc95376bb098be8d8e5391e89e77a2c/numpy/core/src/npymath/halffloat.c#L43\n * @param d {number} The float64 to convert\n * @private\n * @ignore\n */\nfunction float64ToUint16(d) {\n if (d !== d) {\n return 0x7E00;\n } // NaN\n f64[0] = d;\n // Magic numbers:\n // 0x80000000 = 10000000 00000000 00000000 00000000 -- masks the 32nd bit\n // 0x7ff00000 = 01111111 11110000 00000000 00000000 -- masks the 21st-31st bits\n // 0x000fffff = 00000000 00001111 11111111 11111111 -- masks the 1st-20th bit\n const sign = (u32[1] & 0x80000000) >> 16 & 0xFFFF;\n let expo = (u32[1] & 0x7FF00000), sigf = 0x0000;\n if (expo >= 0x40F00000) {\n //\n // If exponent overflowed, the float16 is either NaN or Infinity.\n // Rules to propagate the sign bit: mantissa > 0 ? NaN : +/-Infinity\n //\n // Magic numbers:\n // 0x40F00000 = 01000000 11110000 00000000 00000000 -- 6-bit exponent overflow\n // 0x7C000000 = 01111100 00000000 00000000 00000000 -- masks the 27th-31st bits\n //\n // returns:\n // qNaN, aka 32256 decimal, 0x7E00 hex, or 01111110 00000000 binary\n // sNaN, aka 32000 decimal, 0x7D00 hex, or 01111101 00000000 binary\n // +inf, aka 31744 decimal, 0x7C00 hex, or 01111100 00000000 binary\n // -inf, aka 64512 decimal, 0xFC00 hex, or 11111100 00000000 binary\n //\n // If mantissa is greater than 23 bits, set to +Infinity like numpy\n if (u32[0] > 0) {\n expo = 0x7C00;\n }\n else {\n expo = (expo & 0x7C000000) >> 16;\n sigf = (u32[1] & 0x000FFFFF) >> 10;\n }\n }\n else if (expo <= 0x3F000000) {\n //\n // If exponent underflowed, the float is either signed zero or subnormal.\n //\n // Magic numbers:\n // 0x3F000000 = 00111111 00000000 00000000 00000000 -- 6-bit exponent underflow\n //\n sigf = 0x100000 + (u32[1] & 0x000FFFFF);\n sigf = 0x100000 + (sigf << ((expo >> 20) - 998)) >> 21;\n expo = 0;\n }\n else {\n //\n // No overflow or underflow, rebase the exponent and round the mantissa\n // Magic numbers:\n // 0x200 = 00000010 00000000 -- masks off the 10th bit\n //\n // Ensure the first mantissa bit (the 10th one) is 1 and round\n expo = (expo - 0x3F000000) >> 10;\n sigf = ((u32[1] & 0x000FFFFF) + 0x200) >> 10;\n }\n return sign | expo | sigf & 0xFFFF;\n}\n\n//# sourceMappingURL=math.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/util/math.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/util/pretty.mjs": +/*!***************************************************!*\ + !*** ./node_modules/apache-arrow/util/pretty.mjs ***! + \***************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ valueToString: () => (/* binding */ valueToString)\n/* harmony export */ });\n/* harmony import */ var _compat_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./compat.mjs */ \"./node_modules/apache-arrow/util/compat.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n/** @ignore */ const undf = void (0);\n/** @ignore */\nfunction valueToString(x) {\n if (x === null) {\n return 'null';\n }\n if (x === undf) {\n return 'undefined';\n }\n switch (typeof x) {\n case 'number': return `${x}`;\n case 'bigint': return `${x}`;\n case 'string': return `\"${x}\"`;\n }\n // If [Symbol.toPrimitive] is implemented (like in BN)\n // use it instead of JSON.stringify(). This ensures we\n // print BigInts, Decimals, and Binary in their native\n // representation\n if (typeof x[Symbol.toPrimitive] === 'function') {\n return x[Symbol.toPrimitive]('string');\n }\n if (ArrayBuffer.isView(x)) {\n if (x instanceof _compat_mjs__WEBPACK_IMPORTED_MODULE_0__.BigInt64Array || x instanceof _compat_mjs__WEBPACK_IMPORTED_MODULE_0__.BigUint64Array) {\n return `[${[...x].map(x => valueToString(x))}]`;\n }\n return `[${x}]`;\n }\n return ArrayBuffer.isView(x) ? `[${x}]` : JSON.stringify(x, (_, y) => typeof y === 'bigint' ? `${y}` : y);\n}\n\n//# sourceMappingURL=pretty.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/util/pretty.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/util/recordbatch.mjs": +/*!********************************************************!*\ + !*** ./node_modules/apache-arrow/util/recordbatch.mjs ***! + \********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ distributeVectorsIntoRecordBatches: () => (/* binding */ distributeVectorsIntoRecordBatches)\n/* harmony export */ });\n/* harmony import */ var _data_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../data.mjs */ \"./node_modules/apache-arrow/data.mjs\");\n/* harmony import */ var _type_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../type.mjs */ \"./node_modules/apache-arrow/type.mjs\");\n/* harmony import */ var _recordbatch_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../recordbatch.mjs */ \"./node_modules/apache-arrow/recordbatch.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n\n/** @ignore */\nfunction distributeVectorsIntoRecordBatches(schema, vecs) {\n return uniformlyDistributeChunksAcrossRecordBatches(schema, vecs.map((v) => v.data.concat()));\n}\n/** @ignore */\nfunction uniformlyDistributeChunksAcrossRecordBatches(schema, cols) {\n const fields = [...schema.fields];\n const batches = [];\n const memo = { numBatches: cols.reduce((n, c) => Math.max(n, c.length), 0) };\n let numBatches = 0, batchLength = 0;\n let i = -1;\n const numColumns = cols.length;\n let child, children = [];\n while (memo.numBatches-- > 0) {\n for (batchLength = Number.POSITIVE_INFINITY, i = -1; ++i < numColumns;) {\n children[i] = child = cols[i].shift();\n batchLength = Math.min(batchLength, child ? child.length : batchLength);\n }\n if (Number.isFinite(batchLength)) {\n children = distributeChildren(fields, batchLength, children, cols, memo);\n if (batchLength > 0) {\n batches[numBatches++] = (0,_data_mjs__WEBPACK_IMPORTED_MODULE_0__.makeData)({\n type: new _type_mjs__WEBPACK_IMPORTED_MODULE_1__.Struct(fields),\n length: batchLength,\n nullCount: 0,\n children: children.slice()\n });\n }\n }\n }\n return [\n schema = schema.assign(fields),\n batches.map((data) => new _recordbatch_mjs__WEBPACK_IMPORTED_MODULE_2__.RecordBatch(schema, data))\n ];\n}\n/** @ignore */\nfunction distributeChildren(fields, batchLength, children, columns, memo) {\n var _a;\n const nullBitmapSize = ((batchLength + 63) & ~63) >> 3;\n for (let i = -1, n = columns.length; ++i < n;) {\n const child = children[i];\n const length = child === null || child === void 0 ? void 0 : child.length;\n if (length >= batchLength) {\n if (length === batchLength) {\n children[i] = child;\n }\n else {\n children[i] = child.slice(0, batchLength);\n memo.numBatches = Math.max(memo.numBatches, columns[i].unshift(child.slice(batchLength, length - batchLength)));\n }\n }\n else {\n const field = fields[i];\n fields[i] = field.clone({ nullable: true });\n children[i] = (_a = child === null || child === void 0 ? void 0 : child._changeLengthAndBackfillNullBitmap(batchLength)) !== null && _a !== void 0 ? _a : (0,_data_mjs__WEBPACK_IMPORTED_MODULE_0__.makeData)({\n type: field.type,\n length: batchLength,\n nullCount: batchLength,\n nullBitmap: new Uint8Array(nullBitmapSize)\n });\n }\n }\n return children;\n}\n\n//# sourceMappingURL=recordbatch.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/util/recordbatch.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/util/utf8.mjs": +/*!*************************************************!*\ + !*** ./node_modules/apache-arrow/util/utf8.mjs ***! + \*************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ decodeUtf8: () => (/* binding */ decodeUtf8),\n/* harmony export */ encodeUtf8: () => (/* binding */ encodeUtf8)\n/* harmony export */ });\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nconst decoder = new TextDecoder('utf-8');\n/** @ignore */\nconst decodeUtf8 = (buffer) => decoder.decode(buffer);\nconst encoder = new TextEncoder();\n/** @ignore */\nconst encodeUtf8 = (value) => encoder.encode(value);\n\n//# sourceMappingURL=utf8.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/util/utf8.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/util/vector.mjs": +/*!***************************************************!*\ + !*** ./node_modules/apache-arrow/util/vector.mjs ***! + \***************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ clampIndex: () => (/* binding */ clampIndex),\n/* harmony export */ clampRange: () => (/* binding */ clampRange),\n/* harmony export */ createElementComparator: () => (/* binding */ createElementComparator)\n/* harmony export */ });\n/* harmony import */ var _vector_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../vector.mjs */ \"./node_modules/apache-arrow/vector.mjs\");\n/* harmony import */ var _row_map_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../row/map.mjs */ \"./node_modules/apache-arrow/row/map.mjs\");\n/* harmony import */ var _row_struct_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../row/struct.mjs */ \"./node_modules/apache-arrow/row/struct.mjs\");\n/* harmony import */ var _util_buffer_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/buffer.mjs */ \"./node_modules/apache-arrow/util/buffer.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n\n\n/** @ignore */\nfunction clampIndex(source, index, then) {\n const length = source.length;\n const adjust = index > -1 ? index : (length + (index % length));\n return then ? then(source, adjust) : adjust;\n}\n/** @ignore */\nlet tmp;\n/** @ignore */\nfunction clampRange(source, begin, end, then) {\n // Adjust args similar to Array.prototype.slice. Normalize begin/end to\n // clamp between 0 and length, and wrap around on negative indices, e.g.\n // slice(-1, 5) or slice(5, -1)\n const { length: len = 0 } = source;\n let lhs = typeof begin !== 'number' ? 0 : begin;\n let rhs = typeof end !== 'number' ? len : end;\n // wrap around on negative start/end positions\n (lhs < 0) && (lhs = ((lhs % len) + len) % len);\n (rhs < 0) && (rhs = ((rhs % len) + len) % len);\n // ensure lhs <= rhs\n (rhs < lhs) && (tmp = lhs, lhs = rhs, rhs = tmp);\n // ensure rhs <= length\n (rhs > len) && (rhs = len);\n return then ? then(source, lhs, rhs) : [lhs, rhs];\n}\nconst isNaNFast = (value) => value !== value;\n/** @ignore */\nfunction createElementComparator(search) {\n const typeofSearch = typeof search;\n // Compare primitives\n if (typeofSearch !== 'object' || search === null) {\n // Compare NaN\n if (isNaNFast(search)) {\n return isNaNFast;\n }\n return (value) => value === search;\n }\n // Compare Dates\n if (search instanceof Date) {\n const valueOfSearch = search.valueOf();\n return (value) => value instanceof Date ? (value.valueOf() === valueOfSearch) : false;\n }\n // Compare TypedArrays\n if (ArrayBuffer.isView(search)) {\n return (value) => value ? (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_0__.compareArrayLike)(search, value) : false;\n }\n // Compare Maps and Rows\n if (search instanceof Map) {\n return createMapComparator(search);\n }\n // Compare Array-likes\n if (Array.isArray(search)) {\n return createArrayLikeComparator(search);\n }\n // Compare Vectors\n if (search instanceof _vector_mjs__WEBPACK_IMPORTED_MODULE_1__.Vector) {\n return createVectorComparator(search);\n }\n return createObjectComparator(search, true);\n // Compare non-empty Objects\n // return createObjectComparator(search, search instanceof Proxy);\n}\n/** @ignore */\nfunction createArrayLikeComparator(lhs) {\n const comparators = [];\n for (let i = -1, n = lhs.length; ++i < n;) {\n comparators[i] = createElementComparator(lhs[i]);\n }\n return createSubElementsComparator(comparators);\n}\n/** @ignore */\nfunction createMapComparator(lhs) {\n let i = -1;\n const comparators = [];\n for (const v of lhs.values())\n comparators[++i] = createElementComparator(v);\n return createSubElementsComparator(comparators);\n}\n/** @ignore */\nfunction createVectorComparator(lhs) {\n const comparators = [];\n for (let i = -1, n = lhs.length; ++i < n;) {\n comparators[i] = createElementComparator(lhs.get(i));\n }\n return createSubElementsComparator(comparators);\n}\n/** @ignore */\nfunction createObjectComparator(lhs, allowEmpty = false) {\n const keys = Object.keys(lhs);\n // Only compare non-empty Objects\n if (!allowEmpty && keys.length === 0) {\n return () => false;\n }\n const comparators = [];\n for (let i = -1, n = keys.length; ++i < n;) {\n comparators[i] = createElementComparator(lhs[keys[i]]);\n }\n return createSubElementsComparator(comparators, keys);\n}\nfunction createSubElementsComparator(comparators, keys) {\n return (rhs) => {\n if (!rhs || typeof rhs !== 'object') {\n return false;\n }\n switch (rhs.constructor) {\n case Array: return compareArray(comparators, rhs);\n case Map:\n return compareObject(comparators, rhs, rhs.keys());\n case _row_map_mjs__WEBPACK_IMPORTED_MODULE_2__.MapRow:\n case _row_struct_mjs__WEBPACK_IMPORTED_MODULE_3__.StructRow:\n case Object:\n case undefined: // support `Object.create(null)` objects\n return compareObject(comparators, rhs, keys || Object.keys(rhs));\n }\n return rhs instanceof _vector_mjs__WEBPACK_IMPORTED_MODULE_1__.Vector ? compareVector(comparators, rhs) : false;\n };\n}\nfunction compareArray(comparators, arr) {\n const n = comparators.length;\n if (arr.length !== n) {\n return false;\n }\n for (let i = -1; ++i < n;) {\n if (!(comparators[i](arr[i]))) {\n return false;\n }\n }\n return true;\n}\nfunction compareVector(comparators, vec) {\n const n = comparators.length;\n if (vec.length !== n) {\n return false;\n }\n for (let i = -1; ++i < n;) {\n if (!(comparators[i](vec.get(i)))) {\n return false;\n }\n }\n return true;\n}\nfunction compareObject(comparators, obj, keys) {\n const lKeyItr = keys[Symbol.iterator]();\n const rKeyItr = obj instanceof Map ? obj.keys() : Object.keys(obj)[Symbol.iterator]();\n const rValItr = obj instanceof Map ? obj.values() : Object.values(obj)[Symbol.iterator]();\n let i = 0;\n const n = comparators.length;\n let rVal = rValItr.next();\n let lKey = lKeyItr.next();\n let rKey = rKeyItr.next();\n for (; i < n && !lKey.done && !rKey.done && !rVal.done; ++i, lKey = lKeyItr.next(), rKey = rKeyItr.next(), rVal = rValItr.next()) {\n if (lKey.value !== rKey.value || !comparators[i](rVal.value)) {\n break;\n }\n }\n if (i === n && lKey.done && rKey.done && rVal.done) {\n return true;\n }\n lKeyItr.return && lKeyItr.return();\n rKeyItr.return && rKeyItr.return();\n rValItr.return && rValItr.return();\n return false;\n}\n\n//# sourceMappingURL=vector.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/util/vector.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/vector.mjs": +/*!**********************************************!*\ + !*** ./node_modules/apache-arrow/vector.mjs ***! + \**********************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Vector: () => (/* binding */ Vector),\n/* harmony export */ makeVector: () => (/* binding */ makeVector)\n/* harmony export */ });\n/* harmony import */ var _enum_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./enum.mjs */ \"./node_modules/apache-arrow/enum.mjs\");\n/* harmony import */ var _util_vector_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./util/vector.mjs */ \"./node_modules/apache-arrow/util/vector.mjs\");\n/* harmony import */ var _type_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./type.mjs */ \"./node_modules/apache-arrow/type.mjs\");\n/* harmony import */ var _data_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data.mjs */ \"./node_modules/apache-arrow/data.mjs\");\n/* harmony import */ var _util_chunk_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/chunk.mjs */ \"./node_modules/apache-arrow/util/chunk.mjs\");\n/* harmony import */ var _util_compat_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./util/compat.mjs */ \"./node_modules/apache-arrow/util/compat.mjs\");\n/* harmony import */ var _visitor_get_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./visitor/get.mjs */ \"./node_modules/apache-arrow/visitor/get.mjs\");\n/* harmony import */ var _visitor_set_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./visitor/set.mjs */ \"./node_modules/apache-arrow/visitor/set.mjs\");\n/* harmony import */ var _visitor_indexof_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./visitor/indexof.mjs */ \"./node_modules/apache-arrow/visitor/indexof.mjs\");\n/* harmony import */ var _visitor_iterator_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./visitor/iterator.mjs */ \"./node_modules/apache-arrow/visitor/iterator.mjs\");\n/* harmony import */ var _visitor_bytelength_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./visitor/bytelength.mjs */ \"./node_modules/apache-arrow/visitor/bytelength.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nvar _a;\n\n\n\n\n\n\n\n\n\n\n\nconst visitorsByTypeId = {};\nconst vectorPrototypesByTypeId = {};\n/**\n * Array-like data structure. Use the convenience method {@link makeVector} and {@link vectorFromArray} to create vectors.\n */\nclass Vector {\n constructor(input) {\n var _b, _c, _d;\n const data = input[0] instanceof Vector\n ? input.flatMap(x => x.data)\n : input;\n if (data.length === 0 || data.some((x) => !(x instanceof _data_mjs__WEBPACK_IMPORTED_MODULE_0__.Data))) {\n throw new TypeError('Vector constructor expects an Array of Data instances.');\n }\n const type = (_b = data[0]) === null || _b === void 0 ? void 0 : _b.type;\n switch (data.length) {\n case 0:\n this._offsets = [0];\n break;\n case 1: {\n // special case for unchunked vectors\n const { get, set, indexOf, byteLength } = visitorsByTypeId[type.typeId];\n const unchunkedData = data[0];\n this.isValid = (index) => (0,_util_chunk_mjs__WEBPACK_IMPORTED_MODULE_1__.isChunkedValid)(unchunkedData, index);\n this.get = (index) => get(unchunkedData, index);\n this.set = (index, value) => set(unchunkedData, index, value);\n this.indexOf = (index) => indexOf(unchunkedData, index);\n this.getByteLength = (index) => byteLength(unchunkedData, index);\n this._offsets = [0, unchunkedData.length];\n break;\n }\n default:\n Object.setPrototypeOf(this, vectorPrototypesByTypeId[type.typeId]);\n this._offsets = (0,_util_chunk_mjs__WEBPACK_IMPORTED_MODULE_1__.computeChunkOffsets)(data);\n break;\n }\n this.data = data;\n this.type = type;\n this.stride = (0,_type_mjs__WEBPACK_IMPORTED_MODULE_2__.strideForType)(type);\n this.numChildren = (_d = (_c = type.children) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0;\n this.length = this._offsets[this._offsets.length - 1];\n }\n /**\n * The aggregate size (in bytes) of this Vector's buffers and/or child Vectors.\n */\n get byteLength() {\n if (this._byteLength === -1) {\n this._byteLength = this.data.reduce((byteLength, data) => byteLength + data.byteLength, 0);\n }\n return this._byteLength;\n }\n /**\n * The number of null elements in this Vector.\n */\n get nullCount() {\n if (this._nullCount === -1) {\n this._nullCount = (0,_util_chunk_mjs__WEBPACK_IMPORTED_MODULE_1__.computeChunkNullCounts)(this.data);\n }\n return this._nullCount;\n }\n /**\n * The Array or TypedAray constructor used for the JS representation\n * of the element's values in {@link Vector.prototype.toArray `toArray()`}.\n */\n get ArrayType() { return this.type.ArrayType; }\n /**\n * The name that should be printed when the Vector is logged in a message.\n */\n get [Symbol.toStringTag]() {\n return `${this.VectorName}<${this.type[Symbol.toStringTag]}>`;\n }\n /**\n * The name of this Vector.\n */\n get VectorName() { return `${_enum_mjs__WEBPACK_IMPORTED_MODULE_3__.Type[this.type.typeId]}Vector`; }\n /**\n * Check whether an element is null.\n * @param index The index at which to read the validity bitmap.\n */\n // @ts-ignore\n isValid(index) { return false; }\n /**\n * Get an element value by position.\n * @param index The index of the element to read.\n */\n // @ts-ignore\n get(index) { return null; }\n /**\n * Set an element value by position.\n * @param index The index of the element to write.\n * @param value The value to set.\n */\n // @ts-ignore\n set(index, value) { return; }\n /**\n * Retrieve the index of the first occurrence of a value in an Vector.\n * @param element The value to locate in the Vector.\n * @param offset The index at which to begin the search. If offset is omitted, the search starts at index 0.\n */\n // @ts-ignore\n indexOf(element, offset) { return -1; }\n includes(element, offset) { return this.indexOf(element, offset) > 0; }\n /**\n * Get the size in bytes of an element by index.\n * @param index The index at which to get the byteLength.\n */\n // @ts-ignore\n getByteLength(index) { return 0; }\n /**\n * Iterator for the Vector's elements.\n */\n [Symbol.iterator]() {\n return _visitor_iterator_mjs__WEBPACK_IMPORTED_MODULE_4__.instance.visit(this);\n }\n /**\n * Combines two or more Vectors of the same type.\n * @param others Additional Vectors to add to the end of this Vector.\n */\n concat(...others) {\n return new Vector(this.data.concat(others.flatMap((x) => x.data).flat(Number.POSITIVE_INFINITY)));\n }\n /**\n * Return a zero-copy sub-section of this Vector.\n * @param start The beginning of the specified portion of the Vector.\n * @param end The end of the specified portion of the Vector. This is exclusive of the element at the index 'end'.\n */\n slice(begin, end) {\n return new Vector((0,_util_vector_mjs__WEBPACK_IMPORTED_MODULE_5__.clampRange)(this, begin, end, ({ data, _offsets }, begin, end) => (0,_util_chunk_mjs__WEBPACK_IMPORTED_MODULE_1__.sliceChunks)(data, _offsets, begin, end)));\n }\n toJSON() { return [...this]; }\n /**\n * Return a JavaScript Array or TypedArray of the Vector's elements.\n *\n * @note If this Vector contains a single Data chunk and the Vector's type is a\n * primitive numeric type corresponding to one of the JavaScript TypedArrays, this\n * method returns a zero-copy slice of the underlying TypedArray values. If there's\n * more than one chunk, the resulting TypedArray will be a copy of the data from each\n * chunk's underlying TypedArray values.\n *\n * @returns An Array or TypedArray of the Vector's elements, based on the Vector's DataType.\n */\n toArray() {\n const { type, data, length, stride, ArrayType } = this;\n // Fast case, return subarray if possible\n switch (type.typeId) {\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_3__.Type.Int:\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_3__.Type.Float:\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_3__.Type.Decimal:\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_3__.Type.Time:\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_3__.Type.Timestamp:\n switch (data.length) {\n case 0: return new ArrayType();\n case 1: return data[0].values.subarray(0, length * stride);\n default: return data.reduce((memo, { values, length: chunk_length }) => {\n memo.array.set(values.subarray(0, chunk_length * stride), memo.offset);\n memo.offset += chunk_length * stride;\n return memo;\n }, { array: new ArrayType(length * stride), offset: 0 }).array;\n }\n }\n // Otherwise if not primitive, slow copy\n return [...this];\n }\n /**\n * Returns a string representation of the Vector.\n *\n * @returns A string representation of the Vector.\n */\n toString() {\n return `[${[...this].join(',')}]`;\n }\n /**\n * Returns a child Vector by name, or null if this Vector has no child with the given name.\n * @param name The name of the child to retrieve.\n */\n getChild(name) {\n var _b;\n return this.getChildAt((_b = this.type.children) === null || _b === void 0 ? void 0 : _b.findIndex((f) => f.name === name));\n }\n /**\n * Returns a child Vector by index, or null if this Vector has no child at the supplied index.\n * @param index The index of the child to retrieve.\n */\n getChildAt(index) {\n if (index > -1 && index < this.numChildren) {\n return new Vector(this.data.map(({ children }) => children[index]));\n }\n return null;\n }\n get isMemoized() {\n if (_type_mjs__WEBPACK_IMPORTED_MODULE_2__.DataType.isDictionary(this.type)) {\n return this.data[0].dictionary.isMemoized;\n }\n return false;\n }\n /**\n * Adds memoization to the Vector's {@link get} method. For dictionary\n * vectors, this method return a vector that memoizes only the dictionary\n * values.\n *\n * Memoization is very useful when decoding a value is expensive such as\n * Uft8. The memoization creates a cache of the size of the Vector and\n * therfore increases memory usage.\n *\n * @returns A new vector that memoizes calls to {@link get}.\n */\n memoize() {\n if (_type_mjs__WEBPACK_IMPORTED_MODULE_2__.DataType.isDictionary(this.type)) {\n const dictionary = new MemoizedVector(this.data[0].dictionary);\n const newData = this.data.map((data) => {\n const cloned = data.clone();\n cloned.dictionary = dictionary;\n return cloned;\n });\n return new Vector(newData);\n }\n return new MemoizedVector(this);\n }\n /**\n * Returns a vector without memoization of the {@link get} method. If this\n * vector is not memoized, this method returns this vector.\n *\n * @returns A a vector without memoization.\n */\n unmemoize() {\n if (_type_mjs__WEBPACK_IMPORTED_MODULE_2__.DataType.isDictionary(this.type) && this.isMemoized) {\n const dictionary = this.data[0].dictionary.unmemoize();\n const newData = this.data.map((data) => {\n const newData = data.clone();\n newData.dictionary = dictionary;\n return newData;\n });\n return new Vector(newData);\n }\n return this;\n }\n}\n_a = Symbol.toStringTag;\n// Initialize this static property via an IIFE so bundlers don't tree-shake\n// out this logic, but also so we're still compliant with `\"sideEffects\": false`\nVector[_a] = ((proto) => {\n proto.type = _type_mjs__WEBPACK_IMPORTED_MODULE_2__.DataType.prototype;\n proto.data = [];\n proto.length = 0;\n proto.stride = 1;\n proto.numChildren = 0;\n proto._nullCount = -1;\n proto._byteLength = -1;\n proto._offsets = new Uint32Array([0]);\n proto[Symbol.isConcatSpreadable] = true;\n const typeIds = Object.keys(_enum_mjs__WEBPACK_IMPORTED_MODULE_3__.Type)\n .map((T) => _enum_mjs__WEBPACK_IMPORTED_MODULE_3__.Type[T])\n .filter((T) => typeof T === 'number' && T !== _enum_mjs__WEBPACK_IMPORTED_MODULE_3__.Type.NONE);\n for (const typeId of typeIds) {\n const get = _visitor_get_mjs__WEBPACK_IMPORTED_MODULE_6__.instance.getVisitFnByTypeId(typeId);\n const set = _visitor_set_mjs__WEBPACK_IMPORTED_MODULE_7__.instance.getVisitFnByTypeId(typeId);\n const indexOf = _visitor_indexof_mjs__WEBPACK_IMPORTED_MODULE_8__.instance.getVisitFnByTypeId(typeId);\n const byteLength = _visitor_bytelength_mjs__WEBPACK_IMPORTED_MODULE_9__.instance.getVisitFnByTypeId(typeId);\n visitorsByTypeId[typeId] = { get, set, indexOf, byteLength };\n vectorPrototypesByTypeId[typeId] = Object.create(proto, {\n ['isValid']: { value: (0,_util_chunk_mjs__WEBPACK_IMPORTED_MODULE_1__.wrapChunkedCall1)(_util_chunk_mjs__WEBPACK_IMPORTED_MODULE_1__.isChunkedValid) },\n ['get']: { value: (0,_util_chunk_mjs__WEBPACK_IMPORTED_MODULE_1__.wrapChunkedCall1)(_visitor_get_mjs__WEBPACK_IMPORTED_MODULE_6__.instance.getVisitFnByTypeId(typeId)) },\n ['set']: { value: (0,_util_chunk_mjs__WEBPACK_IMPORTED_MODULE_1__.wrapChunkedCall2)(_visitor_set_mjs__WEBPACK_IMPORTED_MODULE_7__.instance.getVisitFnByTypeId(typeId)) },\n ['indexOf']: { value: (0,_util_chunk_mjs__WEBPACK_IMPORTED_MODULE_1__.wrapChunkedIndexOf)(_visitor_indexof_mjs__WEBPACK_IMPORTED_MODULE_8__.instance.getVisitFnByTypeId(typeId)) },\n ['getByteLength']: { value: (0,_util_chunk_mjs__WEBPACK_IMPORTED_MODULE_1__.wrapChunkedCall1)(_visitor_bytelength_mjs__WEBPACK_IMPORTED_MODULE_9__.instance.getVisitFnByTypeId(typeId)) },\n });\n }\n return 'Vector';\n})(Vector.prototype);\nclass MemoizedVector extends Vector {\n constructor(vector) {\n super(vector.data);\n const get = this.get;\n const set = this.set;\n const slice = this.slice;\n const cache = new Array(this.length);\n Object.defineProperty(this, 'get', {\n value(index) {\n const cachedValue = cache[index];\n if (cachedValue !== undefined) {\n return cachedValue;\n }\n const value = get.call(this, index);\n cache[index] = value;\n return value;\n }\n });\n Object.defineProperty(this, 'set', {\n value(index, value) {\n set.call(this, index, value);\n cache[index] = value;\n }\n });\n Object.defineProperty(this, 'slice', {\n value: (begin, end) => new MemoizedVector(slice.call(this, begin, end))\n });\n Object.defineProperty(this, 'isMemoized', { value: true });\n Object.defineProperty(this, 'unmemoize', {\n value: () => new Vector(this.data)\n });\n Object.defineProperty(this, 'memoize', {\n value: () => this\n });\n }\n}\n\nfunction makeVector(init) {\n if (init) {\n if (init instanceof _data_mjs__WEBPACK_IMPORTED_MODULE_0__.Data) {\n return new Vector([init]);\n }\n if (init instanceof Vector) {\n return new Vector(init.data);\n }\n if (init.type instanceof _type_mjs__WEBPACK_IMPORTED_MODULE_2__.DataType) {\n return new Vector([(0,_data_mjs__WEBPACK_IMPORTED_MODULE_0__.makeData)(init)]);\n }\n if (Array.isArray(init)) {\n return new Vector(init.flatMap(v => unwrapInputs(v)));\n }\n if (ArrayBuffer.isView(init)) {\n if (init instanceof DataView) {\n init = new Uint8Array(init.buffer);\n }\n const props = { offset: 0, length: init.length, nullCount: 0, data: init };\n if (init instanceof Int8Array) {\n return new Vector([(0,_data_mjs__WEBPACK_IMPORTED_MODULE_0__.makeData)(Object.assign(Object.assign({}, props), { type: new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Int8 }))]);\n }\n if (init instanceof Int16Array) {\n return new Vector([(0,_data_mjs__WEBPACK_IMPORTED_MODULE_0__.makeData)(Object.assign(Object.assign({}, props), { type: new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Int16 }))]);\n }\n if (init instanceof Int32Array) {\n return new Vector([(0,_data_mjs__WEBPACK_IMPORTED_MODULE_0__.makeData)(Object.assign(Object.assign({}, props), { type: new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Int32 }))]);\n }\n if (init instanceof _util_compat_mjs__WEBPACK_IMPORTED_MODULE_10__.BigInt64Array) {\n return new Vector([(0,_data_mjs__WEBPACK_IMPORTED_MODULE_0__.makeData)(Object.assign(Object.assign({}, props), { type: new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Int64 }))]);\n }\n if (init instanceof Uint8Array || init instanceof Uint8ClampedArray) {\n return new Vector([(0,_data_mjs__WEBPACK_IMPORTED_MODULE_0__.makeData)(Object.assign(Object.assign({}, props), { type: new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Uint8 }))]);\n }\n if (init instanceof Uint16Array) {\n return new Vector([(0,_data_mjs__WEBPACK_IMPORTED_MODULE_0__.makeData)(Object.assign(Object.assign({}, props), { type: new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Uint16 }))]);\n }\n if (init instanceof Uint32Array) {\n return new Vector([(0,_data_mjs__WEBPACK_IMPORTED_MODULE_0__.makeData)(Object.assign(Object.assign({}, props), { type: new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Uint32 }))]);\n }\n if (init instanceof _util_compat_mjs__WEBPACK_IMPORTED_MODULE_10__.BigUint64Array) {\n return new Vector([(0,_data_mjs__WEBPACK_IMPORTED_MODULE_0__.makeData)(Object.assign(Object.assign({}, props), { type: new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Uint64 }))]);\n }\n if (init instanceof Float32Array) {\n return new Vector([(0,_data_mjs__WEBPACK_IMPORTED_MODULE_0__.makeData)(Object.assign(Object.assign({}, props), { type: new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Float32 }))]);\n }\n if (init instanceof Float64Array) {\n return new Vector([(0,_data_mjs__WEBPACK_IMPORTED_MODULE_0__.makeData)(Object.assign(Object.assign({}, props), { type: new _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Float64 }))]);\n }\n throw new Error('Unrecognized input');\n }\n }\n throw new Error('Unrecognized input');\n}\nfunction unwrapInputs(x) {\n return x instanceof _data_mjs__WEBPACK_IMPORTED_MODULE_0__.Data ? [x] : (x instanceof Vector ? x.data : makeVector(x).data);\n}\n\n//# sourceMappingURL=vector.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/vector.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/visitor.mjs": +/*!***********************************************!*\ + !*** ./node_modules/apache-arrow/visitor.mjs ***! + \***********************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Visitor: () => (/* binding */ Visitor)\n/* harmony export */ });\n/* harmony import */ var _enum_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./enum.mjs */ \"./node_modules/apache-arrow/enum.mjs\");\n/* harmony import */ var _type_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./type.mjs */ \"./node_modules/apache-arrow/type.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\nclass Visitor {\n visitMany(nodes, ...args) {\n return nodes.map((node, i) => this.visit(node, ...args.map((x) => x[i])));\n }\n visit(...args) {\n return this.getVisitFn(args[0], false).apply(this, args);\n }\n getVisitFn(node, throwIfNotFound = true) {\n return getVisitFn(this, node, throwIfNotFound);\n }\n getVisitFnByTypeId(typeId, throwIfNotFound = true) {\n return getVisitFnByTypeId(this, typeId, throwIfNotFound);\n }\n visitNull(_node, ..._args) { return null; }\n visitBool(_node, ..._args) { return null; }\n visitInt(_node, ..._args) { return null; }\n visitFloat(_node, ..._args) { return null; }\n visitUtf8(_node, ..._args) { return null; }\n visitBinary(_node, ..._args) { return null; }\n visitFixedSizeBinary(_node, ..._args) { return null; }\n visitDate(_node, ..._args) { return null; }\n visitTimestamp(_node, ..._args) { return null; }\n visitTime(_node, ..._args) { return null; }\n visitDecimal(_node, ..._args) { return null; }\n visitList(_node, ..._args) { return null; }\n visitStruct(_node, ..._args) { return null; }\n visitUnion(_node, ..._args) { return null; }\n visitDictionary(_node, ..._args) { return null; }\n visitInterval(_node, ..._args) { return null; }\n visitFixedSizeList(_node, ..._args) { return null; }\n visitMap(_node, ..._args) { return null; }\n}\n/** @ignore */\nfunction getVisitFn(visitor, node, throwIfNotFound = true) {\n if (typeof node === 'number') {\n return getVisitFnByTypeId(visitor, node, throwIfNotFound);\n }\n if (typeof node === 'string' && (node in _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type)) {\n return getVisitFnByTypeId(visitor, _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type[node], throwIfNotFound);\n }\n if (node && (node instanceof _type_mjs__WEBPACK_IMPORTED_MODULE_1__.DataType)) {\n return getVisitFnByTypeId(visitor, inferDType(node), throwIfNotFound);\n }\n if ((node === null || node === void 0 ? void 0 : node.type) && (node.type instanceof _type_mjs__WEBPACK_IMPORTED_MODULE_1__.DataType)) {\n return getVisitFnByTypeId(visitor, inferDType(node.type), throwIfNotFound);\n }\n return getVisitFnByTypeId(visitor, _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.NONE, throwIfNotFound);\n}\n/** @ignore */\nfunction getVisitFnByTypeId(visitor, dtype, throwIfNotFound = true) {\n let fn = null;\n switch (dtype) {\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Null:\n fn = visitor.visitNull;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Bool:\n fn = visitor.visitBool;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Int:\n fn = visitor.visitInt;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Int8:\n fn = visitor.visitInt8 || visitor.visitInt;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Int16:\n fn = visitor.visitInt16 || visitor.visitInt;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Int32:\n fn = visitor.visitInt32 || visitor.visitInt;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Int64:\n fn = visitor.visitInt64 || visitor.visitInt;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Uint8:\n fn = visitor.visitUint8 || visitor.visitInt;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Uint16:\n fn = visitor.visitUint16 || visitor.visitInt;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Uint32:\n fn = visitor.visitUint32 || visitor.visitInt;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Uint64:\n fn = visitor.visitUint64 || visitor.visitInt;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Float:\n fn = visitor.visitFloat;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Float16:\n fn = visitor.visitFloat16 || visitor.visitFloat;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Float32:\n fn = visitor.visitFloat32 || visitor.visitFloat;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Float64:\n fn = visitor.visitFloat64 || visitor.visitFloat;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Utf8:\n fn = visitor.visitUtf8;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Binary:\n fn = visitor.visitBinary;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.FixedSizeBinary:\n fn = visitor.visitFixedSizeBinary;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Date:\n fn = visitor.visitDate;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.DateDay:\n fn = visitor.visitDateDay || visitor.visitDate;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.DateMillisecond:\n fn = visitor.visitDateMillisecond || visitor.visitDate;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Timestamp:\n fn = visitor.visitTimestamp;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.TimestampSecond:\n fn = visitor.visitTimestampSecond || visitor.visitTimestamp;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.TimestampMillisecond:\n fn = visitor.visitTimestampMillisecond || visitor.visitTimestamp;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.TimestampMicrosecond:\n fn = visitor.visitTimestampMicrosecond || visitor.visitTimestamp;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.TimestampNanosecond:\n fn = visitor.visitTimestampNanosecond || visitor.visitTimestamp;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Time:\n fn = visitor.visitTime;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.TimeSecond:\n fn = visitor.visitTimeSecond || visitor.visitTime;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.TimeMillisecond:\n fn = visitor.visitTimeMillisecond || visitor.visitTime;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.TimeMicrosecond:\n fn = visitor.visitTimeMicrosecond || visitor.visitTime;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.TimeNanosecond:\n fn = visitor.visitTimeNanosecond || visitor.visitTime;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Decimal:\n fn = visitor.visitDecimal;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.List:\n fn = visitor.visitList;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Struct:\n fn = visitor.visitStruct;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Union:\n fn = visitor.visitUnion;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.DenseUnion:\n fn = visitor.visitDenseUnion || visitor.visitUnion;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.SparseUnion:\n fn = visitor.visitSparseUnion || visitor.visitUnion;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Dictionary:\n fn = visitor.visitDictionary;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Interval:\n fn = visitor.visitInterval;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.IntervalDayTime:\n fn = visitor.visitIntervalDayTime || visitor.visitInterval;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.IntervalYearMonth:\n fn = visitor.visitIntervalYearMonth || visitor.visitInterval;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.FixedSizeList:\n fn = visitor.visitFixedSizeList;\n break;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Map:\n fn = visitor.visitMap;\n break;\n }\n if (typeof fn === 'function')\n return fn;\n if (!throwIfNotFound)\n return () => null;\n throw new Error(`Unrecognized type '${_enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type[dtype]}'`);\n}\n/** @ignore */\nfunction inferDType(type) {\n switch (type.typeId) {\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Null: return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Null;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Int: {\n const { bitWidth, isSigned } = type;\n switch (bitWidth) {\n case 8: return isSigned ? _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Int8 : _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Uint8;\n case 16: return isSigned ? _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Int16 : _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Uint16;\n case 32: return isSigned ? _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Int32 : _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Uint32;\n case 64: return isSigned ? _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Int64 : _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Uint64;\n }\n // @ts-ignore\n return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Int;\n }\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Float:\n switch (type.precision) {\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Precision.HALF: return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Float16;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Precision.SINGLE: return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Float32;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Precision.DOUBLE: return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Float64;\n }\n // @ts-ignore\n return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Float;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Binary: return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Binary;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Utf8: return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Utf8;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Bool: return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Bool;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Decimal: return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Decimal;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Time:\n switch (type.unit) {\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.TimeUnit.SECOND: return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.TimeSecond;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.TimeUnit.MILLISECOND: return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.TimeMillisecond;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.TimeUnit.MICROSECOND: return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.TimeMicrosecond;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.TimeUnit.NANOSECOND: return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.TimeNanosecond;\n }\n // @ts-ignore\n return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Time;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Timestamp:\n switch (type.unit) {\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.TimeUnit.SECOND: return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.TimestampSecond;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.TimeUnit.MILLISECOND: return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.TimestampMillisecond;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.TimeUnit.MICROSECOND: return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.TimestampMicrosecond;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.TimeUnit.NANOSECOND: return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.TimestampNanosecond;\n }\n // @ts-ignore\n return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Timestamp;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Date:\n switch (type.unit) {\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.DateUnit.DAY: return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.DateDay;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.DateUnit.MILLISECOND: return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.DateMillisecond;\n }\n // @ts-ignore\n return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Date;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Interval:\n switch (type.unit) {\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.IntervalUnit.DAY_TIME: return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.IntervalDayTime;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.IntervalUnit.YEAR_MONTH: return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.IntervalYearMonth;\n }\n // @ts-ignore\n return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Interval;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Map: return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Map;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.List: return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.List;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Struct: return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Struct;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Union:\n switch (type.mode) {\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.UnionMode.Dense: return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.DenseUnion;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.UnionMode.Sparse: return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.SparseUnion;\n }\n // @ts-ignore\n return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Union;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.FixedSizeBinary: return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.FixedSizeBinary;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.FixedSizeList: return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.FixedSizeList;\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Dictionary: return _enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type.Dictionary;\n }\n throw new Error(`Unrecognized type '${_enum_mjs__WEBPACK_IMPORTED_MODULE_0__.Type[type.typeId]}'`);\n}\n// Add these here so they're picked up by the externs creator\n// in the build, and closure-compiler doesn't minify them away\nVisitor.prototype.visitInt8 = null;\nVisitor.prototype.visitInt16 = null;\nVisitor.prototype.visitInt32 = null;\nVisitor.prototype.visitInt64 = null;\nVisitor.prototype.visitUint8 = null;\nVisitor.prototype.visitUint16 = null;\nVisitor.prototype.visitUint32 = null;\nVisitor.prototype.visitUint64 = null;\nVisitor.prototype.visitFloat16 = null;\nVisitor.prototype.visitFloat32 = null;\nVisitor.prototype.visitFloat64 = null;\nVisitor.prototype.visitDateDay = null;\nVisitor.prototype.visitDateMillisecond = null;\nVisitor.prototype.visitTimestampSecond = null;\nVisitor.prototype.visitTimestampMillisecond = null;\nVisitor.prototype.visitTimestampMicrosecond = null;\nVisitor.prototype.visitTimestampNanosecond = null;\nVisitor.prototype.visitTimeSecond = null;\nVisitor.prototype.visitTimeMillisecond = null;\nVisitor.prototype.visitTimeMicrosecond = null;\nVisitor.prototype.visitTimeNanosecond = null;\nVisitor.prototype.visitDenseUnion = null;\nVisitor.prototype.visitSparseUnion = null;\nVisitor.prototype.visitIntervalDayTime = null;\nVisitor.prototype.visitIntervalYearMonth = null;\n\n//# sourceMappingURL=visitor.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/visitor.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/visitor/builderctor.mjs": +/*!***********************************************************!*\ + !*** ./node_modules/apache-arrow/visitor/builderctor.mjs ***! + \***********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ GetBuilderCtor: () => (/* binding */ GetBuilderCtor),\n/* harmony export */ instance: () => (/* binding */ instance)\n/* harmony export */ });\n/* harmony import */ var _visitor_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../visitor.mjs */ \"./node_modules/apache-arrow/visitor.mjs\");\n/* harmony import */ var _builder_binary_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../builder/binary.mjs */ \"./node_modules/apache-arrow/builder/binary.mjs\");\n/* harmony import */ var _builder_bool_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../builder/bool.mjs */ \"./node_modules/apache-arrow/builder/bool.mjs\");\n/* harmony import */ var _builder_date_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../builder/date.mjs */ \"./node_modules/apache-arrow/builder/date.mjs\");\n/* harmony import */ var _builder_decimal_mjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../builder/decimal.mjs */ \"./node_modules/apache-arrow/builder/decimal.mjs\");\n/* harmony import */ var _builder_dictionary_mjs__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../builder/dictionary.mjs */ \"./node_modules/apache-arrow/builder/dictionary.mjs\");\n/* harmony import */ var _builder_fixedsizebinary_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../builder/fixedsizebinary.mjs */ \"./node_modules/apache-arrow/builder/fixedsizebinary.mjs\");\n/* harmony import */ var _builder_fixedsizelist_mjs__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../builder/fixedsizelist.mjs */ \"./node_modules/apache-arrow/builder/fixedsizelist.mjs\");\n/* harmony import */ var _builder_float_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../builder/float.mjs */ \"./node_modules/apache-arrow/builder/float.mjs\");\n/* harmony import */ var _builder_interval_mjs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../builder/interval.mjs */ \"./node_modules/apache-arrow/builder/interval.mjs\");\n/* harmony import */ var _builder_int_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../builder/int.mjs */ \"./node_modules/apache-arrow/builder/int.mjs\");\n/* harmony import */ var _builder_list_mjs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../builder/list.mjs */ \"./node_modules/apache-arrow/builder/list.mjs\");\n/* harmony import */ var _builder_map_mjs__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../builder/map.mjs */ \"./node_modules/apache-arrow/builder/map.mjs\");\n/* harmony import */ var _builder_null_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../builder/null.mjs */ \"./node_modules/apache-arrow/builder/null.mjs\");\n/* harmony import */ var _builder_struct_mjs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../builder/struct.mjs */ \"./node_modules/apache-arrow/builder/struct.mjs\");\n/* harmony import */ var _builder_timestamp_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../builder/timestamp.mjs */ \"./node_modules/apache-arrow/builder/timestamp.mjs\");\n/* harmony import */ var _builder_time_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../builder/time.mjs */ \"./node_modules/apache-arrow/builder/time.mjs\");\n/* harmony import */ var _builder_union_mjs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../builder/union.mjs */ \"./node_modules/apache-arrow/builder/union.mjs\");\n/* harmony import */ var _builder_utf8_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../builder/utf8.mjs */ \"./node_modules/apache-arrow/builder/utf8.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/** @ignore */\nclass GetBuilderCtor extends _visitor_mjs__WEBPACK_IMPORTED_MODULE_0__.Visitor {\n visitNull() { return _builder_null_mjs__WEBPACK_IMPORTED_MODULE_1__.NullBuilder; }\n visitBool() { return _builder_bool_mjs__WEBPACK_IMPORTED_MODULE_2__.BoolBuilder; }\n visitInt() { return _builder_int_mjs__WEBPACK_IMPORTED_MODULE_3__.IntBuilder; }\n visitInt8() { return _builder_int_mjs__WEBPACK_IMPORTED_MODULE_3__.Int8Builder; }\n visitInt16() { return _builder_int_mjs__WEBPACK_IMPORTED_MODULE_3__.Int16Builder; }\n visitInt32() { return _builder_int_mjs__WEBPACK_IMPORTED_MODULE_3__.Int32Builder; }\n visitInt64() { return _builder_int_mjs__WEBPACK_IMPORTED_MODULE_3__.Int64Builder; }\n visitUint8() { return _builder_int_mjs__WEBPACK_IMPORTED_MODULE_3__.Uint8Builder; }\n visitUint16() { return _builder_int_mjs__WEBPACK_IMPORTED_MODULE_3__.Uint16Builder; }\n visitUint32() { return _builder_int_mjs__WEBPACK_IMPORTED_MODULE_3__.Uint32Builder; }\n visitUint64() { return _builder_int_mjs__WEBPACK_IMPORTED_MODULE_3__.Uint64Builder; }\n visitFloat() { return _builder_float_mjs__WEBPACK_IMPORTED_MODULE_4__.FloatBuilder; }\n visitFloat16() { return _builder_float_mjs__WEBPACK_IMPORTED_MODULE_4__.Float16Builder; }\n visitFloat32() { return _builder_float_mjs__WEBPACK_IMPORTED_MODULE_4__.Float32Builder; }\n visitFloat64() { return _builder_float_mjs__WEBPACK_IMPORTED_MODULE_4__.Float64Builder; }\n visitUtf8() { return _builder_utf8_mjs__WEBPACK_IMPORTED_MODULE_5__.Utf8Builder; }\n visitBinary() { return _builder_binary_mjs__WEBPACK_IMPORTED_MODULE_6__.BinaryBuilder; }\n visitFixedSizeBinary() { return _builder_fixedsizebinary_mjs__WEBPACK_IMPORTED_MODULE_7__.FixedSizeBinaryBuilder; }\n visitDate() { return _builder_date_mjs__WEBPACK_IMPORTED_MODULE_8__.DateBuilder; }\n visitDateDay() { return _builder_date_mjs__WEBPACK_IMPORTED_MODULE_8__.DateDayBuilder; }\n visitDateMillisecond() { return _builder_date_mjs__WEBPACK_IMPORTED_MODULE_8__.DateMillisecondBuilder; }\n visitTimestamp() { return _builder_timestamp_mjs__WEBPACK_IMPORTED_MODULE_9__.TimestampBuilder; }\n visitTimestampSecond() { return _builder_timestamp_mjs__WEBPACK_IMPORTED_MODULE_9__.TimestampSecondBuilder; }\n visitTimestampMillisecond() { return _builder_timestamp_mjs__WEBPACK_IMPORTED_MODULE_9__.TimestampMillisecondBuilder; }\n visitTimestampMicrosecond() { return _builder_timestamp_mjs__WEBPACK_IMPORTED_MODULE_9__.TimestampMicrosecondBuilder; }\n visitTimestampNanosecond() { return _builder_timestamp_mjs__WEBPACK_IMPORTED_MODULE_9__.TimestampNanosecondBuilder; }\n visitTime() { return _builder_time_mjs__WEBPACK_IMPORTED_MODULE_10__.TimeBuilder; }\n visitTimeSecond() { return _builder_time_mjs__WEBPACK_IMPORTED_MODULE_10__.TimeSecondBuilder; }\n visitTimeMillisecond() { return _builder_time_mjs__WEBPACK_IMPORTED_MODULE_10__.TimeMillisecondBuilder; }\n visitTimeMicrosecond() { return _builder_time_mjs__WEBPACK_IMPORTED_MODULE_10__.TimeMicrosecondBuilder; }\n visitTimeNanosecond() { return _builder_time_mjs__WEBPACK_IMPORTED_MODULE_10__.TimeNanosecondBuilder; }\n visitDecimal() { return _builder_decimal_mjs__WEBPACK_IMPORTED_MODULE_11__.DecimalBuilder; }\n visitList() { return _builder_list_mjs__WEBPACK_IMPORTED_MODULE_12__.ListBuilder; }\n visitStruct() { return _builder_struct_mjs__WEBPACK_IMPORTED_MODULE_13__.StructBuilder; }\n visitUnion() { return _builder_union_mjs__WEBPACK_IMPORTED_MODULE_14__.UnionBuilder; }\n visitDenseUnion() { return _builder_union_mjs__WEBPACK_IMPORTED_MODULE_14__.DenseUnionBuilder; }\n visitSparseUnion() { return _builder_union_mjs__WEBPACK_IMPORTED_MODULE_14__.SparseUnionBuilder; }\n visitDictionary() { return _builder_dictionary_mjs__WEBPACK_IMPORTED_MODULE_15__.DictionaryBuilder; }\n visitInterval() { return _builder_interval_mjs__WEBPACK_IMPORTED_MODULE_16__.IntervalBuilder; }\n visitIntervalDayTime() { return _builder_interval_mjs__WEBPACK_IMPORTED_MODULE_16__.IntervalDayTimeBuilder; }\n visitIntervalYearMonth() { return _builder_interval_mjs__WEBPACK_IMPORTED_MODULE_16__.IntervalYearMonthBuilder; }\n visitFixedSizeList() { return _builder_fixedsizelist_mjs__WEBPACK_IMPORTED_MODULE_17__.FixedSizeListBuilder; }\n visitMap() { return _builder_map_mjs__WEBPACK_IMPORTED_MODULE_18__.MapBuilder; }\n}\n/** @ignore */\nconst instance = new GetBuilderCtor();\n\n//# sourceMappingURL=builderctor.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/visitor/builderctor.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/visitor/bytelength.mjs": +/*!**********************************************************!*\ + !*** ./node_modules/apache-arrow/visitor/bytelength.mjs ***! + \**********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ GetByteLengthVisitor: () => (/* binding */ GetByteLengthVisitor),\n/* harmony export */ instance: () => (/* binding */ instance)\n/* harmony export */ });\n/* harmony import */ var _visitor_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../visitor.mjs */ \"./node_modules/apache-arrow/visitor.mjs\");\n/* harmony import */ var _enum_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../enum.mjs */ \"./node_modules/apache-arrow/enum.mjs\");\n/* istanbul ignore file */\n\n\n/** @ignore */ const sum = (x, y) => x + y;\n/** @ignore */\nclass GetByteLengthVisitor extends _visitor_mjs__WEBPACK_IMPORTED_MODULE_0__.Visitor {\n visitNull(____, _) {\n return 0;\n }\n visitInt(data, _) {\n return data.type.bitWidth / 8;\n }\n visitFloat(data, _) {\n return data.type.ArrayType.BYTES_PER_ELEMENT;\n }\n visitBool(____, _) {\n return 1 / 8;\n }\n visitDecimal(data, _) {\n return data.type.bitWidth / 8;\n }\n visitDate(data, _) {\n return (data.type.unit + 1) * 4;\n }\n visitTime(data, _) {\n return data.type.bitWidth / 8;\n }\n visitTimestamp(data, _) {\n return data.type.unit === _enum_mjs__WEBPACK_IMPORTED_MODULE_1__.TimeUnit.SECOND ? 4 : 8;\n }\n visitInterval(data, _) {\n return (data.type.unit + 1) * 4;\n }\n visitStruct(data, i) {\n return data.children.reduce((total, child) => total + instance.visit(child, i), 0);\n }\n visitFixedSizeBinary(data, _) {\n return data.type.byteWidth;\n }\n visitMap(data, i) {\n // 4 + 4 for the indices\n return 8 + data.children.reduce((total, child) => total + instance.visit(child, i), 0);\n }\n visitDictionary(data, i) {\n var _a;\n return (data.type.indices.bitWidth / 8) + (((_a = data.dictionary) === null || _a === void 0 ? void 0 : _a.getByteLength(data.values[i])) || 0);\n }\n}\n/** @ignore */\nconst getUtf8ByteLength = ({ valueOffsets }, index) => {\n // 4 + 4 for the indices, `end - start` for the data bytes\n return 8 + (valueOffsets[index + 1] - valueOffsets[index]);\n};\n/** @ignore */\nconst getBinaryByteLength = ({ valueOffsets }, index) => {\n // 4 + 4 for the indices, `end - start` for the data bytes\n return 8 + (valueOffsets[index + 1] - valueOffsets[index]);\n};\n/** @ignore */\nconst getListByteLength = ({ valueOffsets, stride, children }, index) => {\n const child = children[0];\n const { [index * stride]: start } = valueOffsets;\n const { [index * stride + 1]: end } = valueOffsets;\n const visit = instance.getVisitFn(child.type);\n const slice = child.slice(start, end - start);\n let size = 8; // 4 + 4 for the indices\n for (let idx = -1, len = end - start; ++idx < len;) {\n size += visit(slice, idx);\n }\n return size;\n};\n/** @ignore */\nconst getFixedSizeListByteLength = ({ stride, children }, index) => {\n const child = children[0];\n const slice = child.slice(index * stride, stride);\n const visit = instance.getVisitFn(child.type);\n let size = 0;\n for (let idx = -1, len = slice.length; ++idx < len;) {\n size += visit(slice, idx);\n }\n return size;\n};\n/* istanbul ignore next */\n/** @ignore */\nconst getUnionByteLength = (data, index) => {\n return data.type.mode === _enum_mjs__WEBPACK_IMPORTED_MODULE_1__.UnionMode.Dense ?\n getDenseUnionByteLength(data, index) :\n getSparseUnionByteLength(data, index);\n};\n/** @ignore */\nconst getDenseUnionByteLength = ({ type, children, typeIds, valueOffsets }, index) => {\n const childIndex = type.typeIdToChildIndex[typeIds[index]];\n // 4 for the typeId, 4 for the valueOffsets, then the child at the offset\n return 8 + instance.visit(children[childIndex], valueOffsets[index]);\n};\n/** @ignore */\nconst getSparseUnionByteLength = ({ children }, index) => {\n // 4 for the typeId, then once each for the children at this index\n return 4 + instance.visitMany(children, children.map(() => index)).reduce(sum, 0);\n};\nGetByteLengthVisitor.prototype.visitUtf8 = getUtf8ByteLength;\nGetByteLengthVisitor.prototype.visitBinary = getBinaryByteLength;\nGetByteLengthVisitor.prototype.visitList = getListByteLength;\nGetByteLengthVisitor.prototype.visitFixedSizeList = getFixedSizeListByteLength;\nGetByteLengthVisitor.prototype.visitUnion = getUnionByteLength;\nGetByteLengthVisitor.prototype.visitDenseUnion = getDenseUnionByteLength;\nGetByteLengthVisitor.prototype.visitSparseUnion = getSparseUnionByteLength;\n/** @ignore */\nconst instance = new GetByteLengthVisitor();\n\n//# sourceMappingURL=bytelength.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/visitor/bytelength.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/visitor/get.mjs": +/*!***************************************************!*\ + !*** ./node_modules/apache-arrow/visitor/get.mjs ***! + \***************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ GetVisitor: () => (/* binding */ GetVisitor),\n/* harmony export */ instance: () => (/* binding */ instance)\n/* harmony export */ });\n/* harmony import */ var _util_bn_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/bn.mjs */ \"./node_modules/apache-arrow/util/bn.mjs\");\n/* harmony import */ var _vector_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../vector.mjs */ \"./node_modules/apache-arrow/vector.mjs\");\n/* harmony import */ var _visitor_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../visitor.mjs */ \"./node_modules/apache-arrow/visitor.mjs\");\n/* harmony import */ var _row_map_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../row/map.mjs */ \"./node_modules/apache-arrow/row/map.mjs\");\n/* harmony import */ var _row_struct_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../row/struct.mjs */ \"./node_modules/apache-arrow/row/struct.mjs\");\n/* harmony import */ var _util_utf8_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/utf8.mjs */ \"./node_modules/apache-arrow/util/utf8.mjs\");\n/* harmony import */ var _util_math_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/math.mjs */ \"./node_modules/apache-arrow/util/math.mjs\");\n/* harmony import */ var _enum_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../enum.mjs */ \"./node_modules/apache-arrow/enum.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n\n\n\n\n\n\n/** @ignore */\nclass GetVisitor extends _visitor_mjs__WEBPACK_IMPORTED_MODULE_0__.Visitor {\n}\n/** @ignore */\nfunction wrapGet(fn) {\n return (data, _1) => data.getValid(_1) ? fn(data, _1) : null;\n}\n/** @ignore */ const epochDaysToMs = (data, index) => 86400000 * data[index];\n/** @ignore */ const epochMillisecondsLongToMs = (data, index) => 4294967296 * (data[index + 1]) + (data[index] >>> 0);\n/** @ignore */ const epochMicrosecondsLongToMs = (data, index) => 4294967296 * (data[index + 1] / 1000) + ((data[index] >>> 0) / 1000);\n/** @ignore */ const epochNanosecondsLongToMs = (data, index) => 4294967296 * (data[index + 1] / 1000000) + ((data[index] >>> 0) / 1000000);\n/** @ignore */ const epochMillisecondsToDate = (epochMs) => new Date(epochMs);\n/** @ignore */ const epochDaysToDate = (data, index) => epochMillisecondsToDate(epochDaysToMs(data, index));\n/** @ignore */ const epochMillisecondsLongToDate = (data, index) => epochMillisecondsToDate(epochMillisecondsLongToMs(data, index));\n/** @ignore */\nconst getNull = (_data, _index) => null;\n/** @ignore */\nconst getVariableWidthBytes = (values, valueOffsets, index) => {\n if (index + 1 >= valueOffsets.length) {\n return null;\n }\n const x = valueOffsets[index];\n const y = valueOffsets[index + 1];\n return values.subarray(x, y);\n};\n/** @ignore */\nconst getBool = ({ offset, values }, index) => {\n const idx = offset + index;\n const byte = values[idx >> 3];\n return (byte & 1 << (idx % 8)) !== 0;\n};\n/** @ignore */\nconst getDateDay = ({ values }, index) => epochDaysToDate(values, index);\n/** @ignore */\nconst getDateMillisecond = ({ values }, index) => epochMillisecondsLongToDate(values, index * 2);\n/** @ignore */\nconst getNumeric = ({ stride, values }, index) => values[stride * index];\n/** @ignore */\nconst getFloat16 = ({ stride, values }, index) => (0,_util_math_mjs__WEBPACK_IMPORTED_MODULE_1__.uint16ToFloat64)(values[stride * index]);\n/** @ignore */\nconst getBigInts = ({ values }, index) => values[index];\n/** @ignore */\nconst getFixedSizeBinary = ({ stride, values }, index) => values.subarray(stride * index, stride * (index + 1));\n/** @ignore */\nconst getBinary = ({ values, valueOffsets }, index) => getVariableWidthBytes(values, valueOffsets, index);\n/** @ignore */\nconst getUtf8 = ({ values, valueOffsets }, index) => {\n const bytes = getVariableWidthBytes(values, valueOffsets, index);\n return bytes !== null ? (0,_util_utf8_mjs__WEBPACK_IMPORTED_MODULE_2__.decodeUtf8)(bytes) : null;\n};\n/* istanbul ignore next */\n/** @ignore */\nconst getInt = ({ values }, index) => values[index];\n/* istanbul ignore next */\n/** @ignore */\nconst getFloat = ({ type, values }, index) => (type.precision !== _enum_mjs__WEBPACK_IMPORTED_MODULE_3__.Precision.HALF ? values[index] : (0,_util_math_mjs__WEBPACK_IMPORTED_MODULE_1__.uint16ToFloat64)(values[index]));\n/* istanbul ignore next */\n/** @ignore */\nconst getDate = (data, index) => (data.type.unit === _enum_mjs__WEBPACK_IMPORTED_MODULE_3__.DateUnit.DAY\n ? getDateDay(data, index)\n : getDateMillisecond(data, index));\n/** @ignore */\nconst getTimestampSecond = ({ values }, index) => 1000 * epochMillisecondsLongToMs(values, index * 2);\n/** @ignore */\nconst getTimestampMillisecond = ({ values }, index) => epochMillisecondsLongToMs(values, index * 2);\n/** @ignore */\nconst getTimestampMicrosecond = ({ values }, index) => epochMicrosecondsLongToMs(values, index * 2);\n/** @ignore */\nconst getTimestampNanosecond = ({ values }, index) => epochNanosecondsLongToMs(values, index * 2);\n/* istanbul ignore next */\n/** @ignore */\nconst getTimestamp = (data, index) => {\n switch (data.type.unit) {\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_3__.TimeUnit.SECOND: return getTimestampSecond(data, index);\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_3__.TimeUnit.MILLISECOND: return getTimestampMillisecond(data, index);\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_3__.TimeUnit.MICROSECOND: return getTimestampMicrosecond(data, index);\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_3__.TimeUnit.NANOSECOND: return getTimestampNanosecond(data, index);\n }\n};\n/** @ignore */\nconst getTimeSecond = ({ values }, index) => values[index];\n/** @ignore */\nconst getTimeMillisecond = ({ values }, index) => values[index];\n/** @ignore */\nconst getTimeMicrosecond = ({ values }, index) => values[index];\n/** @ignore */\nconst getTimeNanosecond = ({ values }, index) => values[index];\n/* istanbul ignore next */\n/** @ignore */\nconst getTime = (data, index) => {\n switch (data.type.unit) {\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_3__.TimeUnit.SECOND: return getTimeSecond(data, index);\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_3__.TimeUnit.MILLISECOND: return getTimeMillisecond(data, index);\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_3__.TimeUnit.MICROSECOND: return getTimeMicrosecond(data, index);\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_3__.TimeUnit.NANOSECOND: return getTimeNanosecond(data, index);\n }\n};\n/** @ignore */\nconst getDecimal = ({ values, stride }, index) => _util_bn_mjs__WEBPACK_IMPORTED_MODULE_4__.BN.decimal(values.subarray(stride * index, stride * (index + 1)));\n/** @ignore */\nconst getList = (data, index) => {\n const { valueOffsets, stride, children } = data;\n const { [index * stride]: begin, [index * stride + 1]: end } = valueOffsets;\n const child = children[0];\n const slice = child.slice(begin, end - begin);\n return new _vector_mjs__WEBPACK_IMPORTED_MODULE_5__.Vector([slice]);\n};\n/** @ignore */\nconst getMap = (data, index) => {\n const { valueOffsets, children } = data;\n const { [index]: begin, [index + 1]: end } = valueOffsets;\n const child = children[0];\n return new _row_map_mjs__WEBPACK_IMPORTED_MODULE_6__.MapRow(child.slice(begin, end - begin));\n};\n/** @ignore */\nconst getStruct = (data, index) => {\n return new _row_struct_mjs__WEBPACK_IMPORTED_MODULE_7__.StructRow(data, index);\n};\n/* istanbul ignore next */\n/** @ignore */\nconst getUnion = (data, index) => {\n return data.type.mode === _enum_mjs__WEBPACK_IMPORTED_MODULE_3__.UnionMode.Dense ?\n getDenseUnion(data, index) :\n getSparseUnion(data, index);\n};\n/** @ignore */\nconst getDenseUnion = (data, index) => {\n const childIndex = data.type.typeIdToChildIndex[data.typeIds[index]];\n const child = data.children[childIndex];\n return instance.visit(child, data.valueOffsets[index]);\n};\n/** @ignore */\nconst getSparseUnion = (data, index) => {\n const childIndex = data.type.typeIdToChildIndex[data.typeIds[index]];\n const child = data.children[childIndex];\n return instance.visit(child, index);\n};\n/** @ignore */\nconst getDictionary = (data, index) => {\n var _a;\n return (_a = data.dictionary) === null || _a === void 0 ? void 0 : _a.get(data.values[index]);\n};\n/* istanbul ignore next */\n/** @ignore */\nconst getInterval = (data, index) => (data.type.unit === _enum_mjs__WEBPACK_IMPORTED_MODULE_3__.IntervalUnit.DAY_TIME)\n ? getIntervalDayTime(data, index)\n : getIntervalYearMonth(data, index);\n/** @ignore */\nconst getIntervalDayTime = ({ values }, index) => values.subarray(2 * index, 2 * (index + 1));\n/** @ignore */\nconst getIntervalYearMonth = ({ values }, index) => {\n const interval = values[index];\n const int32s = new Int32Array(2);\n int32s[0] = Math.trunc(interval / 12); /* years */\n int32s[1] = Math.trunc(interval % 12); /* months */\n return int32s;\n};\n/** @ignore */\nconst getFixedSizeList = (data, index) => {\n const { stride, children } = data;\n const child = children[0];\n const slice = child.slice(index * stride, stride);\n return new _vector_mjs__WEBPACK_IMPORTED_MODULE_5__.Vector([slice]);\n};\nGetVisitor.prototype.visitNull = wrapGet(getNull);\nGetVisitor.prototype.visitBool = wrapGet(getBool);\nGetVisitor.prototype.visitInt = wrapGet(getInt);\nGetVisitor.prototype.visitInt8 = wrapGet(getNumeric);\nGetVisitor.prototype.visitInt16 = wrapGet(getNumeric);\nGetVisitor.prototype.visitInt32 = wrapGet(getNumeric);\nGetVisitor.prototype.visitInt64 = wrapGet(getBigInts);\nGetVisitor.prototype.visitUint8 = wrapGet(getNumeric);\nGetVisitor.prototype.visitUint16 = wrapGet(getNumeric);\nGetVisitor.prototype.visitUint32 = wrapGet(getNumeric);\nGetVisitor.prototype.visitUint64 = wrapGet(getBigInts);\nGetVisitor.prototype.visitFloat = wrapGet(getFloat);\nGetVisitor.prototype.visitFloat16 = wrapGet(getFloat16);\nGetVisitor.prototype.visitFloat32 = wrapGet(getNumeric);\nGetVisitor.prototype.visitFloat64 = wrapGet(getNumeric);\nGetVisitor.prototype.visitUtf8 = wrapGet(getUtf8);\nGetVisitor.prototype.visitBinary = wrapGet(getBinary);\nGetVisitor.prototype.visitFixedSizeBinary = wrapGet(getFixedSizeBinary);\nGetVisitor.prototype.visitDate = wrapGet(getDate);\nGetVisitor.prototype.visitDateDay = wrapGet(getDateDay);\nGetVisitor.prototype.visitDateMillisecond = wrapGet(getDateMillisecond);\nGetVisitor.prototype.visitTimestamp = wrapGet(getTimestamp);\nGetVisitor.prototype.visitTimestampSecond = wrapGet(getTimestampSecond);\nGetVisitor.prototype.visitTimestampMillisecond = wrapGet(getTimestampMillisecond);\nGetVisitor.prototype.visitTimestampMicrosecond = wrapGet(getTimestampMicrosecond);\nGetVisitor.prototype.visitTimestampNanosecond = wrapGet(getTimestampNanosecond);\nGetVisitor.prototype.visitTime = wrapGet(getTime);\nGetVisitor.prototype.visitTimeSecond = wrapGet(getTimeSecond);\nGetVisitor.prototype.visitTimeMillisecond = wrapGet(getTimeMillisecond);\nGetVisitor.prototype.visitTimeMicrosecond = wrapGet(getTimeMicrosecond);\nGetVisitor.prototype.visitTimeNanosecond = wrapGet(getTimeNanosecond);\nGetVisitor.prototype.visitDecimal = wrapGet(getDecimal);\nGetVisitor.prototype.visitList = wrapGet(getList);\nGetVisitor.prototype.visitStruct = wrapGet(getStruct);\nGetVisitor.prototype.visitUnion = wrapGet(getUnion);\nGetVisitor.prototype.visitDenseUnion = wrapGet(getDenseUnion);\nGetVisitor.prototype.visitSparseUnion = wrapGet(getSparseUnion);\nGetVisitor.prototype.visitDictionary = wrapGet(getDictionary);\nGetVisitor.prototype.visitInterval = wrapGet(getInterval);\nGetVisitor.prototype.visitIntervalDayTime = wrapGet(getIntervalDayTime);\nGetVisitor.prototype.visitIntervalYearMonth = wrapGet(getIntervalYearMonth);\nGetVisitor.prototype.visitFixedSizeList = wrapGet(getFixedSizeList);\nGetVisitor.prototype.visitMap = wrapGet(getMap);\n/** @ignore */\nconst instance = new GetVisitor();\n\n//# sourceMappingURL=get.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/visitor/get.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/visitor/indexof.mjs": +/*!*******************************************************!*\ + !*** ./node_modules/apache-arrow/visitor/indexof.mjs ***! + \*******************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ IndexOfVisitor: () => (/* binding */ IndexOfVisitor),\n/* harmony export */ instance: () => (/* binding */ instance)\n/* harmony export */ });\n/* harmony import */ var _visitor_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../visitor.mjs */ \"./node_modules/apache-arrow/visitor.mjs\");\n/* harmony import */ var _get_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./get.mjs */ \"./node_modules/apache-arrow/visitor/get.mjs\");\n/* harmony import */ var _util_bit_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/bit.mjs */ \"./node_modules/apache-arrow/util/bit.mjs\");\n/* harmony import */ var _util_vector_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/vector.mjs */ \"./node_modules/apache-arrow/util/vector.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n\n\n/** @ignore */\nclass IndexOfVisitor extends _visitor_mjs__WEBPACK_IMPORTED_MODULE_0__.Visitor {\n}\n/** @ignore */\nfunction nullIndexOf(data, searchElement) {\n // if you're looking for nulls and the vector isn't empty, we've got 'em!\n return searchElement === null && data.length > 0 ? 0 : -1;\n}\n/** @ignore */\nfunction indexOfNull(data, fromIndex) {\n const { nullBitmap } = data;\n if (!nullBitmap || data.nullCount <= 0) {\n return -1;\n }\n let i = 0;\n for (const isValid of new _util_bit_mjs__WEBPACK_IMPORTED_MODULE_1__.BitIterator(nullBitmap, data.offset + (fromIndex || 0), data.length, nullBitmap, _util_bit_mjs__WEBPACK_IMPORTED_MODULE_1__.getBool)) {\n if (!isValid) {\n return i;\n }\n ++i;\n }\n return -1;\n}\n/** @ignore */\nfunction indexOfValue(data, searchElement, fromIndex) {\n if (searchElement === undefined) {\n return -1;\n }\n if (searchElement === null) {\n return indexOfNull(data, fromIndex);\n }\n const get = _get_mjs__WEBPACK_IMPORTED_MODULE_2__.instance.getVisitFn(data);\n const compare = (0,_util_vector_mjs__WEBPACK_IMPORTED_MODULE_3__.createElementComparator)(searchElement);\n for (let i = (fromIndex || 0) - 1, n = data.length; ++i < n;) {\n if (compare(get(data, i))) {\n return i;\n }\n }\n return -1;\n}\n/** @ignore */\nfunction indexOfUnion(data, searchElement, fromIndex) {\n // Unions are special -- they do have a nullBitmap, but so can their children.\n // If the searchElement is null, we don't know whether it came from the Union's\n // bitmap or one of its childrens'. So we don't interrogate the Union's bitmap,\n // since that will report the wrong index if a child has a null before the Union.\n const get = _get_mjs__WEBPACK_IMPORTED_MODULE_2__.instance.getVisitFn(data);\n const compare = (0,_util_vector_mjs__WEBPACK_IMPORTED_MODULE_3__.createElementComparator)(searchElement);\n for (let i = (fromIndex || 0) - 1, n = data.length; ++i < n;) {\n if (compare(get(data, i))) {\n return i;\n }\n }\n return -1;\n}\nIndexOfVisitor.prototype.visitNull = nullIndexOf;\nIndexOfVisitor.prototype.visitBool = indexOfValue;\nIndexOfVisitor.prototype.visitInt = indexOfValue;\nIndexOfVisitor.prototype.visitInt8 = indexOfValue;\nIndexOfVisitor.prototype.visitInt16 = indexOfValue;\nIndexOfVisitor.prototype.visitInt32 = indexOfValue;\nIndexOfVisitor.prototype.visitInt64 = indexOfValue;\nIndexOfVisitor.prototype.visitUint8 = indexOfValue;\nIndexOfVisitor.prototype.visitUint16 = indexOfValue;\nIndexOfVisitor.prototype.visitUint32 = indexOfValue;\nIndexOfVisitor.prototype.visitUint64 = indexOfValue;\nIndexOfVisitor.prototype.visitFloat = indexOfValue;\nIndexOfVisitor.prototype.visitFloat16 = indexOfValue;\nIndexOfVisitor.prototype.visitFloat32 = indexOfValue;\nIndexOfVisitor.prototype.visitFloat64 = indexOfValue;\nIndexOfVisitor.prototype.visitUtf8 = indexOfValue;\nIndexOfVisitor.prototype.visitBinary = indexOfValue;\nIndexOfVisitor.prototype.visitFixedSizeBinary = indexOfValue;\nIndexOfVisitor.prototype.visitDate = indexOfValue;\nIndexOfVisitor.prototype.visitDateDay = indexOfValue;\nIndexOfVisitor.prototype.visitDateMillisecond = indexOfValue;\nIndexOfVisitor.prototype.visitTimestamp = indexOfValue;\nIndexOfVisitor.prototype.visitTimestampSecond = indexOfValue;\nIndexOfVisitor.prototype.visitTimestampMillisecond = indexOfValue;\nIndexOfVisitor.prototype.visitTimestampMicrosecond = indexOfValue;\nIndexOfVisitor.prototype.visitTimestampNanosecond = indexOfValue;\nIndexOfVisitor.prototype.visitTime = indexOfValue;\nIndexOfVisitor.prototype.visitTimeSecond = indexOfValue;\nIndexOfVisitor.prototype.visitTimeMillisecond = indexOfValue;\nIndexOfVisitor.prototype.visitTimeMicrosecond = indexOfValue;\nIndexOfVisitor.prototype.visitTimeNanosecond = indexOfValue;\nIndexOfVisitor.prototype.visitDecimal = indexOfValue;\nIndexOfVisitor.prototype.visitList = indexOfValue;\nIndexOfVisitor.prototype.visitStruct = indexOfValue;\nIndexOfVisitor.prototype.visitUnion = indexOfValue;\nIndexOfVisitor.prototype.visitDenseUnion = indexOfUnion;\nIndexOfVisitor.prototype.visitSparseUnion = indexOfUnion;\nIndexOfVisitor.prototype.visitDictionary = indexOfValue;\nIndexOfVisitor.prototype.visitInterval = indexOfValue;\nIndexOfVisitor.prototype.visitIntervalDayTime = indexOfValue;\nIndexOfVisitor.prototype.visitIntervalYearMonth = indexOfValue;\nIndexOfVisitor.prototype.visitFixedSizeList = indexOfValue;\nIndexOfVisitor.prototype.visitMap = indexOfValue;\n/** @ignore */\nconst instance = new IndexOfVisitor();\n\n//# sourceMappingURL=indexof.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/visitor/indexof.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/visitor/iterator.mjs": +/*!********************************************************!*\ + !*** ./node_modules/apache-arrow/visitor/iterator.mjs ***! + \********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ IteratorVisitor: () => (/* binding */ IteratorVisitor),\n/* harmony export */ instance: () => (/* binding */ instance)\n/* harmony export */ });\n/* harmony import */ var _visitor_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../visitor.mjs */ \"./node_modules/apache-arrow/visitor.mjs\");\n/* harmony import */ var _enum_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../enum.mjs */ \"./node_modules/apache-arrow/enum.mjs\");\n/* harmony import */ var _type_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../type.mjs */ \"./node_modules/apache-arrow/type.mjs\");\n/* harmony import */ var _util_chunk_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/chunk.mjs */ \"./node_modules/apache-arrow/util/chunk.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n\n\n/** @ignore */\nclass IteratorVisitor extends _visitor_mjs__WEBPACK_IMPORTED_MODULE_0__.Visitor {\n}\n/** @ignore */\nfunction vectorIterator(vector) {\n const { type } = vector;\n // Fast case, defer to native iterators if possible\n if (vector.nullCount === 0 && vector.stride === 1 && ((type.typeId === _enum_mjs__WEBPACK_IMPORTED_MODULE_1__.Type.Timestamp) ||\n (type instanceof _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Int && type.bitWidth !== 64) ||\n (type instanceof _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Time && type.bitWidth !== 64) ||\n (type instanceof _type_mjs__WEBPACK_IMPORTED_MODULE_2__.Float && type.precision !== _enum_mjs__WEBPACK_IMPORTED_MODULE_1__.Precision.HALF))) {\n return new _util_chunk_mjs__WEBPACK_IMPORTED_MODULE_3__.ChunkedIterator(vector.data.length, (chunkIndex) => {\n const data = vector.data[chunkIndex];\n return data.values.subarray(0, data.length)[Symbol.iterator]();\n });\n }\n // Otherwise, iterate manually\n let offset = 0;\n return new _util_chunk_mjs__WEBPACK_IMPORTED_MODULE_3__.ChunkedIterator(vector.data.length, (chunkIndex) => {\n const data = vector.data[chunkIndex];\n const length = data.length;\n const inner = vector.slice(offset, offset + length);\n offset += length;\n return new VectorIterator(inner);\n });\n}\n/** @ignore */\nclass VectorIterator {\n constructor(vector) {\n this.vector = vector;\n this.index = 0;\n }\n next() {\n if (this.index < this.vector.length) {\n return {\n value: this.vector.get(this.index++)\n };\n }\n return { done: true, value: null };\n }\n [Symbol.iterator]() {\n return this;\n }\n}\nIteratorVisitor.prototype.visitNull = vectorIterator;\nIteratorVisitor.prototype.visitBool = vectorIterator;\nIteratorVisitor.prototype.visitInt = vectorIterator;\nIteratorVisitor.prototype.visitInt8 = vectorIterator;\nIteratorVisitor.prototype.visitInt16 = vectorIterator;\nIteratorVisitor.prototype.visitInt32 = vectorIterator;\nIteratorVisitor.prototype.visitInt64 = vectorIterator;\nIteratorVisitor.prototype.visitUint8 = vectorIterator;\nIteratorVisitor.prototype.visitUint16 = vectorIterator;\nIteratorVisitor.prototype.visitUint32 = vectorIterator;\nIteratorVisitor.prototype.visitUint64 = vectorIterator;\nIteratorVisitor.prototype.visitFloat = vectorIterator;\nIteratorVisitor.prototype.visitFloat16 = vectorIterator;\nIteratorVisitor.prototype.visitFloat32 = vectorIterator;\nIteratorVisitor.prototype.visitFloat64 = vectorIterator;\nIteratorVisitor.prototype.visitUtf8 = vectorIterator;\nIteratorVisitor.prototype.visitBinary = vectorIterator;\nIteratorVisitor.prototype.visitFixedSizeBinary = vectorIterator;\nIteratorVisitor.prototype.visitDate = vectorIterator;\nIteratorVisitor.prototype.visitDateDay = vectorIterator;\nIteratorVisitor.prototype.visitDateMillisecond = vectorIterator;\nIteratorVisitor.prototype.visitTimestamp = vectorIterator;\nIteratorVisitor.prototype.visitTimestampSecond = vectorIterator;\nIteratorVisitor.prototype.visitTimestampMillisecond = vectorIterator;\nIteratorVisitor.prototype.visitTimestampMicrosecond = vectorIterator;\nIteratorVisitor.prototype.visitTimestampNanosecond = vectorIterator;\nIteratorVisitor.prototype.visitTime = vectorIterator;\nIteratorVisitor.prototype.visitTimeSecond = vectorIterator;\nIteratorVisitor.prototype.visitTimeMillisecond = vectorIterator;\nIteratorVisitor.prototype.visitTimeMicrosecond = vectorIterator;\nIteratorVisitor.prototype.visitTimeNanosecond = vectorIterator;\nIteratorVisitor.prototype.visitDecimal = vectorIterator;\nIteratorVisitor.prototype.visitList = vectorIterator;\nIteratorVisitor.prototype.visitStruct = vectorIterator;\nIteratorVisitor.prototype.visitUnion = vectorIterator;\nIteratorVisitor.prototype.visitDenseUnion = vectorIterator;\nIteratorVisitor.prototype.visitSparseUnion = vectorIterator;\nIteratorVisitor.prototype.visitDictionary = vectorIterator;\nIteratorVisitor.prototype.visitInterval = vectorIterator;\nIteratorVisitor.prototype.visitIntervalDayTime = vectorIterator;\nIteratorVisitor.prototype.visitIntervalYearMonth = vectorIterator;\nIteratorVisitor.prototype.visitFixedSizeList = vectorIterator;\nIteratorVisitor.prototype.visitMap = vectorIterator;\n/** @ignore */\nconst instance = new IteratorVisitor();\n\n//# sourceMappingURL=iterator.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/visitor/iterator.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/visitor/jsontypeassembler.mjs": +/*!*****************************************************************!*\ + !*** ./node_modules/apache-arrow/visitor/jsontypeassembler.mjs ***! + \*****************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ JSONTypeAssembler: () => (/* binding */ JSONTypeAssembler)\n/* harmony export */ });\n/* harmony import */ var _visitor_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../visitor.mjs */ \"./node_modules/apache-arrow/visitor.mjs\");\n/* harmony import */ var _fb_type_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../fb/type.mjs */ \"./node_modules/apache-arrow/fb/type.mjs\");\n/* harmony import */ var _enum_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enum.mjs */ \"./node_modules/apache-arrow/enum.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n\n/** @ignore */\nclass JSONTypeAssembler extends _visitor_mjs__WEBPACK_IMPORTED_MODULE_0__.Visitor {\n visit(node) {\n return node == null ? undefined : super.visit(node);\n }\n visitNull({ typeId }) {\n return { 'name': _fb_type_mjs__WEBPACK_IMPORTED_MODULE_1__.Type[typeId].toLowerCase() };\n }\n visitInt({ typeId, bitWidth, isSigned }) {\n return { 'name': _fb_type_mjs__WEBPACK_IMPORTED_MODULE_1__.Type[typeId].toLowerCase(), 'bitWidth': bitWidth, 'isSigned': isSigned };\n }\n visitFloat({ typeId, precision }) {\n return { 'name': _fb_type_mjs__WEBPACK_IMPORTED_MODULE_1__.Type[typeId].toLowerCase(), 'precision': _enum_mjs__WEBPACK_IMPORTED_MODULE_2__.Precision[precision] };\n }\n visitBinary({ typeId }) {\n return { 'name': _fb_type_mjs__WEBPACK_IMPORTED_MODULE_1__.Type[typeId].toLowerCase() };\n }\n visitBool({ typeId }) {\n return { 'name': _fb_type_mjs__WEBPACK_IMPORTED_MODULE_1__.Type[typeId].toLowerCase() };\n }\n visitUtf8({ typeId }) {\n return { 'name': _fb_type_mjs__WEBPACK_IMPORTED_MODULE_1__.Type[typeId].toLowerCase() };\n }\n visitDecimal({ typeId, scale, precision, bitWidth }) {\n return { 'name': _fb_type_mjs__WEBPACK_IMPORTED_MODULE_1__.Type[typeId].toLowerCase(), 'scale': scale, 'precision': precision, 'bitWidth': bitWidth };\n }\n visitDate({ typeId, unit }) {\n return { 'name': _fb_type_mjs__WEBPACK_IMPORTED_MODULE_1__.Type[typeId].toLowerCase(), 'unit': _enum_mjs__WEBPACK_IMPORTED_MODULE_2__.DateUnit[unit] };\n }\n visitTime({ typeId, unit, bitWidth }) {\n return { 'name': _fb_type_mjs__WEBPACK_IMPORTED_MODULE_1__.Type[typeId].toLowerCase(), 'unit': _enum_mjs__WEBPACK_IMPORTED_MODULE_2__.TimeUnit[unit], bitWidth };\n }\n visitTimestamp({ typeId, timezone, unit }) {\n return { 'name': _fb_type_mjs__WEBPACK_IMPORTED_MODULE_1__.Type[typeId].toLowerCase(), 'unit': _enum_mjs__WEBPACK_IMPORTED_MODULE_2__.TimeUnit[unit], timezone };\n }\n visitInterval({ typeId, unit }) {\n return { 'name': _fb_type_mjs__WEBPACK_IMPORTED_MODULE_1__.Type[typeId].toLowerCase(), 'unit': _enum_mjs__WEBPACK_IMPORTED_MODULE_2__.IntervalUnit[unit] };\n }\n visitList({ typeId }) {\n return { 'name': _fb_type_mjs__WEBPACK_IMPORTED_MODULE_1__.Type[typeId].toLowerCase() };\n }\n visitStruct({ typeId }) {\n return { 'name': _fb_type_mjs__WEBPACK_IMPORTED_MODULE_1__.Type[typeId].toLowerCase() };\n }\n visitUnion({ typeId, mode, typeIds }) {\n return {\n 'name': _fb_type_mjs__WEBPACK_IMPORTED_MODULE_1__.Type[typeId].toLowerCase(),\n 'mode': _enum_mjs__WEBPACK_IMPORTED_MODULE_2__.UnionMode[mode],\n 'typeIds': [...typeIds]\n };\n }\n visitDictionary(node) {\n return this.visit(node.dictionary);\n }\n visitFixedSizeBinary({ typeId, byteWidth }) {\n return { 'name': _fb_type_mjs__WEBPACK_IMPORTED_MODULE_1__.Type[typeId].toLowerCase(), 'byteWidth': byteWidth };\n }\n visitFixedSizeList({ typeId, listSize }) {\n return { 'name': _fb_type_mjs__WEBPACK_IMPORTED_MODULE_1__.Type[typeId].toLowerCase(), 'listSize': listSize };\n }\n visitMap({ typeId, keysSorted }) {\n return { 'name': _fb_type_mjs__WEBPACK_IMPORTED_MODULE_1__.Type[typeId].toLowerCase(), 'keysSorted': keysSorted };\n }\n}\n\n//# sourceMappingURL=jsontypeassembler.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/visitor/jsontypeassembler.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/visitor/jsonvectorassembler.mjs": +/*!*******************************************************************!*\ + !*** ./node_modules/apache-arrow/visitor/jsonvectorassembler.mjs ***! + \*******************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ JSONVectorAssembler: () => (/* binding */ JSONVectorAssembler)\n/* harmony export */ });\n/* harmony import */ var _util_bn_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/bn.mjs */ \"./node_modules/apache-arrow/util/bn.mjs\");\n/* harmony import */ var _vector_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../vector.mjs */ \"./node_modules/apache-arrow/vector.mjs\");\n/* harmony import */ var _visitor_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../visitor.mjs */ \"./node_modules/apache-arrow/visitor.mjs\");\n/* harmony import */ var _enum_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enum.mjs */ \"./node_modules/apache-arrow/enum.mjs\");\n/* harmony import */ var _util_bit_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/bit.mjs */ \"./node_modules/apache-arrow/util/bit.mjs\");\n/* harmony import */ var _type_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../type.mjs */ \"./node_modules/apache-arrow/type.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n\n\n\n\n\n/** @ignore */\nclass JSONVectorAssembler extends _visitor_mjs__WEBPACK_IMPORTED_MODULE_0__.Visitor {\n /** @nocollapse */\n static assemble(...batches) {\n const assemlber = new JSONVectorAssembler();\n return batches.map(({ schema, data }) => {\n return assemlber.visitMany(schema.fields, data.children);\n });\n }\n visit({ name }, data) {\n const { length } = data;\n const { offset, nullCount, nullBitmap } = data;\n const type = _type_mjs__WEBPACK_IMPORTED_MODULE_1__.DataType.isDictionary(data.type) ? data.type.indices : data.type;\n const buffers = Object.assign([], data.buffers, { [_enum_mjs__WEBPACK_IMPORTED_MODULE_2__.BufferType.VALIDITY]: undefined });\n return Object.assign({ 'name': name, 'count': length, 'VALIDITY': _type_mjs__WEBPACK_IMPORTED_MODULE_1__.DataType.isNull(type) ? undefined\n : nullCount <= 0 ? Array.from({ length }, () => 1)\n : [...new _util_bit_mjs__WEBPACK_IMPORTED_MODULE_3__.BitIterator(nullBitmap, offset, length, null, _util_bit_mjs__WEBPACK_IMPORTED_MODULE_3__.getBit)] }, super.visit(data.clone(type, offset, length, 0, buffers)));\n }\n visitNull() { return {}; }\n visitBool({ values, offset, length }) {\n return { 'DATA': [...new _util_bit_mjs__WEBPACK_IMPORTED_MODULE_3__.BitIterator(values, offset, length, null, _util_bit_mjs__WEBPACK_IMPORTED_MODULE_3__.getBool)] };\n }\n visitInt(data) {\n return {\n 'DATA': data.type.bitWidth < 64\n ? [...data.values]\n : [...bigNumsToStrings(data.values, 2)]\n };\n }\n visitFloat(data) {\n return { 'DATA': [...data.values] };\n }\n visitUtf8(data) {\n return { 'DATA': [...new _vector_mjs__WEBPACK_IMPORTED_MODULE_4__.Vector([data])], 'OFFSET': [...data.valueOffsets] };\n }\n visitBinary(data) {\n return { 'DATA': [...binaryToString(new _vector_mjs__WEBPACK_IMPORTED_MODULE_4__.Vector([data]))], OFFSET: [...data.valueOffsets] };\n }\n visitFixedSizeBinary(data) {\n return { 'DATA': [...binaryToString(new _vector_mjs__WEBPACK_IMPORTED_MODULE_4__.Vector([data]))] };\n }\n visitDate(data) {\n return {\n 'DATA': data.type.unit === _enum_mjs__WEBPACK_IMPORTED_MODULE_2__.DateUnit.DAY\n ? [...data.values]\n : [...bigNumsToStrings(data.values, 2)]\n };\n }\n visitTimestamp(data) {\n return { 'DATA': [...bigNumsToStrings(data.values, 2)] };\n }\n visitTime(data) {\n return {\n 'DATA': data.type.unit < _enum_mjs__WEBPACK_IMPORTED_MODULE_2__.TimeUnit.MICROSECOND\n ? [...data.values]\n : [...bigNumsToStrings(data.values, 2)]\n };\n }\n visitDecimal(data) {\n return { 'DATA': [...bigNumsToStrings(data.values, 4)] };\n }\n visitList(data) {\n return {\n 'OFFSET': [...data.valueOffsets],\n 'children': this.visitMany(data.type.children, data.children)\n };\n }\n visitStruct(data) {\n return {\n 'children': this.visitMany(data.type.children, data.children)\n };\n }\n visitUnion(data) {\n return {\n 'TYPE': [...data.typeIds],\n 'OFFSET': data.type.mode === _enum_mjs__WEBPACK_IMPORTED_MODULE_2__.UnionMode.Dense ? [...data.valueOffsets] : undefined,\n 'children': this.visitMany(data.type.children, data.children)\n };\n }\n visitInterval(data) {\n return { 'DATA': [...data.values] };\n }\n visitFixedSizeList(data) {\n return {\n 'children': this.visitMany(data.type.children, data.children)\n };\n }\n visitMap(data) {\n return {\n 'OFFSET': [...data.valueOffsets],\n 'children': this.visitMany(data.type.children, data.children)\n };\n }\n}\n/** @ignore */\nfunction* binaryToString(vector) {\n for (const octets of vector) {\n yield octets.reduce((str, byte) => {\n return `${str}${('0' + (byte & 0xFF).toString(16)).slice(-2)}`;\n }, '').toUpperCase();\n }\n}\n/** @ignore */\nfunction* bigNumsToStrings(values, stride) {\n const u32s = new Uint32Array(values.buffer);\n for (let i = -1, n = u32s.length / stride; ++i < n;) {\n yield `${_util_bn_mjs__WEBPACK_IMPORTED_MODULE_5__.BN.new(u32s.subarray((i + 0) * stride, (i + 1) * stride), false)}`;\n }\n}\n\n//# sourceMappingURL=jsonvectorassembler.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/visitor/jsonvectorassembler.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/visitor/set.mjs": +/*!***************************************************!*\ + !*** ./node_modules/apache-arrow/visitor/set.mjs ***! + \***************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ SetVisitor: () => (/* binding */ SetVisitor),\n/* harmony export */ instance: () => (/* binding */ instance),\n/* harmony export */ setAnyFloat: () => (/* binding */ setAnyFloat),\n/* harmony export */ setDate: () => (/* binding */ setDate),\n/* harmony export */ setDateDay: () => (/* binding */ setDateDay),\n/* harmony export */ setDateMillisecond: () => (/* binding */ setDateMillisecond),\n/* harmony export */ setDecimal: () => (/* binding */ setDecimal),\n/* harmony export */ setEpochMsToDays: () => (/* binding */ setEpochMsToDays),\n/* harmony export */ setEpochMsToMicrosecondsLong: () => (/* binding */ setEpochMsToMicrosecondsLong),\n/* harmony export */ setEpochMsToMillisecondsLong: () => (/* binding */ setEpochMsToMillisecondsLong),\n/* harmony export */ setEpochMsToNanosecondsLong: () => (/* binding */ setEpochMsToNanosecondsLong),\n/* harmony export */ setFixedSizeBinary: () => (/* binding */ setFixedSizeBinary),\n/* harmony export */ setFloat: () => (/* binding */ setFloat),\n/* harmony export */ setFloat16: () => (/* binding */ setFloat16),\n/* harmony export */ setInt: () => (/* binding */ setInt),\n/* harmony export */ setIntervalDayTime: () => (/* binding */ setIntervalDayTime),\n/* harmony export */ setIntervalValue: () => (/* binding */ setIntervalValue),\n/* harmony export */ setIntervalYearMonth: () => (/* binding */ setIntervalYearMonth),\n/* harmony export */ setTime: () => (/* binding */ setTime),\n/* harmony export */ setTimeMicrosecond: () => (/* binding */ setTimeMicrosecond),\n/* harmony export */ setTimeMillisecond: () => (/* binding */ setTimeMillisecond),\n/* harmony export */ setTimeNanosecond: () => (/* binding */ setTimeNanosecond),\n/* harmony export */ setTimeSecond: () => (/* binding */ setTimeSecond),\n/* harmony export */ setTimestamp: () => (/* binding */ setTimestamp),\n/* harmony export */ setTimestampMicrosecond: () => (/* binding */ setTimestampMicrosecond),\n/* harmony export */ setTimestampMillisecond: () => (/* binding */ setTimestampMillisecond),\n/* harmony export */ setTimestampNanosecond: () => (/* binding */ setTimestampNanosecond),\n/* harmony export */ setTimestampSecond: () => (/* binding */ setTimestampSecond),\n/* harmony export */ setVariableWidthBytes: () => (/* binding */ setVariableWidthBytes)\n/* harmony export */ });\n/* harmony import */ var _vector_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../vector.mjs */ \"./node_modules/apache-arrow/vector.mjs\");\n/* harmony import */ var _visitor_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../visitor.mjs */ \"./node_modules/apache-arrow/visitor.mjs\");\n/* harmony import */ var _util_utf8_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/utf8.mjs */ \"./node_modules/apache-arrow/util/utf8.mjs\");\n/* harmony import */ var _util_math_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/math.mjs */ \"./node_modules/apache-arrow/util/math.mjs\");\n/* harmony import */ var _enum_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enum.mjs */ \"./node_modules/apache-arrow/enum.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n\n\n\n/** @ignore */\nclass SetVisitor extends _visitor_mjs__WEBPACK_IMPORTED_MODULE_0__.Visitor {\n}\n/** @ignore */\nfunction wrapSet(fn) {\n return (data, _1, _2) => {\n if (data.setValid(_1, _2 != null)) {\n return fn(data, _1, _2);\n }\n };\n}\n/** @ignore */\nconst setEpochMsToDays = (data, index, epochMs) => { data[index] = Math.trunc(epochMs / 86400000); };\n/** @ignore */\nconst setEpochMsToMillisecondsLong = (data, index, epochMs) => {\n data[index] = Math.trunc(epochMs % 4294967296);\n data[index + 1] = Math.trunc(epochMs / 4294967296);\n};\n/** @ignore */\nconst setEpochMsToMicrosecondsLong = (data, index, epochMs) => {\n data[index] = Math.trunc((epochMs * 1000) % 4294967296);\n data[index + 1] = Math.trunc((epochMs * 1000) / 4294967296);\n};\n/** @ignore */\nconst setEpochMsToNanosecondsLong = (data, index, epochMs) => {\n data[index] = Math.trunc((epochMs * 1000000) % 4294967296);\n data[index + 1] = Math.trunc((epochMs * 1000000) / 4294967296);\n};\n/** @ignore */\nconst setVariableWidthBytes = (values, valueOffsets, index, value) => {\n if (index + 1 < valueOffsets.length) {\n const { [index]: x, [index + 1]: y } = valueOffsets;\n values.set(value.subarray(0, y - x), x);\n }\n};\n/** @ignore */\nconst setBool = ({ offset, values }, index, val) => {\n const idx = offset + index;\n val ? (values[idx >> 3] |= (1 << (idx % 8))) // true\n : (values[idx >> 3] &= ~(1 << (idx % 8))); // false\n};\n/** @ignore */\nconst setInt = ({ values }, index, value) => { values[index] = value; };\n/** @ignore */\nconst setFloat = ({ values }, index, value) => { values[index] = value; };\n/** @ignore */\nconst setFloat16 = ({ values }, index, value) => { values[index] = (0,_util_math_mjs__WEBPACK_IMPORTED_MODULE_1__.float64ToUint16)(value); };\n/* istanbul ignore next */\n/** @ignore */\nconst setAnyFloat = (data, index, value) => {\n switch (data.type.precision) {\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_2__.Precision.HALF:\n return setFloat16(data, index, value);\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_2__.Precision.SINGLE:\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_2__.Precision.DOUBLE:\n return setFloat(data, index, value);\n }\n};\n/** @ignore */\nconst setDateDay = ({ values }, index, value) => { setEpochMsToDays(values, index, value.valueOf()); };\n/** @ignore */\nconst setDateMillisecond = ({ values }, index, value) => { setEpochMsToMillisecondsLong(values, index * 2, value.valueOf()); };\n/** @ignore */\nconst setFixedSizeBinary = ({ stride, values }, index, value) => { values.set(value.subarray(0, stride), stride * index); };\n/** @ignore */\nconst setBinary = ({ values, valueOffsets }, index, value) => setVariableWidthBytes(values, valueOffsets, index, value);\n/** @ignore */\nconst setUtf8 = ({ values, valueOffsets }, index, value) => {\n setVariableWidthBytes(values, valueOffsets, index, (0,_util_utf8_mjs__WEBPACK_IMPORTED_MODULE_3__.encodeUtf8)(value));\n};\n/* istanbul ignore next */\nconst setDate = (data, index, value) => {\n data.type.unit === _enum_mjs__WEBPACK_IMPORTED_MODULE_2__.DateUnit.DAY\n ? setDateDay(data, index, value)\n : setDateMillisecond(data, index, value);\n};\n/** @ignore */\nconst setTimestampSecond = ({ values }, index, value) => setEpochMsToMillisecondsLong(values, index * 2, value / 1000);\n/** @ignore */\nconst setTimestampMillisecond = ({ values }, index, value) => setEpochMsToMillisecondsLong(values, index * 2, value);\n/** @ignore */\nconst setTimestampMicrosecond = ({ values }, index, value) => setEpochMsToMicrosecondsLong(values, index * 2, value);\n/** @ignore */\nconst setTimestampNanosecond = ({ values }, index, value) => setEpochMsToNanosecondsLong(values, index * 2, value);\n/* istanbul ignore next */\n/** @ignore */\nconst setTimestamp = (data, index, value) => {\n switch (data.type.unit) {\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_2__.TimeUnit.SECOND: return setTimestampSecond(data, index, value);\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_2__.TimeUnit.MILLISECOND: return setTimestampMillisecond(data, index, value);\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_2__.TimeUnit.MICROSECOND: return setTimestampMicrosecond(data, index, value);\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_2__.TimeUnit.NANOSECOND: return setTimestampNanosecond(data, index, value);\n }\n};\n/** @ignore */\nconst setTimeSecond = ({ values }, index, value) => { values[index] = value; };\n/** @ignore */\nconst setTimeMillisecond = ({ values }, index, value) => { values[index] = value; };\n/** @ignore */\nconst setTimeMicrosecond = ({ values }, index, value) => { values[index] = value; };\n/** @ignore */\nconst setTimeNanosecond = ({ values }, index, value) => { values[index] = value; };\n/* istanbul ignore next */\n/** @ignore */\nconst setTime = (data, index, value) => {\n switch (data.type.unit) {\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_2__.TimeUnit.SECOND: return setTimeSecond(data, index, value);\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_2__.TimeUnit.MILLISECOND: return setTimeMillisecond(data, index, value);\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_2__.TimeUnit.MICROSECOND: return setTimeMicrosecond(data, index, value);\n case _enum_mjs__WEBPACK_IMPORTED_MODULE_2__.TimeUnit.NANOSECOND: return setTimeNanosecond(data, index, value);\n }\n};\n/** @ignore */\nconst setDecimal = ({ values, stride }, index, value) => { values.set(value.subarray(0, stride), stride * index); };\n/** @ignore */\nconst setList = (data, index, value) => {\n const values = data.children[0];\n const valueOffsets = data.valueOffsets;\n const set = instance.getVisitFn(values);\n if (Array.isArray(value)) {\n for (let idx = -1, itr = valueOffsets[index], end = valueOffsets[index + 1]; itr < end;) {\n set(values, itr++, value[++idx]);\n }\n }\n else {\n for (let idx = -1, itr = valueOffsets[index], end = valueOffsets[index + 1]; itr < end;) {\n set(values, itr++, value.get(++idx));\n }\n }\n};\n/** @ignore */\nconst setMap = (data, index, value) => {\n const values = data.children[0];\n const { valueOffsets } = data;\n const set = instance.getVisitFn(values);\n let { [index]: idx, [index + 1]: end } = valueOffsets;\n const entries = value instanceof Map ? value.entries() : Object.entries(value);\n for (const val of entries) {\n set(values, idx, val);\n if (++idx >= end)\n break;\n }\n};\n/** @ignore */ const _setStructArrayValue = (o, v) => (set, c, _, i) => c && set(c, o, v[i]);\n/** @ignore */ const _setStructVectorValue = (o, v) => (set, c, _, i) => c && set(c, o, v.get(i));\n/** @ignore */ const _setStructMapValue = (o, v) => (set, c, f, _) => c && set(c, o, v.get(f.name));\n/** @ignore */ const _setStructObjectValue = (o, v) => (set, c, f, _) => c && set(c, o, v[f.name]);\n/** @ignore */\nconst setStruct = (data, index, value) => {\n const childSetters = data.type.children.map((f) => instance.getVisitFn(f.type));\n const set = value instanceof Map ? _setStructMapValue(index, value) :\n value instanceof _vector_mjs__WEBPACK_IMPORTED_MODULE_4__.Vector ? _setStructVectorValue(index, value) :\n Array.isArray(value) ? _setStructArrayValue(index, value) :\n _setStructObjectValue(index, value);\n // eslint-disable-next-line unicorn/no-array-for-each\n data.type.children.forEach((f, i) => set(childSetters[i], data.children[i], f, i));\n};\n/* istanbul ignore next */\n/** @ignore */\nconst setUnion = (data, index, value) => {\n data.type.mode === _enum_mjs__WEBPACK_IMPORTED_MODULE_2__.UnionMode.Dense ?\n setDenseUnion(data, index, value) :\n setSparseUnion(data, index, value);\n};\n/** @ignore */\nconst setDenseUnion = (data, index, value) => {\n const childIndex = data.type.typeIdToChildIndex[data.typeIds[index]];\n const child = data.children[childIndex];\n instance.visit(child, data.valueOffsets[index], value);\n};\n/** @ignore */\nconst setSparseUnion = (data, index, value) => {\n const childIndex = data.type.typeIdToChildIndex[data.typeIds[index]];\n const child = data.children[childIndex];\n instance.visit(child, index, value);\n};\n/** @ignore */\nconst setDictionary = (data, index, value) => {\n var _a;\n (_a = data.dictionary) === null || _a === void 0 ? void 0 : _a.set(data.values[index], value);\n};\n/* istanbul ignore next */\n/** @ignore */\nconst setIntervalValue = (data, index, value) => {\n (data.type.unit === _enum_mjs__WEBPACK_IMPORTED_MODULE_2__.IntervalUnit.DAY_TIME)\n ? setIntervalDayTime(data, index, value)\n : setIntervalYearMonth(data, index, value);\n};\n/** @ignore */\nconst setIntervalDayTime = ({ values }, index, value) => { values.set(value.subarray(0, 2), 2 * index); };\n/** @ignore */\nconst setIntervalYearMonth = ({ values }, index, value) => { values[index] = (value[0] * 12) + (value[1] % 12); };\n/** @ignore */\nconst setFixedSizeList = (data, index, value) => {\n const { stride } = data;\n const child = data.children[0];\n const set = instance.getVisitFn(child);\n if (Array.isArray(value)) {\n for (let idx = -1, offset = index * stride; ++idx < stride;) {\n set(child, offset + idx, value[idx]);\n }\n }\n else {\n for (let idx = -1, offset = index * stride; ++idx < stride;) {\n set(child, offset + idx, value.get(idx));\n }\n }\n};\nSetVisitor.prototype.visitBool = wrapSet(setBool);\nSetVisitor.prototype.visitInt = wrapSet(setInt);\nSetVisitor.prototype.visitInt8 = wrapSet(setInt);\nSetVisitor.prototype.visitInt16 = wrapSet(setInt);\nSetVisitor.prototype.visitInt32 = wrapSet(setInt);\nSetVisitor.prototype.visitInt64 = wrapSet(setInt);\nSetVisitor.prototype.visitUint8 = wrapSet(setInt);\nSetVisitor.prototype.visitUint16 = wrapSet(setInt);\nSetVisitor.prototype.visitUint32 = wrapSet(setInt);\nSetVisitor.prototype.visitUint64 = wrapSet(setInt);\nSetVisitor.prototype.visitFloat = wrapSet(setAnyFloat);\nSetVisitor.prototype.visitFloat16 = wrapSet(setFloat16);\nSetVisitor.prototype.visitFloat32 = wrapSet(setFloat);\nSetVisitor.prototype.visitFloat64 = wrapSet(setFloat);\nSetVisitor.prototype.visitUtf8 = wrapSet(setUtf8);\nSetVisitor.prototype.visitBinary = wrapSet(setBinary);\nSetVisitor.prototype.visitFixedSizeBinary = wrapSet(setFixedSizeBinary);\nSetVisitor.prototype.visitDate = wrapSet(setDate);\nSetVisitor.prototype.visitDateDay = wrapSet(setDateDay);\nSetVisitor.prototype.visitDateMillisecond = wrapSet(setDateMillisecond);\nSetVisitor.prototype.visitTimestamp = wrapSet(setTimestamp);\nSetVisitor.prototype.visitTimestampSecond = wrapSet(setTimestampSecond);\nSetVisitor.prototype.visitTimestampMillisecond = wrapSet(setTimestampMillisecond);\nSetVisitor.prototype.visitTimestampMicrosecond = wrapSet(setTimestampMicrosecond);\nSetVisitor.prototype.visitTimestampNanosecond = wrapSet(setTimestampNanosecond);\nSetVisitor.prototype.visitTime = wrapSet(setTime);\nSetVisitor.prototype.visitTimeSecond = wrapSet(setTimeSecond);\nSetVisitor.prototype.visitTimeMillisecond = wrapSet(setTimeMillisecond);\nSetVisitor.prototype.visitTimeMicrosecond = wrapSet(setTimeMicrosecond);\nSetVisitor.prototype.visitTimeNanosecond = wrapSet(setTimeNanosecond);\nSetVisitor.prototype.visitDecimal = wrapSet(setDecimal);\nSetVisitor.prototype.visitList = wrapSet(setList);\nSetVisitor.prototype.visitStruct = wrapSet(setStruct);\nSetVisitor.prototype.visitUnion = wrapSet(setUnion);\nSetVisitor.prototype.visitDenseUnion = wrapSet(setDenseUnion);\nSetVisitor.prototype.visitSparseUnion = wrapSet(setSparseUnion);\nSetVisitor.prototype.visitDictionary = wrapSet(setDictionary);\nSetVisitor.prototype.visitInterval = wrapSet(setIntervalValue);\nSetVisitor.prototype.visitIntervalDayTime = wrapSet(setIntervalDayTime);\nSetVisitor.prototype.visitIntervalYearMonth = wrapSet(setIntervalYearMonth);\nSetVisitor.prototype.visitFixedSizeList = wrapSet(setFixedSizeList);\nSetVisitor.prototype.visitMap = wrapSet(setMap);\n/** @ignore */\nconst instance = new SetVisitor();\n\n//# sourceMappingURL=set.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/visitor/set.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/visitor/typeassembler.mjs": +/*!*************************************************************!*\ + !*** ./node_modules/apache-arrow/visitor/typeassembler.mjs ***! + \*************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ TypeAssembler: () => (/* binding */ TypeAssembler),\n/* harmony export */ instance: () => (/* binding */ instance)\n/* harmony export */ });\n/* harmony import */ var flatbuffers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flatbuffers */ \"./node_modules/flatbuffers/mjs/flatbuffers.js\");\n/* harmony import */ var _visitor_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../visitor.mjs */ \"./node_modules/apache-arrow/visitor.mjs\");\n/* harmony import */ var _fb_null_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../fb/null.mjs */ \"./node_modules/apache-arrow/fb/null.mjs\");\n/* harmony import */ var _fb_int_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../fb/int.mjs */ \"./node_modules/apache-arrow/fb/int.mjs\");\n/* harmony import */ var _fb_floating_point_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../fb/floating-point.mjs */ \"./node_modules/apache-arrow/fb/floating-point.mjs\");\n/* harmony import */ var _fb_binary_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../fb/binary.mjs */ \"./node_modules/apache-arrow/fb/binary.mjs\");\n/* harmony import */ var _fb_bool_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../fb/bool.mjs */ \"./node_modules/apache-arrow/fb/bool.mjs\");\n/* harmony import */ var _fb_utf8_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../fb/utf8.mjs */ \"./node_modules/apache-arrow/fb/utf8.mjs\");\n/* harmony import */ var _fb_decimal_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../fb/decimal.mjs */ \"./node_modules/apache-arrow/fb/decimal.mjs\");\n/* harmony import */ var _fb_date_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../fb/date.mjs */ \"./node_modules/apache-arrow/fb/date.mjs\");\n/* harmony import */ var _fb_time_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../fb/time.mjs */ \"./node_modules/apache-arrow/fb/time.mjs\");\n/* harmony import */ var _fb_timestamp_mjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../fb/timestamp.mjs */ \"./node_modules/apache-arrow/fb/timestamp.mjs\");\n/* harmony import */ var _fb_interval_mjs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../fb/interval.mjs */ \"./node_modules/apache-arrow/fb/interval.mjs\");\n/* harmony import */ var _fb_list_mjs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../fb/list.mjs */ \"./node_modules/apache-arrow/fb/list.mjs\");\n/* harmony import */ var _fb_struct_mjs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../fb/struct_.mjs */ \"./node_modules/apache-arrow/fb/struct_.mjs\");\n/* harmony import */ var _fb_union_mjs__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../fb/union.mjs */ \"./node_modules/apache-arrow/fb/union.mjs\");\n/* harmony import */ var _fb_dictionary_encoding_mjs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../fb/dictionary-encoding.mjs */ \"./node_modules/apache-arrow/fb/dictionary-encoding.mjs\");\n/* harmony import */ var _fb_fixed_size_binary_mjs__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../fb/fixed-size-binary.mjs */ \"./node_modules/apache-arrow/fb/fixed-size-binary.mjs\");\n/* harmony import */ var _fb_fixed_size_list_mjs__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../fb/fixed-size-list.mjs */ \"./node_modules/apache-arrow/fb/fixed-size-list.mjs\");\n/* harmony import */ var _fb_map_mjs__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../fb/map.mjs */ \"./node_modules/apache-arrow/fb/map.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nvar Long = flatbuffers__WEBPACK_IMPORTED_MODULE_0__.Long;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/** @ignore */\nclass TypeAssembler extends _visitor_mjs__WEBPACK_IMPORTED_MODULE_1__.Visitor {\n visit(node, builder) {\n return (node == null || builder == null) ? undefined : super.visit(node, builder);\n }\n visitNull(_node, b) {\n _fb_null_mjs__WEBPACK_IMPORTED_MODULE_2__.Null.startNull(b);\n return _fb_null_mjs__WEBPACK_IMPORTED_MODULE_2__.Null.endNull(b);\n }\n visitInt(node, b) {\n _fb_int_mjs__WEBPACK_IMPORTED_MODULE_3__.Int.startInt(b);\n _fb_int_mjs__WEBPACK_IMPORTED_MODULE_3__.Int.addBitWidth(b, node.bitWidth);\n _fb_int_mjs__WEBPACK_IMPORTED_MODULE_3__.Int.addIsSigned(b, node.isSigned);\n return _fb_int_mjs__WEBPACK_IMPORTED_MODULE_3__.Int.endInt(b);\n }\n visitFloat(node, b) {\n _fb_floating_point_mjs__WEBPACK_IMPORTED_MODULE_4__.FloatingPoint.startFloatingPoint(b);\n _fb_floating_point_mjs__WEBPACK_IMPORTED_MODULE_4__.FloatingPoint.addPrecision(b, node.precision);\n return _fb_floating_point_mjs__WEBPACK_IMPORTED_MODULE_4__.FloatingPoint.endFloatingPoint(b);\n }\n visitBinary(_node, b) {\n _fb_binary_mjs__WEBPACK_IMPORTED_MODULE_5__.Binary.startBinary(b);\n return _fb_binary_mjs__WEBPACK_IMPORTED_MODULE_5__.Binary.endBinary(b);\n }\n visitBool(_node, b) {\n _fb_bool_mjs__WEBPACK_IMPORTED_MODULE_6__.Bool.startBool(b);\n return _fb_bool_mjs__WEBPACK_IMPORTED_MODULE_6__.Bool.endBool(b);\n }\n visitUtf8(_node, b) {\n _fb_utf8_mjs__WEBPACK_IMPORTED_MODULE_7__.Utf8.startUtf8(b);\n return _fb_utf8_mjs__WEBPACK_IMPORTED_MODULE_7__.Utf8.endUtf8(b);\n }\n visitDecimal(node, b) {\n _fb_decimal_mjs__WEBPACK_IMPORTED_MODULE_8__.Decimal.startDecimal(b);\n _fb_decimal_mjs__WEBPACK_IMPORTED_MODULE_8__.Decimal.addScale(b, node.scale);\n _fb_decimal_mjs__WEBPACK_IMPORTED_MODULE_8__.Decimal.addPrecision(b, node.precision);\n _fb_decimal_mjs__WEBPACK_IMPORTED_MODULE_8__.Decimal.addBitWidth(b, node.bitWidth);\n return _fb_decimal_mjs__WEBPACK_IMPORTED_MODULE_8__.Decimal.endDecimal(b);\n }\n visitDate(node, b) {\n _fb_date_mjs__WEBPACK_IMPORTED_MODULE_9__.Date.startDate(b);\n _fb_date_mjs__WEBPACK_IMPORTED_MODULE_9__.Date.addUnit(b, node.unit);\n return _fb_date_mjs__WEBPACK_IMPORTED_MODULE_9__.Date.endDate(b);\n }\n visitTime(node, b) {\n _fb_time_mjs__WEBPACK_IMPORTED_MODULE_10__.Time.startTime(b);\n _fb_time_mjs__WEBPACK_IMPORTED_MODULE_10__.Time.addUnit(b, node.unit);\n _fb_time_mjs__WEBPACK_IMPORTED_MODULE_10__.Time.addBitWidth(b, node.bitWidth);\n return _fb_time_mjs__WEBPACK_IMPORTED_MODULE_10__.Time.endTime(b);\n }\n visitTimestamp(node, b) {\n const timezone = (node.timezone && b.createString(node.timezone)) || undefined;\n _fb_timestamp_mjs__WEBPACK_IMPORTED_MODULE_11__.Timestamp.startTimestamp(b);\n _fb_timestamp_mjs__WEBPACK_IMPORTED_MODULE_11__.Timestamp.addUnit(b, node.unit);\n if (timezone !== undefined) {\n _fb_timestamp_mjs__WEBPACK_IMPORTED_MODULE_11__.Timestamp.addTimezone(b, timezone);\n }\n return _fb_timestamp_mjs__WEBPACK_IMPORTED_MODULE_11__.Timestamp.endTimestamp(b);\n }\n visitInterval(node, b) {\n _fb_interval_mjs__WEBPACK_IMPORTED_MODULE_12__.Interval.startInterval(b);\n _fb_interval_mjs__WEBPACK_IMPORTED_MODULE_12__.Interval.addUnit(b, node.unit);\n return _fb_interval_mjs__WEBPACK_IMPORTED_MODULE_12__.Interval.endInterval(b);\n }\n visitList(_node, b) {\n _fb_list_mjs__WEBPACK_IMPORTED_MODULE_13__.List.startList(b);\n return _fb_list_mjs__WEBPACK_IMPORTED_MODULE_13__.List.endList(b);\n }\n visitStruct(_node, b) {\n _fb_struct_mjs__WEBPACK_IMPORTED_MODULE_14__.Struct_.startStruct_(b);\n return _fb_struct_mjs__WEBPACK_IMPORTED_MODULE_14__.Struct_.endStruct_(b);\n }\n visitUnion(node, b) {\n _fb_union_mjs__WEBPACK_IMPORTED_MODULE_15__.Union.startTypeIdsVector(b, node.typeIds.length);\n const typeIds = _fb_union_mjs__WEBPACK_IMPORTED_MODULE_15__.Union.createTypeIdsVector(b, node.typeIds);\n _fb_union_mjs__WEBPACK_IMPORTED_MODULE_15__.Union.startUnion(b);\n _fb_union_mjs__WEBPACK_IMPORTED_MODULE_15__.Union.addMode(b, node.mode);\n _fb_union_mjs__WEBPACK_IMPORTED_MODULE_15__.Union.addTypeIds(b, typeIds);\n return _fb_union_mjs__WEBPACK_IMPORTED_MODULE_15__.Union.endUnion(b);\n }\n visitDictionary(node, b) {\n const indexType = this.visit(node.indices, b);\n _fb_dictionary_encoding_mjs__WEBPACK_IMPORTED_MODULE_16__.DictionaryEncoding.startDictionaryEncoding(b);\n _fb_dictionary_encoding_mjs__WEBPACK_IMPORTED_MODULE_16__.DictionaryEncoding.addId(b, new Long(node.id, 0));\n _fb_dictionary_encoding_mjs__WEBPACK_IMPORTED_MODULE_16__.DictionaryEncoding.addIsOrdered(b, node.isOrdered);\n if (indexType !== undefined) {\n _fb_dictionary_encoding_mjs__WEBPACK_IMPORTED_MODULE_16__.DictionaryEncoding.addIndexType(b, indexType);\n }\n return _fb_dictionary_encoding_mjs__WEBPACK_IMPORTED_MODULE_16__.DictionaryEncoding.endDictionaryEncoding(b);\n }\n visitFixedSizeBinary(node, b) {\n _fb_fixed_size_binary_mjs__WEBPACK_IMPORTED_MODULE_17__.FixedSizeBinary.startFixedSizeBinary(b);\n _fb_fixed_size_binary_mjs__WEBPACK_IMPORTED_MODULE_17__.FixedSizeBinary.addByteWidth(b, node.byteWidth);\n return _fb_fixed_size_binary_mjs__WEBPACK_IMPORTED_MODULE_17__.FixedSizeBinary.endFixedSizeBinary(b);\n }\n visitFixedSizeList(node, b) {\n _fb_fixed_size_list_mjs__WEBPACK_IMPORTED_MODULE_18__.FixedSizeList.startFixedSizeList(b);\n _fb_fixed_size_list_mjs__WEBPACK_IMPORTED_MODULE_18__.FixedSizeList.addListSize(b, node.listSize);\n return _fb_fixed_size_list_mjs__WEBPACK_IMPORTED_MODULE_18__.FixedSizeList.endFixedSizeList(b);\n }\n visitMap(node, b) {\n _fb_map_mjs__WEBPACK_IMPORTED_MODULE_19__.Map.startMap(b);\n _fb_map_mjs__WEBPACK_IMPORTED_MODULE_19__.Map.addKeysSorted(b, node.keysSorted);\n return _fb_map_mjs__WEBPACK_IMPORTED_MODULE_19__.Map.endMap(b);\n }\n}\n/** @ignore */\nconst instance = new TypeAssembler();\n\n//# sourceMappingURL=typeassembler.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/visitor/typeassembler.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/visitor/typecomparator.mjs": +/*!**************************************************************!*\ + !*** ./node_modules/apache-arrow/visitor/typecomparator.mjs ***! + \**************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ TypeComparator: () => (/* binding */ TypeComparator),\n/* harmony export */ compareFields: () => (/* binding */ compareFields),\n/* harmony export */ compareSchemas: () => (/* binding */ compareSchemas),\n/* harmony export */ compareTypes: () => (/* binding */ compareTypes),\n/* harmony export */ instance: () => (/* binding */ instance)\n/* harmony export */ });\n/* harmony import */ var _visitor_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../visitor.mjs */ \"./node_modules/apache-arrow/visitor.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n/** @ignore */\nclass TypeComparator extends _visitor_mjs__WEBPACK_IMPORTED_MODULE_0__.Visitor {\n compareSchemas(schema, other) {\n return (schema === other) || (other instanceof schema.constructor &&\n this.compareManyFields(schema.fields, other.fields));\n }\n compareManyFields(fields, others) {\n return (fields === others) || (Array.isArray(fields) &&\n Array.isArray(others) &&\n fields.length === others.length &&\n fields.every((f, i) => this.compareFields(f, others[i])));\n }\n compareFields(field, other) {\n return (field === other) || (other instanceof field.constructor &&\n field.name === other.name &&\n field.nullable === other.nullable &&\n this.visit(field.type, other.type));\n }\n}\nfunction compareConstructor(type, other) {\n return other instanceof type.constructor;\n}\nfunction compareAny(type, other) {\n return (type === other) || compareConstructor(type, other);\n}\nfunction compareInt(type, other) {\n return (type === other) || (compareConstructor(type, other) &&\n type.bitWidth === other.bitWidth &&\n type.isSigned === other.isSigned);\n}\nfunction compareFloat(type, other) {\n return (type === other) || (compareConstructor(type, other) &&\n type.precision === other.precision);\n}\nfunction compareFixedSizeBinary(type, other) {\n return (type === other) || (compareConstructor(type, other) &&\n type.byteWidth === other.byteWidth);\n}\nfunction compareDate(type, other) {\n return (type === other) || (compareConstructor(type, other) &&\n type.unit === other.unit);\n}\nfunction compareTimestamp(type, other) {\n return (type === other) || (compareConstructor(type, other) &&\n type.unit === other.unit &&\n type.timezone === other.timezone);\n}\nfunction compareTime(type, other) {\n return (type === other) || (compareConstructor(type, other) &&\n type.unit === other.unit &&\n type.bitWidth === other.bitWidth);\n}\nfunction compareList(type, other) {\n return (type === other) || (compareConstructor(type, other) &&\n type.children.length === other.children.length &&\n instance.compareManyFields(type.children, other.children));\n}\nfunction compareStruct(type, other) {\n return (type === other) || (compareConstructor(type, other) &&\n type.children.length === other.children.length &&\n instance.compareManyFields(type.children, other.children));\n}\nfunction compareUnion(type, other) {\n return (type === other) || (compareConstructor(type, other) &&\n type.mode === other.mode &&\n type.typeIds.every((x, i) => x === other.typeIds[i]) &&\n instance.compareManyFields(type.children, other.children));\n}\nfunction compareDictionary(type, other) {\n return (type === other) || (compareConstructor(type, other) &&\n type.id === other.id &&\n type.isOrdered === other.isOrdered &&\n instance.visit(type.indices, other.indices) &&\n instance.visit(type.dictionary, other.dictionary));\n}\nfunction compareInterval(type, other) {\n return (type === other) || (compareConstructor(type, other) &&\n type.unit === other.unit);\n}\nfunction compareFixedSizeList(type, other) {\n return (type === other) || (compareConstructor(type, other) &&\n type.listSize === other.listSize &&\n type.children.length === other.children.length &&\n instance.compareManyFields(type.children, other.children));\n}\nfunction compareMap(type, other) {\n return (type === other) || (compareConstructor(type, other) &&\n type.keysSorted === other.keysSorted &&\n type.children.length === other.children.length &&\n instance.compareManyFields(type.children, other.children));\n}\nTypeComparator.prototype.visitNull = compareAny;\nTypeComparator.prototype.visitBool = compareAny;\nTypeComparator.prototype.visitInt = compareInt;\nTypeComparator.prototype.visitInt8 = compareInt;\nTypeComparator.prototype.visitInt16 = compareInt;\nTypeComparator.prototype.visitInt32 = compareInt;\nTypeComparator.prototype.visitInt64 = compareInt;\nTypeComparator.prototype.visitUint8 = compareInt;\nTypeComparator.prototype.visitUint16 = compareInt;\nTypeComparator.prototype.visitUint32 = compareInt;\nTypeComparator.prototype.visitUint64 = compareInt;\nTypeComparator.prototype.visitFloat = compareFloat;\nTypeComparator.prototype.visitFloat16 = compareFloat;\nTypeComparator.prototype.visitFloat32 = compareFloat;\nTypeComparator.prototype.visitFloat64 = compareFloat;\nTypeComparator.prototype.visitUtf8 = compareAny;\nTypeComparator.prototype.visitBinary = compareAny;\nTypeComparator.prototype.visitFixedSizeBinary = compareFixedSizeBinary;\nTypeComparator.prototype.visitDate = compareDate;\nTypeComparator.prototype.visitDateDay = compareDate;\nTypeComparator.prototype.visitDateMillisecond = compareDate;\nTypeComparator.prototype.visitTimestamp = compareTimestamp;\nTypeComparator.prototype.visitTimestampSecond = compareTimestamp;\nTypeComparator.prototype.visitTimestampMillisecond = compareTimestamp;\nTypeComparator.prototype.visitTimestampMicrosecond = compareTimestamp;\nTypeComparator.prototype.visitTimestampNanosecond = compareTimestamp;\nTypeComparator.prototype.visitTime = compareTime;\nTypeComparator.prototype.visitTimeSecond = compareTime;\nTypeComparator.prototype.visitTimeMillisecond = compareTime;\nTypeComparator.prototype.visitTimeMicrosecond = compareTime;\nTypeComparator.prototype.visitTimeNanosecond = compareTime;\nTypeComparator.prototype.visitDecimal = compareAny;\nTypeComparator.prototype.visitList = compareList;\nTypeComparator.prototype.visitStruct = compareStruct;\nTypeComparator.prototype.visitUnion = compareUnion;\nTypeComparator.prototype.visitDenseUnion = compareUnion;\nTypeComparator.prototype.visitSparseUnion = compareUnion;\nTypeComparator.prototype.visitDictionary = compareDictionary;\nTypeComparator.prototype.visitInterval = compareInterval;\nTypeComparator.prototype.visitIntervalDayTime = compareInterval;\nTypeComparator.prototype.visitIntervalYearMonth = compareInterval;\nTypeComparator.prototype.visitFixedSizeList = compareFixedSizeList;\nTypeComparator.prototype.visitMap = compareMap;\n/** @ignore */\nconst instance = new TypeComparator();\nfunction compareSchemas(schema, other) {\n return instance.compareSchemas(schema, other);\n}\nfunction compareFields(field, other) {\n return instance.compareFields(field, other);\n}\nfunction compareTypes(type, other) {\n return instance.visit(type, other);\n}\n\n//# sourceMappingURL=typecomparator.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/visitor/typecomparator.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/visitor/vectorassembler.mjs": +/*!***************************************************************!*\ + !*** ./node_modules/apache-arrow/visitor/vectorassembler.mjs ***! + \***************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ VectorAssembler: () => (/* binding */ VectorAssembler)\n/* harmony export */ });\n/* harmony import */ var _vector_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../vector.mjs */ \"./node_modules/apache-arrow/vector.mjs\");\n/* harmony import */ var _visitor_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../visitor.mjs */ \"./node_modules/apache-arrow/visitor.mjs\");\n/* harmony import */ var _enum_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../enum.mjs */ \"./node_modules/apache-arrow/enum.mjs\");\n/* harmony import */ var _recordbatch_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../recordbatch.mjs */ \"./node_modules/apache-arrow/recordbatch.mjs\");\n/* harmony import */ var _util_buffer_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../util/buffer.mjs */ \"./node_modules/apache-arrow/util/buffer.mjs\");\n/* harmony import */ var _util_bit_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/bit.mjs */ \"./node_modules/apache-arrow/util/bit.mjs\");\n/* harmony import */ var _ipc_metadata_message_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../ipc/metadata/message.mjs */ \"./node_modules/apache-arrow/ipc/metadata/message.mjs\");\n/* harmony import */ var _type_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../type.mjs */ \"./node_modules/apache-arrow/type.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n\n\n\n\n\n\n/** @ignore */\nclass VectorAssembler extends _visitor_mjs__WEBPACK_IMPORTED_MODULE_0__.Visitor {\n constructor() {\n super();\n this._byteLength = 0;\n this._nodes = [];\n this._buffers = [];\n this._bufferRegions = [];\n }\n /** @nocollapse */\n static assemble(...args) {\n const unwrap = (nodes) => nodes.flatMap((node) => Array.isArray(node) ? unwrap(node) :\n (node instanceof _recordbatch_mjs__WEBPACK_IMPORTED_MODULE_1__.RecordBatch) ? node.data.children : node.data);\n const assembler = new VectorAssembler();\n assembler.visitMany(unwrap(args));\n return assembler;\n }\n visit(data) {\n if (data instanceof _vector_mjs__WEBPACK_IMPORTED_MODULE_2__.Vector) {\n this.visitMany(data.data);\n return this;\n }\n const { type } = data;\n if (!_type_mjs__WEBPACK_IMPORTED_MODULE_3__.DataType.isDictionary(type)) {\n const { length, nullCount } = data;\n if (length > 2147483647) {\n /* istanbul ignore next */\n throw new RangeError('Cannot write arrays larger than 2^31 - 1 in length');\n }\n if (!_type_mjs__WEBPACK_IMPORTED_MODULE_3__.DataType.isNull(type)) {\n addBuffer.call(this, nullCount <= 0\n ? new Uint8Array(0) // placeholder validity buffer\n : (0,_util_bit_mjs__WEBPACK_IMPORTED_MODULE_4__.truncateBitmap)(data.offset, length, data.nullBitmap));\n }\n this.nodes.push(new _ipc_metadata_message_mjs__WEBPACK_IMPORTED_MODULE_5__.FieldNode(length, nullCount));\n }\n return super.visit(data);\n }\n visitNull(_null) {\n return this;\n }\n visitDictionary(data) {\n // Assemble the indices here, Dictionary assembled separately.\n return this.visit(data.clone(data.type.indices));\n }\n get nodes() { return this._nodes; }\n get buffers() { return this._buffers; }\n get byteLength() { return this._byteLength; }\n get bufferRegions() { return this._bufferRegions; }\n}\n/** @ignore */\nfunction addBuffer(values) {\n const byteLength = (values.byteLength + 7) & ~7; // Round up to a multiple of 8\n this.buffers.push(values);\n this.bufferRegions.push(new _ipc_metadata_message_mjs__WEBPACK_IMPORTED_MODULE_5__.BufferRegion(this._byteLength, byteLength));\n this._byteLength += byteLength;\n return this;\n}\n/** @ignore */\nfunction assembleUnion(data) {\n const { type, length, typeIds, valueOffsets } = data;\n // All Union Vectors have a typeIds buffer\n addBuffer.call(this, typeIds);\n // If this is a Sparse Union, treat it like all other Nested types\n if (type.mode === _enum_mjs__WEBPACK_IMPORTED_MODULE_6__.UnionMode.Sparse) {\n return assembleNestedVector.call(this, data);\n }\n else if (type.mode === _enum_mjs__WEBPACK_IMPORTED_MODULE_6__.UnionMode.Dense) {\n // If this is a Dense Union, add the valueOffsets buffer and potentially slice the children\n if (data.offset <= 0) {\n // If the Vector hasn't been sliced, write the existing valueOffsets\n addBuffer.call(this, valueOffsets);\n // We can treat this like all other Nested types\n return assembleNestedVector.call(this, data);\n }\n else {\n // A sliced Dense Union is an unpleasant case. Because the offsets are different for\n // each child vector, we need to \"rebase\" the valueOffsets for each child\n // Union typeIds are not necessary 0-indexed\n const maxChildTypeId = typeIds.reduce((x, y) => Math.max(x, y), typeIds[0]);\n const childLengths = new Int32Array(maxChildTypeId + 1);\n // Set all to -1 to indicate that we haven't observed a first occurrence of a particular child yet\n const childOffsets = new Int32Array(maxChildTypeId + 1).fill(-1);\n const shiftedOffsets = new Int32Array(length);\n // If we have a non-zero offset, then the value offsets do not start at\n // zero. We must a) create a new offsets array with shifted offsets and\n // b) slice the values array accordingly\n const unshiftedOffsets = (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_7__.rebaseValueOffsets)(-valueOffsets[0], length, valueOffsets);\n for (let typeId, shift, index = -1; ++index < length;) {\n if ((shift = childOffsets[typeId = typeIds[index]]) === -1) {\n shift = childOffsets[typeId] = unshiftedOffsets[typeId];\n }\n shiftedOffsets[index] = unshiftedOffsets[index] - shift;\n ++childLengths[typeId];\n }\n addBuffer.call(this, shiftedOffsets);\n // Slice and visit children accordingly\n for (let child, childIndex = -1, numChildren = type.children.length; ++childIndex < numChildren;) {\n if (child = data.children[childIndex]) {\n const typeId = type.typeIds[childIndex];\n const childLength = Math.min(length, childLengths[typeId]);\n this.visit(child.slice(childOffsets[typeId], childLength));\n }\n }\n }\n }\n return this;\n}\n/** @ignore */\nfunction assembleBoolVector(data) {\n // Bool vector is a special case of FlatVector, as its data buffer needs to stay packed\n let values;\n if (data.nullCount >= data.length) {\n // If all values are null, just insert a placeholder empty data buffer (fastest path)\n return addBuffer.call(this, new Uint8Array(0));\n }\n else if ((values = data.values) instanceof Uint8Array) {\n // If values is already a Uint8Array, slice the bitmap (fast path)\n return addBuffer.call(this, (0,_util_bit_mjs__WEBPACK_IMPORTED_MODULE_4__.truncateBitmap)(data.offset, data.length, values));\n }\n // Otherwise if the underlying data *isn't* a Uint8Array, enumerate the\n // values as bools and re-pack them into a Uint8Array. This code isn't\n // reachable unless you're trying to manipulate the Data internals,\n // we're only doing this for safety.\n /* istanbul ignore next */\n return addBuffer.call(this, (0,_util_bit_mjs__WEBPACK_IMPORTED_MODULE_4__.packBools)(data.values));\n}\n/** @ignore */\nfunction assembleFlatVector(data) {\n return addBuffer.call(this, data.values.subarray(0, data.length * data.stride));\n}\n/** @ignore */\nfunction assembleFlatListVector(data) {\n const { length, values, valueOffsets } = data;\n const firstOffset = valueOffsets[0];\n const lastOffset = valueOffsets[length];\n const byteLength = Math.min(lastOffset - firstOffset, values.byteLength - firstOffset);\n // Push in the order FlatList types read their buffers\n addBuffer.call(this, (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_7__.rebaseValueOffsets)(-valueOffsets[0], length, valueOffsets)); // valueOffsets buffer first\n addBuffer.call(this, values.subarray(firstOffset, firstOffset + byteLength)); // sliced values buffer second\n return this;\n}\n/** @ignore */\nfunction assembleListVector(data) {\n const { length, valueOffsets } = data;\n // If we have valueOffsets (MapVector, ListVector), push that buffer first\n if (valueOffsets) {\n addBuffer.call(this, (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_7__.rebaseValueOffsets)(valueOffsets[0], length, valueOffsets));\n }\n // Then insert the List's values child\n return this.visit(data.children[0]);\n}\n/** @ignore */\nfunction assembleNestedVector(data) {\n return this.visitMany(data.type.children.map((_, i) => data.children[i]).filter(Boolean))[0];\n}\nVectorAssembler.prototype.visitBool = assembleBoolVector;\nVectorAssembler.prototype.visitInt = assembleFlatVector;\nVectorAssembler.prototype.visitFloat = assembleFlatVector;\nVectorAssembler.prototype.visitUtf8 = assembleFlatListVector;\nVectorAssembler.prototype.visitBinary = assembleFlatListVector;\nVectorAssembler.prototype.visitFixedSizeBinary = assembleFlatVector;\nVectorAssembler.prototype.visitDate = assembleFlatVector;\nVectorAssembler.prototype.visitTimestamp = assembleFlatVector;\nVectorAssembler.prototype.visitTime = assembleFlatVector;\nVectorAssembler.prototype.visitDecimal = assembleFlatVector;\nVectorAssembler.prototype.visitList = assembleListVector;\nVectorAssembler.prototype.visitStruct = assembleNestedVector;\nVectorAssembler.prototype.visitUnion = assembleUnion;\nVectorAssembler.prototype.visitInterval = assembleFlatVector;\nVectorAssembler.prototype.visitFixedSizeList = assembleListVector;\nVectorAssembler.prototype.visitMap = assembleListVector;\n\n//# sourceMappingURL=vectorassembler.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/visitor/vectorassembler.mjs?"); + +/***/ }), + +/***/ "./node_modules/apache-arrow/visitor/vectorloader.mjs": +/*!************************************************************!*\ + !*** ./node_modules/apache-arrow/visitor/vectorloader.mjs ***! + \************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ JSONVectorLoader: () => (/* binding */ JSONVectorLoader),\n/* harmony export */ VectorLoader: () => (/* binding */ VectorLoader)\n/* harmony export */ });\n/* harmony import */ var _data_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../data.mjs */ \"./node_modules/apache-arrow/data.mjs\");\n/* harmony import */ var _schema_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../schema.mjs */ \"./node_modules/apache-arrow/schema.mjs\");\n/* harmony import */ var _type_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../type.mjs */ \"./node_modules/apache-arrow/type.mjs\");\n/* harmony import */ var _visitor_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../visitor.mjs */ \"./node_modules/apache-arrow/visitor.mjs\");\n/* harmony import */ var _util_bit_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/bit.mjs */ \"./node_modules/apache-arrow/util/bit.mjs\");\n/* harmony import */ var _util_utf8_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../util/utf8.mjs */ \"./node_modules/apache-arrow/util/utf8.mjs\");\n/* harmony import */ var _util_int_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../util/int.mjs */ \"./node_modules/apache-arrow/util/int.mjs\");\n/* harmony import */ var _enum_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../enum.mjs */ \"./node_modules/apache-arrow/enum.mjs\");\n/* harmony import */ var _util_buffer_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/buffer.mjs */ \"./node_modules/apache-arrow/util/buffer.mjs\");\n// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n\n\n\n\n\n\n\n\n/** @ignore */\nclass VectorLoader extends _visitor_mjs__WEBPACK_IMPORTED_MODULE_0__.Visitor {\n constructor(bytes, nodes, buffers, dictionaries) {\n super();\n this.nodesIndex = -1;\n this.buffersIndex = -1;\n this.bytes = bytes;\n this.nodes = nodes;\n this.buffers = buffers;\n this.dictionaries = dictionaries;\n }\n visit(node) {\n return super.visit(node instanceof _schema_mjs__WEBPACK_IMPORTED_MODULE_1__.Field ? node.type : node);\n }\n visitNull(type, { length } = this.nextFieldNode()) {\n return (0,_data_mjs__WEBPACK_IMPORTED_MODULE_2__.makeData)({ type, length });\n }\n visitBool(type, { length, nullCount } = this.nextFieldNode()) {\n return (0,_data_mjs__WEBPACK_IMPORTED_MODULE_2__.makeData)({ type, length, nullCount, nullBitmap: this.readNullBitmap(type, nullCount), data: this.readData(type) });\n }\n visitInt(type, { length, nullCount } = this.nextFieldNode()) {\n return (0,_data_mjs__WEBPACK_IMPORTED_MODULE_2__.makeData)({ type, length, nullCount, nullBitmap: this.readNullBitmap(type, nullCount), data: this.readData(type) });\n }\n visitFloat(type, { length, nullCount } = this.nextFieldNode()) {\n return (0,_data_mjs__WEBPACK_IMPORTED_MODULE_2__.makeData)({ type, length, nullCount, nullBitmap: this.readNullBitmap(type, nullCount), data: this.readData(type) });\n }\n visitUtf8(type, { length, nullCount } = this.nextFieldNode()) {\n return (0,_data_mjs__WEBPACK_IMPORTED_MODULE_2__.makeData)({ type, length, nullCount, nullBitmap: this.readNullBitmap(type, nullCount), valueOffsets: this.readOffsets(type), data: this.readData(type) });\n }\n visitBinary(type, { length, nullCount } = this.nextFieldNode()) {\n return (0,_data_mjs__WEBPACK_IMPORTED_MODULE_2__.makeData)({ type, length, nullCount, nullBitmap: this.readNullBitmap(type, nullCount), valueOffsets: this.readOffsets(type), data: this.readData(type) });\n }\n visitFixedSizeBinary(type, { length, nullCount } = this.nextFieldNode()) {\n return (0,_data_mjs__WEBPACK_IMPORTED_MODULE_2__.makeData)({ type, length, nullCount, nullBitmap: this.readNullBitmap(type, nullCount), data: this.readData(type) });\n }\n visitDate(type, { length, nullCount } = this.nextFieldNode()) {\n return (0,_data_mjs__WEBPACK_IMPORTED_MODULE_2__.makeData)({ type, length, nullCount, nullBitmap: this.readNullBitmap(type, nullCount), data: this.readData(type) });\n }\n visitTimestamp(type, { length, nullCount } = this.nextFieldNode()) {\n return (0,_data_mjs__WEBPACK_IMPORTED_MODULE_2__.makeData)({ type, length, nullCount, nullBitmap: this.readNullBitmap(type, nullCount), data: this.readData(type) });\n }\n visitTime(type, { length, nullCount } = this.nextFieldNode()) {\n return (0,_data_mjs__WEBPACK_IMPORTED_MODULE_2__.makeData)({ type, length, nullCount, nullBitmap: this.readNullBitmap(type, nullCount), data: this.readData(type) });\n }\n visitDecimal(type, { length, nullCount } = this.nextFieldNode()) {\n return (0,_data_mjs__WEBPACK_IMPORTED_MODULE_2__.makeData)({ type, length, nullCount, nullBitmap: this.readNullBitmap(type, nullCount), data: this.readData(type) });\n }\n visitList(type, { length, nullCount } = this.nextFieldNode()) {\n return (0,_data_mjs__WEBPACK_IMPORTED_MODULE_2__.makeData)({ type, length, nullCount, nullBitmap: this.readNullBitmap(type, nullCount), valueOffsets: this.readOffsets(type), 'child': this.visit(type.children[0]) });\n }\n visitStruct(type, { length, nullCount } = this.nextFieldNode()) {\n return (0,_data_mjs__WEBPACK_IMPORTED_MODULE_2__.makeData)({ type, length, nullCount, nullBitmap: this.readNullBitmap(type, nullCount), children: this.visitMany(type.children) });\n }\n visitUnion(type) {\n return type.mode === _enum_mjs__WEBPACK_IMPORTED_MODULE_3__.UnionMode.Sparse ? this.visitSparseUnion(type) : this.visitDenseUnion(type);\n }\n visitDenseUnion(type, { length, nullCount } = this.nextFieldNode()) {\n return (0,_data_mjs__WEBPACK_IMPORTED_MODULE_2__.makeData)({ type, length, nullCount, nullBitmap: this.readNullBitmap(type, nullCount), typeIds: this.readTypeIds(type), valueOffsets: this.readOffsets(type), children: this.visitMany(type.children) });\n }\n visitSparseUnion(type, { length, nullCount } = this.nextFieldNode()) {\n return (0,_data_mjs__WEBPACK_IMPORTED_MODULE_2__.makeData)({ type, length, nullCount, nullBitmap: this.readNullBitmap(type, nullCount), typeIds: this.readTypeIds(type), children: this.visitMany(type.children) });\n }\n visitDictionary(type, { length, nullCount } = this.nextFieldNode()) {\n return (0,_data_mjs__WEBPACK_IMPORTED_MODULE_2__.makeData)({ type, length, nullCount, nullBitmap: this.readNullBitmap(type, nullCount), data: this.readData(type.indices), dictionary: this.readDictionary(type) });\n }\n visitInterval(type, { length, nullCount } = this.nextFieldNode()) {\n return (0,_data_mjs__WEBPACK_IMPORTED_MODULE_2__.makeData)({ type, length, nullCount, nullBitmap: this.readNullBitmap(type, nullCount), data: this.readData(type) });\n }\n visitFixedSizeList(type, { length, nullCount } = this.nextFieldNode()) {\n return (0,_data_mjs__WEBPACK_IMPORTED_MODULE_2__.makeData)({ type, length, nullCount, nullBitmap: this.readNullBitmap(type, nullCount), 'child': this.visit(type.children[0]) });\n }\n visitMap(type, { length, nullCount } = this.nextFieldNode()) {\n return (0,_data_mjs__WEBPACK_IMPORTED_MODULE_2__.makeData)({ type, length, nullCount, nullBitmap: this.readNullBitmap(type, nullCount), valueOffsets: this.readOffsets(type), 'child': this.visit(type.children[0]) });\n }\n nextFieldNode() { return this.nodes[++this.nodesIndex]; }\n nextBufferRange() { return this.buffers[++this.buffersIndex]; }\n readNullBitmap(type, nullCount, buffer = this.nextBufferRange()) {\n return nullCount > 0 && this.readData(type, buffer) || new Uint8Array(0);\n }\n readOffsets(type, buffer) { return this.readData(type, buffer); }\n readTypeIds(type, buffer) { return this.readData(type, buffer); }\n readData(_type, { length, offset } = this.nextBufferRange()) {\n return this.bytes.subarray(offset, offset + length);\n }\n readDictionary(type) {\n return this.dictionaries.get(type.id);\n }\n}\n/** @ignore */\nclass JSONVectorLoader extends VectorLoader {\n constructor(sources, nodes, buffers, dictionaries) {\n super(new Uint8Array(0), nodes, buffers, dictionaries);\n this.sources = sources;\n }\n readNullBitmap(_type, nullCount, { offset } = this.nextBufferRange()) {\n return nullCount <= 0 ? new Uint8Array(0) : (0,_util_bit_mjs__WEBPACK_IMPORTED_MODULE_4__.packBools)(this.sources[offset]);\n }\n readOffsets(_type, { offset } = this.nextBufferRange()) {\n return (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_5__.toArrayBufferView)(Uint8Array, (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_5__.toArrayBufferView)(Int32Array, this.sources[offset]));\n }\n readTypeIds(type, { offset } = this.nextBufferRange()) {\n return (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_5__.toArrayBufferView)(Uint8Array, (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_5__.toArrayBufferView)(type.ArrayType, this.sources[offset]));\n }\n readData(type, { offset } = this.nextBufferRange()) {\n const { sources } = this;\n if (_type_mjs__WEBPACK_IMPORTED_MODULE_6__.DataType.isTimestamp(type)) {\n return (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_5__.toArrayBufferView)(Uint8Array, _util_int_mjs__WEBPACK_IMPORTED_MODULE_7__.Int64.convertArray(sources[offset]));\n }\n else if ((_type_mjs__WEBPACK_IMPORTED_MODULE_6__.DataType.isInt(type) || _type_mjs__WEBPACK_IMPORTED_MODULE_6__.DataType.isTime(type)) && type.bitWidth === 64) {\n return (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_5__.toArrayBufferView)(Uint8Array, _util_int_mjs__WEBPACK_IMPORTED_MODULE_7__.Int64.convertArray(sources[offset]));\n }\n else if (_type_mjs__WEBPACK_IMPORTED_MODULE_6__.DataType.isDate(type) && type.unit === _enum_mjs__WEBPACK_IMPORTED_MODULE_3__.DateUnit.MILLISECOND) {\n return (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_5__.toArrayBufferView)(Uint8Array, _util_int_mjs__WEBPACK_IMPORTED_MODULE_7__.Int64.convertArray(sources[offset]));\n }\n else if (_type_mjs__WEBPACK_IMPORTED_MODULE_6__.DataType.isDecimal(type)) {\n return (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_5__.toArrayBufferView)(Uint8Array, _util_int_mjs__WEBPACK_IMPORTED_MODULE_7__.Int128.convertArray(sources[offset]));\n }\n else if (_type_mjs__WEBPACK_IMPORTED_MODULE_6__.DataType.isBinary(type) || _type_mjs__WEBPACK_IMPORTED_MODULE_6__.DataType.isFixedSizeBinary(type)) {\n return binaryDataFromJSON(sources[offset]);\n }\n else if (_type_mjs__WEBPACK_IMPORTED_MODULE_6__.DataType.isBool(type)) {\n return (0,_util_bit_mjs__WEBPACK_IMPORTED_MODULE_4__.packBools)(sources[offset]);\n }\n else if (_type_mjs__WEBPACK_IMPORTED_MODULE_6__.DataType.isUtf8(type)) {\n return (0,_util_utf8_mjs__WEBPACK_IMPORTED_MODULE_8__.encodeUtf8)(sources[offset].join(''));\n }\n return (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_5__.toArrayBufferView)(Uint8Array, (0,_util_buffer_mjs__WEBPACK_IMPORTED_MODULE_5__.toArrayBufferView)(type.ArrayType, sources[offset].map((x) => +x)));\n }\n}\n/** @ignore */\nfunction binaryDataFromJSON(values) {\n // \"DATA\": [\"49BC7D5B6C47D2\",\"3F5FB6D9322026\"]\n // There are definitely more efficient ways to do this... but it gets the\n // job done.\n const joined = values.join('');\n const data = new Uint8Array(joined.length / 2);\n for (let i = 0; i < joined.length; i += 2) {\n data[i >> 1] = Number.parseInt(joined.slice(i, i + 2), 16);\n }\n return data;\n}\n\n//# sourceMappingURL=vectorloader.mjs.map\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/apache-arrow/visitor/vectorloader.mjs?"); + +/***/ }), + +/***/ "./node_modules/tslib/tslib.es6.mjs": +/*!******************************************!*\ + !*** ./node_modules/tslib/tslib.es6.mjs ***! + \******************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ __addDisposableResource: () => (/* binding */ __addDisposableResource),\n/* harmony export */ __assign: () => (/* binding */ __assign),\n/* harmony export */ __asyncDelegator: () => (/* binding */ __asyncDelegator),\n/* harmony export */ __asyncGenerator: () => (/* binding */ __asyncGenerator),\n/* harmony export */ __asyncValues: () => (/* binding */ __asyncValues),\n/* harmony export */ __await: () => (/* binding */ __await),\n/* harmony export */ __awaiter: () => (/* binding */ __awaiter),\n/* harmony export */ __classPrivateFieldGet: () => (/* binding */ __classPrivateFieldGet),\n/* harmony export */ __classPrivateFieldIn: () => (/* binding */ __classPrivateFieldIn),\n/* harmony export */ __classPrivateFieldSet: () => (/* binding */ __classPrivateFieldSet),\n/* harmony export */ __createBinding: () => (/* binding */ __createBinding),\n/* harmony export */ __decorate: () => (/* binding */ __decorate),\n/* harmony export */ __disposeResources: () => (/* binding */ __disposeResources),\n/* harmony export */ __esDecorate: () => (/* binding */ __esDecorate),\n/* harmony export */ __exportStar: () => (/* binding */ __exportStar),\n/* harmony export */ __extends: () => (/* binding */ __extends),\n/* harmony export */ __generator: () => (/* binding */ __generator),\n/* harmony export */ __importDefault: () => (/* binding */ __importDefault),\n/* harmony export */ __importStar: () => (/* binding */ __importStar),\n/* harmony export */ __makeTemplateObject: () => (/* binding */ __makeTemplateObject),\n/* harmony export */ __metadata: () => (/* binding */ __metadata),\n/* harmony export */ __param: () => (/* binding */ __param),\n/* harmony export */ __propKey: () => (/* binding */ __propKey),\n/* harmony export */ __read: () => (/* binding */ __read),\n/* harmony export */ __rest: () => (/* binding */ __rest),\n/* harmony export */ __runInitializers: () => (/* binding */ __runInitializers),\n/* harmony export */ __setFunctionName: () => (/* binding */ __setFunctionName),\n/* harmony export */ __spread: () => (/* binding */ __spread),\n/* harmony export */ __spreadArray: () => (/* binding */ __spreadArray),\n/* harmony export */ __spreadArrays: () => (/* binding */ __spreadArrays),\n/* harmony export */ __values: () => (/* binding */ __values),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nfunction __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nvar __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nfunction __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nfunction __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nfunction __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nfunction __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nfunction __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nfunction __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nfunction __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nfunction __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nfunction __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nfunction __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nvar __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nfunction __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nfunction __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nfunction __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nfunction __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nfunction __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nfunction __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nfunction __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nfunction __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nfunction __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nfunction __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nfunction __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nfunction __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nfunction __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nfunction __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nfunction __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nfunction __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nfunction __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nfunction __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n function next() {\n while (env.stack.length) {\n var rec = env.stack.pop();\n try {\n var result = rec.dispose && rec.dispose.call(rec.value);\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n catch (e) {\n fail(e);\n }\n }\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n});\n\n\n//# sourceURL=webpack://gdpr_consent/./node_modules/tslib/tslib.es6.mjs?"); + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/compat get default export */ +/******/ (() => { +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = (module) => { +/******/ var getter = module && module.__esModule ? +/******/ () => (module['default']) : +/******/ () => (module); +/******/ __webpack_require__.d(getter, { a: getter }); +/******/ return getter; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/************************************************************************/ +/******/ +/******/ // startup +/******/ // Load entry module and return exports +/******/ // This entry module can't be inlined because the eval devtool is used. +/******/ var __webpack_exports__ = __webpack_require__("./src/main.ts"); +/******/ +/******/ })() +; \ No newline at end of file diff --git a/gdpr_consent/index.html b/gdpr_consent/index.html new file mode 100644 index 0000000..9c84e65 --- /dev/null +++ b/gdpr_consent/index.html @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/gdpr_consent/package-lock.json b/gdpr_consent/package-lock.json new file mode 100644 index 0000000..185a6ea --- /dev/null +++ b/gdpr_consent/package-lock.json @@ -0,0 +1,1972 @@ +{ + "name": "gdpr_consent", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "gdpr_consent", + "version": "1.0.0", + "license": "ISC", + "devDependencies": { + "streamlit-component-lib": "^2.0.0", + "ts-loader": "^9.5.1", + "typescript": "^5.5.4", + "webpack": "^5.93.0", + "webpack-cli": "^5.1.4" + } + }, + "node_modules/@discoveryjs/json-ext": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", + "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", + "dev": true, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", + "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@types/command-line-args": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@types/command-line-args/-/command-line-args-5.2.0.tgz", + "integrity": "sha512-UuKzKpJJ/Ief6ufIaIzr3A/0XnluX7RvFgwkV89Yzvm77wCh1kFaFmqN8XEnGcN62EuHdedQjEMb8mYxFLGPyA==", + "dev": true + }, + "node_modules/@types/command-line-usage": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@types/command-line-usage/-/command-line-usage-5.0.2.tgz", + "integrity": "sha512-n7RlEEJ+4x4TS7ZQddTmNSxP+zziEG0TNsMfiRIxcIVXt71ENJ9ojeXmGO3wPoTdn7pJcU2xc3CJYMktNT6DPg==", + "dev": true + }, + "node_modules/@types/eslint": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.0.tgz", + "integrity": "sha512-gi6WQJ7cHRgZxtkQEoyHMppPjq9Kxo5Tjn2prSKDSmZrCz8TZ3jSRCeTJm+WoM+oB0WG37bRqLzaaU3q7JypGg==", + "dev": true, + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/eslint-scope": { + "version": "3.7.7", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", + "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", + "dev": true, + "dependencies": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true + }, + "node_modules/@types/flatbuffers": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/@types/flatbuffers/-/flatbuffers-1.10.3.tgz", + "integrity": "sha512-kwJQsAROanCiMXSLjcTLmYVBIJ9Qyuqs92SaDIcj2EII2KnDgZbiU7it1Z/JfZd1gmxw/lAahMysQ6ZM+j3Ryw==", + "dev": true + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, + "node_modules/@types/node": { + "version": "18.7.23", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.23.tgz", + "integrity": "sha512-DWNcCHolDq0ZKGizjx2DZjR/PqsYwAcYUJmfMWqtVU2MBMG5Mo+xFZrhGId5r/O5HOuMPyQEcM6KUBp5lBZZBg==", + "dev": true + }, + "node_modules/@types/pad-left": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@types/pad-left/-/pad-left-2.1.1.tgz", + "integrity": "sha512-Xd22WCRBydkGSApl5Bw0PhAOHKSVjNL3E3AwzKaps96IMraPqy5BvZIsBVK6JLwdybUzjHnuWVwpDd0JjTfHXA==", + "dev": true + }, + "node_modules/@webassemblyjs/ast": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", + "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", + "dev": true, + "dependencies": { + "@webassemblyjs/helper-numbers": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6" + } + }, + "node_modules/@webassemblyjs/floating-point-hex-parser": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", + "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-api-error": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", + "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-buffer": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", + "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-numbers": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", + "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", + "dev": true, + "dependencies": { + "@webassemblyjs/floating-point-hex-parser": "1.11.6", + "@webassemblyjs/helper-api-error": "1.11.6", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/helper-wasm-bytecode": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", + "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-wasm-section": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", + "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/wasm-gen": "1.12.1" + } + }, + "node_modules/@webassemblyjs/ieee754": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", + "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", + "dev": true, + "dependencies": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "node_modules/@webassemblyjs/leb128": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", + "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", + "dev": true, + "dependencies": { + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/utf8": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", + "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", + "dev": true + }, + "node_modules/@webassemblyjs/wasm-edit": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", + "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/helper-wasm-section": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-opt": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1", + "@webassemblyjs/wast-printer": "1.12.1" + } + }, + "node_modules/@webassemblyjs/wasm-gen": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", + "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" + } + }, + "node_modules/@webassemblyjs/wasm-opt": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", + "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1" + } + }, + "node_modules/@webassemblyjs/wasm-parser": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", + "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-api-error": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" + } + }, + "node_modules/@webassemblyjs/wast-printer": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", + "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.12.1", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webpack-cli/configtest": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.1.1.tgz", + "integrity": "sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw==", + "dev": true, + "engines": { + "node": ">=14.15.0" + }, + "peerDependencies": { + "webpack": "5.x.x", + "webpack-cli": "5.x.x" + } + }, + "node_modules/@webpack-cli/info": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.2.tgz", + "integrity": "sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A==", + "dev": true, + "engines": { + "node": ">=14.15.0" + }, + "peerDependencies": { + "webpack": "5.x.x", + "webpack-cli": "5.x.x" + } + }, + "node_modules/@webpack-cli/serve": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.5.tgz", + "integrity": "sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ==", + "dev": true, + "engines": { + "node": ">=14.15.0" + }, + "peerDependencies": { + "webpack": "5.x.x", + "webpack-cli": "5.x.x" + }, + "peerDependenciesMeta": { + "webpack-dev-server": { + "optional": true + } + } + }, + "node_modules/@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true + }, + "node_modules/@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true + }, + "node_modules/acorn": { + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-import-attributes": { + "version": "1.9.5", + "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", + "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", + "dev": true, + "peerDependencies": { + "acorn": "^8" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "peerDependencies": { + "ajv": "^6.9.1" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/apache-arrow": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/apache-arrow/-/apache-arrow-11.0.0.tgz", + "integrity": "sha512-M8J4y+DimIyS44w2KOmVfzNHbTroR1oDpBKK6BYnlu8xVB41lxTz0yLmapo8/WJVAt5XcinAxMm14M771dm/rA==", + "dev": true, + "dependencies": { + "@types/command-line-args": "5.2.0", + "@types/command-line-usage": "5.0.2", + "@types/flatbuffers": "*", + "@types/node": "18.7.23", + "@types/pad-left": "2.1.1", + "command-line-args": "5.2.1", + "command-line-usage": "6.1.3", + "flatbuffers": "2.0.4", + "json-bignum": "^0.0.3", + "pad-left": "^2.1.0", + "tslib": "^2.4.0" + }, + "bin": { + "arrow2csv": "bin/arrow2csv.js" + } + }, + "node_modules/array-back": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", + "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.3.tgz", + "integrity": "sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001646", + "electron-to-chromium": "^1.5.4", + "node-releases": "^2.0.18", + "update-browserslist-db": "^1.1.0" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001650", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001650.tgz", + "integrity": "sha512-fgEc7hP/LB7iicdXHUI9VsBsMZmUmlVJeQP2qqQW+3lkqVhbmjEU8zp+h5stWeilX+G7uXuIUIIlWlDw9jdt8g==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] + }, + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chrome-trace-event": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", + "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==", + "dev": true, + "engines": { + "node": ">=6.0" + } + }, + "node_modules/clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true + }, + "node_modules/command-line-args": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.1.tgz", + "integrity": "sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==", + "dev": true, + "dependencies": { + "array-back": "^3.1.0", + "find-replace": "^3.0.0", + "lodash.camelcase": "^4.3.0", + "typical": "^4.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/command-line-usage": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-6.1.3.tgz", + "integrity": "sha512-sH5ZSPr+7UStsloltmDh7Ce5fb8XPlHyoPzTpyyMuYCtervL65+ubVZ6Q61cFtFl62UyJlc8/JwERRbAFPUqgw==", + "dev": true, + "dependencies": { + "array-back": "^4.0.2", + "chalk": "^2.4.2", + "table-layout": "^1.0.2", + "typical": "^5.2.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/command-line-usage/node_modules/array-back": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz", + "integrity": "sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/command-line-usage/node_modules/typical": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", + "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.5.tgz", + "integrity": "sha512-QR7/A7ZkMS8tZuoftC/jfqNkZLQO779SSW3YuZHP4eXpj3EffGLFcB/Xu9AAZQzLccTiCV+EmUo3ha4mQ9wnlA==", + "dev": true + }, + "node_modules/enhanced-resolve": { + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", + "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/envinfo": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.13.0.tgz", + "integrity": "sha512-cvcaMr7KqXVh4nyzGTVqTum+gAiL265x5jUWQIDLq//zOGbW+gSW/C+OWLleY/rs9Qole6AZLMXPbtIFQbqu+Q==", + "dev": true, + "bin": { + "envinfo": "dist/cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/es-module-lexer": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz", + "integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==", + "dev": true + }, + "node_modules/escalade": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true, + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fastest-levenshtein": { + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", + "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", + "dev": true, + "engines": { + "node": ">= 4.9.1" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-replace": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", + "integrity": "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==", + "dev": true, + "dependencies": { + "array-back": "^3.0.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "bin": { + "flat": "cli.js" + } + }, + "node_modules/flatbuffers": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/flatbuffers/-/flatbuffers-2.0.4.tgz", + "integrity": "sha512-4rUFVDPjSoP0tOII34oQf+72NKU7E088U5oX7kwICahft0UB2kOQ9wUzzCp+OHxByERIfxRDCgX5mP8Pjkfl0g==", + "dev": true + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "dev": true, + "dependencies": { + "react-is": "^16.7.0" + } + }, + "node_modules/import-local": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", + "dev": true, + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/interpret": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", + "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==", + "dev": true, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/is-core-module": { + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.0.tgz", + "integrity": "sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA==", + "dev": true, + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jest-worker": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "dev": true, + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/jest-worker/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/json-bignum": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/json-bignum/-/json-bignum-0.0.3.tgz", + "integrity": "sha512-2WHyXj3OfHSgNyuzDbSxI1w2jgw5gkWSWhS7Qg4bWXx1nLk3jnbwfUeS0PSba3IzpTUWdHxBieELUzXRjQB2zg==", + "dev": true, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/loader-runner": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", + "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "dev": true, + "engines": { + "node": ">=6.11.5" + } + }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", + "dev": true + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/micromatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", + "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", + "dev": true, + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, + "node_modules/node-releases": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", + "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", + "dev": true + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/pad-left": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pad-left/-/pad-left-2.1.0.tgz", + "integrity": "sha512-HJxs9K9AztdIQIAIa/OIazRAUW/L6B9hbQDxO4X07roW3eo9XqZc2ur9bn1StH9CnbbI9EgvejHQX7CBpCF1QA==", + "dev": true, + "dependencies": { + "repeat-string": "^1.5.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/picocolors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/prop-types": { + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "dev": true, + "dependencies": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/react": { + "version": "16.14.0", + "resolved": "https://registry.npmjs.org/react/-/react-16.14.0.tgz", + "integrity": "sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==", + "dev": true, + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "prop-types": "^15.6.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "16.14.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.14.0.tgz", + "integrity": "sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw==", + "dev": true, + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "prop-types": "^15.6.2", + "scheduler": "^0.19.1" + }, + "peerDependencies": { + "react": "^16.14.0" + } + }, + "node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true + }, + "node_modules/rechoir": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", + "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", + "dev": true, + "dependencies": { + "resolve": "^1.20.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/reduce-flatten": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-2.0.0.tgz", + "integrity": "sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "dev": true, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/scheduler": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.1.tgz", + "integrity": "sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==", + "dev": true, + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } + }, + "node_modules/schema-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/serialize-javascript": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", + "dev": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/source-map": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", + "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/source-map-support/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/streamlit-component-lib": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/streamlit-component-lib/-/streamlit-component-lib-2.0.0.tgz", + "integrity": "sha512-ekLjskU4Cz+zSLkTC9jpppv2hb8jlA3z2h+TtwGUGuwMKrGLrvTpzLJI1ibPuI+bZ60mLHVI1GP/OyNb7K7UjA==", + "dev": true, + "dependencies": { + "apache-arrow": "^11.0.0", + "hoist-non-react-statics": "^3.3.2", + "react": "^16.14.0", + "react-dom": "^16.14.0" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/table-layout": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-1.0.2.tgz", + "integrity": "sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A==", + "dev": true, + "dependencies": { + "array-back": "^4.0.1", + "deep-extend": "~0.6.0", + "typical": "^5.2.0", + "wordwrapjs": "^4.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/table-layout/node_modules/array-back": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz", + "integrity": "sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/table-layout/node_modules/typical": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", + "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/terser": { + "version": "5.31.3", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.31.3.tgz", + "integrity": "sha512-pAfYn3NIZLyZpa83ZKigvj6Rn9c/vd5KfYGX7cN1mnzqgDcxWvrU5ZtAfIKhEXz9nRecw4z3LXkjaq96/qZqAA==", + "dev": true, + "dependencies": { + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/terser-webpack-plugin": { + "version": "5.3.10", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", + "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.20", + "jest-worker": "^27.4.5", + "schema-utils": "^3.1.1", + "serialize-javascript": "^6.0.1", + "terser": "^5.26.0" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "uglify-js": { + "optional": true + } + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-loader": { + "version": "9.5.1", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.5.1.tgz", + "integrity": "sha512-rNH3sK9kGZcH9dYzC7CewQm4NtxJTjSEVRJ2DyBZR7f8/wcta+iV44UPCXc5+nzDzivKtlzV6c9P4e+oFhDLYg==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "enhanced-resolve": "^5.0.0", + "micromatch": "^4.0.0", + "semver": "^7.3.4", + "source-map": "^0.7.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "typescript": "*", + "webpack": "^5.0.0" + } + }, + "node_modules/ts-loader/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/ts-loader/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/ts-loader/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/ts-loader/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/ts-loader/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ts-loader/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tslib": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==", + "dev": true + }, + "node_modules/typescript": { + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", + "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typical": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", + "integrity": "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz", + "integrity": "sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "escalade": "^3.1.2", + "picocolors": "^1.0.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/watchpack": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.1.tgz", + "integrity": "sha512-8wrBCMtVhqcXP2Sup1ctSkga6uc2Bx0IIvKyT7yTFier5AXHooSI+QyQQAtTb7+E0IUCCKyTFmXqdqgum2XWGg==", + "dev": true, + "dependencies": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/webpack": { + "version": "5.93.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.93.0.tgz", + "integrity": "sha512-Y0m5oEY1LRuwly578VqluorkXbvXKh7U3rLoQCEO04M97ScRr44afGVkI0FQFsXzysk5OgFAxjZAb9rsGQVihA==", + "dev": true, + "dependencies": { + "@types/eslint-scope": "^3.7.3", + "@types/estree": "^1.0.5", + "@webassemblyjs/ast": "^1.12.1", + "@webassemblyjs/wasm-edit": "^1.12.1", + "@webassemblyjs/wasm-parser": "^1.12.1", + "acorn": "^8.7.1", + "acorn-import-attributes": "^1.9.5", + "browserslist": "^4.21.10", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.17.0", + "es-module-lexer": "^1.2.1", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.11", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.2.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.3.10", + "watchpack": "^2.4.1", + "webpack-sources": "^3.2.3" + }, + "bin": { + "webpack": "bin/webpack.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/webpack-cli": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.1.4.tgz", + "integrity": "sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg==", + "dev": true, + "dependencies": { + "@discoveryjs/json-ext": "^0.5.0", + "@webpack-cli/configtest": "^2.1.1", + "@webpack-cli/info": "^2.0.2", + "@webpack-cli/serve": "^2.0.5", + "colorette": "^2.0.14", + "commander": "^10.0.1", + "cross-spawn": "^7.0.3", + "envinfo": "^7.7.3", + "fastest-levenshtein": "^1.0.12", + "import-local": "^3.0.2", + "interpret": "^3.1.1", + "rechoir": "^0.8.0", + "webpack-merge": "^5.7.3" + }, + "bin": { + "webpack-cli": "bin/cli.js" + }, + "engines": { + "node": ">=14.15.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "5.x.x" + }, + "peerDependenciesMeta": { + "@webpack-cli/generators": { + "optional": true + }, + "webpack-bundle-analyzer": { + "optional": true + }, + "webpack-dev-server": { + "optional": true + } + } + }, + "node_modules/webpack-cli/node_modules/commander": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", + "dev": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/webpack-merge": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.10.0.tgz", + "integrity": "sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA==", + "dev": true, + "dependencies": { + "clone-deep": "^4.0.1", + "flat": "^5.0.2", + "wildcard": "^2.0.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/webpack-sources": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "dev": true, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wildcard": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", + "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", + "dev": true + }, + "node_modules/wordwrapjs": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-4.0.1.tgz", + "integrity": "sha512-kKlNACbvHrkpIw6oPeYDSmdCTu2hdMHoyXLTcUKala++lx5Y+wjJ/e474Jqv5abnVmwxw08DiTuHmw69lJGksA==", + "dev": true, + "dependencies": { + "reduce-flatten": "^2.0.0", + "typical": "^5.2.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/wordwrapjs/node_modules/typical": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", + "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", + "dev": true, + "engines": { + "node": ">=8" + } + } + } +} diff --git a/gdpr_consent/package.json b/gdpr_consent/package.json new file mode 100644 index 0000000..a631205 --- /dev/null +++ b/gdpr_consent/package.json @@ -0,0 +1,19 @@ +{ + "name": "gdpr_consent", + "version": "1.0.0", + "main": "index.js", + "scripts": { + "build": "webpack" + }, + "keywords": [], + "author": "", + "license": "ISC", + "description": "", + "devDependencies": { + "streamlit-component-lib": "^2.0.0", + "ts-loader": "^9.5.1", + "typescript": "^5.5.4", + "webpack": "^5.93.0", + "webpack-cli": "^5.1.4" + } +} diff --git a/gdpr_consent/src/main.ts b/gdpr_consent/src/main.ts new file mode 100644 index 0000000..4f91be0 --- /dev/null +++ b/gdpr_consent/src/main.ts @@ -0,0 +1,150 @@ +import { Streamlit, RenderData } from "streamlit-component-lib" + +declare var klaro: any; + +declare global { + interface Window { + klaro: any; + } +} + + +// Async function to wait for the Klaro manager +async function waitForKlaroManager (maxWaitTime: number = 5000, interval: number = 100): Promise { + const startTime = Date.now(); + + while (Date.now() - startTime < maxWaitTime) { + const klaroManager = getKlaroManager() + if (klaroManager) { + return klaroManager; + } + await new Promise(resolve => setTimeout(resolve, interval)); + } + + throw new Error("Klaro manager did not become available within the allowed time."); +} + +// Helper function to handle unknown errors +function handleError(error: unknown): void { + if (error instanceof Error) { + console.error("Error:", error.message); + } else { + console.error("Unknown error:", error); + } +} + +// Tracking was accepted +async function onAcceptCallback(): Promise { + try { + const manager = await waitForKlaroManager(); + if (manager.confirmed) { + Streamlit.setComponentValue("accepted"); + } + } catch (error) { + handleError(error); + } +} + +// Tracking was declined +async function onDeclineCallback(): Promise { + try { + const manager = await waitForKlaroManager(); + if (manager.confirmed) { + Streamlit.setComponentValue("declined"); + } + } catch (error) { + handleError(error); + } +} + +function onChange(): void { + changed = true; +} + +interface KlaroService { + name: string; + cookies: RegExp[]; + purposes: string[]; + onAccept: () => void; + onDecline: () => void; +} + +interface KlaroConfig { + mustConsent: boolean; + acceptAll: boolean; + services: KlaroService[]; +} + +interface klaroManager { + confirmed : boolean +} + +const klaroConfig = { + mustConsent: true, + acceptAll: true, + services: [ + { + // In GTM, you should define a custom event trigger named `klaro-google-analytics-accepted` which should trigger the Google Analytics integration. + name: 'google-analytics', + cookies: [ + /^_ga(_.*)?/ // we delete the Google Analytics cookies if the user declines its use + ], + purposes: ['analytics'], + onAccept: onAcceptCallback, + onDecline: onDeclineCallback, + }, + ] +}; + +let rendered = false; +let changed = false; + +function onRender(event: Event): void { + if (rendered) { + return + } + rendered = true + // Create a new script element + var script = document.createElement('script'); + + // Set the necessary attributes + script.defer = true; + script.type = 'application/javascript'; + script.src = 'https://cdn.kiprotect.com/klaro/v0.7/klaro.js'; + + // Set the data-config attribute + script.setAttribute('data-config', 'klaroConfig'); + + script.onload = function() { + const klaroManager = getKlaroManager(); + if (klaroManager) { + console.log("Klaro loaded successfully"); + console.log(klaroManager) + } else { + console.error("Failed to initialize Klaro manager"); + } + }; + + // Append the script to the head or body + document.head.appendChild(script); +} + +// Function to safely access the Klaro manager +function getKlaroManager() : klaroManager { + return window.klaro?.getManager ? window.klaro.getManager() : null; +} + +// This will make klaroConfig globally accessible +(window as any).klaroConfig = klaroConfig; + +// Attach our `onRender` handler to Streamlit's render event. +Streamlit.events.addEventListener(Streamlit.RENDER_EVENT, onRender) + +// Tell Streamlit we're ready to start receiving data. We won't get our +// first RENDER_EVENT until we call this function. +Streamlit.setComponentReady(); + +// Finally, tell Streamlit to update our initial height. We omit the +// `height` parameter here to have it default to our scrollHeight. +Streamlit.setFrameHeight(1000); + diff --git a/gdpr_consent/tsconfig.json b/gdpr_consent/tsconfig.json new file mode 100644 index 0000000..f30fb82 --- /dev/null +++ b/gdpr_consent/tsconfig.json @@ -0,0 +1,111 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + + /* Language and Environment */ + "target": "ES5", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ + // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + + /* Modules */ + "module": "ESNext", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ + // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ + // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ + // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ + // "resolveJsonModule": true, /* Enable importing .json files. */ + // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + + /* Emit */ + // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + "outDir": "./dist", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ + // "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */ + }, + "include": [ + "src/**/*" + ] +} \ No newline at end of file diff --git a/gdpr_consent/webpack.config.js b/gdpr_consent/webpack.config.js new file mode 100644 index 0000000..04b8e13 --- /dev/null +++ b/gdpr_consent/webpack.config.js @@ -0,0 +1,22 @@ +const path = require('path'); + +module.exports = { + entry: './src/main.ts', + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/, + }, + ], + }, + resolve: { + extensions: ['.tsx', '.ts', '.js'], + }, + output: { + filename: 'bundle.js', + path: path.resolve(__dirname, 'dist'), + }, + mode: 'development', +}; diff --git a/settings.json b/settings.json new file mode 100644 index 0000000..d57f6f0 --- /dev/null +++ b/settings.json @@ -0,0 +1,6 @@ +{ + "google_analytics" : { + "enabled" : true, + "tag" : "G-E14B1EB0SB" + } +} \ No newline at end of file diff --git a/src/captcha_.py b/src/captcha_.py index ada43e7..d80f9f0 100644 --- a/src/captcha_.py +++ b/src/captcha_.py @@ -1,5 +1,6 @@ from pathlib import Path import streamlit as st +import streamlit.components.v1 as st_components from streamlit.source_util import page_icon_and_name, calc_md5, get_pages, _on_pages_changed from captcha.image import ImageCaptcha @@ -9,6 +10,9 @@ import os +consent_component = st_components.declare_component("gdpr_consent", path=Path("gdpr_consent")) + + def delete_all_pages(main_script_path_str: str) -> None: """ Delete all pages except the main page from an app's configuration. @@ -193,7 +197,18 @@ def captcha_control(): None """ # control if the captcha is correct - if "controllo" not in st.session_state or st.session_state["controllo"] is False: + if "controllo" not in st.session_state or st.session_state["controllo"] == False: + + if st.session_state.tracking_consent is None: + with st.spinner(): + st.session_state.tracking_consent = consent_component() + if st.session_state.tracking_consent is None: + st.stop() + else: + print(st.session_state.tracking_consent) + st.rerun() + + st.title("Make sure you are not a robot🤖") # define the session state for control if the captcha is correct diff --git a/src/common.py b/src/common.py index 4655773..dfc306a 100644 --- a/src/common.py +++ b/src/common.py @@ -6,6 +6,7 @@ import time from typing import Any from pathlib import Path +from streamlit.components.v1 import html import streamlit as st import pandas as pd @@ -93,6 +94,10 @@ def page_setup(page: str = "") -> dict[str, Any]: Returns: dict[str, Any]: A dictionary containing the parameters loaded from the parameter file. """ + if 'settings' not in st.session_state: + with open('settings.json', 'r') as f: + st.session_state.settings = json.load(f) + # Set Streamlit page configurations st.set_page_config( page_title=APP_NAME, @@ -104,6 +109,24 @@ def page_setup(page: str = "") -> dict[str, Any]: st.logo("assets/pyopenms_transparent_background.png") + if 'tracking_consent' not in st.session_state: + st.session_state.tracking_consent = None + if (st.session_state.settings['google_analytics']['enabled']) and (st.session_state.tracking_consent == True): + html( + f""" + + + + """, + width=1, height=1 + ) + # Determine the workspace for the current session if ( ("workspace" not in st.session_state) or From faa0391b7b13c9cb8f568e3e6346ef8bae817bc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= Date: Mon, 12 Aug 2024 07:30:48 +0200 Subject: [PATCH 037/168] cleanup klaro --- gdpr_consent/dist/bundle.js | 2 +- gdpr_consent/src/main.ts | 143 ++++++++++++++---------------------- 2 files changed, 57 insertions(+), 88 deletions(-) diff --git a/gdpr_consent/dist/bundle.js b/gdpr_consent/dist/bundle.js index 1d89d84..ba3bfbb 100644 --- a/gdpr_consent/dist/bundle.js +++ b/gdpr_consent/dist/bundle.js @@ -235,7 +235,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var streamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! streamlit-component-lib */ \"./node_modules/streamlit-component-lib/dist/index.js\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n\n// Async function to wait for the Klaro manager\nfunction waitForKlaroManager() {\n return __awaiter(this, arguments, void 0, function (maxWaitTime, interval) {\n var startTime, klaroManager;\n if (maxWaitTime === void 0) { maxWaitTime = 5000; }\n if (interval === void 0) { interval = 100; }\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n startTime = Date.now();\n _a.label = 1;\n case 1:\n if (!(Date.now() - startTime < maxWaitTime)) return [3 /*break*/, 3];\n klaroManager = getKlaroManager();\n if (klaroManager) {\n return [2 /*return*/, klaroManager];\n }\n return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, interval); })];\n case 2:\n _a.sent();\n return [3 /*break*/, 1];\n case 3: throw new Error(\"Klaro manager did not become available within the allowed time.\");\n }\n });\n });\n}\n// Helper function to handle unknown errors\nfunction handleError(error) {\n if (error instanceof Error) {\n console.error(\"Error:\", error.message);\n }\n else {\n console.error(\"Unknown error:\", error);\n }\n}\n// Tracking was accepted\nfunction onAcceptCallback() {\n return __awaiter(this, void 0, void 0, function () {\n var manager, error_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, waitForKlaroManager()];\n case 1:\n manager = _a.sent();\n if (manager.confirmed) {\n streamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.setComponentValue(\"accepted\");\n }\n return [3 /*break*/, 3];\n case 2:\n error_1 = _a.sent();\n handleError(error_1);\n return [3 /*break*/, 3];\n case 3: return [2 /*return*/];\n }\n });\n });\n}\n// Tracking was declined\nfunction onDeclineCallback() {\n return __awaiter(this, void 0, void 0, function () {\n var manager, error_2;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, waitForKlaroManager()];\n case 1:\n manager = _a.sent();\n if (manager.confirmed) {\n streamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.setComponentValue(\"declined\");\n }\n return [3 /*break*/, 3];\n case 2:\n error_2 = _a.sent();\n handleError(error_2);\n return [3 /*break*/, 3];\n case 3: return [2 /*return*/];\n }\n });\n });\n}\nfunction onChange() {\n changed = true;\n}\nvar klaroConfig = {\n mustConsent: true,\n acceptAll: true,\n services: [\n {\n // In GTM, you should define a custom event trigger named `klaro-google-analytics-accepted` which should trigger the Google Analytics integration.\n name: 'google-analytics',\n cookies: [\n /^_ga(_.*)?/ // we delete the Google Analytics cookies if the user declines its use\n ],\n purposes: ['analytics'],\n onAccept: onAcceptCallback,\n onDecline: onDeclineCallback,\n },\n ]\n};\nvar rendered = false;\nvar changed = false;\nfunction onRender(event) {\n if (rendered) {\n return;\n }\n rendered = true;\n // Create a new script element\n var script = document.createElement('script');\n // Set the necessary attributes\n script.defer = true;\n script.type = 'application/javascript';\n script.src = 'https://cdn.kiprotect.com/klaro/v0.7/klaro.js';\n // Set the data-config attribute\n script.setAttribute('data-config', 'klaroConfig');\n script.onload = function () {\n var klaroManager = getKlaroManager();\n if (klaroManager) {\n console.log(\"Klaro loaded successfully\");\n console.log(klaroManager);\n }\n else {\n console.error(\"Failed to initialize Klaro manager\");\n }\n };\n // Append the script to the head or body\n document.head.appendChild(script);\n}\n// Function to safely access the Klaro manager\nfunction getKlaroManager() {\n var _a;\n return ((_a = window.klaro) === null || _a === void 0 ? void 0 : _a.getManager) ? window.klaro.getManager() : null;\n}\n// This will make klaroConfig globally accessible\nwindow.klaroConfig = klaroConfig;\n// Attach our `onRender` handler to Streamlit's render event.\nstreamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.events.addEventListener(streamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.RENDER_EVENT, onRender);\n// Tell Streamlit we're ready to start receiving data. We won't get our\n// first RENDER_EVENT until we call this function.\nstreamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.setComponentReady();\n// Finally, tell Streamlit to update our initial height. We omit the\n// `height` parameter here to have it default to our scrollHeight.\nstreamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.setFrameHeight(1000);\n\n\n//# sourceURL=webpack://gdpr_consent/./src/main.ts?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var streamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! streamlit-component-lib */ \"./node_modules/streamlit-component-lib/dist/index.js\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n\n// Defines the configuration for Klaro\nvar klaroConfig = {\n mustConsent: true,\n acceptAll: true,\n services: [\n {\n // In GTM, you should define a custom event trigger named `klaro-google-analytics-accepted` which should trigger the Google Analytics integration.\n name: 'google-analytics',\n cookies: [\n /^_ga(_.*)?/ // we delete the Google Analytics cookies if the user declines its use\n ],\n purposes: ['analytics'],\n onAccept: onAcceptCallback,\n onDecline: onDeclineCallback,\n },\n ]\n};\n// Function to safely access the Klaro manager\nfunction getKlaroManager() {\n var _a;\n return ((_a = window.klaro) === null || _a === void 0 ? void 0 : _a.getManager) ? window.klaro.getManager() : null;\n}\n// Waits until Klaro Manager is available\nfunction waitForKlaroManager() {\n return __awaiter(this, arguments, void 0, function (maxWaitTime, interval) {\n var startTime, klaroManager;\n if (maxWaitTime === void 0) { maxWaitTime = 5000; }\n if (interval === void 0) { interval = 100; }\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n startTime = Date.now();\n _a.label = 1;\n case 1:\n if (!(Date.now() - startTime < maxWaitTime)) return [3 /*break*/, 3];\n klaroManager = getKlaroManager();\n if (klaroManager) {\n return [2 /*return*/, klaroManager];\n }\n return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, interval); })];\n case 2:\n _a.sent();\n return [3 /*break*/, 1];\n case 3: throw new Error(\"Klaro manager did not become available within the allowed time.\");\n }\n });\n });\n}\n// Helper function to handle unknown errors\nfunction handleError(error) {\n if (error instanceof Error) {\n console.error(\"Error:\", error.message);\n }\n else {\n console.error(\"Unknown error:\", error);\n }\n}\n// Tracking was accepted\nfunction onAcceptCallback() {\n return __awaiter(this, void 0, void 0, function () {\n var manager, error_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, waitForKlaroManager()];\n case 1:\n manager = _a.sent();\n if (manager.confirmed) {\n streamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.setComponentValue(true);\n }\n return [3 /*break*/, 3];\n case 2:\n error_1 = _a.sent();\n handleError(error_1);\n return [3 /*break*/, 3];\n case 3: return [2 /*return*/];\n }\n });\n });\n}\n// Tracking was declined\nfunction onDeclineCallback() {\n return __awaiter(this, void 0, void 0, function () {\n var manager, error_2;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, waitForKlaroManager()];\n case 1:\n manager = _a.sent();\n if (manager.confirmed) {\n streamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.setComponentValue(false);\n }\n return [3 /*break*/, 3];\n case 2:\n error_2 = _a.sent();\n handleError(error_2);\n return [3 /*break*/, 3];\n case 3: return [2 /*return*/];\n }\n });\n });\n}\n// Stores if the component has been rendered before\nvar rendered = false;\nfunction onRender(event) {\n // Klaro does not work if embedded multiple times\n if (rendered) {\n return;\n }\n rendered = true;\n // Create a new script element\n var script = document.createElement('script');\n // Set the necessary attributes\n script.defer = true;\n script.type = 'application/javascript';\n script.src = 'https://cdn.kiprotect.com/klaro/v0.7/klaro.js';\n // Set the klaro config\n script.setAttribute('data-config', 'klaroConfig');\n // Append the script to the head or body\n document.head.appendChild(script);\n}\n// Attach our `onRender` handler to Streamlit's render event.\nstreamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.events.addEventListener(streamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.RENDER_EVENT, onRender);\n// Tell Streamlit we're ready to start receiving data. We won't get our\n// first RENDER_EVENT until we call this function.\nstreamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.setComponentReady();\n// Finally, tell Streamlit to update the initial height.\nstreamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.setFrameHeight(1000);\n\n\n//# sourceURL=webpack://gdpr_consent/./src/main.ts?"); /***/ }), diff --git a/gdpr_consent/src/main.ts b/gdpr_consent/src/main.ts index 4f91be0..d78c09b 100644 --- a/gdpr_consent/src/main.ts +++ b/gdpr_consent/src/main.ts @@ -1,150 +1,119 @@ import { Streamlit, RenderData } from "streamlit-component-lib" -declare var klaro: any; +// Defines the configuration for Klaro +const klaroConfig = { + mustConsent: true, + acceptAll: true, + services: [ + { + // In GTM, you should define a custom event trigger named `klaro-google-analytics-accepted` which should trigger the Google Analytics integration. + name: 'google-analytics', + cookies: [ + /^_ga(_.*)?/ // we delete the Google Analytics cookies if the user declines its use + ], + purposes: ['analytics'], + onAccept: onAcceptCallback, + onDecline: onDeclineCallback, + }, + ] +} +// Klaro creates global variable for access to manager declare global { interface Window { - klaro: any; + klaro: any } } +// The confirmed field in the Klaro Manager shows if the callback is +// based on user generated data +interface klaroManager { + confirmed : boolean +} -// Async function to wait for the Klaro manager -async function waitForKlaroManager (maxWaitTime: number = 5000, interval: number = 100): Promise { - const startTime = Date.now(); +// Function to safely access the Klaro manager +function getKlaroManager() : klaroManager { + return window.klaro?.getManager ? window.klaro.getManager() : null +} +// Waits until Klaro Manager is available +async function waitForKlaroManager (maxWaitTime: number = 5000, interval: number = 100): Promise { + const startTime = Date.now() while (Date.now() - startTime < maxWaitTime) { const klaroManager = getKlaroManager() if (klaroManager) { - return klaroManager; + return klaroManager } - await new Promise(resolve => setTimeout(resolve, interval)); + await new Promise(resolve => setTimeout(resolve, interval)) } - - throw new Error("Klaro manager did not become available within the allowed time."); + throw new Error("Klaro manager did not become available within the allowed time.") } // Helper function to handle unknown errors function handleError(error: unknown): void { if (error instanceof Error) { - console.error("Error:", error.message); + console.error("Error:", error.message) } else { - console.error("Unknown error:", error); + console.error("Unknown error:", error) } } // Tracking was accepted async function onAcceptCallback(): Promise { try { - const manager = await waitForKlaroManager(); + const manager = await waitForKlaroManager() if (manager.confirmed) { - Streamlit.setComponentValue("accepted"); + Streamlit.setComponentValue(true) } } catch (error) { - handleError(error); + handleError(error) } } // Tracking was declined async function onDeclineCallback(): Promise { try { - const manager = await waitForKlaroManager(); + const manager = await waitForKlaroManager() if (manager.confirmed) { - Streamlit.setComponentValue("declined"); + Streamlit.setComponentValue(false) } } catch (error) { - handleError(error); + handleError(error) } } -function onChange(): void { - changed = true; -} - -interface KlaroService { - name: string; - cookies: RegExp[]; - purposes: string[]; - onAccept: () => void; - onDecline: () => void; -} - -interface KlaroConfig { - mustConsent: boolean; - acceptAll: boolean; - services: KlaroService[]; -} - -interface klaroManager { - confirmed : boolean -} - -const klaroConfig = { - mustConsent: true, - acceptAll: true, - services: [ - { - // In GTM, you should define a custom event trigger named `klaro-google-analytics-accepted` which should trigger the Google Analytics integration. - name: 'google-analytics', - cookies: [ - /^_ga(_.*)?/ // we delete the Google Analytics cookies if the user declines its use - ], - purposes: ['analytics'], - onAccept: onAcceptCallback, - onDecline: onDeclineCallback, - }, - ] -}; - -let rendered = false; -let changed = false; +// Stores if the component has been rendered before +let rendered = false function onRender(event: Event): void { + // Klaro does not work if embedded multiple times if (rendered) { return } rendered = true + // Create a new script element - var script = document.createElement('script'); + var script = document.createElement('script') // Set the necessary attributes - script.defer = true; - script.type = 'application/javascript'; - script.src = 'https://cdn.kiprotect.com/klaro/v0.7/klaro.js'; + script.defer = true + script.type = 'application/javascript' + script.src = 'https://cdn.kiprotect.com/klaro/v0.7/klaro.js' - // Set the data-config attribute - script.setAttribute('data-config', 'klaroConfig'); - - script.onload = function() { - const klaroManager = getKlaroManager(); - if (klaroManager) { - console.log("Klaro loaded successfully"); - console.log(klaroManager) - } else { - console.error("Failed to initialize Klaro manager"); - } - }; + // Set the klaro config + script.setAttribute('data-config', 'klaroConfig') // Append the script to the head or body - document.head.appendChild(script); + document.head.appendChild(script) } -// Function to safely access the Klaro manager -function getKlaroManager() : klaroManager { - return window.klaro?.getManager ? window.klaro.getManager() : null; -} - -// This will make klaroConfig globally accessible -(window as any).klaroConfig = klaroConfig; - // Attach our `onRender` handler to Streamlit's render event. Streamlit.events.addEventListener(Streamlit.RENDER_EVENT, onRender) // Tell Streamlit we're ready to start receiving data. We won't get our // first RENDER_EVENT until we call this function. -Streamlit.setComponentReady(); +Streamlit.setComponentReady() -// Finally, tell Streamlit to update our initial height. We omit the -// `height` parameter here to have it default to our scrollHeight. -Streamlit.setFrameHeight(1000); +// Finally, tell Streamlit to update the initial height. +Streamlit.setFrameHeight(1000) From f9e359e37fa957c2a1d8b07548bbf42f69774969 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= Date: Mon, 12 Aug 2024 07:36:22 +0200 Subject: [PATCH 038/168] fix klaro --- gdpr_consent/dist/bundle.js | 2 +- gdpr_consent/src/main.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gdpr_consent/dist/bundle.js b/gdpr_consent/dist/bundle.js index ba3bfbb..ceb4b7d 100644 --- a/gdpr_consent/dist/bundle.js +++ b/gdpr_consent/dist/bundle.js @@ -235,7 +235,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var streamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! streamlit-component-lib */ \"./node_modules/streamlit-component-lib/dist/index.js\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n\n// Defines the configuration for Klaro\nvar klaroConfig = {\n mustConsent: true,\n acceptAll: true,\n services: [\n {\n // In GTM, you should define a custom event trigger named `klaro-google-analytics-accepted` which should trigger the Google Analytics integration.\n name: 'google-analytics',\n cookies: [\n /^_ga(_.*)?/ // we delete the Google Analytics cookies if the user declines its use\n ],\n purposes: ['analytics'],\n onAccept: onAcceptCallback,\n onDecline: onDeclineCallback,\n },\n ]\n};\n// Function to safely access the Klaro manager\nfunction getKlaroManager() {\n var _a;\n return ((_a = window.klaro) === null || _a === void 0 ? void 0 : _a.getManager) ? window.klaro.getManager() : null;\n}\n// Waits until Klaro Manager is available\nfunction waitForKlaroManager() {\n return __awaiter(this, arguments, void 0, function (maxWaitTime, interval) {\n var startTime, klaroManager;\n if (maxWaitTime === void 0) { maxWaitTime = 5000; }\n if (interval === void 0) { interval = 100; }\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n startTime = Date.now();\n _a.label = 1;\n case 1:\n if (!(Date.now() - startTime < maxWaitTime)) return [3 /*break*/, 3];\n klaroManager = getKlaroManager();\n if (klaroManager) {\n return [2 /*return*/, klaroManager];\n }\n return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, interval); })];\n case 2:\n _a.sent();\n return [3 /*break*/, 1];\n case 3: throw new Error(\"Klaro manager did not become available within the allowed time.\");\n }\n });\n });\n}\n// Helper function to handle unknown errors\nfunction handleError(error) {\n if (error instanceof Error) {\n console.error(\"Error:\", error.message);\n }\n else {\n console.error(\"Unknown error:\", error);\n }\n}\n// Tracking was accepted\nfunction onAcceptCallback() {\n return __awaiter(this, void 0, void 0, function () {\n var manager, error_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, waitForKlaroManager()];\n case 1:\n manager = _a.sent();\n if (manager.confirmed) {\n streamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.setComponentValue(true);\n }\n return [3 /*break*/, 3];\n case 2:\n error_1 = _a.sent();\n handleError(error_1);\n return [3 /*break*/, 3];\n case 3: return [2 /*return*/];\n }\n });\n });\n}\n// Tracking was declined\nfunction onDeclineCallback() {\n return __awaiter(this, void 0, void 0, function () {\n var manager, error_2;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, waitForKlaroManager()];\n case 1:\n manager = _a.sent();\n if (manager.confirmed) {\n streamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.setComponentValue(false);\n }\n return [3 /*break*/, 3];\n case 2:\n error_2 = _a.sent();\n handleError(error_2);\n return [3 /*break*/, 3];\n case 3: return [2 /*return*/];\n }\n });\n });\n}\n// Stores if the component has been rendered before\nvar rendered = false;\nfunction onRender(event) {\n // Klaro does not work if embedded multiple times\n if (rendered) {\n return;\n }\n rendered = true;\n // Create a new script element\n var script = document.createElement('script');\n // Set the necessary attributes\n script.defer = true;\n script.type = 'application/javascript';\n script.src = 'https://cdn.kiprotect.com/klaro/v0.7/klaro.js';\n // Set the klaro config\n script.setAttribute('data-config', 'klaroConfig');\n // Append the script to the head or body\n document.head.appendChild(script);\n}\n// Attach our `onRender` handler to Streamlit's render event.\nstreamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.events.addEventListener(streamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.RENDER_EVENT, onRender);\n// Tell Streamlit we're ready to start receiving data. We won't get our\n// first RENDER_EVENT until we call this function.\nstreamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.setComponentReady();\n// Finally, tell Streamlit to update the initial height.\nstreamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.setFrameHeight(1000);\n\n\n//# sourceURL=webpack://gdpr_consent/./src/main.ts?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var streamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! streamlit-component-lib */ \"./node_modules/streamlit-component-lib/dist/index.js\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n\n// Defines the configuration for Klaro\nvar klaroConfig = {\n mustConsent: true,\n acceptAll: true,\n services: [\n {\n // In GTM, you should define a custom event trigger named `klaro-google-analytics-accepted` which should trigger the Google Analytics integration.\n name: 'google-analytics',\n cookies: [\n /^_ga(_.*)?/ // we delete the Google Analytics cookies if the user declines its use\n ],\n purposes: ['analytics'],\n onAccept: onAcceptCallback,\n onDecline: onDeclineCallback,\n },\n ]\n};\n// This will make klaroConfig globally accessible\nwindow.klaroConfig = klaroConfig;\n// Function to safely access the Klaro manager\nfunction getKlaroManager() {\n var _a;\n return ((_a = window.klaro) === null || _a === void 0 ? void 0 : _a.getManager) ? window.klaro.getManager() : null;\n}\n// Waits until Klaro Manager is available\nfunction waitForKlaroManager() {\n return __awaiter(this, arguments, void 0, function (maxWaitTime, interval) {\n var startTime, klaroManager;\n if (maxWaitTime === void 0) { maxWaitTime = 5000; }\n if (interval === void 0) { interval = 100; }\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n startTime = Date.now();\n _a.label = 1;\n case 1:\n if (!(Date.now() - startTime < maxWaitTime)) return [3 /*break*/, 3];\n klaroManager = getKlaroManager();\n if (klaroManager) {\n return [2 /*return*/, klaroManager];\n }\n return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, interval); })];\n case 2:\n _a.sent();\n return [3 /*break*/, 1];\n case 3: throw new Error(\"Klaro manager did not become available within the allowed time.\");\n }\n });\n });\n}\n// Helper function to handle unknown errors\nfunction handleError(error) {\n if (error instanceof Error) {\n console.error(\"Error:\", error.message);\n }\n else {\n console.error(\"Unknown error:\", error);\n }\n}\n// Tracking was accepted\nfunction onAcceptCallback() {\n return __awaiter(this, void 0, void 0, function () {\n var manager, error_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, waitForKlaroManager()];\n case 1:\n manager = _a.sent();\n if (manager.confirmed) {\n streamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.setComponentValue(true);\n }\n return [3 /*break*/, 3];\n case 2:\n error_1 = _a.sent();\n handleError(error_1);\n return [3 /*break*/, 3];\n case 3: return [2 /*return*/];\n }\n });\n });\n}\n// Tracking was declined\nfunction onDeclineCallback() {\n return __awaiter(this, void 0, void 0, function () {\n var manager, error_2;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, waitForKlaroManager()];\n case 1:\n manager = _a.sent();\n if (manager.confirmed) {\n streamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.setComponentValue(false);\n }\n return [3 /*break*/, 3];\n case 2:\n error_2 = _a.sent();\n handleError(error_2);\n return [3 /*break*/, 3];\n case 3: return [2 /*return*/];\n }\n });\n });\n}\n// Stores if the component has been rendered before\nvar rendered = false;\nfunction onRender(event) {\n // Klaro does not work if embedded multiple times\n if (rendered) {\n return;\n }\n rendered = true;\n // Create a new script element\n var script = document.createElement('script');\n // Set the necessary attributes\n script.defer = true;\n script.type = 'application/javascript';\n script.src = 'https://cdn.kiprotect.com/klaro/v0.7/klaro.js';\n // Set the klaro config\n script.setAttribute('data-config', 'klaroConfig');\n // Append the script to the head or body\n document.head.appendChild(script);\n}\n// Attach our `onRender` handler to Streamlit's render event.\nstreamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.events.addEventListener(streamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.RENDER_EVENT, onRender);\n// Tell Streamlit we're ready to start receiving data. We won't get our\n// first RENDER_EVENT until we call this function.\nstreamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.setComponentReady();\n// Finally, tell Streamlit to update the initial height.\nstreamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.setFrameHeight(1000);\n\n\n//# sourceURL=webpack://gdpr_consent/./src/main.ts?"); /***/ }), diff --git a/gdpr_consent/src/main.ts b/gdpr_consent/src/main.ts index d78c09b..bbb5ef5 100644 --- a/gdpr_consent/src/main.ts +++ b/gdpr_consent/src/main.ts @@ -16,7 +16,10 @@ const klaroConfig = { onDecline: onDeclineCallback, }, ] -} +}; + +// This will make klaroConfig globally accessible +(window as any).klaroConfig = klaroConfig // Klaro creates global variable for access to manager declare global { From 85dfdca226a1e89c40f12f9afa132eaac4f98455 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= Date: Mon, 12 Aug 2024 07:43:21 +0200 Subject: [PATCH 039/168] add readme --- gdpr_consent/README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 gdpr_consent/README.md diff --git a/gdpr_consent/README.md b/gdpr_consent/README.md new file mode 100644 index 0000000..34b45dc --- /dev/null +++ b/gdpr_consent/README.md @@ -0,0 +1,18 @@ + +# GDPR Consent Banner + +This streamlit component creates a consent banner using Klaro for +tracking-cookies etc. + + +## Project Setup + +```sh +npm install +``` + +## Build for production + +```sh +npm run build +``` \ No newline at end of file From 132790c48a6a0e1dd034f6c45f198efb54316e59 Mon Sep 17 00:00:00 2001 From: singjc Date: Tue, 13 Aug 2024 00:08:39 -0400 Subject: [PATCH 040/168] update: upload_widget - Allow for file_types to be a list of str if user wants to upload more than one file type with the same upload widget - Allow for uploading a directory, i.e. uploading a bruker .d file - Allow for local symlink creation instead of copying/duplicating files --- src/Workflow.py | 2 +- src/workflow/StreamlitUI.py | 50 ++++++++++++++++++++++++++----------- 2 files changed, 37 insertions(+), 15 deletions(-) diff --git a/src/Workflow.py b/src/Workflow.py index 3e5864f..0300a24 100644 --- a/src/Workflow.py +++ b/src/Workflow.py @@ -22,7 +22,7 @@ def upload(self) -> None: self.ui.upload_widget( key="mzML-files", name="MS data", - file_type="mzML", + file_types="mzML", fallback=[str(f) for f in Path("example-data", "mzML").glob("*.mzML")], ) diff --git a/src/workflow/StreamlitUI.py b/src/workflow/StreamlitUI.py index 50b3c0b..a86eb9f 100644 --- a/src/workflow/StreamlitUI.py +++ b/src/workflow/StreamlitUI.py @@ -5,6 +5,7 @@ import subprocess from typing import Any, Union, List import json +import os import sys import importlib.util import time @@ -31,9 +32,10 @@ def __init__(self, workflow_dir, logger, executor, paramter_manager): def upload_widget( self, key: str, - file_type: str, + file_types: Union[str, List[str]], name: str = "", fallback: Union[List, str] = None, + symlink: bool = True ) -> None: """ Handles file uploads through the Streamlit interface, supporting both direct @@ -42,9 +44,10 @@ def upload_widget( Args: key (str): A unique identifier for the upload component. - file_type (str): Expected file type for the uploaded files. + file_types (Union[str, List[str]]): Expected file type(s) for the uploaded files. name (str, optional): Display name for the upload component. Defaults to the key if not provided. fallback (Union[List, str], optional): Default files to use if no files are uploaded. + symlink (bool, optional): Whether to symlink the uploaded files. This is used if local to avoid making duplicate copies. Defaults to True. """ files_dir = Path(self.workflow_dir, "input-files", key) @@ -62,10 +65,13 @@ def upload_widget( c1, c2 = st.columns(2) c1.markdown("**Upload file(s)**") with c1.form(f"{key}-upload", clear_on_submit=True): - if any(c.isupper() for c in file_type) and (c.islower() for c in file_type): - file_type_for_uploader = None - else: - file_type_for_uploader = [file_type] + # Convert file_types to a list if it's a string + if isinstance(file_types, str): + file_types = [file_types] + + # Streamlit file uploader accepts file types as a list or None + file_type_for_uploader = file_types if file_types else None + files = st.file_uploader( f"{name}", accept_multiple_files=(st.session_state.location == "local"), @@ -80,9 +86,10 @@ def upload_widget( if not isinstance(files, list): files = [files] for f in files: + # Check if file type is in the list of accepted file types if f.name not in [ f.name for f in files_dir.iterdir() - ] and f.name.endswith(file_type): + ] and any(f.name.endswith(ft) for ft in file_types): with open(Path(files_dir, f.name), "wb") as fh: fh.write(f.getbuffer()) st.success("Successfully added uploaded files!") @@ -97,18 +104,33 @@ def upload_widget( if st.form_submit_button( f"Copy **{name}** files from local folder", use_container_width=True ): - # raw string for file paths - if not any(Path(local_dir).glob(f"*.{file_type}")): + files = [] + local_dir = Path(local_dir).expanduser() # Expand ~ to full home directory path + + for ft in file_types: + print(f"Searching for files with type: {ft} in {local_dir}") + # Search for both files and directories with the specified extension + for path in local_dir.iterdir(): + if path.is_file() and path.name.endswith(f".{ft}"): + files.append(path) + elif path.is_dir() and path.name.endswith(f".{ft}"): + files.append(path) + print(f"files: {files}") + + if not files: st.warning( - f"No files with type **{file_type}** found in specified folder." + f"No files with type **{', '.join(file_types)}** found in specified folder." ) else: - # Copy all mzML files to workspace mzML directory, add to selected files - files = list(Path(local_dir).glob("*.mzML")) my_bar = st.progress(0) for i, f in enumerate(files): my_bar.progress((i + 1) / len(files)) - shutil.copy(f, Path(files_dir, f.name)) + if not symlink: + shutil.copy(f, Path(files_dir, f.name)) + else: + symlink_target = Path(files_dir, f.name) + if not symlink_target.exists(): + os.symlink(f, symlink_target) my_bar.empty() st.success("Successfully copied files!") @@ -149,7 +171,7 @@ def upload_widget( st.rerun() elif not fallback: st.warning(f"No **{name}** files!") - + def select_input_file( self, key: str, From b842120f9cd051e8a6f9134c61f93b7dbc7c9921 Mon Sep 17 00:00:00 2001 From: singjc Date: Tue, 13 Aug 2024 00:11:47 -0400 Subject: [PATCH 041/168] [lint] remove debug print statements and format with black --- src/workflow/StreamlitUI.py | 44 +++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/src/workflow/StreamlitUI.py b/src/workflow/StreamlitUI.py index a86eb9f..b49d720 100644 --- a/src/workflow/StreamlitUI.py +++ b/src/workflow/StreamlitUI.py @@ -35,7 +35,7 @@ def upload_widget( file_types: Union[str, List[str]], name: str = "", fallback: Union[List, str] = None, - symlink: bool = True + symlink: bool = True, ) -> None: """ Handles file uploads through the Streamlit interface, supporting both direct @@ -50,12 +50,14 @@ def upload_widget( symlink (bool, optional): Whether to symlink the uploaded files. This is used if local to avoid making duplicate copies. Defaults to True. """ files_dir = Path(self.workflow_dir, "input-files", key) - + # create the files dir files_dir.mkdir(exist_ok=True, parents=True) # check if only fallback files are in files_dir, if yes, reset the directory before adding new files - if [Path(f).name for f in Path(files_dir).iterdir()] == [Path(f).name for f in fallback]: + if [Path(f).name for f in Path(files_dir).iterdir()] == [ + Path(f).name for f in fallback + ]: shutil.rmtree(files_dir) files_dir.mkdir() @@ -87,9 +89,9 @@ def upload_widget( files = [files] for f in files: # Check if file type is in the list of accepted file types - if f.name not in [ - f.name for f in files_dir.iterdir() - ] and any(f.name.endswith(ft) for ft in file_types): + if f.name not in [f.name for f in files_dir.iterdir()] and any( + f.name.endswith(ft) for ft in file_types + ): with open(Path(files_dir, f.name), "wb") as fh: fh.write(f.getbuffer()) st.success("Successfully added uploaded files!") @@ -105,17 +107,17 @@ def upload_widget( f"Copy **{name}** files from local folder", use_container_width=True ): files = [] - local_dir = Path(local_dir).expanduser() # Expand ~ to full home directory path + local_dir = Path( + local_dir + ).expanduser() # Expand ~ to full home directory path for ft in file_types: - print(f"Searching for files with type: {ft} in {local_dir}") # Search for both files and directories with the specified extension for path in local_dir.iterdir(): if path.is_file() and path.name.endswith(f".{ft}"): files.append(path) elif path.is_dir() and path.name.endswith(f".{ft}"): files.append(path) - print(f"files: {files}") if not files: st.warning( @@ -166,12 +168,14 @@ def upload_widget( ): shutil.rmtree(files_dir) del self.params[key] - with open(self.parameter_manager.params_file, "w", encoding="utf-8") as f: + with open( + self.parameter_manager.params_file, "w", encoding="utf-8" + ) as f: json.dump(self.params, f, indent=4) st.rerun() elif not fallback: st.warning(f"No **{name}** files!") - + def select_input_file( self, key: str, @@ -420,7 +424,6 @@ def input_TOPP( if encoded_key in param.keys(): param.setValue(encoded_key, value) poms.ParamXMLFile().store(str(ini_file_path), param) - # read into Param object param = poms.Param() @@ -453,7 +456,7 @@ def input_TOPP( "section_description": param.getSectionDescription(':'.join(key.decode().split(':')[:-1])) } params_decoded.append(tmp) - + # for each parameter in params_decoded # if a parameter with custom default value exists, use that value # else check if the parameter is already in self.params, if yes take the value from self.params @@ -471,7 +474,7 @@ def input_TOPP( section_description = None cols = st.columns(num_cols) i = 0 - + for p in params_decoded: # skip avdanced parameters if not selected if not st.session_state["advanced"] and p["advanced"]: @@ -479,11 +482,11 @@ def input_TOPP( key = f"{self.parameter_manager.topp_param_prefix}{p['key'].decode()}" if display_subsections: - name = p["name"] - if section_description is None: + name = p["name"] + if section_description is None: section_description = p['section_description'] - - elif section_description != p['section_description']: + + elif section_description != p['section_description']: section_description = p['section_description'] st.markdown(f"**{section_description}**") cols = st.columns(num_cols) @@ -660,7 +663,7 @@ def zip_and_download_files(self, directory: str): Args: directory (str): The directory whose files are to be zipped. """ - # Ensure directory is a Path object and check if directory is empty + # Ensure directory is a Path object and check if directory is empty directory = Path(directory) if not any(directory.iterdir()): st.error("No files to compress.") @@ -697,8 +700,7 @@ def zip_and_download_files(self, directory: str): mime="application/zip", use_container_width=True ) - - + def file_upload_section(self, custom_upload_function) -> None: custom_upload_function() c1, _ = st.columns(2) From 57a7741cd26067efee1b071239105bdef93dd455 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= Date: Tue, 13 Aug 2024 10:07:55 +0200 Subject: [PATCH 042/168] enable tracking iframe for google analytics --- src/captcha_.py | 6 ++++-- src/common.py | 30 +++++++++++++++++++++--------- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/src/captcha_.py b/src/captcha_.py index d80f9f0..7f6bb29 100644 --- a/src/captcha_.py +++ b/src/captcha_.py @@ -199,16 +199,18 @@ def captcha_control(): # control if the captcha is correct if "controllo" not in st.session_state or st.session_state["controllo"] == False: + # Check if consent for tracking was given if st.session_state.tracking_consent is None: with st.spinner(): + # Ask for consent st.session_state.tracking_consent = consent_component() if st.session_state.tracking_consent is None: + # No response by user yet st.stop() else: - print(st.session_state.tracking_consent) + # Consent choice was made st.rerun() - st.title("Make sure you are not a robot🤖") # define the session state for control if the captcha is correct diff --git a/src/common.py b/src/common.py index dfc306a..9b0aafe 100644 --- a/src/common.py +++ b/src/common.py @@ -109,20 +109,32 @@ def page_setup(page: str = "") -> dict[str, Any]: st.logo("assets/pyopenms_transparent_background.png") + # Create google analytics if consent was given if 'tracking_consent' not in st.session_state: st.session_state.tracking_consent = None if (st.session_state.settings['google_analytics']['enabled']) and (st.session_state.tracking_consent == True): html( f""" - - - + + + + + + + + + """, width=1, height=1 ) From 31bc7f8c3be9f849c5fc7b0ca074a048ed76a084 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= Date: Tue, 13 Aug 2024 10:19:33 +0200 Subject: [PATCH 043/168] only ask for tracking permission if tracking is enabled --- src/captcha_.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/captcha_.py b/src/captcha_.py index 7f6bb29..62e5226 100644 --- a/src/captcha_.py +++ b/src/captcha_.py @@ -200,7 +200,7 @@ def captcha_control(): if "controllo" not in st.session_state or st.session_state["controllo"] == False: # Check if consent for tracking was given - if st.session_state.tracking_consent is None: + if (st.session_state.settings['google_analytics']['enabled']) and (st.session_state.tracking_consent is None): with st.spinner(): # Ask for consent st.session_state.tracking_consent = consent_component() From 52f9ddad429dfdb33abe913e7df1638535f95b80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= Date: Tue, 13 Aug 2024 12:39:27 +0200 Subject: [PATCH 044/168] control online / offline deployment using settings.json --- settings.json | 3 ++- src/common.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/settings.json b/settings.json index d57f6f0..8e3812e 100644 --- a/settings.json +++ b/settings.json @@ -2,5 +2,6 @@ "google_analytics" : { "enabled" : true, "tag" : "G-E14B1EB0SB" - } + }, + "online_deployment": false } \ No newline at end of file diff --git a/src/common.py b/src/common.py index 9b0aafe..2d1b05e 100644 --- a/src/common.py +++ b/src/common.py @@ -149,7 +149,7 @@ def page_setup(page: str = "") -> dict[str, Any]: st.cache_data.clear() st.cache_resource.clear() # Check location - if "local" in sys.argv: + if not st.session_state.settings['online_deployment']: st.session_state.location = "local" else: st.session_state.location = "online" From cf985a4aedf28bbc023097ffed64e84359dfffa2 Mon Sep 17 00:00:00 2001 From: Justin Sing <32938975+singjc@users.noreply.github.com> Date: Tue, 13 Aug 2024 13:22:04 -0400 Subject: [PATCH 045/168] Update src/workflow/StreamlitUI.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apply suggested change, change symlink default to False. Co-authored-by: Tom David Müller <57191390+t0mdavid-m@users.noreply.github.com> --- src/workflow/StreamlitUI.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/workflow/StreamlitUI.py b/src/workflow/StreamlitUI.py index b49d720..21dd356 100644 --- a/src/workflow/StreamlitUI.py +++ b/src/workflow/StreamlitUI.py @@ -35,7 +35,7 @@ def upload_widget( file_types: Union[str, List[str]], name: str = "", fallback: Union[List, str] = None, - symlink: bool = True, + symlink: bool = False, ) -> None: """ Handles file uploads through the Streamlit interface, supporting both direct From cb87b3fd1c6f3000295734d1c4e44d2e9e315881 Mon Sep 17 00:00:00 2001 From: Justin Sing <32938975+singjc@users.noreply.github.com> Date: Tue, 13 Aug 2024 13:22:14 -0400 Subject: [PATCH 046/168] Update src/workflow/StreamlitUI.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Tom David Müller <57191390+t0mdavid-m@users.noreply.github.com> --- src/workflow/StreamlitUI.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/workflow/StreamlitUI.py b/src/workflow/StreamlitUI.py index 21dd356..a347636 100644 --- a/src/workflow/StreamlitUI.py +++ b/src/workflow/StreamlitUI.py @@ -47,7 +47,7 @@ def upload_widget( file_types (Union[str, List[str]]): Expected file type(s) for the uploaded files. name (str, optional): Display name for the upload component. Defaults to the key if not provided. fallback (Union[List, str], optional): Default files to use if no files are uploaded. - symlink (bool, optional): Whether to symlink the uploaded files. This is used if local to avoid making duplicate copies. Defaults to True. + symlink (bool, optional): Whether to symlink the uploaded files. This is used if local to avoid making duplicate copies. Defaults to False. """ files_dir = Path(self.workflow_dir, "input-files", key) From 5ede810c8d81b626e4561b40e79d020a0e68245f Mon Sep 17 00:00:00 2001 From: singjc Date: Tue, 13 Aug 2024 15:11:17 -0400 Subject: [PATCH 047/168] add: const var for current OS platform --- src/common.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/common.py b/src/common.py index 7bb4ba6..eb3b0eb 100644 --- a/src/common.py +++ b/src/common.py @@ -15,6 +15,9 @@ APP_NAME = "OpenMS Streamlit App" REPOSITORY_NAME = "streamlit-template" +# Detect system platform +OS_PLATFORM = sys.platform + def load_params(default: bool = False) -> dict[str, Any]: """ From 7f8b212893c0aa7a2e4741a64657f36d0daf00f7 Mon Sep 17 00:00:00 2001 From: singjc Date: Tue, 13 Aug 2024 15:12:37 -0400 Subject: [PATCH 048/168] add: handle symlink if using windows Use os.link to create a link to a file in windows or use mklink to link a directory. Not sure if this actually works yet, need to check on a win machine --- src/workflow/StreamlitUI.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/workflow/StreamlitUI.py b/src/workflow/StreamlitUI.py index a347636..285d085 100644 --- a/src/workflow/StreamlitUI.py +++ b/src/workflow/StreamlitUI.py @@ -13,6 +13,8 @@ import zipfile from datetime import datetime +from ..common import OS_PLATFORM + class StreamlitUI: """ Provides an interface for Streamlit applications to handle file uploads, @@ -131,8 +133,18 @@ def upload_widget( shutil.copy(f, Path(files_dir, f.name)) else: symlink_target = Path(files_dir, f.name) - if not symlink_target.exists(): - os.symlink(f, symlink_target) + if OS_PLATFORM == "win32": + # Detect if it's a file or directory + if f.is_file(): + if not symlink_target.exists(): + os.link(f, symlink_target) + else: + # Use mklink /J for directories + if not symlink_target.exists(): + subprocess.call(["mklink", "/J", str(symlink_target), str(f)], shell=True) + else: + if not symlink_target.exists(): + os.symlink(f, symlink_target) my_bar.empty() st.success("Successfully copied files!") From 67e4bd89bb7aab783659a974d168f539e3719055 Mon Sep 17 00:00:00 2001 From: singjc Date: Tue, 13 Aug 2024 22:10:28 -0400 Subject: [PATCH 049/168] add: checkbox widget to toggle using symlink - fix: if not using symlink and copying directory, use copytree and allow for existing directory --- src/workflow/StreamlitUI.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/workflow/StreamlitUI.py b/src/workflow/StreamlitUI.py index 285d085..bb42083 100644 --- a/src/workflow/StreamlitUI.py +++ b/src/workflow/StreamlitUI.py @@ -36,8 +36,7 @@ def upload_widget( key: str, file_types: Union[str, List[str]], name: str = "", - fallback: Union[List, str] = None, - symlink: bool = False, + fallback: Union[List, str] = None ) -> None: """ Handles file uploads through the Streamlit interface, supporting both direct @@ -49,7 +48,6 @@ def upload_widget( file_types (Union[str, List[str]]): Expected file type(s) for the uploaded files. name (str, optional): Display name for the upload component. Defaults to the key if not provided. fallback (Union[List, str], optional): Default files to use if no files are uploaded. - symlink (bool, optional): Whether to symlink the uploaded files. This is used if local to avoid making duplicate copies. Defaults to False. """ files_dir = Path(self.workflow_dir, "input-files", key) @@ -102,7 +100,9 @@ def upload_widget( # Local file upload option: via directory path if st.session_state.location == "local": - c2.markdown("**OR copy files from local folder**") + c2_text, c2_checkbox = c2.columns([2, 1]) + c2_text.markdown("**OR copy files from local folder**") + use_symlink = c2_checkbox.checkbox("Use symlinks", key=f"{key}-symlink", help="Use symbolic links instead of copying files.") with c2.form(f"{key}-local-file-upload"): local_dir = st.text_input(f"path to folder with **{name}** files") if st.form_submit_button( @@ -129,8 +129,11 @@ def upload_widget( my_bar = st.progress(0) for i, f in enumerate(files): my_bar.progress((i + 1) / len(files)) - if not symlink: - shutil.copy(f, Path(files_dir, f.name)) + if not use_symlink: + if os.path.isfile(f): + shutil.copy(f, Path(files_dir, f.name)) + elif os.path.isdir(f): + shutil.copytree(f, Path(files_dir, f.name), dirs_exist_ok=True) else: symlink_target = Path(files_dir, f.name) if OS_PLATFORM == "win32": @@ -147,7 +150,9 @@ def upload_widget( os.symlink(f, symlink_target) my_bar.empty() st.success("Successfully copied files!") - + if use_symlink: + c2.warning("**Warning**: You have selected to use symbolic links to the original files instead of making copies. This **_assumes you know what you are doing_**. If you are unsure, please uncheck the `Use symlinks` checkbox to use the safer copy option.") + if fallback and not any(Path(files_dir).iterdir()): if isinstance(fallback, str): fallback = [fallback] From aecb12a0a03ea51f88e78d6f462b613fbdac7c22 Mon Sep 17 00:00:00 2001 From: singjc Date: Tue, 13 Aug 2024 22:19:34 -0400 Subject: [PATCH 050/168] add: to warning message to explain what symbolic links are --- src/workflow/StreamlitUI.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/workflow/StreamlitUI.py b/src/workflow/StreamlitUI.py index bb42083..98528a1 100644 --- a/src/workflow/StreamlitUI.py +++ b/src/workflow/StreamlitUI.py @@ -151,8 +151,13 @@ def upload_widget( my_bar.empty() st.success("Successfully copied files!") if use_symlink: - c2.warning("**Warning**: You have selected to use symbolic links to the original files instead of making copies. This **_assumes you know what you are doing_**. If you are unsure, please uncheck the `Use symlinks` checkbox to use the safer copy option.") - + c2.warning( + "**Warning**: You have selected to use symbolic links to the original files instead of making copies. " + "This **_assumes you know what you are doing_**. Symbolic links point to the original files, " + "meaning changes to the original will affect the links. If you are unsure, please uncheck the " + "`Use symlinks` checkbox to use the safer copy option." + ) + if fallback and not any(Path(files_dir).iterdir()): if isinstance(fallback, str): fallback = [fallback] From aa65248b12896ea98fc275880eb29ee1cc43e6a9 Mon Sep 17 00:00:00 2001 From: singjc Date: Wed, 14 Aug 2024 10:36:01 -0400 Subject: [PATCH 051/168] add: local dir and previous local dir to session state --- src/common.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common.py b/src/common.py index eb3b0eb..1d35a31 100644 --- a/src/common.py +++ b/src/common.py @@ -114,6 +114,8 @@ def page_setup(page: str = "") -> dict[str, Any]: # Check location if "local" in sys.argv: st.session_state.location = "local" + st.session_state["previous_dir"] = os.getcwd() + st.session_state["local_dir"] = "" else: st.session_state.location = "online" # if we run the packaged windows version, we start within the Python directory -> need to change working directory to ..\streamlit-template From e9338c0432c87e7e125919c450efd6500d117a01 Mon Sep 17 00:00:00 2001 From: singjc Date: Wed, 14 Aug 2024 10:49:51 -0400 Subject: [PATCH 052/168] add: tkinter directroy dialog - added a tkinter based directory selector - removed symlink/hardlink option --- src/workflow/StreamlitUI.py | 87 ++++++++++++++++++++++++------------- 1 file changed, 58 insertions(+), 29 deletions(-) diff --git a/src/workflow/StreamlitUI.py b/src/workflow/StreamlitUI.py index 98528a1..8dc915d 100644 --- a/src/workflow/StreamlitUI.py +++ b/src/workflow/StreamlitUI.py @@ -13,6 +13,12 @@ import zipfile from datetime import datetime +try: + from tkinter import Tk, filedialog + TK_AVAILABLE = True +except ImportError: + TK_AVAILABLE = False + from ..common import OS_PLATFORM class StreamlitUI: @@ -31,6 +37,26 @@ def __init__(self, workflow_dir, logger, executor, paramter_manager): self.parameter_manager = paramter_manager self.params = self.parameter_manager.get_parameters_from_json() + def tk_directory_dialog(self, title: str = "Select Directory", parent_dir: str = os.getcwd()): + """ + Creates a Tkinter directory dialog for selecting a directory. + + Args: + title (str): The title of the directory dialog. + parent_dir (str): The path to the parent directory of the directory dialog. + + Returns: + str: The path to the selected directory. + + Warning: + This function is not avaliable in a streamlit cloud context. + """ + root = Tk() + root.withdraw() + file_path = filedialog.askdirectory(title=title, initialdir=parent_dir) + root.destroy() + return file_path + def upload_widget( self, key: str, @@ -100,14 +126,23 @@ def upload_widget( # Local file upload option: via directory path if st.session_state.location == "local": - c2_text, c2_checkbox = c2.columns([2, 1]) + c2_text, c2_checkbox = c2.columns([1.5, 1], gap="large") c2_text.markdown("**OR copy files from local folder**") - use_symlink = c2_checkbox.checkbox("Use symlinks", key=f"{key}-symlink", help="Use symbolic links instead of copying files.") - with c2.form(f"{key}-local-file-upload"): - local_dir = st.text_input(f"path to folder with **{name}** files") - if st.form_submit_button( - f"Copy **{name}** files from local folder", use_container_width=True - ): + use_copy = c2_checkbox.checkbox("Make a copy of files", key=f"{key}-copy_files", value=True, help="Create a copy of files in workspace.") + with c2.container(border=True): + st_cols = st.columns([0.05, 0.55], gap="small") + with st_cols[0]: + st.write("\n") + st.write("\n") + dialog_button = st.button("📁", key='local_browse', help="Browse for your local directory with MS data.", disabled=not TK_AVAILABLE) + if dialog_button: + st.session_state["local_dir"] = self.tk_directory_dialog("Select directory with your MS data", st.session_state["previous_dir"]) + st.session_state["previous_dir"] = st.session_state["local_dir"] + + with st_cols[1]: + local_dir = st.text_input(f"path to folder with **{name}** files", value=st.session_state["local_dir"]) + + if c2.button(f"Copy **{name}** files from local folder", use_container_width=True): files = [] local_dir = Path( local_dir @@ -129,35 +164,29 @@ def upload_widget( my_bar = st.progress(0) for i, f in enumerate(files): my_bar.progress((i + 1) / len(files)) - if not use_symlink: + if use_copy: if os.path.isfile(f): shutil.copy(f, Path(files_dir, f.name)) elif os.path.isdir(f): shutil.copytree(f, Path(files_dir, f.name), dirs_exist_ok=True) else: - symlink_target = Path(files_dir, f.name) - if OS_PLATFORM == "win32": - # Detect if it's a file or directory - if f.is_file(): - if not symlink_target.exists(): - os.link(f, symlink_target) - else: - # Use mklink /J for directories - if not symlink_target.exists(): - subprocess.call(["mklink", "/J", str(symlink_target), str(f)], shell=True) - else: - if not symlink_target.exists(): - os.symlink(f, symlink_target) + # Do we need to change the reference of Path(st.session_state.workspace, "mzML-files") to point to local dir? + pass my_bar.empty() st.success("Successfully copied files!") - if use_symlink: - c2.warning( - "**Warning**: You have selected to use symbolic links to the original files instead of making copies. " - "This **_assumes you know what you are doing_**. Symbolic links point to the original files, " - "meaning changes to the original will affect the links. If you are unsure, please uncheck the " - "`Use symlinks` checkbox to use the safer copy option." - ) + + if not TK_AVAILABLE: + c2.warning("**Warning**: Failed to import tkinter, either it is not installed, or this is being called from a cloud context. " "This function is not available in a Streamlit Cloud context. " + "You will have to manually enter the path to the folder with the MS files." + ) + if not use_copy: + c2.warning( + "**Warning**: You have deselected the `Make a copy of files` option. " + "This **_assumes you know what you are doing_**. " + "This means that the original files will be used instead. " + ) + if fallback and not any(Path(files_dir).iterdir()): if isinstance(fallback, str): fallback = [fallback] @@ -197,7 +226,7 @@ def upload_widget( st.rerun() elif not fallback: st.warning(f"No **{name}** files!") - + def select_input_file( self, key: str, From 72382b0ad33a10686e61cf6e0d4c4d9236be78e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= Date: Fri, 16 Aug 2024 13:39:04 +0200 Subject: [PATCH 053/168] update doc for new workflow layout --- docs/toppframework.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/toppframework.py b/docs/toppframework.py index 1afa819..04989f8 100644 --- a/docs/toppframework.py +++ b/docs/toppframework.py @@ -61,7 +61,7 @@ def content(): The subdirectory name will be determined by a **key** that is defined in the `self.ui.upload_widget` method. The uploaded files are available by the specific key for parameter input widgets and accessible while building the workflow. -Calling this method will create a complete file upload widget section with the following components: +Calling this method will create a complete file upload widget page with the following components: - file uploader - list of currently uploaded files with this key (or a warning if there are none) @@ -84,11 +84,11 @@ def content(): """ ## Parameter Input -The paramter section is already pre-defined as a form with buttons to **save parameters** and **load defaults** and a toggle to show TOPP tool parameters marked as advanced. +The parameter page is already pre-defined as a form with buttons to **save parameters** and **load defaults** and a toggle to show TOPP tool parameters marked as advanced. Generating parameter input widgets is done with the `self.ui.input` method for any parameter and the `self.ui.input_TOPP` method for TOPP tools. -**1. Choose `self.ui.input_widget` for any paramter not-related to a TOPP tool or `self.ui.select_input_file` for any input file:** +**1. Choose `self.ui.input_widget` for any parameter not-related to a TOPP tool or `self.ui.select_input_file` for any input file:** It takes the obligatory **key** parameter. The key is used to access the parameter value in the workflow parameters dictionary `self.params`. Default values do not need to be specified in a separate file. Instead they are determined from the widgets default value automatically. Widget types can be specified or automatically determined from **default** and **options** parameters. It's suggested to add a **help** text and other parameters for numerical input. @@ -140,7 +140,7 @@ def content(): """ ## Building the Workflow -Building the workflow involves **calling all (TOPP) tools** using **`self.executor`** with **input and output files** based on the **`FileManager`** class. For TOPP tools non-input-output parameters are handled automatically. Parameters for other processes and workflow logic can be accessed via widget keys (set in the parameter section) in the **`self.params`** dictionary. +Building the workflow involves **calling all (TOPP) tools** using **`self.executor`** with **input and output files** based on the **`FileManager`** class. For TOPP tools non-input-output parameters are handled automatically. Parameters for other processes and workflow logic can be accessed via widget keys (set on the parameter page) in the **`self.params`** dictionary. ### FileManager @@ -166,7 +166,7 @@ def content(): feature_detection_out = self.file_manager.get_files(mzML_files, set_file_type="featureXML", set_results_dir="feature-detection") # feature_detection_out = ['../workspaces-streamlit-template/default/topp-workflow/results/feature-detection/Control.featureXML', '../workspaces-streamlit-template/default/topp-workflow/results/feature-detection/Treatment.featureXML'] -# Setting a name for the output directory automatically (useful if you never plan to access these files in the results section). +# Setting a name for the output directory automatically (useful if you never plan to access these files within the results page). feature_detection_out = self.file_manager.get_files(mzML_files, set_file_type="featureXML", set_results_dir="auto") # feature_detection_out = ['../workspaces-streamlit-template/default/topp-workflow/results/6DUd/Control.featureXML', '../workspaces-streamlit-template/default/topp-workflow/results/6DUd/Treatment.featureXML'] @@ -258,7 +258,7 @@ def content(): """ ) - st.markdown("**Example for a complete workflow section:**") + st.markdown("**Example for a complete workflow:**") st.code(getsource(Workflow.execution)) From 64d90ea2d959c7ddf22324ff6fc32e81fe782a2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= Date: Fri, 16 Aug 2024 14:03:40 +0200 Subject: [PATCH 054/168] doc new structure --- content/quickstart.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/quickstart.py b/content/quickstart.py index 96e67df..4c49b89 100644 --- a/content/quickstart.py +++ b/content/quickstart.py @@ -101,7 +101,7 @@ Use this option if you want a standardized framework for building your workflow. -- **Pre-defined user interface** all in one streamlit page with all steps in different tabs: +- **Pre-defined user interface** all in one streamlit page with all steps on different pages: - **File Upload**: upload, download and delete input files - **Configure**: Automatically display input widgets for all paramters in TOPP tools and custom Python scripts - **Run**: Start and stop workflow execution, includes continous log From ea15610ae8a92ca79ae49ccd1f6c32d453696c4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= Date: Fri, 16 Aug 2024 14:58:10 +0200 Subject: [PATCH 055/168] update doc for workspace management --- content/quickstart.py | 4 ++-- docs/user_guide.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/content/quickstart.py b/content/quickstart.py index 4c49b89..2df98fb 100644 --- a/content/quickstart.py +++ b/content/quickstart.py @@ -77,11 +77,11 @@ st.markdown( """## Workspaces and Settings -The **sidebar** contains to boxes, one for **workspaces** and one for **settings**. +The **sidebar** contains to boxes, one for **workspaces** (in local mode) and one for **settings**. 🖥️ **Workspaces** store user inputs, parameters and results for a specific session or analysis task. -In **online mode** where the app is hosted on a remote server the workspace has a unique identifier number which can be shared with collaboration partners or stored for later access. +In **online mode** where the app is hosted on a remote server the workspace has a unique identifier number which can be shared with collaboration partners or stored for later access. The identifier is embedded within the url. In **local mode** where the app is run locally on a PC (e.g. via Windows executable) the user can create and delete separate workspaces for different projects. diff --git a/docs/user_guide.md b/docs/user_guide.md index c44d33b..c0e3860 100644 --- a/docs/user_guide.md +++ b/docs/user_guide.md @@ -13,7 +13,7 @@ OpenMS web applications provide a user-friendly interface for accessing the powe In the OpenMS web application, workspaces are designed to keep your analysis organized: - **Workspace Specific Parameters and Files**: Each workspace stores parameters and files (uploaded input files and results from workflows). -- **Persistence**: Your workspaces and parameters are saved, so you can return to your analysis anytime and pick up where you left off. +- **Persistence**: Your workspaces and parameters are saved, so you can return to your analysis anytime and pick up where you left off. Simply bookmark the page! ## Online and Local Mode Differences From 3e770ad565c602d5975dcd25dac6edcb1460f005 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= Date: Fri, 16 Aug 2024 15:07:46 +0200 Subject: [PATCH 056/168] update doc for settings.json --- docs/build_app.md | 2 +- docs/deployment.md | 14 ++++++++------ docs/installation.md | 4 ++-- docs/win_exe_with_embed_py.md | 4 ++-- docs/win_exe_with_pyinstaller.md | 4 ++-- run_app.py | 4 ++-- 6 files changed, 17 insertions(+), 15 deletions(-) diff --git a/docs/build_app.md b/docs/build_app.md index 4eaec43..3b9bc0c 100644 --- a/docs/build_app.md +++ b/docs/build_app.md @@ -9,7 +9,7 @@ - **Workspaces** : Directories where all data is generated and uploaded can be stored as well as a workspace specific parameter file. - **Run the app locally and online** -: Launching the app with the `local` argument lets the user create/remove workspaces. In the online the user gets a workspace with a specific ID. +: Launching the app with online mode disabled in the settings.json lets the user create/remove workspaces. In the online the user gets a workspace with a specific ID. - **Parameters** : Parameters (defaults in `assets/default-params.json`) store changing parameters for each workspace. Parameters are loaded via the page_setup function at the start of each page. To track a widget variable via parameters simply give them a key and add a matching entry in the default parameters file. Initialize a widget value from the params dictionary. diff --git a/docs/deployment.md b/docs/deployment.md index f768ae3..f835325 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -20,7 +20,7 @@ Multiple streamlit apps based on the [OpenMS streamlit template](https://github. **2. Specify GitHub token (to download Windows executables).** -> This is **important**! Ommitting this step while result in all apps not having the option to download exetutables any more. +> This is **important**! Omitting this step while result in all apps not having the option to download executables any more. Create a temporary `.env` file with your Github token. It should contain only one line: @@ -30,25 +30,27 @@ Create a temporary `.env` file with your Github token. It should contain only on `docker-compose up --build -d` -> Make sure to remove the `.env` file with your Github token after successfull build +> Make sure to remove the `.env` file with your Github token after successful build ## Add new app This will add your app as a submodule to the streamlit deployment repository. -**1. Fork and clone the [OpenMS streamlit deployment](https://github.com/OpenMS/streamlit-deployment) repository locally.** +**1. Enable online mode in the apps settings.json.** -**2. Add your app as submodule. Make sure the app name is not used already.** +**2. Fork and clone the [OpenMS streamlit deployment](https://github.com/OpenMS/streamlit-deployment) repository locally.** + +**3. Add your app as submodule. Make sure the app name is not used already.** `git submodule add ` -**3. Initialize and update submodules.** +**4. Initialize and update submodules.** `git submodule init` `git submodule update` -**4. Add your app to `docker-compose.yml` file as a new service.** +**5. Add your app to `docker-compose.yml` file as a new service.** Copy the last service as a template. diff --git a/docs/installation.md b/docs/installation.md index 41a5cca..2d7283b 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -27,9 +27,9 @@ Create and activate the conda environment: ### run the app -Run the app via streamlit command in the terminal with or without *local* mode (default is *online* mode). Learn more about *local* and *online* mode in the documentation page 📖 **OpenMS Template App**. +Run the app via streamlit command in the terminal. *local* and *online* mode can be toggled in the settings.json. Learn more about *local* and *online* mode in the documentation page 📖 **OpenMS Template App**. -`streamlit run app.py [local]` +`streamlit run app.py` ## Docker diff --git a/docs/win_exe_with_embed_py.md b/docs/win_exe_with_embed_py.md index fb799f9..6db6cea 100644 --- a/docs/win_exe_with_embed_py.md +++ b/docs/win_exe_with_embed_py.md @@ -66,7 +66,7 @@ Install all required packages from `requirements.txt`: 1. Test by running app ```batch - .\python-3.11.9\python -m streamlit run app.py local + .\python-3.11.9\python -m streamlit run app.py ``` 2. Create a Clickable Shortcut @@ -75,7 +75,7 @@ Install all required packages from `requirements.txt`: ```batch echo @echo off > run_app.bat - echo .\\python-3.11.9\\python -m streamlit run app.py local >> run_app.bat + echo .\\python-3.11.9\\python -m streamlit run app.py >> run_app.bat ``` ### Create one executable folder diff --git a/docs/win_exe_with_pyinstaller.md b/docs/win_exe_with_pyinstaller.md index 5082c3b..d02dc29 100644 --- a/docs/win_exe_with_pyinstaller.md +++ b/docs/win_exe_with_pyinstaller.md @@ -32,8 +32,8 @@ from streamlit.web import cli if __name__=='__main__': cli._main_run_clExplicit( - file="app.py", command_line="streamlit run", args=["local"] - ) # run in local mode + file="app.py", command_line="streamlit run" + ) # we will create this function inside our streamlit framework ``` diff --git a/run_app.py b/run_app.py index 2b3886b..b736b1b 100644 --- a/run_app.py +++ b/run_app.py @@ -2,6 +2,6 @@ if __name__ == "__main__": cli._main_run_clExplicit( - file="app.py", command_line="streamlit run", args=["local"] - ) # run in local mode + file="app.py", command_line="streamlit run" + ) # we will create this function inside our streamlit framework From 6b3e28f42f6c875f6fa5517fde4c5265ee39ccc9 Mon Sep 17 00:00:00 2001 From: Justin Sing <32938975+singjc@users.noreply.github.com> Date: Mon, 19 Aug 2024 10:18:05 -0400 Subject: [PATCH 057/168] Update src/workflow/StreamlitUI.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add suggestion to make tk dilog on the top Co-authored-by: Tom David Müller <57191390+t0mdavid-m@users.noreply.github.com> --- src/workflow/StreamlitUI.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/workflow/StreamlitUI.py b/src/workflow/StreamlitUI.py index 8dc915d..18c302a 100644 --- a/src/workflow/StreamlitUI.py +++ b/src/workflow/StreamlitUI.py @@ -52,6 +52,7 @@ def tk_directory_dialog(self, title: str = "Select Directory", parent_dir: str = This function is not avaliable in a streamlit cloud context. """ root = Tk() + root.attributes("-topmost", True) root.withdraw() file_path = filedialog.askdirectory(title=title, initialdir=parent_dir) root.destroy() From 0a3a184109623a7c33c297dd650caeb336d347f3 Mon Sep 17 00:00:00 2001 From: singjc Date: Mon, 19 Aug 2024 14:31:50 -0400 Subject: [PATCH 058/168] add: external file paths --- src/workflow/StreamlitUI.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/workflow/StreamlitUI.py b/src/workflow/StreamlitUI.py index 18c302a..f811101 100644 --- a/src/workflow/StreamlitUI.py +++ b/src/workflow/StreamlitUI.py @@ -172,6 +172,15 @@ def upload_widget( shutil.copytree(f, Path(files_dir, f.name), dirs_exist_ok=True) else: # Do we need to change the reference of Path(st.session_state.workspace, "mzML-files") to point to local dir? + # Create a temporary file to store the path to the local directories + external_files = Path(files_dir, "external_files.txt") + # Check if the file exists, if not create it + if not external_files.exists(): + external_files.touch() + # Write the path to the local directories to the file + with open(external_files, "a") as f_handle: + f_handle.write(f"{f}\n") + pass my_bar.empty() st.success("Successfully copied files!") From c51ea475dd829d2e56171c59608c0d1d0c6a60bd Mon Sep 17 00:00:00 2001 From: singjc Date: Mon, 19 Aug 2024 14:47:07 -0400 Subject: [PATCH 059/168] add: external local file paths to select_input ui --- src/workflow/StreamlitUI.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/workflow/StreamlitUI.py b/src/workflow/StreamlitUI.py index f811101..a45ec26 100644 --- a/src/workflow/StreamlitUI.py +++ b/src/workflow/StreamlitUI.py @@ -260,7 +260,15 @@ def select_input_file( if not path.exists(): st.warning(f"No **{name}** files!") return - options = [str(f) for f in path.iterdir()] + options = [str(f) for f in path.iterdir() if "external_files.txt" not in str(f)] + + # Check if local files are available + external_files = Path(self.workflow_dir, "input-files", key, "external_files.txt") + + if external_files.exists(): + with open(external_files, "r") as f: + external_files_list = f.read().splitlines() + options += external_files_list if (key in self.params.keys()) and isinstance(self.params[key], list): self.params[key] = [f for f in self.params[key] if f in options] From b139b29189df6dfdd592ad94133eb13344dc8d83 Mon Sep 17 00:00:00 2001 From: singjc Date: Mon, 19 Aug 2024 15:14:56 -0400 Subject: [PATCH 060/168] move: tk_dialog to commons --- src/common.py | 28 ++++++++++++++++++++++++++++ src/workflow/StreamlitUI.py | 32 +++----------------------------- 2 files changed, 31 insertions(+), 29 deletions(-) diff --git a/src/common.py b/src/common.py index 1d35a31..71f72aa 100644 --- a/src/common.py +++ b/src/common.py @@ -9,6 +9,12 @@ import streamlit as st import pandas as pd +try: + from tkinter import Tk, filedialog + TK_AVAILABLE = True +except ImportError: + TK_AVAILABLE = False + from .captcha_ import captcha_control # set these variables according to your project @@ -358,6 +364,27 @@ def reset_directory(path: Path) -> None: shutil.rmtree(path) path.mkdir(parents=True, exist_ok=True) +def tk_directory_dialog(title: str = "Select Directory", parent_dir: str = os.getcwd()): + """ + Creates a Tkinter directory dialog for selecting a directory. + + Args: + title (str): The title of the directory dialog. + parent_dir (str): The path to the parent directory of the directory dialog. + + Returns: + str: The path to the selected directory. + + Warning: + This function is not avaliable in a streamlit cloud context. + """ + root = Tk() + root.attributes("-topmost", True) + root.withdraw() + file_path = filedialog.askdirectory(title=title, initialdir=parent_dir) + root.destroy() + return file_path + # General warning/error messages WARNINGS = { @@ -369,3 +396,4 @@ def reset_directory(path: Path) -> None: "workflow": "Something went wrong during workflow execution.", "visualization": "Something went wrong during visualization of results.", } + diff --git a/src/workflow/StreamlitUI.py b/src/workflow/StreamlitUI.py index a45ec26..686bc6f 100644 --- a/src/workflow/StreamlitUI.py +++ b/src/workflow/StreamlitUI.py @@ -13,13 +13,8 @@ import zipfile from datetime import datetime -try: - from tkinter import Tk, filedialog - TK_AVAILABLE = True -except ImportError: - TK_AVAILABLE = False - -from ..common import OS_PLATFORM + +from ..common import OS_PLATFORM, TK_AVAILABLE, tk_directory_dialog class StreamlitUI: """ @@ -37,27 +32,6 @@ def __init__(self, workflow_dir, logger, executor, paramter_manager): self.parameter_manager = paramter_manager self.params = self.parameter_manager.get_parameters_from_json() - def tk_directory_dialog(self, title: str = "Select Directory", parent_dir: str = os.getcwd()): - """ - Creates a Tkinter directory dialog for selecting a directory. - - Args: - title (str): The title of the directory dialog. - parent_dir (str): The path to the parent directory of the directory dialog. - - Returns: - str: The path to the selected directory. - - Warning: - This function is not avaliable in a streamlit cloud context. - """ - root = Tk() - root.attributes("-topmost", True) - root.withdraw() - file_path = filedialog.askdirectory(title=title, initialdir=parent_dir) - root.destroy() - return file_path - def upload_widget( self, key: str, @@ -137,7 +111,7 @@ def upload_widget( st.write("\n") dialog_button = st.button("📁", key='local_browse', help="Browse for your local directory with MS data.", disabled=not TK_AVAILABLE) if dialog_button: - st.session_state["local_dir"] = self.tk_directory_dialog("Select directory with your MS data", st.session_state["previous_dir"]) + st.session_state["local_dir"] = tk_directory_dialog("Select directory with your MS data", st.session_state["previous_dir"]) st.session_state["previous_dir"] = st.session_state["local_dir"] with st_cols[1]: From 4b55f889d4a1cab6647ec9b75e990ced63b1b0dd Mon Sep 17 00:00:00 2001 From: singjc Date: Mon, 19 Aug 2024 15:16:04 -0400 Subject: [PATCH 061/168] lint: remove prior comment --- src/workflow/StreamlitUI.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/workflow/StreamlitUI.py b/src/workflow/StreamlitUI.py index 686bc6f..56ff6ae 100644 --- a/src/workflow/StreamlitUI.py +++ b/src/workflow/StreamlitUI.py @@ -145,7 +145,6 @@ def upload_widget( elif os.path.isdir(f): shutil.copytree(f, Path(files_dir, f.name), dirs_exist_ok=True) else: - # Do we need to change the reference of Path(st.session_state.workspace, "mzML-files") to point to local dir? # Create a temporary file to store the path to the local directories external_files = Path(files_dir, "external_files.txt") # Check if the file exists, if not create it From 35c7273c41f2ad92675a3d037e0891122e006abe Mon Sep 17 00:00:00 2001 From: singjc Date: Mon, 19 Aug 2024 15:19:16 -0400 Subject: [PATCH 062/168] minor --- src/workflow/StreamlitUI.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/workflow/StreamlitUI.py b/src/workflow/StreamlitUI.py index 56ff6ae..adf88e1 100644 --- a/src/workflow/StreamlitUI.py +++ b/src/workflow/StreamlitUI.py @@ -153,8 +153,6 @@ def upload_widget( # Write the path to the local directories to the file with open(external_files, "a") as f_handle: f_handle.write(f"{f}\n") - - pass my_bar.empty() st.success("Successfully copied files!") From 5f8aaeac85879af34164c66ad5cf34d773a35aed Mon Sep 17 00:00:00 2001 From: singjc Date: Mon, 19 Aug 2024 15:30:17 -0400 Subject: [PATCH 063/168] add: external file path for pyOpenMS workflow --- content/file_upload.py | 42 ++++++++++++++++++++++++++++++-------- content/raw_data_viewer.py | 14 ++++++++++++- src/fileupload.py | 16 +++++++++++++-- 3 files changed, 60 insertions(+), 12 deletions(-) diff --git a/content/file_upload.py b/content/file_upload.py index ec5892c..0fc0e04 100755 --- a/content/file_upload.py +++ b/content/file_upload.py @@ -3,7 +3,7 @@ import streamlit as st import pandas as pd -from src.common import page_setup, save_params, v_space, show_table +from src.common import page_setup, save_params, v_space, show_table, TK_AVAILABLE, tk_directory_dialog from src import fileupload params = page_setup() @@ -38,21 +38,45 @@ # Local file upload option: via directory path if st.session_state.location == "local": with tabs[2]: - # with st.form("local-file-upload"): - local_mzML_dir = st.text_input("path to folder with mzML files") + st_cols = st.columns([0.05, 0.95], gap="small") + with st_cols[0]: + st.write("\n") + st.write("\n") + dialog_button = st.button("📁", key='local_browse', help="Browse for your local directory with MS data.", disabled=not TK_AVAILABLE) + if dialog_button: + st.session_state["local_dir"] = tk_directory_dialog("Select directory with your MS data", st.session_state["previous_dir"]) + st.session_state["previous_dir"] = st.session_state["local_dir"] + with st_cols[1]: + # with st.form("local-file-upload"): + local_mzML_dir = st.text_input("path to folder with mzML files", value=st.session_state["local_dir"]) # raw string for file paths local_mzML_dir = rf"{local_mzML_dir}" - cols = st.columns(3) - if cols[1].button( - "Copy files to workspace", type="primary", disabled=(local_mzML_dir == "") - ): - fileupload.copy_local_mzML_files_from_directory(local_mzML_dir) + cols = st.columns([0.65, 0.3, 0.4, 0.25], gap="small") + copy_button = cols[1].button("Copy files to workspace", type="primary", disabled=(local_mzML_dir == "")) + use_copy = cols[2].checkbox("Make a copy of files", key="local_browse-copy_files", value=True, help="Create a copy of files in workspace.") + if not use_copy: + st.warning( + "**Warning**: You have deselected the `Make a copy of files` option. " + "This **_assumes you know what you are doing_**. " + "This means that the original files will be used instead. " + ) + if copy_button: + fileupload.copy_local_mzML_files_from_directory(local_mzML_dir, use_copy) mzML_dir = Path(st.session_state.workspace, "mzML-files") if any(Path(mzML_dir).iterdir()): v_space(2) # Display all mzML files currently in workspace - df = pd.DataFrame({"file name": [f.name for f in Path(mzML_dir).iterdir()]}) + df = pd.DataFrame({"file name": [f.name for f in Path(mzML_dir).iterdir() if "external_files.txt" not in f.name]}) + + # Check if local files are available + external_files = Path(mzML_dir, "external_files.txt") + if external_files.exists(): + with open(external_files, "r") as f_handle: + external_files = f_handle.readlines() + external_files = [f.strip() for f in external_files] + df = pd.concat([df, pd.DataFrame({"file name": external_files})], ignore_index=True) + st.markdown("##### mzML files in current workspace:") show_table(df) v_space(1) diff --git a/content/raw_data_viewer.py b/content/raw_data_viewer.py index fad276d..4a001d4 100755 --- a/content/raw_data_viewer.py +++ b/content/raw_data_viewer.py @@ -12,9 +12,21 @@ # File selection can not be in fragment since it influences the subsequent sections cols = st.columns(3) + +mzML_dir = Path(st.session_state.workspace, "mzML-files") +file_options = [f.name for f in mzML_dir.iterdir() if "external_files.txt" not in f.name] + +# Check if local files are available +external_files = Path(mzML_dir, "external_files.txt") +if external_files.exists(): + with open(external_files, "r") as f_handle: + external_files = f_handle.readlines() + external_files = [f.strip() for f in external_files] + file_options += external_files + selected_file = cols[0].selectbox( "choose file", - [f.name for f in Path(st.session_state.workspace, "mzML-files").iterdir()], + file_options, key="view_selected_file" ) if selected_file: diff --git a/src/fileupload.py b/src/fileupload.py index cbf5248..719fe4f 100644 --- a/src/fileupload.py +++ b/src/fileupload.py @@ -35,12 +35,13 @@ def save_uploaded_mzML(uploaded_files: list[bytes]) -> None: st.success("Successfully added uploaded files!") -def copy_local_mzML_files_from_directory(local_mzML_directory: str) -> None: +def copy_local_mzML_files_from_directory(local_mzML_directory: str, make_copy: bool=True) -> None: """ Copies local mzML files from a specified directory to the mzML directory. Args: local_mzML_directory (str): Path to the directory containing the mzML files. + make_copy (bool): Whether to make a copy of the files in the workspace. Default is True. If False, local file paths will be written to an external_files.txt file. Returns: None @@ -53,7 +54,18 @@ def copy_local_mzML_files_from_directory(local_mzML_directory: str) -> None: # Copy all mzML files to workspace mzML directory, add to selected files files = Path(local_mzML_directory).glob("*.mzML") for f in files: - shutil.copy(f, Path(mzML_dir, f.name)) + if make_copy: + shutil.copy(f, Path(mzML_dir, f.name)) + else: + # Create a temporary file to store the path to the local directories + external_files = Path(mzML_dir, "external_files.txt") + # Check if the file exists, if not create it + if not external_files.exists(): + external_files.touch() + # Write the path to the local directories to the file + with open(external_files, "a") as f_handle: + f_handle.write(f"{f}\n") + st.success("Successfully added local files!") From aca46c8485cf0393ac51c6244bd2294fc741b57a Mon Sep 17 00:00:00 2001 From: singjc Date: Mon, 19 Aug 2024 23:32:05 -0400 Subject: [PATCH 064/168] add: external temp local file paths for example wf --- content/run_example_workflow.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/content/run_example_workflow.py b/content/run_example_workflow.py index 4e72230..3b2f4c7 100755 --- a/content/run_example_workflow.py +++ b/content/run_example_workflow.py @@ -20,9 +20,20 @@ with st.form("workflow-with-mzML-form"): st.markdown("**Parameters**") + + file_options = [f.stem for f in Path(st.session_state.workspace, "mzML-files").glob("*.mzML") if "external_files.txt" not in f.name] + + # Check if local files are available + external_files = Path(Path(st.session_state.workspace, "mzML-files"), "external_files.txt") + if external_files.exists(): + with open(external_files, "r") as f_handle: + external_files = f_handle.readlines() + external_files = [str(Path(f.strip()).with_suffix('')) for f in external_files] + file_options += external_files + st.multiselect( "**input mzML files**", - [f.stem for f in Path(st.session_state.workspace, "mzML-files").glob("*.mzML")], + file_options, params["example-workflow-selected-mzML-files"], key="example-workflow-selected-mzML-files", ) From 0a8bc3b032dac801b950d15f51e759876dcb3736 Mon Sep 17 00:00:00 2001 From: singjc Date: Tue, 20 Aug 2024 13:09:46 -0400 Subject: [PATCH 065/168] add: dataframe pagenation render --- src/common.py | 111 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/view.py | 33 +++++++-------- 2 files changed, 128 insertions(+), 16 deletions(-) diff --git a/src/common.py b/src/common.py index 7bb4ba6..b450acc 100644 --- a/src/common.py +++ b/src/common.py @@ -9,12 +9,21 @@ import streamlit as st import pandas as pd +try: + from tkinter import Tk, filedialog + TK_AVAILABLE = True +except ImportError: + TK_AVAILABLE = False + from .captcha_ import captcha_control # set these variables according to your project APP_NAME = "OpenMS Streamlit App" REPOSITORY_NAME = "streamlit-template" +# Detect system platform +OS_PLATFORM = sys.platform + def load_params(default: bool = False) -> dict[str, Any]: """ @@ -111,6 +120,8 @@ def page_setup(page: str = "") -> dict[str, Any]: # Check location if "local" in sys.argv: st.session_state.location = "local" + st.session_state["previous_dir"] = os.getcwd() + st.session_state["local_dir"] = "" else: st.session_state.location = "online" # if we run the packaged windows version, we start within the Python directory -> need to change working directory to ..\streamlit-template @@ -251,6 +262,68 @@ def v_space(n: int, col=None) -> None: else: st.write("#") +def display_large_dataframe(df, + chunk_sizes: list[int] = [100, 1_000, 10_000]): + """ + Displays a large DataFrame in chunks with pagination controls and row selection. + + Args: + df: The DataFrame to display. + chunk_sizes: A list of chunk sizes to choose from. + + Returns: + Selected rows from the current chunk. + """ + # Dropdown for selecting chunk size + chunk_size = st.selectbox("Select Number of Rows to Display", chunk_sizes) + + # Calculate total number of chunks + total_chunks = (len(df) + chunk_size - 1) // chunk_size + + # Initialize session state for pagination + if 'current_chunk' not in st.session_state: + st.session_state.current_chunk = 0 + + # Function to get the current chunk of the DataFrame + def get_current_chunk(df, chunk_size, chunk_index): + start = chunk_index * chunk_size + end = min(start + chunk_size, len(df)) # Ensure end does not exceed dataframe length + return df.iloc[start:end], start, end + + # Display the current chunk + current_chunk_df, start_row, end_row = get_current_chunk(df, chunk_size, st.session_state.current_chunk) + + event = st.dataframe( + current_chunk_df, + column_order=[ + "spectrum ID", + "RT", + "MS level", + "max intensity m/z", + "precursor m/z", + ], + selection_mode="single-row", + on_select="rerun", + use_container_width=True, + hide_index=True, + ) + + st.write(f"Showing rows {start_row + 1} to {end_row} of {len(df)} ({get_dataframe_mem_useage(current_chunk_df):.2f} MB)") + + # Pagination buttons + col1, col2, col3 = st.columns([1, 2, 1]) + + with col1: + if st.button("Previous") and st.session_state.current_chunk > 0: + st.session_state.current_chunk -= 1 + + with col3: + if st.button("Next") and st.session_state.current_chunk < total_chunks - 1: + st.session_state.current_chunk += 1 + + if event is not None: + return event + return None def show_table(df: pd.DataFrame, download_name: str = "") -> None: """ @@ -353,6 +426,43 @@ def reset_directory(path: Path) -> None: shutil.rmtree(path) path.mkdir(parents=True, exist_ok=True) +def tk_directory_dialog(title: str = "Select Directory", parent_dir: str = os.getcwd()): + """ + Creates a Tkinter directory dialog for selecting a directory. + + Args: + title (str): The title of the directory dialog. + parent_dir (str): The path to the parent directory of the directory dialog. + + Returns: + str: The path to the selected directory. + + Warning: + This function is not avaliable in a streamlit cloud context. + """ + root = Tk() + root.attributes("-topmost", True) + root.withdraw() + file_path = filedialog.askdirectory(title=title, initialdir=parent_dir) + root.destroy() + return file_path + +def get_dataframe_mem_useage(df): + """ + Get the memory usage of a pandas DataFrame in megabytes. + + Args: + df (pd.DataFrame): The DataFrame to calculate the memory usage for. + + Returns: + float: The memory usage of the DataFrame in megabytes. + """ + # Calculate the memory usage of the DataFrame in bytes + memory_usage_bytes = df.memory_usage(deep=True).sum() + # Convert bytes to megabytes + memory_usage_mb = memory_usage_bytes / (1024 ** 2) + return memory_usage_mb + # General warning/error messages WARNINGS = { @@ -364,3 +474,4 @@ def reset_directory(path: Path) -> None: "workflow": "Something went wrong during workflow execution.", "visualization": "Something went wrong during visualization of results.", } + diff --git a/src/view.py b/src/view.py index 48bb4a2..282070a 100644 --- a/src/view.py +++ b/src/view.py @@ -6,7 +6,7 @@ import streamlit as st import pyopenms as poms from .plotting.MSExperimentPlotter import plotMSExperiment -from .common import show_fig +from .common import show_fig, display_large_dataframe from typing import Union @@ -216,27 +216,28 @@ def view_peak_map(): peak_map_3D = plotMSExperiment(df, plot3D=True, title="") st.pyplot(peak_map_3D, use_container_width=True) - @st.experimental_fragment def view_spectrum(): cols = st.columns([0.34, 0.66]) with cols[0]: df = st.session_state.view_spectra.copy() df["spectrum ID"] = df.index + 1 - event = st.dataframe( - df, - column_order=[ - "spectrum ID", - "RT", - "MS level", - "max intensity m/z", - "precursor m/z", - ], - selection_mode="single-row", - on_select="rerun", - use_container_width=True, - hide_index=True, - ) + + # event = st.dataframe( + # df, + # column_order=[ + # "spectrum ID", + # "RT", + # "MS level", + # "max intensity m/z", + # "precursor m/z", + # ], + # selection_mode="single-row", + # on_select="rerun", + # use_container_width=True, + # hide_index=True, + # ) + event = display_large_dataframe(df) rows = event.selection.rows with cols[1]: if rows: From f3dad89dd6ce4ac4ca9a68598cdc451928960518 Mon Sep 17 00:00:00 2001 From: singjc Date: Tue, 20 Aug 2024 13:11:53 -0400 Subject: [PATCH 066/168] remove: old st.dataframe call --- src/view.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/view.py b/src/view.py index 282070a..e5c9963 100644 --- a/src/view.py +++ b/src/view.py @@ -222,21 +222,6 @@ def view_spectrum(): with cols[0]: df = st.session_state.view_spectra.copy() df["spectrum ID"] = df.index + 1 - - # event = st.dataframe( - # df, - # column_order=[ - # "spectrum ID", - # "RT", - # "MS level", - # "max intensity m/z", - # "precursor m/z", - # ], - # selection_mode="single-row", - # on_select="rerun", - # use_container_width=True, - # hide_index=True, - # ) event = display_large_dataframe(df) rows = event.selection.rows with cols[1]: From ba99afc4bfe19783765352854e483720ccc2685d Mon Sep 17 00:00:00 2001 From: singjc Date: Tue, 20 Aug 2024 13:14:41 -0400 Subject: [PATCH 067/168] remove: edits from tk_dialog PR --- src/common.py | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/src/common.py b/src/common.py index b450acc..b20dd47 100644 --- a/src/common.py +++ b/src/common.py @@ -9,21 +9,12 @@ import streamlit as st import pandas as pd -try: - from tkinter import Tk, filedialog - TK_AVAILABLE = True -except ImportError: - TK_AVAILABLE = False - from .captcha_ import captcha_control # set these variables according to your project APP_NAME = "OpenMS Streamlit App" REPOSITORY_NAME = "streamlit-template" -# Detect system platform -OS_PLATFORM = sys.platform - def load_params(default: bool = False) -> dict[str, Any]: """ @@ -120,8 +111,6 @@ def page_setup(page: str = "") -> dict[str, Any]: # Check location if "local" in sys.argv: st.session_state.location = "local" - st.session_state["previous_dir"] = os.getcwd() - st.session_state["local_dir"] = "" else: st.session_state.location = "online" # if we run the packaged windows version, we start within the Python directory -> need to change working directory to ..\streamlit-template @@ -426,27 +415,6 @@ def reset_directory(path: Path) -> None: shutil.rmtree(path) path.mkdir(parents=True, exist_ok=True) -def tk_directory_dialog(title: str = "Select Directory", parent_dir: str = os.getcwd()): - """ - Creates a Tkinter directory dialog for selecting a directory. - - Args: - title (str): The title of the directory dialog. - parent_dir (str): The path to the parent directory of the directory dialog. - - Returns: - str: The path to the selected directory. - - Warning: - This function is not avaliable in a streamlit cloud context. - """ - root = Tk() - root.attributes("-topmost", True) - root.withdraw() - file_path = filedialog.askdirectory(title=title, initialdir=parent_dir) - root.destroy() - return file_path - def get_dataframe_mem_useage(df): """ Get the memory usage of a pandas DataFrame in megabytes. @@ -474,4 +442,3 @@ def get_dataframe_mem_useage(df): "workflow": "Something went wrong during workflow execution.", "visualization": "Something went wrong during visualization of results.", } - From 6b404f537d113b83d59a37372f110cb456ac319c Mon Sep 17 00:00:00 2001 From: Justin Sing <32938975+singjc@users.noreply.github.com> Date: Thu, 22 Aug 2024 11:54:19 -0400 Subject: [PATCH 068/168] Update src/workflow/StreamlitUI.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Tom David Müller <57191390+t0mdavid-m@users.noreply.github.com> --- src/workflow/StreamlitUI.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/workflow/StreamlitUI.py b/src/workflow/StreamlitUI.py index adf88e1..c3e7105 100644 --- a/src/workflow/StreamlitUI.py +++ b/src/workflow/StreamlitUI.py @@ -239,7 +239,8 @@ def select_input_file( if external_files.exists(): with open(external_files, "r") as f: external_files_list = f.read().splitlines() - options += external_files_list + # Only make files available that still exist + options += [f for f in external_files_list if os.path.exists(f)] if (key in self.params.keys()) and isinstance(self.params[key], list): self.params[key] = [f for f in self.params[key] if f in options] From 094ce1b4e4f46e483406b26b701fa15f23ac53a0 Mon Sep 17 00:00:00 2001 From: singjc Date: Thu, 22 Aug 2024 12:02:32 -0400 Subject: [PATCH 069/168] rename: Copy MS data ... to Add MS data --- src/workflow/StreamlitUI.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/workflow/StreamlitUI.py b/src/workflow/StreamlitUI.py index c3e7105..e295933 100644 --- a/src/workflow/StreamlitUI.py +++ b/src/workflow/StreamlitUI.py @@ -102,7 +102,7 @@ def upload_widget( # Local file upload option: via directory path if st.session_state.location == "local": c2_text, c2_checkbox = c2.columns([1.5, 1], gap="large") - c2_text.markdown("**OR copy files from local folder**") + c2_text.markdown("**OR add files from local folder**") use_copy = c2_checkbox.checkbox("Make a copy of files", key=f"{key}-copy_files", value=True, help="Create a copy of files in workspace.") with c2.container(border=True): st_cols = st.columns([0.05, 0.55], gap="small") @@ -117,7 +117,7 @@ def upload_widget( with st_cols[1]: local_dir = st.text_input(f"path to folder with **{name}** files", value=st.session_state["local_dir"]) - if c2.button(f"Copy **{name}** files from local folder", use_container_width=True): + if c2.button(f"Add **{name}** files from local folder", use_container_width=True): files = [] local_dir = Path( local_dir From 164045510a7805ebab78777a0a719f6eab8fe550 Mon Sep 17 00:00:00 2001 From: singjc Date: Thu, 22 Aug 2024 12:14:10 -0400 Subject: [PATCH 070/168] add: include external files to ms data list message --- src/workflow/StreamlitUI.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/workflow/StreamlitUI.py b/src/workflow/StreamlitUI.py index e295933..03cce3c 100644 --- a/src/workflow/StreamlitUI.py +++ b/src/workflow/StreamlitUI.py @@ -183,7 +183,16 @@ def upload_widget( ] else: if files_dir.exists(): - current_files = [f.name for f in files_dir.iterdir()] + current_files = [f.name for f in files_dir.iterdir() if "external_files.txt" not in f.name] + + # Check if local files are available + external_files = Path(self.workflow_dir, "input-files", key, "external_files.txt") + + if external_files.exists(): + with open(external_files, "r") as f: + external_files_list = f.read().splitlines() + # Only make files available that still exist + current_files += [f"(local) {Path(f).name}" for f in external_files_list if os.path.exists(f)] else: current_files = [] From 7855c9c26c6b1e8b66b4b2231dd8705ef7416c1a Mon Sep 17 00:00:00 2001 From: singjc Date: Thu, 22 Aug 2024 13:15:46 -0400 Subject: [PATCH 071/168] add: tk file dialog selector --- src/common.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/common.py b/src/common.py index 71f72aa..58ccb43 100644 --- a/src/common.py +++ b/src/common.py @@ -385,6 +385,31 @@ def tk_directory_dialog(title: str = "Select Directory", parent_dir: str = os.ge root.destroy() return file_path +def tk_file_dialog(title: str = "Select File", file_types: list[tuple] = [], parent_dir: str = os.getcwd(), multiple:bool = True): + """ + Creates a Tkinter file dialog for selecting a file. + + Args: + title (str): The title of the file dialog. + file_types (list(tuple)): The file types to filter the file dialog. + parent_dir (str): The path to the parent directory of the file dialog. + multiple (bool): If True, multiple files can be selected. + + Returns: + str: The path to the selected file. + + Warning: + This function is not avaliable in a streamlit cloud context. + """ + root = Tk() + root.attributes("-topmost", True) + root.withdraw() + file_types.extend([("All files", "*.*")]) + file_path = filedialog.askopenfilename( + title=title, filetypes=file_types, initialdir=parent_dir, multiple=True + ) + root.destroy() + return file_path # General warning/error messages WARNINGS = { From 9ba8e1fe35e86dfb7fbcf8d54bb75bd425effe79 Mon Sep 17 00:00:00 2001 From: singjc Date: Thu, 22 Aug 2024 13:16:15 -0400 Subject: [PATCH 072/168] add: single file big button if not using copies in local --- src/workflow/StreamlitUI.py | 133 +++++++++++++++++++++++------------- 1 file changed, 87 insertions(+), 46 deletions(-) diff --git a/src/workflow/StreamlitUI.py b/src/workflow/StreamlitUI.py index 03cce3c..8d7b64c 100644 --- a/src/workflow/StreamlitUI.py +++ b/src/workflow/StreamlitUI.py @@ -14,7 +14,7 @@ from datetime import datetime -from ..common import OS_PLATFORM, TK_AVAILABLE, tk_directory_dialog +from ..common import OS_PLATFORM, TK_AVAILABLE, tk_directory_dialog, tk_file_dialog class StreamlitUI: """ @@ -67,43 +67,89 @@ def upload_widget( c1, c2 = st.columns(2) c1.markdown("**Upload file(s)**") - with c1.form(f"{key}-upload", clear_on_submit=True): - # Convert file_types to a list if it's a string - if isinstance(file_types, str): - file_types = [file_types] - - # Streamlit file uploader accepts file types as a list or None - file_type_for_uploader = file_types if file_types else None - - files = st.file_uploader( - f"{name}", - accept_multiple_files=(st.session_state.location == "local"), - type=file_type_for_uploader, - label_visibility="collapsed", - ) - if st.form_submit_button( - f"Add **{name}**", use_container_width=True, type="primary" - ): - if files: - # in case of online mode a single file is returned -> put in list - if not isinstance(files, list): - files = [files] - for f in files: - # Check if file type is in the list of accepted file types - if f.name not in [f.name for f in files_dir.iterdir()] and any( - f.name.endswith(ft) for ft in file_types - ): - with open(Path(files_dir, f.name), "wb") as fh: - fh.write(f.getbuffer()) - st.success("Successfully added uploaded files!") - else: - st.error("Nothing to add, please upload file.") - # Local file upload option: via directory path if st.session_state.location == "local": c2_text, c2_checkbox = c2.columns([1.5, 1], gap="large") c2_text.markdown("**OR add files from local folder**") use_copy = c2_checkbox.checkbox("Make a copy of files", key=f"{key}-copy_files", value=True, help="Create a copy of files in workspace.") + else: + use_copy = True + + if use_copy: + with c1.form(f"{key}-upload", clear_on_submit=True): + # Convert file_types to a list if it's a string + if isinstance(file_types, str): + file_types = [file_types] + # Streamlit file uploader accepts file types as a list or None + file_type_for_uploader = file_types if file_types else None + + files = st.file_uploader( + f"{name}", + accept_multiple_files=(st.session_state.location == "local"), + type=file_type_for_uploader, + label_visibility="collapsed", + ) + if st.form_submit_button( + f"Add **{name}**", use_container_width=True, type="primary" + ): + if files: + # in case of online mode a single file is returned -> put in list + if not isinstance(files, list): + files = [files] + for f in files: + # Check if file type is in the list of accepted file types + if f.name not in [f.name for f in files_dir.iterdir()] and any( + f.name.endswith(ft) for ft in file_types + ): + with open(Path(files_dir, f.name), "wb") as fh: + fh.write(f.getbuffer()) + st.success("Successfully added uploaded files!") + else: + st.error("Nothing to add, please upload file.") + else: + # Create a temporary file to store the path to the local directories + external_files = Path(files_dir, "external_files.txt") + # Check if the file exists, if not create it + if not external_files.exists(): + external_files.touch() + c1.write("\n") + with c1.container(border=True): + dialog_button = st.button( + rf"$\textsf{{\Large 📁 Add }} \textsf{{ \Large \textbf{{{name}}} }}$", + type="primary", + use_container_width=True, + key="local_browse_single", + help="Browse for your local directory with MS data.", + disabled=not TK_AVAILABLE, + ) + + # Tk file dialog requires file types to be a list of tuples + if isinstance(file_types, list): + file_types = [(f"{ft}", f"*.{ft}") for ft in file_types] + if isinstance(file_types, str): + file_types = [(f"{file_types}", f"*.{file_types}")] + + if dialog_button: + local_files = tk_file_dialog( + "Select directory with your MS data", + file_types, + st.session_state["previous_dir"], + ) + st.write(local_files) + my_bar = st.progress(0) + for i, f in enumerate(local_files): + with open(external_files, "a") as f_handle: + f_handle.write(f"{f}\n") + my_bar.empty() + st.success("Successfully copied files!") + + st.session_state["previous_dir"] = Path(local_files[0]).parent + + # Local file upload option: via directory path + if st.session_state.location == "local": + # c2_text, c2_checkbox = c2.columns([1.5, 1], gap="large") + # c2_text.markdown("**OR add files from local folder**") + # use_copy = c2_checkbox.checkbox("Make a copy of files", key=f"{key}-copy_files", value=True, help="Create a copy of files in workspace.") with c2.container(border=True): st_cols = st.columns([0.05, 0.55], gap="small") with st_cols[0]: @@ -116,7 +162,7 @@ def upload_widget( with st_cols[1]: local_dir = st.text_input(f"path to folder with **{name}** files", value=st.session_state["local_dir"]) - + if c2.button(f"Add **{name}** files from local folder", use_container_width=True): files = [] local_dir = Path( @@ -145,17 +191,12 @@ def upload_widget( elif os.path.isdir(f): shutil.copytree(f, Path(files_dir, f.name), dirs_exist_ok=True) else: - # Create a temporary file to store the path to the local directories - external_files = Path(files_dir, "external_files.txt") - # Check if the file exists, if not create it - if not external_files.exists(): - external_files.touch() # Write the path to the local directories to the file with open(external_files, "a") as f_handle: f_handle.write(f"{f}\n") my_bar.empty() st.success("Successfully copied files!") - + if not TK_AVAILABLE: c2.warning("**Warning**: Failed to import tkinter, either it is not installed, or this is being called from a cloud context. " "This function is not available in a Streamlit Cloud context. " "You will have to manually enter the path to the folder with the MS files." @@ -167,7 +208,7 @@ def upload_widget( "This **_assumes you know what you are doing_**. " "This means that the original files will be used instead. " ) - + if fallback and not any(Path(files_dir).iterdir()): if isinstance(fallback, str): fallback = [fallback] @@ -184,10 +225,10 @@ def upload_widget( else: if files_dir.exists(): current_files = [f.name for f in files_dir.iterdir() if "external_files.txt" not in f.name] - + # Check if local files are available external_files = Path(self.workflow_dir, "input-files", key, "external_files.txt") - + if external_files.exists(): with open(external_files, "r") as f: external_files_list = f.read().splitlines() @@ -216,7 +257,7 @@ def upload_widget( st.rerun() elif not fallback: st.warning(f"No **{name}** files!") - + def select_input_file( self, key: str, @@ -241,10 +282,10 @@ def select_input_file( st.warning(f"No **{name}** files!") return options = [str(f) for f in path.iterdir() if "external_files.txt" not in str(f)] - + # Check if local files are available external_files = Path(self.workflow_dir, "input-files", key, "external_files.txt") - + if external_files.exists(): with open(external_files, "r") as f: external_files_list = f.read().splitlines() From 666fe4dbcc2eff8d319e195b37ec053f945d6902 Mon Sep 17 00:00:00 2001 From: singjc Date: Thu, 22 Aug 2024 13:19:45 -0400 Subject: [PATCH 073/168] change: file dialog title --- src/workflow/StreamlitUI.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/workflow/StreamlitUI.py b/src/workflow/StreamlitUI.py index 8d7b64c..873f9b8 100644 --- a/src/workflow/StreamlitUI.py +++ b/src/workflow/StreamlitUI.py @@ -119,7 +119,7 @@ def upload_widget( type="primary", use_container_width=True, key="local_browse_single", - help="Browse for your local directory with MS data.", + help="Browse for your local MS data files.", disabled=not TK_AVAILABLE, ) From 1c56cc6bf3ebdb4ff9dc87261772b7952c374a8d Mon Sep 17 00:00:00 2001 From: singjc Date: Thu, 22 Aug 2024 13:20:57 -0400 Subject: [PATCH 074/168] add: case control if user exits filedialog without selection --- src/workflow/StreamlitUI.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/workflow/StreamlitUI.py b/src/workflow/StreamlitUI.py index 873f9b8..6e15740 100644 --- a/src/workflow/StreamlitUI.py +++ b/src/workflow/StreamlitUI.py @@ -135,15 +135,15 @@ def upload_widget( file_types, st.session_state["previous_dir"], ) - st.write(local_files) - my_bar = st.progress(0) - for i, f in enumerate(local_files): - with open(external_files, "a") as f_handle: - f_handle.write(f"{f}\n") - my_bar.empty() - st.success("Successfully copied files!") - - st.session_state["previous_dir"] = Path(local_files[0]).parent + if local_files: + my_bar = st.progress(0) + for i, f in enumerate(local_files): + with open(external_files, "a") as f_handle: + f_handle.write(f"{f}\n") + my_bar.empty() + st.success("Successfully copied files!") + + st.session_state["previous_dir"] = Path(local_files[0]).parent # Local file upload option: via directory path if st.session_state.location == "local": From 17ccb5594b17ace96a7d1109d1635e1b74617674 Mon Sep 17 00:00:00 2001 From: singjc Date: Thu, 22 Aug 2024 13:28:13 -0400 Subject: [PATCH 075/168] fix: minor bug --- src/workflow/StreamlitUI.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/workflow/StreamlitUI.py b/src/workflow/StreamlitUI.py index 6e15740..6005ddf 100644 --- a/src/workflow/StreamlitUI.py +++ b/src/workflow/StreamlitUI.py @@ -75,11 +75,12 @@ def upload_widget( else: use_copy = True + # Convert file_types to a list if it's a string + if isinstance(file_types, str): + file_types = [file_types] + if use_copy: with c1.form(f"{key}-upload", clear_on_submit=True): - # Convert file_types to a list if it's a string - if isinstance(file_types, str): - file_types = [file_types] # Streamlit file uploader accepts file types as a list or None file_type_for_uploader = file_types if file_types else None @@ -125,14 +126,14 @@ def upload_widget( # Tk file dialog requires file types to be a list of tuples if isinstance(file_types, list): - file_types = [(f"{ft}", f"*.{ft}") for ft in file_types] + tk_file_types = [(f"{ft}", f"*.{ft}") for ft in file_types] if isinstance(file_types, str): - file_types = [(f"{file_types}", f"*.{file_types}")] + tk_file_types = [(f"{file_types}", f"*.{file_types}")] if dialog_button: local_files = tk_file_dialog( "Select directory with your MS data", - file_types, + tk_file_types, st.session_state["previous_dir"], ) if local_files: From 39d04b707f238d3da569dfce44b9c4b47dd21694 Mon Sep 17 00:00:00 2001 From: singjc Date: Thu, 22 Aug 2024 13:30:38 -0400 Subject: [PATCH 076/168] change: file dialog title --- src/workflow/StreamlitUI.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/workflow/StreamlitUI.py b/src/workflow/StreamlitUI.py index 6005ddf..b7de96a 100644 --- a/src/workflow/StreamlitUI.py +++ b/src/workflow/StreamlitUI.py @@ -132,7 +132,7 @@ def upload_widget( if dialog_button: local_files = tk_file_dialog( - "Select directory with your MS data", + "Select your local MS data files", tk_file_types, st.session_state["previous_dir"], ) From a407416e0113737373604fd4cadd296dd3bc6f54 Mon Sep 17 00:00:00 2001 From: singjc Date: Fri, 23 Aug 2024 00:55:40 -0400 Subject: [PATCH 077/168] refactor: plotting to use pyopenms_viz --- src/view.py | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/src/view.py b/src/view.py index 48bb4a2..6f068ab 100644 --- a/src/view.py +++ b/src/view.py @@ -121,7 +121,7 @@ def plot_bpc_tic() -> go.Figure: @st.cache_resource -def plot_ms_spectrum(spec, title, color): +def plot_ms_spectrum_old(spec, title, color): """ Takes a pandas Series (spec) and generates a needle plot with m/z and intensity dimension. @@ -186,6 +186,13 @@ def create_spectra(x, y, zero=0): ) return fig +@st.cache_resource +def plot_ms_spectrum(df, title): + fig = df.plot(kind="spectrum", backend="ms_plotly", x="mz", y="intensity", line_color="#2d3a9d", title=title, show_plot=False, grid = False) + fig = fig.fig + fig.update_layout(template="plotly_white", dragmode="select", plot_bgcolor="rgb(255,255,255)") + return fig + @st.experimental_fragment def view_peak_map(): @@ -198,9 +205,19 @@ def view_peak_map(): df = df[df["mz"] > box[0]["y"][1]] df = df[df["mz"] < box[0]["y"][0]] df = df[df["RT"] < box[0]["x"][1]] - peak_map = plotMSExperiment( - df, plot3D=False, title=st.session_state.view_selected_file + peak_map = df.plot( + kind="peakmap", + x="RT", + y="mz", + z="inty", + title=st.session_state.view_selected_file, + grid=False, + show_plot=False, + bin_peaks=True, + backend="ms_plotly", ) + peak_map.fig.update_layout(template="simple_white", dragmode="select") + peak_map = peak_map.fig c1, c2 = st.columns(2) with c1: st.info( @@ -253,7 +270,21 @@ def view_spectrum(): title = f"{st.session_state.view_selected_file} spec={rows[0]+1} mslevel={df['MS level']}" if df["precursor m/z"] > 0: title += f" precursor m/z: {round(df['precursor m/z'], 4)}" - fig = plot_ms_spectrum(df, title, "#2d3a9d") + + df_selected = pd.DataFrame( + { + "mz": df["mzarray"], + "intensity": df["intarray"], + } + ) + df_selected['RT'] = df['RT'] + df_selected['MS level'] = df['MS level'] + df_selected['precursor m/z'] = df['precursor m/z'] + df_selected['max intensity m/z'] = df['max intensity m/z'] + + # fig = plot_ms_spectrum(df, title, "#2d3a9d") + fig = plot_ms_spectrum(df_selected, title) + show_fig(fig, title.replace(" ", "_"), True, "view_spectrum_selection") else: st.session_state.pop("view_spectrum_selection") From e834c507bd1fe5cc1dbe6878e032d6dcef5922f7 Mon Sep 17 00:00:00 2001 From: singjc Date: Fri, 23 Aug 2024 01:42:42 -0400 Subject: [PATCH 078/168] add: global settings for spectrum peak binning --- src/common.py | 6 ++++++ src/view.py | 20 +++++++++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/common.py b/src/common.py index 7bb4ba6..0f188c2 100644 --- a/src/common.py +++ b/src/common.py @@ -231,6 +231,12 @@ def change_workspace(): img_formats.index(params["image-format"]), key="image-format", ) + st.markdown("## Spectrum Plotting") + st.selectbox("Bin Peaks", ["auto", True, False], key="spectrum_bin_peaks") + if st.session_state["spectrum_bin_peaks"] == True: + st.number_input("Number of Bins (m/z)", 1, 10000, 50, key="spectrum_num_bins") + else: + st.session_state["spectrum_num_bins"] = 50 return params diff --git a/src/view.py b/src/view.py index 6f068ab..6ddabb1 100644 --- a/src/view.py +++ b/src/view.py @@ -186,13 +186,27 @@ def create_spectra(x, y, zero=0): ) return fig + @st.cache_resource def plot_ms_spectrum(df, title): - fig = df.plot(kind="spectrum", backend="ms_plotly", x="mz", y="intensity", line_color="#2d3a9d", title=title, show_plot=False, grid = False) + fig = df.plot( + kind="spectrum", + backend="ms_plotly", + x="mz", + y="intensity", + line_color="#2d3a9d", + title=title, + show_plot=False, + grid=False, + bin_peaks=st.session_state.spectrum_bin_peaks, + num_x_bins=st.session_state.spectrum_num_bins, + ) fig = fig.fig - fig.update_layout(template="plotly_white", dragmode="select", plot_bgcolor="rgb(255,255,255)") + fig.update_layout( + template="plotly_white", dragmode="select", plot_bgcolor="rgb(255,255,255)" + ) return fig - + @st.experimental_fragment def view_peak_map(): From 80219b6cde73cb1b08929cb9d02d2cc8b661dc95 Mon Sep 17 00:00:00 2001 From: singjc Date: Fri, 23 Aug 2024 13:36:10 -0400 Subject: [PATCH 079/168] update: cached spectrum plot method move bin_peaks and num_bins to method param input to allow for updating of plot when vars change --- src/view.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/view.py b/src/view.py index 6ddabb1..9e8ce62 100644 --- a/src/view.py +++ b/src/view.py @@ -188,7 +188,7 @@ def create_spectra(x, y, zero=0): @st.cache_resource -def plot_ms_spectrum(df, title): +def plot_ms_spectrum(df, title, bin_peaks, num_x_bins): fig = df.plot( kind="spectrum", backend="ms_plotly", @@ -198,8 +198,8 @@ def plot_ms_spectrum(df, title): title=title, show_plot=False, grid=False, - bin_peaks=st.session_state.spectrum_bin_peaks, - num_x_bins=st.session_state.spectrum_num_bins, + bin_peaks=bin_peaks, + num_x_bins=num_x_bins, ) fig = fig.fig fig.update_layout( @@ -297,7 +297,7 @@ def view_spectrum(): df_selected['max intensity m/z'] = df['max intensity m/z'] # fig = plot_ms_spectrum(df, title, "#2d3a9d") - fig = plot_ms_spectrum(df_selected, title) + fig = plot_ms_spectrum(df_selected, title, st.session_state.spectrum_bin_peaks, st.session_state.spectrum_num_bins) show_fig(fig, title.replace(" ", "_"), True, "view_spectrum_selection") else: From e86db6b011db5618edab61f0f9f68bf8a66f4d7c Mon Sep 17 00:00:00 2001 From: singjc Date: Fri, 23 Aug 2024 23:23:06 -0400 Subject: [PATCH 080/168] update: chrom plotting and remove old plotting code --- src/view.py | 172 +++++++++++++++++++++++----------------------------- 1 file changed, 76 insertions(+), 96 deletions(-) diff --git a/src/view.py b/src/view.py index 9e8ce62..d8732bc 100644 --- a/src/view.py +++ b/src/view.py @@ -60,6 +60,7 @@ def get_df(file: Union[str, Path]) -> pd.DataFrame: else: st.session_state["view_ms2"] = pd.DataFrame() + def plot_bpc_tic() -> go.Figure: """Plot the base peak and total ion chromatogram (TIC). @@ -67,26 +68,41 @@ def plot_bpc_tic() -> go.Figure: A plotly Figure object containing the BPC and TIC plot. """ fig = go.Figure() + max_int = 0 if st.session_state.view_tic: df = st.session_state.view_ms1.groupby("RT").sum().reset_index() - fig.add_scatter( - x=df["RT"], - y=df["inty"], - mode="lines", - line=dict(color="#f24c5c", width=3), # OpenMS red - name="TIC", - showlegend=True, + df["type"] = "TIC" + if df["inty"].max() > max_int: + max_int = df["inty"].max() + fig = df.plot( + backend="ms_plotly", + kind="chromatogram", + fig=fig, + x="RT", + y="inty", + by="type", + line_color="#f24c5c", + show_plot=False, + grid=False, ) + fig = fig.fig if st.session_state.view_bpc: df = st.session_state.view_ms1.groupby("RT").max().reset_index() - fig.add_scatter( - x=df["RT"], - y=df["inty"], - mode="lines", - line=dict(color="#2d3a9d", width=3), # OpenMS blue - name="BPC", - showlegend=True, + df["type"] = "BPC" + if df["inty"].max() > max_int: + max_int = df["inty"].max() + fig = df.plot( + backend="ms_plotly", + kind="chromatogram", + fig=fig, + x="RT", + y="inty", + by="type", + line_color="#2d3a9d", + show_plot=False, + grid=False, ) + fig = fig.fig if st.session_state.view_eic: df = st.session_state.view_ms1 target_value = st.session_state.view_eic_mz.strip().replace(",", ".") @@ -96,19 +112,30 @@ def plot_bpc_tic() -> go.Figure: tolerance = (target_value * ppm_tolerance) / 1e6 # Filter the DataFrame - df_eic = df[(df['mz'] >= target_value - tolerance) & (df['mz'] <= target_value + tolerance)] + df_eic = df[ + (df["mz"] >= target_value - tolerance) + & (df["mz"] <= target_value + tolerance) + ] if not df_eic.empty: - fig.add_scatter( - x=df_eic["RT"], - y=df_eic["inty"], - mode="lines", - line=dict(color="#f6bf26", width=3), - name="XIC", - showlegend=True, + df_eic["type"] = "XIC" + if df_eic["inty"].max() > max_int: + max_int = df_eic["inty"].max() + fig = df_eic.plot( + backend="ms_plotly", + kind="chromatogram", + fig=fig, + x="RT", + y="inty", + by="type", + line_color="#f6bf26", + show_plot=False, + grid=False, ) + fig = fig.fig except ValueError: st.error("Invalid m/z value for XIC provided. Please enter a valid number.") + fig.update_yaxes(range=[0, max_int]) fig.update_layout( title=f"{st.session_state.view_selected_file}", xaxis_title="retention time (s)", @@ -120,73 +147,6 @@ def plot_bpc_tic() -> go.Figure: return fig -@st.cache_resource -def plot_ms_spectrum_old(spec, title, color): - """ - Takes a pandas Series (spec) and generates a needle plot with m/z and intensity dimension. - - Args: - spec: Pandas Series representing the mass spectrum with "mzarray" and "intarray" columns. - title: Title of the plot. - color: Color of the line in the plot. - - Returns: - A Plotly Figure object representing the needle plot of the mass spectrum. - """ - - # Every Peak is represented by three dots in the line plot: (x, 0), (x, y), (x, 0) - def create_spectra(x, y, zero=0): - x = np.repeat(x, 3) - y = np.repeat(y, 3) - y[::3] = y[2::3] = zero - return pd.DataFrame({"mz": x, "intensity": y}) - - df = create_spectra(spec["mzarray"], spec["intarray"]) - fig = px.line(df, x="mz", y="intensity") - fig.update_traces(line_color=color) - fig.add_hline(0, line=dict(color="#DDDDDD"), line_width=3) - fig.update_layout( - showlegend=False, - title_text=title, - xaxis_title="m/z", - yaxis_title="intensity", - plot_bgcolor="rgb(255,255,255)", - dragmode="select", - ) - # add annotations - top_indices = np.argsort(spec["intarray"])[-5:][::-1] - for index in top_indices: - mz = spec["mzarray"][index] - i = spec["intarray"][index] - fig.add_annotation( - dict( - x=mz, - y=i, - text=str(round(mz, 5)), - showarrow=False, - xanchor="left", - font=dict( - family="Open Sans Mono, monospace", - size=12, - color=color, - ), - ) - ) - fig.layout.template = "plotly_white" - # adjust x-axis limits to not cut peaks and annotations - x_values = [trace.x for trace in fig.data] - xmin = min([min(values) for values in x_values]) - xmax = max([max(values) for values in x_values]) - padding = 0.15 * (xmax - xmin) - fig.update_layout( - xaxis_range=[ - xmin - padding, - xmax + padding, - ] - ) - return fig - - @st.cache_resource def plot_ms_spectrum(df, title, bin_peaks, num_x_bins): fig = df.plot( @@ -244,8 +204,24 @@ def view_peak_map(): ) with c2: if df.shape[0] < 2500: - peak_map_3D = plotMSExperiment(df, plot3D=True, title="") - st.pyplot(peak_map_3D, use_container_width=True) + peak_map_3D = df.plot( + kind="peakmap", + plot_3d=True, + backend="ms_plotly", + x="RT", + y="mz", + z="inty", + zlabel="Intensity", + title="", + show_plot=False, + grid=False, + bin_peaks=st.session_state.spectrum_bin_peaks, + num_x_bins=st.session_state.spectrum_num_bins, + height=650, + width=900, + ) + peak_map_3D = peak_map_3D.fig + st.plotly_chart(peak_map_3D, use_container_width=True) @st.experimental_fragment @@ -284,7 +260,7 @@ def view_spectrum(): title = f"{st.session_state.view_selected_file} spec={rows[0]+1} mslevel={df['MS level']}" if df["precursor m/z"] > 0: title += f" precursor m/z: {round(df['precursor m/z'], 4)}" - + df_selected = pd.DataFrame( { "mz": df["mzarray"], @@ -295,10 +271,14 @@ def view_spectrum(): df_selected['MS level'] = df['MS level'] df_selected['precursor m/z'] = df['precursor m/z'] df_selected['max intensity m/z'] = df['max intensity m/z'] - - # fig = plot_ms_spectrum(df, title, "#2d3a9d") - fig = plot_ms_spectrum(df_selected, title, st.session_state.spectrum_bin_peaks, st.session_state.spectrum_num_bins) - + + fig = plot_ms_spectrum( + df_selected, + title, + st.session_state.spectrum_bin_peaks, + st.session_state.spectrum_num_bins, + ) + show_fig(fig, title.replace(" ", "_"), True, "view_spectrum_selection") else: st.session_state.pop("view_spectrum_selection") From 411217c1d7db1bf116dda246b48dda189f6a594d Mon Sep 17 00:00:00 2001 From: singjc Date: Fri, 23 Aug 2024 23:25:41 -0400 Subject: [PATCH 081/168] remove: old plotting modules --- src/plotting/.gitignore | 1 - src/plotting/BasePlotter.py | 58 -------- src/plotting/MSExperimentPlotter.py | 221 ---------------------------- src/view.py | 1 - 4 files changed, 281 deletions(-) delete mode 100644 src/plotting/.gitignore delete mode 100644 src/plotting/BasePlotter.py delete mode 100644 src/plotting/MSExperimentPlotter.py diff --git a/src/plotting/.gitignore b/src/plotting/.gitignore deleted file mode 100644 index 763624e..0000000 --- a/src/plotting/.gitignore +++ /dev/null @@ -1 +0,0 @@ -__pycache__/* \ No newline at end of file diff --git a/src/plotting/BasePlotter.py b/src/plotting/BasePlotter.py deleted file mode 100644 index 12a30f0..0000000 --- a/src/plotting/BasePlotter.py +++ /dev/null @@ -1,58 +0,0 @@ -from abc import ABC, abstractmethod -from dataclasses import dataclass -from enum import Enum -from typing import Literal, List -import numpy as np - -# A colorset suitable for color blindness -class Colors(str, Enum): - BLUE = "#4575B4" - RED = "#D73027" - LIGHTBLUE = "#91BFDB" - ORANGE = "#FC8D59" - PURPLE = "#7B2C65" - YELLOW = "#FCCF53" - DARKGRAY = "#555555" - LIGHTGRAY = "#BBBBBB" - - -@dataclass(kw_only=True) -class _BasePlotterConfig(ABC): - title: str = "1D Plot" - xlabel: str = "X-axis" - ylabel: str = "Y-axis" - height: int = 500 - width: int = 500 - relative_intensity: bool = False - show_legend: bool = True - - -# Abstract Class for Plotting -class _BasePlotter(ABC): - def __init__(self, config: _BasePlotterConfig) -> None: - self.config = config - self.fig = None # holds the figure object - - def updateConfig(self, **kwargs): - for key, value in kwargs.items(): - if hasattr(self.config, key): - setattr(self.config, key, value) - else: - raise ValueError(f"Invalid config setting: {key}") - - def _get_n_grayscale_colors(self, n: int) -> List[str]: - """Returns n evenly spaced grayscale colors in hex format.""" - hex_list = [] - for v in np.linspace(50, 200, n): - hex = "#" - for _ in range(3): - hex += f"{int(round(v)):02x}" - hex_list.append(hex) - return hex_list - - def plot(self, data, **kwargs): - return self._plot(data, **kwargs) - - @abstractmethod - def _plot(self, data, **kwargs): - pass \ No newline at end of file diff --git a/src/plotting/MSExperimentPlotter.py b/src/plotting/MSExperimentPlotter.py deleted file mode 100644 index c42df2c..0000000 --- a/src/plotting/MSExperimentPlotter.py +++ /dev/null @@ -1,221 +0,0 @@ -from dataclasses import dataclass -from typing import Literal, Union - -import matplotlib.pyplot as plt -import pandas as pd -import numpy as np -import plotly.graph_objects as go - -from src.plotting.BasePlotter import Colors, _BasePlotter, _BasePlotterConfig - - -@dataclass(kw_only=True) -class MSExperimentPlotterConfig(_BasePlotterConfig): - bin_peaks: Union[Literal["auto"], bool] = "auto" - num_RT_bins: int = 50 - num_mz_bins: int = 50 - plot3D: bool = False - title: str = "Peak Map" - xlabel: str = "RT (s)" - ylabel: str = "m/z" - height: int = 500 - width: int = 750 - relative_intensity: bool = False - show_legend: bool = True - - -class MSExperimentPlotter(_BasePlotter): - def __init__(self, config: MSExperimentPlotterConfig, **kwargs) -> None: - """ - Initialize the MSExperimentPlotter with a given configuration and optional parameters. - - Args: - config (MSExperimentPlotterConfig): Configuration settings for the spectrum plotter. - **kwargs: Additional keyword arguments for customization. - """ - super().__init__(config=config, **kwargs) - - def _prepare_data(self, exp: pd.DataFrame) -> pd.DataFrame: - """Prepares data for plotting based on configuration (binning, relative intensity, hover text).""" - if self.config.bin_peaks == True or ( - exp.shape[0] > self.config.num_mz_bins * self.config.num_RT_bins - and self.config.bin_peaks == "auto" - ): - exp["mz"] = pd.cut(exp["mz"], bins=self.config.num_mz_bins) - exp["RT"] = pd.cut(exp["RT"], bins=self.config.num_RT_bins) - - # Group by x and y bins and calculate the mean intensity within each bin - exp = ( - exp.groupby(["mz", "RT"], observed=True) - .agg({"inty": "mean"}) - .reset_index() - ) - exp["mz"] = exp["mz"].apply(lambda interval: interval.mid).astype(float) - exp["RT"] = exp["RT"].apply(lambda interval: interval.mid).astype(float) - exp = exp.fillna(0) - else: - self.config.bin_peaks = False - - if self.config.relative_intensity: - exp["inty"] = exp["inty"] / max(exp["inty"]) * 100 - - exp["hover_text"] = exp.apply( - lambda x: f"m/z: {round(x['mz'], 6)}
RT: {round(x['RT'], 2)}
intensity: {int(x['inty'])}", - axis=1, - ) - - return exp.sort_values("inty") - - def _plotMatplotlib3D( - self, - exp: pd.DataFrame, - ) -> plt.Figure: - """Plot 3D peak map with mz, RT and intensity dimensions. Colored peaks based on intensity.""" - fig = plt.figure( - figsize=(self.config.width / 100, self.config.height / 100), - layout="constrained", - ) - ax = fig.add_subplot(111, projection="3d") - - if self.config.title: - ax.set_title(self.config.title, fontsize=12, loc="left") - ax.set_xlabel( - self.config.ylabel, - fontsize=9, - labelpad=-2, - color=Colors["DARKGRAY"], - style="italic", - ) - ax.set_ylabel( - self.config.xlabel, - fontsize=9, - labelpad=-2, - color=Colors["DARKGRAY"], - ) - ax.set_zlabel("intensity", fontsize=10, color=Colors["DARKGRAY"], labelpad=-2) - for axis in ("x", "y", "z"): - ax.tick_params(axis=axis, labelsize=8, pad=-2, colors=Colors["DARKGRAY"]) - - ax.set_box_aspect(aspect=None, zoom=0.88) - ax.ticklabel_format(axis="z", style="sci", useMathText=True, scilimits=(0,0)) - ax.grid(color="#FF0000", linewidth=0.8) - ax.xaxis.pane.fill = False - ax.yaxis.pane.fill = False - ax.zaxis.pane.fill = False - ax.view_init(elev=25, azim=-45, roll=0) - - # Plot lines to the bottom with colored based on inty - for i in range(len(exp)): - ax.plot( - [exp["RT"].iloc[i], exp["RT"].iloc[i]], - [exp["inty"].iloc[i], 0], - [exp["mz"].iloc[i], exp["mz"].iloc[i]], - zdir="x", - color=plt.cm.magma_r((exp["inty"].iloc[i] / exp["inty"].max())), - ) - return fig - - def _plotPlotly2D( - self, - exp: pd.DataFrame, - ) -> go.Figure: - """Plot 2D peak map with mz and RT dimensions. Colored peaks based on intensity.""" - layout = go.Layout( - title=dict(text=self.config.title), - xaxis=dict(title=self.config.xlabel), - yaxis=dict(title=self.config.ylabel), - showlegend=self.config.show_legend, - template="simple_white", - dragmode="select", - height=self.config.height, - width=self.config.width, - ) - fig = go.Figure(layout=layout) - fig.add_trace( - go.Scattergl( - name="peaks", - x=exp["RT"], - y=exp["mz"], - mode="markers", - marker=dict( - color=exp["inty"].apply(lambda x: np.log(x)), - colorscale="sunset", - size=8, - symbol="square", - colorbar=( - dict(thickness=8, outlinewidth=0, tickformat=".0e") - if self.config.show_legend - else None - ), - ), - hovertext=exp["hover_text"] if not self.config.bin_peaks else None, - hoverinfo="text", - showlegend=False, - ) - ) - return fig - - def _plot( - self, - exp: pd.DataFrame, - ) -> go.Figure: - """Prepares data and returns Plotly 2D plot or Matplotlib 3D plot.""" - exp = self._prepare_data(exp) - if self.config.plot3D: - return self._plotMatplotlib3D(exp) - return self._plotPlotly2D(exp) - -# ============================================================================= # -## FUNCTIONAL API ## -# ============================================================================= # - - -def plotMSExperiment( - exp: pd.DataFrame, - plot3D: bool = False, - relative_intensity: bool = False, - bin_peaks: Union[Literal["auto"], bool] = "auto", - num_RT_bins: int = 50, - num_mz_bins: int = 50, - width: int = 750, - height: int = 500, - title: str = "Peak Map", - xlabel: str = "RT (s)", - ylabel: str = "m/z", - show_legend: bool = False, -): - """ - Plots a Spectrum from an MSSpectrum object - - Args: - spectrum (pd.DataFrame): OpenMS MSSpectrum Object - plot3D: (bool = False, optional): Plot peak map 3D with peaks colored based on intensity. Disables colorbar legend. Works with "MATPLOTLIB" engine only. Defaults to False. - relative_intensity (bool, optional): If true, plot relative intensity values. Defaults to False. - bin_peaks: (Union[Literal["auto"], bool], optional): Bin peaks to reduce complexity and improve plotting speed. Hovertext disabled if activated. If set to "auto" any MSExperiment with more then num_RT_bins x num_mz_bins peaks will be binned. Defaults to "auto". - num_RT_bins: (int, optional): Number of bins in RT dimension. Defaults to 50. - num_mz_bins: (int, optional): Number of bins in m/z dimension. Defaults to 50. - width (int, optional): Width of plot. Defaults to 500px. - height (int, optional): Height of plot. Defaults to 500px. - title (str, optional): Plot title. Defaults to "Spectrum Plot". - xlabel (str, optional): X-axis label. Defaults to "m/z". - ylabel (str, optional): Y-axis label. Defaults to "intensity" or "ion mobility". - show_legend (int, optional): Show legend. Defaults to False. - - Returns: - Plot: The generated plot using the specified engine. - """ - config = MSExperimentPlotterConfig( - plot3D=plot3D, - relative_intensity=relative_intensity, - bin_peaks=bin_peaks, - num_RT_bins=num_RT_bins, - num_mz_bins=num_mz_bins, - width=width, - height=height, - title=title, - xlabel=xlabel, - ylabel=ylabel, - show_legend=show_legend, - ) - plotter = MSExperimentPlotter(config) - return plotter.plot(exp.copy()) \ No newline at end of file diff --git a/src/view.py b/src/view.py index d8732bc..3cb5cec 100644 --- a/src/view.py +++ b/src/view.py @@ -5,7 +5,6 @@ import plotly.graph_objects as go import streamlit as st import pyopenms as poms -from .plotting.MSExperimentPlotter import plotMSExperiment from .common import show_fig from typing import Union From 2cf9a4f1f9f8878daf29a68278595d5d7d969525 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Tue, 27 Aug 2024 19:12:13 +0200 Subject: [PATCH 082/168] replace "copied" with "added" --- src/workflow/StreamlitUI.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/workflow/StreamlitUI.py b/src/workflow/StreamlitUI.py index b7de96a..c32e08d 100644 --- a/src/workflow/StreamlitUI.py +++ b/src/workflow/StreamlitUI.py @@ -142,7 +142,7 @@ def upload_widget( with open(external_files, "a") as f_handle: f_handle.write(f"{f}\n") my_bar.empty() - st.success("Successfully copied files!") + st.success("Successfully added files!") st.session_state["previous_dir"] = Path(local_files[0]).parent From 08dd1e12a4faddc3a96c575548a4f24731d2fdaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Tue, 27 Aug 2024 19:15:57 +0200 Subject: [PATCH 083/168] add error handling for tk_file_types --- src/workflow/StreamlitUI.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/workflow/StreamlitUI.py b/src/workflow/StreamlitUI.py index c32e08d..7dcadd1 100644 --- a/src/workflow/StreamlitUI.py +++ b/src/workflow/StreamlitUI.py @@ -125,10 +125,13 @@ def upload_widget( ) # Tk file dialog requires file types to be a list of tuples - if isinstance(file_types, list): - tk_file_types = [(f"{ft}", f"*.{ft}") for ft in file_types] if isinstance(file_types, str): tk_file_types = [(f"{file_types}", f"*.{file_types}")] + elif isinstance(file_types, list): + tk_file_types = [(f"{ft}", f"*.{ft}") for ft in file_types] + else: + raise ValueError("'file_types' must be either of type str or list") + if dialog_button: local_files = tk_file_dialog( From 4ce1b65a29b625fc7f83a3f94c57d52ec05b3616 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Tue, 27 Aug 2024 19:25:13 +0200 Subject: [PATCH 084/168] use absolute import --- src/workflow/StreamlitUI.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/workflow/StreamlitUI.py b/src/workflow/StreamlitUI.py index 7dcadd1..157b83b 100644 --- a/src/workflow/StreamlitUI.py +++ b/src/workflow/StreamlitUI.py @@ -14,7 +14,7 @@ from datetime import datetime -from ..common import OS_PLATFORM, TK_AVAILABLE, tk_directory_dialog, tk_file_dialog +from src.common import OS_PLATFORM, TK_AVAILABLE, tk_directory_dialog, tk_file_dialog class StreamlitUI: """ From 7712e77893c5eba807a8a0a6b3d6b9b906de29a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Wed, 28 Aug 2024 11:09:54 +0200 Subject: [PATCH 085/168] fix typo --- src/mzmlfileworkflow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mzmlfileworkflow.py b/src/mzmlfileworkflow.py index bf563a5..b48d7d7 100644 --- a/src/mzmlfileworkflow.py +++ b/src/mzmlfileworkflow.py @@ -70,7 +70,7 @@ def run_workflow(params, result_dir): ) df.to_csv(Path(result_dir, "result.tsv"), sep="\t", index=False) -@stfragment +@st.fragment def result_section(result_dir): date_strings = [f.name for f in Path(result_dir).iterdir() if f.is_dir()] From 1b32a1ce1346c9ebc609ebd042814acd981d31de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Wed, 28 Aug 2024 11:11:39 +0200 Subject: [PATCH 086/168] fix import issue with linter --- src/Workflow.py | 4 ++-- src/view.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Workflow.py b/src/Workflow.py index b461da6..5fa92a5 100644 --- a/src/Workflow.py +++ b/src/Workflow.py @@ -1,11 +1,11 @@ import streamlit as st -from .workflow.WorkflowManager import WorkflowManager +from src.workflow.WorkflowManager import WorkflowManager # for result section: from pathlib import Path import pandas as pd import plotly.express as px -from .common import show_fig +from src.common import show_fig class Workflow(WorkflowManager): diff --git a/src/view.py b/src/view.py index 45619a6..6be4af8 100644 --- a/src/view.py +++ b/src/view.py @@ -5,8 +5,8 @@ import plotly.graph_objects as go import streamlit as st import pyopenms as poms -from .plotting.MSExperimentPlotter import plotMSExperiment -from .common import show_fig +from src.plotting.MSExperimentPlotter import plotMSExperiment +from src.common import show_fig from typing import Union From 302b704a19804610e6d8c22aaa1131219940db8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Wed, 28 Aug 2024 11:14:59 +0200 Subject: [PATCH 087/168] remove pyopenms from environment.yml --- environment.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/environment.yml b/environment.yml index f8c0a7f..19d337a 100644 --- a/environment.yml +++ b/environment.yml @@ -8,7 +8,6 @@ dependencies: - pip==24.0 - numpy==1.26.4 # pandas and numpy are dependencies of pyopenms, however, pyopenms needs numpy<=1.26.4 - mono==6.12.0.90 - - pyopenms>3.0 - pip: # dependencies only available through pip # streamlit dependencies - streamlit==1.37.0 From 7d0c110a79a0b2c688264e0259b8a06e1f0802d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Wed, 28 Aug 2024 11:16:13 +0200 Subject: [PATCH 088/168] more circular import issues with linter --- src/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common.py b/src/common.py index 2d1b05e..58e1402 100644 --- a/src/common.py +++ b/src/common.py @@ -11,7 +11,7 @@ import streamlit as st import pandas as pd -from .captcha_ import captcha_control +from src.captcha_ import captcha_control # set these variables according to your project APP_NAME = "OpenMS Streamlit App" From 0b63f8ec92f97262fe9a2d30a97fa2b2c93e8c65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Wed, 28 Aug 2024 11:21:24 +0200 Subject: [PATCH 089/168] update requirements.yml --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 11aa933..a590255 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ # the requirements.txt file is intended for deployment on streamlit cloud and if the simple container is built # note that it is much more restricted in terms of installing third-parties / etc. # preferably use the batteries included or simple docker file for local hosting -streamlit==1.36.0 +streamlit>=1.38.0 pyopenms==3.1.0 numpy==1.26.4 # pandas and numpy are dependencies of pyopenms, however, pyopenms needs numpy<=1.26.4 plotly==5.22.0 From a98685c160675373eea6a2d351fbf560bf9b992f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Wed, 28 Aug 2024 13:36:24 +0200 Subject: [PATCH 090/168] fix artifacts in CI --- .github/workflows/build-windows-executable-app.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-windows-executable-app.yaml b/.github/workflows/build-windows-executable-app.yaml index a48a9b9..ba70f15 100644 --- a/.github/workflows/build-windows-executable-app.yaml +++ b/.github/workflows/build-windows-executable-app.yaml @@ -218,12 +218,12 @@ jobs: cp app.py streamlit_exe - name: Delete OpenMS bin artifact - uses: geekyeggo/delete-artifact@v4 + uses: actions/delete-artifact@v4 with: name: OpenMS-bin - name: Delete OpenMS share artifact - uses: geekyeggo/delete-artifact@v2 + uses: actions/delete-artifact@v4 with: name: OpenMS-share From a889c0fdd26dc6d2bc68e73fdc3bf039485d588c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Thu, 29 Aug 2024 10:18:09 +0200 Subject: [PATCH 091/168] fix artifact deletion --- .github/workflows/build-windows-executable-app.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-windows-executable-app.yaml b/.github/workflows/build-windows-executable-app.yaml index ba70f15..62503a7 100644 --- a/.github/workflows/build-windows-executable-app.yaml +++ b/.github/workflows/build-windows-executable-app.yaml @@ -218,12 +218,12 @@ jobs: cp app.py streamlit_exe - name: Delete OpenMS bin artifact - uses: actions/delete-artifact@v4 + uses: geekyeggo/delete-artifact@v5 with: name: OpenMS-bin - name: Delete OpenMS share artifact - uses: actions/delete-artifact@v4 + uses: geekyeggo/delete-artifact@v5 with: name: OpenMS-share From 622643758198a01d3fa1744e64d86ad7ff846bee Mon Sep 17 00:00:00 2001 From: Tom David Mueller Date: Thu, 29 Aug 2024 13:26:13 +0200 Subject: [PATCH 092/168] separate common functions from normal source --- content/documentation.py | 2 +- content/download_section.py | 2 +- content/file_upload.py | 2 +- content/quickstart.py | 2 +- content/raw_data_viewer.py | 2 +- content/run_example_workflow.py | 2 +- content/run_subprocess.py | 2 +- content/simple_workflow.py | 2 +- content/topp_workflow_execution.py | 2 +- content/topp_workflow_file_upload.py | 2 +- content/topp_workflow_parameter.py | 2 +- content/topp_workflow_results.py | 2 +- src/Workflow.py | 2 +- src/common/__pycache__/captcha_.cpython-311.pyc | Bin 0 -> 9835 bytes src/common/__pycache__/common.cpython-311.pyc | Bin 0 -> 20309 bytes src/{ => common}/captcha_.py | 0 src/{ => common}/common.py | 2 +- src/fileupload.py | 2 +- src/mzmlfileworkflow.py | 2 +- src/view.py | 2 +- src/workflow/StreamlitUI.py | 2 +- 21 files changed, 18 insertions(+), 18 deletions(-) create mode 100644 src/common/__pycache__/captcha_.cpython-311.pyc create mode 100644 src/common/__pycache__/common.cpython-311.pyc rename src/{ => common}/captcha_.py (100%) rename src/{ => common}/common.py (99%) diff --git a/content/documentation.py b/content/documentation.py index cc31a26..c308213 100644 --- a/content/documentation.py +++ b/content/documentation.py @@ -1,5 +1,5 @@ import streamlit as st -from src.common import page_setup +from src.common.common import page_setup from pathlib import Path from docs.toppframework import content as topp_framework_content diff --git a/content/download_section.py b/content/download_section.py index 3d76695..3946fe6 100644 --- a/content/download_section.py +++ b/content/download_section.py @@ -3,7 +3,7 @@ from pathlib import Path import shutil -from src.common import page_setup +from src.common.common import page_setup from zipfile import ZipFile, ZIP_DEFLATED page_setup() diff --git a/content/file_upload.py b/content/file_upload.py index 0fc0e04..e16a83b 100755 --- a/content/file_upload.py +++ b/content/file_upload.py @@ -3,7 +3,7 @@ import streamlit as st import pandas as pd -from src.common import page_setup, save_params, v_space, show_table, TK_AVAILABLE, tk_directory_dialog +from src.common.common import page_setup, save_params, v_space, show_table, TK_AVAILABLE, tk_directory_dialog from src import fileupload params = page_setup() diff --git a/content/quickstart.py b/content/quickstart.py index 2df98fb..3632876 100644 --- a/content/quickstart.py +++ b/content/quickstart.py @@ -21,7 +21,7 @@ from pathlib import Path import streamlit as st -from src.common import page_setup, v_space +from src.common.common import page_setup, v_space page_setup(page="main") diff --git a/content/raw_data_viewer.py b/content/raw_data_viewer.py index 4a001d4..d788e25 100755 --- a/content/raw_data_viewer.py +++ b/content/raw_data_viewer.py @@ -2,7 +2,7 @@ import streamlit as st -from src.common import page_setup +from src.common.common import page_setup from src import view diff --git a/content/run_example_workflow.py b/content/run_example_workflow.py index 3b2f4c7..49e70e9 100755 --- a/content/run_example_workflow.py +++ b/content/run_example_workflow.py @@ -2,7 +2,7 @@ from pathlib import Path -from src.common import page_setup, save_params +from src.common.common import page_setup, save_params from src import mzmlfileworkflow # Page name "workflow" will show mzML file selector in sidebar diff --git a/content/run_subprocess.py b/content/run_subprocess.py index 8b3c01c..002aa90 100644 --- a/content/run_subprocess.py +++ b/content/run_subprocess.py @@ -4,7 +4,7 @@ from pathlib import Path -from src.common import page_setup, save_params +from src.common.common import page_setup, save_params from src.run_subprocess import run_subprocess # Page name "workflow" will show mzML file selector in sidebar diff --git a/content/simple_workflow.py b/content/simple_workflow.py index 8084d85..130dd43 100755 --- a/content/simple_workflow.py +++ b/content/simple_workflow.py @@ -1,6 +1,6 @@ import streamlit as st -from src.common import page_setup, save_params, show_table +from src.common.common import page_setup, save_params, show_table from src import simpleworkflow # Page name "workflow" will show mzML file selector in sidebar diff --git a/content/topp_workflow_execution.py b/content/topp_workflow_execution.py index a6e6145..4da0f3a 100644 --- a/content/topp_workflow_execution.py +++ b/content/topp_workflow_execution.py @@ -1,5 +1,5 @@ import streamlit as st -from src.common import page_setup +from src.common.common import page_setup from src.Workflow import Workflow diff --git a/content/topp_workflow_file_upload.py b/content/topp_workflow_file_upload.py index 1953207..de8916a 100644 --- a/content/topp_workflow_file_upload.py +++ b/content/topp_workflow_file_upload.py @@ -1,5 +1,5 @@ import streamlit as st -from src.common import page_setup +from src.common.common import page_setup from src.Workflow import Workflow diff --git a/content/topp_workflow_parameter.py b/content/topp_workflow_parameter.py index 0abca80..cb0573d 100644 --- a/content/topp_workflow_parameter.py +++ b/content/topp_workflow_parameter.py @@ -1,5 +1,5 @@ import streamlit as st -from src.common import page_setup +from src.common.common import page_setup from src.Workflow import Workflow diff --git a/content/topp_workflow_results.py b/content/topp_workflow_results.py index 2407402..687edc2 100644 --- a/content/topp_workflow_results.py +++ b/content/topp_workflow_results.py @@ -1,5 +1,5 @@ import streamlit as st -from src.common import page_setup +from src.common.common import page_setup from src.Workflow import Workflow diff --git a/src/Workflow.py b/src/Workflow.py index 0839356..d1045bf 100644 --- a/src/Workflow.py +++ b/src/Workflow.py @@ -5,7 +5,7 @@ from pathlib import Path import pandas as pd import plotly.express as px -from src.common import show_fig +from src.common.common import show_fig class Workflow(WorkflowManager): diff --git a/src/common/__pycache__/captcha_.cpython-311.pyc b/src/common/__pycache__/captcha_.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e7d55e17c06850e43505db321f21b12fa69b6aef GIT binary patch literal 9835 zcmd5iTWlLwb~AjxMT*pmmgJG-SfQ+kWl3JIqB!t7wqqq5%c-rb!=*SQi89F{W`=&K zRLWhX2pzaxIaSs|kRZfjH|uUvtUp@RD7NSp3l#Zi0FE%Ihye@)D2&!01!yD&-2AlX z+~I2|DM`PYE6$y{uXD~l_uO;NJy*YRyB!py+{MEDQV&J_I~FR*QvUezDSX_aSc;|N zRDzzRY5X?C4YNk_HYLna15G6?vsTh#jN20SS$o1U>qt0foe9^hi`1Lq?u2L7Qy$$k z+eAitXT9X@oAnte&briGLC>0@Ota>XX^Q#;9xZ)p`Pcwuc(gR@XRTa-wXueI6Kj9V zG}}VTj&hxabwXWhT^|>e+Zy_~p{||v%yzI%vq9E7yNmU`Ma_1yhVxXY`4J)t(W>c{ zh_pBzGO5j}$O0FRMfqenl4QflNP<&s(MUWRPOuZIeSwq0*h5r(Vdz3W!_mb^a)Dz3 zjO%m)8jnR%64a@#1vVvw0hGukB}9?}Bx)cLi6z5gREVVzmb4faB|)_aoRk)l(JC*1 zE)zUPc)nC1yF*EJZ5c|>xfObWS}|nkd|e+HR8Akm`;$t6I!;~Q`(xnoigCr1F|l+< zwIxGcL41_Zk}>3~t59u*kBm`|m!@v@XAA(*ykgAI8RPTREsJEWjab4tkff&pe)F1L-&y=Om7a#N!NMDZ^claw&Hj$c|DdvM!J!T!HUOkkOmDIb}i$0l`K>p znrS}CY3Nluksj@>XE_H4F>Hd;e+>prD*Ux_l9`$=}wku&Bl z6rJAHU5c}-&@-{&oG4MWy}#%RZn}ClTs`?d*|k@3?JcrO!XQA@@5(uLN4`k7LaYZ2}8|MS~_?C@h08#&Ln(nUb4Ap|gMfvmO*gjOi3&a&Jh1ws&NhOrX| z*|s9PRaW~@R{Qj_n(x?f4xp&^6}?^S(So=4=?)?&v;!uc+O|Ulk-onKx%d|8qot~R zfO2hA>L8m-Rk>#AWzZKZMo{#oj4@v~4)B!|YtXA_P|UwwF-u5MIc3cGI_a#`HcF=+ z%8EsD*Lr3w4XsuQ*RGs04JMuJ8QY3o!c{FNspGmB zO_d%L#Woly)>JcZ`td7{j46+*V@t|7GS-YeW6M}r^9QE+2A+b+`vgYT&AA4EwY)`r zYSrVRsf-EMVTf?TvEs})SzC=JDA{!-hpyzTm5>%NvAWSyfcn<3)KjBismkXq`o;wY z*S-92MBfOUDDgtQ#hvHVNtOXqi#E3xjH?7Tsh4460vCm@U<~>1tL;T)qFT!&e{C8- zYet6!+&O=3QoTfXmHn;7h`30UifTe1Pj%M$VY*F>gZ=P)iL!bJwr0Jb1dKFHYw*!| zq_2x;K^UTszP3%pBZ)aSa(KC~%;lO%9iEEw;97`>;X~_m4F-z12eMSYCx7Hud$JVK zC?Q(YcnmaYS`Zgm=!I-L)U2sYQ~|0b6+!PoH7&&XIn{{1q!sY;@vEGGJ6%8zOf|-! zi-8vfM5Ws1BH)3bYikn0El|y33Oob>Z9UZRf>fu7U7D9-MlOn~x6!B4TplqDa-up& zpD;Qagiy7qj=RLmHKxQx)sTw8lLXHw$#U1rJ`)>}A|mc|T+B++6ufT>8-?ef;|X}g zKL^Hxns24tt%cSB*|kq`?aQ73Ro&iM=-e;2jVf)U1ycZA3tx}o?Y|q6y<^$aP;3rl z&%mp_=gyn&zL}qw+lG|3p%T?@c91ORd>HInzp~jqy3suYvG;e#O(DGeWU>PyVdz+pqZc-?Zcmxua0!3%qx9?bK#q&qiQR{&nS<2{~|32^`!E zOl<_F?w^+fN0h*kKlCVp9m+0bgk`z!;6Qc)e{@2}$fz2I_p9_gQPLs`BEw`gOW>G_$3zK^ zTB*a!oiHVGtg1HwmDUenlz0HLr&+4dd_nuI`|i`fxBQdyADn+UEgzaz4ow$co!K}v z1Ffs0)m~)Z30*Lj*dt*#d`*WOH3K2^W81Tsg)keytZEqQ6upBedd=31Vkaa>7{d&$ zjxd4QLCk)D*&)b?;bMMLSz%3G+bS~^jzgEXv6~DTObrf@|5r8be~qqAbv^b`^8Mu9 z*W~VTrF$Hz<>m_taO<@{QJODi&pv4FSl_o99NGvD$-xmNI3l<1S6cUHUj}vT^sl}k zJNgtyU-lRjJxtyyy9X8b;7?CxkLC;|8`Z@WTiS}==3?7k(0$Do(0$F8?1^08PtSal z#(RXEjIDx(d-S*P6@{mo@c57N@TCV1{SacKrD_xSy)Z;eS81_r`<8l_gEeTU%vGZh z-oAI8f;857jdlL7aC?W5NF_|&H(+3t|w6l*Ir9{&;!*$~&>KaW`mta;fuj;zM8rdo^*@iO@ zhOf4t2TM=EAlABl>s4AaO&r zs88+sS?kXwd35)-B-X(?^`my^=VIOZe%sHO)r?p@SF0x!)}yD0oRBC`)>OXkgjgey zZPNEAa##-;RX<6rSKkxX6_sB(NvH!W--DGe;FnK7BM7J(@)!i$l6IPFZQtqfuNZZ5 zRbA7q;Z$9}8mF3B|3ZU-BHS{qn8E$2p{=8o4X`brwl>Vjk}>BoMzSTbZF-8~)N0P} z+R_aw*mkz#)1V%%@ShpW4sx=KwdwmpG@%Y`O%Jlx+BEW=bzQ2TdJO;=zeBG)n#L_j z52+l#JH8WL&w~?@uiIBOaC$hP6*_l-L9~KyZFkgH$qTxEXwXSwyBb$$2VBXJJX=ot(FQ6Tjsm1Ze`8qsqM8Zw%`-$j{Fsz6^OTb3_=Y8ABW%q%fOixgP$a% zkCFKZbL_|~Gsj*$f_@>F6w?s0!1zR3xnkWzPeKEx+*;sOck+|zXD}k!rJOFi^z_FwOt}Ni@h|?gIrw$hq1c*j9%ueKh zT%MT`(%f?l4~@dLn8*z>F^Lg4JfDlqNr*92?ki4fXex{Z0I?(?DJqdMP$6&&T#|#E z6d(hap&p?qK{fKajJ6CKC!pswpyV0231j0xzs5?OS%jG2urVHFWECDd~ zTZ7W7y(}Pc{-o+%;Q56(2RDI{_zfu*6;&&QP3GbpJDu)lfexX_`cY!2MbVa4%sBlE3Usma(kMOX(>?&Wu49)XGVp)78&OvAfM7=6J+6@g8 z0k)y!Fw?xmO){{kfKp(}qpN!%iq~cwJBY1JBDSz7!8s6xi$@7Y(zS6BmYIW4)D=z` zhVzX1T8xF8Ny{RKBOaXu!XBZ%TW&r<2&rH}3WO8T06{N%B61yXJ_T{v(AT%z^crqm z?aD05vz%&839vzg8+h*tH)`D1G&7S9z}V79@84xKwjkNp1U|VCVpM}DsqXTULaYdc zPPKu^Nw9nnc9KAjuE1yIHdVEXsaO(ZR`tPp;r%MKBw&xh7Y4QXlxil@rkbUg6o)|9 z5+6&#Eh~r#pMYTDA|H!FJj(*{G61VKMZ{<<7EZ$@oe+f;P%Uh1Ats5cC(b1o;EuM; z0*tMJ9*DyHqI^7^NQ$ZnR}R97NqD2fD4fS^1~S!Fkywazp|VgN$iZ+dnMzBl4Y+fK z<*y~xW`qzH({qWK6rM{<5(FmAasC?2&W!ZITp*+-!8IT!2)q!oswO}_D&P_cDMVz# z@R@3ej>2<5bt18m0}zP2E{Uk)akE0w&Sy>KsURy+6ACNP(~|A)Ow zaG+ovC{YvU;NQ$C!-wzxsWN=_v-HOB%ww#BQ(I;k&f9scISN{_mzx2+f)i-7L zUd6q)MD4N%N%qj?xpk^!pnN9{fXa=i+#a~Wa(j?hJ-<%>-D`!wlpL5+0#msYMSuI9 z!|xvcb+6KU;NB0F-sffiVa0zqcl-f>d2w~-=Jc)U-1GzB@oc_1|7zYQw}h0I(9M&% zqpOBuu=As#_lFA4PJKqN!=d_&5n7RNrMS8ZuC8K}Z?kF7M$?|c zGY9WqDm3kpn@%ZBr%II99V~W-v>@uezI%e)J*jk0t~wu*1<#*W{KK36@eTjD>_4dZ z58mImIeB(t@~k|0PMJKnIeC6#^1M8GL7BX;;lBXEPT%ea?Lnpe*}ENu_OW81{mz+p z&)j}#?WNV1isOggJE~x)RSt|k00AmX%<7r402R8%wuI$cNN+v8b^WL zT5sFe?5pL&nb!na)jFKYxLSJk$m175;N19-9+j&r+%#)P#1;FT9TBwrY8} zsusoJtD~x;R#Xj8c8hh2Q&d}O<3unoQ7)X8VsUbXpv8>P6V(2P!Ch7(!$h-bnvcWQ z1RLmfJ^;xgnVBTdsqs=c896{*%jeU literal 0 HcmV?d00001 diff --git a/src/common/__pycache__/common.cpython-311.pyc b/src/common/__pycache__/common.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1de86da62840c5076f2a7bb07eed6650abc63a11 GIT binary patch literal 20309 zcmd6PeQ*?KnqT)!&zCf#ZwU#3XbB-{gfs#SHeg^8#$Yf=UXag5YkPK3x1khb7F95YqcAEmVG#@+S>K8W%iD{ToNa_tJtoj)=pijW~i=Xsw+x4mvU13S40`7 zT>O>a^Y%>7v^28uUL}FsykkLUe*-skIm-ubgYpn}8m%4lZXcZ}oyJAElUzI^1% zEe?)*o0B++k8z{sn;+%bcgLuMy`7^@_7+A3_I8cB@OH%9anGoSr#jAdf|;V#+yc)kmnoSBvp(y%g(8m!XQRBOMOzM+$#CyE%H{`Gw!gmxN$)WyzUxp zld9I|Nq&h(e)a3Z=r*Zes+G5H0HF>L#6k&HryeQoQb=l$JMvH(k+L0Sn&j%K&O*+N!?L?v|s9xf>N)v z^QLn&B=P6D;I7|M>q9}_a1JJB@DiSjXp{7w)Z($A!*GmTGAhQSFo9Er!GnmCwB&DN=ful<@FPsJjdYLT>5X zKIO{b9H)Lyt1On7<0XgWye+&B*dJK%_iuc9`hTa~C)spTv>U)+P7<+t%ltKmt#MCayxnb0!&)#8gCy#AQuZRB>EM z#>I$u`uy;aNLV075|U^x9g?N!m=;YYBFckw+nzeLF!VX|nE=OW%*&4nz)YAEkjEyA~2{2E+$J3ZnSsA#LoQz$J0KJr0p^xis~tvsk#9-KeE>gK%uH?F*P z+yszU<`$}WWjSEYE_|uneymalv zsuO7}g9Z1g$O8(BY2{*HfBkjY$*!JzZwpfK3)`FIzP@Doqtu^#6qJ;Jd*&nE*sLS-`wmS;-GG1*{B$S*v^ zrp#yAVmyTudfQpeaqeaDC6v3$UvsX?*l!47TH()e^R$YL=aZ}zx9DNWZ*KN0*Es|76pGReOa~#->H`0iqGpcZ& zs45YniRfjJ))I=99531RL`zDT(6=y`NDNYlG$U@vWRjP`KNJv85KwVCs!g&kB;@Im zCfBi=F#shRDN?yIENv|>!(bG7OiO|{67^RLBQ4TOYL$2zn~DGbxsch6BQ7obUYPwF{)-bQOs~L*+XfjTu%~g6GELzG=un-sI*dg zC5@%PY`T$h1pn%PLjY#e!)x$^lXJg%}t=k*ukinKvZ3$hfr#CWzctkHHU zjJIlode+FL(iW?WE&eGd)%+vs*1qSG>ZH2c_3QX+LwTr|dG&x~&$E=+%iN+vvC9Wm z-V{+7_LPTP%%8H<-Ajb!+#;|1y{(RgC(9)gg9)2LyYvH$DQ0m~HH9y~M_o(mD#3%s z;!3E4Qj@JMt9+O!CwsIVg&1}l(M;IPzr0#Ve5Sv+_6Kp zl`hVWB^0+1QbRz z^o4x%rL7!P8VgpVOv-TuYrm+q3^$2u=1j+8u76@LU*QU|{^IE~a)Y0*% zg7qVc>|{-W1<$gBS(*tmPnxp0;l-den3B|4*oe#+vtcU47>8zS^Y$gv_8m$kCJbR3 zYKI|2(poa;GAd{sVJ)h~WW&eeQLLoljzwl5cpHtdmTEAnhgDR%7*X;DsEW9pNQaqV zKiivcA~i!MsJI%|lt==WQnD|GVNAL-p(N7@iM3sWys=B@E?MPO6fkNglF5mf9F8O+ zu^BBorWzhO5rO?r8kzljhH^~iM{ub9`0!IB7oK}sB&+`sdmbf;F{n?6JLE)%J(B<& znuNB!KAB~;_xFn@SuaE_G9mU%AjBL7#s2;cYN%sMGzIIXI+GX^VG29kF{x=O_29t3 z^z?Md91(!TF{lYy3Bgb{KtKnk)bB;5!-f;_$T3KE9padhRMn&soroq5cSjP*#7sPy zR=bZJ8Zg`V<_>IB+cq~eMtY{9oF%72uRPs&!AP-F?hBaU6Dvo?x(iTV~ljil9Pwevct~r7Un7 zUpH)zDoh!e^6rCFB?0?)ci%UbC$o5%M)JrtQaEtHVL~iA%Lv^g)+-=)X$L2;O*Hhd zYzMD?+suI0(!|WZ+Py)^jWOuZK>5vZ=wecu0p_untyieAZp;0S_$bcaTp%YfFuNz^ z=)|PPbbF&VnTUbzhb1``OU@8l7_L}yED|&PDMh{<1&W7ZKT(K<89tUn-wn4}&+wSI zs?IisLS?Ma4;`V1Vct z6Txjo3q{csp=?5jl%3S8YEV;H7eE^U6_agv2cLT`JT!RrX)>=*Boz_?71Fp2{~xBo zh6<(#64VWWIEGO%My7OzUxsTeCPx&b%1lyZHJMh%WW!5?CthPXlB(eb(;AzW45vDy zfHTowOO(NDghpPbCZQg=_LSQ0EjtB%G%%~uuN^ZX0EJ|gKO@l}pX@`H{C z9MXEbj@3$(UgfBY$aVGTJND^2j%2>~eSOEd%=s7f9T!&H3k6uI)jqDi zVQFx6pxIY(pF{9~f>jpm=PDZCJEm{x%lKe>5?#AL$M?FM+cFhB_g(l3vsQ(FVVmyj z_|-+d>v6s7sNVJTUEkC9J(TI^e3c7uuM) zFmSbhQC+K7Z_}%LGQmT7^TRJGnKH<@xIWCziQ!`Ok-cx->>`oGyeWBTDC4p%V+=PaJKWQ zY|C-I<@mL#TxHXH9XAIul|VSJZ_i4w|5oB}FaAwZKk`C0_@W+sF%P^e3NWrdVQkzQh-m0ll(Suk5_#y<52p`@pyRbD$96`VtNLb59-XGVKxG zb(~-6?9w~;>YYdQ&ZmCtSg6L#VtELK8+4)Vp3r$$=)5)Z;qi>nnH2_gVK5^Mt_a>A z*Xh0%-M4-DrL3?=7xvr}_TLruf7Fn9ZX_cBpP$!-=QG0dbe6Sc>3BBKt_RxZPXN9B z^>2;cn9NkRt#VFR8%^Lvy)BffB-5y`?M~N+t@@s)KW)tH8Da@v_*=97t-60}#=rIR z%37EmNfZ8g=U}z-<7#2B-t%!2kI-gqB;AWy8~-;5)*J3OJaz{OyLR!WyS&51J~$j` zOnU@0JT?akaGeh<4UUzxtYxOvQez%RX3h2Xg*QF6Hr-}9v|(8`CBfA4VM)4v&3z3X zJ(BBn?^RxMzs_CvEE6SN_t?jEe2rBJP8p@6vHB}{aBAjQF6nO(utuCH|7_4>OM5Na z!0cM0{Tp0HytjSpETpA9vutHjg;Z(RTw$}Y`psb;*4iwt3brv?wl>Lc?}hTiIbqqd zs})8_Z>DWm*;^(3v;63bwhmZBn2pqgRkT19OV}(`mK{y1w)boe&NUSJW?$PirHbRM zu|rcXVVst|tN@GNc6iDQT7NNj%3Ad~!441Y+U8%Xwa=7o4lJxL&Vf{GD`DBRiY098 zx8dl?{wvkl+x`aIeJOTXajD)uHrmA#oYe3O{;JE?3v0wuuy*}nj=2|LNfXJ9FxM}WdgfFUKA5y9HFm8>j_*e z`o!tUC=Mc{iLqE(g3}F^up}~3#UUd3WSF`P<&h+7Iw`4gj2+Egcx0)+D6ESI;rgT46cQ>sNT~#h#QvgJmj$6XNvge{{bDo@!M-0Rqc{$1 zzZ-N`6{q&8Bur2ygd%j(7nlW!O=`Y-P`jff#um0DEKM{L-Unn@HslC0*QDiBD6p;CF4FA?cx(ZRhFL!}|zU6qEyUs6LnWYgs zg@Q-Oz*TOJv(XQW;ywxloE8Mi*Pi1Ja|^plPZh5_%9oV*l0A;r$rsRk%9jsYJHC8= zDLh*V>kO?3K_Y(;$I!!?vB@NCR{hq-47!yLbfQF)q*l%2?Nf*aok}Mqkh_jDia;eA zD9+EDC)j{T=lx*|-fWLuZ3`V@sP^ao^V~yZ7aqyME)) zd-i7zJgfJdx$kuBX?nmRc>hu_dH zLtvUb;X&Rd;9sy=}L8Z75%tt$q(j;@cS-(LFU(#P@t z5MOm7FW1m~;}nY(ODPf5ooxYD04+>M9@^yAaw=iu2c2+$fG+;3;Y%jM<~lO0nB8PL z>kKGz9L^vm)yOI`+tAzllK!jzHoWMa57`?R7xh3uzWE!TVIB@J@l8-${^3W9&BdbeGKmn zPoC71p(O>|JKS0b1(XpA$WcKVLST4cEQYJ7V)#r7e=+&0GD*45Q$Src1Qnj5MujH7 zs)eJ86s*tgi)l?uCX^Sc4DBdG(4sJ`xYU>|rwo@O!=pzbVa0H(lW8p)gUfat4&5@G zCxcY!hm_|r&H1VkFsD3hPPyq{QW=d;giS)Omh4oL^NGud;?bjQyDAq59tHmy|LSIJ z<*%{(zUttrTCTsm@bdhL6)4Y}SGoPJDi(YZs9yL%re$|Futz7Yv(LAk1z&7!U+%mW z_}l7i&&ll8XY{SlTpO~~>02l7RzG&1>j`XM6+E@i^Q+u9h7AR@&GqiT*L(DC@6l}U zF}?Q~!_@nP)Y!dxrWx<=JucWzuW&C=WmYbeTVeE6MEmX*`71l z``OKB_04BA6nZ>}$rq-n) zcyw+$sBb#BD11@hc;i53>tosay?Xs#sbgf=b=8Ht$#wVe*)%)+U>bbt#4oX z*_EGOy#cx>G;UvMZo3&+ma@$|_2!+K=AA414tyB;G??8tqVF4d&!IQ>=*@d_dk??o zxLK_??_O!%eAD|*#m$PPiq#8zVR6_B-KVvBU@cg2>DI)U9m-ad75M5Eo~x>%wTI{G zfF2mYBKm+62y&bEXV~AhXUWQOCRei~SJR5Wdo}HMYucB)Znfzh`?EC%^qK>?hK^OA zD^PWxL-2qC3>$%~0E|JrPhcNd4HTPN6Jvd~)ieu?@dbQkNPC~q_ko4OMQmOZW8iEx z%>oKo8lk2le zD)ZSU;Z&>dvsNneSsPFBZ7d!VPVMo0wvR_>@QE>t|Dz$IH^f=Ld<}u!;;{DQ6w*wH zJX;konq|w5fNItQk5r@=Z45lOu({MTs>q(olpK&8kQJPfN`PRp+H;UlafbjmOSGB1 zyvm%;^NyN0zr>kWBqp+(1qI=`oH#gWJE}~GJ%CG6W&)Ko8K+FR@BrI7ov9Th%|tqW z5$WXR$eJgUJZn5fohnMLW62n~5kg$e--|&)I-U^6A_?*tOwsusJ5r5ElDMYFP)028 z&~@JPmc;sy-#$c)5GNiJpx(@_m2nS9NPmQxH=JnF;KQbTRPgZgTn@8oQT_>vv|>ip zXAuF(ZQ`ox7k6KOap6U5d>2SAf@?e+`e4}dZO-|te{$;0Q;TEQhZcse;qwLA6Bo~4 zKf7@D8a}JOLLJ7y4Tm&t1aLBzVBYIwxVIq}F#?8M{}mBCaurcw4vuxV9c$HMpxKDc zea%8z$+?khHQd--b_84|^j`N!ZhI-9vn9Hg7KUS-*WNG5$IN0FQ}N~y3@s$&Rz$FW zO~gHJYHg|*0Rki>xWCdd**M*~5z{K6n1!X?s`x`I^M^&hTU29vAf+TPI`%DlGB1sbJt--KGsDOU>OuZkeqG0k+GY{E3r&XEAwC`N=WDa?^-XbL)%e~P-w8wgaw(ZUX_fa~;hn5~QQ&ye0vn{XNtY{JcS zf^ufD?p8xa2xWzkE`$*I+|vLq<*HzZ2H1*Qa{emXjZ2-^PG$YubpN({{;s?JuI1^h ze?a#S z|0uJIpNl0mARsgl7%s?12GqRVmdx)29NdCMu>EUiJva-+W@NxZIKoa%hLabk)KHi? z|Hz>eNH$-C2_n1r)hCv?@8EJDUGOr^WBHCS z2YhTd2HOGwZwMS@+qb-VH;h`M=Nr&$z26WThK;MQc&CCcT7dthV-fOHA}bd;N?}rL zHwMrPcGUwH7=XPSkr|7#o(OskVK$kJL!FDjZN~(R({?cJq~WHVXu|N3vyTcn1ACs5 z$g`({gawTyDhc2Zv}!NWJR*yR+f<0avn%sUMwUgR3D*kcV-e*TQ_IwmarGlzl2VBFA8OFrp{#lY_A;U?k->cN3S9u#RWr>1!Dfm+gZc^|b1^=9a zcMy!=?795B4$B&-*_qqYxh!W|`*KZN zf6ul$xb_{Z{hO#k1P>@!wFiu@GIiK?nn&}(M4w+EVi$eZ%GG2cEH6*n4LtB0E)i3T zCwpt*kwCJ6;KP>_wIsSCEX>|ul)=PGwz~^gwn}d~DRO^a{En6|uAz4~q1% z!~^TL6t*qhC!#I%t$Wn8+6)1QX+oK~LYbi$$zja40lP{w;wtfmJQh|n*yNkR%=T57KQ5v7jTO*=cz2-q2yg#R=iaUfki3nZPmT48EE9}&ToteU)X~n8J&nS|3ywINEGJOK!_5n+pMjf$<#TIV-C-lpX8}=24w&f^~ z84@nB+eK5Xy5mu9DdIHDI0 zrVWnxR zFQ|y1B$JxqBYp_KE^TrRi>TKw6?Z0Lv_#6kLB*fZ2K@s>ARuqyYU-|Q3)(dy=k@=j z`pxR4isj>3ZxHT88E=r%0&fPcS1(jwt6phn(;If)+40foOv7-t0p|7LYd$LBf75@x zYM~15F4fH$Z?m~qEAxBx1bS!w>_u3cNzpjt_|b}J3aDu92y}&}!-@YdA0qh1ohsnW znn=*Pr|eD@9&M*WF{RemJ(6=`ou#GpjJtSmhITc?aR+|x0^|C?8rxMD`b(o*_t+^A zcD4)L!4)BwMTVg3cQvhaey^?D(3DqJ6#nKtTmrI)yp(9Jme@mw6+Q4+kIBKjO3JFR zwIq&%Z$xlN04@vb_a_5o!4;6l6r#~1OLVq!sGeG|3l+$~M*Q!aX$OHar-iM^I&$%k zCKbwG0xduxW_^RWZp(T;>+B8T_`{?bY;&`@R{jblm4AmI=wZY|`4^P%*9hq66*L^; zn}nkpgoAwC2^fjV%Du%VCV0%-OodY#*dw_%N4}pL=`_7QF5}5iB(jseYWvD z(zQvl3r#~@5T})7Vj?sx89&{I4UGR!9MF!mO}8Ub7RAdg=KVjjmqekkY|F{1n8;@Gq>*RCgMTo1>dfG=Gfx|prvOjUo>r8kV$|b;0kweN+6WbX(}+3rDkrI% zBh)i5{csWKY)0kq`S5dR21iZ|pF3*^^gAfHUyVEC<~iFIs?klsOB7t7x=zS7%*1N= zECU;}_Avd2$(_n`RGJtZoS#9pARH3eQa+*-?+b(HhE5HgJa4$4K6h^T+<9e;N=GPY zMexvj2)bH2CLd99_(}{$?ZkY-`IqN&T;)9b=QDuX7&ga6I2q4083&lrw*Z z2GT+YB5sb~mEi_T|H$pKW8Ryq>zc1dyt-~7Heb2w-pT_Sf+bkX@VeD`OTF{dtygb{ z*w?keQJ#tlOXrujFTHpZ8YET0(HdTBgQI+mr&J0T&ztY%&Smx1Q_HXZ63~mew)iW~ zXIV80m+DtJdM``nyG;0!qnd}=9loygE>CH_bqjF3Jn!#M-nN^Qa0mumE Z-Skn(!SJsuzQ_H0&!Erwv6n~qe*g Date: Thu, 29 Aug 2024 13:32:53 +0200 Subject: [PATCH 093/168] fix pyopenms workflow --- src/mzmlfileworkflow.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mzmlfileworkflow.py b/src/mzmlfileworkflow.py index 7704199..090af04 100644 --- a/src/mzmlfileworkflow.py +++ b/src/mzmlfileworkflow.py @@ -72,6 +72,10 @@ def run_workflow(params, result_dir): @st.fragment def result_section(result_dir): + if not Path(result_dir).exists(): + st.error("No results to show yet. Please run a workflow first!") + return + date_strings = [f.name for f in Path(result_dir).iterdir() if f.is_dir()] result_dirs = sorted(date_strings, key=lambda date: datetime.strptime(date, "%Y-%m-%d %H:%M:%S"))[::-1] From afe6c0797328c10dd2821eac1a43a72ff55a422f Mon Sep 17 00:00:00 2001 From: Tom David Mueller Date: Thu, 29 Aug 2024 13:51:26 +0200 Subject: [PATCH 094/168] fix download section --- content/download_section.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/content/download_section.py b/content/download_section.py index 3946fe6..8856a7b 100644 --- a/content/download_section.py +++ b/content/download_section.py @@ -49,12 +49,14 @@ button_placeholder.empty() with st.spinner(): # Create ZIP file - out_zip = Path(dirpath, directory, 'output.zip') + out_zip = Path(directory, 'output.zip') if not out_zip.exists(): with ZipFile(out_zip, 'w', ZIP_DEFLATED) as zip_file: - for output in Path(dirpath, directory).iterdir(): + for output in Path(directory).iterdir(): + if output.name == 'output.zip': + continue try: - with open(Path(dirpath, directory, output), 'r') as f: + with open(output, 'r') as f: zip_file.writestr(output.name, f.read()) except: continue @@ -62,7 +64,7 @@ with open(out_zip, 'rb') as f: button_placeholder.download_button( "Download ⬇️", f, - file_name = f'{directory}.zip', + file_name = f'{directory.name}.zip', use_container_width=True ) From d0c7545f5c62cce6020674a5a69c981bb34012f4 Mon Sep 17 00:00:00 2001 From: Tom David Mueller Date: Thu, 29 Aug 2024 14:04:32 +0200 Subject: [PATCH 095/168] fix exception if no run is selected --- src/mzmlfileworkflow.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mzmlfileworkflow.py b/src/mzmlfileworkflow.py index 090af04..4997b5c 100644 --- a/src/mzmlfileworkflow.py +++ b/src/mzmlfileworkflow.py @@ -82,6 +82,10 @@ def result_section(result_dir): run_dir = st.selectbox("select result from run", result_dirs) + if run_dir is None: + st.error("Please select a result from a run!") + return + result_dir = Path(result_dir, run_dir) # visualize workflow results if there are any result_file_path = Path(result_dir, "result.tsv") From fcc2be20a8229ea21bc0961d3dcc7705dceda82b Mon Sep 17 00:00:00 2001 From: singjc Date: Thu, 29 Aug 2024 16:06:31 -0400 Subject: [PATCH 096/168] add: on_change callback to reset indexing page --- src/common.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/common.py b/src/common.py index b20dd47..8b510dc 100644 --- a/src/common.py +++ b/src/common.py @@ -263,15 +263,17 @@ def display_large_dataframe(df, Returns: Selected rows from the current chunk. """ + def update_on_change(): + # Initialize session state for pagination + if 'current_chunk' not in st.session_state: + st.session_state.current_chunk = 0 + st.session_state.current_chunk = 0 + # Dropdown for selecting chunk size - chunk_size = st.selectbox("Select Number of Rows to Display", chunk_sizes) + chunk_size = st.selectbox("Select Number of Rows to Display", chunk_sizes, on_change=update_on_change) # Calculate total number of chunks - total_chunks = (len(df) + chunk_size - 1) // chunk_size - - # Initialize session state for pagination - if 'current_chunk' not in st.session_state: - st.session_state.current_chunk = 0 + total_chunks = (len(df) + chunk_size - 1) // chunk_size # Function to get the current chunk of the DataFrame def get_current_chunk(df, chunk_size, chunk_index): From d73ce80d46807a06c112d7c62a69267d63d7b631 Mon Sep 17 00:00:00 2001 From: singjc Date: Thu, 29 Aug 2024 19:16:33 -0400 Subject: [PATCH 097/168] update: display_large_dataframe for flexible st.dataframe params --- src/common.py | 17 +++++------------ src/view.py | 15 ++++++++++++++- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/src/common.py b/src/common.py index 8b510dc..3777661 100644 --- a/src/common.py +++ b/src/common.py @@ -252,13 +252,16 @@ def v_space(n: int, col=None) -> None: st.write("#") def display_large_dataframe(df, - chunk_sizes: list[int] = [100, 1_000, 10_000]): + chunk_sizes: list[int] = [100, 1_000, 10_000], + **kwargs + ): """ Displays a large DataFrame in chunks with pagination controls and row selection. Args: df: The DataFrame to display. chunk_sizes: A list of chunk sizes to choose from. + ...: Additional keyword arguments to pass to the `st.dataframe` function. See: https://docs.streamlit.io/develop/api-reference/data/st.dataframe Returns: Selected rows from the current chunk. @@ -286,17 +289,7 @@ def get_current_chunk(df, chunk_size, chunk_index): event = st.dataframe( current_chunk_df, - column_order=[ - "spectrum ID", - "RT", - "MS level", - "max intensity m/z", - "precursor m/z", - ], - selection_mode="single-row", - on_select="rerun", - use_container_width=True, - hide_index=True, + **kwargs ) st.write(f"Showing rows {start_row + 1} to {end_row} of {len(df)} ({get_dataframe_mem_useage(current_chunk_df):.2f} MB)") diff --git a/src/view.py b/src/view.py index e5c9963..9543955 100644 --- a/src/view.py +++ b/src/view.py @@ -222,7 +222,20 @@ def view_spectrum(): with cols[0]: df = st.session_state.view_spectra.copy() df["spectrum ID"] = df.index + 1 - event = display_large_dataframe(df) + event = display_large_dataframe( + df, + column_order=[ + "spectrum ID", + "RT", + "MS level", + "max intensity m/z", + "precursor m/z", + ], + selection_mode="single-row", + on_select="rerun", + use_container_width=True, + hide_index=True, + ) rows = event.selection.rows with cols[1]: if rows: From ecb32174b071c0599dbdc674a4c7b908b19e4bca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Mon, 2 Sep 2024 13:22:22 +0200 Subject: [PATCH 098/168] Update content/quickstart.py Co-authored-by: axelwalter --- content/quickstart.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/quickstart.py b/content/quickstart.py index 3632876..6ba8e5b 100644 --- a/content/quickstart.py +++ b/content/quickstart.py @@ -81,7 +81,7 @@ 🖥️ **Workspaces** store user inputs, parameters and results for a specific session or analysis task. -In **online mode** where the app is hosted on a remote server the workspace has a unique identifier number which can be shared with collaboration partners or stored for later access. The identifier is embedded within the url. +In **online mode** where the app is hosted on a remote server the workspace has a unique identifier number embedded within the URL. To share your data analysis with collaboration partners simply share the URL. In **local mode** where the app is run locally on a PC (e.g. via Windows executable) the user can create and delete separate workspaces for different projects. From 3d9f879329e34ddc42c3b2d7276f0c6390e6878c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Mon, 2 Sep 2024 13:22:40 +0200 Subject: [PATCH 099/168] Update docs/toppframework.py Co-authored-by: axelwalter --- docs/toppframework.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/toppframework.py b/docs/toppframework.py index 04989f8..87b666d 100644 --- a/docs/toppframework.py +++ b/docs/toppframework.py @@ -61,7 +61,7 @@ def content(): The subdirectory name will be determined by a **key** that is defined in the `self.ui.upload_widget` method. The uploaded files are available by the specific key for parameter input widgets and accessible while building the workflow. -Calling this method will create a complete file upload widget page with the following components: +Calling this method will create a complete file upload page with the following components: - file uploader - list of currently uploaded files with this key (or a warning if there are none) From 482fd65994410e020da2fa3193be6d612ff8a5e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Mon, 2 Sep 2024 13:29:37 +0200 Subject: [PATCH 100/168] Remove redundant gitignores and pycache --- .gitignore | 1 - content/.gitignore | 1 - docs/.gitignore | 1 - src/.gitignore | 1 - src/common/__pycache__/captcha_.cpython-311.pyc | Bin 9835 -> 0 bytes src/common/__pycache__/common.cpython-311.pyc | Bin 20309 -> 0 bytes src/plotting/.gitignore | 1 - src/python-tools/.gitignore | 1 - 8 files changed, 6 deletions(-) delete mode 100644 content/.gitignore delete mode 100644 docs/.gitignore delete mode 100644 src/.gitignore delete mode 100644 src/common/__pycache__/captcha_.cpython-311.pyc delete mode 100644 src/common/__pycache__/common.cpython-311.pyc delete mode 100644 src/plotting/.gitignore delete mode 100644 src/python-tools/.gitignore diff --git a/.gitignore b/.gitignore index 18071ad..9cd6ab6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ workspaces-streamlit-template build myenv -hooks/__pycache__/ build.log run_app.spec clean-up-workspaces.log diff --git a/content/.gitignore b/content/.gitignore deleted file mode 100644 index 763624e..0000000 --- a/content/.gitignore +++ /dev/null @@ -1 +0,0 @@ -__pycache__/* \ No newline at end of file diff --git a/docs/.gitignore b/docs/.gitignore deleted file mode 100644 index 763624e..0000000 --- a/docs/.gitignore +++ /dev/null @@ -1 +0,0 @@ -__pycache__/* \ No newline at end of file diff --git a/src/.gitignore b/src/.gitignore deleted file mode 100644 index 763624e..0000000 --- a/src/.gitignore +++ /dev/null @@ -1 +0,0 @@ -__pycache__/* \ No newline at end of file diff --git a/src/common/__pycache__/captcha_.cpython-311.pyc b/src/common/__pycache__/captcha_.cpython-311.pyc deleted file mode 100644 index e7d55e17c06850e43505db321f21b12fa69b6aef..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9835 zcmd5iTWlLwb~AjxMT*pmmgJG-SfQ+kWl3JIqB!t7wqqq5%c-rb!=*SQi89F{W`=&K zRLWhX2pzaxIaSs|kRZfjH|uUvtUp@RD7NSp3l#Zi0FE%Ihye@)D2&!01!yD&-2AlX z+~I2|DM`PYE6$y{uXD~l_uO;NJy*YRyB!py+{MEDQV&J_I~FR*QvUezDSX_aSc;|N zRDzzRY5X?C4YNk_HYLna15G6?vsTh#jN20SS$o1U>qt0foe9^hi`1Lq?u2L7Qy$$k z+eAitXT9X@oAnte&briGLC>0@Ota>XX^Q#;9xZ)p`Pcwuc(gR@XRTa-wXueI6Kj9V zG}}VTj&hxabwXWhT^|>e+Zy_~p{||v%yzI%vq9E7yNmU`Ma_1yhVxXY`4J)t(W>c{ zh_pBzGO5j}$O0FRMfqenl4QflNP<&s(MUWRPOuZIeSwq0*h5r(Vdz3W!_mb^a)Dz3 zjO%m)8jnR%64a@#1vVvw0hGukB}9?}Bx)cLi6z5gREVVzmb4faB|)_aoRk)l(JC*1 zE)zUPc)nC1yF*EJZ5c|>xfObWS}|nkd|e+HR8Akm`;$t6I!;~Q`(xnoigCr1F|l+< zwIxGcL41_Zk}>3~t59u*kBm`|m!@v@XAA(*ykgAI8RPTREsJEWjab4tkff&pe)F1L-&y=Om7a#N!NMDZ^claw&Hj$c|DdvM!J!T!HUOkkOmDIb}i$0l`K>p znrS}CY3Nluksj@>XE_H4F>Hd;e+>prD*Ux_l9`$=}wku&Bl z6rJAHU5c}-&@-{&oG4MWy}#%RZn}ClTs`?d*|k@3?JcrO!XQA@@5(uLN4`k7LaYZ2}8|MS~_?C@h08#&Ln(nUb4Ap|gMfvmO*gjOi3&a&Jh1ws&NhOrX| z*|s9PRaW~@R{Qj_n(x?f4xp&^6}?^S(So=4=?)?&v;!uc+O|Ulk-onKx%d|8qot~R zfO2hA>L8m-Rk>#AWzZKZMo{#oj4@v~4)B!|YtXA_P|UwwF-u5MIc3cGI_a#`HcF=+ z%8EsD*Lr3w4XsuQ*RGs04JMuJ8QY3o!c{FNspGmB zO_d%L#Woly)>JcZ`td7{j46+*V@t|7GS-YeW6M}r^9QE+2A+b+`vgYT&AA4EwY)`r zYSrVRsf-EMVTf?TvEs})SzC=JDA{!-hpyzTm5>%NvAWSyfcn<3)KjBismkXq`o;wY z*S-92MBfOUDDgtQ#hvHVNtOXqi#E3xjH?7Tsh4460vCm@U<~>1tL;T)qFT!&e{C8- zYet6!+&O=3QoTfXmHn;7h`30UifTe1Pj%M$VY*F>gZ=P)iL!bJwr0Jb1dKFHYw*!| zq_2x;K^UTszP3%pBZ)aSa(KC~%;lO%9iEEw;97`>;X~_m4F-z12eMSYCx7Hud$JVK zC?Q(YcnmaYS`Zgm=!I-L)U2sYQ~|0b6+!PoH7&&XIn{{1q!sY;@vEGGJ6%8zOf|-! zi-8vfM5Ws1BH)3bYikn0El|y33Oob>Z9UZRf>fu7U7D9-MlOn~x6!B4TplqDa-up& zpD;Qagiy7qj=RLmHKxQx)sTw8lLXHw$#U1rJ`)>}A|mc|T+B++6ufT>8-?ef;|X}g zKL^Hxns24tt%cSB*|kq`?aQ73Ro&iM=-e;2jVf)U1ycZA3tx}o?Y|q6y<^$aP;3rl z&%mp_=gyn&zL}qw+lG|3p%T?@c91ORd>HInzp~jqy3suYvG;e#O(DGeWU>PyVdz+pqZc-?Zcmxua0!3%qx9?bK#q&qiQR{&nS<2{~|32^`!E zOl<_F?w^+fN0h*kKlCVp9m+0bgk`z!;6Qc)e{@2}$fz2I_p9_gQPLs`BEw`gOW>G_$3zK^ zTB*a!oiHVGtg1HwmDUenlz0HLr&+4dd_nuI`|i`fxBQdyADn+UEgzaz4ow$co!K}v z1Ffs0)m~)Z30*Lj*dt*#d`*WOH3K2^W81Tsg)keytZEqQ6upBedd=31Vkaa>7{d&$ zjxd4QLCk)D*&)b?;bMMLSz%3G+bS~^jzgEXv6~DTObrf@|5r8be~qqAbv^b`^8Mu9 z*W~VTrF$Hz<>m_taO<@{QJODi&pv4FSl_o99NGvD$-xmNI3l<1S6cUHUj}vT^sl}k zJNgtyU-lRjJxtyyy9X8b;7?CxkLC;|8`Z@WTiS}==3?7k(0$Do(0$F8?1^08PtSal z#(RXEjIDx(d-S*P6@{mo@c57N@TCV1{SacKrD_xSy)Z;eS81_r`<8l_gEeTU%vGZh z-oAI8f;857jdlL7aC?W5NF_|&H(+3t|w6l*Ir9{&;!*$~&>KaW`mta;fuj;zM8rdo^*@iO@ zhOf4t2TM=EAlABl>s4AaO&r zs88+sS?kXwd35)-B-X(?^`my^=VIOZe%sHO)r?p@SF0x!)}yD0oRBC`)>OXkgjgey zZPNEAa##-;RX<6rSKkxX6_sB(NvH!W--DGe;FnK7BM7J(@)!i$l6IPFZQtqfuNZZ5 zRbA7q;Z$9}8mF3B|3ZU-BHS{qn8E$2p{=8o4X`brwl>Vjk}>BoMzSTbZF-8~)N0P} z+R_aw*mkz#)1V%%@ShpW4sx=KwdwmpG@%Y`O%Jlx+BEW=bzQ2TdJO;=zeBG)n#L_j z52+l#JH8WL&w~?@uiIBOaC$hP6*_l-L9~KyZFkgH$qTxEXwXSwyBb$$2VBXJJX=ot(FQ6Tjsm1Ze`8qsqM8Zw%`-$j{Fsz6^OTb3_=Y8ABW%q%fOixgP$a% zkCFKZbL_|~Gsj*$f_@>F6w?s0!1zR3xnkWzPeKEx+*;sOck+|zXD}k!rJOFi^z_FwOt}Ni@h|?gIrw$hq1c*j9%ueKh zT%MT`(%f?l4~@dLn8*z>F^Lg4JfDlqNr*92?ki4fXex{Z0I?(?DJqdMP$6&&T#|#E z6d(hap&p?qK{fKajJ6CKC!pswpyV0231j0xzs5?OS%jG2urVHFWECDd~ zTZ7W7y(}Pc{-o+%;Q56(2RDI{_zfu*6;&&QP3GbpJDu)lfexX_`cY!2MbVa4%sBlE3Usma(kMOX(>?&Wu49)XGVp)78&OvAfM7=6J+6@g8 z0k)y!Fw?xmO){{kfKp(}qpN!%iq~cwJBY1JBDSz7!8s6xi$@7Y(zS6BmYIW4)D=z` zhVzX1T8xF8Ny{RKBOaXu!XBZ%TW&r<2&rH}3WO8T06{N%B61yXJ_T{v(AT%z^crqm z?aD05vz%&839vzg8+h*tH)`D1G&7S9z}V79@84xKwjkNp1U|VCVpM}DsqXTULaYdc zPPKu^Nw9nnc9KAjuE1yIHdVEXsaO(ZR`tPp;r%MKBw&xh7Y4QXlxil@rkbUg6o)|9 z5+6&#Eh~r#pMYTDA|H!FJj(*{G61VKMZ{<<7EZ$@oe+f;P%Uh1Ats5cC(b1o;EuM; z0*tMJ9*DyHqI^7^NQ$ZnR}R97NqD2fD4fS^1~S!Fkywazp|VgN$iZ+dnMzBl4Y+fK z<*y~xW`qzH({qWK6rM{<5(FmAasC?2&W!ZITp*+-!8IT!2)q!oswO}_D&P_cDMVz# z@R@3ej>2<5bt18m0}zP2E{Uk)akE0w&Sy>KsURy+6ACNP(~|A)Ow zaG+ovC{YvU;NQ$C!-wzxsWN=_v-HOB%ww#BQ(I;k&f9scISN{_mzx2+f)i-7L zUd6q)MD4N%N%qj?xpk^!pnN9{fXa=i+#a~Wa(j?hJ-<%>-D`!wlpL5+0#msYMSuI9 z!|xvcb+6KU;NB0F-sffiVa0zqcl-f>d2w~-=Jc)U-1GzB@oc_1|7zYQw}h0I(9M&% zqpOBuu=As#_lFA4PJKqN!=d_&5n7RNrMS8ZuC8K}Z?kF7M$?|c zGY9WqDm3kpn@%ZBr%II99V~W-v>@uezI%e)J*jk0t~wu*1<#*W{KK36@eTjD>_4dZ z58mImIeB(t@~k|0PMJKnIeC6#^1M8GL7BX;;lBXEPT%ea?Lnpe*}ENu_OW81{mz+p z&)j}#?WNV1isOggJE~x)RSt|k00AmX%<7r402R8%wuI$cNN+v8b^WL zT5sFe?5pL&nb!na)jFKYxLSJk$m175;N19-9+j&r+%#)P#1;FT9TBwrY8} zsusoJtD~x;R#Xj8c8hh2Q&d}O<3unoQ7)X8VsUbXpv8>P6V(2P!Ch7(!$h-bnvcWQ z1RLmfJ^;xgnVBTdsqs=c896{*%jeU diff --git a/src/common/__pycache__/common.cpython-311.pyc b/src/common/__pycache__/common.cpython-311.pyc deleted file mode 100644 index 1de86da62840c5076f2a7bb07eed6650abc63a11..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20309 zcmd6PeQ*?KnqT)!&zCf#ZwU#3XbB-{gfs#SHeg^8#$Yf=UXag5YkPK3x1khb7F95YqcAEmVG#@+S>K8W%iD{ToNa_tJtoj)=pijW~i=Xsw+x4mvU13S40`7 zT>O>a^Y%>7v^28uUL}FsykkLUe*-skIm-ubgYpn}8m%4lZXcZ}oyJAElUzI^1% zEe?)*o0B++k8z{sn;+%bcgLuMy`7^@_7+A3_I8cB@OH%9anGoSr#jAdf|;V#+yc)kmnoSBvp(y%g(8m!XQRBOMOzM+$#CyE%H{`Gw!gmxN$)WyzUxp zld9I|Nq&h(e)a3Z=r*Zes+G5H0HF>L#6k&HryeQoQb=l$JMvH(k+L0Sn&j%K&O*+N!?L?v|s9xf>N)v z^QLn&B=P6D;I7|M>q9}_a1JJB@DiSjXp{7w)Z($A!*GmTGAhQSFo9Er!GnmCwB&DN=ful<@FPsJjdYLT>5X zKIO{b9H)Lyt1On7<0XgWye+&B*dJK%_iuc9`hTa~C)spTv>U)+P7<+t%ltKmt#MCayxnb0!&)#8gCy#AQuZRB>EM z#>I$u`uy;aNLV075|U^x9g?N!m=;YYBFckw+nzeLF!VX|nE=OW%*&4nz)YAEkjEyA~2{2E+$J3ZnSsA#LoQz$J0KJr0p^xis~tvsk#9-KeE>gK%uH?F*P z+yszU<`$}WWjSEYE_|uneymalv zsuO7}g9Z1g$O8(BY2{*HfBkjY$*!JzZwpfK3)`FIzP@Doqtu^#6qJ;Jd*&nE*sLS-`wmS;-GG1*{B$S*v^ zrp#yAVmyTudfQpeaqeaDC6v3$UvsX?*l!47TH()e^R$YL=aZ}zx9DNWZ*KN0*Es|76pGReOa~#->H`0iqGpcZ& zs45YniRfjJ))I=99531RL`zDT(6=y`NDNYlG$U@vWRjP`KNJv85KwVCs!g&kB;@Im zCfBi=F#shRDN?yIENv|>!(bG7OiO|{67^RLBQ4TOYL$2zn~DGbxsch6BQ7obUYPwF{)-bQOs~L*+XfjTu%~g6GELzG=un-sI*dg zC5@%PY`T$h1pn%PLjY#e!)x$^lXJg%}t=k*ukinKvZ3$hfr#CWzctkHHU zjJIlode+FL(iW?WE&eGd)%+vs*1qSG>ZH2c_3QX+LwTr|dG&x~&$E=+%iN+vvC9Wm z-V{+7_LPTP%%8H<-Ajb!+#;|1y{(RgC(9)gg9)2LyYvH$DQ0m~HH9y~M_o(mD#3%s z;!3E4Qj@JMt9+O!CwsIVg&1}l(M;IPzr0#Ve5Sv+_6Kp zl`hVWB^0+1QbRz z^o4x%rL7!P8VgpVOv-TuYrm+q3^$2u=1j+8u76@LU*QU|{^IE~a)Y0*% zg7qVc>|{-W1<$gBS(*tmPnxp0;l-den3B|4*oe#+vtcU47>8zS^Y$gv_8m$kCJbR3 zYKI|2(poa;GAd{sVJ)h~WW&eeQLLoljzwl5cpHtdmTEAnhgDR%7*X;DsEW9pNQaqV zKiivcA~i!MsJI%|lt==WQnD|GVNAL-p(N7@iM3sWys=B@E?MPO6fkNglF5mf9F8O+ zu^BBorWzhO5rO?r8kzljhH^~iM{ub9`0!IB7oK}sB&+`sdmbf;F{n?6JLE)%J(B<& znuNB!KAB~;_xFn@SuaE_G9mU%AjBL7#s2;cYN%sMGzIIXI+GX^VG29kF{x=O_29t3 z^z?Md91(!TF{lYy3Bgb{KtKnk)bB;5!-f;_$T3KE9padhRMn&soroq5cSjP*#7sPy zR=bZJ8Zg`V<_>IB+cq~eMtY{9oF%72uRPs&!AP-F?hBaU6Dvo?x(iTV~ljil9Pwevct~r7Un7 zUpH)zDoh!e^6rCFB?0?)ci%UbC$o5%M)JrtQaEtHVL~iA%Lv^g)+-=)X$L2;O*Hhd zYzMD?+suI0(!|WZ+Py)^jWOuZK>5vZ=wecu0p_untyieAZp;0S_$bcaTp%YfFuNz^ z=)|PPbbF&VnTUbzhb1``OU@8l7_L}yED|&PDMh{<1&W7ZKT(K<89tUn-wn4}&+wSI zs?IisLS?Ma4;`V1Vct z6Txjo3q{csp=?5jl%3S8YEV;H7eE^U6_agv2cLT`JT!RrX)>=*Boz_?71Fp2{~xBo zh6<(#64VWWIEGO%My7OzUxsTeCPx&b%1lyZHJMh%WW!5?CthPXlB(eb(;AzW45vDy zfHTowOO(NDghpPbCZQg=_LSQ0EjtB%G%%~uuN^ZX0EJ|gKO@l}pX@`H{C z9MXEbj@3$(UgfBY$aVGTJND^2j%2>~eSOEd%=s7f9T!&H3k6uI)jqDi zVQFx6pxIY(pF{9~f>jpm=PDZCJEm{x%lKe>5?#AL$M?FM+cFhB_g(l3vsQ(FVVmyj z_|-+d>v6s7sNVJTUEkC9J(TI^e3c7uuM) zFmSbhQC+K7Z_}%LGQmT7^TRJGnKH<@xIWCziQ!`Ok-cx->>`oGyeWBTDC4p%V+=PaJKWQ zY|C-I<@mL#TxHXH9XAIul|VSJZ_i4w|5oB}FaAwZKk`C0_@W+sF%P^e3NWrdVQkzQh-m0ll(Suk5_#y<52p`@pyRbD$96`VtNLb59-XGVKxG zb(~-6?9w~;>YYdQ&ZmCtSg6L#VtELK8+4)Vp3r$$=)5)Z;qi>nnH2_gVK5^Mt_a>A z*Xh0%-M4-DrL3?=7xvr}_TLruf7Fn9ZX_cBpP$!-=QG0dbe6Sc>3BBKt_RxZPXN9B z^>2;cn9NkRt#VFR8%^Lvy)BffB-5y`?M~N+t@@s)KW)tH8Da@v_*=97t-60}#=rIR z%37EmNfZ8g=U}z-<7#2B-t%!2kI-gqB;AWy8~-;5)*J3OJaz{OyLR!WyS&51J~$j` zOnU@0JT?akaGeh<4UUzxtYxOvQez%RX3h2Xg*QF6Hr-}9v|(8`CBfA4VM)4v&3z3X zJ(BBn?^RxMzs_CvEE6SN_t?jEe2rBJP8p@6vHB}{aBAjQF6nO(utuCH|7_4>OM5Na z!0cM0{Tp0HytjSpETpA9vutHjg;Z(RTw$}Y`psb;*4iwt3brv?wl>Lc?}hTiIbqqd zs})8_Z>DWm*;^(3v;63bwhmZBn2pqgRkT19OV}(`mK{y1w)boe&NUSJW?$PirHbRM zu|rcXVVst|tN@GNc6iDQT7NNj%3Ad~!441Y+U8%Xwa=7o4lJxL&Vf{GD`DBRiY098 zx8dl?{wvkl+x`aIeJOTXajD)uHrmA#oYe3O{;JE?3v0wuuy*}nj=2|LNfXJ9FxM}WdgfFUKA5y9HFm8>j_*e z`o!tUC=Mc{iLqE(g3}F^up}~3#UUd3WSF`P<&h+7Iw`4gj2+Egcx0)+D6ESI;rgT46cQ>sNT~#h#QvgJmj$6XNvge{{bDo@!M-0Rqc{$1 zzZ-N`6{q&8Bur2ygd%j(7nlW!O=`Y-P`jff#um0DEKM{L-Unn@HslC0*QDiBD6p;CF4FA?cx(ZRhFL!}|zU6qEyUs6LnWYgs zg@Q-Oz*TOJv(XQW;ywxloE8Mi*Pi1Ja|^plPZh5_%9oV*l0A;r$rsRk%9jsYJHC8= zDLh*V>kO?3K_Y(;$I!!?vB@NCR{hq-47!yLbfQF)q*l%2?Nf*aok}Mqkh_jDia;eA zD9+EDC)j{T=lx*|-fWLuZ3`V@sP^ao^V~yZ7aqyME)) zd-i7zJgfJdx$kuBX?nmRc>hu_dH zLtvUb;X&Rd;9sy=}L8Z75%tt$q(j;@cS-(LFU(#P@t z5MOm7FW1m~;}nY(ODPf5ooxYD04+>M9@^yAaw=iu2c2+$fG+;3;Y%jM<~lO0nB8PL z>kKGz9L^vm)yOI`+tAzllK!jzHoWMa57`?R7xh3uzWE!TVIB@J@l8-${^3W9&BdbeGKmn zPoC71p(O>|JKS0b1(XpA$WcKVLST4cEQYJ7V)#r7e=+&0GD*45Q$Src1Qnj5MujH7 zs)eJ86s*tgi)l?uCX^Sc4DBdG(4sJ`xYU>|rwo@O!=pzbVa0H(lW8p)gUfat4&5@G zCxcY!hm_|r&H1VkFsD3hPPyq{QW=d;giS)Omh4oL^NGud;?bjQyDAq59tHmy|LSIJ z<*%{(zUttrTCTsm@bdhL6)4Y}SGoPJDi(YZs9yL%re$|Futz7Yv(LAk1z&7!U+%mW z_}l7i&&ll8XY{SlTpO~~>02l7RzG&1>j`XM6+E@i^Q+u9h7AR@&GqiT*L(DC@6l}U zF}?Q~!_@nP)Y!dxrWx<=JucWzuW&C=WmYbeTVeE6MEmX*`71l z``OKB_04BA6nZ>}$rq-n) zcyw+$sBb#BD11@hc;i53>tosay?Xs#sbgf=b=8Ht$#wVe*)%)+U>bbt#4oX z*_EGOy#cx>G;UvMZo3&+ma@$|_2!+K=AA414tyB;G??8tqVF4d&!IQ>=*@d_dk??o zxLK_??_O!%eAD|*#m$PPiq#8zVR6_B-KVvBU@cg2>DI)U9m-ad75M5Eo~x>%wTI{G zfF2mYBKm+62y&bEXV~AhXUWQOCRei~SJR5Wdo}HMYucB)Znfzh`?EC%^qK>?hK^OA zD^PWxL-2qC3>$%~0E|JrPhcNd4HTPN6Jvd~)ieu?@dbQkNPC~q_ko4OMQmOZW8iEx z%>oKo8lk2le zD)ZSU;Z&>dvsNneSsPFBZ7d!VPVMo0wvR_>@QE>t|Dz$IH^f=Ld<}u!;;{DQ6w*wH zJX;konq|w5fNItQk5r@=Z45lOu({MTs>q(olpK&8kQJPfN`PRp+H;UlafbjmOSGB1 zyvm%;^NyN0zr>kWBqp+(1qI=`oH#gWJE}~GJ%CG6W&)Ko8K+FR@BrI7ov9Th%|tqW z5$WXR$eJgUJZn5fohnMLW62n~5kg$e--|&)I-U^6A_?*tOwsusJ5r5ElDMYFP)028 z&~@JPmc;sy-#$c)5GNiJpx(@_m2nS9NPmQxH=JnF;KQbTRPgZgTn@8oQT_>vv|>ip zXAuF(ZQ`ox7k6KOap6U5d>2SAf@?e+`e4}dZO-|te{$;0Q;TEQhZcse;qwLA6Bo~4 zKf7@D8a}JOLLJ7y4Tm&t1aLBzVBYIwxVIq}F#?8M{}mBCaurcw4vuxV9c$HMpxKDc zea%8z$+?khHQd--b_84|^j`N!ZhI-9vn9Hg7KUS-*WNG5$IN0FQ}N~y3@s$&Rz$FW zO~gHJYHg|*0Rki>xWCdd**M*~5z{K6n1!X?s`x`I^M^&hTU29vAf+TPI`%DlGB1sbJt--KGsDOU>OuZkeqG0k+GY{E3r&XEAwC`N=WDa?^-XbL)%e~P-w8wgaw(ZUX_fa~;hn5~QQ&ye0vn{XNtY{JcS zf^ufD?p8xa2xWzkE`$*I+|vLq<*HzZ2H1*Qa{emXjZ2-^PG$YubpN({{;s?JuI1^h ze?a#S z|0uJIpNl0mARsgl7%s?12GqRVmdx)29NdCMu>EUiJva-+W@NxZIKoa%hLabk)KHi? z|Hz>eNH$-C2_n1r)hCv?@8EJDUGOr^WBHCS z2YhTd2HOGwZwMS@+qb-VH;h`M=Nr&$z26WThK;MQc&CCcT7dthV-fOHA}bd;N?}rL zHwMrPcGUwH7=XPSkr|7#o(OskVK$kJL!FDjZN~(R({?cJq~WHVXu|N3vyTcn1ACs5 z$g`({gawTyDhc2Zv}!NWJR*yR+f<0avn%sUMwUgR3D*kcV-e*TQ_IwmarGlzl2VBFA8OFrp{#lY_A;U?k->cN3S9u#RWr>1!Dfm+gZc^|b1^=9a zcMy!=?795B4$B&-*_qqYxh!W|`*KZN zf6ul$xb_{Z{hO#k1P>@!wFiu@GIiK?nn&}(M4w+EVi$eZ%GG2cEH6*n4LtB0E)i3T zCwpt*kwCJ6;KP>_wIsSCEX>|ul)=PGwz~^gwn}d~DRO^a{En6|uAz4~q1% z!~^TL6t*qhC!#I%t$Wn8+6)1QX+oK~LYbi$$zja40lP{w;wtfmJQh|n*yNkR%=T57KQ5v7jTO*=cz2-q2yg#R=iaUfki3nZPmT48EE9}&ToteU)X~n8J&nS|3ywINEGJOK!_5n+pMjf$<#TIV-C-lpX8}=24w&f^~ z84@nB+eK5Xy5mu9DdIHDI0 zrVWnxR zFQ|y1B$JxqBYp_KE^TrRi>TKw6?Z0Lv_#6kLB*fZ2K@s>ARuqyYU-|Q3)(dy=k@=j z`pxR4isj>3ZxHT88E=r%0&fPcS1(jwt6phn(;If)+40foOv7-t0p|7LYd$LBf75@x zYM~15F4fH$Z?m~qEAxBx1bS!w>_u3cNzpjt_|b}J3aDu92y}&}!-@YdA0qh1ohsnW znn=*Pr|eD@9&M*WF{RemJ(6=`ou#GpjJtSmhITc?aR+|x0^|C?8rxMD`b(o*_t+^A zcD4)L!4)BwMTVg3cQvhaey^?D(3DqJ6#nKtTmrI)yp(9Jme@mw6+Q4+kIBKjO3JFR zwIq&%Z$xlN04@vb_a_5o!4;6l6r#~1OLVq!sGeG|3l+$~M*Q!aX$OHar-iM^I&$%k zCKbwG0xduxW_^RWZp(T;>+B8T_`{?bY;&`@R{jblm4AmI=wZY|`4^P%*9hq66*L^; zn}nkpgoAwC2^fjV%Du%VCV0%-OodY#*dw_%N4}pL=`_7QF5}5iB(jseYWvD z(zQvl3r#~@5T})7Vj?sx89&{I4UGR!9MF!mO}8Ub7RAdg=KVjjmqekkY|F{1n8;@Gq>*RCgMTo1>dfG=Gfx|prvOjUo>r8kV$|b;0kweN+6WbX(}+3rDkrI% zBh)i5{csWKY)0kq`S5dR21iZ|pF3*^^gAfHUyVEC<~iFIs?klsOB7t7x=zS7%*1N= zECU;}_Avd2$(_n`RGJtZoS#9pARH3eQa+*-?+b(HhE5HgJa4$4K6h^T+<9e;N=GPY zMexvj2)bH2CLd99_(}{$?ZkY-`IqN&T;)9b=QDuX7&ga6I2q4083&lrw*Z z2GT+YB5sb~mEi_T|H$pKW8Ryq>zc1dyt-~7Heb2w-pT_Sf+bkX@VeD`OTF{dtygb{ z*w?keQJ#tlOXrujFTHpZ8YET0(HdTBgQI+mr&J0T&ztY%&Smx1Q_HXZ63~mew)iW~ zXIV80m+DtJdM``nyG;0!qnd}=9loygE>CH_bqjF3Jn!#M-nN^Qa0mumE Z-Skn(!SJsuzQ_H0&!Erwv6n~qe*g Date: Mon, 2 Sep 2024 13:30:06 +0200 Subject: [PATCH 101/168] globally ignore __pycache__ --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 9cd6ab6..973b73d 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ clean-up-workspaces.log get-pip.py run_app.bat python* +**/__pycache__/ gdpr_consent/node_modules/ \ No newline at end of file From 8866c51b79617d62e9e9a152de9ab503d5ae3395 Mon Sep 17 00:00:00 2001 From: axelwalter Date: Tue, 3 Sep 2024 12:39:32 +0200 Subject: [PATCH 102/168] copy gpdr_consent in Dockerfile --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index f533a44..b3a9b7d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -114,6 +114,8 @@ COPY src/ /app/src COPY assets/ /app/assets COPY example-data/ /app/example-data COPY content/ /app/content +COPY gdpr_consent/ /app/gdpr_consent + # For streamlit configuration COPY .streamlit/config.toml /app/.streamlit/config.toml COPY clean-up-workspaces.py /app/clean-up-workspaces.py From a20fb396bf712d792c270df91e5e96dd2f610b3a Mon Sep 17 00:00:00 2001 From: axelwalter Date: Tue, 3 Sep 2024 14:30:44 +0200 Subject: [PATCH 103/168] Copy settings.json in Dockerfile --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index b3a9b7d..2b12746 100644 --- a/Dockerfile +++ b/Dockerfile @@ -115,6 +115,7 @@ COPY assets/ /app/assets COPY example-data/ /app/example-data COPY content/ /app/content COPY gdpr_consent/ /app/gdpr_consent +COPY settings.json /app/settings.json # For streamlit configuration COPY .streamlit/config.toml /app/.streamlit/config.toml From 3ed554b88d4c143464f983898f5ed0d8edc898d5 Mon Sep 17 00:00:00 2001 From: axelwalter Date: Tue, 3 Sep 2024 14:34:52 +0200 Subject: [PATCH 104/168] Update settings.json set online_deployment true --- settings.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/settings.json b/settings.json index 8e3812e..6e22215 100644 --- a/settings.json +++ b/settings.json @@ -3,5 +3,5 @@ "enabled" : true, "tag" : "G-E14B1EB0SB" }, - "online_deployment": false -} \ No newline at end of file + "online_deployment": true +} From e955b8e799cc01d7e2dbc1b51ba8f20761eacc9b Mon Sep 17 00:00:00 2001 From: axelwalter Date: Tue, 3 Sep 2024 14:48:17 +0200 Subject: [PATCH 105/168] expand sidebar navigation by default --- src/common/common.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/common/common.py b/src/common/common.py index dd3356d..7118dc9 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -116,6 +116,20 @@ def page_setup(page: str = "") -> dict[str, Any]: menu_items=None, ) + # Expand sidebar navigation + st.markdown( + """ + + """, + unsafe_allow_html=True, + ) + st.logo("assets/pyopenms_transparent_background.png") # Create google analytics if consent was given From 950f03af847fcab65cf7c0293b7b09d7b50b983a Mon Sep 17 00:00:00 2001 From: axelwalter Date: Wed, 4 Sep 2024 09:36:42 +0200 Subject: [PATCH 106/168] import display_large_dataframe from common in view --- src/view.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/view.py b/src/view.py index 1ddb84e..80ad5d0 100644 --- a/src/view.py +++ b/src/view.py @@ -5,7 +5,7 @@ import plotly.graph_objects as go import streamlit as st import pyopenms as poms -from src.common.common import show_fig +from src.common.common import show_fig, display_large_dataframe from typing import Union From 905d58fedac1506560ac7d37fd86112745ed0b83 Mon Sep 17 00:00:00 2001 From: Tom David Mueller Date: Wed, 4 Sep 2024 10:51:49 +0200 Subject: [PATCH 107/168] change cookie flag --- src/common/common.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/common/common.py b/src/common/common.py index 7118dc9..c732d70 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -147,13 +147,16 @@ def page_setup(page: str = "") -> dict[str, Any]: window.dataLayer = window.dataLayer || []; function gtag(){{dataLayer.push(arguments);}} gtag('js', new Date()); + gtag('consent', 'default', {{ 'ad_storage': 'denied', 'ad_user_data': 'denied', 'ad_personalization': 'denied', 'analytics_storage': 'granted' }}); - gtag('config', '{st.session_state.settings['google_analytics']['tag']}'); + gtag('config', '{st.session_state.settings['google_analytics']['tag']}' , {{ + 'cookie_flags': 'samesite=none;secure' + }}); From c31148d817ca67e81fa0cfed79627eda08818f96 Mon Sep 17 00:00:00 2001 From: Tom David Mueller Date: Wed, 4 Sep 2024 13:41:34 +0200 Subject: [PATCH 108/168] copy docs --- Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2b12746..0ff995c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -109,12 +109,13 @@ FROM compile-openms AS run-app # note: specifying folder with slash as suffix and repeating the folder name seems important to preserve directory structure WORKDIR /app -COPY app.py /app/app.py -COPY src/ /app/src COPY assets/ /app/assets -COPY example-data/ /app/example-data COPY content/ /app/content +COPY docs/ /app/docs +COPY example-data/ /app/example-data COPY gdpr_consent/ /app/gdpr_consent +COPY src/ /app/src +COPY app.py /app/app.py COPY settings.json /app/settings.json # For streamlit configuration From bfe4ba856c14228610349e5ad8386b54965a232d Mon Sep 17 00:00:00 2001 From: Tom David Mueller Date: Wed, 4 Sep 2024 15:32:09 +0200 Subject: [PATCH 109/168] enable debug mode --- src/common/common.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/common.py b/src/common/common.py index c732d70..f7bcdda 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -155,8 +155,10 @@ def page_setup(page: str = "") -> dict[str, Any]: 'analytics_storage': 'granted' }}); gtag('config', '{st.session_state.settings['google_analytics']['tag']}' , {{ + 'debug_mode': true, 'cookie_flags': 'samesite=none;secure' }}); + console.log('Done!') From 69038bcf81262bbc865973d6eac2c111622ad2e8 Mon Sep 17 00:00:00 2001 From: axelwalter Date: Wed, 4 Sep 2024 16:03:09 +0200 Subject: [PATCH 110/168] update large dataframe viewer - page selector - returns the correct index of selected row --- src/common/common.py | 174 +++++++++++++++++++++++-------------------- src/view.py | 9 +-- 2 files changed, 97 insertions(+), 86 deletions(-) diff --git a/src/common/common.py b/src/common/common.py index 82045bb..8abb087 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -13,6 +13,7 @@ try: from tkinter import Tk, filedialog + TK_AVAILABLE = True except ImportError: TK_AVAILABLE = False @@ -103,8 +104,8 @@ def page_setup(page: str = "") -> dict[str, Any]: Returns: dict[str, Any]: A dictionary containing the parameters loaded from the parameter file. """ - if 'settings' not in st.session_state: - with open('settings.json', 'r') as f: + if "settings" not in st.session_state: + with open("settings.json", "r") as f: st.session_state.settings = json.load(f) # Set Streamlit page configurations @@ -133,9 +134,11 @@ def page_setup(page: str = "") -> dict[str, Any]: st.logo("assets/pyopenms_transparent_background.png") # Create google analytics if consent was given - if 'tracking_consent' not in st.session_state: + if "tracking_consent" not in st.session_state: st.session_state.tracking_consent = None - if (st.session_state.settings['google_analytics']['enabled']) and (st.session_state.tracking_consent == True): + if (st.session_state.settings["google_analytics"]["enabled"]) and ( + st.session_state.tracking_consent == True + ): html( f""" @@ -158,21 +161,21 @@ def page_setup(page: str = "") -> dict[str, Any]: - """, - width=1, height=1 + """, + width=1, + height=1, ) # Determine the workspace for the current session - if ( - ("workspace" not in st.session_state) or - (('workspace' in st.query_params) and - (st.query_params.workspace != st.session_state.workspace.name)) - ): + if ("workspace" not in st.session_state) or ( + ("workspace" in st.query_params) + and (st.query_params.workspace != st.session_state.workspace.name) + ): # Clear any previous caches st.cache_data.clear() st.cache_resource.clear() # Check location - if not st.session_state.settings['online_deployment']: + if not st.session_state.settings["online_deployment"]: st.session_state.location = "local" st.session_state["previous_dir"] = os.getcwd() st.session_state["local_dir"] = "" @@ -183,7 +186,7 @@ def page_setup(page: str = "") -> dict[str, Any]: os.chdir("../streamlit-template") # Define the directory where all workspaces will be stored workspaces_dir = Path("..", "workspaces-" + REPOSITORY_NAME) - if 'workspace' in st.query_params: + if "workspace" in st.query_params: st.session_state.workspace = Path(workspaces_dir, st.query_params.workspace) elif st.session_state.location == "online": workspace_id = str(uuid.uuid1()) @@ -191,15 +194,15 @@ def page_setup(page: str = "") -> dict[str, Any]: st.query_params.workspace = workspace_id else: st.session_state.workspace = Path(workspaces_dir, "default") - st.query_params.workspace = 'default' - + st.query_params.workspace = "default" + if st.session_state.location != "online": # not any captcha so, controllo should be true st.session_state["controllo"] = True - if 'workspace' not in st.query_params: + if "workspace" not in st.query_params: st.query_params.workspace = st.session_state.workspace.name - + # Make sure the necessary directories exist st.session_state.workspace.mkdir(parents=True, exist_ok=True) Path(st.session_state.workspace, "mzML-files").mkdir(parents=True, exist_ok=True) @@ -279,7 +282,7 @@ def change_workspace(): if path.exists(): shutil.rmtree(path) st.session_state.workspace = Path(workspaces_dir, "default") - st.query_params.workspace = 'default' + st.query_params.workspace = "default" st.rerun() # All pages have settings, workflow indicator and logo @@ -293,8 +296,10 @@ def change_workspace(): ) st.markdown("## Spectrum Plotting") st.selectbox("Bin Peaks", ["auto", True, False], key="spectrum_bin_peaks") - if st.session_state["spectrum_bin_peaks"] == True: - st.number_input("Number of Bins (m/z)", 1, 10000, 50, key="spectrum_num_bins") + if st.session_state["spectrum_bin_peaks"] == True: + st.number_input( + "Number of Bins (m/z)", 1, 10000, 50, key="spectrum_num_bins" + ) else: st.session_state["spectrum_num_bins"] = 50 return params @@ -317,10 +322,10 @@ def v_space(n: int, col=None) -> None: else: st.write("#") -def display_large_dataframe(df, - chunk_sizes: list[int] = [100, 1_000, 10_000], - **kwargs - ): + +def display_large_dataframe( + df, chunk_sizes: list[int] = [10, 100, 1_000, 10_000], **kwargs +): """ Displays a large DataFrame in chunks with pagination controls and row selection. @@ -330,50 +335,44 @@ def display_large_dataframe(df, ...: Additional keyword arguments to pass to the `st.dataframe` function. See: https://docs.streamlit.io/develop/api-reference/data/st.dataframe Returns: - Selected rows from the current chunk. + Index of selected row. """ - def update_on_change(): - # Initialize session state for pagination - if 'current_chunk' not in st.session_state: - st.session_state.current_chunk = 0 - st.session_state.current_chunk = 0 - + # Dropdown for selecting chunk size - chunk_size = st.selectbox("Select Number of Rows to Display", chunk_sizes, on_change=update_on_change) - + chunk_size = st.selectbox("Select Number of Rows to Display", chunk_sizes) + # Calculate total number of chunks - total_chunks = (len(df) + chunk_size - 1) // chunk_size + total_chunks = (len(df) + chunk_size - 1) // chunk_size + + if total_chunks > 1: + page = int(st.number_input("Select Page", 1, total_chunks, 1, step=1)) + else: + page = 1 # Function to get the current chunk of the DataFrame def get_current_chunk(df, chunk_size, chunk_index): start = chunk_index * chunk_size - end = min(start + chunk_size, len(df)) # Ensure end does not exceed dataframe length + end = min( + start + chunk_size, len(df) + ) # Ensure end does not exceed dataframe length return df.iloc[start:end], start, end # Display the current chunk - current_chunk_df, start_row, end_row = get_current_chunk(df, chunk_size, st.session_state.current_chunk) + current_chunk_df, start_row, end_row = get_current_chunk(df, chunk_size, page - 1) - event = st.dataframe( - current_chunk_df, - **kwargs - ) - - st.write(f"Showing rows {start_row + 1} to {end_row} of {len(df)} ({get_dataframe_mem_useage(current_chunk_df):.2f} MB)") - - # Pagination buttons - col1, col2, col3 = st.columns([1, 2, 1]) + event = st.dataframe(current_chunk_df, **kwargs) - with col1: - if st.button("Previous") and st.session_state.current_chunk > 0: - st.session_state.current_chunk -= 1 + st.write( + f"Showing rows {start_row + 1} to {end_row} of {len(df)} ({get_dataframe_mem_useage(current_chunk_df):.2f} MB)" + ) - with col3: - if st.button("Next") and st.session_state.current_chunk < total_chunks - 1: - st.session_state.current_chunk += 1 + rows = event["selection"]["rows"] + if not rows: + return None + # Calculate the index based on the current page and chunk size + base_index = (page - 1) * chunk_size + return base_index + rows[0] - if event is not None: - return event - return None def show_table(df: pd.DataFrame, download_name: str = "") -> None: """ @@ -399,7 +398,12 @@ def show_table(df: pd.DataFrame, download_name: str = "") -> None: return df -def show_fig(fig, download_name: str, container_width: bool = True, selection_session_state_key: str = "") -> None: +def show_fig( + fig, + download_name: str, + container_width: bool = True, + selection_session_state_key: str = "", +) -> None: """ Displays a Plotly chart and adds a download button to the plot. @@ -450,14 +454,14 @@ def show_fig(fig, download_name: str, container_width: bool = True, selection_se "autoscale", "zoomout", "resetscale", - "select" + "select", ], "toImageButtonOptions": { "filename": download_name, "format": st.session_state["image-format"], }, }, - use_container_width=True + use_container_width=True, ) @@ -476,44 +480,52 @@ def reset_directory(path: Path) -> None: shutil.rmtree(path) path.mkdir(parents=True, exist_ok=True) + def get_dataframe_mem_useage(df): """ Get the memory usage of a pandas DataFrame in megabytes. - + Args: df (pd.DataFrame): The DataFrame to calculate the memory usage for. - + Returns: float: The memory usage of the DataFrame in megabytes. """ # Calculate the memory usage of the DataFrame in bytes memory_usage_bytes = df.memory_usage(deep=True).sum() # Convert bytes to megabytes - memory_usage_mb = memory_usage_bytes / (1024 ** 2) + memory_usage_mb = memory_usage_bytes / (1024**2) return memory_usage_mb + def tk_directory_dialog(title: str = "Select Directory", parent_dir: str = os.getcwd()): - """ - Creates a Tkinter directory dialog for selecting a directory. + """ + Creates a Tkinter directory dialog for selecting a directory. - Args: - title (str): The title of the directory dialog. - parent_dir (str): The path to the parent directory of the directory dialog. + Args: + title (str): The title of the directory dialog. + parent_dir (str): The path to the parent directory of the directory dialog. - Returns: - str: The path to the selected directory. - - Warning: - This function is not avaliable in a streamlit cloud context. - """ - root = Tk() - root.attributes("-topmost", True) - root.withdraw() - file_path = filedialog.askdirectory(title=title, initialdir=parent_dir) - root.destroy() - return file_path - -def tk_file_dialog(title: str = "Select File", file_types: list[tuple] = [], parent_dir: str = os.getcwd(), multiple:bool = True): + Returns: + str: The path to the selected directory. + + Warning: + This function is not avaliable in a streamlit cloud context. + """ + root = Tk() + root.attributes("-topmost", True) + root.withdraw() + file_path = filedialog.askdirectory(title=title, initialdir=parent_dir) + root.destroy() + return file_path + + +def tk_file_dialog( + title: str = "Select File", + file_types: list[tuple] = [], + parent_dir: str = os.getcwd(), + multiple: bool = True, +): """ Creates a Tkinter file dialog for selecting a file. @@ -525,7 +537,7 @@ def tk_file_dialog(title: str = "Select File", file_types: list[tuple] = [], par Returns: str: The path to the selected file. - + Warning: This function is not avaliable in a streamlit cloud context. """ @@ -539,6 +551,7 @@ def tk_file_dialog(title: str = "Select File", file_types: list[tuple] = [], par root.destroy() return file_path + # General warning/error messages WARNINGS = { "missing-mzML": "Upload or select some mzML files first!", @@ -549,4 +562,3 @@ def tk_file_dialog(title: str = "Select File", file_types: list[tuple] = [], par "workflow": "Something went wrong during workflow execution.", "visualization": "Something went wrong during visualization of results.", } - diff --git a/src/view.py b/src/view.py index 80ad5d0..1b89d5c 100644 --- a/src/view.py +++ b/src/view.py @@ -228,7 +228,7 @@ def view_spectrum(): with cols[0]: df = st.session_state.view_spectra.copy() df["spectrum ID"] = df.index + 1 - event = display_large_dataframe( + index = display_large_dataframe( df, column_order=[ "spectrum ID", @@ -242,10 +242,9 @@ def view_spectrum(): use_container_width=True, hide_index=True, ) - rows = event.selection.rows with cols[1]: - if rows: - df = st.session_state.view_spectra.iloc[rows[0]] + if index is not None: + df = st.session_state.view_spectra.iloc[index] if "view_spectrum_selection" in st.session_state: box = st.session_state.view_spectrum_selection.selection.box if box: @@ -255,7 +254,7 @@ def view_spectrum(): df["mzarray"] = df["mzarray"][mask] if df["mzarray"].size > 0: - title = f"{st.session_state.view_selected_file} spec={rows[0]+1} mslevel={df['MS level']}" + title = f"{st.session_state.view_selected_file} spec={index+1} mslevel={df['MS level']}" if df["precursor m/z"] > 0: title += f" precursor m/z: {round(df['precursor m/z'], 4)}" From faba6213c591ea9115740eabb0aa4951f28b916e Mon Sep 17 00:00:00 2001 From: axelwalter Date: Thu, 5 Sep 2024 15:11:46 +0200 Subject: [PATCH 111/168] move default parameters file - from assets to top level - remove default parameter file for TOPP workflow, which is not needed --- Dockerfile | 5 +- Dockerfile_simple | 12 +- assets/topp-workflow-default-params.json | 4 - ...ult-params.json => default-parameters.json | 5 +- docs/build_app.md | 6 +- environment.yml | 2 +- src/common/common.py | 155 ++++++++++-------- 7 files changed, 107 insertions(+), 82 deletions(-) delete mode 100644 assets/topp-workflow-default-params.json rename assets/default-params.json => default-parameters.json (72%) diff --git a/Dockerfile b/Dockerfile index 0ff995c..a65f083 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # This Dockerfile builds OpenMS, the TOPP tools, pyOpenMS and thidparty tools. # It also adds a basic streamlit server that serves a pyOpenMS-based app. # hints: -# build image and give it a name (here: streamlitapp) with: docker build --no-cache -t streamlitapp:latest --build-arg GITHUB_TOKEN= . 2>&1 | tee build.log +# build image and give it a name (here: streamlitapp) with: docker build --no-cache -t streamlitapp:latest --build-arg GITHUB_TOKEN= . 2>&1 | tee build.log # check if image was build: docker image ls # run container: docker run -p 8501:8501 streamlitappsimple:latest # debug container after build (comment out ENTRYPOINT) and run container with interactive /bin/bash shell @@ -115,8 +115,9 @@ COPY docs/ /app/docs COPY example-data/ /app/example-data COPY gdpr_consent/ /app/gdpr_consent COPY src/ /app/src -COPY app.py /app/app.py +COPY app.py /app/app.py COPY settings.json /app/settings.json +COPY default-parameters.json /app/default-parameters.json # For streamlit configuration COPY .streamlit/config.toml /app/.streamlit/config.toml diff --git a/Dockerfile_simple b/Dockerfile_simple index 31e3136..ee0df46 100644 --- a/Dockerfile_simple +++ b/Dockerfile_simple @@ -53,11 +53,17 @@ RUN python -m pip install -r requirements.txt # create workdir and copy over all streamlit related files/folders WORKDIR /app # note: specifying folder with slash as suffix and repeating the folder name seems important to preserve directory structure -COPY app.py /app/app.py -COPY src/ /app/src +WORKDIR /app COPY assets/ /app/assets -COPY example-data/ /app/example-data COPY content/ /app/content +COPY docs/ /app/docs +COPY example-data/ /app/example-data +COPY gdpr_consent/ /app/gdpr_consent +COPY src/ /app/src +COPY app.py /app/app.py +COPY settings.json /app/settings.json +COPY default-parameters.json /app/default-parameters.json + # For streamlit configuration COPY .streamlit/config.toml /app/.streamlit/config.toml diff --git a/assets/topp-workflow-default-params.json b/assets/topp-workflow-default-params.json deleted file mode 100644 index 784fc4b..0000000 --- a/assets/topp-workflow-default-params.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "mzML_files": [ - ] -} \ No newline at end of file diff --git a/assets/default-params.json b/default-parameters.json similarity index 72% rename from assets/default-params.json rename to default-parameters.json index 0da8758..0d1d02c 100644 --- a/assets/default-params.json +++ b/default-parameters.json @@ -4,6 +4,5 @@ "2D-map-intensity-cutoff": 5000, "example-x-dimension": 10, - "example-y-dimension": 5, - "controllo": false -} \ No newline at end of file + "example-y-dimension": 5 +} diff --git a/docs/build_app.md b/docs/build_app.md index 3b9bc0c..2d282c3 100644 --- a/docs/build_app.md +++ b/docs/build_app.md @@ -11,7 +11,7 @@ - **Run the app locally and online** : Launching the app with online mode disabled in the settings.json lets the user create/remove workspaces. In the online the user gets a workspace with a specific ID. - **Parameters** -: Parameters (defaults in `assets/default-params.json`) store changing parameters for each workspace. Parameters are loaded via the page_setup function at the start of each page. To track a widget variable via parameters simply give them a key and add a matching entry in the default parameters file. Initialize a widget value from the params dictionary. +: Parameters (defaults in `default-parameters.json`) store changing parameters for each workspace. Parameters are loaded via the page_setup function at the start of each page. To track a widget variable via parameters simply give them a key and add a matching entry in the default parameters file. Initialize a widget value from the params dictionary. ```python params = page_setup() @@ -56,7 +56,7 @@ save_params() 3. Update Python package dependency files: - `requirements.txt` if using `Dockerfile_simple` - `environment.yml` if using `Dockerfile` - + ## How to build a workflow ### Simple workflow using pyOpenMS @@ -65,4 +65,4 @@ Take a look at the example pages `Simple Workflow` or `Workflow with mzML files` ### Complex workflow using TOPP tools -This template app features a module in `src/workflow` that allows for complex and long workflows to be built very efficiently. Check out the `TOPP Workflow Framework` page for more information (on the *sidebar*). \ No newline at end of file +This template app features a module in `src/workflow` that allows for complex and long workflows to be built very efficiently. Check out the `TOPP Workflow Framework` page for more information (on the *sidebar*). diff --git a/environment.yml b/environment.yml index 19d337a..cc47e9b 100644 --- a/environment.yml +++ b/environment.yml @@ -10,5 +10,5 @@ dependencies: - mono==6.12.0.90 - pip: # dependencies only available through pip # streamlit dependencies - - streamlit==1.37.0 + - streamlit>=1.38.0 - captcha==0.5.0 diff --git a/src/common/common.py b/src/common/common.py index f7bcdda..222cbb2 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -13,6 +13,7 @@ try: from tkinter import Tk, filedialog + TK_AVAILABLE = True except ImportError: TK_AVAILABLE = False @@ -32,7 +33,7 @@ def load_params(default: bool = False) -> dict[str, Any]: Load parameters from a JSON file and return a dictionary containing them. If a 'params.json' file exists in the workspace, load the parameters from there. - Otherwise, load the default parameters from 'assets/default-params.json'. + Otherwise, load the default parameters from 'default-parameters.json'. Additionally, check if any parameters have been modified by the user during the current session and update the values in the parameter dictionary accordingly. Also make sure that all items from @@ -52,7 +53,7 @@ def load_params(default: bool = False) -> dict[str, Any]: with open(path, "r", encoding="utf-8") as f: params = json.load(f) else: - with open("assets/default-params.json", "r", encoding="utf-8") as f: + with open("default-parameters.json", "r", encoding="utf-8") as f: params = json.load(f) # Return the parameter dictionary @@ -103,8 +104,8 @@ def page_setup(page: str = "") -> dict[str, Any]: Returns: dict[str, Any]: A dictionary containing the parameters loaded from the parameter file. """ - if 'settings' not in st.session_state: - with open('settings.json', 'r') as f: + if "settings" not in st.session_state: + with open("settings.json", "r") as f: st.session_state.settings = json.load(f) # Set Streamlit page configurations @@ -133,9 +134,11 @@ def page_setup(page: str = "") -> dict[str, Any]: st.logo("assets/pyopenms_transparent_background.png") # Create google analytics if consent was given - if 'tracking_consent' not in st.session_state: + if "tracking_consent" not in st.session_state: st.session_state.tracking_consent = None - if (st.session_state.settings['google_analytics']['enabled']) and (st.session_state.tracking_consent == True): + if (st.session_state.settings["google_analytics"]["enabled"]) and ( + st.session_state.tracking_consent == True + ): html( f""" @@ -147,7 +150,7 @@ def page_setup(page: str = "") -> dict[str, Any]: window.dataLayer = window.dataLayer || []; function gtag(){{dataLayer.push(arguments);}} gtag('js', new Date()); - + gtag('consent', 'default', {{ 'ad_storage': 'denied', 'ad_user_data': 'denied', @@ -163,21 +166,21 @@ def page_setup(page: str = "") -> dict[str, Any]: - """, - width=1, height=1 + """, + width=1, + height=1, ) # Determine the workspace for the current session - if ( - ("workspace" not in st.session_state) or - (('workspace' in st.query_params) and - (st.query_params.workspace != st.session_state.workspace.name)) - ): + if ("workspace" not in st.session_state) or ( + ("workspace" in st.query_params) + and (st.query_params.workspace != st.session_state.workspace.name) + ): # Clear any previous caches st.cache_data.clear() st.cache_resource.clear() # Check location - if not st.session_state.settings['online_deployment']: + if not st.session_state.settings["online_deployment"]: st.session_state.location = "local" st.session_state["previous_dir"] = os.getcwd() st.session_state["local_dir"] = "" @@ -188,7 +191,7 @@ def page_setup(page: str = "") -> dict[str, Any]: os.chdir("../streamlit-template") # Define the directory where all workspaces will be stored workspaces_dir = Path("..", "workspaces-" + REPOSITORY_NAME) - if 'workspace' in st.query_params: + if "workspace" in st.query_params: st.session_state.workspace = Path(workspaces_dir, st.query_params.workspace) elif st.session_state.location == "online": workspace_id = str(uuid.uuid1()) @@ -196,15 +199,15 @@ def page_setup(page: str = "") -> dict[str, Any]: st.query_params.workspace = workspace_id else: st.session_state.workspace = Path(workspaces_dir, "default") - st.query_params.workspace = 'default' - + st.query_params.workspace = "default" + if st.session_state.location != "online": # not any captcha so, controllo should be true st.session_state["controllo"] = True - if 'workspace' not in st.query_params: + if "workspace" not in st.query_params: st.query_params.workspace = st.session_state.workspace.name - + # Make sure the necessary directories exist st.session_state.workspace.mkdir(parents=True, exist_ok=True) Path(st.session_state.workspace, "mzML-files").mkdir(parents=True, exist_ok=True) @@ -214,7 +217,7 @@ def page_setup(page: str = "") -> dict[str, Any]: # If run in hosted mode, show captcha as long as it has not been solved if not "local" in sys.argv: - if "controllo" not in st.session_state or params["controllo"] is False: + if "controllo" not in st.session_state: # Apply captcha by calling the captcha_control function captcha_control() @@ -284,7 +287,7 @@ def change_workspace(): if path.exists(): shutil.rmtree(path) st.session_state.workspace = Path(workspaces_dir, "default") - st.query_params.workspace = 'default' + st.query_params.workspace = "default" st.rerun() # All pages have settings, workflow indicator and logo @@ -316,10 +319,10 @@ def v_space(n: int, col=None) -> None: else: st.write("#") -def display_large_dataframe(df, - chunk_sizes: list[int] = [100, 1_000, 10_000], - **kwargs - ): + +def display_large_dataframe( + df, chunk_sizes: list[int] = [100, 1_000, 10_000], **kwargs +): """ Displays a large DataFrame in chunks with pagination controls and row selection. @@ -331,34 +334,40 @@ def display_large_dataframe(df, Returns: Selected rows from the current chunk. """ + def update_on_change(): # Initialize session state for pagination - if 'current_chunk' not in st.session_state: + if "current_chunk" not in st.session_state: st.session_state.current_chunk = 0 st.session_state.current_chunk = 0 - + # Dropdown for selecting chunk size - chunk_size = st.selectbox("Select Number of Rows to Display", chunk_sizes, on_change=update_on_change) - + chunk_size = st.selectbox( + "Select Number of Rows to Display", chunk_sizes, on_change=update_on_change + ) + # Calculate total number of chunks - total_chunks = (len(df) + chunk_size - 1) // chunk_size + total_chunks = (len(df) + chunk_size - 1) // chunk_size # Function to get the current chunk of the DataFrame def get_current_chunk(df, chunk_size, chunk_index): start = chunk_index * chunk_size - end = min(start + chunk_size, len(df)) # Ensure end does not exceed dataframe length + end = min( + start + chunk_size, len(df) + ) # Ensure end does not exceed dataframe length return df.iloc[start:end], start, end # Display the current chunk - current_chunk_df, start_row, end_row = get_current_chunk(df, chunk_size, st.session_state.current_chunk) + current_chunk_df, start_row, end_row = get_current_chunk( + df, chunk_size, st.session_state.current_chunk + ) + + event = st.dataframe(current_chunk_df, **kwargs) - event = st.dataframe( - current_chunk_df, - **kwargs + st.write( + f"Showing rows {start_row + 1} to {end_row} of {len(df)} ({get_dataframe_mem_useage(current_chunk_df):.2f} MB)" ) - st.write(f"Showing rows {start_row + 1} to {end_row} of {len(df)} ({get_dataframe_mem_useage(current_chunk_df):.2f} MB)") - # Pagination buttons col1, col2, col3 = st.columns([1, 2, 1]) @@ -368,12 +377,13 @@ def get_current_chunk(df, chunk_size, chunk_index): with col3: if st.button("Next") and st.session_state.current_chunk < total_chunks - 1: - st.session_state.current_chunk += 1 + st.session_state.current_chunk += 1 if event is not None: return event return None + def show_table(df: pd.DataFrame, download_name: str = "") -> None: """ Displays a pandas dataframe using Streamlit's `dataframe` function and @@ -398,7 +408,12 @@ def show_table(df: pd.DataFrame, download_name: str = "") -> None: return df -def show_fig(fig, download_name: str, container_width: bool = True, selection_session_state_key: str = "") -> None: +def show_fig( + fig, + download_name: str, + container_width: bool = True, + selection_session_state_key: str = "", +) -> None: """ Displays a Plotly chart and adds a download button to the plot. @@ -449,14 +464,14 @@ def show_fig(fig, download_name: str, container_width: bool = True, selection_se "autoscale", "zoomout", "resetscale", - "select" + "select", ], "toImageButtonOptions": { "filename": download_name, "format": st.session_state["image-format"], }, }, - use_container_width=True + use_container_width=True, ) @@ -475,44 +490,52 @@ def reset_directory(path: Path) -> None: shutil.rmtree(path) path.mkdir(parents=True, exist_ok=True) + def get_dataframe_mem_useage(df): """ Get the memory usage of a pandas DataFrame in megabytes. - + Args: df (pd.DataFrame): The DataFrame to calculate the memory usage for. - + Returns: float: The memory usage of the DataFrame in megabytes. """ # Calculate the memory usage of the DataFrame in bytes memory_usage_bytes = df.memory_usage(deep=True).sum() # Convert bytes to megabytes - memory_usage_mb = memory_usage_bytes / (1024 ** 2) + memory_usage_mb = memory_usage_bytes / (1024**2) return memory_usage_mb + def tk_directory_dialog(title: str = "Select Directory", parent_dir: str = os.getcwd()): - """ - Creates a Tkinter directory dialog for selecting a directory. + """ + Creates a Tkinter directory dialog for selecting a directory. - Args: - title (str): The title of the directory dialog. - parent_dir (str): The path to the parent directory of the directory dialog. + Args: + title (str): The title of the directory dialog. + parent_dir (str): The path to the parent directory of the directory dialog. - Returns: - str: The path to the selected directory. - - Warning: - This function is not avaliable in a streamlit cloud context. - """ - root = Tk() - root.attributes("-topmost", True) - root.withdraw() - file_path = filedialog.askdirectory(title=title, initialdir=parent_dir) - root.destroy() - return file_path - -def tk_file_dialog(title: str = "Select File", file_types: list[tuple] = [], parent_dir: str = os.getcwd(), multiple:bool = True): + Returns: + str: The path to the selected directory. + + Warning: + This function is not avaliable in a streamlit cloud context. + """ + root = Tk() + root.attributes("-topmost", True) + root.withdraw() + file_path = filedialog.askdirectory(title=title, initialdir=parent_dir) + root.destroy() + return file_path + + +def tk_file_dialog( + title: str = "Select File", + file_types: list[tuple] = [], + parent_dir: str = os.getcwd(), + multiple: bool = True, +): """ Creates a Tkinter file dialog for selecting a file. @@ -524,7 +547,7 @@ def tk_file_dialog(title: str = "Select File", file_types: list[tuple] = [], par Returns: str: The path to the selected file. - + Warning: This function is not avaliable in a streamlit cloud context. """ @@ -538,6 +561,7 @@ def tk_file_dialog(title: str = "Select File", file_types: list[tuple] = [], par root.destroy() return file_path + # General warning/error messages WARNINGS = { "missing-mzML": "Upload or select some mzML files first!", @@ -548,4 +572,3 @@ def tk_file_dialog(title: str = "Select File", file_types: list[tuple] = [], par "workflow": "Something went wrong during workflow execution.", "visualization": "Something went wrong during visualization of results.", } - From 8e5d08c7736a1d9aca506f4816543a21ce0b32dc Mon Sep 17 00:00:00 2001 From: Tom David Mueller Date: Tue, 1 Oct 2024 16:13:28 +0200 Subject: [PATCH 112/168] fix typo --- content/quickstart.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/quickstart.py b/content/quickstart.py index 6ba8e5b..a2a8eac 100644 --- a/content/quickstart.py +++ b/content/quickstart.py @@ -44,7 +44,7 @@ v_space(1, c2) c2.image("assets/pyopenms_transparent_background.png", width=300) if Path("OpenMS-App.zip").exists(): - st.subsubheader( + st.subheader( """ Download the latest version for Windows here by clicking the button below. """ From cbc2356ab21241b9bc529462ade83495feb6bde9 Mon Sep 17 00:00:00 2001 From: Tom David Mueller Date: Tue, 1 Oct 2024 16:16:08 +0200 Subject: [PATCH 113/168] switch from mambaforge to miniforge --- Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index a65f083..cee220c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,11 +33,11 @@ RUN apt-get install -y --no-install-recommends --no-install-suggests libboost-da RUN apt-get install -y --no-install-recommends --no-install-suggests qtbase5-dev libqt5svg5-dev libqt5opengl5-dev # Download and install mamba. -ENV PATH="/root/mambaforge/bin:${PATH}" +ENV PATH="/root/miniforge3/bin:${PATH}" RUN wget -q \ - https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh \ - && bash Mambaforge-Linux-x86_64.sh -b \ - && rm -f Mambaforge-Linux-x86_64.sh + https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh \ + && bash Miniforge3-Linux-x86_64.sh -b \ + && rm -f Miniforge3-Linux-x86_64.sh RUN mamba --version # Setup mamba environment. @@ -124,7 +124,7 @@ COPY .streamlit/config.toml /app/.streamlit/config.toml COPY clean-up-workspaces.py /app/clean-up-workspaces.py # add cron job to the crontab -RUN echo "0 3 * * * /root/mambaforge/envs/streamlit-env/bin/python /app/clean-up-workspaces.py >> /app/clean-up-workspaces.log 2>&1" | crontab - +RUN echo "0 3 * * * /root/miniforge3/envs/streamlit-env/bin/python /app/clean-up-workspaces.py >> /app/clean-up-workspaces.log 2>&1" | crontab - # create entrypoint script to start cron service and launch streamlit app RUN echo "#!/bin/bash" > /app/entrypoint.sh From f3ee3271ceda68993fa2c778fe457689e09698f9 Mon Sep 17 00:00:00 2001 From: Tom David Mueller Date: Tue, 1 Oct 2024 16:22:14 +0200 Subject: [PATCH 114/168] update dockerfile --- Dockerfile | 2 +- Dockerfile_simple | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index cee220c..1b5f677 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,7 +32,7 @@ RUN apt-get install -y --no-install-recommends --no-install-suggests libboost-da libboost-random1.74-dev RUN apt-get install -y --no-install-recommends --no-install-suggests qtbase5-dev libqt5svg5-dev libqt5opengl5-dev -# Download and install mamba. +# Download and install miniforge. ENV PATH="/root/miniforge3/bin:${PATH}" RUN wget -q \ https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh \ diff --git a/Dockerfile_simple b/Dockerfile_simple index ee0df46..1393d2b 100644 --- a/Dockerfile_simple +++ b/Dockerfile_simple @@ -28,12 +28,12 @@ RUN apt-get install -y --no-install-recommends --no-install-suggests wget ca-cer RUN update-ca-certificates -# Install mamba (faster than conda) -ENV PATH="/root/mambaforge/bin:${PATH}" +# Download and install miniforge. +ENV PATH="/root/miniforge3/bin:${PATH}" RUN wget -q \ - https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh \ - && bash Mambaforge-Linux-x86_64.sh -b \ - && rm -f Mambaforge-Linux-x86_64.sh + https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh \ + && bash Miniforge3-Linux-x86_64.sh -b \ + && rm -f Miniforge3-Linux-x86_64.sh RUN mamba --version # Activate and configure the mamba environment @@ -70,7 +70,7 @@ COPY .streamlit/config.toml /app/.streamlit/config.toml COPY clean-up-workspaces.py /app/clean-up-workspaces.py # add cron job to the crontab -RUN echo "0 3 * * * /root/mambaforge/envs/streamlit-env/bin/python /app/clean-up-workspaces.py >> /app/clean-up-workspaces.log 2>&1" | crontab - +RUN echo "0 3 * * * /root/miniforge3/envs/streamlit-env/bin/python /app/clean-up-workspaces.py >> /app/clean-up-workspaces.log 2>&1" | crontab - # create entrypoint script to start cron service and launch streamlit app RUN echo "#!/bin/bash" > /app/entrypoint.sh From 81a8c74529062fadc4d6e731ce1652b156242c1d Mon Sep 17 00:00:00 2001 From: axelwalter Date: Wed, 9 Oct 2024 12:12:53 +0200 Subject: [PATCH 115/168] add pyopenms_viz to requirements.txt and environment.yml --- environment.yml | 1 + requirements.txt | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/environment.yml b/environment.yml index cc47e9b..33e3fd0 100644 --- a/environment.yml +++ b/environment.yml @@ -12,3 +12,4 @@ dependencies: # streamlit dependencies - streamlit>=1.38.0 - captcha==0.5.0 + - pyopenms_viz>=0.1.2 diff --git a/requirements.txt b/requirements.txt index a590255..20a7ee9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,8 @@ # note that it is much more restricted in terms of installing third-parties / etc. # preferably use the batteries included or simple docker file for local hosting streamlit>=1.38.0 -pyopenms==3.1.0 +pyopenms==3.2.0 numpy==1.26.4 # pandas and numpy are dependencies of pyopenms, however, pyopenms needs numpy<=1.26.4 plotly==5.22.0 -captcha==0.5.0 \ No newline at end of file +captcha==0.5.0 +pyopenms_viz>=0.1.2 \ No newline at end of file From c7b768925c29c0c11a38d7db0e6b3d18f5f96318 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Thu, 10 Oct 2024 11:29:09 +0200 Subject: [PATCH 116/168] Update common.py --- src/common/common.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/common/common.py b/src/common/common.py index 4c4321e..8159b78 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -161,6 +161,12 @@ def page_setup(page: str = "") -> dict[str, Any]: 'debug_mode': true, 'cookie_flags': 'samesite=none;secure' }}); + gtag('event', 'page_view', {{ + 'page_path': window.location.pathname, + 'page_title': document.title + }}); + console.log(window.location.pathname) + console.log(document.title) console.log('Done!') From a6a16b99b0e8b052f2f05ad80e534874a2d8c182 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Thu, 10 Oct 2024 12:42:14 +0200 Subject: [PATCH 117/168] Update common.py --- src/common/common.py | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/common/common.py b/src/common/common.py index 8159b78..2800580 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -157,17 +157,25 @@ def page_setup(page: str = "") -> dict[str, Any]: 'ad_personalization': 'denied', 'analytics_storage': 'granted' }}); - gtag('config', '{st.session_state.settings['google_analytics']['tag']}' , {{ - 'debug_mode': true, - 'cookie_flags': 'samesite=none;secure' + // Check if running in an iFrame and get parent window details + var page_path = window.parent.location.pathname; + var page_title = window.parent.document.title; + + gtag('config', '{st.session_state.settings['google_analytics']['tag']}', {{ + 'page_path': page_path, + 'page_title': page_title, + 'cookie_flags': 'samesite=none;secure' }}); + + // Manually trigger the page view event with parent window details gtag('event', 'page_view', {{ - 'page_path': window.location.pathname, - 'page_title': document.title + 'page_path': page_path, + 'page_title': page_title }}); - console.log(window.location.pathname) - console.log(document.title) - console.log('Done!') + + console.log(page_path); + console.log(page_title); + console.log('Page view event triggered'); From 202556a1c407006a0507b9e714b754bc655393f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Thu, 10 Oct 2024 12:45:26 +0200 Subject: [PATCH 118/168] Update common.py --- src/common/common.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/common.py b/src/common/common.py index 2800580..838f2cb 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -164,7 +164,8 @@ def page_setup(page: str = "") -> dict[str, Any]: gtag('config', '{st.session_state.settings['google_analytics']['tag']}', {{ 'page_path': page_path, 'page_title': page_title, - 'cookie_flags': 'samesite=none;secure' + 'cookie_flags': 'samesite=none;secure', + 'debug_mode':true }}); // Manually trigger the page view event with parent window details From c5f76bde8602e23c991335177124fa5d67741dc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Thu, 10 Oct 2024 13:40:35 +0200 Subject: [PATCH 119/168] fix GA --- src/common/common.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/common/common.py b/src/common/common.py index 838f2cb..843f37d 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -152,9 +152,9 @@ def page_setup(page: str = "") -> dict[str, Any]: gtag('js', new Date()); gtag('consent', 'default', {{ - 'ad_storage': 'denied', - 'ad_user_data': 'denied', - 'ad_personalization': 'denied', + 'ad_storage': 'granted', + 'ad_user_data': 'granted', + 'ad_personalization': 'granted', 'analytics_storage': 'granted' }}); // Check if running in an iFrame and get parent window details @@ -165,11 +165,11 @@ def page_setup(page: str = "") -> dict[str, Any]: 'page_path': page_path, 'page_title': page_title, 'cookie_flags': 'samesite=none;secure', - 'debug_mode':true + 'debug_mode': true }}); // Manually trigger the page view event with parent window details - gtag('event', 'page_view', {{ + gtag('event', 'page_viewx', {{ 'page_path': page_path, 'page_title': page_title }}); From f9dce9a51cbadc0c95ca91688288b659c78289ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Thu, 10 Oct 2024 13:50:37 +0200 Subject: [PATCH 120/168] rename page_path --- src/common/common.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/common/common.py b/src/common/common.py index 843f37d..6a16885 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -158,23 +158,23 @@ def page_setup(page: str = "") -> dict[str, Any]: 'analytics_storage': 'granted' }}); // Check if running in an iFrame and get parent window details - var page_path = window.parent.location.pathname; + var page_location = window.parent.location.pathname; var page_title = window.parent.document.title; gtag('config', '{st.session_state.settings['google_analytics']['tag']}', {{ - 'page_path': page_path, + 'page_location': page_location, 'page_title': page_title, 'cookie_flags': 'samesite=none;secure', 'debug_mode': true }}); // Manually trigger the page view event with parent window details - gtag('event', 'page_viewx', {{ - 'page_path': page_path, + gtag('event', 'page_view', {{ + 'page_location': page_location, 'page_title': page_title }}); - console.log(page_path); + console.log(page_location); console.log(page_title); console.log('Page view event triggered'); From 17cfe0e69b033dfacbb6c04df296206bafaf4a34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Thu, 10 Oct 2024 14:03:23 +0200 Subject: [PATCH 121/168] update tag id --- settings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings.json b/settings.json index 6e22215..a0dbbe3 100644 --- a/settings.json +++ b/settings.json @@ -1,7 +1,7 @@ { "google_analytics" : { "enabled" : true, - "tag" : "G-E14B1EB0SB" + "tag" : "G-Q3FKFWQR3T" }, "online_deployment": true } From 24d5b904211849611ea53106a655f1adec932536 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Thu, 10 Oct 2024 14:31:52 +0200 Subject: [PATCH 122/168] try gtm --- src/common/common.py | 50 +++++++++++++------------------------------- 1 file changed, 14 insertions(+), 36 deletions(-) diff --git a/src/common/common.py b/src/common/common.py index 6a16885..fe43be8 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -140,46 +140,24 @@ def page_setup(page: str = "") -> dict[str, Any]: st.session_state.tracking_consent == True ): html( - f""" + """ - - - + + + - + + + + + """, width=1, From 6e01005b86d492741511068bdf81cbf627ff57e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Thu, 10 Oct 2024 14:51:14 +0200 Subject: [PATCH 123/168] add test --- src/common/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/common.py b/src/common/common.py index fe43be8..59f7346 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -149,7 +149,7 @@ def page_setup(page: str = "") -> dict[str, Any]: new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); - })(window,document,'script','dataLayer','GTM-NRXGDF5H'); + })(window,document,'script','dataLayer','GTM-NRXGDF5H');console.log('test'); From 26611b5f5414e09a96b57622fda40f492a1e4d6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Thu, 10 Oct 2024 15:19:39 +0200 Subject: [PATCH 124/168] revert --- src/common/common.py | 51 ++++++++++++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 14 deletions(-) diff --git a/src/common/common.py b/src/common/common.py index 59f7346..c0fc527 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -140,24 +140,47 @@ def page_setup(page: str = "") -> dict[str, Any]: st.session_state.tracking_consent == True ): html( - """ + f""" - - - + + + - - - - - + """, width=1, From ae98e3b1fb65de42fc9652393d376e6b0ed1290c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Thu, 10 Oct 2024 15:27:24 +0200 Subject: [PATCH 125/168] add custom event --- src/common/common.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/common/common.py b/src/common/common.py index c0fc527..1a87731 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -167,6 +167,11 @@ def page_setup(page: str = "") -> dict[str, Any]: 'cookie_flags': 'samesite=none;secure', 'debug_mode': true }}); + + gtag('event', 'test_event', {{ + 'event_category': 'test_category', + 'event_label': 'test_label' + }}); // Manually trigger the page view event with parent window details gtag('event', 'page_view', {{ From 914ca8232331fc8af96012bd74657e2571760440 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Thu, 10 Oct 2024 15:37:18 +0200 Subject: [PATCH 126/168] increase iframe size --- src/common/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/common.py b/src/common/common.py index 1a87731..408a563 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -188,8 +188,8 @@ def page_setup(page: str = "") -> dict[str, Any]: """, - width=1, - height=1, + width=200, + height=200, ) # Determine the workspace for the current session From f9fa632ea82c7dae73e4741873d2379569543015 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Thu, 10 Oct 2024 15:44:00 +0200 Subject: [PATCH 127/168] remove anon co --- src/common/common.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/common/common.py b/src/common/common.py index 408a563..04363bb 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -145,8 +145,8 @@ def page_setup(page: str = "") -> dict[str, Any]: - - + - + + + """, width=200, From d4298317a33bf49336fe8da1a3658ff6c3d18934 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Thu, 10 Oct 2024 19:48:20 +0200 Subject: [PATCH 129/168] adjust page location --- src/common/common.py | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/src/common/common.py b/src/common/common.py index 86e017a..935209b 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -158,35 +158,34 @@ def page_setup(page: str = "") -> dict[str, Any]: 'analytics_storage': 'granted' }}); // Check if running in an iFrame and get parent window details - var page_location = window.parent.location.pathname; + var page_location = window.parent.document.location; var page_title = window.parent.document.title; gtag('config', '{st.session_state.settings['google_analytics']['tag']}', {{ 'page_location': page_location, 'page_title': page_title, - 'cookie_flags': 'samesite=none;secure', - 'debug_mode': true + 'cookie_flags': 'SameSite=None;Secure', }}); - From cabcf8de482767867f32550c192161ab7deba8ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Thu, 10 Oct 2024 19:51:05 +0200 Subject: [PATCH 130/168] enable debug mode --- src/common/common.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/common/common.py b/src/common/common.py index 935209b..569fa1b 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -165,6 +165,7 @@ def page_setup(page: str = "") -> dict[str, Any]: 'page_location': page_location, 'page_title': page_title, 'cookie_flags': 'SameSite=None;Secure', + 'debug_mode': true }}); From 0b5e9c0e5be84b15bc07bc640e8875b4e740057f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Thu, 10 Oct 2024 20:00:15 +0200 Subject: [PATCH 131/168] fix location --- src/common/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/common.py b/src/common/common.py index 569fa1b..5c81fdc 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -158,7 +158,7 @@ def page_setup(page: str = "") -> dict[str, Any]: 'analytics_storage': 'granted' }}); // Check if running in an iFrame and get parent window details - var page_location = window.parent.document.location; + var page_location = document.location.origin+document.location.pathname; var page_title = window.parent.document.title; gtag('config', '{st.session_state.settings['google_analytics']['tag']}', {{ From a1759433b0b4fc7764abf3262c2f673250ed401a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Thu, 10 Oct 2024 20:02:47 +0200 Subject: [PATCH 132/168] refer to parent --- src/common/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/common.py b/src/common/common.py index 5c81fdc..558bfc8 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -158,7 +158,7 @@ def page_setup(page: str = "") -> dict[str, Any]: 'analytics_storage': 'granted' }}); // Check if running in an iFrame and get parent window details - var page_location = document.location.origin+document.location.pathname; + var page_location = window.parent.document.location.origin+window.parent.document.location.pathname; var page_title = window.parent.document.title; gtag('config', '{st.session_state.settings['google_analytics']['tag']}', {{ From 187aa206dded99a91e2554f2204b744ba1835fe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Thu, 10 Oct 2024 20:39:19 +0200 Subject: [PATCH 133/168] try manual post --- src/common/common.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/common/common.py b/src/common/common.py index 558bfc8..2c3887d 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -167,6 +167,21 @@ def page_setup(page: str = "") -> dict[str, Any]: 'cookie_flags': 'SameSite=None;Secure', 'debug_mode': true }}); + fetch('https://www.google-analytics.com/collect', { + method: 'POST', + body: new URLSearchParams({ + 'v': '1', // API Version + 'tid': 'YOUR_TRACKING_ID', // Tracking ID + 'cid': '555', // Client ID (you can generate a random or static ID) + 't': 'pageview', // Pageview hit type + 'dp': window.parent.location.pathname, // Document path + 'dt': window.parent.document.title // Document title + }) + }).then(response => { + console.log('Page view event sent:', response); + }).catch(error => { + console.error('Error sending page view event:', error); + }); From a1652f012fcb81b2e4abfbfda709acdf523359dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Thu, 10 Oct 2024 20:41:57 +0200 Subject: [PATCH 134/168] fix brackets --- src/common/common.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/common/common.py b/src/common/common.py index 2c3887d..0829473 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -167,21 +167,21 @@ def page_setup(page: str = "") -> dict[str, Any]: 'cookie_flags': 'SameSite=None;Secure', 'debug_mode': true }}); - fetch('https://www.google-analytics.com/collect', { + fetch('https://www.google-analytics.com/collect', {{ method: 'POST', - body: new URLSearchParams({ + body: new URLSearchParams({{ 'v': '1', // API Version 'tid': 'YOUR_TRACKING_ID', // Tracking ID 'cid': '555', // Client ID (you can generate a random or static ID) 't': 'pageview', // Pageview hit type 'dp': window.parent.location.pathname, // Document path 'dt': window.parent.document.title // Document title - }) - }).then(response => { + }}) + }}).then(response => {{ console.log('Page view event sent:', response); - }).catch(error => { + }}).catch(error => {{ console.error('Error sending page view event:', error); - }); + }}); From 6bca77421567db3124b5d4a1244701f47cdad759 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Fri, 11 Oct 2024 16:33:17 +0200 Subject: [PATCH 135/168] Update common.py --- src/common/common.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/common/common.py b/src/common/common.py index 0829473..5cbf9d5 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -196,6 +196,11 @@ def page_setup(page: str = "") -> dict[str, Any]: 'page_location': page_location, 'page_title': page_title }}); + document.cookie = "username=JohnDoe; path=/"; + document.cookie = "SecureUsername=JohnDoe; secure; path=/"; + document.cookie = "StrictUsername=JohnDoe; SameSite=Strict; path=/"; + document.cookie = "NoneUsername=JohnDoe; SameSite=None; path=/"; + document.cookie = "FlaggedUsername=JohnDoe; SameSite=SameSite=None;Secure; path=/"; console.log(gtag); console.log(page_location); From e1c3664c60d58665b18c486daa9988d9f654c593 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Sat, 12 Oct 2024 09:39:30 +0200 Subject: [PATCH 136/168] Update common.py --- src/common/common.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/common/common.py b/src/common/common.py index 5cbf9d5..177b994 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -201,6 +201,14 @@ def page_setup(page: str = "") -> dict[str, Any]: document.cookie = "StrictUsername=JohnDoe; SameSite=Strict; path=/"; document.cookie = "NoneUsername=JohnDoe; SameSite=None; path=/"; document.cookie = "FlaggedUsername=JohnDoe; SameSite=SameSite=None;Secure; path=/"; + + // Create a date object for one week from now + const expiryDate = new Date(); + expiryDate.setTime(expiryDate.getTime() + (7 * 24 * 60 * 60 * 1000)); // 7 days in milliseconds + + // Set the cookie + document.cookie = `myCookie=myValue; expires=${expiryDate.toUTCString()}; path=/; SameSite=None`; + console.log(gtag); console.log(page_location); From a38592034a451037465df9836a31270141055eb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Sat, 12 Oct 2024 09:41:35 +0200 Subject: [PATCH 137/168] Update common.py --- src/common/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/common.py b/src/common/common.py index 177b994..497a9d2 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -207,7 +207,7 @@ def page_setup(page: str = "") -> dict[str, Any]: expiryDate.setTime(expiryDate.getTime() + (7 * 24 * 60 * 60 * 1000)); // 7 days in milliseconds // Set the cookie - document.cookie = `myCookie=myValue; expires=${expiryDate.toUTCString()}; path=/; SameSite=None`; + document.cookie = `myCookie=myValue; expires=${{expiryDate.toUTCString()}}; path=/; SameSite=None`; console.log(gtag); From d2eebdc588f5a6bfe5b25a5f524c8239bf66d332 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Sat, 12 Oct 2024 09:44:58 +0200 Subject: [PATCH 138/168] Update common.py --- src/common/common.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/common.py b/src/common/common.py index 497a9d2..5be422e 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -208,6 +208,8 @@ def page_setup(page: str = "") -> dict[str, Any]: // Set the cookie document.cookie = `myCookie=myValue; expires=${{expiryDate.toUTCString()}}; path=/; SameSite=None`; + document.cookie = `myCookieSec=myValue; expires=${{expiryDate.toUTCString()}}; path=/; SameSite=None; Secure`; + document.cookie = `myCookieSecc=myValue; expires=${{expiryDate.toUTCString()}}; path=/`; console.log(gtag); From 6a0ddf8428acde00bdd71845b22ed201a8f44197 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Sat, 12 Oct 2024 09:50:06 +0200 Subject: [PATCH 139/168] Update common.py --- src/common/common.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/common.py b/src/common/common.py index 5be422e..ededf4d 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -164,7 +164,7 @@ def page_setup(page: str = "") -> dict[str, Any]: gtag('config', '{st.session_state.settings['google_analytics']['tag']}', {{ 'page_location': page_location, 'page_title': page_title, - 'cookie_flags': 'SameSite=None;Secure', + 'cookie_flags': 'domain=.cs.uni-tuebingen.de', 'debug_mode': true }}); fetch('https://www.google-analytics.com/collect', {{ @@ -207,9 +207,9 @@ def page_setup(page: str = "") -> dict[str, Any]: expiryDate.setTime(expiryDate.getTime() + (7 * 24 * 60 * 60 * 1000)); // 7 days in milliseconds // Set the cookie - document.cookie = `myCookie=myValue; expires=${{expiryDate.toUTCString()}}; path=/; SameSite=None`; - document.cookie = `myCookieSec=myValue; expires=${{expiryDate.toUTCString()}}; path=/; SameSite=None; Secure`; - document.cookie = `myCookieSecc=myValue; expires=${{expiryDate.toUTCString()}}; path=/`; + document.cookie = `myCookie=myValue; expires=${{expiryDate.toUTCString()}}; path=/; SameSite=None; domain=.cs.uni-tuebingen.de`; + document.cookie = `myCookieSec=myValue; expires=${{expiryDate.toUTCString()}}; path=/; SameSite=None; Secure; domain=.cs.uni-tuebingen.de`; + document.cookie = `myCookieSecc=myValue; expires=${{expiryDate.toUTCString()}}; path=/; domain=.cs.uni-tuebingen.de`; console.log(gtag); From 2dd3605cb33cde8ce88be6cd43feb0badfae36fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Sat, 12 Oct 2024 10:00:01 +0200 Subject: [PATCH 140/168] Update common.py --- src/common/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/common.py b/src/common/common.py index ededf4d..160746e 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -164,7 +164,7 @@ def page_setup(page: str = "") -> dict[str, Any]: gtag('config', '{st.session_state.settings['google_analytics']['tag']}', {{ 'page_location': page_location, 'page_title': page_title, - 'cookie_flags': 'domain=.cs.uni-tuebingen.de', + 'cookie_domain': '.cs.uni-tuebingen.de', 'debug_mode': true }}); fetch('https://www.google-analytics.com/collect', {{ From b627c26789e86495a33a602f21c7bf3376502a1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Sat, 12 Oct 2024 10:14:35 +0200 Subject: [PATCH 141/168] Update common.py --- src/common/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/common.py b/src/common/common.py index 160746e..2635792 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -171,9 +171,9 @@ def page_setup(page: str = "") -> dict[str, Any]: method: 'POST', body: new URLSearchParams({{ 'v': '1', // API Version - 'tid': 'YOUR_TRACKING_ID', // Tracking ID + 'tid': 'G-Q3FKFWQR3T', // Tracking ID 'cid': '555', // Client ID (you can generate a random or static ID) - 't': 'pageview', // Pageview hit type + 't': 'pageviewtest', // Pageview hit type 'dp': window.parent.location.pathname, // Document path 'dt': window.parent.document.title // Document title }}) From b62a527b5cc61fa924956163610e512c4aab6d4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Sat, 12 Oct 2024 10:22:56 +0200 Subject: [PATCH 142/168] Update common.py --- src/common/common.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/common/common.py b/src/common/common.py index 2635792..e3a6258 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -218,6 +218,12 @@ def page_setup(page: str = "") -> dict[str, Any]: console.log(window.dataLayer); console.log('Page view event triggered'); + """, From ec0408efcc880f19863dcb1983122212a1b7e193 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Sat, 12 Oct 2024 10:32:56 +0200 Subject: [PATCH 143/168] Update common.py --- src/common/common.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/common/common.py b/src/common/common.py index e3a6258..31aae05 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -186,6 +186,12 @@ def page_setup(page: str = "") -> dict[str, Any]: + From bed82e75a598db271da20e3743f9b4dd7e106836 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Sat, 12 Oct 2024 15:58:12 +0200 Subject: [PATCH 148/168] Update common.py --- src/common/common.py | 98 ++++++-------------------------------------- 1 file changed, 13 insertions(+), 85 deletions(-) diff --git a/src/common/common.py b/src/common/common.py index b4ca032..eef0702 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -140,96 +140,24 @@ def page_setup(page: str = "") -> dict[str, Any]: st.session_state.tracking_consent == True ): html( - f""" + """ - - - + + + - - + + + + Test """, From bc678aeac3f7eb2a2538deb14287e0949741208c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Sat, 12 Oct 2024 17:40:03 +0200 Subject: [PATCH 149/168] Update common.py --- src/common/common.py | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/common/common.py b/src/common/common.py index eef0702..bc25652 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -144,20 +144,15 @@ def page_setup(page: str = "") -> dict[str, Any]: - - - + window.parent.dataLayer = window.parent.dataLayer || []; + function gtag(){window.parent.dataLayer.push(arguments);} - - - - Test + gtag('event', 'submit_form', { + 'event_category': 'form_interaction', + 'event_label': 'Submit Form Button', + 'value': 1 + }); """, From 63a1b7328b0ff883615994ec9fc68c8d71af53d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Sat, 12 Oct 2024 17:42:41 +0200 Subject: [PATCH 150/168] Update common.py --- src/common/common.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/common.py b/src/common/common.py index bc25652..5e887fc 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -143,17 +143,17 @@ def page_setup(page: str = "") -> dict[str, Any]: """ - + + """, width=200, From 5de92ba6bd2f5d7d55e3266886a87ba48f5968b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Sat, 12 Oct 2024 19:10:11 +0200 Subject: [PATCH 151/168] Update common.py --- src/common/common.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/common/common.py b/src/common/common.py index 5e887fc..caa8ebd 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -143,21 +143,16 @@ def page_setup(page: str = "") -> dict[str, Any]: """ - + """, - width=200, - height=200, + width=1, + height=1, ) # Determine the workspace for the current session From 8916337717729f68fd6cde54ba3a2b7a372218b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20David=20M=C3=BCller?= <57191390+t0mdavid-m@users.noreply.github.com> Date: Sat, 12 Oct 2024 19:18:27 +0200 Subject: [PATCH 152/168] Update common.py --- src/common/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/common.py b/src/common/common.py index caa8ebd..aeed7ba 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -145,7 +145,7 @@ def page_setup(page: str = "") -> dict[str, Any]: From 047c6784c16a47a8c222c7054c9e13ab2462ea0e Mon Sep 17 00:00:00 2001 From: Tom David Mueller Date: Sun, 13 Oct 2024 13:16:18 +0200 Subject: [PATCH 153/168] add hook analytics --- Dockerfile | 4 +++ hooks/hook-analytics.py | 60 +++++++++++++++++++++++++++++++++++++++++ settings.json | 2 +- 3 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 hooks/hook-analytics.py diff --git a/Dockerfile b/Dockerfile index 1b5f677..48b6d1b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -114,6 +114,7 @@ COPY content/ /app/content COPY docs/ /app/docs COPY example-data/ /app/example-data COPY gdpr_consent/ /app/gdpr_consent +COPY hooks/ /app/hooks COPY src/ /app/src COPY app.py /app/app.py COPY settings.json /app/settings.json @@ -133,6 +134,9 @@ RUN echo "mamba run --no-capture-output -n streamlit-env streamlit run app.py" > # make the script executable RUN chmod +x /app/entrypoint.sh +# Patch Analytics +RUN mamba run -n streamlit-env python hooks/hook_analytics.py + # Download latest OpenMS App executable for Windows from Github actions workflow. RUN WORKFLOW_ID=$(curl -s "https://api.github.com/repos/$GITHUB_USER/$GITHUB_REPO/actions/workflows" | jq -r '.workflows[] | select(.name == "Build executable for Windows") | .id') \ && SUCCESSFUL_RUNS=$(curl -s "https://api.github.com/repos/$GITHUB_USER/$GITHUB_REPO/actions/runs?workflow_id=$WORKFLOW_ID&status=success" | jq -r '.workflow_runs[0].id') \ diff --git a/hooks/hook-analytics.py b/hooks/hook-analytics.py new file mode 100644 index 0000000..c8758b0 --- /dev/null +++ b/hooks/hook-analytics.py @@ -0,0 +1,60 @@ +import os +import json +import streamlit as st + +def patch_head(document, content): + return document.replace('', '' + content) + +def patch_body(document, content): + return document.replace('', '' + content) + +def google_analytics_head(gtm_tag): + return f""" + + + + + """ + +def google_analytics_body(gtm_tag): + return f""" + + + + """ + + +if __name__ == '__main__': + index_path = os.path.join(os.path.dirname(st.__file__), 'static', 'index.html') + settings_path = os.path.join(os.path.dirname(__file__), '..', 'settings.json') + + with open(settings_path, 'r') as f: + settings = json.load(f) + gtm_tag = settings['google_analytics']['tag'] + + with open(index_path, 'r') as f: + index = f.read() + + index = patch_head(index, google_analytics_head(gtm_tag)) + index = patch_body(index, google_analytics_body(gtm_tag)) + + with open(index_path, 'w') as f: + f.write(index) \ No newline at end of file diff --git a/settings.json b/settings.json index a0dbbe3..2e2714e 100644 --- a/settings.json +++ b/settings.json @@ -1,7 +1,7 @@ { "google_analytics" : { "enabled" : true, - "tag" : "G-Q3FKFWQR3T" + "tag" : "GTM-NRXGDF5H" }, "online_deployment": true } From fa63757ba88006ed703c2b840a121a1538f8fa7b Mon Sep 17 00:00:00 2001 From: Tom David Mueller Date: Sun, 13 Oct 2024 15:35:55 +0200 Subject: [PATCH 154/168] fix filename --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 48b6d1b..1ad98b5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -135,7 +135,7 @@ RUN echo "mamba run --no-capture-output -n streamlit-env streamlit run app.py" > RUN chmod +x /app/entrypoint.sh # Patch Analytics -RUN mamba run -n streamlit-env python hooks/hook_analytics.py +RUN mamba run -n streamlit-env python hooks/hook-analytics.py # Download latest OpenMS App executable for Windows from Github actions workflow. RUN WORKFLOW_ID=$(curl -s "https://api.github.com/repos/$GITHUB_USER/$GITHUB_REPO/actions/workflows" | jq -r '.workflows[] | select(.name == "Build executable for Windows") | .id') \ From 468b43098221b061895850e9a2700f93a2229e07 Mon Sep 17 00:00:00 2001 From: Tom David Mueller Date: Wed, 16 Oct 2024 11:57:30 +0200 Subject: [PATCH 155/168] update json schema --- hooks/hook-analytics.py | 2 +- settings.json | 14 ++++++++++---- src/common/captcha_.py | 2 +- src/common/common.py | 2 +- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/hooks/hook-analytics.py b/hooks/hook-analytics.py index c8758b0..9f9e7ef 100644 --- a/hooks/hook-analytics.py +++ b/hooks/hook-analytics.py @@ -48,7 +48,7 @@ def google_analytics_body(gtm_tag): with open(settings_path, 'r') as f: settings = json.load(f) - gtm_tag = settings['google_analytics']['tag'] + gtm_tag = settings['analytics']['google_analytics']['tag'] with open(index_path, 'r') as f: index = f.read() diff --git a/settings.json b/settings.json index 2e2714e..1c7d244 100644 --- a/settings.json +++ b/settings.json @@ -1,7 +1,13 @@ { - "google_analytics" : { - "enabled" : true, - "tag" : "GTM-NRXGDF5H" + "analytics": { + "google_analytics": { + "enabled": true, + "tag": "GTM-NRXGDF5H" + }, + "piwik_pro": { + "enabled": true, + "tag": "57690c44-d635-43b0-ab43-f8bd3064ca06" + } }, "online_deployment": true -} +} \ No newline at end of file diff --git a/src/common/captcha_.py b/src/common/captcha_.py index 62e5226..6a3bce4 100644 --- a/src/common/captcha_.py +++ b/src/common/captcha_.py @@ -200,7 +200,7 @@ def captcha_control(): if "controllo" not in st.session_state or st.session_state["controllo"] == False: # Check if consent for tracking was given - if (st.session_state.settings['google_analytics']['enabled']) and (st.session_state.tracking_consent is None): + if (st.session_state.settings['analytics']['google_analytics']['enabled']) and (st.session_state.tracking_consent is None): with st.spinner(): # Ask for consent st.session_state.tracking_consent = consent_component() diff --git a/src/common/common.py b/src/common/common.py index aeed7ba..8aee500 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -136,7 +136,7 @@ def page_setup(page: str = "") -> dict[str, Any]: # Create google analytics if consent was given if "tracking_consent" not in st.session_state: st.session_state.tracking_consent = None - if (st.session_state.settings["google_analytics"]["enabled"]) and ( + if (st.session_state.settings["analytics"]["google_analytics"]["enabled"]) and ( st.session_state.tracking_consent == True ): html( From 3c58bd5c747c4db3e90d0060dedd77aead0bb6b6 Mon Sep 17 00:00:00 2001 From: Tom David Mueller Date: Wed, 16 Oct 2024 12:00:19 +0200 Subject: [PATCH 156/168] conditionally enable google analytics --- hooks/hook-analytics.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/hooks/hook-analytics.py b/hooks/hook-analytics.py index 9f9e7ef..e1220ad 100644 --- a/hooks/hook-analytics.py +++ b/hooks/hook-analytics.py @@ -43,18 +43,23 @@ def google_analytics_body(gtm_tag): if __name__ == '__main__': - index_path = os.path.join(os.path.dirname(st.__file__), 'static', 'index.html') - settings_path = os.path.join(os.path.dirname(__file__), '..', 'settings.json') + # Load configuration + settings_path = os.path.join(os.path.dirname(__file__), '..', 'settings.json') with open(settings_path, 'r') as f: settings = json.load(f) - gtm_tag = settings['analytics']['google_analytics']['tag'] + # Load index.html + index_path = os.path.join(os.path.dirname(st.__file__), 'static', 'index.html') with open(index_path, 'r') as f: index = f.read() - index = patch_head(index, google_analytics_head(gtm_tag)) - index = patch_body(index, google_analytics_body(gtm_tag)) + # Configure google analytics + if settings['analytics']['google_analytics']['enabled']: + gtm_tag = settings['analytics']['google_analytics']['tag'] + index = patch_head(index, google_analytics_head(gtm_tag)) + index = patch_body(index, google_analytics_body(gtm_tag)) + # Save index.html with open(index_path, 'w') as f: f.write(index) \ No newline at end of file From 59e7e677040268879985049385806ba540b08757 Mon Sep 17 00:00:00 2001 From: Tom David Mueller Date: Wed, 16 Oct 2024 12:04:47 +0200 Subject: [PATCH 157/168] add hook for pwik pro --- hooks/hook-analytics.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/hooks/hook-analytics.py b/hooks/hook-analytics.py index e1220ad..1a9eedb 100644 --- a/hooks/hook-analytics.py +++ b/hooks/hook-analytics.py @@ -41,6 +41,20 @@ def google_analytics_body(gtm_tag): """ +def piwik_pro_body(piwik_tag): + return f""" + + """ + if __name__ == '__main__': @@ -59,6 +73,11 @@ def google_analytics_body(gtm_tag): gtm_tag = settings['analytics']['google_analytics']['tag'] index = patch_head(index, google_analytics_head(gtm_tag)) index = patch_body(index, google_analytics_body(gtm_tag)) + + # Configure piwik pro + if settings['analytics']['piwik_pro']['enabled']: + piwik_tag = settings['analytics']['piwik_pro']['tag'] + index = patch_body(index, piwik_pro_body(piwik_tag)) # Save index.html with open(index_path, 'w') as f: From 4085f3dadf583e95629186bab6c4ccadc493f619 Mon Sep 17 00:00:00 2001 From: axelwalter Date: Thu, 17 Oct 2024 14:32:13 +0200 Subject: [PATCH 158/168] Update Workflow.py --- src/Workflow.py | 110 ++---------------------------------------------- 1 file changed, 4 insertions(+), 106 deletions(-) diff --git a/src/Workflow.py b/src/Workflow.py index d1045bf..c0c752f 100644 --- a/src/Workflow.py +++ b/src/Workflow.py @@ -1,13 +1,6 @@ import streamlit as st from src.workflow.WorkflowManager import WorkflowManager -# for result section: -from pathlib import Path -import pandas as pd -import plotly.express as px -from src.common.common import show_fig - - class Workflow(WorkflowManager): # Setup pages for upload, parameter, execution and results. # For layout use any streamlit components such as tabs (as shown in example), columns, or even expanders. @@ -16,108 +9,13 @@ def __init__(self) -> None: super().__init__("TOPP Workflow", st.session_state["workspace"]) def upload(self) -> None: - t = st.tabs(["MS data"]) - with t[0]: - # Use the upload method from StreamlitUI to handle mzML file uploads. - self.ui.upload_widget( - key="mzML-files", - name="MS data", - file_types="mzML", - fallback=[str(f) for f in Path("example-data", "mzML").glob("*.mzML")], - ) + pass - @st.fragment def configure(self) -> None: - # Allow users to select mzML files for the analysis. - self.ui.select_input_file("mzML-files", multiple=True) - - # Create tabs for different analysis steps. - t = st.tabs( - ["**Feature Detection**", "**Feature Linking**", "**Python Custom Tool**"] - ) - with t[0]: - # Parameters for FeatureFinderMetabo TOPP tool. - self.ui.input_TOPP( - "FeatureFinderMetabo", - custom_defaults={"algorithm:common:noise_threshold_int": 1000.0}, - ) - with t[1]: - # Paramters for MetaboliteAdductDecharger TOPP tool. - self.ui.input_TOPP("FeatureLinkerUnlabeledKD") - with t[2]: - # A single checkbox widget for workflow logic. - self.ui.input_widget("run-python-script", False, "Run custom Python script") - # Generate input widgets for a custom Python tool, located at src/python-tools. - # Parameters are specified within the file in the DEFAULTS dictionary. - self.ui.input_python("example") + pass def execution(self) -> None: - # Any parameter checks, here simply checking if mzML files are selected - if not self.params["mzML-files"]: - self.logger.log("ERROR: No mzML files selected.") - return - - # Get mzML files with FileManager - in_mzML = self.file_manager.get_files(self.params["mzML-files"]) - - # Log any messages. - self.logger.log(f"Number of input mzML files: {len(in_mzML)}") + pass - # Prepare output files for feature detection. - out_ffm = self.file_manager.get_files( - in_mzML, "featureXML", "feature-detection" - ) - - # Run FeatureFinderMetabo tool with input and output files. - self.logger.log("Detecting features...") - self.executor.run_topp( - "FeatureFinderMetabo", input_output={"in": in_mzML, "out": out_ffm} - ) - - # Prepare input and output files for feature linking - in_fl = self.file_manager.get_files(out_ffm, collect=True) - out_fl = self.file_manager.get_files( - "feature_matrix.consensusXML", set_results_dir="feature-linking" - ) - - # Run FeatureLinkerUnlabaeledKD with all feature maps passed at once - self.logger.log("Linking features...") - self.executor.run_topp( - "FeatureLinkerUnlabeledKD", input_output={"in": in_fl, "out": out_fl} - ) - self.logger.log("Exporting consensus features to pandas DataFrame...") - self.executor.run_python( - "export_consensus_feature_df", input_output={"in": out_fl[0]} - ) - # Check if adduct detection should be run. - if self.params["run-python-script"]: - # Example for a custom Python tool, which is located in src/python-tools. - self.executor.run_python("example", {"in": in_mzML}) - - @st.fragment def results(self) -> None: - @st.fragment - def show_consensus_features(): - df = pd.read_csv(file, sep="\t", index_col=0) - st.metric("number of consensus features", df.shape[0]) - c1, c2 = st.columns(2) - rows = c1.dataframe(df, selection_mode="multi-row", on_select="rerun")[ - "selection" - ]["rows"] - if rows: - df = df.iloc[rows, 4:] - fig = px.bar(df, barmode="group", labels={"value": "intensity"}) - with c2: - show_fig(fig, "consensus-feature-intensities") - else: - st.info( - "💡 Select one ore more rows in the table to show a barplot with intensities." - ) - - file = Path( - self.workflow_dir, "results", "feature-linking", "feature_matrix.tsv" - ) - if file.exists(): - show_consensus_features() - else: - st.warning("No consensus feature file found. Please run workflow first.") + pass From fbd50e4e42e5e9756e876fe346e400e0fd6e86b6 Mon Sep 17 00:00:00 2001 From: axelwalter Date: Fri, 18 Oct 2024 14:28:12 +0200 Subject: [PATCH 159/168] Update StreamlitUI.py - fix issues with streamlit ui element keys --- src/workflow/StreamlitUI.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/workflow/StreamlitUI.py b/src/workflow/StreamlitUI.py index 0c46835..270aaaf 100644 --- a/src/workflow/StreamlitUI.py +++ b/src/workflow/StreamlitUI.py @@ -55,12 +55,13 @@ def upload_widget( # create the files dir files_dir.mkdir(exist_ok=True, parents=True) - # check if only fallback files are in files_dir, if yes, reset the directory before adding new files - if [Path(f).name for f in Path(files_dir).iterdir()] == [ - Path(f).name for f in fallback - ]: - shutil.rmtree(files_dir) - files_dir.mkdir() + if fallback is not None: + # check if only fallback files are in files_dir, if yes, reset the directory before adding new files + if [Path(f).name for f in Path(files_dir).iterdir()] == [ + Path(f).name for f in fallback + ]: + shutil.rmtree(files_dir) + files_dir.mkdir() if not name: name = key.replace("-", " ") @@ -159,15 +160,15 @@ def upload_widget( with st_cols[0]: st.write("\n") st.write("\n") - dialog_button = st.button("📁", key='local_browse', help="Browse for your local directory with MS data.", disabled=not TK_AVAILABLE) + dialog_button = st.button("📁", key=f'local_browse_{key}', help="Browse for your local directory with MS data.", disabled=not TK_AVAILABLE) if dialog_button: st.session_state["local_dir"] = tk_directory_dialog("Select directory with your MS data", st.session_state["previous_dir"]) st.session_state["previous_dir"] = st.session_state["local_dir"] with st_cols[1]: - local_dir = st.text_input(f"path to folder with **{name}** files", value=st.session_state["local_dir"]) + local_dir = st.text_input(f"path to folder with **{name}** files", key=f"path_to_folder_{key}", value=st.session_state["local_dir"]) - if c2.button(f"Add **{name}** files from local folder", use_container_width=True): + if c2.button(f"Add **{name}** files from local folder", use_container_width=True, key=f"add_files_from_local_{key}", help="Add files from local directory."): files = [] local_dir = Path( local_dir From 786a27208af9bdf41ff0146304b26e6f3527e31c Mon Sep 17 00:00:00 2001 From: axelwalter Date: Fri, 18 Oct 2024 14:32:07 +0200 Subject: [PATCH 160/168] Update view.py --- src/view.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/view.py b/src/view.py index 1b89d5c..e22e8f5 100644 --- a/src/view.py +++ b/src/view.py @@ -188,8 +188,7 @@ def view_peak_map(): bin_peaks=True, backend="ms_plotly", ) - peak_map.fig.update_layout(template="simple_white", dragmode="select") - peak_map = peak_map.fig + peak_map.update_layout(template="simple_white", dragmode="select") c1, c2 = st.columns(2) with c1: st.info( From 7d4343a2914679e2a8455cb336c03feadcc3e31e Mon Sep 17 00:00:00 2001 From: axelwalter Date: Fri, 18 Oct 2024 14:36:40 +0200 Subject: [PATCH 161/168] Update view.py fix pyopenms_viz figure access --- src/view.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/view.py b/src/view.py index e22e8f5..df183c9 100644 --- a/src/view.py +++ b/src/view.py @@ -83,7 +83,6 @@ def plot_bpc_tic() -> go.Figure: show_plot=False, grid=False, ) - fig = fig.fig if st.session_state.view_bpc: df = st.session_state.view_ms1.groupby("RT").max().reset_index() df["type"] = "BPC" @@ -100,7 +99,6 @@ def plot_bpc_tic() -> go.Figure: show_plot=False, grid=False, ) - fig = fig.fig if st.session_state.view_eic: df = st.session_state.view_ms1 target_value = st.session_state.view_eic_mz.strip().replace(",", ".") @@ -129,7 +127,6 @@ def plot_bpc_tic() -> go.Figure: show_plot=False, grid=False, ) - fig = fig.fig except ValueError: st.error("Invalid m/z value for XIC provided. Please enter a valid number.") @@ -159,7 +156,6 @@ def plot_ms_spectrum(df, title, bin_peaks, num_x_bins): bin_peaks=bin_peaks, num_x_bins=num_x_bins, ) - fig = fig.fig fig.update_layout( template="plotly_white", dragmode="select", plot_bgcolor="rgb(255,255,255)" ) @@ -217,7 +213,6 @@ def view_peak_map(): height=650, width=900, ) - peak_map_3D = peak_map_3D.fig st.plotly_chart(peak_map_3D, use_container_width=True) From b3112e789a1d158b2c380151eddb4811044f1bd0 Mon Sep 17 00:00:00 2001 From: axelwalter Date: Mon, 21 Oct 2024 10:46:45 +0200 Subject: [PATCH 162/168] Update Workflow.py --- src/Workflow.py | 110 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 106 insertions(+), 4 deletions(-) diff --git a/src/Workflow.py b/src/Workflow.py index c0c752f..d1045bf 100644 --- a/src/Workflow.py +++ b/src/Workflow.py @@ -1,6 +1,13 @@ import streamlit as st from src.workflow.WorkflowManager import WorkflowManager +# for result section: +from pathlib import Path +import pandas as pd +import plotly.express as px +from src.common.common import show_fig + + class Workflow(WorkflowManager): # Setup pages for upload, parameter, execution and results. # For layout use any streamlit components such as tabs (as shown in example), columns, or even expanders. @@ -9,13 +16,108 @@ def __init__(self) -> None: super().__init__("TOPP Workflow", st.session_state["workspace"]) def upload(self) -> None: - pass + t = st.tabs(["MS data"]) + with t[0]: + # Use the upload method from StreamlitUI to handle mzML file uploads. + self.ui.upload_widget( + key="mzML-files", + name="MS data", + file_types="mzML", + fallback=[str(f) for f in Path("example-data", "mzML").glob("*.mzML")], + ) + @st.fragment def configure(self) -> None: - pass + # Allow users to select mzML files for the analysis. + self.ui.select_input_file("mzML-files", multiple=True) + + # Create tabs for different analysis steps. + t = st.tabs( + ["**Feature Detection**", "**Feature Linking**", "**Python Custom Tool**"] + ) + with t[0]: + # Parameters for FeatureFinderMetabo TOPP tool. + self.ui.input_TOPP( + "FeatureFinderMetabo", + custom_defaults={"algorithm:common:noise_threshold_int": 1000.0}, + ) + with t[1]: + # Paramters for MetaboliteAdductDecharger TOPP tool. + self.ui.input_TOPP("FeatureLinkerUnlabeledKD") + with t[2]: + # A single checkbox widget for workflow logic. + self.ui.input_widget("run-python-script", False, "Run custom Python script") + # Generate input widgets for a custom Python tool, located at src/python-tools. + # Parameters are specified within the file in the DEFAULTS dictionary. + self.ui.input_python("example") def execution(self) -> None: - pass + # Any parameter checks, here simply checking if mzML files are selected + if not self.params["mzML-files"]: + self.logger.log("ERROR: No mzML files selected.") + return + + # Get mzML files with FileManager + in_mzML = self.file_manager.get_files(self.params["mzML-files"]) + + # Log any messages. + self.logger.log(f"Number of input mzML files: {len(in_mzML)}") + # Prepare output files for feature detection. + out_ffm = self.file_manager.get_files( + in_mzML, "featureXML", "feature-detection" + ) + + # Run FeatureFinderMetabo tool with input and output files. + self.logger.log("Detecting features...") + self.executor.run_topp( + "FeatureFinderMetabo", input_output={"in": in_mzML, "out": out_ffm} + ) + + # Prepare input and output files for feature linking + in_fl = self.file_manager.get_files(out_ffm, collect=True) + out_fl = self.file_manager.get_files( + "feature_matrix.consensusXML", set_results_dir="feature-linking" + ) + + # Run FeatureLinkerUnlabaeledKD with all feature maps passed at once + self.logger.log("Linking features...") + self.executor.run_topp( + "FeatureLinkerUnlabeledKD", input_output={"in": in_fl, "out": out_fl} + ) + self.logger.log("Exporting consensus features to pandas DataFrame...") + self.executor.run_python( + "export_consensus_feature_df", input_output={"in": out_fl[0]} + ) + # Check if adduct detection should be run. + if self.params["run-python-script"]: + # Example for a custom Python tool, which is located in src/python-tools. + self.executor.run_python("example", {"in": in_mzML}) + + @st.fragment def results(self) -> None: - pass + @st.fragment + def show_consensus_features(): + df = pd.read_csv(file, sep="\t", index_col=0) + st.metric("number of consensus features", df.shape[0]) + c1, c2 = st.columns(2) + rows = c1.dataframe(df, selection_mode="multi-row", on_select="rerun")[ + "selection" + ]["rows"] + if rows: + df = df.iloc[rows, 4:] + fig = px.bar(df, barmode="group", labels={"value": "intensity"}) + with c2: + show_fig(fig, "consensus-feature-intensities") + else: + st.info( + "💡 Select one ore more rows in the table to show a barplot with intensities." + ) + + file = Path( + self.workflow_dir, "results", "feature-linking", "feature_matrix.tsv" + ) + if file.exists(): + show_consensus_features() + else: + st.warning("No consensus feature file found. Please run workflow first.") From c287d1f6d26863eccec424cd594698ca8ba9d49b Mon Sep 17 00:00:00 2001 From: Tom David Mueller Date: Fri, 25 Oct 2024 12:26:30 +0200 Subject: [PATCH 163/168] add piwik pro --- src/common/common.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/common/common.py b/src/common/common.py index 8aee500..2f52b4f 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -154,6 +154,33 @@ def page_setup(page: str = "") -> dict[str, Any]: width=1, height=1, ) + if (st.session_state.settings["analytics"]["piwik_pro"]["enabled"]) and ( + st.session_state.tracking_consent == True + ): + html( + """ + + + + + + + """, + width=1, + height=1, + ) # Determine the workspace for the current session if ("workspace" not in st.session_state) or ( From f8625a6457c3ec8b53360614ed859444ad602343 Mon Sep 17 00:00:00 2001 From: Tom David Mueller Date: Fri, 25 Oct 2024 19:37:56 +0200 Subject: [PATCH 164/168] fix piwik --- src/common/common.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/common/common.py b/src/common/common.py index 2f52b4f..1310363 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -163,7 +163,6 @@ def page_setup(page: str = "") -> dict[str, Any]: """, From 960196e565a5c063712f3a0775220fdd9fc78984 Mon Sep 17 00:00:00 2001 From: Tom David Mueller Date: Sat, 26 Oct 2024 11:34:04 +0200 Subject: [PATCH 165/168] add support for piwik pro and ga --- gdpr_consent/dist/bundle.js | 2 +- gdpr_consent/src/main.ts | 75 +++++++++++++++++++----------- hooks/hook-analytics.py | 8 ++-- src/common/captcha_.py | 8 +++- src/common/common.py | 91 +++++++++++++++++++------------------ 5 files changed, 106 insertions(+), 78 deletions(-) diff --git a/gdpr_consent/dist/bundle.js b/gdpr_consent/dist/bundle.js index ceb4b7d..2d2d814 100644 --- a/gdpr_consent/dist/bundle.js +++ b/gdpr_consent/dist/bundle.js @@ -235,7 +235,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var streamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! streamlit-component-lib */ \"./node_modules/streamlit-component-lib/dist/index.js\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n\n// Defines the configuration for Klaro\nvar klaroConfig = {\n mustConsent: true,\n acceptAll: true,\n services: [\n {\n // In GTM, you should define a custom event trigger named `klaro-google-analytics-accepted` which should trigger the Google Analytics integration.\n name: 'google-analytics',\n cookies: [\n /^_ga(_.*)?/ // we delete the Google Analytics cookies if the user declines its use\n ],\n purposes: ['analytics'],\n onAccept: onAcceptCallback,\n onDecline: onDeclineCallback,\n },\n ]\n};\n// This will make klaroConfig globally accessible\nwindow.klaroConfig = klaroConfig;\n// Function to safely access the Klaro manager\nfunction getKlaroManager() {\n var _a;\n return ((_a = window.klaro) === null || _a === void 0 ? void 0 : _a.getManager) ? window.klaro.getManager() : null;\n}\n// Waits until Klaro Manager is available\nfunction waitForKlaroManager() {\n return __awaiter(this, arguments, void 0, function (maxWaitTime, interval) {\n var startTime, klaroManager;\n if (maxWaitTime === void 0) { maxWaitTime = 5000; }\n if (interval === void 0) { interval = 100; }\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n startTime = Date.now();\n _a.label = 1;\n case 1:\n if (!(Date.now() - startTime < maxWaitTime)) return [3 /*break*/, 3];\n klaroManager = getKlaroManager();\n if (klaroManager) {\n return [2 /*return*/, klaroManager];\n }\n return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, interval); })];\n case 2:\n _a.sent();\n return [3 /*break*/, 1];\n case 3: throw new Error(\"Klaro manager did not become available within the allowed time.\");\n }\n });\n });\n}\n// Helper function to handle unknown errors\nfunction handleError(error) {\n if (error instanceof Error) {\n console.error(\"Error:\", error.message);\n }\n else {\n console.error(\"Unknown error:\", error);\n }\n}\n// Tracking was accepted\nfunction onAcceptCallback() {\n return __awaiter(this, void 0, void 0, function () {\n var manager, error_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, waitForKlaroManager()];\n case 1:\n manager = _a.sent();\n if (manager.confirmed) {\n streamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.setComponentValue(true);\n }\n return [3 /*break*/, 3];\n case 2:\n error_1 = _a.sent();\n handleError(error_1);\n return [3 /*break*/, 3];\n case 3: return [2 /*return*/];\n }\n });\n });\n}\n// Tracking was declined\nfunction onDeclineCallback() {\n return __awaiter(this, void 0, void 0, function () {\n var manager, error_2;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, waitForKlaroManager()];\n case 1:\n manager = _a.sent();\n if (manager.confirmed) {\n streamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.setComponentValue(false);\n }\n return [3 /*break*/, 3];\n case 2:\n error_2 = _a.sent();\n handleError(error_2);\n return [3 /*break*/, 3];\n case 3: return [2 /*return*/];\n }\n });\n });\n}\n// Stores if the component has been rendered before\nvar rendered = false;\nfunction onRender(event) {\n // Klaro does not work if embedded multiple times\n if (rendered) {\n return;\n }\n rendered = true;\n // Create a new script element\n var script = document.createElement('script');\n // Set the necessary attributes\n script.defer = true;\n script.type = 'application/javascript';\n script.src = 'https://cdn.kiprotect.com/klaro/v0.7/klaro.js';\n // Set the klaro config\n script.setAttribute('data-config', 'klaroConfig');\n // Append the script to the head or body\n document.head.appendChild(script);\n}\n// Attach our `onRender` handler to Streamlit's render event.\nstreamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.events.addEventListener(streamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.RENDER_EVENT, onRender);\n// Tell Streamlit we're ready to start receiving data. We won't get our\n// first RENDER_EVENT until we call this function.\nstreamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.setComponentReady();\n// Finally, tell Streamlit to update the initial height.\nstreamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.setFrameHeight(1000);\n\n\n//# sourceURL=webpack://gdpr_consent/./src/main.ts?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var streamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! streamlit-component-lib */ \"./node_modules/streamlit-component-lib/dist/index.js\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n\n// Defines the configuration for Klaro\nvar klaroConfig = {\n mustConsent: true,\n acceptAll: true,\n services: []\n};\n// This will make klaroConfig globally accessible\nwindow.klaroConfig = klaroConfig;\n// Function to safely access the Klaro manager\nfunction getKlaroManager() {\n var _a;\n return ((_a = window.klaro) === null || _a === void 0 ? void 0 : _a.getManager) ? window.klaro.getManager() : null;\n}\n// Waits until Klaro Manager is available\nfunction waitForKlaroManager() {\n return __awaiter(this, arguments, void 0, function (maxWaitTime, interval) {\n var startTime, klaroManager;\n if (maxWaitTime === void 0) { maxWaitTime = 5000; }\n if (interval === void 0) { interval = 100; }\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n startTime = Date.now();\n _a.label = 1;\n case 1:\n if (!(Date.now() - startTime < maxWaitTime)) return [3 /*break*/, 3];\n klaroManager = getKlaroManager();\n if (klaroManager) {\n return [2 /*return*/, klaroManager];\n }\n return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, interval); })];\n case 2:\n _a.sent();\n return [3 /*break*/, 1];\n case 3: throw new Error(\"Klaro manager did not become available within the allowed time.\");\n }\n });\n });\n}\n// Helper function to handle unknown errors\nfunction handleError(error) {\n if (error instanceof Error) {\n console.error(\"Error:\", error.message);\n }\n else {\n console.error(\"Unknown error:\", error);\n }\n}\n// Tracking was accepted\nfunction callback() {\n return __awaiter(this, void 0, void 0, function () {\n var manager, return_vals, _i, _a, service, error_1;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n _b.trys.push([0, 2, , 3]);\n return [4 /*yield*/, waitForKlaroManager()];\n case 1:\n manager = _b.sent();\n if (manager.confirmed) {\n return_vals = {};\n for (_i = 0, _a = klaroConfig.services; _i < _a.length; _i++) {\n service = _a[_i];\n return_vals[service.name] = manager.getConsent(service.name);\n }\n streamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.setComponentValue(return_vals);\n }\n return [3 /*break*/, 3];\n case 2:\n error_1 = _b.sent();\n handleError(error_1);\n return [3 /*break*/, 3];\n case 3: return [2 /*return*/];\n }\n });\n });\n}\n// Stores if the component has been rendered before\nvar rendered = false;\nfunction onRender(event) {\n // Klaro does not work if embedded multiple times\n if (rendered) {\n return;\n }\n rendered = true;\n var data = event.detail;\n if (data.args['google_analytics']) {\n klaroConfig.services.push({\n name: 'google-analytics',\n cookies: [\n /^_ga(_.*)?/ // we delete the Google Analytics cookies if the user declines its use\n ],\n purposes: ['analytics'],\n onAccept: callback,\n onDecline: callback,\n });\n }\n if (data.args['piwik_pro']) {\n klaroConfig.services.push({\n name: 'piwik-pro',\n purposes: ['analytics'],\n onAccept: callback,\n onDecline: callback,\n });\n }\n // Create a new script element\n var script = document.createElement('script');\n // Set the necessary attributes\n script.defer = true;\n script.type = 'application/javascript';\n script.src = 'https://cdn.kiprotect.com/klaro/v0.7/klaro.js';\n // Set the klaro config\n script.setAttribute('data-config', 'klaroConfig');\n // Append the script to the head or body\n document.head.appendChild(script);\n}\n// Attach our `onRender` handler to Streamlit's render event.\nstreamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.events.addEventListener(streamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.RENDER_EVENT, onRender);\n// Tell Streamlit we're ready to start receiving data. We won't get our\n// first RENDER_EVENT until we call this function.\nstreamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.setComponentReady();\n// Finally, tell Streamlit to update the initial height.\nstreamlit_component_lib__WEBPACK_IMPORTED_MODULE_0__.Streamlit.setFrameHeight(1000);\n\n\n//# sourceURL=webpack://gdpr_consent/./src/main.ts?"); /***/ }), diff --git a/gdpr_consent/src/main.ts b/gdpr_consent/src/main.ts index bbb5ef5..f7219ff 100644 --- a/gdpr_consent/src/main.ts +++ b/gdpr_consent/src/main.ts @@ -1,21 +1,23 @@ import { Streamlit, RenderData } from "streamlit-component-lib" +// Define service +type Service = { + name: string; + purposes: string[]; + onAccept: () => Promise; + onDecline: () => Promise; + cookies?: (string | RegExp)[]; +}; + // Defines the configuration for Klaro -const klaroConfig = { +let klaroConfig: { + mustConsent: boolean; + acceptAll: boolean; + services: Service[]; +} = { mustConsent: true, acceptAll: true, - services: [ - { - // In GTM, you should define a custom event trigger named `klaro-google-analytics-accepted` which should trigger the Google Analytics integration. - name: 'google-analytics', - cookies: [ - /^_ga(_.*)?/ // we delete the Google Analytics cookies if the user declines its use - ], - purposes: ['analytics'], - onAccept: onAcceptCallback, - onDecline: onDeclineCallback, - }, - ] + services: [] }; // This will make klaroConfig globally accessible @@ -62,23 +64,15 @@ function handleError(error: unknown): void { } // Tracking was accepted -async function onAcceptCallback(): Promise { +async function callback(): Promise { try { const manager = await waitForKlaroManager() if (manager.confirmed) { - Streamlit.setComponentValue(true) - } - } catch (error) { - handleError(error) - } -} - -// Tracking was declined -async function onDeclineCallback(): Promise { - try { - const manager = await waitForKlaroManager() - if (manager.confirmed) { - Streamlit.setComponentValue(false) + let return_vals : Record = {} + for (const service of klaroConfig.services) { + return_vals[service.name] = manager.getConsent(service.name) + } + Streamlit.setComponentValue(return_vals) } } catch (error) { handleError(error) @@ -95,6 +89,32 @@ function onRender(event: Event): void { } rendered = true + const data = (event as CustomEvent).detail + + if (data.args['google_analytics']) { + klaroConfig.services.push( + { + name: 'google-analytics', + cookies: [ + /^_ga(_.*)?/ // we delete the Google Analytics cookies if the user declines its use + ], + purposes: ['analytics'], + onAccept: callback, + onDecline: callback, + } + ) + } + if (data.args['piwik_pro']) { + klaroConfig.services.push( + { + name: 'piwik-pro', + purposes: ['analytics'], + onAccept: callback, + onDecline: callback, + } + ) + } + // Create a new script element var script = document.createElement('script') @@ -108,6 +128,7 @@ function onRender(event: Event): void { // Append the script to the head or body document.head.appendChild(script) + } // Attach our `onRender` handler to Streamlit's render event. diff --git a/hooks/hook-analytics.py b/hooks/hook-analytics.py index 1a9eedb..6b8b2da 100644 --- a/hooks/hook-analytics.py +++ b/hooks/hook-analytics.py @@ -69,14 +69,14 @@ def piwik_pro_body(piwik_tag): index = f.read() # Configure google analytics - if settings['analytics']['google_analytics']['enabled']: - gtm_tag = settings['analytics']['google_analytics']['tag'] + if settings['analytics']['google-analytics']['enabled']: + gtm_tag = settings['analytics']['google-analytics']['tag'] index = patch_head(index, google_analytics_head(gtm_tag)) index = patch_body(index, google_analytics_body(gtm_tag)) # Configure piwik pro - if settings['analytics']['piwik_pro']['enabled']: - piwik_tag = settings['analytics']['piwik_pro']['tag'] + if settings['analytics']['piwik-pro']['enabled']: + piwik_tag = settings['analytics']['piwik-pro']['tag'] index = patch_body(index, piwik_pro_body(piwik_tag)) # Save index.html diff --git a/src/common/captcha_.py b/src/common/captcha_.py index 6a3bce4..5788d08 100644 --- a/src/common/captcha_.py +++ b/src/common/captcha_.py @@ -200,10 +200,14 @@ def captcha_control(): if "controllo" not in st.session_state or st.session_state["controllo"] == False: # Check if consent for tracking was given - if (st.session_state.settings['analytics']['google_analytics']['enabled']) and (st.session_state.tracking_consent is None): + ga = st.session_state.settings['analytics']['google-analytics']['enabled'] + pp = st.session_state.settings['analytics']['piwik-pro']['enabled'] + if (ga or pp) and (st.session_state.tracking_consent is None): with st.spinner(): # Ask for consent - st.session_state.tracking_consent = consent_component() + st.session_state.tracking_consent = consent_component( + google_analytics=ga, piwik_pro=pp + ) if st.session_state.tracking_consent is None: # No response by user yet st.stop() diff --git a/src/common/common.py b/src/common/common.py index 1310363..b3e3d24 100644 --- a/src/common/common.py +++ b/src/common/common.py @@ -134,51 +134,54 @@ def page_setup(page: str = "") -> dict[str, Any]: st.logo("assets/pyopenms_transparent_background.png") # Create google analytics if consent was given - if "tracking_consent" not in st.session_state: - st.session_state.tracking_consent = None - if (st.session_state.settings["analytics"]["google_analytics"]["enabled"]) and ( - st.session_state.tracking_consent == True - ): - html( - """ - - - - - - """, - width=1, - height=1, - ) - if (st.session_state.settings["analytics"]["piwik_pro"]["enabled"]) and ( - st.session_state.tracking_consent == True + if ( + ("tracking_consent" not in st.session_state) + or (st.session_state.tracking_consent is None) + or (not st.session_state.settings['online_deployment']) ): - html( - """ - - - - - - """, - width=1, - height=1, - ) + st.session_state.tracking_consent = None + else: + if (st.session_state.settings["analytics"]["google-analytics"]["enabled"]) and ( + st.session_state.tracking_consent["google-analytics"] == True + ): + html( + """ + + + + + + """, + width=1, + height=1, + ) + if (st.session_state.settings["analytics"]["piwik-pro"]["enabled"]) and ( + st.session_state.tracking_consent["piwik-pro"] == True + ): + html( + """ + + + + + + """, + width=1, + height=1, + ) # Determine the workspace for the current session if ("workspace" not in st.session_state) or ( From 7cc9b9508f146f693f06d1fb2d3dc18f29361b07 Mon Sep 17 00:00:00 2001 From: Tom David Mueller Date: Sat, 26 Oct 2024 11:34:27 +0200 Subject: [PATCH 166/168] automatically set deployment --- Dockerfile | 3 +++ Dockerfile_simple | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/Dockerfile b/Dockerfile index 1ad98b5..7143ec3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -137,6 +137,9 @@ RUN chmod +x /app/entrypoint.sh # Patch Analytics RUN mamba run -n streamlit-env python hooks/hook-analytics.py +# Set Online Deployment +RUN jq '.online_deployment = true' settings.json > tmp.json && mv tmp.json settings.json + # Download latest OpenMS App executable for Windows from Github actions workflow. RUN WORKFLOW_ID=$(curl -s "https://api.github.com/repos/$GITHUB_USER/$GITHUB_REPO/actions/workflows" | jq -r '.workflows[] | select(.name == "Build executable for Windows") | .id') \ && SUCCESSFUL_RUNS=$(curl -s "https://api.github.com/repos/$GITHUB_USER/$GITHUB_REPO/actions/runs?workflow_id=$WORKFLOW_ID&status=success" | jq -r '.workflow_runs[0].id') \ diff --git a/Dockerfile_simple b/Dockerfile_simple index 1393d2b..ebc2fa5 100644 --- a/Dockerfile_simple +++ b/Dockerfile_simple @@ -79,6 +79,12 @@ RUN echo "mamba run --no-capture-output -n streamlit-env streamlit run app.py" > # make the script executable RUN chmod +x /app/entrypoint.sh +# Patch Analytics +RUN mamba run -n streamlit-env python hooks/hook-analytics.py + +# Set Online Deployment +RUN jq '.online_deployment = true' settings.json > tmp.json && mv tmp.json settings.json + # Download latest OpenMS App executable for Windows from Github actions workflow. RUN WORKFLOW_ID=$(curl -s "https://api.github.com/repos/$GITHUB_USER/$GITHUB_REPO/actions/workflows" | jq -r '.workflows[] | select(.name == "Build executable for Windows") | .id') \ && SUCCESSFUL_RUNS=$(curl -s "https://api.github.com/repos/$GITHUB_USER/$GITHUB_REPO/actions/runs?workflow_id=$WORKFLOW_ID&status=success" | jq -r '.workflow_runs[0].id') \ From 46e82b5272bb81c508d7326181cd5d0d74f33e39 Mon Sep 17 00:00:00 2001 From: Tom David Mueller Date: Sat, 26 Oct 2024 11:34:49 +0200 Subject: [PATCH 167/168] update default settings --- settings.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/settings.json b/settings.json index 1c7d244..ed1cc82 100644 --- a/settings.json +++ b/settings.json @@ -1,13 +1,13 @@ { "analytics": { - "google_analytics": { - "enabled": true, - "tag": "GTM-NRXGDF5H" + "google-analytics": { + "enabled": false, + "tag": "" }, - "piwik_pro": { + "piwik-pro": { "enabled": true, "tag": "57690c44-d635-43b0-ab43-f8bd3064ca06" } }, - "online_deployment": true + "online_deployment": false } \ No newline at end of file From 17e97507e38389d5251d9e87b204edd54737f45a Mon Sep 17 00:00:00 2001 From: Tom David Mueller Date: Sat, 26 Oct 2024 14:54:17 +0200 Subject: [PATCH 168/168] add hooks to docker image --- Dockerfile_simple | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile_simple b/Dockerfile_simple index ebc2fa5..af9793c 100644 --- a/Dockerfile_simple +++ b/Dockerfile_simple @@ -59,6 +59,7 @@ COPY content/ /app/content COPY docs/ /app/docs COPY example-data/ /app/example-data COPY gdpr_consent/ /app/gdpr_consent +COPY hooks/ /app/hooks COPY src/ /app/src COPY app.py /app/app.py COPY settings.json /app/settings.json